Skip to content

Commit adc6211

Browse files
committed
Twenty Twenty-One: Disable spellcheck for post password field.
This changeset adds `spellcheck="false"` attribute to various password fields. Follow-up to [55094]. Props dziudek, audrasjb, gainesm, fosuahmed. See #56763. git-svn-id: https://develop.svn.wordpress.org/trunk@55095 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 2b831ff commit adc6211

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-content/themes/twentytwentyone/inc/template-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ function twenty_twenty_one_password_form( $output, $post = 0 ) {
421421
$label = 'pwbox-' . ( empty( $post->ID ) ? wp_rand() : $post->ID );
422422
$output = '<p class="post-password-message">' . esc_html__( 'This content is password protected. Please enter a password to view.', 'twentytwentyone' ) . '</p>
423423
<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" class="post-password-form" method="post">
424-
<label class="post-password-form__label" for="' . esc_attr( $label ) . '">' . esc_html_x( 'Password', 'Post password form', 'twentytwentyone' ) . '</label><input class="post-password-form__input" name="post_password" id="' . esc_attr( $label ) . '" type="password" size="20" /><input type="submit" class="post-password-form__submit" name="' . esc_attr_x( 'Submit', 'Post password form', 'twentytwentyone' ) . '" value="' . esc_attr_x( 'Enter', 'Post password form', 'twentytwentyone' ) . '" /></form>
424+
<label class="post-password-form__label" for="' . esc_attr( $label ) . '">' . esc_html_x( 'Password', 'Post password form', 'twentytwentyone' ) . '</label><input class="post-password-form__input" name="post_password" id="' . esc_attr( $label ) . '" type="password" spellcheck="false" size="20" /><input type="submit" class="post-password-form__submit" name="' . esc_attr_x( 'Submit', 'Post password form', 'twentytwentyone' ) . '" value="' . esc_attr_x( 'Enter', 'Post password form', 'twentytwentyone' ) . '" /></form>
425425
';
426426
return $output;
427427
}

0 commit comments

Comments
 (0)