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

git-svn-id: http://svn.automattic.com/wordpress/trunk@17504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-03-08 22:01:19 +00:00
parent 30462d25ca
commit 73799784cc

View File

@ -2150,12 +2150,14 @@ class WP_Query {
$search = apply_filters_ref_array('posts_search', array( $search, &$this ) );
// Taxonomies
$this->parse_tax_query( $q );
if ( !$this->is_singular ) {
$this->parse_tax_query( $q );
$clauses = $this->tax_query->get_sql( $wpdb->posts, 'ID' );
$clauses = $this->tax_query->get_sql( $wpdb->posts, 'ID' );
$join .= $clauses['join'];
$where .= $clauses['where'];
$join .= $clauses['join'];
$where .= $clauses['where'];
}
if ( $this->is_tax ) {
if ( empty($post_type) ) {