Make WordPress Core


Ignore:
Timestamp:
10/30/2010 06:21:23 PM (16 years ago)
Author:
nacin
Message:

Move code out of the conditional. props duck_, fixes #14415.

File:
1 edited

Legend:

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

    r16096 r16104  
    744744        require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
    745745
    746         /**
    747          * For performance reasons, we omit some object properties from the checklist. 
    748          * The following is a hacky way to restore them when adding non-custom items.
    749          */
     746        // For performance reasons, we omit some object properties from the checklist. 
     747        // The following is a hacky way to restore them when adding non-custom items.
     748
    750749        $menu_items_data = (array) $_POST['menu-item'];
    751750        $menu_item_data = array_shift( $menu_items_data );
    … …  
    768767                $_menu_item = array_shift( $_menu_items );
    769768
    770                 /** Restore the missing menu item properties **/
     769                // Restore the missing menu item properties
    771770                $menu_item_data['menu-item-description'] = $_menu_item->description;
    772 
    773                 $menu_items_data = array( $menu_item_data );
    774         }
     771        }
     772
     773        $menu_items_data = array( $menu_item_data );
    775774
    776775        $item_ids = wp_save_nav_menu_items( 0, $menu_items_data );
Note: See TracChangeset for help on using the changeset viewer.