wp-includes/general-template.php:4480Displays the contents of the search query variable.
One hook fires while the_search_query() runs, in this order:
Filters the contents of the search query variable, for display.
function the_search_query() { /** * Filters the contents of the search query variable, for display. * * @since 2.3.0 * * @param mixed $search Contents of the search query variable. */ echo esc_attr( apply_filters( 'the_search_query', get_search_query( false ) ) );}Introduced in 2.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/general-template.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.