[wp-trac] [WordPress Trac] #21172: Adding the first filter/action in an earlier priority during a later priority causes the earlier priority to run (last)

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 6 16:07:53 UTC 2012


#21172: Adding the first filter/action in an earlier priority during a later
priority causes the earlier priority to run (last)
--------------------------+------------------------------
 Reporter:  devesine      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Plugins       |     Version:  3.4
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by devesine):

 Proposed solution: keep track of the current priority, skip any priorities
 encountered that are already past.

 [attachment:add-at-9-after-21169.patch] applies after the patch attached
 to #21169; [attachment:add-at-9-include-21169.patch] includes that patch
 (for convenience of testing).

 I can also write one against the present code (using
 {{{next()}}}/{{{current()}}} rather than {{{each()}}}) if/when that
 becomes appropriate. Doing it without the #21169 change would slightly
 change the implementation of this fix (to use {{{key($wp_filter[$tag])}}}
 instead of {{{$next['key']}}}, I believe).

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


More information about the wp-trac mailing list