Make WordPress Core


Ignore:
Timestamp:
06/02/2022 03:03:39 PM (4 years ago)
Author:
audrasjb
Message:

Text Changes: Improve consistency of admin error notices.

This changeset replaces <strong>Error</strong>: with <strong>Error:</strong>, for better consistency.

Props transl8or, mihaidumitrascu, audrasjb.
Fixes #50785.

File:
1 edited

Legend:

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

    r53299 r53458  
    12711271
    12721272        if ( isset( $comment_data['comment_author'] ) && mb_strlen( $comment_data['comment_author'], '8bit' ) > $max_lengths['comment_author'] ) {
    1273                 return new WP_Error( 'comment_author_column_length', __( '<strong>Error</strong>: Your name is too long.' ), 200 );
     1273                return new WP_Error( 'comment_author_column_length', __( '<strong>Error:</strong> Your name is too long.' ), 200 );
    12741274        }
    12751275
    12761276        if ( isset( $comment_data['comment_author_email'] ) && strlen( $comment_data['comment_author_email'] ) > $max_lengths['comment_author_email'] ) {
    1277                 return new WP_Error( 'comment_author_email_column_length', __( '<strong>Error</strong>: Your email address is too long.' ), 200 );
     1277                return new WP_Error( 'comment_author_email_column_length', __( '<strong>Error:</strong> Your email address is too long.' ), 200 );
    12781278        }
    12791279
    12801280        if ( isset( $comment_data['comment_author_url'] ) && strlen( $comment_data['comment_author_url'] ) > $max_lengths['comment_author_url'] ) {
    1281                 return new WP_Error( 'comment_author_url_column_length', __( '<strong>Error</strong>: Your URL is too long.' ), 200 );
     1281                return new WP_Error( 'comment_author_url_column_length', __( '<strong>Error:</strong> Your URL is too long.' ), 200 );
    12821282        }
    12831283
    12841284        if ( isset( $comment_data['comment_content'] ) && mb_strlen( $comment_data['comment_content'], '8bit' ) > $max_lengths['comment_content'] ) {
    1285                 return new WP_Error( 'comment_content_column_length', __( '<strong>Error</strong>: Your comment is too long.' ), 200 );
     1285                return new WP_Error( 'comment_content_column_length', __( '<strong>Error:</strong> Your comment is too long.' ), 200 );
    12861286        }
    12871287
     
    35303530        if ( get_option( 'require_name_email' ) && ! $user->exists() ) {
    35313531                if ( '' == $comment_author_email || '' == $comment_author ) {
    3532                         return new WP_Error( 'require_name_email', __( '<strong>Error</strong>: Please fill the required fields.' ), 200 );
     3532                        return new WP_Error( 'require_name_email', __( '<strong>Error:</strong> Please fill the required fields.' ), 200 );
    35333533                } elseif ( ! is_email( $comment_author_email ) ) {
    3534                         return new WP_Error( 'require_valid_email', __( '<strong>Error</strong>: Please enter a valid email address.' ), 200 );
     3534                        return new WP_Error( 'require_valid_email', __( '<strong>Error:</strong> Please enter a valid email address.' ), 200 );
    35353535                }
    35363536        }
     
    35573557        $allow_empty_comment = apply_filters( 'allow_empty_comment', false, $commentdata );
    35583558        if ( '' === $comment_content && ! $allow_empty_comment ) {
    3559                 return new WP_Error( 'require_valid_comment', __( '<strong>Error</strong>: Please type your comment text.' ), 200 );
     3559                return new WP_Error( 'require_valid_comment', __( '<strong>Error:</strong> Please type your comment text.' ), 200 );
    35603560        }
    35613561
     
    35713571
    35723572        if ( ! $comment_id ) {
    3573                 return new WP_Error( 'comment_save_error', __( '<strong>Error</strong>: The comment could not be saved. Please try again later.' ), 500 );
     3573                return new WP_Error( 'comment_save_error', __( '<strong>Error:</strong> The comment could not be saved. Please try again later.' ), 500 );
    35743574        }
    35753575
Note: See TracChangeset for help on using the changeset viewer.