From 6dd933b1209c3c59024b8018d21f9e05d069caf4 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 21 Jan 2009 21:19:22 +0000 Subject: [PATCH] Move delete_attachment action up. Props filosofo. fixes #8909 git-svn-id: http://svn.automattic.com/wordpress/trunk@10400 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index e23acd0d38..75dd927aad 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -2493,6 +2493,8 @@ function wp_delete_attachment($postid) { $meta = wp_get_attachment_metadata( $postid ); $file = get_attached_file( $postid ); + do_action('delete_attachment', $postid); + /** @todo Delete for pluggable post taxonomies too */ wp_delete_object_term_relationships($postid, array('category', 'post_tag')); @@ -2529,8 +2531,6 @@ function wp_delete_attachment($postid) { clean_post_cache($postid); - do_action('delete_attachment', $postid); - return $post; }