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:
Sergey Biryukov 2017-12-07 14:50:46 +00:00
parent 823ec0859a
commit 7ec3bfe1ce
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-42377';
$wp_version = '5.0-alpha-42378';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.