get_terms WordPress Filter Hook
The get_terms hook is used to retrieve the terms in a taxonomy. It is similar to the get_posts hook, but with some additional arguments.
apply_filters( 'get_terms', array $terms , array|null $taxonomies , array $args , WP_Term_Query $term_query ) #
Filters the found terms.
Parameters
- $terms
(array)Array of found terms.
- $taxonomies
(array|null)An array of taxonomies if known.
- $args
(array)An array of get_terms() arguments.
- $term_query
(WP_Term_Query)The WP_Term_Query object.
Source
File: wp-includes/taxonomy.php
Changelog
Version | Description |
---|---|
4.6.0 | Added the $term_query parameter. |
2.3.0 | Introduced. |