Edit File by line
/home/barbar84/public_h.../wp-conte.../themes/twentytw...
File: searchform.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* The searchform.php template.
[2] Fix | Delete
*
[3] Fix | Delete
* Used any time that get_search_form() is called.
[4] Fix | Delete
*
[5] Fix | Delete
* @link https://developer.wordpress.org/reference/functions/wp_unique_id/
[6] Fix | Delete
* @link https://developer.wordpress.org/reference/functions/get_search_form/
[7] Fix | Delete
*
[8] Fix | Delete
* @package WordPress
[9] Fix | Delete
* @subpackage Twenty_Twenty_One
[10] Fix | Delete
* @since Twenty Twenty-One 1.0
[11] Fix | Delete
*/
[12] Fix | Delete
[13] Fix | Delete
/*
[14] Fix | Delete
* Generate a unique ID for each form and a string containing an aria-label
[15] Fix | Delete
* if one was passed to get_search_form() in the args array.
[16] Fix | Delete
*/
[17] Fix | Delete
$twentytwentyone_unique_id = wp_unique_id( 'search-form-' );
[18] Fix | Delete
[19] Fix | Delete
$twentytwentyone_aria_label = ! empty( $args['aria_label'] ) ? 'aria-label="' . esc_attr( $args['aria_label'] ) . '"' : '';
[20] Fix | Delete
?>
[21] Fix | Delete
<form role="search" <?php echo $twentytwentyone_aria_label; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped above. ?> method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
[22] Fix | Delete
<label for="<?php echo esc_attr( $twentytwentyone_unique_id ); ?>"><?php _e( 'Search&hellip;', 'twentytwentyone' ); // phpcs:ignore: WordPress.Security.EscapeOutput.UnsafePrintingFunction -- core trusts translations ?></label>
[23] Fix | Delete
<input type="search" id="<?php echo esc_attr( $twentytwentyone_unique_id ); ?>" class="search-field" value="<?php echo get_search_query(); ?>" name="s" />
[24] Fix | Delete
<input type="submit" class="search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'twentytwentyone' ); ?>" />
[25] Fix | Delete
</form>
[26] Fix | Delete
[27] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function