Changeset 48304 for trunk/src/wp-login.php
- Timestamp:
- 07/04/2020 09:56:54 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-login.php
r48303 r48304 493 493 } 494 494 495 if ( isset( $_GET['checkemail'] ) ) { 496 $action = 'checkemail'; 497 } 498 495 499 $default_actions = array( 496 500 'confirm_admin_email', … … 502 506 'rp', 503 507 'register', 508 'checkemail', 504 509 'login', 505 510 'confirmaction', … … 1129 1134 1130 1135 login_footer( 'user_login' ); 1136 break; 1137 1138 case 'checkemail': 1139 $redirect_to = admin_url(); 1140 $errors = new WP_Error(); 1141 1142 if ( 'confirm' === $_GET['checkemail'] ) { 1143 $errors->add( 1144 'confirm', 1145 sprintf( 1146 /* translators: %s: Link to the login page. */ 1147 __( 'Check your email for the confirmation link, then visit the <a href="%s">login page</a>.' ), 1148 wp_login_url() 1149 ), 1150 'message' 1151 ); 1152 } elseif ( 'registered' === $_GET['checkemail'] ) { 1153 $errors->add( 1154 'registered', 1155 sprintf( 1156 /* translators: %s: Link to the login page. */ 1157 __( 'Registration complete. Please check your email, then visit the <a href="%s">login page</a>.' ), 1158 wp_login_url() 1159 ), 1160 'message' 1161 ); 1162 } 1163 1164 /** This action is documented in wp-login.php */ 1165 $errors = apply_filters( 'wp_login_errors', $errors, $redirect_to ); 1166 1167 login_header( __( 'Log In' ), '', $errors ); 1168 login_footer(); 1131 1169 break; 1132 1170 … … 1329 1367 } elseif ( isset( $_GET['registration'] ) && 'disabled' === $_GET['registration'] ) { 1330 1368 $errors->add( 'registerdisabled', __( 'User registration is currently not allowed.' ) ); 1331 } elseif ( isset( $_GET['checkemail'] ) && 'confirm' === $_GET['checkemail'] ) {1332 $errors->add( 'confirm', __( 'Check your email for the confirmation link.' ), 'message' );1333 } elseif ( isset( $_GET['checkemail'] ) && 'registered' === $_GET['checkemail'] ) {1334 $errors->add( 'registered', __( 'Registration complete. Please check your email.' ), 'message' );1335 1369 } elseif ( strpos( $redirect_to, 'about.php?updated' ) ) { 1336 1370 $errors->add( 'updated', __( '<strong>You have successfully updated WordPress!</strong> Please log back in to see what’s new.' ), 'message' ); … … 1430 1464 <?php 1431 1465 1432 if ( ! isset( $_GET['checkemail'] ) || 'confirm' !== $_GET['checkemail'] ) { 1433 if ( get_option( 'users_can_register' ) ) { 1434 $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ); 1435 1436 /** This filter is documented in wp-includes/general-template.php */ 1437 echo apply_filters( 'register', $registration_url ); 1438 1439 echo esc_html( $login_link_separator ); 1440 } 1441 1442 ?> 1443 <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a> 1444 <?php 1466 if ( get_option( 'users_can_register' ) ) { 1467 $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ); 1468 1469 /** This filter is documented in wp-includes/general-template.php */ 1470 echo apply_filters( 'register', $registration_url ); 1471 1472 echo esc_html( $login_link_separator ); 1445 1473 } 1446 1474 1447 1475 ?> 1476 <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>"><?php _e( 'Lost your password?' ); ?></a> 1448 1477 </p> 1449 1478 <?php
Note: See TracChangeset
for help on using the changeset viewer.