[wp-trac] [WordPress Trac] #12913: Notification mechanism for deprecated actions
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 8 04:22:58 UTC 2010
#12913: Notification mechanism for deprecated actions
-------------------------+--------------------------------------------------
Reporter: strider72 | Owner: nacin
Type: enhancement | Status: reviewing
Priority: normal | Milestone: Future Release
Component: Plugins | Version:
Severity: normal | Keywords: has-patch
-------------------------+--------------------------------------------------
Changes (by nacin):
* owner: => nacin
* status: new => reviewing
* component: General => Plugins
* milestone: 3.1 => Future Release
Comment:
I've been wanting to do this for a while.
I don't think it is a good idea to add this directly to do_action and
apply_filters calls, as we need these to perform as fast as possible.
Additionally, the patch as attached would break any action that has
multiple args attached to it.
Instead, I would suggest we issue a call {{{_deprecated_hook( name of
hook, version, replacement, message )}}} just after the hook is executed,
and use did_action() in _deprecated_hook() to see whether we should
actually trigger a deprecated_hook_used action and issue the E_NOTICE (if
WP_DEBUG).
Might not be a bad idea to use _deprecated_action() and
_deprecated_filter(), have one wrap the other, and simply use slightly
different messages, just to be clear in both the source code and in the
E_NOTICE that is produced.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12913#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list