Ticket #49523: 49523.3.diff
| File 49523.3.diff, 2.1 KB (added by , 6 years ago) |
|---|
-
src/wp-content/themes/twentytwenty/searchform.php
15 15 * Generate a unique ID for each form and a string containing an aria-label 16 16 * if one was passed to get_search_form() in the args array. 17 17 */ 18 $ unique_id = twentytwenty_unique_id( 'search-form-' );18 $twentytwenty_unique_id = twentytwenty_unique_id( 'search-form-' ); 19 19 20 $ aria_label = ! empty( $args['label'] ) ? 'aria-label="' . esc_attr( $args['label'] ) . '"' : '';20 $twentytwenty_aria_label = ! empty( $args['label'] ) ? 'aria-label="' . esc_attr( $args['label'] ) . '"' : ''; 21 21 ?> 22 <form role="search" <?php echo $ aria_label; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped above. ?> method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">23 <label for="<?php echo esc_attr( $ unique_id ); ?>">22 <form role="search" <?php echo $twentytwenty_aria_label; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped above. ?> method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>"> 23 <label for="<?php echo esc_attr( $twentytwenty_unique_id ); ?>"> 24 24 <span class="screen-reader-text"><?php _e( 'Search for:', 'twentytwenty' ); // phpcs:ignore: WordPress.Security.EscapeOutput.UnsafePrintingFunction -- core trusts translations ?></span> 25 <input type="search" id="<?php echo esc_attr( $ unique_id ); ?>" class="search-field" placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder', 'twentytwenty' ); ?>" value="<?php echo get_search_query(); ?>" name="s" />25 <input type="search" id="<?php echo esc_attr( $twentytwenty_unique_id ); ?>" class="search-field" placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder', 'twentytwenty' ); ?>" value="<?php echo get_search_query(); ?>" name="s" /> 26 26 </label> 27 27 <input type="submit" class="search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'twentytwenty' ); ?>" /> 28 28 </form>
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)