Changeset 51688
- Timestamp:
- 08/30/2021 04:11:30 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/nav-menus.php
r51539 r51688 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.