Avoid a PHP notice when trying to access the `post_parent` property of hierarchical post type nav menu items.
Merges [35876] to the 4.4 branch. Fixes #34446 Built from https://develop.svn.wordpress.org/branches/4.4@36044 git-svn-id: http://core.svn.wordpress.org/branches/4.4@36009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ce18aadc7b
commit
b7fdda8edb
|
@ -215,7 +215,7 @@ class Walker {
|
||||||
$top_level_elements = array();
|
$top_level_elements = array();
|
||||||
$children_elements = array();
|
$children_elements = array();
|
||||||
foreach ( $elements as $e) {
|
foreach ( $elements as $e) {
|
||||||
if ( 0 == $e->$parent_field )
|
if ( empty( $e->$parent_field ) )
|
||||||
$top_level_elements[] = $e;
|
$top_level_elements[] = $e;
|
||||||
else
|
else
|
||||||
$children_elements[ $e->$parent_field ][] = $e;
|
$children_elements[ $e->$parent_field ][] = $e;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4.1-alpha-36043';
|
$wp_version = '4.4.1-alpha-36044';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
|
|
Loading…
Reference in New Issue