WordPress.org

Make WordPress Core

Changeset 17505


Ignore:
Timestamp:
03/08/11 22:02:12 (3 years ago)
Author:
ryan
Message:

Don't perform taxonomy queries for single post requests. Props scribu. fixes #16703 for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/wp-includes/query.php

    r17501 r17505  
    21512151 
    21522152        // Taxonomies 
    2153         $this->parse_tax_query( $q ); 
    2154  
    2155         $clauses = $this->tax_query->get_sql( $wpdb->posts, 'ID' ); 
    2156  
    2157         $join .= $clauses['join']; 
    2158         $where .= $clauses['where']; 
     2153        if ( !$this->is_singular ) { 
     2154            $this->parse_tax_query( $q ); 
     2155 
     2156            $clauses = $this->tax_query->get_sql( $wpdb->posts, 'ID' ); 
     2157 
     2158            $join .= $clauses['join']; 
     2159            $where .= $clauses['where']; 
     2160        } 
    21592161 
    21602162        if ( $this->is_tax ) { 
Note: See TracChangeset for help on using the changeset viewer.