mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 03:04:34 +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:
@@ -2167,7 +2167,7 @@ function wp_insert_post($postarr = array(), $wp_error = false) {
|
||||
} elseif ( !empty($post_parent) ) {
|
||||
$parent_post = get_post($post_parent);
|
||||
// Check for circular dependency
|
||||
if ( $parent_post->post_parent == $post_ID )
|
||||
if ( isset( $parent_post->post_parent ) && $parent_post->post_parent == $post_ID )
|
||||
$post_parent = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user