mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-16 23:55:12 +01:00
"Unstick" posts when deleting, fixes #8860
git-svn-id: http://svn.automattic.com/wordpress/trunk@10363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3f7facfbe6
commit
7b2265e598
@ -1131,6 +1131,8 @@ function wp_delete_post($postid = 0) {
|
|||||||
$children = $wpdb->get_results($children_query);
|
$children = $wpdb->get_results($children_query);
|
||||||
|
|
||||||
$wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => 'page' ) );
|
$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
|
// Do raw query. wp_get_post_revisions() is filtered
|
||||||
|
Loading…
Reference in New Issue
Block a user