WordPress at a glance
filter is not described

get_terms filter-hook . WP 2.3.0

Filters the found terms.

Usage

add_filter( 'get_terms', 'filter_function_name_531', 10, 4 );
function filter_function_name_531( $terms, $taxonomies, $args, $term_query ){
	// filter...

	return $terms;
}
$terms(array)
Array of found terms.
$taxonomies(array)
An array of taxonomies.
$args(array)
An array of get_terms() arguments.
$term_query(WP_Term_Query)
The WP_Term_Query object.

Notes

  • Since 4.6.0 Added the $term_query parameter.

Where the hook is called

get_terms()
get_terms
wp-includes/taxonomy.php 1129
return apply_filters( 'get_terms', $terms, $term_query->query_vars['taxonomy'], $term_query->query_vars, $term_query );

Where the hook is used (in WP core)

wp-includes/default-filters.php 470
add_filter( 'get_terms', '_post_format_get_terms', 10, 3 );