Fires before an attachment is deleted, at the start of wp_delete_attachment() .
Parameters
$post_id
int- Attachment ID.
$post
WP_Post- Post object.
Source
do_action( 'delete_attachment', $post_id, $post );
Fires before an attachment is deleted, at the start of wp_delete_attachment() .
$post_id
int$post
WP_Postdo_action( 'delete_attachment', $post_id, $post );
You must log in before being able to contribute a note or feedback.
Below is the basic example how delete_attachment action works.