lightspeeddevelopment /
lsx
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * The template for displaying search forms in LSX. |
||
| 4 | * |
||
| 5 | * @package lsx |
||
| 6 | */ |
||
| 7 | |||
| 8 | $style = 'body #searchform { display: block; }'; |
||
| 9 | |||
| 10 | if ( is_customize_preview() ) { |
||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 11 | $search_form = get_theme_mod( 'lsx_header_search', false ); |
||
| 12 | |||
| 13 | if ( false === $search_form ) { |
||
|
0 ignored issues
–
show
|
|||
| 14 | $style = 'body #searchform { display: none; }'; |
||
| 15 | } |
||
| 16 | } |
||
| 17 | ?> |
||
| 18 | |||
| 19 | <form role="search" method="get" class="search-form form-inline" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>"> |
||
| 20 | <div class="input-group"> |
||
| 21 | <input type="search" value="<?php if ( is_search() ) { echo get_search_query(); } ?>" name="s" class="search-field form-control" placeholder="<?php esc_attr_e( 'Search', 'lsx' ); ?> <?php echo esc_attr( get_bloginfo( 'name' ) ); ?>"> |
||
|
0 ignored issues
–
show
|
|||
| 22 | <label class="hide"><?php esc_html_e( 'Search for:', 'lsx' ); ?></label> |
||
| 23 | |||
| 24 | <span class="input-group-btn"> |
||
| 25 | <button type="submit" class="search-submit btn btn-default"><span class="fa fa-search"></span></button> |
||
| 26 | </span> |
||
| 27 | </div> |
||
| 28 | |||
| 29 | <?php if ( is_customize_preview() ) : ?> |
||
|
0 ignored issues
–
show
|
|||
| 30 | <style id="lsx-header-search-css"> |
||
| 31 | <?php echo esc_attr( $style ); ?> |
||
| 32 | </style> |
||
| 33 | <?php endif; ?> |
||
| 34 | </form> |
||
| 35 |