Changeset 24456
- Timestamp:
- 06/20/2013 05:21:13 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r24301 r24456 2266 2266 2267 2267 $cat_query = wp_list_filter( $tax_query_in_and, array( 'taxonomy' => 'category' ) ); 2268 if ( ! empty( $cat_query ) ) {2268 if ( ! empty( $cat_query ) ) { 2269 2269 $cat_query = reset( $cat_query ); 2270 $the_cat = get_term_by( $cat_query['field'], $cat_query['terms'][0], 'category' ); 2271 if ( $the_cat ) { 2272 $this->set( 'cat', $the_cat->term_id ); 2273 $this->set( 'category_name', $the_cat->slug ); 2270 2271 if ( ! empty( $cat_query['terms'][0] ) ) { 2272 $the_cat = get_term_by( $cat_query['field'], $cat_query['terms'][0], 'category' ); 2273 if ( $the_cat ) { 2274 $this->set( 'cat', $the_cat->term_id ); 2275 $this->set( 'category_name', $the_cat->slug ); 2276 } 2277 unset( $the_cat ); 2274 2278 } 2275 unset( $the_cat );2276 2279 } 2277 2280 unset( $cat_query ); 2278 2281 2279 2282 $tag_query = wp_list_filter( $tax_query_in_and, array( 'taxonomy' => 'post_tag' ) ); 2280 if ( ! empty( $tag_query ) ) {2283 if ( ! empty( $tag_query ) ) { 2281 2284 $tag_query = reset( $tag_query ); 2282 $the_tag = get_term_by( $tag_query['field'], $tag_query['terms'][0], 'post_tag' ); 2283 if ( $the_tag ) { 2284 $this->set( 'tag_id', $the_tag->term_id ); 2285 2286 if ( ! empty( $tag_query['terms'][0] ) ) { 2287 $the_tag = get_term_by( $tag_query['field'], $tag_query['terms'][0], 'post_tag' ); 2288 if ( $the_tag ) 2289 $this->set( 'tag_id', $the_tag->term_id ); 2290 unset( $the_tag ); 2285 2291 } 2286 unset( $the_tag );2287 2292 } 2288 2293 unset( $tag_query );
Note: See TracChangeset
for help on using the changeset viewer.