Changes from trunk/src/wp-includes/query.php at r26525 to branches/3.8/src/wp-includes/query.php at r27647
- File:
-
- 1 edited
-
branches/3.8/src/wp-includes/query.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8/src/wp-includes/query.php
r26525 r27647 116 116 function wp_reset_postdata() { 117 117 global $wp_query; 118 $wp_query->reset_postdata(); 118 119 if ( isset( $wp_query ) ) { 120 $wp_query->reset_postdata(); 121 } 119 122 } 120 123 … … 3265 3268 if ( $this->is_category || $this->is_tag || $this->is_tax ) { 3266 3269 if ( $this->is_category ) { 3267 $term = get_term( $this->get( 'cat' ), 'category' ); 3270 if ( $this->get( 'cat' ) ) { 3271 $term = get_term( $this->get( 'cat' ), 'category' ); 3272 } elseif ( $this->get( 'category_name' ) ) { 3273 $term = get_term_by( 'slug', $this->get( 'category_name' ), 'category' ); 3274 } 3268 3275 } elseif ( $this->is_tag ) { 3269 $term = get_term( $this->get( 'tag_id' ), 'post_tag' ); 3276 if ( $this->get( 'tag_id' ) ) { 3277 $term = get_term( $this->get( 'tag_id' ), 'post_tag' ); 3278 } elseif ( $this->get( 'tag' ) ) { 3279 $term = get_term_by( 'slug', $this->get( 'tag' ), 'post_tag' ); 3280 } 3270 3281 } else { 3271 3282 $tax_query_in_and = wp_list_filter( $this->tax_query->queries, array( 'operator' => 'NOT IN' ), 'NOT' ); 3272 3283 $query = reset( $tax_query_in_and ); 3273 3284 3274 if ( 'term_id' == $query['field'] ) 3275 $term = get_term( reset( $query['terms'] ), $query['taxonomy'] ); 3276 else 3277 $term = get_term_by( $query['field'], reset( $query['terms'] ), $query['taxonomy'] ); 3285 if ( $query['terms'] ) { 3286 if ( 'term_id' == $query['field'] ) { 3287 $term = get_term( reset( $query['terms'] ), $query['taxonomy'] ); 3288 } else { 3289 $term = get_term_by( $query['field'], reset( $query['terms'] ), $query['taxonomy'] ); 3290 } 3291 } 3278 3292 } 3279 3293
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)