WordPress at a glance
filter is not described

get_terms filter-hook . WP 2.3.0

Filters the found terms.


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

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

Список изменений

С версии 2.3.0 Введена.
С версии 4.6.0 Added the $term_query parameter.

Где вызывается хук

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

Где используется хук в ядре WordPress

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