Changeset 48059 for trunk/src/wp-includes/comment.php
- Timestamp:
- 06/16/2020 03:33:37 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r47922 r48059 1240 1240 1241 1241 if ( isset( $comment_data['comment_author'] ) && mb_strlen( $comment_data['comment_author'], '8bit' ) > $max_lengths['comment_author'] ) { 1242 return new WP_Error( 'comment_author_column_length', __( ' <strong>Error</strong>:Your name is too long.' ), 200 );1242 return new WP_Error( 'comment_author_column_length', __( 'Your name is too long.' ), 200 ); 1243 1243 } 1244 1244 1245 1245 if ( isset( $comment_data['comment_author_email'] ) && strlen( $comment_data['comment_author_email'] ) > $max_lengths['comment_author_email'] ) { 1246 return new WP_Error( 'comment_author_email_column_length', __( ' <strong>Error</strong>:Your email address is too long.' ), 200 );1246 return new WP_Error( 'comment_author_email_column_length', __( 'Your email address is too long.' ), 200 ); 1247 1247 } 1248 1248 1249 1249 if ( isset( $comment_data['comment_author_url'] ) && strlen( $comment_data['comment_author_url'] ) > $max_lengths['comment_author_url'] ) { 1250 return new WP_Error( 'comment_author_url_column_length', __( ' <strong>Error</strong>:Your URL is too long.' ), 200 );1250 return new WP_Error( 'comment_author_url_column_length', __( 'Your URL is too long.' ), 200 ); 1251 1251 } 1252 1252 1253 1253 if ( isset( $comment_data['comment_content'] ) && mb_strlen( $comment_data['comment_content'], '8bit' ) > $max_lengths['comment_content'] ) { 1254 return new WP_Error( 'comment_content_column_length', __( ' <strong>Error</strong>:Your comment is too long.' ), 200 );1254 return new WP_Error( 'comment_content_column_length', __( 'Your comment is too long.' ), 200 ); 1255 1255 } 1256 1256 … … 3383 3383 if ( get_option( 'require_name_email' ) && ! $user->exists() ) { 3384 3384 if ( '' == $comment_author_email || '' == $comment_author ) { 3385 return new WP_Error( 'require_name_email', __( ' <strong>Error</strong>:Please fill the required fields (name, email).' ), 200 );3385 return new WP_Error( 'require_name_email', __( 'Please fill the required fields (name, email).' ), 200 ); 3386 3386 } elseif ( ! is_email( $comment_author_email ) ) { 3387 return new WP_Error( 'require_valid_email', __( ' <strong>Error</strong>:Please enter a valid email address.' ), 200 );3387 return new WP_Error( 'require_valid_email', __( 'Please enter a valid email address.' ), 200 ); 3388 3388 } 3389 3389 } … … 3410 3410 $allow_empty_comment = apply_filters( 'allow_empty_comment', false, $commentdata ); 3411 3411 if ( '' === $comment_content && ! $allow_empty_comment ) { 3412 return new WP_Error( 'require_valid_comment', __( ' <strong>Error</strong>: Please type a comment.' ), 200 );3412 return new WP_Error( 'require_valid_comment', __( 'Please type your comment text.' ), 200 ); 3413 3413 } 3414 3414 … … 3424 3424 3425 3425 if ( ! $comment_id ) { 3426 return new WP_Error( 'comment_save_error', __( ' <strong>Error</strong>:The comment could not be saved. Please try again later.' ), 500 );3426 return new WP_Error( 'comment_save_error', __( 'The comment could not be saved. Please try again later.' ), 500 ); 3427 3427 } 3428 3428
Note: See TracChangeset
for help on using the changeset viewer.