filtrod 3.1.0
get_the_terms
Opis — z kodu źródłowego
Filters the list of terms attached to the given post.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$terms | \WP_Term[] | \WP_Error | Array of attached terms, or WP_Error on failure. |
$post_id | int | Post ID. |
$taxonomy | string | Name of the taxonomy. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_the_terms', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'get_the_terms', 'twoja_funkcja', 10, 3 );
function twoja_funkcja($param_1, $param_2, $param_3) {
// Twój kod
}Popularne w tej kategorii