WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
237 | * Filters the terms query default arguments. |
238 | * |
239 | * Use {@see 'get_terms_args'} to filter the passed arguments. |
240 | * |
241 | * @since 4.4.0 |
242 | * |
243 | * @param array $defaults An array of default get_terms() arguments. |
244 | * @param array $taxonomies An array of taxonomies. |
245 | */ |
246 | $this->query_var_defaults = apply_filters( 'get_terms_defaults', $this->query_var_defaults, $taxonomies ); |
247 |
|
248 | $query = wp_parse_args( $query, $this->query_var_defaults ); |
249 |
|
250 | $query['number'] = absint( $query['number'] ); |
251 | $query['offset'] = absint( $query['offset'] ); |
252 |
|
253 | // 'parent' overrides 'child_of'. |
254 | if ( 0 < intval( $query['parent'] ) ) { |
255 | $query['child_of'] = false; |