Restore the for/id attributes in the post password for as they are necessary for accessibility tools. Fixes #18729.
Built from https://develop.svn.wordpress.org/trunk@25011 git-svn-id: http://core.svn.wordpress.org/trunk@25005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
09ddd48b07
commit
11f6b487b9
|
@ -1232,9 +1232,10 @@ function prepend_attachment($content) {
|
|||
*/
|
||||
function get_the_password_form( $post = 0 ) {
|
||||
$post = get_post( $post );
|
||||
$label = 'pwbox-' . ( empty($post->ID) ? rand() : $post->ID );
|
||||
$output = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" class="post-password-form" method="post">
|
||||
<p>' . __( 'This post is password protected. To view it please enter your password below:' ) . '</p>
|
||||
<p><label>' . __( 'Password:' ) . ' <input name="post_password" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr__( 'Submit' ) . '" /></p>
|
||||
<p><label for="' . $label . '">' . __( 'Password:' ) . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . esc_attr__( 'Submit' ) . '" /></p>
|
||||
</form>
|
||||
';
|
||||
return apply_filters( 'the_password_form', $output );
|
||||
|
|
Loading…
Reference in New Issue