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