From 0f74131cb024e290c2acb4d3f94c70d7fd05aefe Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 20 Sep 2005 15:51:36 +0000 Subject: Delete post *after* "delete_post" action has taken place. git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@347 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-inst/wp-includes/functions-post.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'wp-inst/wp-includes/functions-post.php') 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; } -- cgit