WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about delete_attachment

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-includes/post.php do_action 6421 /**
* Fires before an attachment is deleted, at the start of wp_delete_attachment().
*
* @since 2.0.0
* @since 5.5.0 Added the `$post` parameter.
*
* @param int $post_id Attachment ID.
* @param WP_Post $post Post object.
*/

Hook Parameters

Parameter Type Name Description
int $post_id Attachment ID.
WP_Post $post Post object.