WP HOOKS
filtrod 4.2.0

get_object_terms

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

Opis — z kodu źródłowego

Filters the terms for a given object or objects.

Parametry

ParametrTypOpis
$terms\WP_Term[] | int[] | string[] | stringArray of terms or a count thereof as a numeric string.
$object_idsint[]Array of object IDs for which terms were retrieved.
$taxonomiesstring[]Array of taxonomy names from which terms were retrieved.
$argsarrayArray of arguments for retrieving terms for the given object(s). See wp_get_object_terms() for details.

Wywołanie

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

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

Popularne w tej kategorii