[wp-trac] [WordPress Trac] #22256: Hook namespaceing
WordPress Trac
noreply at wordpress.org
Mon Oct 22 18:56:25 UTC 2012
#22256: Hook namespaceing
-----------------------------+-------------------------
Reporter: scribu | Type: enhancement
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Plugins
Version: | Severity: normal
Keywords: |
-----------------------------+-------------------------
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
[http://docs.jquery.com/Namespaced_Events 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
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22256>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list