diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-09-20 15:51:36 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-09-20 15:51:36 +0000 |
| commit | 0f74131cb024e290c2acb4d3f94c70d7fd05aefe (patch) | |
| tree | 3cc4dffe98a1cc681ba91b4bd3988ee3038b2109 | |
| parent | 400fd2328ffdd845dd7fd20f65fb829e76664256 (diff) | |
| download | wordpress-mu-0f74131cb024e290c2acb4d3f94c70d7fd05aefe.tar.gz wordpress-mu-0f74131cb024e290c2acb4d3f94c70d7fd05aefe.tar.xz wordpress-mu-0f74131cb024e290c2acb4d3f94c70d7fd05aefe.zip | |
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
| -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; } |
