filtrod 2.8.0
wp_get_object_terms
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
| Parametr | Typ | Opis |
|---|---|---|
$terms | \WP_Term[] | int[] | string[] | string | Array of terms or a count thereof as a numeric string. |
$object_ids | string | Comma separated list of object IDs for which terms were retrieved. |
$taxonomies | string | SQL fragment of taxonomy names from which terms were retrieved. |
$args | array | Array 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
}
// 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