Don't double process the tag query var. Props scribu. fixes #16730 for 3.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.1@17501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
011b0bd2b0
commit
b24da574e1
|
@ -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'],
|
||||
|
|
Loading…
Reference in New Issue