WordPress.org

Make WordPress Core

Changeset 14738


Ignore:
Timestamp:
05/19/10 05:59:43 (5 years ago)
Author:
nacin
Message:

Rename wp_save_nav_menu_item to wp_save_nav_menu_items. Though it could handle one item, it expects a mess of post data containing an array of menu items. see #13447.

Location:
trunk/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r14731 r14738  
    830830    $menu_id = (int) $_POST['menu']; 
    831831    if ( isset( $_POST['menu-item'] ) ) { 
    832         $item_ids = wp_save_nav_menu_item( $menu_id, $_POST['menu-item'] ); 
     832        $item_ids = wp_save_nav_menu_items( $menu_id, $_POST['menu-item'] ); 
    833833        if ( is_wp_error( $item_ids ) ) 
    834834            die('-1'); 
  • trunk/wp-admin/includes/nav-menu.php

    r14715 r14738  
    864864 * @return array The database IDs of the items saved 
    865865 */ 
    866 function wp_save_nav_menu_item( $menu_id = 0, $menu_data = array() ) { 
     866function wp_save_nav_menu_items( $menu_id = 0, $menu_data = array() ) { 
    867867    $menu_id = (int) $menu_id; 
    868868    $items_saved = array(); 
  • trunk/wp-admin/nav-menus.php

    r14714 r14738  
    5555            set_theme_mod( 'nav_menu_locations', $_REQUEST['menu-locations'] ); 
    5656        elseif ( isset( $_REQUEST['menu-item'] ) ) 
    57             wp_save_nav_menu_item( $nav_menu_selected_id, $_REQUEST['menu-item'] ); 
     57            wp_save_nav_menu_items( $nav_menu_selected_id, $_REQUEST['menu-item'] ); 
    5858        break; 
    5959    case 'move-down-menu-item' : 
Note: See TracChangeset for help on using the changeset viewer.