WordPress.org

Make WordPress Core

Ticket #8909: delete_attachment.diff

File delete_attachment.diff, 594 bytes (added by filosofo, 5 years ago)
  • wp-includes/post.php

     
    24932493        $meta = wp_get_attachment_metadata( $postid ); 
    24942494        $file = get_attached_file( $postid ); 
    24952495 
     2496        do_action('delete_attachment', $postid); 
     2497 
    24962498        /** @todo Delete for pluggable post taxonomies too */ 
    24972499        wp_delete_object_term_relationships($postid, array('category', 'post_tag')); 
    24982500 
     
    25292531 
    25302532        clean_post_cache($postid); 
    25312533 
    2532         do_action('delete_attachment', $postid); 
    2533  
    25342534        return $post; 
    25352535} 
    25362536