akcjadynamicznyod 2.3.0
created_{$taxonomy}
Args 3Plik wp-includes/taxonomy.php
Opis — z kodu źródłowego
Fires after a new term in a specific taxonomy is created, and after the term cache has been cleaned.
The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
Possible hook names include:
created_categorycreated_post_tag
Hook dynamiczny — możliwe nazwy
created_categorycreated_post_tagParametry
| Parametr | Typ | Opis |
|---|---|---|
$term_id | int | Term ID. |
$tt_id | int | Term taxonomy ID. |
$args | array | Arguments passed to wp_insert_term(). |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'created_{$taxonomy}', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'created_{$taxonomy}', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii