[wp-trac] [WordPress Trac] #14869: Adding a "callback" to WP_Query()

WordPress Trac wp-trac at lists.automattic.com
Tue Sep 14 16:06:38 UTC 2010

#14869: Adding a "callback" to WP_Query()
 Reporter:  mikeschinkel  |       Owner:                 
     Type:  enhancement   |      Status:  new            
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:                 
 Severity:  normal        |    Keywords:                 
 As WordPress apps get more complex with many different post types and
 taxonomies it makes it harder to write robust plugins when using global
 filters on WP_Query(). Instead of writing code and encapsulating you end
 up writing complex if expressions in hopes to keep everything else from
 triggering your SQL additions in your `post_where` and other hooks.

 What is the chance of '''adding a callback filter to the $args for
 WP_Query()''' that would be called after the posts_request filter so that
 we don't have to depend on global filters when we need to modify a query
 for a specific call in a plugin? (Ideally this callback would work for all
 the filters in WP_Query() but I'd settle for one that gets called after
 posts_request vs. not having any.)

 This actually is a much larger issues than a single callback can fix, but
 a single callback would at least be a good start.

Ticket URL: <http://core.trac.wordpress.org/ticket/14869>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list