From 7b2265e59859c6859126905ce41d55d5c40bfe44 Mon Sep 17 00:00:00 2001 From: azaozz Date: Thu, 15 Jan 2009 00:47:56 +0000 Subject: [PATCH] "Unstick" posts when deleting, fixes #8860 git-svn-id: http://svn.automattic.com/wordpress/trunk@10363 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/post.php b/wp-includes/post.php index dd1e9c00fe..e23acd0d38 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1131,6 +1131,8 @@ function wp_delete_post($postid = 0) { $children = $wpdb->get_results($children_query); $wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => 'page' ) ); + } else { + unstick_post($postid); } // Do raw query. wp_get_post_revisions() is filtered