WP HOOKS
filtrod 3.9.0

wp_insert_attachment_data

Args 4Plik wp-includes/post.phpDokumentacja WP ↗

Opis — z kodu źródłowego

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

Parametry

ParametrTypOpis
$dataarrayAn array of slashed, sanitized, and processed attachment post data.
$postarrarrayAn array of slashed and sanitized attachment post data, but not processed.
$unsanitized_postarrarrayAn array of slashed yet <em>unsanitized</em> and unprocessed attachment post data as originally passed to wp_insert_post().
$updateboolWhether this is an existing attachment post being updated.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_insert_attachment_data', 'twoja_funkcja', 10, 4 );

function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
	// Twój kod
}

Popularne w tej kategorii