WP HOOKS
filtrdynamicznyod 2.3.0

{$taxonomy}_{$field}

Args 3Plik wp-includes/taxonomy.php

Opis — z kodu źródłowego

Filters the taxonomy field sanitized for display.

The dynamic portions of the filter name, $taxonomy, and $field, refer to the taxonomy slug and taxonomy field, respectively.

Parametry

ParametrTypOpis
$valuemixedValue of the taxonomy field.
$term_idintTerm ID.
$contextstringContext to retrieve the taxonomy field value.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( '{$taxonomy}_{$field}', 'twoja_funkcja', 10, 3 );

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

Popularne w tej kategorii