WordPress at Your Fingertips
filter is not described

rest_post_search_query filter-hook . WP 5.1.0

Filters the query arguments for a REST API search request.

Enables adding extra arguments or setting defaults for a post search request.


add_filter( 'rest_post_search_query', 'filter_function_name_2683', 10, 2 );
function filter_function_name_2683( $query_args, $request ){
	// filter...

	return $query_args;
Key value array of query var to query value.
The request used.


Since 5.1.0 Introduced.

Where the hook is called

wp-includes/rest-api/search/class-wp-rest-post-search-handler.php 83
$query_args = apply_filters( 'rest_post_search_query', $query_args, $request );

Where in WP core the hook is used WordPress

Usage not found.