From 73317a33b6cffeb8f3b74ba837d6eed8b3baeb95 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sun, 10 Jan 2016 18:28:28 +0000 Subject: [PATCH] Permalinks: Ensure the page hierarchy is correct for sample permalinks. Fixes #35368. Built from https://develop.svn.wordpress.org/trunk@36253 git-svn-id: http://core.svn.wordpress.org/trunk@36220 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 4 +++- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index cc8e843878..72ef1641aa 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -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; diff --git a/wp-includes/version.php b/wp-includes/version.php index 52ac58d4fc..db76968b74 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-36252'; +$wp_version = '4.5-alpha-36253'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.