-
Notifications
You must be signed in to change notification settings - Fork 69
/
Copy pathsearchform.php
47 lines (46 loc) · 1.63 KB
/
searchform.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* Search Form Template
*
* @file searchform.php
* @package Responsive
* @author CyberChimps
* @copyright 2020 CyberChimps
* @license license.txt
* @version Release: 1.0
* @filesource wp-content/themes/responsive/searchform.php
* @link http://codex.wordpress.org/Function_Reference/get_search_form
* @since available since Release 1.0
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$search_icon = get_theme_mod( 'responsive_menu_last_item', 'none' );
$search_screen = get_theme_mod( 'search_style', 'search' );
if ( 'search' === $search_icon && 'full-screen' === $search_screen ) {
?>
<div class="full-screen-search-wrapper" id="full-screen-search-wrapper">
<span id="search-close" class="search-close"></span>
<div class="full-screen-search-container">
<div class="container">
<?php
}
?>
<form method="get" id="searchform" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<label class="screen-reader-text" for="s"><?php esc_html_e( 'Search for:', 'responsive' ); ?></label>
<div class="res-search-wrapper">
<input type="search" class="field" name="s" id="s" placeholder="<?php esc_attr_e( 'Search here …', 'responsive' ); ?>" />
<button type="submit" class="search-submit" value="Search"> <span class="res-search-icon icon-search"></span></button>
</div>
</form>
<?php
$search_icon = get_theme_mod( 'responsive_menu_last_item', 'none' );
$search_screen = get_theme_mod( 'search_style', 'search' );
if ( 'search' === $search_icon && 'full-screen' === $search_screen ) {
?>
</div>
</div>
</div>
<?php
}