mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 20:24:26 +00:00
Permalinks: In get_page_uri(), don't prepend a parent page slug if it's empty.
Props inderpreet99, SergeyBiryukov. Fixes #36174. git-svn-id: https://develop.svn.wordpress.org/trunk@38145 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user