Changeset 50938
- Timestamp:
- 05/20/2021 04:51:16 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/nav-menus.php
r50931 r50938 339 339 wp_save_nav_menu_items( $nav_menu_selected_id, absint( $_REQUEST['menu-item'] ) ); 340 340 } 341 342 // Set the menu_location value correctly for the newly created menu.343 foreach ( $menu_locations as $location => $id ) {344 if ( 0 === $id ) {345 $menu_locations[ $location ] = $nav_menu_selected_id;346 }347 }348 349 set_theme_mod( 'nav_menu_locations', $menu_locations );350 341 351 342 if ( isset( $_REQUEST['zero-menu-state'] ) || ! empty( $_POST['auto-add-pages'] ) ) { … … 1043 1034 <?php 1044 1035 foreach ( $locations as $location => $description ) : 1045 $checked = isset( $menu_locations[ $location ] ) && $menu_locations[ $location ] === $nav_menu_selected_id; 1036 $checked = false; 1037 1038 if ( isset( $menu_locations[ $location ] ) 1039 && 0 !== $nav_menu_selected_id 1040 && $menu_locations[ $location ] === $nav_menu_selected_id 1041 ) { 1042 $checked = true; 1043 } 1046 1044 ?> 1047 1045 <div class="menu-settings-input checkbox-input">
Note: See TracChangeset
for help on using the changeset viewer.