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 |
---|---|
251 | * Filters the terms query default arguments. |
252 | * |
253 | * Use {@see 'get_terms_args'} to filter the passed arguments. |
254 | * |
255 | * @since 4.4.0 |
256 | * |
257 | * @param array $defaults An array of default get_terms() arguments. |
258 | * @param string[] $taxonomies An array of taxonomy names. |
259 | */ |
260 | $this->query_var_defaults = apply_filters( 'get_terms_defaults', $this->query_var_defaults, $taxonomies ); |
261 |
|
262 | $query = wp_parse_args( $query, $this->query_var_defaults ); |
263 |
|
264 | $query['number'] = absint( $query['number'] ); |
265 | $query['offset'] = absint( $query['offset'] ); |
266 |
|
267 | // 'parent' overrides 'child_of'. |
268 | if ( 0 < (int) $query['parent'] ) { |
269 | $query['child_of'] = false; |