[wp-trac] [WordPress Trac] #24429: Provide a way to deprecate and/or rename hooks

WordPress Trac noreply at wordpress.org
Mon May 27 04:32:24 UTC 2013


#24429: Provide a way to deprecate and/or rename hooks
-------------------------+------------------------
 Reporter:  ryanve       |       Owner:
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  Plugins      |     Version:
 Severity:  normal       |  Resolution:  duplicate
 Keywords:               |
-------------------------+------------------------

Comment (by ryanve):

 I've read #23259, #14671, and #14280. I think the performance lost by
 adding one filter could be regained elsewhere. I know `add_filter` is
 called a lot. The extra capability here seems worth it.

 Applying the old hooks in place is not ideal and does not achieve the same
 effect. It is messy and mixes up the priorities. There currently is no way
 to perfectly alias a hook b/c one fires before the other. Applying unused
 hooks is a waste itself. The `return false` above can stop hooks from
 being added and thus **save** performance. They'd never exist in the
 `apply_filters`  stack in the first place.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24429#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list