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.


Top ↑

Source

File: wp-includes/taxonomy.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.6.0Added the $term_query parameter.
2.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More