WP HOOKS
akcjaod 2.3.0

create_term

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

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

ParametrTypOpis
$term_idintTerm ID.
$tt_idintTerm taxonomy ID.
$taxonomystringTaxonomy slug.
$argsarrayArguments 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
}

Popularne w tej kategorii