From 6be07725fb4d32f48906b0fd03b212ef7101eaa8 Mon Sep 17 00:00:00 2001 From: Eric Lewis Date: Fri, 11 Dec 2015 03:50:26 +0000 Subject: [PATCH] Add inline documentation for `get_page_by_path()`. Fixes #34964. Built from https://develop.svn.wordpress.org/trunk@35861 git-svn-id: http://core.svn.wordpress.org/trunk@35825 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 5 +++++ wp-includes/version.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 10ee07b20a..c12c616991 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -4122,6 +4122,11 @@ function get_page_by_path( $page_path, $output = OBJECT, $post_type = 'page' ) { if ( $page->post_name == $revparts[0] ) { $count = 0; $p = $page; + + /* + * Loop through the given path parts from right to left, + * ensuring each matches the post ancestry. + */ while ( $p->post_parent != 0 && isset( $pages[ $p->post_parent ] ) ) { $count++; $parent = $pages[ $p->post_parent ]; diff --git a/wp-includes/version.php b/wp-includes/version.php index 403604b374..188e1ab57c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-35860'; +$wp_version = '4.5-alpha-35861'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.