Changeset 17527
- Timestamp:
- 03/22/2011 08:07:50 PM (15 years ago)
- Location:
- branches/3.1/wp-includes
- Files:
-
- 2 edited
-
query.php (modified) (2 diffs)
-
taxonomy.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1/wp-includes/query.php
r17507 r17527 2191 2191 $cat_query = reset( $cat_query ); 2192 2192 $the_cat = get_term_by( $cat_query['field'], $cat_query['terms'][0], 'category' ); 2193 if ( $the_cat && ! is_wp_error( $the_cat )) {2193 if ( $the_cat ) { 2194 2194 $this->set( 'cat', $the_cat->term_id ); 2195 2195 $this->set( 'category_name', $the_cat->slug ); … … 2203 2203 $tag_query = reset( $tag_query ); 2204 2204 $the_tag = get_term_by( $tag_query['field'], $tag_query['terms'][0], 'post_tag' ); 2205 if ( $the_tag && ! is_wp_error( $the_tag )) {2205 if ( $the_tag ) { 2206 2206 $this->set( 'tag_id', $the_tag->term_id ); 2207 2207 } -
branches/3.1/wp-includes/taxonomy.php
r17513 r17527 890 890 $field = 't.name'; 891 891 } else { 892 return get_term( (int) $value, $taxonomy, $output, $filter); 892 $term = get_term( (int) $value, $taxonomy, $output, $filter); 893 if ( is_wp_error( $term ) ) 894 $term = false; 895 return $term; 893 896 } 894 897
Note: See TracChangeset
for help on using the changeset viewer.