Fix regression introduced by [16096]. Props duck_. See #14415
git-svn-id: http://svn.automattic.com/wordpress/trunk@16105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a512dbefb2
commit
26a0767138
|
@ -746,8 +746,8 @@ case 'add-menu-item' :
|
|||
// For performance reasons, we omit some object properties from the checklist.
|
||||
// The following is a hacky way to restore them when adding non-custom items.
|
||||
|
||||
$menu_items_data = (array) $_POST['menu-item'];
|
||||
$menu_item_data = array_shift( $menu_items_data );
|
||||
$menu_items_data = array();
|
||||
foreach ( (array) $_POST['menu-item'] as $menu_item_data ) {
|
||||
if (
|
||||
! empty( $menu_item_data['menu-item-type'] ) &&
|
||||
'custom' != $menu_item_data['menu-item-type'] &&
|
||||
|
@ -770,7 +770,8 @@ case 'add-menu-item' :
|
|||
$menu_item_data['menu-item-description'] = $_menu_item->description;
|
||||
}
|
||||
|
||||
$menu_items_data = array( $menu_item_data );
|
||||
$menu_items_data[] = $menu_item_data;
|
||||
}
|
||||
|
||||
$item_ids = wp_save_nav_menu_items( 0, $menu_items_data );
|
||||
if ( is_wp_error( $item_ids ) )
|
||||
|
|
Loading…
Reference in New Issue