pre_get_search_form WordPress Action Hook

The pre_get_search_form hook is a WordPress hook that is invoked before the search form is retrieved. It is useful for modifying the search form based on the current search context.

do_action( 'pre_get_search_form', array $args ) #

Fires before the search form is retrieved, at the start of get_search_form().


Parameters

$args

(array)The array of arguments for building the search form. See get_search_form() for information on accepted arguments.


Top ↑

Source

File: wp-includes/general-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.5.0The $args parameter was added.
3.6.0
2.7.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