Changeset 25195
- Timestamp:
- 08/31/2013 01:36:49 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/nav-menus.php
r24981 r25195 301 301 wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selected_title ); 302 302 // Auto-save nav_menu_locations 303 $locations = get_ theme_mod( 'nav_menu_locations');304 foreach ( (array)$locations as $location => $menu_id ) {303 $locations = get_nav_menu_locations(); 304 foreach ( $locations as $location => $menu_id ) { 305 305 $locations[ $location ] = $nav_menu_selected_id; 306 306 break; // There should only be 1 … … 309 309 } 310 310 if ( isset( $_REQUEST['use-location'] ) ) { 311 $locations = get_theme_mod( 'nav_menu_locations' ); 312 if ( isset( $locations[$_REQUEST['use-location']] ) ) 313 $locations[$_REQUEST['use-location']] = $nav_menu_selected_id; 314 set_theme_mod( 'nav_menu_locations', $locations ); 311 $locations = get_registered_nav_menus(); 312 $menu_locations = get_nav_menu_locations(); 313 if ( isset( $locations[ $_REQUEST['use-location'] ] ) ) 314 $menu_locations[ $_REQUEST['use-location'] ] = $nav_menu_selected_id; 315 set_theme_mod( 'nav_menu_locations', $menu_locations ); 315 316 } 316 317 // $messages[] = '<div id="message" class="updated"><p>' . sprintf( __( '<strong>%s</strong> has been created.' ), $nav_menu_selected_title ) . '</p></div>';
Note: See TracChangeset
for help on using the changeset viewer.