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.


Top ↑

Source

File: wp-includes/general-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.3.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.

Show More
Show More