W3cubDocs

/WordPress

apply_filters( ‘get_terms’, array $terms, array|null $taxonomies, array $args, WP_Term_Query $term_query )

Filters the found terms.

Parameters

$termsarray
Array of found terms.
$taxonomiesarray|null
An array of taxonomies if known.
$argsarray
An array of get_terms() arguments.
More Arguments from get_terms( … $args )Array or string of arguments. See WP_Term_Query::__construct() for information on accepted arguments.
$term_queryWP_Term_Query
The WP_Term_Query object.

Source

return apply_filters( 'get_terms', $terms, $term_query->query_vars['taxonomy'], $term_query->query_vars, $term_query );

Changelog

Version Description
4.6.0 Added the $term_query parameter.
2.3.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_terms