Changeset 42372
- Timestamp:
- 12/04/2017 10:03:52 PM (7 years ago)
- Location:
- branches/4.9
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/src/wp-includes/category-template.php
r42371 r42372 1154 1154 * 1155 1155 * @since 2.8.0 1156 * @since 4.9.2 The `$taxonomy` parameter was deprecated. 1156 1157 * 1157 1158 * @param int $term Optional. Term ID. Will use global term ID by default. 1158 * @param string $taxonomy Optional taxonomy name. Defaults to 'post_tag'.1159 1159 * @return string Term description, available. 1160 1160 */ 1161 function term_description( $term = 0 , $taxonomy = 'post_tag') {1161 function term_description( $term = 0 ) { 1162 1162 if ( ! $term && ( is_tax() || is_tag() || is_category() ) ) { 1163 1163 $term = get_queried_object(); 1164 1164 if ( $term ) { 1165 $taxonomy = $term->taxonomy;1166 1165 $term = $term->term_id; 1167 1166 } 1168 1167 } 1169 $description = get_term_field( 'description', $term , $taxonomy);1168 $description = get_term_field( 'description', $term ); 1170 1169 return is_wp_error( $description ) ? '' : $description; 1171 1170 }
Note: See TracChangeset
for help on using the changeset viewer.