Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/04/2020 09:29:53 PM (5 years ago)
Author:
johnjamesjacoby
Message:

Accessibility: Text Changes: Use sentence case for the word "Error" in various error messages, instead of all caps.

Using all caps should be avoided for better readability, and because screen readers may pronounce all-caps words as abbreviations.

Related to [WP47156], #WP47656, #WP43037, #WP42945.

Props casiepa, man4toman, mmeet94, SergeyBiryukov, afercia, ryokuhi, sabernhardt, garrett-eclipse.

In trunk, for 2.7.0.

Fixes #3333, #3377.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/users/functions.php

    r7056 r7098  
    194194    // Nonce check
    195195    if ( ! bbp_verify_nonce_request( 'update-user_' . $user_id ) ) {
    196         bbp_add_error( 'bbp_update_user_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     196        bbp_add_error( 'bbp_update_user_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    197197        return;
    198198    }
     
    200200    // Cap check
    201201    if ( ! current_user_can( 'edit_user', $user_id ) ) {
    202         bbp_add_error( 'bbp_update_user_capability', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     202        bbp_add_error( 'bbp_update_user_capability', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    203203        return;
    204204    }
     
    206206    // Empty email check
    207207    if ( empty( $_POST['email'] ) ) {
    208         bbp_add_error( 'bbp_user_email_empty', __( '<strong>ERROR</strong>: That is not a valid email address.', 'bbpress' ), array( 'form-field' => 'email' ) );
     208        bbp_add_error( 'bbp_user_email_empty', __( '<strong>Error</strong>: That is not a valid email address.', 'bbpress' ), array( 'form-field' => 'email' ) );
    209209        return;
    210210    }
     
    218218        // Check that new email address is valid
    219219        if ( ! is_email( $_POST['email'] ) ) {
    220             bbp_add_error( 'bbp_user_email_invalid', __( '<strong>ERROR</strong>: That is not a valid email address.', 'bbpress' ), array( 'form-field' => 'email' ) );
     220            bbp_add_error( 'bbp_user_email_invalid', __( '<strong>Error</strong>: That is not a valid email address.', 'bbpress' ), array( 'form-field' => 'email' ) );
    221221            return;
    222222        }
     
    224224        // Check if email address is already in use
    225225        if ( email_exists( $_POST['email'] ) ) {
    226             bbp_add_error( 'bbp_user_email_taken', __( '<strong>ERROR</strong>: That email address is already in use.', 'bbpress' ), array( 'form-field' => 'email' ) );
     226            bbp_add_error( 'bbp_user_email_taken', __( '<strong>Error</strong>: That email address is already in use.', 'bbpress' ), array( 'form-field' => 'email' ) );
    227227            return;
    228228        }
     
    341341                delete_user_meta( $user_id, $key );
    342342
    343                 bbp_add_error( 'bbp_user_email_taken', __( '<strong>ERROR</strong>: That email address is already in use.', 'bbpress' ), array( 'form-field' => 'email' ) );
     343                bbp_add_error( 'bbp_user_email_taken', __( '<strong>Error</strong>: That email address is already in use.', 'bbpress' ), array( 'form-field' => 'email' ) );
    344344
    345345            // Email address is good to change to
     
    378378    } elseif ( ! empty( $_GET['dismiss'] ) && ( "{$user_id}{$key}" === $_GET['dismiss'] ) ) {
    379379        if ( ! bbp_verify_nonce_request( "dismiss-{$user_id}{$key}" ) ) {
    380             bbp_add_error( 'bbp_dismiss_new_email_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     380            bbp_add_error( 'bbp_dismiss_new_email_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    381381            return;
    382382        }
     
    404404    // Bail if any relevant parameters are empty
    405405    if ( empty( $user_id ) || empty( $r['hash'] ) || empty( $r['newemail'] ) ) {
    406         bbp_add_error( 'bbp_user_email_invalid_hash', __( '<strong>ERROR</strong>: An error occurred while updating your email address.', 'bbpress' ), array( 'form-field' => 'email' ) );
     406        bbp_add_error( 'bbp_user_email_invalid_hash', __( '<strong>Error</strong>: An error occurred while updating your email address.', 'bbpress' ), array( 'form-field' => 'email' ) );
    407407        return;
    408408    }
Note: See TracChangeset for help on using the changeset viewer.