WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/29/2010 07:33:56 AM (11 years ago)
Author:
nacin
Message:

When posts/terms are deleted/trashed, update associated menu items. Deleted post = deleted menu item, trashed post = menu item becomes a draft. props filosofo, see #13174

File:
1 edited

Legend:

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

    r14263 r14295  
    828828    if ( isset( $_POST['menu-item'] ) ) {
    829829        $item_ids = wp_save_nav_menu_item( $menu_id, $_POST['menu-item'] );
     830        if ( is_wp_error( $item_ids ) )
     831            die('-1');
    830832    } else {
    831833        $item_ids = array();
Note: See TracChangeset for help on using the changeset viewer.