Make WordPress Core


Ignore:
Timestamp:
10/02/2013 07:58:50 PM (11 years ago)
Author:
wonderboymusic
Message:

Rather than adding a taxonomy arg to get_category(), convert all uses of get_category() in core to get_term(). By doing so, we negate the need to call _make_cat_compat() in a few places that are only looking for a single property.

Fixes #8722.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/taxonomy.php

    r23563 r25662  
    3535 */
    3636function get_category_to_edit( $id ) {
    37     $category = get_category( $id, OBJECT, 'edit' );
     37    $category = get_term( $id, 'category', OBJECT, 'edit' );
     38    _make_cat_compat( $category );
    3839    return $category;
    3940}
     
    156157
    157158    // First, get all of the original fields
    158     $category = get_category($cat_ID, ARRAY_A);
     159    $category = get_term( $cat_ID, 'category', ARRAY_A );
     160    _make_cat_compat( $category );
    159161
    160162    // Escape data pulled from DB.
Note: See TracChangeset for help on using the changeset viewer.