array_unique() category__in and category__not_in to eliminate dupes from multiple runs of parse_tax_query(). Fixes canonical redirects for cat, category__in, and category__not_in requests. see #12891 #15487

git-svn-id: https://develop.svn.wordpress.org/trunk@16513 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-11-20 21:43:19 +00:00
parent a825250771
commit f3e3c03abe
2 changed files with 3 additions and 0 deletions

View File

@@ -1546,6 +1546,7 @@ class WP_Query {
}
if ( !empty($q['category__in']) ) {
$q['category__in'] = array_unique( $q['category__in'] );
$tax_query[] = array(
'taxonomy' => 'category',
'terms' => $q['category__in'],
@@ -1555,6 +1556,7 @@ class WP_Query {
}
if ( !empty($q['category__not_in']) ) {
$q['category__not_in'] = array_unique( $q['category__not_in'] );
$tax_query[] = array(
'taxonomy' => 'category',
'terms' => $q['category__not_in'],