Filter hook 'wp_insert_attachment_data'
in WP Core File wp-includes/post.php at line 4577
Description
Filters attachment post data before it is updated in or added to the database.
Occurrences
Filename |
Line Number |
wp-includes/post.php |
4577 |
Parameters
Type |
Name |
Description |
array |
$data |
An array of slashed, sanitized, and processed attachment post data. |
array |
$postarr |
An array of slashed and sanitized attachment post data, but not processed. |
array |
$unsanitized_postarr |
An array of slashed yet *unsanitized* and unprocessed attachment post data as originally passed to wp_insert_post(). |
bool |
$update |
Whether this is an existing attachment post being updated. |
PHP Doc
/**
* Filters attachment post data before it is updated in or added to the database.
*
* @since 3.9.0
* @since 5.4.1 The `$unsanitized_postarr` parameter was added.
* @since 6.0.0 The `$update` parameter was added.
*
* @param array $data An array of slashed, sanitized, and processed attachment post data.
* @param array $postarr An array of slashed and sanitized attachment post data, but not processed.
* @param array $unsanitized_postarr An array of slashed yet *unsanitized* and unprocessed attachment post data
* as originally passed to wp_insert_post().
* @param bool $update Whether this is an existing attachment post being updated.
*/