Changeset 47156 for trunk/src/wp-includes/user.php
- Timestamp:
- 02/01/2020 09:36:44 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r47122 r47156 135 135 136 136 if ( empty( $username ) ) { 137 $error->add( 'empty_username', __( '<strong>E RROR</strong>: The username field is empty.' ) );137 $error->add( 'empty_username', __( '<strong>Error</strong>: The username field is empty.' ) ); 138 138 } 139 139 140 140 if ( empty( $password ) ) { 141 $error->add( 'empty_password', __( '<strong>E RROR</strong>: The password field is empty.' ) );141 $error->add( 'empty_password', __( '<strong>Error</strong>: The password field is empty.' ) ); 142 142 } 143 143 … … 173 173 sprintf( 174 174 /* translators: %s: User name. */ 175 __( '<strong>E RROR</strong>: The password you entered for the username %s is incorrect.' ),175 __( '<strong>Error</strong>: The password you entered for the username %s is incorrect.' ), 176 176 '<strong>' . $username . '</strong>' 177 177 ) . … … 210 210 if ( empty( $email ) ) { 211 211 // Uses 'empty_username' for back-compat with wp_signon(). 212 $error->add( 'empty_username', __( '<strong>E RROR</strong>: The email field is empty.' ) );212 $error->add( 'empty_username', __( '<strong>Error</strong>: The email field is empty.' ) ); 213 213 } 214 214 215 215 if ( empty( $password ) ) { 216 $error->add( 'empty_password', __( '<strong>E RROR</strong>: The password field is empty.' ) );216 $error->add( 'empty_password', __( '<strong>Error</strong>: The password field is empty.' ) ); 217 217 } 218 218 … … 245 245 sprintf( 246 246 /* translators: %s: Email address. */ 247 __( '<strong>E RROR</strong>: The password you entered for the email address %s is incorrect.' ),247 __( '<strong>Error</strong>: The password you entered for the email address %s is incorrect.' ), 248 248 '<strong>' . $email . '</strong>' 249 249 ) . … … 320 320 321 321 if ( $spammed ) { 322 return new WP_Error( 'spammer_account', __( '<strong>E RROR</strong>: Your account has been marked as a spammer.' ) );322 return new WP_Error( 'spammer_account', __( '<strong>Error</strong>: Your account has been marked as a spammer.' ) ); 323 323 } 324 324 } … … 2266 2266 2267 2267 if ( ! ( $user instanceof WP_User ) ) { 2268 return new WP_Error( 'invalidcombo', __( '<strong>E RROR</strong>: There is no account with that username or email address.' ) );2268 return new WP_Error( 'invalidcombo', __( '<strong>Error</strong>: There is no account with that username or email address.' ) ); 2269 2269 } 2270 2270 … … 2495 2495 // Check the username. 2496 2496 if ( $sanitized_user_login == '' ) { 2497 $errors->add( 'empty_username', __( '<strong>E RROR</strong>: Please enter a username.' ) );2497 $errors->add( 'empty_username', __( '<strong>Error</strong>: Please enter a username.' ) ); 2498 2498 } elseif ( ! validate_username( $user_login ) ) { 2499 $errors->add( 'invalid_username', __( '<strong>E RROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );2499 $errors->add( 'invalid_username', __( '<strong>Error</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) ); 2500 2500 $sanitized_user_login = ''; 2501 2501 } elseif ( username_exists( $sanitized_user_login ) ) { 2502 $errors->add( 'username_exists', __( '<strong>E RROR</strong>: This username is already registered. Please choose another one.' ) );2502 $errors->add( 'username_exists', __( '<strong>Error</strong>: This username is already registered. Please choose another one.' ) ); 2503 2503 2504 2504 } else { … … 2506 2506 $illegal_user_logins = (array) apply_filters( 'illegal_user_logins', array() ); 2507 2507 if ( in_array( strtolower( $sanitized_user_login ), array_map( 'strtolower', $illegal_user_logins ), true ) ) { 2508 $errors->add( 'invalid_username', __( '<strong>E RROR</strong>: Sorry, that username is not allowed.' ) );2508 $errors->add( 'invalid_username', __( '<strong>Error</strong>: Sorry, that username is not allowed.' ) ); 2509 2509 } 2510 2510 } … … 2512 2512 // Check the email address. 2513 2513 if ( $user_email == '' ) { 2514 $errors->add( 'empty_email', __( '<strong>E RROR</strong>: Please type your email address.' ) );2514 $errors->add( 'empty_email', __( '<strong>Error</strong>: Please type your email address.' ) ); 2515 2515 } elseif ( ! is_email( $user_email ) ) { 2516 $errors->add( 'invalid_email', __( '<strong>E RROR</strong>: The email address isn’t correct.' ) );2516 $errors->add( 'invalid_email', __( '<strong>Error</strong>: The email address isn’t correct.' ) ); 2517 2517 $user_email = ''; 2518 2518 } elseif ( email_exists( $user_email ) ) { 2519 $errors->add( 'email_exists', __( '<strong>E RROR</strong>: This email is already registered, please choose another one.' ) );2519 $errors->add( 'email_exists', __( '<strong>Error</strong>: This email is already registered, please choose another one.' ) ); 2520 2520 } 2521 2521 … … 2562 2562 sprintf( 2563 2563 /* translators: %s: Admin email address. */ 2564 __( '<strong>E RROR</strong>: Couldn’t register you… please contact the <a href="mailto:%s">webmaster</a> !' ),2564 __( '<strong>Error</strong>: Couldn’t register you… please contact the <a href="mailto:%s">webmaster</a> !' ), 2565 2565 get_option( 'admin_email' ) 2566 2566 ) … … 2797 2797 $errors->add( 2798 2798 'user_email', 2799 __( '<strong>E RROR</strong>: The email address isn’t correct.' ),2799 __( '<strong>Error</strong>: The email address isn’t correct.' ), 2800 2800 array( 2801 2801 'form-field' => 'email', … … 2809 2809 $errors->add( 2810 2810 'user_email', 2811 __( '<strong>E RROR</strong>: The email address is already used.' ),2811 __( '<strong>Error</strong>: The email address is already used.' ), 2812 2812 array( 2813 2813 'form-field' => 'email',
Note: See TracChangeset
for help on using the changeset viewer.