Text Changes: Merge some duplicate strings with the same meaning in error messages, adjust some other strings for consistency and accuracy.

Props ramiy, SergeyBiryukov.
Fixes #38808.

git-svn-id: https://develop.svn.wordpress.org/trunk@39278 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2016-11-17 15:52:18 +00:00
parent b2983232c3
commit eb26b2a6a7
10 changed files with 21 additions and 21 deletions

View File

@@ -435,7 +435,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
* comment_content. See wp_handle_comment_submission().
*/
if ( empty( $prepared_comment['comment_content'] ) ) {
return new WP_Error( 'rest_comment_content_invalid', __( 'Comment content is invalid.' ), array( 'status' => 400 ) );
return new WP_Error( 'rest_comment_content_invalid', __( 'Invalid comment content.' ), array( 'status' => 400 ) );
}
// Setting remaining values before wp_insert_comment so we can use wp_allow_comment().
@@ -637,7 +637,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
}
if ( isset( $prepared_args['comment_content'] ) && empty( $prepared_args['comment_content'] ) ) {
return new WP_Error( 'rest_comment_content_invalid', __( 'Comment content is invalid.' ), array( 'status' => 400 ) );
return new WP_Error( 'rest_comment_content_invalid', __( 'Invalid comment content.' ), array( 'status' => 400 ) );
}
$prepared_args['comment_ID'] = $id;