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
This commit is contained in:
Pascal Birchler 2016-01-10 18:28:28 +00:00
parent 909470db67
commit 73317a33b6
2 changed files with 4 additions and 2 deletions

View File

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

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.