Make WordPress Core


Ignore:
Timestamp:
02/01/2020 08:53:14 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Text Changes: Capitalize error messages consistently.

Props Presskopp.
Fixes #42945.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment.php

    r47122 r47154  
    12251225
    12261226    if ( isset( $comment_data['comment_author'] ) && mb_strlen( $comment_data['comment_author'], '8bit' ) > $max_lengths['comment_author'] ) {
    1227         return new WP_Error( 'comment_author_column_length', __( '<strong>ERROR</strong>: your name is too long.' ), 200 );
     1227        return new WP_Error( 'comment_author_column_length', __( '<strong>ERROR</strong>: Your name is too long.' ), 200 );
    12281228    }
    12291229
    12301230    if ( isset( $comment_data['comment_author_email'] ) && strlen( $comment_data['comment_author_email'] ) > $max_lengths['comment_author_email'] ) {
    1231         return new WP_Error( 'comment_author_email_column_length', __( '<strong>ERROR</strong>: your email address is too long.' ), 200 );
     1231        return new WP_Error( 'comment_author_email_column_length', __( '<strong>ERROR</strong>: Your email address is too long.' ), 200 );
    12321232    }
    12331233
    12341234    if ( isset( $comment_data['comment_author_url'] ) && strlen( $comment_data['comment_author_url'] ) > $max_lengths['comment_author_url'] ) {
    1235         return new WP_Error( 'comment_author_url_column_length', __( '<strong>ERROR</strong>: your url is too long.' ), 200 );
     1235        return new WP_Error( 'comment_author_url_column_length', __( '<strong>ERROR</strong>: Your url is too long.' ), 200 );
    12361236    }
    12371237
    12381238    if ( isset( $comment_data['comment_content'] ) && mb_strlen( $comment_data['comment_content'], '8bit' ) > $max_lengths['comment_content'] ) {
    1239         return new WP_Error( 'comment_content_column_length', __( '<strong>ERROR</strong>: your comment is too long.' ), 200 );
     1239        return new WP_Error( 'comment_content_column_length', __( '<strong>ERROR</strong>: Your comment is too long.' ), 200 );
    12401240    }
    12411241
     
    33533353    if ( get_option( 'require_name_email' ) && ! $user->exists() ) {
    33543354        if ( '' == $comment_author_email || '' == $comment_author ) {
    3355             return new WP_Error( 'require_name_email', __( '<strong>ERROR</strong>: please fill the required fields (name, email).' ), 200 );
     3355            return new WP_Error( 'require_name_email', __( '<strong>ERROR</strong>: Please fill the required fields (name, email).' ), 200 );
    33563356        } elseif ( ! is_email( $comment_author_email ) ) {
    3357             return new WP_Error( 'require_valid_email', __( '<strong>ERROR</strong>: please enter a valid email address.' ), 200 );
     3357            return new WP_Error( 'require_valid_email', __( '<strong>ERROR</strong>: Please enter a valid email address.' ), 200 );
    33583358        }
    33593359    }
     
    33803380    $allow_empty_comment = apply_filters( 'allow_empty_comment', false, $commentdata );
    33813381    if ( '' === $comment_content && ! $allow_empty_comment ) {
    3382         return new WP_Error( 'require_valid_comment', __( '<strong>ERROR</strong>: please type a comment.' ), 200 );
     3382        return new WP_Error( 'require_valid_comment', __( '<strong>ERROR</strong>: Please type a comment.' ), 200 );
    33833383    }
    33843384
Note: See TracChangeset for help on using the changeset viewer.