WordPress at a glance
filter is not described

pre_delete_attachment filter-hook . WP 5.5.0

Filters whether an attachment deletion should take place.

Usage

add_filter( 'pre_delete_attachment', 'filter_function_name_1035', 10, 3 );
function filter_function_name_1035( $delete, $post, $force_delete ){
	// filter...

	return $delete;
}
$delete(true/false/null)
Whether to go forward with deletion.
$post(WP_Post)
Post object.
$force_delete(true/false)
Whether to bypass the Trash.

Changelog

Since 5.5.0 Introduced.

Where the hook is called

wp_delete_attachment()
pre_delete_attachment
wp-includes/post.php 5915
$check = apply_filters( 'pre_delete_attachment', null, $post, $force_delete );

Where in WP core the hook is used WordPress

Usage not found.