Make WordPress Core


Ignore:
Timestamp:
11/16/2010 04:22:09 PM (14 years ago)
Author:
scribu
Message:

Don't pollute the 'tax_query' query var. See #12891

File:
1 edited

Legend:

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

    r16385 r16402  
    19321932
    19331933        // Taxonomies
    1934         $q['tax_query'] = $this->parse_tax_query( $q );
    1935         if ( !empty( $q['tax_query'] ) ) {
     1934        $tax_query = $this->parse_tax_query( $q );
     1935
     1936        if ( !empty( $tax_query ) ) {
    19361937            if ( empty($post_type) ) {
    19371938                $post_type = 'any';
     
    19411942            }
    19421943
    1943             $where .= get_tax_sql( $q['tax_query'], "$wpdb->posts.ID" );
     1944            $where .= get_tax_sql( $tax_query, "$wpdb->posts.ID" );
    19441945
    19451946            // Back-compat
    1946             $tax_query_in = wp_list_filter( $q['tax_query'], array( 'operator' => 'IN' ) );
     1947            $tax_query_in = wp_list_filter( $tax_query, array( 'operator' => 'IN' ) );
    19471948            if ( !empty( $tax_query_in ) ) {
    19481949                if ( !isset( $q['taxonomy'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.