Pages: `get_page_uri()` should return the URI at which the resource being accessed is available at, this may include non-'publish' status posts.
Reverts [34001] and fixes the original issue in #15963 - avoiding a PHP Notice for when the post doesn't exist. Merges [36094] to the 4.4 branch. Props tharsheblows. See #15963. Fixes #35084. Built from https://develop.svn.wordpress.org/branches/4.4@36105 git-svn-id: http://core.svn.wordpress.org/branches/4.4@36070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b894426307
commit
681646a7e9
|
@ -4290,7 +4290,7 @@ function get_page_uri( $page ) {
|
|||
|
||||
foreach ( $page->ancestors as $parent ) {
|
||||
$parent = get_post( $parent );
|
||||
if ( 'publish' === $parent->post_status ) {
|
||||
if ( $parent ) {
|
||||
$uri = $parent->post_name . '/' . $uri;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4.1-alpha-36104';
|
||||
$wp_version = '4.4.1-alpha-36105';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue