208 | | // Calculate the depth of each menu item with children |
209 | | foreach ( $menu_items_with_children as $menu_item_key => &$menu_item_depth ) { |
210 | | $menu_item_parent = $menu_items_tree[ $menu_item_key ]; |
211 | | while ( $menu_item_parent ) { |
212 | | $menu_item_depth = $menu_item_depth + 1; |
213 | | $menu_item_parent = $menu_items_tree[ $menu_item_parent ]; |
214 | | } |
| 209 | // Calculate the depth of each menu item with children |
| 210 | foreach ( $menu_items_with_children as $menu_item_key => &$menu_item_depth ) { |
| 211 | $menu_item_parent = $menu_items_tree[ $menu_item_key ]; |
| 212 | while ( $menu_item_parent ) { |
| 213 | $menu_item_depth = $menu_item_depth + 1; |
| 214 | $menu_item_parent = $menu_items_tree[ $menu_item_parent ]; |