mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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
git-svn-id: https://develop.svn.wordpress.org/trunk@14295 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -827,6 +827,8 @@ case 'add-menu-item' :
|
||||
$menu_id = (int) $_POST['menu'];
|
||||
if ( isset( $_POST['menu-item'] ) ) {
|
||||
$item_ids = wp_save_nav_menu_item( $menu_id, $_POST['menu-item'] );
|
||||
if ( is_wp_error( $item_ids ) )
|
||||
die('-1');
|
||||
} else {
|
||||
$item_ids = array();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user