Changeset 26007
- Timestamp:
- 11/04/2013 11:53:55 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/query.php
r25954 r26007 3249 3249 3250 3250 if ( $this->is_category || $this->is_tag || $this->is_tax ) { 3251 $tax_query_in_and = wp_list_filter( $this->tax_query->queries, array( 'operator' => 'NOT IN' ), 'NOT' ); 3252 3253 $query = reset( $tax_query_in_and ); 3254 3255 if ( 'term_id' == $query['field'] ) 3256 $term = get_term( reset( $query['terms'] ), $query['taxonomy'] ); 3257 elseif ( $query['terms'] ) 3258 $term = get_term_by( $query['field'], reset( $query['terms'] ), $query['taxonomy'] ); 3251 if ( $this->is_category ) { 3252 $term = get_term( $this->get( 'cat' ), 'category' ); 3253 } elseif ( $this->is_tag ) { 3254 $term = get_term( $this->get( 'tag_id' ), 'post_tag' ); 3255 } else { 3256 $tax_query_in_and = wp_list_filter( $this->tax_query->queries, array( 'operator' => 'NOT IN' ), 'NOT' ); 3257 $query = reset( $tax_query_in_and ); 3258 3259 if ( 'term_id' == $query['field'] ) 3260 $term = get_term( reset( $query['terms'] ), $query['taxonomy'] ); 3261 else 3262 $term = get_term_by( $query['field'], reset( $query['terms'] ), $query['taxonomy'] ); 3263 } 3259 3264 3260 3265 if ( ! empty( $term ) && ! is_wp_error( $term ) ) { … … 3262 3267 $this->queried_object_id = (int) $term->term_id; 3263 3268 3264 if ( $this->is_category )3269 if ( $this->is_category && 'category' === $this->queried_object->taxonomy ) 3265 3270 _make_cat_compat( $this->queried_object ); 3266 3271 }
Note: See TracChangeset
for help on using the changeset viewer.