rest_term_search_query WordPress Filter Hook

The rest_term_search_query hook is used to modify the search query for terms when using the REST API. This hook can be used to change the search parameters, or to return a completely different set of results.

apply_filters( 'rest_term_search_query', array $query_args, WP_REST_Request $request ) #

Filters the query arguments for a REST API search request.


Description

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


Top ↑

Parameters

$query_args

(array)Key value array of query var to query value.

$request

(WP_REST_Request)The request used.


Top ↑

Source

File: wp-includes/rest-api/search/class-wp-rest-term-search-handler.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.