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 Parameters


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


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


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

Top ↑

Source Source

File: wp-includes/post.php

View on Trac

Top ↑

Changelog Changelog

Version Description
5.4.1 $unsanitized_postarr argument added.
3.9.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.