[wp-trac] [WordPress Trac] #35357: Introduce did_filter()
WordPress Trac
noreply at wordpress.org
Fri Jan 8 02:43:56 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):
I stand corrected. It does indeed return 1. So there is a difference,
however I don't see a use case where the way did_action which counts per
do_action call as opposed to the number of functions that run on it (like
my above patch does) makes sense for filters. I actually think the patch
method of counting is more expected for filters because of exactly this:
> I've never seen much utility for this, because filters are often run in
different, repeated contexts, rather than a single-time action.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35357#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list