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-includes/link-template.php

    r25570 r25662  
    132132            // having to assign it explicitly
    133133            if ( empty($category) ) {
    134                 $default_category = get_category( get_option( 'default_category' ) );
     134                $default_category = get_term( get_option( 'default_category' ), 'category' );
    135135                $category = is_wp_error( $default_category ) ? '' : $default_category->slug;
    136136            }
Note: See TracChangeset for help on using the changeset viewer.