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 |
1712 | * Display the contents of the search query variable. |
1713 | * |
1714 | * The search query string is passed through {@link esc_attr()} |
1715 | * to ensure that it is safe for placing in an html attribute. |
1716 | * |
1717 | * @uses attr |
1718 | * @since 2.1.0 |
1719 | */ |
1720 | function the_search_query() { |
1721 | echo esc_attr( apply_filters( 'the_search_query', get_search_query() ) ); |
1722 | } |
1723 |
|
1724 | /** |
1725 | * Display the language attributes for the html tag. |
1726 | * |
1727 | * Builds up a set of html attributes containing the text direction and language |
1728 | * information for the page. |
1729 | * |
1730 | * @since 2.1.0 |