WordPress at a glance
filter is not described

wp_insert_attachment_data filter-hook . WP 3.9.0

Filters attachment post data before it is updated in or added to the database.


add_filter( 'wp_insert_attachment_data', 'filter_function_name_3986', 10, 3 );
function filter_function_name_3986( $data, $postarr, $unsanitized_postarr ){
	// filter...

	return $data;
An array of slashed, sanitized, and processed attachment post data.
An array of slashed and sanitized attachment post data, but not processed.
An array of slashed yet unsanitized and unprocessed attachment post data as originally passed to wp_insert_post().

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

С версии 3.9.0 Введена.
С версии 5.4.1 $unsanitized_postarr argument added.

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

wp-includes/post.php 3958
$data = apply_filters( 'wp_insert_attachment_data', $data, $postarr, $unsanitized_postarr );

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

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