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

WordPress Trac wp-trac at lists.automattic.com
Fri Dec 18 23:10:58 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 dd32):

 > but I'm 99% you can check if $wp_query === $wp_the_query at that stage

 I can see how that will not work.

 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.

 There is at present, no global which you can access for the current
 WP_Query, Query_posts should be avoided at all costs IMO, and thats the
 only one which uses $wp_query, if you use WP_Query directly (As you have
 to do anyway for multiple loops) then you've got no way of knowing what
 query vars the current loop is using.

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


More information about the wp-trac mailing list