includes/wp-api-menus-v1.php 1 location
|
@@ 186-192 (lines=7) @@
|
| 183 |
|
foreach ( (array) $menu_items as $menu_item ) { |
| 184 |
|
$sorted_menu_items[ $menu_item->menu_order ] = $menu_item; |
| 185 |
|
} |
| 186 |
|
foreach ( $sorted_menu_items as $menu_item ) { |
| 187 |
|
if ( (int) $menu_item->menu_item_parent !== 0 ) { |
| 188 |
|
$menu_items_with_children[ $menu_item->menu_item_parent ] = true; |
| 189 |
|
} else { |
| 190 |
|
$top_level_menu_items[] = $menu_item; |
| 191 |
|
} |
| 192 |
|
} |
| 193 |
|
|
| 194 |
|
$menu = array(); |
| 195 |
|
while ( $sorted_menu_items ) : |
includes/wp-api-menus-v2.php 1 location
|
@@ 279-285 (lines=7) @@
|
| 276 |
|
foreach ( (array) $menu_items as $menu_item ) { |
| 277 |
|
$sorted_menu_items[ $menu_item->menu_order ] = $menu_item; |
| 278 |
|
} |
| 279 |
|
foreach ( $sorted_menu_items as $menu_item ) { |
| 280 |
|
if ( (int) $menu_item->menu_item_parent !== 0 ) { |
| 281 |
|
$menu_items_with_children[ $menu_item->menu_item_parent ] = true; |
| 282 |
|
} else { |
| 283 |
|
$top_level_menu_items[] = $menu_item; |
| 284 |
|
} |
| 285 |
|
} |
| 286 |
|
|
| 287 |
|
$menu = array(); |
| 288 |
|
|