-
Notifications
You must be signed in to change notification settings - Fork 0
/
searchform.php
27 lines (22 loc) · 1.05 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
<?php
/**
* The template for displaying search forms.
*
* @package HavocWP WordPress theme
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Post type.
$search_post_type = get_theme_mod( 'havoc_menu_search_source', 'any' );
// Generate unique form ID.
$havoc_sf_id = havocwp_unique_id( 'havoc-search-form-' );
?>
<form aria-label="<?php echo esc_attr( havocwp_theme_strings( 'hvc-string-search-form-label', false ) ); ?>" role="search" method="get" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<input aria-label="<?php echo esc_attr( havocwp_theme_strings( 'hvc-string-search-field', false ) ); ?>" type="search" id="<?php echo esc_attr( $havoc_sf_id ); ?>" class="field" autocomplete="off" placeholder="<?php echo esc_attr( havocwp_theme_strings( 'hvc-string-search-text', false ) ); ?>" name="s">
<?php if ( 'any' !== $search_post_type ) { ?>
<input type="hidden" name="post_type" value="<?php echo esc_attr( $search_post_type ); ?>">
<?php } ?>
<?php do_action( 'wpml_add_language_form_field' ); ?>
</form>