mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
New pending menu item behavior. props filosofo, see #13579.
git-svn-id: https://develop.svn.wordpress.org/trunk@15008 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -816,14 +816,9 @@ case 'add-menu-item' :
|
||||
|
||||
require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
|
||||
|
||||
$menu_id = (int) $_POST['menu'];
|
||||
if ( isset( $_POST['menu-item'] ) ) {
|
||||
$item_ids = wp_save_nav_menu_items( $menu_id, $_POST['menu-item'] );
|
||||
if ( is_wp_error( $item_ids ) )
|
||||
die('-1');
|
||||
} else {
|
||||
$item_ids = array();
|
||||
}
|
||||
$item_ids = wp_save_nav_menu_items( 0, $_POST['menu-item'] );
|
||||
if ( is_wp_error( $item_ids ) )
|
||||
die('-1');
|
||||
|
||||
foreach ( (array) $item_ids as $menu_item_id ) {
|
||||
$menu_obj = get_post( $menu_item_id );
|
||||
|
||||
Reference in New Issue
Block a user