• If given a class that has no hook, how would one turn it into a hook?

    I know you need to wrap it in a function. But what would the function look like? Where would we save the file?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Jon (Kenshino)

    (@kenshino)

    Lord Jon

    If a class has no hook, you simply can’t hook onto it.

    If the class is somehow pluggable, then override it with your own class. And then add in your own hook.

    Moderator bcworkz

    (@bcworkz)

    However, if the class calls a WP function that does have a hook, one might be able to indirectly affect the class through the WP function call. Just sayin’

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Turn a class into a hook?’ is closed to new replies.