From cececce972d8720ebf8861ca82d6e9287843a7e6 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 27 Jun 2020 23:43:01 +0000 Subject: [PATCH] Users: Merge two similar error messages about usernames with invalid characters. Props ramiy, garrett-eclipse, chetan200891. Fixes #47003. git-svn-id: https://develop.svn.wordpress.org/trunk@48195 602fd350-edb4-49c9-b593-d223f7449a82 --- .../rest-api/endpoints/class-wp-rest-users-controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php index d26026e51f..88d233d4af 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php @@ -1245,7 +1245,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller { if ( ! validate_username( $username ) ) { return new WP_Error( 'rest_user_invalid_username', - __( 'Username contains invalid characters.' ), + __( 'This username is invalid because it uses illegal characters. Please enter a valid username.' ), array( 'status' => 400 ) ); }