get_search_query WordPress Filter Hook
The get_search_query hook allows you to modify the search query before it is sent to the database. This can be useful for making sure that the correct search results are returned, or for adding extra search parameters.
apply_filters( 'get_search_query', mixed $search ) #
Filters the contents of the search query variable.
Parameters
- $search
(mixed)Contents of the search query variable.
Source
Changelog
Version | Description |
---|---|
2.3.0 | Introduced. |