Ticket #26728: 26728.diff
File 26728.diff, 1.0 KB (added by , 11 years ago) |
---|
-
src/wp-includes/query.php
3271 3271 } 3272 3272 } elseif ( $this->is_tag ) { 3273 3273 $term = get_term( $this->get( 'tag_id' ), 'post_tag' ); 3274 } else if ( $query['terms'] ){3274 } else { 3275 3275 $tax_query_in_and = wp_list_filter( $this->tax_query->queries, array( 'operator' => 'NOT IN' ), 'NOT' ); 3276 3276 $query = reset( $tax_query_in_and ); 3277 3277 3278 if ( 'term_id' == $query['field'] ) 3279 $term = get_term( reset( $query['terms'] ), $query['taxonomy'] ); 3280 else 3281 $term = get_term_by( $query['field'], reset( $query['terms'] ), $query['taxonomy'] ); 3278 if ( $query['terms'] ) { 3279 if ( 'term_id' == $query['field'] ) 3280 $term = get_term( reset( $query['terms'] ), $query['taxonomy'] ); 3281 else 3282 $term = get_term_by( $query['field'], reset( $query['terms'] ), $query['taxonomy'] ); 3283 } 3282 3284 } 3283 3285 3284 3286 if ( ! empty( $term ) && ! is_wp_error( $term ) ) {