Changeset 24179 for trunk/wp-login.php
- Timestamp:
- 05/06/2013 09:35:50 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-login.php
r24053 r24179 49 49 50 50 // Shake it! 51 $shake_error_codes = array( ' interim_login_error', 'empty_password', 'empty_email', 'invalid_email', 'invalidcombo', 'empty_username', 'invalid_username', 'incorrect_password' );51 $shake_error_codes = array( 'empty_password', 'empty_email', 'invalid_email', 'invalidcombo', 'empty_username', 'invalid_username', 'incorrect_password' ); 52 52 $shake_error_codes = apply_filters( 'shake_error_codes', $shake_error_codes ); 53 53 … … 98 98 $classes[] = 'rtl'; 99 99 if ( $interim_login ) { 100 // Don't allow interim logins to navigate away from the page.101 $login_header_url = '#';102 100 $classes[] = 'interim-login'; 103 101 ?> 104 102 <style type="text/css">html{background-color: transparent;}</style> 103 <base target="_blank"> 105 104 <?php 106 105 … … 405 404 406 405 $http_post = ('POST' == $_SERVER['REQUEST_METHOD']); 406 $interim_login = isset($_REQUEST['interim-login']); 407 407 408 switch ($action) { 408 409 … … 591 592 default: 592 593 $secure_cookie = ''; 593 $interim_login = isset($_REQUEST['interim-login']);594 594 $customize_login = isset( $_REQUEST['customize-login'] ); 595 595 if ( $customize_login ) … … 664 664 $errors->add('test_cookie', __("<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress.")); 665 665 666 // Clear most errors if interim login666 $form_target = ''; 667 667 if ( $interim_login ) { 668 $error_code = $errors->get_error_code(); 669 $errors = new WP_Error(); 670 671 if ( $error_code ) { 672 if ( in_array( $error_code, array( 'empty_password', 'empty_username', 'invalid_username', 'incorrect_password' ) ) ) 673 $errors->add('interim_login_error', __('<strong>ERROR</strong>: Invalid username or password.')); 674 else 675 $errors->add('interim_login_error_other', sprintf( __( '<strong>ERROR</strong>: Please contact the site administrator or try to <a href="%s" target="_blank">log in from a new window</a>.' ), wp_login_url() ) ); 676 } else { 668 $form_target = ' target="_self"'; 669 if ( ! $errors->get_error_code() ) 677 670 $errors->add('expired', __('Session expired. Please log in again. You will not move away from this page.'), 'message'); 678 }679 671 } else { 680 672 // Some parts of this script use the main login form to display a message … … 693 685 } 694 686 687 $errors = apply_filters( 'wp_login_errors', $errors, $redirect_to ); 688 695 689 // Clear any stale cookies. 696 690 if ( $reauth ) … … 704 698 ?> 705 699 706 <form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post" >700 <form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post"<?php echo $form_target; ?>> 707 701 <p> 708 702 <label for="user_login"><?php _e('Username') ?><br />
Note: See TracChangeset
for help on using the changeset viewer.