Filters attachment post data before it is updated in or added to the database.
$data, $postarr, $unsanitized_postarr, $update
Sortie :
@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 @param bool $update Whether this is an existing attachment post being updated.
// Modifier la valeur avec le filtre 'wp_insert_attachment_data'
add_filter('wp_insert_attachment_data', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($data) {
// Modifier la valeur
return $data;
}
Chargement des actualités...