apply_filters( 'wp_insert_attachment_data', array $data, array $postarr, array $unsanitized_postarr )

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


Parameters

$data

An array of slashed, sanitized, and processed attachment post data.

$postarr

An array of slashed and sanitized attachment post data, but not processed.

$unsanitized_postarr

An array of slashed yet *unsanitized* and unprocessed attachment post data as originally passed to wp_insert_post().


Source

File: wp-includes/post.php

View on GitHub



Changelog

Changelog
Version Description
WP-4.9.14 $unsanitized_postarr argument added.
WP-3.9.0 Introduced.