Make WordPress Core


Ignore:
Timestamp:
11/12/2010 08:05:37 PM (14 years ago)
Author:
scribu
Message:

Replace get_the_category() with get_the_categories(). Props filosofo. Fixes #15407

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/deprecated.php

    r15590 r16332  
    7373 * @since 0.71
    7474 * @deprecated 0.71
    75  * @deprecated use get_the_category()
    76  * @see get_the_category()
     75 * @deprecated use get_the_categories()
     76 * @see get_the_categories()
    7777 *
    7878 * @param bool $echo
     
    8080 */
    8181function the_category_ID($echo = true) {
    82     _deprecated_function( __FUNCTION__, '0.71', 'get_the_category()' );
     82    _deprecated_function( __FUNCTION__, '0.71', 'get_the_categories()' );
    8383
    8484    // Grab the first cat in the list.
    85     $categories = get_the_category();
     85    $categories = get_the_categories();
    8686    $cat = $categories[0]->term_id;
    8787
     
    109109
    110110    // Grab the first cat in the list.
    111     $categories = get_the_category();
     111    $categories = get_the_categories();
    112112    $currentcat = $categories[0]->category_id;
    113113    if ( $currentcat != $previouscat ) {
     
    25572557    return false;
    25582558}
     2559
     2560/**
     2561 * Retrieve post categories.
     2562 *
     2563 * @since 0.71
     2564 * @uses $post
     2565 * @deprecated 3.1
     2566 * @deprecated Use get_post_categories() instead.
     2567 *
     2568 * @param int $id Optional, default to current post ID. The post ID.
     2569 * @return array
     2570 */
     2571function get_the_category( $id = false ) {
     2572    _deprecated_function( __FUNCTION__, '3.1', 'get_the_categories()' );
     2573    return get_the_categories( $id );
     2574}
Note: See TracChangeset for help on using the changeset viewer.