WordPress.org

Make WordPress Core

Ticket #9927: 9927.6.patch

File 9927.6.patch, 3.2 KB (added by DrewAPicture, 5 years ago)

refresh + docs fixes

  • src/wp-includes/category-template.php

     
    251251/**
    252252 * Retrieve category description.
    253253 *
    254  * @since 1.0.0
     254 * @since 3.0.0
    255255 *
    256256 * @param int $category Optional. Category ID. Will use global category ID by default.
    257257 * @return string Category description, available.
    258258 */
    259 function category_description( $category = 0 ) {
    260         return term_description( $category, 'category' );
     259function get_category_description( $category = 0 ) {
     260        return get_term_description( $category, 'category' );
    261261}
    262262
    263263/**
     
    10181018/**
    10191019 * Retrieve tag description.
    10201020 *
    1021  * @since 2.8
     1021 * @since 3.0.0
    10221022 *
    10231023 * @param int $tag Optional. Tag ID. Will use global tag ID by default.
    10241024 * @return string Tag description, available.
    10251025 */
    1026 function tag_description( $tag = 0 ) {
    1027         return term_description( $tag );
     1026function get_tag_description( $tag = 0 ) {
     1027        return get_term_description( $tag );
    10281028}
    10291029
    10301030/**
    10311031 * Retrieve term description.
    10321032 *
    1033  * @since 2.8
     1033 * @since 3.0.0
    10341034 *
    10351035 * @param int $term Optional. Term ID. Will use global term ID by default.
    10361036 * @param string $taxonomy Optional taxonomy name. Defaults to 'post_tag'.
    10371037 * @return string Term description, available.
    10381038 */
    1039 function term_description( $term = 0, $taxonomy = 'post_tag' ) {
     1039function get_term_description( $term = 0, $taxonomy = 'post_tag' ) {
    10401040        if ( ! $term && ( is_tax() || is_tag() || is_category() ) ) {
    10411041                $term = get_queried_object();
    10421042                if ( $term ) {
  • src/wp-includes/deprecated.php

     
    33783378
    33793379        return $size . $unit;
    33803380}
     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 */
     3392function 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 */
     3407function 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 */
     3422function 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}