Make WordPress Core


Ignore:
Timestamp:
11/12/2010 09:53:15 PM (14 years ago)
Author:
westi
Message:

Revert most of [16332] - renaming and deprecating a commonly used function is silly. Improving it is good. Fixes #15407.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/category-template.php

    r16332 r16334  
    5858 * Retrieve post categories.
    5959 *
    60  * @since 3.1
     60 * @since 0.71
     61 * @uses $post
    6162 *
    6263 * @param int $id Optional, default to current post ID. The post ID.
    6364 * @return array
    6465 */
    65 function get_the_categories( $id = false ) {
     66function get_the_category( $id = false ) {
    6667    $categories = get_the_terms( $id, 'category' );
    6768
     
    6970        _make_cat_compat( $categories[$key] );
    7071    }
    71 
     72    // Filter name is plural because we are return alot of categories not just one
    7273    return apply_filters( 'get_the_categories', $categories );
    7374}
     
    140141function get_the_category_list( $separator = '', $parents='', $post_id = false ) {
    141142    global $wp_rewrite;
    142     $categories = get_the_categories( $post_id );
     143    $categories = get_the_category( $post_id );
    143144    if ( !is_object_in_taxonomy( get_post_type( $post_id ), 'category' ) )
    144145        return apply_filters( 'the_category', '', $separator, $parents );
Note: See TracChangeset for help on using the changeset viewer.