[wp-trac] [WordPress Trac] #35357: Introduce did_filter()
WordPress Trac
noreply at wordpress.org
Fri Jan 8 02:51:01 UTC 2016
#35357: Introduce did_filter()
-------------------------+------------------------
Reporter: mordauk | Owner: chriscct7
Type: enhancement | Status: accepted
Priority: normal | Milestone: 4.5
Component: Plugins | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-------------------------+------------------------
Comment (by chriscct7):
With filters I think its more interesting to count the number of functions
that have run on it, rather than the number of times a filter has been
called, and that's what the patch was designed to solve (thus why the unit
tests passed). Despite apparently being misconcieved on what did_action
does, the application of 4 functions to a single filter should return 4
based on what I've written if did_filter is run after the filter, and 0 ,
1, 2, and 3 respectively if run inside each of the functions.
Perhaps a different function name for it, and then something like
https://core.trac.wordpress.org/attachment/ticket/35357/35357.patch for
the did_filter
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35357#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list