Ticket #9927: 9927.5.patch
File 9927.5.patch, 3.2 KB (added by , 15 years ago) |
---|
-
wp-includes/category-template.php
286 286 /** 287 287 * Retrieve category description. 288 288 * 289 * @since 1.0.0289 * @since 3.0.0 290 290 * 291 291 * @param int $category Optional. Category ID. Will use global category ID by default. 292 292 * @return string Category description, available. 293 293 */ 294 function category_description( $category = 0 ) {295 return term_description( $category, 'category' );294 function get_category_description( $category = 0 ) { 295 return get_term_description( $category, 'category' ); 296 296 } 297 297 298 298 /** … … 834 834 /** 835 835 * Retrieve tag description. 836 836 * 837 * @since 2.8837 * @since 3.0.0 838 838 * 839 839 * @param int $tag Optional. Tag ID. Will use global tag ID by default. 840 840 * @return string Tag description, available. 841 841 */ 842 function tag_description( $tag = 0 ) {843 return term_description( $tag);842 function get_tag_description( $tag = 0 ) { 843 return get_term_description( $tag, 'post_tag' ); 844 844 } 845 845 846 846 /** 847 847 * Retrieve term description. 848 848 * 849 * @since 2.8849 * @since 3.0.0 850 850 * 851 851 * @param int $term Optional. Term ID. Will use global term ID by default. 852 852 * @return string Term description, available. 853 853 */ 854 function term_description( $term = 0, $taxonomy = 'post_tag' ) {854 function get_term_description( $term = 0, $taxonomy = 'post_tag' ) { 855 855 if ( !$term && ( is_tax() || is_tag() || is_category() ) ) { 856 856 global $wp_query; 857 857 $term = $wp_query->get_queried_object(); -
wp-includes/deprecated.php
2446 2446 $user = $user->ID; 2447 2447 } 2448 2448 return get_the_author_meta( $field, $user ); 2449 } 2450 No newline at end of file 2449 } 2450 2451 /** 2452 * Retrieve category description. 2453 * 2454 * @since 1.0.0 2455 * @deprecated 3.0.0 2456 * @deprecated Use get_category_description($category) 2457 * 2458 * @param int $category Optional. Category ID. Will use global category ID by default. 2459 * @return string Category description, available. 2460 */ 2461 function category_description( $category = 0 ) { 2462 _deprecated_function(__FUNCTION__, '3.0.0', 'get_category_description()' ); 2463 return get_category_description($category); 2464 } 2465 2466 /** 2467 * Retrieve tag description. 2468 * 2469 * @since 2.8.0 2470 * @deprecated 3.0.0 2471 * @deprecated Use get_tag_description($tag) 2472 * 2473 * @param int $tag Optional. Tag ID. Will use global tag ID by default. 2474 * @return string Tag description, available. 2475 */ 2476 function tag_description( $tag = 0 ) { 2477 _deprecated_function(__FUNCTION__, '3.0.0', 'get_tag_description()' ); 2478 return get_tag_description($tag); 2479 } 2480 2481 /** 2482 * Retrieve term description. 2483 * 2484 * @since 2.8.0 2485 * @deprecated 3.0.0 2486 * @deprecated Use get_term_description($term, $taxonomy) 2487 * 2488 * @param int $term Optional. Term ID. Will use global term ID by default. 2489 * @return string Term description, available. 2490 */ 2491 function term_description( $term = 0, $taxonomy = 'post_tag' ) { 2492 _deprecated_function(__FUNCTION__, '3.0.0', 'get_term_description()' ); 2493 return get_term_description($term, $taxonomy); 2494 }