WP HOOKS
filtrod 3.0.0

pre_insert_term

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

Opis — z kodu źródłowego

Filters a term before it is sanitized and inserted into the database.

Parametry

ParametrTypOpis
$termstring | \WP_ErrorThe term name to add, or a WP_Error object if there's an error.
$taxonomystringTaxonomy slug.
$argsarray | stringArray or query string of arguments passed to wp_insert_term().

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_insert_term', 'twoja_funkcja', 10, 3 );

function twoja_funkcja($param_1, $param_2, $param_3) {
	// Twój kod
}

Popularne w tej kategorii