Changeset 51690
- Timestamp:
- 08/30/2021 01:38:26 PM (3 years ago)
- Location:
- branches/5.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.8
-
branches/5.8/src/wp-admin/nav-menus.php
r51596 r51690 317 317 318 318 // Merge new and existing menu locations if any new ones are set. 319 $new_menu_locations = array(); 319 320 if ( isset( $_POST['menu-locations'] ) ) { 320 321 $new_menu_locations = array_map( 'absint', $_POST['menu-locations'] ); … … 352 353 $locations[ $location ] = $nav_menu_selected_id; 353 354 break; // There should only be 1. 355 } 356 357 set_theme_mod( 'nav_menu_locations', $locations ); 358 } elseif ( count( $new_menu_locations ) > 0 ) { 359 // If locations have been selected for the new menu, save those. 360 $locations = get_nav_menu_locations(); 361 362 foreach ( array_keys( $new_menu_locations ) as $location ) { 363 $locations[ $location ] = $nav_menu_selected_id; 354 364 } 355 365
Note: See TracChangeset
for help on using the changeset viewer.