Don't do any taxonomy stuff if is_singular. See #15487

git-svn-id: https://develop.svn.wordpress.org/trunk@16515 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu 2010-11-20 21:51:21 +00:00
parent 3484e62eca
commit 6401205f36
1 changed files with 48 additions and 48 deletions

View File

@ -1593,7 +1593,6 @@ class WP_Query {
);
}
if ( !$this->is_singular() ) {
foreach ( $tax_query as $query ) {
if ( 'IN' == $query['operator'] ) {
switch ( $query['taxonomy'] ) {
@ -1608,7 +1607,6 @@ class WP_Query {
}
}
}
}
return $tax_query;
}
@ -1945,6 +1943,7 @@ class WP_Query {
$search = apply_filters_ref_array('posts_search', array( $search, &$this ) );
// Taxonomies
if ( !$this->is_singular ) {
$this->tax_query = $this->parse_tax_query( $q );
if ( !empty( $this->tax_query ) ) {
$clauses = call_user_func_array( 'get_tax_sql', array( $this->tax_query, $wpdb->posts, 'ID', &$this) );
@ -1989,6 +1988,7 @@ class WP_Query {
}
}
}
}
if ( !empty( $this->tax_query ) || !empty( $q['meta_key'] ) ) {
$groupby = "{$wpdb->posts}.ID";