Make WordPress Core

Ticket #49523: 49523.2.diff

File 49523.2.diff, 1.7 KB (added by fahimmurshed, 5 years ago)

Patch. Please ignore another patch file.

  • src/wp-content/themes/twentytwenty/searchform.php

    diff --git a/src/wp-content/themes/twentytwenty/searchform.php b/src/wp-content/themes/twentytwenty/searchform.php
    index 027127b208..d78d08e727 100644
    a b  
    1515 * Generate a unique ID for each form and a string containing an aria-label
    1616 * if one was passed to get_search_form() in the args array.
    1717 */
    18 $unique_id = twentytwenty_unique_id( 'search-form-' );
     18$twentytwenty_unique_id = twentytwenty_unique_id( 'search-form' );
    1919
    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'] ) . '"' : '';
    2121?>
    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( '/' ) ); ?>">
     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( '/' ) ); ?>">
    2323        <label for="<?php echo esc_attr( $unique_id ); ?>">
    2424                <span class="screen-reader-text"><?php _e( 'Search for:', 'twentytwenty' ); // phpcs:ignore: WordPress.Security.EscapeOutput.UnsafePrintingFunction -- core trusts translations ?></span>
    2525                <input type="search" id="<?php echo esc_attr( $unique_id ); ?>" class="search-field" placeholder="<?php echo esc_attr_x( 'Search &hellip;', 'placeholder', 'twentytwenty' ); ?>" value="<?php echo get_search_query(); ?>" name="s" />