Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/04/2020 09:28:24 PM (4 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 branches/2.6, for 2.6.6.

See #3333, #3377.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/src/includes/topics/functions.php

    r7036 r7097  
    103103    // Nonce check
    104104    if ( ! bbp_verify_nonce_request( 'bbp-new-topic' ) ) {
    105         bbp_add_error( 'bbp_new_topic_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     105        bbp_add_error( 'bbp_new_topic_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    106106        return;
    107107    }
     
    130130        // User cannot create topics
    131131        if ( ! current_user_can( 'publish_topics' ) ) {
    132             bbp_add_error( 'bbp_topic_permission', __( '<strong>ERROR</strong>: You do not have permission to create new topics.', 'bbpress' ) );
     132            bbp_add_error( 'bbp_topic_permission', __( '<strong>Error</strong>: You do not have permission to create new topics.', 'bbpress' ) );
    133133            return;
    134134        }
     
    156156    // No topic title
    157157    if ( empty( $topic_title ) ) {
    158         bbp_add_error( 'bbp_topic_title', __( '<strong>ERROR</strong>: Your topic needs a title.', 'bbpress' ) );
     158        bbp_add_error( 'bbp_topic_title', __( '<strong>Error</strong>: Your topic needs a title.', 'bbpress' ) );
    159159    }
    160160
    161161    // Title too long
    162162    if ( bbp_is_title_too_long( $topic_title ) ) {
    163         bbp_add_error( 'bbp_topic_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) );
     163        bbp_add_error( 'bbp_topic_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) );
    164164    }
    165165
     
    175175    // No topic content
    176176    if ( empty( $topic_content ) ) {
    177         bbp_add_error( 'bbp_topic_content', __( '<strong>ERROR</strong>: Your topic cannot be empty.', 'bbpress' ) );
     177        bbp_add_error( 'bbp_topic_content', __( '<strong>Error</strong>: Your topic cannot be empty.', 'bbpress' ) );
    178178    }
    179179
     
    185185        // Empty Forum id was passed
    186186        if ( empty( $_POST['bbp_forum_id'] ) ) {
    187             bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
     187            bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID is missing.', 'bbpress' ) );
    188188
    189189        // Forum id is not a number
    190190        } elseif ( ! is_numeric( $_POST['bbp_forum_id'] ) ) {
    191             bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID must be a number.', 'bbpress' ) );
     191            bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID must be a number.', 'bbpress' ) );
    192192
    193193        // Forum id might be valid
     
    199199            // Forum id is empty
    200200            if ( 0 === $posted_forum_id ) {
    201                 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
     201                bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID is missing.', 'bbpress' ) );
    202202
    203203            // Forum id is a negative number
    204204            } elseif ( 0 > $posted_forum_id ) {
    205                 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID cannot be a negative number.', 'bbpress' ) );
     205                bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID cannot be a negative number.', 'bbpress' ) );
    206206
    207207            // Forum does not exist
    208208            } elseif ( ! bbp_get_forum( $posted_forum_id ) ) {
    209                 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum does not exist.', 'bbpress' ) );
     209                bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum does not exist.', 'bbpress' ) );
    210210
    211211            // Use the POST'ed forum id
     
    221221        // Forum is a category
    222222        if ( bbp_is_forum_category( $forum_id ) ) {
    223             bbp_add_error( 'bbp_new_topic_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No topics can be created in this forum.', 'bbpress' ) );
     223            bbp_add_error( 'bbp_new_topic_forum_category', __( '<strong>Error</strong>: This forum is a category. No topics can be created in this forum.', 'bbpress' ) );
    224224
    225225        // Forum is not a category
     
    228228            // Forum is closed and user cannot access
    229229            if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) {
    230                 bbp_add_error( 'bbp_new_topic_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new topics.', 'bbpress' ) );
     230                bbp_add_error( 'bbp_new_topic_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new topics.', 'bbpress' ) );
    231231            }
    232232
    233233            // Forum is private and user cannot access
    234234            if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
    235                 bbp_add_error( 'bbp_new_topic_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
     235                bbp_add_error( 'bbp_new_topic_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
    236236
    237237            // Forum is hidden and user cannot access
    238238            } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
    239                 bbp_add_error( 'bbp_new_topic_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
     239                bbp_add_error( 'bbp_new_topic_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
    240240            }
    241241        }
     
    245245
    246246    if ( ! bbp_check_for_flood( $anonymous_data, $topic_author ) ) {
    247         bbp_add_error( 'bbp_topic_flood', __( '<strong>ERROR</strong>: Slow down; you move too fast.', 'bbpress' ) );
     247        bbp_add_error( 'bbp_topic_flood', __( '<strong>Error</strong>: Slow down; you move too fast.', 'bbpress' ) );
    248248    }
    249249
     
    251251
    252252    if ( ! bbp_check_for_duplicate( array( 'post_type' => bbp_get_topic_post_type(), 'post_author' => $topic_author, 'post_content' => $topic_content, 'anonymous_data' => $anonymous_data ) ) ) {
    253         bbp_add_error( 'bbp_topic_duplicate', __( '<strong>ERROR</strong>: Duplicate topic detected; it looks as though you&#8217;ve already said that.', 'bbpress' ) );
     253        bbp_add_error( 'bbp_topic_duplicate', __( '<strong>Error</strong>: Duplicate topic detected; it looks as though you&#8217;ve already said that.', 'bbpress' ) );
    254254    }
    255255
     
    257257
    258258    if ( ! bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content, true ) ) {
    259         bbp_add_error( 'bbp_topic_moderation', __( '<strong>ERROR</strong>: Your topic cannot be created at this time.', 'bbpress' ) );
     259        bbp_add_error( 'bbp_topic_moderation', __( '<strong>Error</strong>: Your topic cannot be created at this time.', 'bbpress' ) );
    260260    }
    261261
     
    398398    // WP_Error
    399399    } elseif ( is_wp_error( $topic_id ) ) {
    400         bbp_add_error( 'bbp_topic_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) occurred: %s', 'bbpress' ), $topic_id->get_error_message() ) );
     400        bbp_add_error( 'bbp_topic_error', sprintf( __( '<strong>Error</strong>: The following problem(s) occurred: %s', 'bbpress' ), $topic_id->get_error_message() ) );
    401401
    402402    // Generic error
    403403    } else {
    404         bbp_add_error( 'bbp_topic_error', __( '<strong>ERROR</strong>: The topic was not created.', 'bbpress' ) );
     404        bbp_add_error( 'bbp_topic_error', __( '<strong>Error</strong>: The topic was not created.', 'bbpress' ) );
    405405    }
    406406}
     
    428428    // Topic id was not passed
    429429    if ( empty( $_POST['bbp_topic_id'] ) ) {
    430         bbp_add_error( 'bbp_edit_topic_id', __( '<strong>ERROR</strong>: Topic ID not found.', 'bbpress' ) );
     430        bbp_add_error( 'bbp_edit_topic_id', __( '<strong>Error</strong>: Topic ID not found.', 'bbpress' ) );
    431431        return;
    432432
     
    439439    // Topic does not exist
    440440    if ( empty( $topic ) ) {
    441         bbp_add_error( 'bbp_edit_topic_not_found', __( '<strong>ERROR</strong>: The topic you want to edit was not found.', 'bbpress' ) );
     441        bbp_add_error( 'bbp_edit_topic_not_found', __( '<strong>Error</strong>: The topic you want to edit was not found.', 'bbpress' ) );
    442442        return;
    443443
     
    450450            // User cannot edit this topic
    451451            if ( ! current_user_can( 'edit_topic', $topic_id ) ) {
    452                 bbp_add_error( 'bbp_edit_topic_permission', __( '<strong>ERROR</strong>: You do not have permission to edit that topic.', 'bbpress' ) );
     452                bbp_add_error( 'bbp_edit_topic_permission', __( '<strong>Error</strong>: You do not have permission to edit that topic.', 'bbpress' ) );
    453453            }
    454454
     
    466466    // Nonce check
    467467    if ( ! bbp_verify_nonce_request( 'bbp-edit-topic_' . $topic_id ) ) {
    468         bbp_add_error( 'bbp_edit_topic_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     468        bbp_add_error( 'bbp_edit_topic_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    469469        return;
    470470    }
     
    481481    // Forum id was not passed
    482482    if ( empty( $_POST['bbp_forum_id'] ) ) {
    483         bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
     483        bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID is missing.', 'bbpress' ) );
    484484
    485485    // Forum id was passed
     
    496496        // Forum is a category
    497497        if ( bbp_is_forum_category( $forum_id ) ) {
    498             bbp_add_error( 'bbp_edit_topic_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No topics can be created in it.', 'bbpress' ) );
     498            bbp_add_error( 'bbp_edit_topic_forum_category', __( '<strong>Error</strong>: This forum is a category. No topics can be created in it.', 'bbpress' ) );
    499499
    500500        // Forum is not a category
     
    503503            // Forum is closed and user cannot access
    504504            if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) {
    505                 bbp_add_error( 'bbp_edit_topic_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new topics.', 'bbpress' ) );
     505                bbp_add_error( 'bbp_edit_topic_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new topics.', 'bbpress' ) );
    506506            }
    507507
    508508            // Forum is private and user cannot access
    509509            if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
    510                 bbp_add_error( 'bbp_edit_topic_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
     510                bbp_add_error( 'bbp_edit_topic_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
    511511
    512512            // Forum is hidden and user cannot access
    513513            } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
    514                 bbp_add_error( 'bbp_edit_topic_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
     514                bbp_add_error( 'bbp_edit_topic_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );
    515515            }
    516516        }
     
    528528    // No topic title
    529529    if ( empty( $topic_title ) ) {
    530         bbp_add_error( 'bbp_edit_topic_title', __( '<strong>ERROR</strong>: Your topic needs a title.', 'bbpress' ) );
     530        bbp_add_error( 'bbp_edit_topic_title', __( '<strong>Error</strong>: Your topic needs a title.', 'bbpress' ) );
    531531    }
    532532
    533533    // Title too long
    534534    if ( bbp_is_title_too_long( $topic_title ) ) {
    535         bbp_add_error( 'bbp_topic_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) );
     535        bbp_add_error( 'bbp_topic_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) );
    536536    }
    537537
     
    547547    // No topic content
    548548    if ( empty( $topic_content ) ) {
    549         bbp_add_error( 'bbp_edit_topic_content', __( '<strong>ERROR</strong>: Your topic cannot be empty.', 'bbpress' ) );
     549        bbp_add_error( 'bbp_edit_topic_content', __( '<strong>Error</strong>: Your topic cannot be empty.', 'bbpress' ) );
    550550    }
    551551
     
    553553
    554554    if ( ! bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content, true ) ) {
    555         bbp_add_error( 'bbp_topic_moderation', __( '<strong>ERROR</strong>: Your topic cannot be edited at this time.', 'bbpress' ) );
     555        bbp_add_error( 'bbp_topic_moderation', __( '<strong>Error</strong>: Your topic cannot be edited at this time.', 'bbpress' ) );
    556556    }
    557557
     
    714714    } else {
    715715        $append_error = ( is_wp_error( $topic_id ) && $topic_id->get_error_message() ) ? $topic_id->get_error_message() . ' ' : '';
    716         bbp_add_error( 'bbp_topic_error', __( '<strong>ERROR</strong>: The following problem(s) have been found with your topic:' . $append_error . 'Please try again.', 'bbpress' ) );
     716        bbp_add_error( 'bbp_topic_error', __( '<strong>Error</strong>: The following problem(s) have been found with your topic:' . $append_error . 'Please try again.', 'bbpress' ) );
    717717    }
    718718}
     
    10831083    // Topic id
    10841084    if ( empty( $_POST['bbp_topic_id'] ) ) {
    1085         bbp_add_error( 'bbp_merge_topic_source_id', __( '<strong>ERROR</strong>: Topic ID not found.', 'bbpress' ) );
     1085        bbp_add_error( 'bbp_merge_topic_source_id', __( '<strong>Error</strong>: Topic ID not found.', 'bbpress' ) );
    10861086    } else {
    10871087        $source_topic_id = (int) $_POST['bbp_topic_id'];
     
    10901090    // Nonce check
    10911091    if ( ! bbp_verify_nonce_request( 'bbp-merge-topic_' . $source_topic_id ) ) {
    1092         bbp_add_error( 'bbp_merge_topic_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1092        bbp_add_error( 'bbp_merge_topic_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    10931093        return;
    10941094
    10951095    // Source topic not found
    10961096    } elseif ( ! $source_topic = bbp_get_topic( $source_topic_id ) ) {
    1097         bbp_add_error( 'bbp_merge_topic_source_not_found', __( '<strong>ERROR</strong>: The topic you want to merge was not found.', 'bbpress' ) );
     1097        bbp_add_error( 'bbp_merge_topic_source_not_found', __( '<strong>Error</strong>: The topic you want to merge was not found.', 'bbpress' ) );
    10981098        return;
    10991099    }
     
    11011101    // Cannot edit source topic
    11021102    if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) {
    1103         bbp_add_error( 'bbp_merge_topic_source_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
     1103        bbp_add_error( 'bbp_merge_topic_source_permission', __( '<strong>Error</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
    11041104        return;
    11051105    }
     
    11091109    // Topic id
    11101110    if ( empty( $_POST['bbp_destination_topic'] ) ) {
    1111         bbp_add_error( 'bbp_merge_topic_destination_id', __( '<strong>ERROR</strong>: Destination topic ID not found.', 'bbpress' ) );
     1111        bbp_add_error( 'bbp_merge_topic_destination_id', __( '<strong>Error</strong>: Destination topic ID not found.', 'bbpress' ) );
    11121112    } else {
    11131113        $destination_topic_id = (int) $_POST['bbp_destination_topic'];
     
    11161116    // Destination topic not found
    11171117    if ( ! $destination_topic = bbp_get_topic( $destination_topic_id ) ) {
    1118         bbp_add_error( 'bbp_merge_topic_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to merge to was not found.', 'bbpress' ) );
     1118        bbp_add_error( 'bbp_merge_topic_destination_not_found', __( '<strong>Error</strong>: The topic you want to merge to was not found.', 'bbpress' ) );
    11191119    }
    11201120
    11211121    // Cannot edit destination topic
    11221122    if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) {
    1123         bbp_add_error( 'bbp_merge_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
     1123        bbp_add_error( 'bbp_merge_topic_destination_permission', __( '<strong>Error</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
    11241124    }
    11251125
     
    13411341
    13421342    if ( empty( $_POST['bbp_reply_id'] ) ) {
    1343         bbp_add_error( 'bbp_split_topic_reply_id', __( '<strong>ERROR</strong>: A reply ID is required.', 'bbpress' ) );
     1343        bbp_add_error( 'bbp_split_topic_reply_id', __( '<strong>Error</strong>: A reply ID is required.', 'bbpress' ) );
    13441344    } else {
    13451345        $from_reply_id = (int) $_POST['bbp_reply_id'];
     
    13501350    // Reply exists
    13511351    if ( empty( $from_reply ) ) {
    1352         bbp_add_error( 'bbp_split_topic_r_not_found', __( '<strong>ERROR</strong>: The reply you want to split from was not found.', 'bbpress' ) );
     1352        bbp_add_error( 'bbp_split_topic_r_not_found', __( '<strong>Error</strong>: The reply you want to split from was not found.', 'bbpress' ) );
    13531353    }
    13541354
     
    13601360    // No topic
    13611361    if ( empty( $source_topic ) ) {
    1362         bbp_add_error( 'bbp_split_topic_source_not_found', __( '<strong>ERROR</strong>: The topic you want to split was not found.', 'bbpress' ) );
     1362        bbp_add_error( 'bbp_split_topic_source_not_found', __( '<strong>Error</strong>: The topic you want to split was not found.', 'bbpress' ) );
    13631363    }
    13641364
    13651365    // Nonce check failed
    13661366    if ( ! bbp_verify_nonce_request( 'bbp-split-topic_' . $source_topic->ID ) ) {
    1367         bbp_add_error( 'bbp_split_topic_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1367        bbp_add_error( 'bbp_split_topic_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    13681368        return;
    13691369    }
     
    13711371    // Use cannot edit topic
    13721372    if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) {
    1373         bbp_add_error( 'bbp_split_topic_source_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
     1373        bbp_add_error( 'bbp_split_topic_source_permission', __( '<strong>Error</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
    13741374    }
    13751375
     
    13811381    // Invalid split option
    13821382    if ( empty( $split_option ) || ! in_array( $split_option, array( 'existing', 'reply' ), true ) ) {
    1383         bbp_add_error( 'bbp_split_topic_option', __( '<strong>ERROR</strong>: You need to choose a valid split option.', 'bbpress' ) );
     1383        bbp_add_error( 'bbp_split_topic_option', __( '<strong>Error</strong>: You need to choose a valid split option.', 'bbpress' ) );
    13841384
    13851385    // Valid Split Option
     
    13941394                // Get destination topic id
    13951395                if ( empty( $_POST['bbp_destination_topic'] ) ) {
    1396                     bbp_add_error( 'bbp_split_topic_destination_id', __( '<strong>ERROR</strong>: A topic ID is required.', 'bbpress' ) );
     1396                    bbp_add_error( 'bbp_split_topic_destination_id', __( '<strong>Error</strong>: A topic ID is required.', 'bbpress' ) );
    13971397                } else {
    13981398                    $destination_topic_id = (int) $_POST['bbp_destination_topic'];
     
    14041404                // No destination topic
    14051405                if ( empty( $destination_topic ) ) {
    1406                     bbp_add_error( 'bbp_split_topic_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to split to was not found.', 'bbpress' ) );
     1406                    bbp_add_error( 'bbp_split_topic_destination_not_found', __( '<strong>Error</strong>: The topic you want to split to was not found.', 'bbpress' ) );
    14071407                }
    14081408
    14091409                // User cannot edit the destination topic
    14101410                if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) {
    1411                     bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
     1411                    bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>Error</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
    14121412                }
    14131413
     
    14471447                    // Shouldn't happen
    14481448                    if ( false === $destination_topic_id || is_wp_error( $destination_topic_id ) || empty( $destination_topic ) ) {
    1449                         bbp_add_error( 'bbp_split_topic_destination_reply', __( '<strong>ERROR</strong>: There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) );
     1449                        bbp_add_error( 'bbp_split_topic_destination_reply', __( '<strong>Error</strong>: There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) );
    14501450                    }
    14511451
    14521452                // User cannot publish posts
    14531453                } else {
    1454                     bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) );
     1454                    bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>Error</strong>: You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) );
    14551455                }
    14561456
     
    16891689    // Tag does not exist
    16901690    if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
    1691         bbp_add_error( 'bbp_manage_topic_invalid_tag', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while getting the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
     1691        bbp_add_error( 'bbp_manage_topic_invalid_tag', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found while getting the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
    16921692        return;
    16931693    }
     
    17011701            // Nonce check
    17021702            if ( ! bbp_verify_nonce_request( 'update-tag_' . $tag_id ) ) {
    1703                 bbp_add_error( 'bbp_manage_topic_tag_update_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1703                bbp_add_error( 'bbp_manage_topic_tag_update_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    17041704                return;
    17051705            }
     
    17071707            // Can user edit topic tags?
    17081708            if ( ! current_user_can( 'edit_topic_tag', $tag_id ) ) {
    1709                 bbp_add_error( 'bbp_manage_topic_tag_update_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );
     1709                bbp_add_error( 'bbp_manage_topic_tag_update_permission', __( '<strong>Error</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );
    17101710                return;
    17111711            }
     
    17131713            // No tag name was provided
    17141714            if ( empty( $_POST['tag-name'] ) || ! $name = $_POST['tag-name'] ) {
    1715                 bbp_add_error( 'bbp_manage_topic_tag_update_name', __( '<strong>ERROR</strong>: You need to enter a tag name.', 'bbpress' ) );
     1715                bbp_add_error( 'bbp_manage_topic_tag_update_name', __( '<strong>Error</strong>: You need to enter a tag name.', 'bbpress' ) );
    17161716                return;
    17171717            }
     
    17281728            // Cannot update tag
    17291729            if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
    1730                 bbp_add_error( 'bbp_manage_topic_tag_update_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while updating the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
     1730                bbp_add_error( 'bbp_manage_topic_tag_update_error', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found while updating the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
    17311731                return;
    17321732            }
     
    17451745            // Nonce check
    17461746            if ( ! bbp_verify_nonce_request( 'merge-tag_' . $tag_id ) ) {
    1747                 bbp_add_error( 'bbp_manage_topic_tag_merge_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1747                bbp_add_error( 'bbp_manage_topic_tag_merge_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    17481748                return;
    17491749            }
     
    17511751            // Can user edit topic tags?
    17521752            if ( ! current_user_can( 'edit_topic_tags' ) ) {
    1753                 bbp_add_error( 'bbp_manage_topic_tag_merge_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );
     1753                bbp_add_error( 'bbp_manage_topic_tag_merge_permission', __( '<strong>Error</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );
    17541754                return;
    17551755            }
     
    17571757            // No tag name was provided
    17581758            if ( empty( $_POST['tag-existing-name'] ) || ! $name = $_POST['tag-existing-name'] ) {
    1759                 bbp_add_error( 'bbp_manage_topic_tag_merge_name', __( '<strong>ERROR</strong>: You need to enter a tag name.', 'bbpress' ) );
     1759                bbp_add_error( 'bbp_manage_topic_tag_merge_name', __( '<strong>Error</strong>: You need to enter a tag name.', 'bbpress' ) );
    17601760                return;
    17611761            }
     
    17681768            // Problem inserting the new term
    17691769            if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
    1770                 bbp_add_error( 'bbp_manage_topic_tag_merge_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) );
     1770                bbp_add_error( 'bbp_manage_topic_tag_merge_error', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) );
    17711771                return;
    17721772            }
     
    17771777            // Attempting to merge a tag into itself
    17781778            if ( $tag_id === $to_tag ) {
    1779                 bbp_add_error( 'bbp_manage_topic_tag_merge_same', __( '<strong>ERROR</strong>: The tags which are being merged can not be the same.', 'bbpress' ) );
     1779                bbp_add_error( 'bbp_manage_topic_tag_merge_same', __( '<strong>Error</strong>: The tags which are being merged can not be the same.', 'bbpress' ) );
    17801780                return;
    17811781            }
     
    17891789            // Error merging the terms
    17901790            if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
    1791                 bbp_add_error( 'bbp_manage_topic_tag_merge_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) );
     1791                bbp_add_error( 'bbp_manage_topic_tag_merge_error', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) );
    17921792                return;
    17931793            }
     
    18061806            // Nonce check
    18071807            if ( ! bbp_verify_nonce_request( 'delete-tag_' . $tag_id ) ) {
    1808                 bbp_add_error( 'bbp_manage_topic_tag_delete_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1808                bbp_add_error( 'bbp_manage_topic_tag_delete_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    18091809                return;
    18101810            }
     
    18121812            // Can user delete topic tags?
    18131813            if ( ! current_user_can( 'delete_topic_tag', $tag_id ) ) {
    1814                 bbp_add_error( 'bbp_manage_topic_tag_delete_permission', __( '<strong>ERROR</strong>: You do not have permission to delete the topic tags.', 'bbpress' ) );
     1814                bbp_add_error( 'bbp_manage_topic_tag_delete_permission', __( '<strong>Error</strong>: You do not have permission to delete the topic tags.', 'bbpress' ) );
    18151815                return;
    18161816            }
     
    18211821            // Error deleting term
    18221822            if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
    1823                 bbp_add_error( 'bbp_manage_topic_tag_delete_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) have been found while deleting the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
     1823                bbp_add_error( 'bbp_manage_topic_tag_delete_error', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found while deleting the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
    18241824                return;
    18251825            }
     
    20172017    $topic = bbp_get_topic( $topic_id );
    20182018    if ( empty( $topic ) ) {
    2019         bbp_add_error( 'bbp_toggle_topic_missing', __( '<strong>ERROR</strong>: This topic could not be found or no longer exists.', 'bbpress' ) );
     2019        bbp_add_error( 'bbp_toggle_topic_missing', __( '<strong>Error</strong>: This topic could not be found or no longer exists.', 'bbpress' ) );
    20202020        return;
    20212021    }
     
    20232023    // What is the user doing here?
    20242024    if ( ! current_user_can( 'edit_topic', $topic_id ) || ( 'bbp_toggle_topic_trash' === $action && ! current_user_can( 'delete_topic', $topic_id ) ) ) {
    2025         bbp_add_error( 'bbp_toggle_topic_permission', __( '<strong>ERROR</strong>: You do not have permission to do that.', 'bbpress' ) );
     2025        bbp_add_error( 'bbp_toggle_topic_permission', __( '<strong>Error</strong>: You do not have permission to do that.', 'bbpress' ) );
    20262026        return;
    20272027    }
     
    21072107            // Feedback
    21082108            $retval['message'] = ( true === $is_pending )
    2109                 ? __( '<strong>ERROR</strong>: There was a problem approving the topic.',   'bbpress' )
    2110                 : __( '<strong>ERROR</strong>: There was a problem unapproving the topic.', 'bbpress' );
     2109                ? __( '<strong>Error</strong>: There was a problem approving the topic.',   'bbpress' )
     2110                : __( '<strong>Error</strong>: There was a problem unapproving the topic.', 'bbpress' );
    21112111
    21122112            break;
     
    21252125            // Feedback
    21262126            $retval['message'] = ( true === $is_open )
    2127                 ? __( '<strong>ERROR</strong>: There was a problem closing the topic.', 'bbpress' )
    2128                 : __( '<strong>ERROR</strong>: There was a problem opening the topic.', 'bbpress' );
     2127                ? __( '<strong>Error</strong>: There was a problem closing the topic.', 'bbpress' )
     2128                : __( '<strong>Error</strong>: There was a problem opening the topic.', 'bbpress' );
    21292129
    21302130            break;
     
    21442144            // Feedback
    21452145            $retval['message'] = ( true === $is_sticky )
    2146                 ? __( '<strong>ERROR</strong>: There was a problem unsticking the topic.', 'bbpress' )
    2147                 : __( '<strong>ERROR</strong>: There was a problem sticking the topic.',   'bbpress' );
     2146                ? __( '<strong>Error</strong>: There was a problem unsticking the topic.', 'bbpress' )
     2147                : __( '<strong>Error</strong>: There was a problem sticking the topic.',   'bbpress' );
    21482148
    21492149            break;
     
    21632163            // Feedback
    21642164            $retval['message'] = ( true === $is_spam )
    2165                 ? __( '<strong>ERROR</strong>: There was a problem unmarking the topic as spam.', 'bbpress' )
    2166                 : __( '<strong>ERROR</strong>: There was a problem marking the topic as spam.',   'bbpress' );
     2165                ? __( '<strong>Error</strong>: There was a problem unmarking the topic as spam.', 'bbpress' )
     2166                : __( '<strong>Error</strong>: There was a problem marking the topic as spam.',   'bbpress' );
    21672167
    21682168            break;
     
    21772177                    $retval['view_all']    = true;
    21782178                    $retval['status']      = wp_trash_post( $r['id'] );
    2179                     $retval['message']     = __( '<strong>ERROR</strong>: There was a problem trashing the topic.', 'bbpress' );
     2179                    $retval['message']     = __( '<strong>Error</strong>: There was a problem trashing the topic.', 'bbpress' );
    21802180                    $retval['redirect_to'] = current_user_can( 'view_trash' )
    21812181                        ? bbp_get_topic_permalink( $r['id'] )
     
    21882188
    21892189                    $retval['status']      = wp_untrash_post( $r['id'] );
    2190                     $retval['message']     = __( '<strong>ERROR</strong>: There was a problem untrashing the topic.', 'bbpress' );
     2190                    $retval['message']     = __( '<strong>Error</strong>: There was a problem untrashing the topic.', 'bbpress' );
    21912191                    $retval['redirect_to'] = bbp_get_topic_permalink( $r['id'] );
    21922192
     
    21972197
    21982198                    $retval['status']      = wp_delete_post( $r['id'] );
    2199                     $retval['message']     = __( '<strong>ERROR</strong>: There was a problem deleting the topic.', 'bbpress' );
     2199                    $retval['message']     = __( '<strong>Error</strong>: There was a problem deleting the topic.', 'bbpress' );
    22002200                    $retval['redirect_to'] = bbp_get_forum_permalink( $retval['status']->post_parent );
    22012201
Note: See TracChangeset for help on using the changeset viewer.