wppaste
WordPress

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

Since
2.3.0, 4.6.0
Filters the found terms.

Compatibility

WordPress
since 4.6.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$termsarray
Array of found terms.
$taxonomiesarray|null
An array of taxonomies if known.
$argsarray
An array of get_terms() arguments.
$term_queryWP_Term_Query
The WP_Term_Query object.

Where this hook fires · 1

  • wp-includes/taxonomy.php:1379get_terms()

Source code

	 *	 * @param array         $terms      Array of found terms.	 * @param array|null    $taxonomies An array of taxonomies if known.	 * @param array         $args       An array of get_terms() arguments.	 * @param WP_Term_Query $term_query The WP_Term_Query object.	 */	return apply_filters( 'get_terms', $terms, $term_query->query_vars['taxonomy'], $term_query->query_vars, $term_query );} /** * Adds metadata to a term. * * @since 4.4.0

Changelog

Introduced in 2.3.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

4.6.0
Added the $term_query parameter.from the docblock
2.3.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.