Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 35 lines (30 sloc) 1.011 kB
98a8e4e @jayj updated
authored
1 <?php
2 /**
3 * Search Form Template
4 *
5 * The search form template displays the search form.
6 *
bda9730 @jayj PHPDoc changes. You can browse the documentation on http://wpthemes.j…
authored
7 * @package Cakifo
8 * @subpackage Template
98a8e4e @jayj updated
authored
9 */
10 ?>
11
12 <?php
3fb3ddb @jayj Inline documentation improvements
authored
13 /**
14 * Set the value on the search input
15 */
98a8e4e @jayj updated
authored
16 if ( is_search() )
17 $value = 'value="' . esc_attr( get_search_query() ) . '"'; // Search query for the search page
18 elseif ( is_404() )
19 $value = 'value="' . esc_attr( basename($_SERVER['REQUEST_URI']) ) . '"'; // Requested URI for 404 page
20 else
0116328 @jayj Spacing clean ups
authored
21 $value = 'placeholder="' . esc_attr__( 'Search', 'cakifo' ) . '"'; // Or "Search" as placeholder
98a8e4e @jayj updated
authored
22 ?>
23
24 <div class="search">
25
035e9c5 @jayj Add search ARIA role to searchform.php
authored
26 <form method="get" class="search-form" action="<?php echo trailingslashit( home_url() ); ?>" role="search">
a8f1bf3 @jayj Guess this is 1.2
authored
27 <label>
d5b6def @jayj Make the Cakifo textdomain static due to changes in Hybrid Core
authored
28 <span class="assistive-text"><?php _e( 'Search', 'cakifo' ); ?></span>
0116328 @jayj Spacing clean ups
authored
29 <input class="search-text" type="search" name="s" <?php echo $value; ?> />
a8f1bf3 @jayj Guess this is 1.2
authored
30 </label>
d5b6def @jayj Make the Cakifo textdomain static due to changes in Hybrid Core
authored
31 <input class="search-submit" type="submit" value="<?php esc_attr_e( 'Search', 'cakifo' ); ?>" />
0116328 @jayj Spacing clean ups
authored
32 </form> <!-- .search-form -->
98a8e4e @jayj updated
authored
33
30f9e0d @jayj Code cleanup
authored
34 </div> <!-- .search -->
Something went wrong with that request. Please try again.