Adding a "callback" to WP_Query()
|Reported by:||mikeschinkel||Owned by:|
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.