WP HOOKS
filtrod 2.8.0

wp_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.

The $taxonomies parameter passed to this filter is formatted as a SQL fragment. The {@see 'get_object_terms'} filter is recommended as an alternative.

Parametry

ParametrTypOpis
$terms\WP_Term[] | int[] | string[] | stringArray of terms or a count thereof as a numeric string.
$object_idsstringComma separated list of object IDs for which terms were retrieved.
$taxonomiesstringSQL fragment 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( 'wp_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