WordPress at a glance
action is not described

delete_attachment action-hook . WP 2.0.0

Fires before an attachment is deleted, at the start of wp_delete_attachment().

Usage

add_action( 'delete_attachment', 'action_function_name_9216', 10, 2 );
function action_function_name_9216( $post_id, $post ){
	// action...
}
$post_id(int)
Attachment ID.
$post(WP_Post)
Post object.

Список изменений

С версии 2.0.0 Введена.
С версии 5.5.0 Added the $post parameter.

Где вызывается хук

wp_delete_attachment()
delete_attachment
wp-includes/post.php 5815
do_action( 'delete_attachment', $post_id, $post );

Где используется хук в ядре WP

wp-admin/includes/class-wp-site-icon.php 72
add_action( 'delete_attachment', array( $this, 'delete_attachment_data' ) );
wp-includes/default-filters.php 473
add_action( 'delete_attachment', '_delete_attachment_theme_mod' );