Ticket #9927: 9927.6.patch
File 9927.6.patch, 3.2 KB (added by , 12 years ago) |
---|
-
src/wp-includes/category-template.php
251 251 /** 252 252 * Retrieve category description. 253 253 * 254 * @since 1.0.0254 * @since 3.0.0 255 255 * 256 256 * @param int $category Optional. Category ID. Will use global category ID by default. 257 257 * @return string Category description, available. 258 258 */ 259 function category_description( $category = 0 ) {260 return term_description( $category, 'category' );259 function get_category_description( $category = 0 ) { 260 return get_term_description( $category, 'category' ); 261 261 } 262 262 263 263 /** … … 1018 1018 /** 1019 1019 * Retrieve tag description. 1020 1020 * 1021 * @since 2.81021 * @since 3.0.0 1022 1022 * 1023 1023 * @param int $tag Optional. Tag ID. Will use global tag ID by default. 1024 1024 * @return string Tag description, available. 1025 1025 */ 1026 function tag_description( $tag = 0 ) {1027 return term_description( $tag );1026 function get_tag_description( $tag = 0 ) { 1027 return get_term_description( $tag ); 1028 1028 } 1029 1029 1030 1030 /** 1031 1031 * Retrieve term description. 1032 1032 * 1033 * @since 2.81033 * @since 3.0.0 1034 1034 * 1035 1035 * @param int $term Optional. Term ID. Will use global term ID by default. 1036 1036 * @param string $taxonomy Optional taxonomy name. Defaults to 'post_tag'. 1037 1037 * @return string Term description, available. 1038 1038 */ 1039 function term_description( $term = 0, $taxonomy = 'post_tag' ) {1039 function get_term_description( $term = 0, $taxonomy = 'post_tag' ) { 1040 1040 if ( ! $term && ( is_tax() || is_tag() || is_category() ) ) { 1041 1041 $term = get_queried_object(); 1042 1042 if ( $term ) { -
src/wp-includes/deprecated.php
3378 3378 3379 3379 return $size . $unit; 3380 3380 } 3381 3382 /** 3383 * Retrieve category description. 3384 * 3385 * @since 1.0.0 3386 * @deprecated 3.7.0 Use get_category_description() instead. 3387 * @see get_category_description() 3388 * 3389 * @param int $category Optional. Category ID. Will use global category ID by default. 3390 * @return string Category description, available. 3391 */ 3392 function category_description( $category = 0 ) { 3393 _deprecated_function(__FUNCTION__, '3.0.0', 'get_category_description()' ); 3394 return get_category_description($category); 3395 } 3396 3397 /** 3398 * Retrieve tag description. 3399 * 3400 * @since 2.8.0 3401 * @deprecated 3.7.0 Use get_tag_description() instead. 3402 * @see get_tag_description() 3403 * 3404 * @param int $tag Optional. Tag ID. Will use global tag ID by default. 3405 * @return string Tag description, available. 3406 */ 3407 function tag_description( $tag = 0 ) { 3408 _deprecated_function(__FUNCTION__, '3.0.0', 'get_tag_description()' ); 3409 return get_tag_description($tag); 3410 } 3411 3412 /** 3413 * Retrieve term description. 3414 * 3415 * @since 2.8.0 3416 * @deprecated 3.7.0 Use get_term_description() instead. 3417 * @see get_term_description() 3418 * 3419 * @param int $term Optional. Term ID. Will use global term ID by default. 3420 * @return string Term description, available. 3421 */ 3422 function term_description( $term = 0, $taxonomy = 'post_tag' ) { 3423 _deprecated_function(__FUNCTION__, '3.0.0', 'get_term_description()' ); 3424 return get_term_description($term, $taxonomy); 3425 }