Changeset 16438 for trunk/wp-admin/admin-ajax.php
- Timestamp:
- 11/17/2010 06:47:34 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r16388 r16438 724 724 require_once ABSPATH . 'wp-admin/includes/nav-menu.php'; 725 725 726 // For performance reasons, we omit some object properties from the checklist. 726 // For performance reasons, we omit some object properties from the checklist. 727 727 // The following is a hacky way to restore them when adding non-custom items. 728 728 … … 730 730 foreach ( (array) $_POST['menu-item'] as $menu_item_data ) { 731 731 if ( 732 ! empty( $menu_item_data['menu-item-type'] ) && 732 ! empty( $menu_item_data['menu-item-type'] ) && 733 733 'custom' != $menu_item_data['menu-item-type'] && 734 734 ! empty( $menu_item_data['menu-item-object-id'] ) … … 740 740 741 741 case 'taxonomy' : 742 $_object = get_term( $menu_item_data['menu-item-object-id'], $menu_item_data['menu-item-object'] ); 742 $_object = get_term( $menu_item_data['menu-item-object-id'], $menu_item_data['menu-item-object'] ); 743 743 break; 744 744 } 745 745 746 $_menu_items = array_map( 'wp_setup_nav_menu_item', array( $_object ) ); 746 $_menu_items = array_map( 'wp_setup_nav_menu_item', array( $_object ) ); 747 747 $_menu_item = array_shift( $_menu_items ); 748 748 … … 750 750 $menu_item_data['menu-item-description'] = $_menu_item->description; 751 751 } 752 752 753 753 $menu_items_data[] = $menu_item_data; 754 } 754 } 755 755 756 756 $item_ids = wp_save_nav_menu_items( 0, $menu_items_data ); … … 1078 1078 1079 1079 wp_link_ajax( $_POST ); 1080 1080 1081 1081 exit; 1082 1082 break;
Note: See TracChangeset
for help on using the changeset viewer.