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 |
---|---|
69 | * Filters the query arguments for a REST API search request. |
70 | * |
71 | * Enables adding extra arguments or setting defaults for a term search request. |
72 | * |
73 | * @since 5.6.0 |
74 | * |
75 | * @param array $query_args Key value array of query var to query value. |
76 | * @param WP_REST_Request $request The request used. |
77 | */ |
78 | $query_args = apply_filters( 'rest_term_search_query', $query_args, $request ); |
79 |
|
80 | $query = new WP_Term_Query(); |
81 | $found_terms = $query->query( $query_args ); |
82 | $found_ids = wp_list_pluck( $found_terms, 'term_id' ); |
83 |
|
84 | unset( $query_args['offset'], $query_args['number'] ); |
85 |
|
86 | $total = wp_count_terms( $query_args ); |
87 |
|