Permalinks: Remove unnecesary temporary variable in get_permalink().
Props JPry, danimalbrown. Fixes #41981. Built from https://develop.svn.wordpress.org/trunk@42378 git-svn-id: http://core.svn.wordpress.org/trunk@42207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -191,8 +191,8 @@ function get_permalink( $post = 0, $leavename = false ) {
|
||||
|
||||
$category_object = get_term( $category_object, 'category' );
|
||||
$category = $category_object->slug;
|
||||
if ( $parent = $category_object->parent ) {
|
||||
$category = get_category_parents( $parent, false, '/', true ) . $category;
|
||||
if ( $category_object->parent ) {
|
||||
$category = get_category_parents( $category_object->parent, false, '/', true ) . $category;
|
||||
}
|
||||
}
|
||||
// show default category in permalinks, without
|
||||
|
||||
Reference in New Issue
Block a user