[wp-trac] Re: [WordPress Trac] #5231: add_action('all',
...) causes unexpected behaviour
WordPress Trac
wp-trac at lists.automattic.com
Wed Nov 7 00:04:18 GMT 2007
#5231: add_action('all', ...) causes unexpected behaviour
-------------------------------------+--------------------------------------
Reporter: tellyworth | Owner: anonymous
Type: defect | Status: reopened
Priority: normal | Milestone: 2.4
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+--------------------------------------
Comment (by mdawaffe):
has_filter_with_arg.diff = has_filter.diff plus the following.
1. {{{has_filter( $tag )}}} improved to return false if
{{{$wp_filter[$tag]}}} is empty (not just if not set).
2. {{{remove_filter( $tag, $func, $priority )}}} improved to unset
{{{$wp_filter[$tag][$priority]}}} as necessary (so that {{{has_filter()}}}
can work).
3. new {{{has_filter( $tag, $function )}}} syntax. Returns
{{{$priority}}} if {{{$function}}} is attached to {{{$tag}}}, {{{false}}}
otherwise.
4. tweak to internally used {{{_wp_filter_build_unique_id()}}} to make
{{{has_filter( $tag, $function )}}} work.
5. same for {{{*_action}}}.
--
Ticket URL: <http://trac.wordpress.org/ticket/5231#comment:30>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list