From cd02eb7f3f2d8a0bbdc90429a98ab2651963b229 Mon Sep 17 00:00:00 2001 From: scribu Date: Sat, 11 Dec 2010 15:20:52 +0000 Subject: [PATCH] Don't set query flags in parse_tax_query(). See #15487 git-svn-id: http://svn.automattic.com/wordpress/trunk@16880 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 9d41bb2c3..9c1c35d73 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -1355,7 +1355,24 @@ class WP_Query { $this->is_date = true; } - $this->parse_tax_query( $qv ); + $tax_query_obj = $this->parse_tax_query( $qv ); + + foreach ( $tax_query_obj->queries as $tax_query ) { + if ( 'IN' == $tax_query['operator'] ) { + switch ( $tax_query['taxonomy'] ) { + case 'category': + $this->is_category = true; + break; + case 'post_tag': + $this->is_tag = true; + break; + default: + $this->is_tax = true; + } + } + } + + unset( $tax_query_obj, $tax_query ); _parse_meta_query( $qv ); @@ -1471,7 +1488,7 @@ class WP_Query { } /* - * Parses various taxonomy related query vars and sets the appropriate query flags. + * Parses various taxonomy related query vars. * * @access protected * @since 3.1.0 @@ -1584,24 +1601,7 @@ class WP_Query { ); } - $tax_query_obj = new WP_Tax_Query( $tax_query ); - - foreach ( $tax_query_obj->queries as $query ) { - if ( 'IN' == $query['operator'] ) { - switch ( $query['taxonomy'] ) { - case 'category': - $this->is_category = true; - break; - case 'post_tag': - $this->is_tag = true; - break; - default: - $this->is_tax = true; - } - } - } - - return $tax_query_obj; + return new WP_Tax_Query( $tax_query ); } /**