WordPress at Your Fingertips
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_7363', 10, 3 );
function filter_function_name_7363( $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().


Since 3.9.0 Introduced.
Since 5.4.1 $unsanitized_postarr argument added.

Where the hook is called

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

Where in WP core the hook is used WordPress

Usage not found.