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:
parent
2a4a8c0861
commit
db9ec644f5
|
@ -4333,7 +4333,7 @@ function get_page_uri( $page = 0 ) {
|
||||||
|
|
||||||
foreach ( $page->ancestors as $parent ) {
|
foreach ( $page->ancestors as $parent ) {
|
||||||
$parent = get_post( $parent );
|
$parent = get_post( $parent );
|
||||||
if ( $parent ) {
|
if ( $parent && $parent->post_name ) {
|
||||||
$uri = $parent->post_name . '/' . $uri;
|
$uri = $parent->post_name . '/' . $uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue