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 |
---|---|
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. |
Line | Code |
1565 | * Display the contents of the search query variable. |
1566 | * |
1567 | * The search query string is passed through {@link attribute_escape()} |
1568 | * to ensure that it is safe for placing in an html attribute. |
1569 | * |
1570 | * @uses attribute_escape |
1571 | * @since 2.1.0 |
1572 | */ |
1573 | function the_search_query() { |
1574 | echo attribute_escape( apply_filters( 'the_search_query', get_search_query() ) ); |
1575 | } |
1576 |
|
1577 | /** |
1578 | * Display the language attributes for the html tag. |
1579 | * |
1580 | * Builds up a set of html attributes containing the text direction and language |
1581 | * information for the page. |
1582 | * |
1583 | * @since 2.1.0 |