Changes from branches/3.6/wp-admin/nav-menus.php at r25232 to trunk/wp-admin/nav-menus.php at r24680
- File:
-
- 1 edited
-
trunk/wp-admin/nav-menus.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/nav-menus.php
r25232 r24680 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_ nav_menu_locations();304 foreach ( $locations as $location => $menu_id ) {303 $locations = get_theme_mod( 'nav_menu_locations' ); 304 foreach ( (array) $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_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 ); 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 ); 316 315 } 317 316 // $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.