Changeset 48115 for trunk/src/wp-includes/user.php
- Timestamp:
- 06/21/2020 01:58:46 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r48107 r48115 135 135 136 136 if ( empty( $username ) ) { 137 $error->add( 'empty_username', __( ' 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', __( ' 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 __( ' 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', __( ' 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', __( ' 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 __( ' 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', __( ' 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 } … … 2284 2284 2285 2285 if ( ! ( $user instanceof WP_User ) ) { 2286 return new WP_Error( 'invalidcombo', __( ' There is no account with that username or email address.' ) );2286 return new WP_Error( 'invalidcombo', __( '<strong>Error</strong>: There is no account with that username or email address.' ) ); 2287 2287 } 2288 2288 … … 2513 2513 // Check the username. 2514 2514 if ( '' === $sanitized_user_login ) { 2515 $errors->add( 'empty_username', __( ' Please enter a username.' ) );2515 $errors->add( 'empty_username', __( '<strong>Error</strong>: Please enter a username.' ) ); 2516 2516 } elseif ( ! validate_username( $user_login ) ) { 2517 $errors->add( 'invalid_username', __( ' This username is invalid because it uses illegal characters. Please enter a valid username.' ) );2517 $errors->add( 'invalid_username', __( '<strong>Error</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) ); 2518 2518 $sanitized_user_login = ''; 2519 2519 } elseif ( username_exists( $sanitized_user_login ) ) { 2520 $errors->add( 'username_exists', __( ' This username is already registered. Please choose another one.' ) );2520 $errors->add( 'username_exists', __( '<strong>Error</strong>: This username is already registered. Please choose another one.' ) ); 2521 2521 2522 2522 } else { … … 2524 2524 $illegal_user_logins = (array) apply_filters( 'illegal_user_logins', array() ); 2525 2525 if ( in_array( strtolower( $sanitized_user_login ), array_map( 'strtolower', $illegal_user_logins ), true ) ) { 2526 $errors->add( 'invalid_username', __( ' Sorry, that username is not allowed.' ) );2526 $errors->add( 'invalid_username', __( '<strong>Error</strong>: Sorry, that username is not allowed.' ) ); 2527 2527 } 2528 2528 } … … 2530 2530 // Check the email address. 2531 2531 if ( '' === $user_email ) { 2532 $errors->add( 'empty_email', __( ' Please type your email address.' ) );2532 $errors->add( 'empty_email', __( '<strong>Error</strong>: Please type your email address.' ) ); 2533 2533 } elseif ( ! is_email( $user_email ) ) { 2534 $errors->add( 'invalid_email', __( ' The email address isn’t correct.' ) );2534 $errors->add( 'invalid_email', __( '<strong>Error</strong>: The email address isn’t correct.' ) ); 2535 2535 $user_email = ''; 2536 2536 } elseif ( email_exists( $user_email ) ) { 2537 $errors->add( 'email_exists', __( ' This email is already registered. Please choose another one.' ) );2537 $errors->add( 'email_exists', __( '<strong>Error</strong>: This email is already registered. Please choose another one.' ) ); 2538 2538 } 2539 2539 … … 2580 2580 sprintf( 2581 2581 /* translators: %s: Admin email address. */ 2582 __( ' Couldn’t register you… please contact the <a href="mailto:%s">site admin</a>!' ),2582 __( '<strong>Error</strong>: Couldn’t register you… please contact the <a href="mailto:%s">site admin</a>!' ), 2583 2583 get_option( 'admin_email' ) 2584 2584 ) … … 2816 2816 $errors->add( 2817 2817 'user_email', 2818 __( ' The email address isn’t correct.' ),2818 __( '<strong>Error</strong>: The email address isn’t correct.' ), 2819 2819 array( 2820 2820 'form-field' => 'email', … … 2828 2828 $errors->add( 2829 2829 'user_email', 2830 __( ' The email address is already used.' ),2830 __( '<strong>Error</strong>: The email address is already used.' ), 2831 2831 array( 2832 2832 'form-field' => 'email',
Note: See TracChangeset
for help on using the changeset viewer.