forked from mirror/_s
_s: Update search form markup to make it forward compatible with HTML5
search form in 3.6. As a result, `searchfornm.php` can be safely removed in the future. Also fixes #240.
This commit is contained in:
parent
a514017986
commit
6e22132768
|
@ -5,8 +5,10 @@
|
|||
* @package _s
|
||||
*/
|
||||
?>
|
||||
<form method="get" id="searchform" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search">
|
||||
<label for="s" class="screen-reader-text"><?php _ex( 'Search', 'assistive text', '_s' ); ?></label>
|
||||
<input type="search" class="field" name="s" value="<?php echo esc_attr( get_search_query() ); ?>" id="s" placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder', '_s' ); ?>" />
|
||||
<input type="submit" class="submit" id="searchsubmit" value="<?php echo esc_attr_x( 'Search', 'submit button', '_s' ); ?>" />
|
||||
</form>
|
||||
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||
<label>
|
||||
<span class="screen-reader-text"><?php _ex( 'Search for:', 'label', '_s' ); ?></span>
|
||||
<input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder', '_s' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" title="<?php _ex( 'Search for:', 'label', '_s' ); ?>" />
|
||||
</label>
|
||||
<input type="submit" class="search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', '_s' ); ?>'" />
|
||||
</form>
|
||||
|
|
Reference in New Issue