From b4c50f1b5ebdd1a477768b72d041194016b024b7 Mon Sep 17 00:00:00 2001 From: nacin Date: Wed, 19 May 2010 05:59:43 +0000 Subject: [PATCH] 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. git-svn-id: http://svn.automattic.com/wordpress/trunk@14738 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-ajax.php | 2 +- wp-admin/includes/nav-menu.php | 2 +- wp-admin/nav-menus.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index 6adff57970..860cd7591a 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -829,7 +829,7 @@ case 'add-menu-item' : $menu_id = (int) $_POST['menu']; if ( isset( $_POST['menu-item'] ) ) { - $item_ids = wp_save_nav_menu_item( $menu_id, $_POST['menu-item'] ); + $item_ids = wp_save_nav_menu_items( $menu_id, $_POST['menu-item'] ); if ( is_wp_error( $item_ids ) ) die('-1'); } else { diff --git a/wp-admin/includes/nav-menu.php b/wp-admin/includes/nav-menu.php index 444c70756f..25c6812765 100644 --- a/wp-admin/includes/nav-menu.php +++ b/wp-admin/includes/nav-menu.php @@ -863,7 +863,7 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) { * @param array $menu_data The unsanitized posted menu item data. * @return array The database IDs of the items saved */ -function wp_save_nav_menu_item( $menu_id = 0, $menu_data = array() ) { +function wp_save_nav_menu_items( $menu_id = 0, $menu_data = array() ) { $menu_id = (int) $menu_id; $items_saved = array(); diff --git a/wp-admin/nav-menus.php b/wp-admin/nav-menus.php index 8dfd5bd25e..cb8a6ab369 100644 --- a/wp-admin/nav-menus.php +++ b/wp-admin/nav-menus.php @@ -54,7 +54,7 @@ switch ( $action ) { if ( isset( $_REQUEST['nav-menu-locations'] ) ) set_theme_mod( 'nav_menu_locations', $_REQUEST['menu-locations'] ); elseif ( isset( $_REQUEST['menu-item'] ) ) - wp_save_nav_menu_item( $nav_menu_selected_id, $_REQUEST['menu-item'] ); + wp_save_nav_menu_items( $nav_menu_selected_id, $_REQUEST['menu-item'] ); break; case 'move-down-menu-item' : // moving down a menu item is the same as moving up the next in order