~canonical-sysadmins/wordpress/4.7.2

« back to all changes in this revision

Viewing changes to wp-content/themes/twentyseventeen/searchform.php

  • Committer: Haw Loeung
  • Date: 2016-12-13 06:56:21 UTC
  • mfrom: (1.1.20 upstream)
  • Revision ID: haw.loeung@canonical.com-20161213065621-8tcu7u7vlxgs2s81
Merge WP4.7 from upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * Template for displaying search forms in Twenty Seventeen
 
4
 *
 
5
 * @package WordPress
 
6
 * @subpackage Twenty_Seventeen
 
7
 * @since 1.0
 
8
 * @version 1.0
 
9
 */
 
10
?>
 
11
 
 
12
<?php $unique_id = esc_attr( uniqid( 'search-form-' ) ); ?>
 
13
 
 
14
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
 
15
        <label for="<?php echo $unique_id; ?>">
 
16
                <span class="screen-reader-text"><?php echo _x( 'Search for:', 'label', 'twentyseventeen' ); ?></span>
 
17
        </label>
 
18
        <input type="search" id="<?php echo $unique_id; ?>" class="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', 'twentyseventeen' ); ?>" value="<?php echo get_search_query(); ?>" name="s" />
 
19
        <button type="submit" class="search-submit"><?php echo twentyseventeen_get_svg( array( 'icon' => 'search' ) ); ?><span class="screen-reader-text"><?php echo _x( 'Search', 'submit button', 'twentyseventeen' ); ?></span></button>
 
20
</form>