akcjaod 2.3.0
create_term
Opis — z kodu źródłowego
Fires immediately after a new term is created, before the term cache is cleaned.
The {@see 'create_$taxonomy'} hook is also available for targeting a specific taxonomy.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$term_id | int | Term ID. |
$tt_id | int | Term taxonomy ID. |
$taxonomy | string | Taxonomy slug. |
$args | array | Arguments passed to wp_insert_term(). |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'create_term', '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( 'create_term', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii