Avoid a PHP notice when trying to access the `post_parent` property of hierarchical post type nav menu items.

FIxes #34446

Built from https://develop.svn.wordpress.org/trunk@35876


git-svn-id: http://core.svn.wordpress.org/trunk@35840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2015-12-12 01:06:29 +00:00
parent 24afea92c2
commit 36679a6e89
2 changed files with 2 additions and 2 deletions

View File

@ -215,7 +215,7 @@ class Walker {
$top_level_elements = array();
$children_elements = array();
foreach ( $elements as $e) {
if ( 0 == $e->$parent_field )
if ( empty( $e->$parent_field ) )
$top_level_elements[] = $e;
else
$children_elements[ $e->$parent_field ][] = $e;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-alpha-35875';
$wp_version = '4.5-alpha-35876';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.