Make WordPress Core

Opened 11 years ago

Last modified 9 years ago

#22256 closed enhancement

Hook namespaceing — at Initial Version

Reported by: scribu's profile scribu Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Plugins Keywords:
Focuses: Cc:

Description

We have a handy remove_action() function, but it works only if you can acquire the exact callback that was passed to add_action(), which is tricky when it comes to:

  • class instance methods, where you don't have access to the instance
  • PHP 5.3 closures

Introducing namespaces for hooks, similar to jQuery's namespaced events, we would not only take care of that problem, but also enable things like:

  • remove all callbacks to 'the_content' added by plugin X
  • remove all callbacks to the 'parse_query' action added by theme Y

Change History (0)

Note: See TracTickets for help on using tickets.