[wp-trac] [WordPress Trac] #9886: Add an apply_filter_ref_array() function

WordPress Trac wp-trac at lists.automattic.com
Thu Dec 24 17:11:02 UTC 2009


#9886: Add an apply_filter_ref_array() function
-----------------------------+----------------------------------------------
 Reporter:  westi            |       Owner:  westi            
     Type:  feature request  |      Status:  new              
 Priority:  normal           |   Milestone:  3.0              
Component:  Plugins          |     Version:  2.8              
 Severity:  major            |    Keywords:  needs-patch early
-----------------------------+----------------------------------------------

Comment(by Denis-de-Bernardy):

 Replying to [comment:11 dd32]:
 > > but I'm 99% you can check if $wp_query === $wp_the_query at that stage
 >
 > Picture the plugin needing to apply to EVERY loop, Now picture it having
 to apply conditionally to every loop. Theres very little movement for
 conditional applications, you can mess with add/remove filters, but it
 becomes messy.

 You're very right. I ran into the issue myself no later than yesterday.
 The Recent Posts widget actually doesn't override the $wp_query. I've
 added a temporary workaround, but it's not as good as I'd like it to. That
 said, there is a do_action_ref_array() early on in the WP_Query stuff.
 Checking over there might be a good option as well.

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


More information about the wp-trac mailing list