Changeset 53458 for trunk/src/wp-includes/user.php
- Timestamp:
- 06/02/2022 03:03:39 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r53455 r53458 135 135 136 136 if ( empty( $username ) ) { 137 $error->add( 'empty_username', __( '<strong>Error </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>Error </strong>:The password field is empty.' ) );141 $error->add( 'empty_password', __( '<strong>Error:</strong> The password field is empty.' ) ); 142 142 } 143 143 … … 152 152 sprintf( 153 153 /* translators: %s: User name. */ 154 __( '<strong>Error </strong>:The username <strong>%s</strong> is not registered on this site. If you are unsure of your username, try your email address instead.' ),154 __( '<strong>Error:</strong> The username <strong>%s</strong> is not registered on this site. If you are unsure of your username, try your email address instead.' ), 155 155 $username 156 156 ) … … 177 177 sprintf( 178 178 /* translators: %s: User name. */ 179 __( '<strong>Error </strong>:The password you entered for the username %s is incorrect.' ),179 __( '<strong>Error:</strong> The password you entered for the username %s is incorrect.' ), 180 180 '<strong>' . $username . '</strong>' 181 181 ) . … … 214 214 if ( empty( $email ) ) { 215 215 // Uses 'empty_username' for back-compat with wp_signon(). 216 $error->add( 'empty_username', __( '<strong>Error </strong>:The email field is empty.' ) );216 $error->add( 'empty_username', __( '<strong>Error:</strong> The email field is empty.' ) ); 217 217 } 218 218 219 219 if ( empty( $password ) ) { 220 $error->add( 'empty_password', __( '<strong>Error </strong>:The password field is empty.' ) );220 $error->add( 'empty_password', __( '<strong>Error:</strong> The password field is empty.' ) ); 221 221 } 222 222 … … 249 249 sprintf( 250 250 /* translators: %s: Email address. */ 251 __( '<strong>Error </strong>:The password you entered for the email address %s is incorrect.' ),251 __( '<strong>Error:</strong> The password you entered for the email address %s is incorrect.' ), 252 252 '<strong>' . $email . '</strong>' 253 253 ) . … … 352 352 $error = new WP_Error( 353 353 'invalid_email', 354 __( '<strong>Error </strong>:Unknown email address. Check again or try your username.' )354 __( '<strong>Error:</strong> Unknown email address. Check again or try your username.' ) 355 355 ); 356 356 } else { 357 357 $error = new WP_Error( 358 358 'invalid_username', 359 __( '<strong>Error </strong>:Unknown username. Check again or try your email address.' )359 __( '<strong>Error:</strong> Unknown username. Check again or try your email address.' ) 360 360 ); 361 361 } … … 504 504 505 505 if ( $spammed ) { 506 return new WP_Error( 'spammer_account', __( '<strong>Error </strong>:Your account has been marked as a spammer.' ) );506 return new WP_Error( 'spammer_account', __( '<strong>Error:</strong> Your account has been marked as a spammer.' ) ); 507 507 } 508 508 } … … 2831 2831 2832 2832 if ( ! ( $user instanceof WP_User ) ) { 2833 return new WP_Error( 'invalidcombo', __( '<strong>Error </strong>:There is no account with that username or email address.' ) );2833 return new WP_Error( 'invalidcombo', __( '<strong>Error:</strong> There is no account with that username or email address.' ) ); 2834 2834 } 2835 2835 … … 3026 3026 3027 3027 if ( empty( $user_login ) ) { 3028 $errors->add( 'empty_username', __( '<strong>Error </strong>:Please enter a username or email address.' ) );3028 $errors->add( 'empty_username', __( '<strong>Error:</strong> Please enter a username or email address.' ) ); 3029 3029 } elseif ( strpos( $user_login, '@' ) ) { 3030 3030 $user_data = get_user_by( 'email', trim( wp_unslash( $user_login ) ) ); 3031 3031 if ( empty( $user_data ) ) { 3032 $errors->add( 'invalid_email', __( '<strong>Error </strong>:There is no account with that username or email address.' ) );3032 $errors->add( 'invalid_email', __( '<strong>Error:</strong> There is no account with that username or email address.' ) ); 3033 3033 } 3034 3034 } else { … … 3084 3084 3085 3085 if ( ! $user_data ) { 3086 $errors->add( 'invalidcombo', __( '<strong>Error </strong>:There is no account with that username or email address.' ) );3086 $errors->add( 'invalidcombo', __( '<strong>Error:</strong> There is no account with that username or email address.' ) ); 3087 3087 return $errors; 3088 3088 } … … 3232 3232 sprintf( 3233 3233 /* translators: %s: Documentation URL. */ 3234 __( '<strong>Error </strong>:The email could not be sent. Your site may not be correctly configured to send emails. <a href="%s">Get support for resetting your password</a>.' ),3234 __( '<strong>Error:</strong> The email could not be sent. Your site may not be correctly configured to send emails. <a href="%s">Get support for resetting your password</a>.' ), 3235 3235 esc_url( __( 'https://wordpress.org/support/article/resetting-your-password/' ) ) 3236 3236 ) … … 3299 3299 // Check the username. 3300 3300 if ( '' === $sanitized_user_login ) { 3301 $errors->add( 'empty_username', __( '<strong>Error </strong>:Please enter a username.' ) );3301 $errors->add( 'empty_username', __( '<strong>Error:</strong> Please enter a username.' ) ); 3302 3302 } elseif ( ! validate_username( $user_login ) ) { 3303 $errors->add( 'invalid_username', __( '<strong>Error </strong>:This username is invalid because it uses illegal characters. Please enter a valid username.' ) );3303 $errors->add( 'invalid_username', __( '<strong>Error:</strong> This username is invalid because it uses illegal characters. Please enter a valid username.' ) ); 3304 3304 $sanitized_user_login = ''; 3305 3305 } elseif ( username_exists( $sanitized_user_login ) ) { 3306 $errors->add( 'username_exists', __( '<strong>Error </strong>:This username is already registered. Please choose another one.' ) );3306 $errors->add( 'username_exists', __( '<strong>Error:</strong> This username is already registered. Please choose another one.' ) ); 3307 3307 3308 3308 } else { … … 3310 3310 $illegal_user_logins = (array) apply_filters( 'illegal_user_logins', array() ); 3311 3311 if ( in_array( strtolower( $sanitized_user_login ), array_map( 'strtolower', $illegal_user_logins ), true ) ) { 3312 $errors->add( 'invalid_username', __( '<strong>Error </strong>:Sorry, that username is not allowed.' ) );3312 $errors->add( 'invalid_username', __( '<strong>Error:</strong> Sorry, that username is not allowed.' ) ); 3313 3313 } 3314 3314 } … … 3316 3316 // Check the email address. 3317 3317 if ( '' === $user_email ) { 3318 $errors->add( 'empty_email', __( '<strong>Error </strong>:Please type your email address.' ) );3318 $errors->add( 'empty_email', __( '<strong>Error:</strong> Please type your email address.' ) ); 3319 3319 } elseif ( ! is_email( $user_email ) ) { 3320 $errors->add( 'invalid_email', __( '<strong>Error </strong>:The email address is not correct.' ) );3320 $errors->add( 'invalid_email', __( '<strong>Error:</strong> The email address is not correct.' ) ); 3321 3321 $user_email = ''; 3322 3322 } elseif ( email_exists( $user_email ) ) { … … 3373 3373 sprintf( 3374 3374 /* translators: %s: Admin email address. */ 3375 __( '<strong>Error </strong>:Could not register you… please contact the <a href="mailto:%s">site admin</a>!' ),3375 __( '<strong>Error:</strong> Could not register you… please contact the <a href="mailto:%s">site admin</a>!' ), 3376 3376 get_option( 'admin_email' ) 3377 3377 ) … … 3616 3616 $errors->add( 3617 3617 'user_email', 3618 __( '<strong>Error </strong>:The email address is not correct.' ),3618 __( '<strong>Error:</strong> The email address is not correct.' ), 3619 3619 array( 3620 3620 'form-field' => 'email', … … 3628 3628 $errors->add( 3629 3629 'user_email', 3630 __( '<strong>Error </strong>:The email address is already used.' ),3630 __( '<strong>Error:</strong> The email address is already used.' ), 3631 3631 array( 3632 3632 'form-field' => 'email',
Note: See TracChangeset
for help on using the changeset viewer.