apply_filters( ‘rest_post_search_query’, array $query_args, WP_REST_Request $request )

In this article

Filters the query arguments for a REST API post search request.

Description

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

Parameters

$query_argsarray
Key value array of query var to query value.
$requestWP_REST_Request
The request used.

Source

$query_args = apply_filters( 'rest_post_search_query', $query_args, $request );

Changelog

VersionDescription
5.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.