filtrod 3.9.0
wp_insert_attachment_data
Opis — z kodu źródłowego
Filters attachment post data before it is updated in or added to the database.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$data | array | An array of slashed, sanitized, and processed attachment post data. |
$postarr | array | An array of slashed and sanitized attachment post data, but not processed. |
$unsanitized_postarr | array | An array of slashed yet <em>unsanitized</em> and unprocessed attachment post data as originally passed to wp_insert_post(). |
$update | bool | Whether 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
}
// 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