Make WordPress Core


Ignore:
Timestamp:
05/27/2010 10:22:09 PM (14 years ago)
Author:
nacin
Message:

New pending menu item behavior. props filosofo, see #13579.

File:
1 edited

Legend:

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

    r14943 r15008  
    817817    require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
    818818
    819     $menu_id = (int) $_POST['menu'];
    820     if ( isset( $_POST['menu-item'] ) ) {
    821         $item_ids = wp_save_nav_menu_items( $menu_id, $_POST['menu-item'] );
    822         if ( is_wp_error( $item_ids ) )
    823             die('-1');
    824     } else {
    825         $item_ids = array();
    826     }
     819    $item_ids = wp_save_nav_menu_items( 0, $_POST['menu-item'] );
     820    if ( is_wp_error( $item_ids ) )
     821        die('-1');
    827822
    828823    foreach ( (array) $item_ids as $menu_item_id ) {
Note: See TracChangeset for help on using the changeset viewer.