WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
Line | Code |
---|---|
97 | * Display search form. |
98 | * |
99 | * Will first attempt to locate the searchform.php file in either the child or |
100 | * the parent, then load it. If it doesn't exist, then the default search form |
101 | * will be displayed. |
102 | * |
103 | * @since 2.7.0 |
104 | */ |
105 | function get_search_form() { |
106 | do_action( 'get_search_form' ); |
107 |
|
108 | if ( '' != locate_template(array('searchform.php'), true) ) |
109 | return; |
110 |
|
111 | $form = '<form method="get" id="searchform" action="' . get_option('home') . '/" > |
112 | <label class="hidden" for="s">' . __('Search for:') . '</label> |
113 | <div><input type="text" value="' . attribute_escape(apply_filters('the_search_query', get_search_query())) . '" name="s" id="s" /> |
114 | <input type="submit" id="searchsubmit" value="'.attribute_escape(__('Search')).'" /> |
115 | </div> |
116 | </form>'; |
117 |
|
118 | echo apply_filters('get_search_form', $form); |
119 | } |
120 |
|
121 | /** |
122 | * Display the Log In/Out link. |
123 | * |
124 | * Displays a link, which allows the user to navigate to the Log In page to log in |
125 | * or log out depending on whether or not they are currently logged in. |
126 | * |
127 | * @since 1.5.0 |