wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_insert_attachment_data › Hooks de Filtros WordPress

Desde6.0.0
Obsoleton/a
› apply_filters( 'wp_insert_attachment_data', $data, $postarr, $unsanitized_postarr, $update )
Parâmetros: (4)
  • () data An array of slashed, sanitized, and processed attachment post data.
    Required: Yes
  • () postarr An array of slashed and sanitized attachment post data, but not processed.
    Required: Yes
  • () unsanitized_postarr An array of slashed yet *unsanitized* and unprocessed attachment post data as originally passed to wp_insert_post().
    Required: Yes
  • () update Whether this is an existing attachment post being updated.
    Required: Yes
Definido em:
Codex:

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





Fonte

$data = apply_filters( 'wp_insert_attachment_data', $data, $postarr, $unsanitized_postarr, $update );