akcjadynamicznyod 5.5.0
saved_{$taxonomy}
Args 4Plik wp-includes/taxonomy.php
Opis — z kodu źródłowego
Fires after a term in a specific taxonomy has been saved, and the term cache has been cleared.
The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
Possible hook names include:
saved_categorysaved_post_tag
Hook dynamiczny — możliwe nazwy
saved_categorysaved_post_tagParametry
| Parametr | Typ | Opis |
|---|---|---|
$term_id | int | Term ID. |
$tt_id | int | Term taxonomy ID. |
$update | bool | Whether this is an existing term being updated. |
$args | array | Arguments passed to wp_insert_term(). |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'saved_{$taxonomy}', '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_action( 'saved_{$taxonomy}', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii