Changeset 23453
- Timestamp:
- 02/19/2013 01:31:42 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/nav-menus.php
r23441 r23453 265 265 $locations = get_registered_nav_menus(); 266 266 $menu_locations = get_nav_menu_locations(); 267 if ( empty( $menu_locations ) || ! is_array( $menu_locations ) ) 268 $menu_locations = array(); 267 269 268 270 // Remove menu locations that have been unchecked … … 372 374 373 375 // Set $nav_menu_selected_id to 0 if no menus 374 if ( $one_theme_location_no_menus ) 376 if ( $one_theme_location_no_menus ) { 375 377 $nav_menu_selected_id = 0; 378 } elseif ( empty( $nav_menu_selected_id ) && ! empty( $nav_menus ) && ! $add_new_screen ) { 379 // if we have no selection yet, and we have menus, set to the first one in the list 380 $nav_menu_selected_id = $nav_menus[0]->term_id; 381 } 376 382 377 383 // Update the user's setting
Note: See TracChangeset
for help on using the changeset viewer.