Making WordPress.org


Ignore:
Timestamp:
08/10/2022 05:03:34 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Improve consistency of various error messages.

  • Use sentence case for the word Error, instead of all caps. Using all caps should be avoided for better readability and because screen readers may pronounce all-caps words as abbreviations.
  • Move the colon of the Error: prefix inside the <strong> tags.

This matches similar changes in WordPress core.

Follow-up to [WP47156], [WP53118], [WP53337], [WP53458], [3702], [3719], [3797], [3937], [4043], [11301], [11382], [11383], [11580].

Props NekoJonez.
Fixes #6309.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-user-moderation/inc/class-plugin.php

    r8117 r12012  
    183183        $post = get_post( $post_id );
    184184        if ( ! $post ) {
    185             bbp_add_error( 'wporg_bbp_flag_post_id', __( '<strong>ERROR</strong>: No post was found! Which topic or reply are you marking for moderation?', 'wporg-forums' ) );
     185            bbp_add_error( 'wporg_bbp_flag_post_id', __( '<strong>Error:</strong> No post was found! Which topic or reply are you marking for moderation?', 'wporg-forums' ) );
    186186
    187187        // Check that user id matches post author
    188188        } elseif ( $post->post_author != intval( $_GET['user_id'] ) ) {
    189             bbp_add_error( 'wporg_bbp_flag_post_user', __( '<strong>ERROR</strong>: That author does not match the flagged post.', 'wporg-forums' ) );
     189            bbp_add_error( 'wporg_bbp_flag_post_user', __( '<strong>Error:</strong> That author does not match the flagged post.', 'wporg-forums' ) );
    190190
    191191        // Check nonce
    192192        } elseif ( ! bbp_verify_nonce_request( 'toggle-flag_' . $post->post_author . '_' . $post->ID ) ) {
    193             bbp_add_error( 'wporg_bbp_flag_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'wporg-forums' ) );
     193            bbp_add_error( 'wporg_bbp_flag_nonce', __( '<strong>Error:</strong> Are you sure you wanted to do that?', 'wporg-forums' ) );
    194194
    195195        // Check current user's ability to moderate
    196196        } elseif ( ! current_user_can( 'moderate' ) ) {
    197             bbp_add_error( 'wporg_bbp_flag_permissions', __( '<strong>ERROR</strong>: You don\'t have permission to moderate that user!', 'wporg-forums' ) );
     197            bbp_add_error( 'wporg_bbp_flag_permissions', __( '<strong>Error:</strong> You don\'t have permission to moderate that user!', 'wporg-forums' ) );
    198198        }
    199199
     
    218218            bbp_redirect( $redirect );
    219219        } elseif ( true === $is_flagged && 'bbp_flag_user' === $action ) {
    220             bbp_add_error( 'wporg_bbp_flag_user', __( '<strong>ERROR</strong>: There was a problem flagging that user!', 'wporg-forums' ) );
     220            bbp_add_error( 'wporg_bbp_flag_user', __( '<strong>Error:</strong> There was a problem flagging that user!', 'wporg-forums' ) );
    221221        } elseif ( false === $is_flagged && 'bbp_unflag_user' == $action ) {
    222             bbp_add_error( 'wporg_bbp_flag_unuser', __( '<strong>ERROR</strong>: There was a problem unflagging that user!', 'wporg-forums' ) );
     222            bbp_add_error( 'wporg_bbp_flag_unuser', __( '<strong>Error:</strong> There was a problem unflagging that user!', 'wporg-forums' ) );
    223223        }
    224224    }
Note: See TracChangeset for help on using the changeset viewer.