Index: /branches/5.7/src/wp-admin/nav-menus.php =================================================================== --- /branches/5.7/src/wp-admin/nav-menus.php (revision 50987) +++ /branches/5.7/src/wp-admin/nav-menus.php (revision 50988) @@ -339,13 +339,4 @@ wp_save_nav_menu_items( $nav_menu_selected_id, absint( $_REQUEST['menu-item'] ) ); } - - // Set the menu_location value correctly for the newly created menu. - foreach ( $menu_locations as $location => $id ) { - if ( 0 === $id ) { - $menu_locations[ $location ] = $nav_menu_selected_id; - } - } - - set_theme_mod( 'nav_menu_locations', $menu_locations ); if ( isset( $_REQUEST['zero-menu-state'] ) || ! empty( $_POST['auto-add-pages'] ) ) { @@ -1043,5 +1034,12 @@ $description ) : - $checked = isset( $menu_locations[ $location ] ) && $menu_locations[ $location ] === $nav_menu_selected_id; + $checked = false; + + if ( isset( $menu_locations[ $location ] ) + && 0 !== $nav_menu_selected_id + && $menu_locations[ $location ] === $nav_menu_selected_id + ) { + $checked = true; + } ?>