get_terms_args filter-hookWP 3.1.0

Filters the terms query arguments.

Usage

add_filter( 'get_terms_args', 'wp_kama_get_terms_args_filter', 10, 2 );

/**
 * Function for `get_terms_args` filter-hook.
 * 
 * @param array    $args       An array of get_terms() arguments.
 * @param string[] $taxonomies An array of taxonomy names.
 *
 * @return array
 */
function wp_kama_get_terms_args_filter( $args, $taxonomies ){

	// filter...
	return $args;
}
$args(array)
An array of get_terms() arguments.
$taxonomies(string[])
An array of taxonomy names.

Changelog

Since 3.1.0 Introduced.

Where the hook is called

WP_Term_Query::get_terms()
get_terms_args
wp-includes/class-wp-term-query.php 411
$args = apply_filters( 'get_terms_args', $args, $taxonomies );

Where the hook is used in WordPress

Usage not found.