Make WordPress Core

Changeset 16513


Ignore:
Timestamp:
11/20/2010 09:43:19 PM (14 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

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-blog-header.php

    r7991 r16513  
    1313
    1414    wp();
     15//echo '<pre>';  print_r($wp_query); echo '</pre>'; exit;
    1516
    1617    require_once( ABSPATH . WPINC . '/template-loader.php' );
  • 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.