From db9ec644f57c38fb9041850905280f4ddd809f32 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 23 Jul 2016 10:05:49 +0000 Subject: [PATCH] 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 --- wp-includes/post.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index b055e4bbc4..f5cfd0c32f 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -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; } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 1c0cbea924..c54d491816 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.