Changeset 53458
- Timestamp:
- 06/02/2022 03:03:39 PM (2 years ago)
- Location:
- trunk/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r53426 r53458 2303 2303 2304 2304 if ( $error ) { 2305 $error_string = __( '<strong>Error </strong>:Could not connect to the server. Please verify the settings are correct.' );2305 $error_string = __( '<strong>Error:</strong> Could not connect to the server. Please verify the settings are correct.' ); 2306 2306 if ( is_wp_error( $error ) ) { 2307 2307 $error_string = esc_html( $error->get_error_message() ); -
trunk/src/wp-admin/includes/user.php
r53455 r53458 144 144 /* checking that username has been typed */ 145 145 if ( '' === $user->user_login ) { 146 $errors->add( 'user_login', __( '<strong>Error </strong>:Please enter a username.' ) );146 $errors->add( 'user_login', __( '<strong>Error:</strong> Please enter a username.' ) ); 147 147 } 148 148 149 149 /* checking that nickname has been typed */ 150 150 if ( $update && empty( $user->nickname ) ) { 151 $errors->add( 'nickname', __( '<strong>Error </strong>:Please enter a nickname.' ) );151 $errors->add( 'nickname', __( '<strong>Error:</strong> Please enter a nickname.' ) ); 152 152 } 153 153 … … 165 165 // Check for blank password when adding a user. 166 166 if ( ! $update && empty( $pass1 ) ) { 167 $errors->add( 'pass', __( '<strong>Error </strong>:Please enter a password.' ), array( 'form-field' => 'pass1' ) );167 $errors->add( 'pass', __( '<strong>Error:</strong> Please enter a password.' ), array( 'form-field' => 'pass1' ) ); 168 168 } 169 169 170 170 // Check for "\" in password. 171 171 if ( false !== strpos( wp_unslash( $pass1 ), '\\' ) ) { 172 $errors->add( 'pass', __( '<strong>Error </strong>:Passwords may not contain the character "\\".' ), array( 'form-field' => 'pass1' ) );172 $errors->add( 'pass', __( '<strong>Error:</strong> Passwords may not contain the character "\\".' ), array( 'form-field' => 'pass1' ) ); 173 173 } 174 174 175 175 // Checking the password has been typed twice the same. 176 176 if ( ( $update || ! empty( $pass1 ) ) && $pass1 != $pass2 ) { 177 $errors->add( 'pass', __( '<strong>Error </strong>:Passwords do not match. Please enter the same password in both password fields.' ), array( 'form-field' => 'pass1' ) );177 $errors->add( 'pass', __( '<strong>Error:</strong> Passwords do not match. Please enter the same password in both password fields.' ), array( 'form-field' => 'pass1' ) ); 178 178 } 179 179 … … 183 183 184 184 if ( ! $update && isset( $_POST['user_login'] ) && ! validate_username( $_POST['user_login'] ) ) { 185 $errors->add( 'user_login', __( '<strong>Error </strong>:This username is invalid because it uses illegal characters. Please enter a valid username.' ) );185 $errors->add( 'user_login', __( '<strong>Error:</strong> This username is invalid because it uses illegal characters. Please enter a valid username.' ) ); 186 186 } 187 187 188 188 if ( ! $update && username_exists( $user->user_login ) ) { 189 $errors->add( 'user_login', __( '<strong>Error </strong>:This username is already registered. Please choose another one.' ) );189 $errors->add( 'user_login', __( '<strong>Error:</strong> This username is already registered. Please choose another one.' ) ); 190 190 } 191 191 … … 194 194 195 195 if ( in_array( strtolower( $user->user_login ), array_map( 'strtolower', $illegal_logins ), true ) ) { 196 $errors->add( 'invalid_username', __( '<strong>Error </strong>:Sorry, that username is not allowed.' ) );196 $errors->add( 'invalid_username', __( '<strong>Error:</strong> Sorry, that username is not allowed.' ) ); 197 197 } 198 198 199 199 /* checking email address */ 200 200 if ( empty( $user->user_email ) ) { 201 $errors->add( 'empty_email', __( '<strong>Error </strong>:Please enter an email address.' ), array( 'form-field' => 'email' ) );201 $errors->add( 'empty_email', __( '<strong>Error:</strong> Please enter an email address.' ), array( 'form-field' => 'email' ) ); 202 202 } elseif ( ! is_email( $user->user_email ) ) { 203 $errors->add( 'invalid_email', __( '<strong>Error </strong>:The email address is not correct.' ), array( 'form-field' => 'email' ) );203 $errors->add( 'invalid_email', __( '<strong>Error:</strong> The email address is not correct.' ), array( 'form-field' => 'email' ) ); 204 204 } else { 205 205 $owner_id = email_exists( $user->user_email ); 206 206 if ( $owner_id && ( ! $update || ( $owner_id != $user->ID ) ) ) { 207 $errors->add( 'email_exists', __( '<strong>Error </strong>:This email is already registered. Please choose another one.' ), array( 'form-field' => 'email' ) );207 $errors->add( 'email_exists', __( '<strong>Error:</strong> This email is already registered. Please choose another one.' ), array( 'form-field' => 'email' ) ); 208 208 } 209 209 } -
trunk/src/wp-admin/setup-config.php
r53156 r53458 279 279 280 280 if ( empty( $prefix ) ) { 281 wp_die( __( '<strong>Error </strong>:"Table Prefix" must not be empty.' ) . $tryagain_link );281 wp_die( __( '<strong>Error:</strong> "Table Prefix" must not be empty.' ) . $tryagain_link ); 282 282 } 283 283 284 284 // Validate $prefix: it can only contain letters, numbers and underscores. 285 285 if ( preg_match( '|[^a-z0-9_]|i', $prefix ) ) { 286 wp_die( __( '<strong>Error </strong>:"Table Prefix" can only contain numbers, letters, and underscores.' ) . $tryagain_link );286 wp_die( __( '<strong>Error:</strong> "Table Prefix" can only contain numbers, letters, and underscores.' ) . $tryagain_link ); 287 287 } 288 288 … … 317 317 if ( ! $wpdb->last_error ) { 318 318 // MySQL was able to parse the prefix as a value, which we don't want. Bail. 319 wp_die( __( '<strong>Error </strong>:"Table Prefix" is invalid.' ) );319 wp_die( __( '<strong>Error:</strong> "Table Prefix" is invalid.' ) ); 320 320 } 321 321 -
trunk/src/wp-includes/comment.php
r53299 r53458 1271 1271 1272 1272 if ( isset( $comment_data['comment_author'] ) && mb_strlen( $comment_data['comment_author'], '8bit' ) > $max_lengths['comment_author'] ) { 1273 return new WP_Error( 'comment_author_column_length', __( '<strong>Error </strong>:Your name is too long.' ), 200 );1273 return new WP_Error( 'comment_author_column_length', __( '<strong>Error:</strong> Your name is too long.' ), 200 ); 1274 1274 } 1275 1275 1276 1276 if ( isset( $comment_data['comment_author_email'] ) && strlen( $comment_data['comment_author_email'] ) > $max_lengths['comment_author_email'] ) { 1277 return new WP_Error( 'comment_author_email_column_length', __( '<strong>Error </strong>:Your email address is too long.' ), 200 );1277 return new WP_Error( 'comment_author_email_column_length', __( '<strong>Error:</strong> Your email address is too long.' ), 200 ); 1278 1278 } 1279 1279 1280 1280 if ( isset( $comment_data['comment_author_url'] ) && strlen( $comment_data['comment_author_url'] ) > $max_lengths['comment_author_url'] ) { 1281 return new WP_Error( 'comment_author_url_column_length', __( '<strong>Error </strong>:Your URL is too long.' ), 200 );1281 return new WP_Error( 'comment_author_url_column_length', __( '<strong>Error:</strong> Your URL is too long.' ), 200 ); 1282 1282 } 1283 1283 1284 1284 if ( isset( $comment_data['comment_content'] ) && mb_strlen( $comment_data['comment_content'], '8bit' ) > $max_lengths['comment_content'] ) { 1285 return new WP_Error( 'comment_content_column_length', __( '<strong>Error </strong>:Your comment is too long.' ), 200 );1285 return new WP_Error( 'comment_content_column_length', __( '<strong>Error:</strong> Your comment is too long.' ), 200 ); 1286 1286 } 1287 1287 … … 3530 3530 if ( get_option( 'require_name_email' ) && ! $user->exists() ) { 3531 3531 if ( '' == $comment_author_email || '' == $comment_author ) { 3532 return new WP_Error( 'require_name_email', __( '<strong>Error </strong>:Please fill the required fields.' ), 200 );3532 return new WP_Error( 'require_name_email', __( '<strong>Error:</strong> Please fill the required fields.' ), 200 ); 3533 3533 } elseif ( ! is_email( $comment_author_email ) ) { 3534 return new WP_Error( 'require_valid_email', __( '<strong>Error </strong>:Please enter a valid email address.' ), 200 );3534 return new WP_Error( 'require_valid_email', __( '<strong>Error:</strong> Please enter a valid email address.' ), 200 ); 3535 3535 } 3536 3536 } … … 3557 3557 $allow_empty_comment = apply_filters( 'allow_empty_comment', false, $commentdata ); 3558 3558 if ( '' === $comment_content && ! $allow_empty_comment ) { 3559 return new WP_Error( 'require_valid_comment', __( '<strong>Error </strong>:Please type your comment text.' ), 200 );3559 return new WP_Error( 'require_valid_comment', __( '<strong>Error:</strong> Please type your comment text.' ), 200 ); 3560 3560 } 3561 3561 … … 3571 3571 3572 3572 if ( ! $comment_id ) { 3573 return new WP_Error( 'comment_save_error', __( '<strong>Error </strong>:The comment could not be saved. Please try again later.' ), 500 );3573 return new WP_Error( 'comment_save_error', __( '<strong>Error:</strong> The comment could not be saved. Please try again later.' ), 500 ); 3574 3574 } 3575 3575 -
trunk/src/wp-includes/load.php
r53426 r53458 625 625 sprintf( 626 626 /* translators: 1: $table_prefix, 2: wp-config.php */ 627 __( '<strong>Error </strong>:%1$s in %2$s can only contain numbers, letters, and underscores.' ),627 __( '<strong>Error:</strong> %1$s in %2$s can only contain numbers, letters, and underscores.' ), 628 628 '<code>$table_prefix</code>', 629 629 '<code>wp-config.php</code>' -
trunk/src/wp-includes/ms-deprecated.php
r53455 r53458 402 402 // Check if the domain has been used already. We should return an error message. 403 403 if ( domain_exists($domain, $path, $site_id) ) 404 return __( '<strong>Error </strong>:Site URL you’ve entered is already taken.' );404 return __( '<strong>Error:</strong> Site URL you’ve entered is already taken.' ); 405 405 406 406 /* … … 411 411 412 412 if ( ! $blog_id = insert_blog($domain, $path, $site_id) ) 413 return __( '<strong>Error </strong>:There was a problem creating site entry.' );413 return __( '<strong>Error:</strong> There was a problem creating site entry.' ); 414 414 415 415 switch_to_blog($blog_id); -
trunk/src/wp-includes/pluggable.php
r53301 r53458 623 623 // TODO: What should the error message be? (Or would these even happen?) 624 624 // Only needed if all authentication handlers fail to return anything. 625 $user = new WP_Error( 'authentication_failed', __( '<strong>Error </strong>:Invalid username, email address or incorrect password.' ) );625 $user = new WP_Error( 'authentication_failed', __( '<strong>Error:</strong> Invalid username, email address or incorrect password.' ) ); 626 626 } 627 627 -
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', -
trunk/src/wp-includes/wp-db.php
r53299 r53458 3698 3698 if ( version_compare( $this->db_version(), $required_mysql_version, '<' ) ) { 3699 3699 /* translators: 1: WordPress version number, 2: Minimum required MySQL version number. */ 3700 return new WP_Error( 'database_version', sprintf( __( '<strong>Error </strong>:WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version ) );3700 return new WP_Error( 'database_version', sprintf( __( '<strong>Error:</strong> WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version ) ); 3701 3701 } 3702 3702 } -
trunk/src/wp-login.php
r53455 r53458 791 791 if ( isset( $_GET['error'] ) ) { 792 792 if ( 'invalidkey' === $_GET['error'] ) { 793 $errors->add( 'invalidkey', __( '<strong>Error </strong>:Your password reset link appears to be invalid. Please request a new link below.' ) );793 $errors->add( 'invalidkey', __( '<strong>Error:</strong> Your password reset link appears to be invalid. Please request a new link below.' ) ); 794 794 } elseif ( 'expiredkey' === $_GET['error'] ) { 795 $errors->add( 'expiredkey', __( '<strong>Error </strong>:Your password reset link has expired. Please request a new link below.' ) );795 $errors->add( 'expiredkey', __( '<strong>Error:</strong> Your password reset link has expired. Please request a new link below.' ) ); 796 796 } 797 797 } … … 919 919 // Check if password fields do not match. 920 920 if ( ! empty( $_POST['pass1'] ) && trim( $_POST['pass2'] ) !== $_POST['pass1'] ) { 921 $errors->add( 'password_reset_mismatch', __( '<strong>Error </strong>:The passwords do not match.' ) );921 $errors->add( 'password_reset_mismatch', __( '<strong>Error:</strong> The passwords do not match.' ) ); 922 922 } 923 923 … … 1227 1227 sprintf( 1228 1228 /* translators: 1: Browser cookie documentation URL, 2: Support forums URL. */ 1229 __( '<strong>Error </strong>:Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ),1229 __( '<strong>Error:</strong> Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ), 1230 1230 __( 'https://wordpress.org/support/article/cookies/' ), 1231 1231 __( 'https://wordpress.org/support/forums/' ) … … 1238 1238 sprintf( 1239 1239 /* translators: %s: Browser cookie documentation URL. */ 1240 __( '<strong>Error </strong>:Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ),1240 __( '<strong>Error:</strong> Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ), 1241 1241 __( 'https://wordpress.org/support/article/cookies/#enable-cookies-in-your-browser' ) 1242 1242 ) … … 1342 1342 $errors->add( 'loggedout', __( 'You are now logged out.' ), 'message' ); 1343 1343 } elseif ( isset( $_GET['registration'] ) && 'disabled' === $_GET['registration'] ) { 1344 $errors->add( 'registerdisabled', __( '<strong>Error </strong>:User registration is currently not allowed.' ) );1344 $errors->add( 'registerdisabled', __( '<strong>Error:</strong> User registration is currently not allowed.' ) ); 1345 1345 } elseif ( strpos( $redirect_to, 'about.php?updated' ) ) { 1346 1346 $errors->add( 'updated', __( '<strong>You have successfully updated WordPress!</strong> Please log back in to see what’s new.' ), 'message' );
Note: See TracChangeset
for help on using the changeset viewer.