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.


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

	return $delete;
Whether to go forward with deletion.
Post object.
Whether to bypass the Trash.

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

С версии 5.5.0 Введена.

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

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

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

Использование не найдено.