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 |
---|---|
82 | * Filters the query arguments for a REST API search request. |
83 | * |
84 | * Enables adding extra arguments or setting defaults for a term search request. |
85 | * |
86 | * @since 5.6.0 |
87 | * |
88 | * @param array $query_args Key value array of query var to query value. |
89 | * @param WP_REST_Request $request The request used. |
90 | */ |
91 | $query_args = apply_filters( 'rest_term_search_query', $query_args, $request ); |
92 |
|
93 | $query = new WP_Term_Query(); |
94 | $found_terms = $query->query( $query_args ); |
95 | $found_ids = wp_list_pluck( $found_terms, 'term_id' ); |
96 |
|
97 | unset( $query_args['offset'], $query_args['number'] ); |
98 |
|
99 | $total = wp_count_terms( $query_args ); |
100 |
|