mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@25662 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -131,7 +131,7 @@ function get_permalink( $id = 0, $leavename = false ) {
|
||||
// show default category in permalinks, without
|
||||
// having to assign it explicitly
|
||||
if ( empty($category) ) {
|
||||
$default_category = get_category( get_option( 'default_category' ) );
|
||||
$default_category = get_term( get_option( 'default_category' ), 'category' );
|
||||
$category = is_wp_error( $default_category ) ? '' : $default_category->slug;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user