[wp-trac] [WordPress Trac] #23469: Comment meta query is parsed before the pre_get_comments filter
WordPress Trac
noreply at wordpress.org
Wed Feb 13 12:21:26 UTC 2013
#23469: Comment meta query is parsed before the pre_get_comments filter
-----------------------------+--------------------------
Reporter: kasparsd | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Comments
Version: 3.5.1 | Severity: major
Keywords: needs-patch |
-----------------------------+--------------------------
Currently it is impossible to use the `pre_get_comments` filter to adjust
the meta_query, because `parse_query_vars( $this->query_vars )` is run
before the filter is applied
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-
includes/comment.php#L243:
{{{
// Parse meta query
$this->meta_query = new WP_Meta_Query();
$this->meta_query->parse_query_vars( $this->query_vars );
do_action_ref_array( 'pre_get_comments', array( &$this ) );
}}}
Comment meta query should be parsed '''after''' the `pre_get_comments`
filter has been applied.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23469>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list