On this page
apply_filters( 'wp_insert_attachment_data', array $data, array $postarr, array $unsanitized_postarr, bool $update )
Filters attachment post data before it is updated in or added to the database.
Parameters
$dataarray-
An array of slashed, sanitized, and processed attachment post data.
$postarrarray-
An array of slashed and sanitized attachment post data, but not processed.
$unsanitized_postarrarray-
An array of slashed yet *unsanitized* and unprocessed attachment post data as originally passed to wp_insert_post() .
$updatebool-
Whether this is an existing attachment post being updated.
Source
File: wp-includes/post.php. View all references
$data = apply_filters( 'wp_insert_attachment_data', $data, $postarr, $unsanitized_postarr, $update );
Related
Used By
| Used By | Description |
|---|---|
| wp_insert_post() wp-includes/post.php | Inserts or update a post. |
Changelog
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_insert_attachment_data