Changeset 43644
- Timestamp:
- 09/14/2018 01:47:01 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-login.php
r43595 r43644 12 12 require( dirname( __FILE__ ) . '/wp-load.php' ); 13 13 14 // Redirect to https login if forced to use SSL14 // Redirect to HTTPS login if forced to use SSL. 15 15 if ( force_ssl_admin() && ! is_ssl() ) { 16 16 if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) { … … 25 25 /** 26 26 * Output the login page header. 27 * 28 * @since 2.1.0 27 29 * 28 30 * @param string $title Optional. WordPress login Page title to display in the `<title>` element. … … 90 92 * Remove all stored post data on logging out. 91 93 * This could be added by add_action('login_head'...) like wp_shake_js(), 92 * but maybe better if it's not removable by plugins 94 * but maybe better if it's not removable by plugins. 93 95 */ 94 96 if ( 'loggedout' == $wp_error->get_error_code() ) { … … 203 205 } 204 206 205 // In case a plugin uses $error rather than the $wp_errors object 207 // In case a plugin uses $error rather than the $wp_errors object. 206 208 if ( ! empty( $error ) ) { 207 209 $wp_error->add( 'error', $error ); … … 248 250 * Outputs the footer for the login page. 249 251 * 250 * @param string $input_id Which input to auto-focus 252 * @since 3.1.0 253 * 254 * @param string $input_id Which input to auto-focus. 251 255 */ 252 256 function login_footer( $input_id = '' ) { … … 289 293 290 294 /** 295 * Outputs the Javascript to handle the form shaking. 296 * 291 297 * @since 3.0.0 292 298 */ … … 304 310 305 311 /** 312 * Outputs the viewport meta tag. 313 * 306 314 * @since 3.7.0 307 315 */ … … 314 322 /** 315 323 * Handles sending password retrieval email to user. 324 * 325 * @since 2.5.0 316 326 * 317 327 * @return bool|WP_Error True: when finish. WP_Error on error … … 418 428 419 429 // 420 // Main 430 // Main. 421 431 // 422 432 … … 428 438 } 429 439 430 // validate action so as to default to the login screen440 // Validate action so as to default to the login screen. 431 441 if ( ! in_array( $action, array( 'postpass', 'logout', 'lostpassword', 'retrievepassword', 'resetpass', 'rp', 'register', 'login', 'confirmaction' ), true ) && false === has_filter( 'login_form_' . $action ) ) { 432 442 $action = 'login'; … … 891 901 * redirects or exits first. 892 902 * 903 * @since 4.9.6 904 * 893 905 * @param int $request_id Request ID. 894 906 */ … … 909 921 } 910 922 911 // If the user wants ssl but the session is not ssl, force a secure cookie.923 // If the user wants SSL but the session is not SSL, force a secure cookie. 912 924 if ( ! empty( $_POST['log'] ) && ! force_ssl_admin() ) { 913 925 $user_name = sanitize_user( $_POST['log'] ); … … 928 940 if ( isset( $_REQUEST['redirect_to'] ) ) { 929 941 $redirect_to = $_REQUEST['redirect_to']; 930 // Redirect to https if user wants ssl942 // Redirect to HTTPS if user wants SSL. 931 943 if ( $secure_cookie && false !== strpos( $redirect_to, 'wp-admin' ) ) { 932 944 $redirect_to = preg_replace( '|^http://|', 'https://', $redirect_to ); … … 1023 1035 } 1024 1036 } else { 1025 // Some parts of this script use the main login form to display a message 1037 // Some parts of this script use the main login form to display a message. 1026 1038 if ( isset( $_GET['loggedout'] ) && true == $_GET['loggedout'] ) { 1027 1039 $errors->add( 'loggedout', __( 'You are now logged out.' ), 'message' ); … … 1173 1185 1174 1186 break; 1175 } // end action switch1187 } // End action switch.
Note: See TracChangeset
for help on using the changeset viewer.