Permalinks: In `get_page_uri()`, don't prepend a parent page slug if it's empty.

Props inderpreet99, SergeyBiryukov.
Fixes #36174.
Built from https://develop.svn.wordpress.org/trunk@38145


git-svn-id: http://core.svn.wordpress.org/trunk@38086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2016-07-23 10:05:49 +00:00
parent 2a4a8c0861
commit db9ec644f5
2 changed files with 2 additions and 2 deletions

View File

@ -4333,7 +4333,7 @@ function get_page_uri( $page = 0 ) {
foreach ( $page->ancestors as $parent ) {
$parent = get_post( $parent );
if ( $parent ) {
if ( $parent && $parent->post_name ) {
$uri = $parent->post_name . '/' . $uri;
}
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-beta4-38144';
$wp_version = '4.6-beta4-38145';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.