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
This commit is contained in:
Eric Lewis 2015-12-11 03:50:26 +00:00
parent b07bb412ee
commit 6be07725fb
2 changed files with 6 additions and 1 deletions

View File

@ -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 ];

View File

@ -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.