diff options
Diffstat (limited to 'wp-inst/wp-includes/functions-post.php')
| -rw-r--r-- | wp-inst/wp-includes/functions-post.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/wp-inst/wp-includes/functions-post.php b/wp-inst/wp-includes/functions-post.php index b4a221d..e5db6c7 100644 --- a/wp-inst/wp-includes/functions-post.php +++ b/wp-inst/wp-includes/functions-post.php @@ -310,6 +310,8 @@ function wp_delete_post($postid = 0) { if ( !$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = $postid") ) return $post; + do_action('delete_post', $postid); + if ( 'static' == $post->post_status ) $wpdb->query("UPDATE $wpdb->posts SET post_parent = $post->post_parent WHERE post_parent = $postid AND post_status = 'static'"); @@ -324,7 +326,6 @@ function wp_delete_post($postid = 0) { if ( 'static' == $post->post_status ) generate_page_rewrite_rules(); - do_action('delete_post', $postid); return $post; } |
