Make WordPress Core

Ticket #13165: 13165.patch

File 13165.patch, 1.3 KB (added by xibe, 14 years ago)

Using $_POSTrememberme?.

  • wp-login.php

     
    572572
    573573        if ( isset($_POST['log']) )
    574574                $user_login = ( 'incorrect_password' == $errors->get_error_code() || 'empty_password' == $errors->get_error_code() ) ? esc_attr(stripslashes($_POST['log'])) : '';
     575        if ( isset($_POST['rememberme']) && 'forever' == $_POST['rememberme'] )
     576                $rememberme = true;
    575577?>
    576578
    577579<form name="loginform" id="loginform" action="<?php echo site_url('wp-login.php', 'login_post') ?>" method="post">
     
    584586                <input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" /></label>
    585587        </p>
    586588<?php do_action('login_form'); ?>
    587         <p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" /> <?php esc_attr_e('Remember Me'); ?></label></p>
     589        <p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" <?php echo ( $rememberme ) ? 'checked="checked"' : ''; ?> value="forever" tabindex="90" /> <?php esc_attr_e('Remember Me'); ?></label></p>
    588590        <p class="submit">
    589591                <input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Log In'); ?>" tabindex="100" />
    590592<?php   if ( $interim_login ) { ?>