Changeset 54809 for branches/6.1/src/wp-includes/nav-menu-template.php
- Timestamp:
- 11/11/2022 02:40:54 AM (2 years ago)
- Location:
- branches/6.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.1
-
branches/6.1/src/wp-includes/nav-menu-template.php
r54478 r54809 205 205 $menu_items_with_children[ $menu_item->menu_item_parent ] = 1; 206 206 } 207 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 }207 } 208 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 ]; 215 215 } 216 216 }
Note: See TracChangeset
for help on using the changeset viewer.