[wp-trac] [WordPress Trac] #9886: Add an apply_filters_ref_array() function
WordPress Trac
wp-trac at lists.automattic.com
Tue Feb 23 14:41:07 UTC 2010
#9886: Add an apply_filters_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
-----------------------------+----------------------------------------------
Changes (by scribu):
* keywords: needs-patch early 2nd-opinion => needs-patch early
Comment:
I'm +1 on the idea of passing the current query as a second parameter to
each filter in WP_Query.
You could then do all sorts of neat things, like adding custom query vars:
{{{
$my_query = new WP_Query(array('fav_posts_for_user' => 1));
}}}
I'll see if I can make a patch.
Replying to [comment:12 Denis-de-Bernardy]:
> 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.
See #12320 for the Recent Posts widget issue.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9886#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list