Make WordPress Core

Changeset 17500


Ignore:
Timestamp:
03/03/2011 04:11:02 PM (15 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

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

    r17489 r17500  
    16551655
    16561656                foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) {
     1657                        if ( 'post_tag' == $taxonomy )
     1658                                continue;       // Handled further down in the $q['tag'] block
     1659
    16571660                        if ( $t->query_var && !empty( $q[$t->query_var] ) ) {
    16581661                                $tax_query_defaults = array(
     
    17911794
    17921795                if ( !empty($q['tag_slug__in']) ) {
    1793                         $q['tag_slug__in'] = array_map('sanitize_title', (array) $q['tag_slug__in']);
     1796                        $q['tag_slug__in'] = array_map('sanitize_title', array_unique( (array) $q['tag_slug__in'] ) );
    17941797                        $tax_query[] = array(
    17951798                                'taxonomy' => 'post_tag',
     
    18001803
    18011804                if ( !empty($q['tag_slug__and']) ) {
    1802                         $q['tag_slug__and'] = array_map('sanitize_title', (array) $q['tag_slug__and']);
     1805                        $q['tag_slug__and'] = array_map('sanitize_title', array_unique( (array) $q['tag_slug__and'] ) );
    18031806                        $tax_query[] = array(
    18041807                                'taxonomy' => 'post_tag',
Note: See TracChangeset for help on using the changeset viewer.