do_action( 'delete_attachment', int $post_id , WP_Post $post )
Fires before an attachment is deleted, at the start of wp_delete_attachment().
Parameters
- $post_id
-
Attachment ID.
- $post
-
Post object.
Source
File: wp-includes/post.php
Changelog
Version | Description |
---|---|
5.5.0 | Added the $post parameter. |
2.0.0 | Introduced. |