Make WordPress Core

Changeset 23504


Ignore:
Timestamp:
02/28/2013 08:57:17 AM (13 years ago)
Author:
azaozz
Message:

Improved logged out warnings, first run, props mintindeed, see #23295

Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/wp-admin.css

    r23501 r23504  
    67866786}
    67876787
     6788.interim-login #login {
     6789    padding: 0;
     6790    width: 300px;
     6791}
     6792
     6793.interim-login.login h1 a {
     6794    width: auto;
     6795}
     6796
     6797.interim-login #login_error,
     6798.interim-login.login .message {
     6799    margin: 0 0 16px;
     6800}
     6801
     6802.interim-login.login form {
     6803    margin: 0;
     6804}
    67886805
    67896806/* ms */
  • trunk/wp-includes/default-filters.php

    r23450 r23504  
    295295add_filter( 'heartbeat_settings', 'wp_heartbeat_settings' );
    296296
     297// Check if the user is logged out
     298add_action( 'admin_init', 'wp_auth_check_load' );
     299
    297300unset($filter, $action);
  • trunk/wp-includes/functions.php

    r23434 r23504  
    38853885    return apply_filters( 'wp_checkdate', checkdate( $month, $day, $year ), $source_date );
    38863886}
     3887
     3888/**
     3889 * Load the auth check, for monitoring whether the user is still logged in
     3890 *
     3891 * @since 3.6.0
     3892 *
     3893 * @return void
     3894 */
     3895function wp_auth_check_load() {
     3896    if ( ! class_exists('WP_Auth_Check') ) {
     3897        require( ABSPATH . WPINC . '/class-wp-auth-check.php' );
     3898        WP_Auth_Check::get_instance();
     3899    }
     3900}
  • trunk/wp-login.php

    r23416 r23504  
    5252    $shake_error_codes = apply_filters( 'shake_error_codes', $shake_error_codes );
    5353
    54     if ( $shake_error_codes && $wp_error->get_error_code() && in_array( $wp_error->get_error_code(), $shake_error_codes ) )
     54    if ( ! $interim_login && $shake_error_codes && $wp_error->get_error_code() && in_array( $wp_error->get_error_code(), $shake_error_codes ) )
    5555        add_action( 'login_head', 'wp_shake_js', 12 );
    5656
     
    8383    $login_header_title = apply_filters( 'login_headertitle', $login_header_title );
    8484
    85     // Don't allow interim logins to navigate away from the page.
    86     if ( $interim_login )
    87         $login_header_url = '#';
    88 
    8985    $classes = array( 'login-action-' . $action, 'wp-core-ui' );
    9086    if ( wp_is_mobile() )
     
    9288    if ( is_rtl() )
    9389        $classes[] = 'rtl';
     90    if ( $interim_login ) {
     91        // Don't allow interim logins to navigate away from the page.
     92        $login_header_url = '#';
     93        $classes[] = 'interim-login';
     94    }
     95
    9496    $classes = apply_filters( 'login_body_class', $classes, $action );
     97
    9598    ?>
    9699    </head>
     
    614617            $message = '<p class="message">' . __('You have logged in successfully.') . '</p>';
    615618            login_header( '', $message ); ?>
    616 
    617             <?php if ( ! $customize_login ) : ?>
    618             <script type="text/javascript">setTimeout( function(){window.close()}, 8000);</script>
    619             <p class="alignright">
    620             <input type="button" class="button-primary" value="<?php esc_attr_e('Close'); ?>" onclick="window.close()" /></p>
    621             <?php endif; ?>
    622619            </div>
    623620            <?php do_action( 'login_footer' ); ?>
     
    663660        $errors->add('registered', __('Registration complete. Please check your e-mail.'), 'message');
    664661    elseif  ( $interim_login )
    665         $errors->add('expired', __('Your session has expired. Please log-in again.'), 'message');
     662        $errors->add('expired', __('Please log-in again. You will not move away from this page.'), 'message');
    666663    elseif ( strpos( $redirect_to, 'about.php?updated' ) )
    667664        $errors->add('updated', __( '<strong>You have successfully updated WordPress!</strong> Please log back in to experience the awesomeness.' ), 'message' );
Note: See TracChangeset for help on using the changeset viewer.