mirror of
git://develop.git.wordpress.org/
synced 2025-02-24 08:33:35 +01:00
Move delete_attachment action up. Props filosofo. fixes #8909
git-svn-id: https://develop.svn.wordpress.org/trunk@10400 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c46a012328
commit
0af7659d69
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user