Permalinks: Ensure the page hierarchy is correct for sample permalinks.

Fixes #35368.

git-svn-id: https://develop.svn.wordpress.org/trunk@36253 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Pascal Birchler
2016-01-10 18:27:06 +00:00
parent 28818255c2
commit 519051b305
2 changed files with 26 additions and 1 deletions

View File

@@ -4291,7 +4291,9 @@ function _page_traverse_name( $page_id, &$children, &$result ){
* @return string|false Page URI, false on error.
*/
function get_page_uri( $page ) {
$page = get_post( $page );
if ( ! $page instanceof WP_Post ) {
$page = get_post( $page );
}
if ( ! $page )
return false;