Make WordPress Core


Ignore:
Timestamp:
11/20/2010 09:43:19 PM (16 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r16512 r16513  
    15471547
    15481548                if ( !empty($q['category__in']) ) {
     1549                        $q['category__in'] = array_unique( $q['category__in'] );
    15491550                        $tax_query[] = array(
    15501551                                'taxonomy' => 'category',
    … …  
    15561557
    15571558                if ( !empty($q['category__not_in']) ) {
     1559                        $q['category__not_in'] = array_unique( $q['category__not_in'] );
    15581560                        $tax_query[] = array(
    15591561                                'taxonomy' => 'category',
Note: See TracChangeset for help on using the changeset viewer.