mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user