﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
9886,Pass $this as the second argument in WP_Query filters,westi,westi,"I have a simple plugin which adds and checks query arguments using the following filters:

{{{
add_filter( 'query_vars', array(&$this,'register_query_var') );
add_filter( 'posts_where', array(&$this,'posts_where') ); 
add_filter( 'post_limits', array(&$this, 'post_limits') );
}}}

It then uses get_query_var() to see if the new vars are set and modfies post_where and post_limits.  Unfortunately for new WP_Query objects the calls to get_query_var() will get the value that was used in the main loop or calls to query_posts.

This makes nested loops hard :-(

I think we need to make the filters like post_where pass the WP_Query object as an extra argument.",enhancement,closed,normal,3.0,Plugins,2.8,major,fixed,has-patch tested commit early,
