WordPress.org

Make WordPress Core

Ticket #9927: 9927.4.patch

File 9927.4.patch, 2.1 KB (added by ramiy, 9 years ago)

category_description() & tag_description()

  • wp-includes/category-template.php

     
    287287/**
    288288 * Retrieve category description.
    289289 *
    290  * @since 1.0.0
     290 * @since 2.9.0
    291291 *
    292292 * @param int $category Optional. Category ID. Will use global category ID by default.
    293293 * @return string Category description, available.
    294294 */
    295 function category_description( $category = 0 ) {
     295function get_category_description( $category = 0 ) {
    296296        return term_description( $category, 'category' );
    297297}
    298298
     
    806806/**
    807807 * Retrieve tag description.
    808808 *
    809  * @since 2.8
     809 * @since 2.9.0
    810810 *
    811811 * @param int $tag Optional. Tag ID. Will use global tag ID by default.
    812812 * @return string Tag description, available.
    813813 */
    814 function tag_description( $tag = 0 ) {
     814function get_tag_description( $tag = 0 ) {
    815815        return term_description( $tag );
    816816}
    817817
  • wp-includes/deprecated.php

     
    16901690        the_author_meta('ID');
    16911691}
    16921692
     1693/**
     1694* Retrieve category description.
     1695*
     1696* @since 1.0.0
     1697* @deprecated 2.9.0
     1698* @deprecated Use get_category_description($category)
     1699*
     1700* @param int $category Optional. Category ID. Will use global category ID by default.
     1701* @return string Category description, available.
     1702*/
     1703function category_description( $category = 0 ) {
     1704        _deprecated_function(__FUNCTION__, '2.9.0', 'get_category_description()' );
     1705        return get_category_description($category);
     1706}
     1707
     1708/**
     1709 * Retrieve tag description.
     1710 *
     1711 * @since 2.8.0
     1712 * @deprecated 2.9.0
     1713 * @deprecated Use get_tag_description($tag)
     1714 *
     1715 * @param int $tag Optional. Tag ID. Will use global tag ID by default.
     1716 * @return string Tag description, available.
     1717 */
     1718function tag_description( $tag = 0 ) {
     1719        _deprecated_function(__FUNCTION__, '2.9.0', 'get_tag_description()' );
     1720        return get_tag_description($tag);
     1721}
     1722
    16931723?>
     1724 No newline at end of file