Walker fix for when non elements are top-level. Props hailin. fixes #8150
git-svn-id: http://svn.automattic.com/wordpress/trunk@9685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9fad7df3b2
commit
01746cf6b3
|
@ -911,7 +911,8 @@ class Walker {
|
||||||
*/
|
*/
|
||||||
if ( empty($top_level_elements) ) {
|
if ( empty($top_level_elements) ) {
|
||||||
|
|
||||||
$root = $elements[0];
|
$first = array_slice( $elements, 0, 1 );
|
||||||
|
$root = $first[0];
|
||||||
|
|
||||||
$top_level_elements = array();
|
$top_level_elements = array();
|
||||||
$children_elements = array();
|
$children_elements = array();
|
||||||
|
|
Loading…
Reference in New Issue