Add unique 'for' attribute to labels for post password forms. Props Nazgul. fixes #4721
git-svn-id: https://develop.svn.wordpress.org/trunk@6698 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d8b614bfc7
commit
36dffb5d2d
@ -482,9 +482,11 @@ function prepend_attachment($content) {
|
||||
//
|
||||
|
||||
function get_the_password_form() {
|
||||
global $post;
|
||||
$label = 'pwbox-'.(empty($post->ID) ? rand() : $post->ID);
|
||||
$output = '<form action="' . get_option('siteurl') . '/wp-pass.php" 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="' . __("Submit") . '" /></p>
|
||||
<p><label for="' . $label . '">' . __("Password:") . ' <input name="post_password" id="' . $label . '" type="password" size="20" /></label> <input type="submit" name="Submit" value="' . __("Submit") . '" /></p>
|
||||
</form>
|
||||
';
|
||||
return $output;
|
||||
|
Loading…
Reference in New Issue
Block a user