Keep 'remember me' checked when user/pass is incorrect. props xibe, fixes #13165.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-04-28 17:01:55 +00:00
parent 33916fd71d
commit 36876023a4
1 changed files with 2 additions and 1 deletions

View File

@ -572,6 +572,7 @@ default:
if ( isset($_POST['log']) ) if ( isset($_POST['log']) )
$user_login = ( 'incorrect_password' == $errors->get_error_code() || 'empty_password' == $errors->get_error_code() ) ? esc_attr(stripslashes($_POST['log'])) : ''; $user_login = ( 'incorrect_password' == $errors->get_error_code() || 'empty_password' == $errors->get_error_code() ) ? esc_attr(stripslashes($_POST['log'])) : '';
$rememberme = ! empty( $_POST['rememberme'] );
?> ?>
<form name="loginform" id="loginform" action="<?php echo site_url('wp-login.php', 'login_post') ?>" method="post"> <form name="loginform" id="loginform" action="<?php echo site_url('wp-login.php', 'login_post') ?>" method="post">
@ -584,7 +585,7 @@ default:
<input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" /></label> <input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" /></label>
</p> </p>
<?php do_action('login_form'); ?> <?php do_action('login_form'); ?>
<p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" /> <?php esc_attr_e('Remember Me'); ?></label></p> <p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90"<?php checked( $rememberme ); ?> /> <?php esc_attr_e('Remember Me'); ?></label></p>
<p class="submit"> <p class="submit">
<input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Log In'); ?>" tabindex="100" /> <input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Log In'); ?>" tabindex="100" />
<?php if ( $interim_login ) { ?> <?php if ( $interim_login ) { ?>