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 |
---|---|
117 |
|
118 | $search_form_template = locate_template(array('searchform.php')); |
119 | if ( '' != $search_form_template ) { |
120 | require($search_form_template); |
121 | return; |
122 | } |
123 |
|
124 | $form = '<form role="search" method="get" id="searchform" action="' . get_option('home') . '/" > |
125 | <div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label> |
126 | <input type="text" value="' . esc_attr(apply_filters('the_search_query', get_search_query())) . '" name="s" id="s" /> |
127 | <input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" /> |
128 | </div> |
129 | </form>'; |
130 |
|
131 | echo apply_filters('get_search_form', $form); |
132 | } |
133 |
|
134 | /** |
135 | * Display the Log In/Out link. |
Line | Code |
1711 | * Display the contents of the search query variable. |
1712 | * |
1713 | * The search query string is passed through {@link esc_attr()} |
1714 | * to ensure that it is safe for placing in an html attribute. |
1715 | * |
1716 | * @uses attr |
1717 | * @since 2.1.0 |
1718 | */ |
1719 | function the_search_query() { |
1720 | echo esc_attr( apply_filters( 'the_search_query', get_search_query() ) ); |
1721 | } |
1722 |
|
1723 | /** |
1724 | * Display the language attributes for the html tag. |
1725 | * |
1726 | * Builds up a set of html attributes containing the text direction and language |
1727 | * information for the page. |
1728 | * |
1729 | * @since 2.1.0 |