Changeset 25310 for trunk/src/wp-includes/category-template.php
- Timestamp:
- 09/10/2013 02:27:24 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/category-template.php
r25119 r25310 466 466 if ( empty( $r['current_category'] ) && ( is_category() || is_tax() || is_tag() ) ) { 467 467 $current_term_object = get_queried_object(); 468 if ( $ r['taxonomy']== $current_term_object->taxonomy )468 if ( $current_term_object && $r['taxonomy'] === $current_term_object->taxonomy ) 469 469 $r['current_category'] = get_queried_object_id(); 470 470 } … … 1038 1038 */ 1039 1039 function term_description( $term = 0, $taxonomy = 'post_tag' ) { 1040 if ( ! $term && ( is_tax() || is_tag() || is_category() ) ) {1040 if ( ! $term && ( is_tax() || is_tag() || is_category() ) ) { 1041 1041 $term = get_queried_object(); 1042 $taxonomy = $term->taxonomy; 1043 $term = $term->term_id; 1042 if ( $term ) { 1043 $taxonomy = $term->taxonomy; 1044 $term = $term->term_id; 1045 } 1044 1046 } 1045 1047 $description = get_term_field( 'description', $term, $taxonomy );
Note: See TracChangeset
for help on using the changeset viewer.