[wp-trac] [WordPress Trac] #17817: do_action/apply_filters/etc. recursion on same filter kills underlying call
WordPress Trac
noreply at wordpress.org
Mon Nov 25 22:21:20 UTC 2013
#17817: do_action/apply_filters/etc. recursion on same filter kills underlying call
-------------------------------------------------+-------------------------
Reporter: kernfel | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future
Component: Plugins | Release
Severity: normal | Version: 3.4.1
Keywords: has-patch needs-testing dev- | Resolution:
feedback |
-------------------------------------------------+-------------------------
Comment (by Denis-de-Bernardy):
Replying to [comment:42 sc0ttkclark]:
> @Denis-de-Bernardy: What is your suggestion? Just wanted to be sure it
was clear what you were championing, could you clarify or suggest
something different?
My own opinion on this hasn't moved by one iota in over 4 years (#9968):
we should replace our current mess with foreach() loops where needed, and
shed a crocodile tear or two if we inconveniently break an already half-
broken plugin in the process.
> @SergeyBiryukov: The patch
http://core.trac.wordpress.org/attachment/ticket/17817/17817.3.patch -- is
this is something that can move forward since it passes unit tests, or
does this require further feedback/direction from core devs? I know it's
too big of a change to make 3.8, but what are the next steps to get this
ticket resolved in *some* way?
I'll volunteer an opinion on that patch: it's nice to see some object-
oriented code, but if we introduce changes of that magnitude, we might as
well backport Symfony's EventDispatcher to make it php 5.2 compatible, and
wrap it around the legacy API functions.
http://symfony.com/doc/current/components/event_dispatcher/introduction.html
That way, we'd be building on top of something sound, and eventually begin
paving the way towards potentially interesting behaviors such as stopping
event propagation — which, incidentally, could be used to "break" the
legacy API functions while keeping a perfectly functional API at its side.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17817#comment:45>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list