WP HOOKS
filtrod 2.8.0

get_terms_fields

Args 3Plik wp-includes/class-wp-term-query.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the fields to select in the terms query.

Field lists modified using this filter will only modify the term fields returned by the function when the $fields parameter set to 'count' or 'all'. In all other cases, the term fields in the results array will be determined by the $fields parameter alone. Use of this filter can result in unpredictable behavior, and is not recommended.

Parametry

ParametrTypOpis
$selectsstring[]An array of fields to select for the terms query.
$argsarrayAn array of term query arguments.
$taxonomiesstring[]An array of taxonomy names.

Wywołanie

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

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

Popularne w tej kategorii