Don't double process the tag query var. Props scribu. fixes #16730 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@17500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-03-03 16:11:02 +00:00
parent 0d6c2100fa
commit 9e37c6dc0a

View File

@ -1654,6 +1654,9 @@ class WP_Query {
}
foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) {
if ( 'post_tag' == $taxonomy )
continue; // Handled further down in the $q['tag'] block
if ( $t->query_var && !empty( $q[$t->query_var] ) ) {
$tax_query_defaults = array(
'taxonomy' => $taxonomy,
@ -1790,7 +1793,7 @@ class WP_Query {
}
if ( !empty($q['tag_slug__in']) ) {
$q['tag_slug__in'] = array_map('sanitize_title', (array) $q['tag_slug__in']);
$q['tag_slug__in'] = array_map('sanitize_title', array_unique( (array) $q['tag_slug__in'] ) );
$tax_query[] = array(
'taxonomy' => 'post_tag',
'terms' => $q['tag_slug__in'],
@ -1799,7 +1802,7 @@ class WP_Query {
}
if ( !empty($q['tag_slug__and']) ) {
$q['tag_slug__and'] = array_map('sanitize_title', (array) $q['tag_slug__and']);
$q['tag_slug__and'] = array_map('sanitize_title', array_unique( (array) $q['tag_slug__and'] ) );
$tax_query[] = array(
'taxonomy' => 'post_tag',
'terms' => $q['tag_slug__and'],