Skip to:
Content

bbPress.org

Ticket #3333: 3333.patch

File 3333.patch, 77.6 KB (added by man4toman, 19 months ago)

The patch

  • includes/common/functions.php

     
    552552        // Filter name
    553553        $r['bbp_anonymous_name'] = apply_filters( 'bbp_pre_anonymous_post_author_name', $r['bbp_anonymous_name'] );
    554554        if ( empty( $r['bbp_anonymous_name'] ) ) {
    555                 bbp_add_error( 'bbp_anonymous_name',  __( '<strong>ERROR</strong>: Invalid author name.', 'bbpress' ) );
     555                bbp_add_error( 'bbp_anonymous_name',  __( '<strong>Error</strong>: Invalid author name.', 'bbpress' ) );
    556556        }
    557557
    558558        // Filter email address
    559559        $r['bbp_anonymous_email'] = apply_filters( 'bbp_pre_anonymous_post_author_email', $r['bbp_anonymous_email'] );
    560560        if ( empty( $r['bbp_anonymous_email'] ) ) {
    561                 bbp_add_error( 'bbp_anonymous_email', __( '<strong>ERROR</strong>: Invalid email address.', 'bbpress' ) );
     561                bbp_add_error( 'bbp_anonymous_email', __( '<strong>Error</strong>: Invalid email address.', 'bbpress' ) );
    562562        }
    563563
    564564        // Website is optional (can be empty)
  • includes/extend/buddypress/groups.php

     
    376376
    377377                // If everything else has failed, then something is wrong and we need
    378378                // to add an error to prevent this topic from saving.
    379                 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is invalid.', 'bbpress' ) );
     379                bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID is invalid.', 'bbpress' ) );
    380380        }
    381381
    382382        /**
     
    439439                }
    440440
    441441                // Add an error to prevent this reply from saving.
    442                 bbp_add_error( 'bbp_reply_to_id', __( '<strong>ERROR</strong>: Reply To is invalid.', 'bbpress' ) );
     442                bbp_add_error( 'bbp_reply_to_id', __( '<strong>Error</strong>: Reply To is invalid.', 'bbpress' ) );
    443443        }
    444444
    445445        /** Edit ******************************************************************/
     
    528528
    529529                // Theme-side Nonce check
    530530                } elseif ( ! bbp_verify_nonce_request( 'groups_edit_save_' . $this->slug ) ) {
    531                         bbp_add_error( 'bbp_edit_group_forum_screen_save', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     531                        bbp_add_error( 'bbp_edit_group_forum_screen_save', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    532532                        return;
    533533                }
    534534
     
    685685
    686686                // Nonce check
    687687                if ( ! bbp_verify_nonce_request( 'groups_create_save_' . $this->slug ) ) {
    688                         bbp_add_error( 'bbp_create_group_forum_screen_save', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     688                        bbp_add_error( 'bbp_create_group_forum_screen_save', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    689689                        return;
    690690                }
    691691
  • includes/extend/buddypress/notifications.php

     
    193193
    194194        // Check nonce
    195195        if ( ! bbp_verify_nonce_request( 'bbp_mark_topic_' . $topic_id ) ) {
    196                 bbp_add_error( 'bbp_notification_topic_id', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     196                bbp_add_error( 'bbp_notification_topic_id', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    197197
    198198        // Check current user's ability to edit the user
    199199        } elseif ( ! current_user_can( 'edit_user', $user_id ) ) {
    200                 bbp_add_error( 'bbp_notification_permission', __( '<strong>ERROR</strong>: You do not have permission to mark notifications for that user.', 'bbpress' ) );
     200                bbp_add_error( 'bbp_notification_permission', __( '<strong>Error</strong>: You do not have permission to mark notifications for that user.', 'bbpress' ) );
    201201        }
    202202
    203203        // Bail if we have errors
  • includes/forums/functions.php

     
    123123
    124124        // Nonce check
    125125        if ( ! bbp_verify_nonce_request( 'bbp-new-forum' ) ) {
    126                 bbp_add_error( 'bbp_new_forum_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     126                bbp_add_error( 'bbp_new_forum_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    127127                return;
    128128        }
    129129
     
    137137
    138138        // User cannot create forums
    139139        if ( ! current_user_can( 'publish_forums' ) ) {
    140                 bbp_add_error( 'bbp_forum_permission', __( '<strong>ERROR</strong>: You do not have permission to create new forums.', 'bbpress' ) );
     140                bbp_add_error( 'bbp_forum_permission', __( '<strong>Error</strong>: You do not have permission to create new forums.', 'bbpress' ) );
    141141                return;
    142142        }
    143143
     
    162162
    163163        // No forum title
    164164        if ( empty( $forum_title ) ) {
    165                 bbp_add_error( 'bbp_forum_title', __( '<strong>ERROR</strong>: Your forum needs a title.', 'bbpress' ) );
     165                bbp_add_error( 'bbp_forum_title', __( '<strong>Error</strong>: Your forum needs a title.', 'bbpress' ) );
    166166        }
    167167
    168168        // Title too long
    169169        if ( bbp_is_title_too_long( $forum_title ) ) {
    170                 bbp_add_error( 'bbp_forum_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) );
     170                bbp_add_error( 'bbp_forum_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) );
    171171        }
    172172
    173173        /** Forum Content *********************************************************/
     
    181181
    182182        // No forum content
    183183        if ( empty( $forum_content ) ) {
    184                 bbp_add_error( 'bbp_forum_content', __( '<strong>ERROR</strong>: Your forum description cannot be empty.', 'bbpress' ) );
     184                bbp_add_error( 'bbp_forum_content', __( '<strong>Error</strong>: Your forum description cannot be empty.', 'bbpress' ) );
    185185        }
    186186
    187187        /** Forum Parent **********************************************************/
     
    196196
    197197        // No forum parent was passed (should never happen)
    198198        if ( empty( $forum_parent_id ) ) {
    199                 bbp_add_error( 'bbp_new_forum_missing_parent', __( '<strong>ERROR</strong>: Your forum must have a parent.', 'bbpress' ) );
     199                bbp_add_error( 'bbp_new_forum_missing_parent', __( '<strong>Error</strong>: Your forum must have a parent.', 'bbpress' ) );
    200200
    201201        // Forum exists
    202202        } elseif ( ! empty( $forum_parent_id ) ) {
     
    203203
    204204                // Forum is a category
    205205                if ( bbp_is_forum_category( $forum_parent_id ) ) {
    206                         bbp_add_error( 'bbp_new_forum_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No forums can be created in this forum.', 'bbpress' ) );
     206                        bbp_add_error( 'bbp_new_forum_forum_category', __( '<strong>Error</strong>: This forum is a category. No forums can be created in this forum.', 'bbpress' ) );
    207207                }
    208208
    209209                // Forum is closed and user cannot access
    210210                if ( bbp_is_forum_closed( $forum_parent_id ) && ! current_user_can( 'edit_forum', $forum_parent_id ) ) {
    211                         bbp_add_error( 'bbp_new_forum_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new forums.', 'bbpress' ) );
     211                        bbp_add_error( 'bbp_new_forum_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new forums.', 'bbpress' ) );
    212212                }
    213213
    214214                // Forum is private and user cannot access
    215215                if ( bbp_is_forum_private( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
    216                         bbp_add_error( 'bbp_new_forum_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
     216                        bbp_add_error( 'bbp_new_forum_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
    217217                }
    218218
    219219                // Forum is hidden and user cannot access
    220220                if ( bbp_is_forum_hidden( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
    221                         bbp_add_error( 'bbp_new_forum_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
     221                        bbp_add_error( 'bbp_new_forum_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
    222222                }
    223223        }
    224224
     
    225225        /** Forum Flooding ********************************************************/
    226226
    227227        if ( ! bbp_check_for_flood( $anonymous_data, $forum_author ) ) {
    228                 bbp_add_error( 'bbp_forum_flood', __( '<strong>ERROR</strong>: Slow down; you move too fast.', 'bbpress' ) );
     228                bbp_add_error( 'bbp_forum_flood', __( '<strong>Error</strong>: Slow down; you move too fast.', 'bbpress' ) );
    229229        }
    230230
    231231        /** Forum Duplicate *******************************************************/
    232232
    233233        if ( ! bbp_check_for_duplicate( array( 'post_type' => bbp_get_forum_post_type(), 'post_author' => $forum_author, 'post_content' => $forum_content, 'anonymous_data' => $anonymous_data ) ) ) {
    234                 bbp_add_error( 'bbp_forum_duplicate', __( '<strong>ERROR</strong>: This forum already exists.', 'bbpress' ) );
     234                bbp_add_error( 'bbp_forum_duplicate', __( '<strong>Error</strong>: This forum already exists.', 'bbpress' ) );
    235235        }
    236236
    237237        /** Forum Bad Words *******************************************************/
    238238
    239239        if ( ! bbp_check_for_moderation( $anonymous_data, $forum_author, $forum_title, $forum_content, true ) ) {
    240                 bbp_add_error( 'bbp_forum_moderation', __( '<strong>ERROR</strong>: Your forum cannot be created at this time.', 'bbpress' ) );
     240                bbp_add_error( 'bbp_forum_moderation', __( '<strong>Error</strong>: Your forum cannot be created at this time.', 'bbpress' ) );
    241241        }
    242242
    243243        /** Forum Moderation ******************************************************/
     
    350350
    351351        // WP_Error
    352352        } elseif ( is_wp_error( $forum_id ) ) {
    353                 bbp_add_error( 'bbp_forum_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) occurred: %s', 'bbpress' ), $forum_id->get_error_message() ) );
     353                bbp_add_error( 'bbp_forum_error', sprintf( __( '<strong>Error</strong>: The following problem(s) occurred: %s', 'bbpress' ), $forum_id->get_error_message() ) );
    354354
    355355        // Generic error
    356356        } else {
    357                 bbp_add_error( 'bbp_forum_error', __( '<strong>ERROR</strong>: The forum was not created.', 'bbpress' ) );
     357                bbp_add_error( 'bbp_forum_error', __( '<strong>Error</strong>: The forum was not created.', 'bbpress' ) );
    358358        }
    359359}
    360360
     
    379379
    380380        // Forum id was not passed
    381381        if ( empty( $_POST['bbp_forum_id'] ) ) {
    382                 bbp_add_error( 'bbp_edit_forum_id', __( '<strong>ERROR</strong>: Forum ID not found.', 'bbpress' ) );
     382                bbp_add_error( 'bbp_edit_forum_id', __( '<strong>Error</strong>: Forum ID not found.', 'bbpress' ) );
    383383                return;
    384384
    385385        // Forum id was passed
     
    390390
    391391        // Nonce check
    392392        if ( ! bbp_verify_nonce_request( 'bbp-edit-forum_' . $forum_id ) ) {
    393                 bbp_add_error( 'bbp_edit_forum_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     393                bbp_add_error( 'bbp_edit_forum_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    394394                return;
    395395
    396396        // Forum does not exist
    397397        } elseif ( empty( $forum ) ) {
    398                 bbp_add_error( 'bbp_edit_forum_not_found', __( '<strong>ERROR</strong>: The forum you want to edit was not found.', 'bbpress' ) );
     398                bbp_add_error( 'bbp_edit_forum_not_found', __( '<strong>Error</strong>: The forum you want to edit was not found.', 'bbpress' ) );
    399399                return;
    400400
    401401        // User cannot edit this forum
    402402        } elseif ( ! current_user_can( 'edit_forum', $forum_id ) ) {
    403                 bbp_add_error( 'bbp_edit_forum_permission', __( '<strong>ERROR</strong>: You do not have permission to edit that forum.', 'bbpress' ) );
     403                bbp_add_error( 'bbp_edit_forum_permission', __( '<strong>Error</strong>: You do not have permission to edit that forum.', 'bbpress' ) );
    404404                return;
    405405        }
    406406
     
    426426
    427427                // Forum is closed and user cannot access
    428428                if ( bbp_is_forum_closed( $forum_parent_id ) && ! current_user_can( 'edit_forum', $forum_parent_id ) ) {
    429                         bbp_add_error( 'bbp_edit_forum_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new forums.', 'bbpress' ) );
     429                        bbp_add_error( 'bbp_edit_forum_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new forums.', 'bbpress' ) );
    430430                }
    431431
    432432                // Forum is private and user cannot access
    433433                if ( bbp_is_forum_private( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
    434                         bbp_add_error( 'bbp_edit_forum_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
     434                        bbp_add_error( 'bbp_edit_forum_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
    435435                }
    436436
    437437                // Forum is hidden and user cannot access
    438438                if ( bbp_is_forum_hidden( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
    439                         bbp_add_error( 'bbp_edit_forum_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
     439                        bbp_add_error( 'bbp_edit_forum_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
    440440                }
    441441        }
    442442
     
    451451
    452452        // No forum title
    453453        if ( empty( $forum_title ) ) {
    454                 bbp_add_error( 'bbp_edit_forum_title', __( '<strong>ERROR</strong>: Your forum needs a title.', 'bbpress' ) );
     454                bbp_add_error( 'bbp_edit_forum_title', __( '<strong>Error</strong>: Your forum needs a title.', 'bbpress' ) );
    455455        }
    456456
    457457        // Title too long
    458458        if ( bbp_is_title_too_long( $forum_title ) ) {
    459                 bbp_add_error( 'bbp_forum_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) );
     459                bbp_add_error( 'bbp_forum_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) );
    460460        }
    461461
    462462        /** Forum Content *********************************************************/
     
    470470
    471471        // No forum content
    472472        if ( empty( $forum_content ) ) {
    473                 bbp_add_error( 'bbp_edit_forum_content', __( '<strong>ERROR</strong>: Your forum description cannot be empty.', 'bbpress' ) );
     473                bbp_add_error( 'bbp_edit_forum_content', __( '<strong>Error</strong>: Your forum description cannot be empty.', 'bbpress' ) );
    474474        }
    475475
    476476        /** Forum Bad Words *******************************************************/
    477477
    478478        if ( ! bbp_check_for_moderation( $anonymous_data, bbp_get_forum_author_id( $forum_id ), $forum_title, $forum_content, true ) ) {
    479                 bbp_add_error( 'bbp_forum_moderation', __( '<strong>ERROR</strong>: Your forum cannot be edited at this time.', 'bbpress' ) );
     479                bbp_add_error( 'bbp_forum_moderation', __( '<strong>Error</strong>: Your forum cannot be edited at this time.', 'bbpress' ) );
    480480        }
    481481
    482482        /** Forum Moderation ******************************************************/
     
    590590
    591591        } else {
    592592                $append_error = ( is_wp_error( $forum_id ) && $forum_id->get_error_message() ) ? $forum_id->get_error_message() . ' ' : '';
    593                 bbp_add_error( 'bbp_forum_error', __( '<strong>ERROR</strong>: The following problem(s) have been found with your forum:' . $append_error . 'Please try again.', 'bbpress' ) );
     593                bbp_add_error( 'bbp_forum_error', __( '<strong>Error</strong>: The following problem(s) have been found with your forum:' . $append_error . 'Please try again.', 'bbpress' ) );
    594594        }
    595595}
    596596
  • includes/replies/functions.php

     
    131131
    132132        // Nonce check
    133133        if ( ! bbp_verify_nonce_request( 'bbp-new-reply' ) ) {
    134                 bbp_add_error( 'bbp_new_reply_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     134                bbp_add_error( 'bbp_new_reply_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    135135                return;
    136136        }
    137137
     
    156156
    157157                // User cannot create replies
    158158                if ( ! current_user_can( 'publish_replies' ) ) {
    159                         bbp_add_error( 'bbp_reply_permission', __( '<strong>ERROR</strong>: You do not have permission to reply.', 'bbpress' ) );
     159                        bbp_add_error( 'bbp_reply_permission', __( '<strong>Error</strong>: You do not have permission to reply.', 'bbpress' ) );
    160160                }
    161161
    162162                // Reply author is current user
     
    167167
    168168        // Topic id was not passed
    169169        if ( empty( $_POST['bbp_topic_id'] ) ) {
    170                 bbp_add_error( 'bbp_reply_topic_id', __( '<strong>ERROR</strong>: Topic ID is missing.', 'bbpress' ) );
     170                bbp_add_error( 'bbp_reply_topic_id', __( '<strong>Error</strong>: Topic ID is missing.', 'bbpress' ) );
    171171
    172172        // Topic id is not a number
    173173        } elseif ( ! is_numeric( $_POST['bbp_topic_id'] ) ) {
    174                 bbp_add_error( 'bbp_reply_topic_id', __( '<strong>ERROR</strong>: Topic ID must be a number.', 'bbpress' ) );
     174                bbp_add_error( 'bbp_reply_topic_id', __( '<strong>Error</strong>: Topic ID must be a number.', 'bbpress' ) );
    175175
    176176        // Topic id might be valid
    177177        } else {
     
    181181
    182182                // Topic id is a negative number
    183183                if ( 0 > $posted_topic_id ) {
    184                         bbp_add_error( 'bbp_reply_topic_id', __( '<strong>ERROR</strong>: Topic ID cannot be a negative number.', 'bbpress' ) );
     184                        bbp_add_error( 'bbp_reply_topic_id', __( '<strong>Error</strong>: Topic ID cannot be a negative number.', 'bbpress' ) );
    185185
    186186                // Topic does not exist
    187187                } elseif ( ! bbp_get_topic( $posted_topic_id ) ) {
    188                         bbp_add_error( 'bbp_reply_topic_id', __( '<strong>ERROR</strong>: Topic does not exist.', 'bbpress' ) );
     188                        bbp_add_error( 'bbp_reply_topic_id', __( '<strong>Error</strong>: Topic does not exist.', 'bbpress' ) );
    189189
    190190                // Use the POST'ed topic id
    191191                } else {
     
    204204
    205205                // Empty Forum id was passed
    206206                if ( empty( $_POST['bbp_forum_id'] ) ) {
    207                         bbp_add_error( 'bbp_reply_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
     207                        bbp_add_error( 'bbp_reply_forum_id', __( '<strong>Error</strong>: Forum ID is missing.', 'bbpress' ) );
    208208
    209209                // Forum id is not a number
    210210                } elseif ( ! is_numeric( $_POST['bbp_forum_id'] ) ) {
    211                         bbp_add_error( 'bbp_reply_forum_id', __( '<strong>ERROR</strong>: Forum ID must be a number.', 'bbpress' ) );
     211                        bbp_add_error( 'bbp_reply_forum_id', __( '<strong>Error</strong>: Forum ID must be a number.', 'bbpress' ) );
    212212
    213213                // Forum id might be valid
    214214                } else {
     
    218218
    219219                        // Forum id is empty
    220220                        if ( 0 === $posted_forum_id ) {
    221                                 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
     221                                bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID is missing.', 'bbpress' ) );
    222222
    223223                        // Forum id is a negative number
    224224                        } elseif ( 0 > $posted_forum_id ) {
    225                                 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID cannot be a negative number.', 'bbpress' ) );
     225                                bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID cannot be a negative number.', 'bbpress' ) );
    226226
    227227                        // Forum does not exist
    228228                        } elseif ( ! bbp_get_forum( $posted_forum_id ) ) {
    229                                 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum does not exist.', 'bbpress' ) );
     229                                bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum does not exist.', 'bbpress' ) );
    230230
    231231                        // Use the POST'ed forum id
    232232                        } else {
     
    240240
    241241                // Forum is a category
    242242                if ( bbp_is_forum_category( $forum_id ) ) {
    243                         bbp_add_error( 'bbp_new_reply_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No replies can be created in this forum.', 'bbpress' ) );
     243                        bbp_add_error( 'bbp_new_reply_forum_category', __( '<strong>Error</strong>: This forum is a category. No replies can be created in this forum.', 'bbpress' ) );
    244244
    245245                // Forum is not a category
    246246                } else {
     
    247247
    248248                        // Forum is closed and user cannot access
    249249                        if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) {
    250                                 bbp_add_error( 'bbp_new_reply_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new replies.', 'bbpress' ) );
     250                                bbp_add_error( 'bbp_new_reply_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new replies.', 'bbpress' ) );
    251251                        }
    252252
    253253                        // Forum is private and user cannot access
    254254                        if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
    255                                 bbp_add_error( 'bbp_new_reply_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
     255                                bbp_add_error( 'bbp_new_reply_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
    256256
    257257                        // Forum is hidden and user cannot access
    258258                        } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
    259                                 bbp_add_error( 'bbp_new_reply_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
     259                                bbp_add_error( 'bbp_new_reply_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
    260260                        }
    261261                }
    262262        }
     
    281281
    282282        // Title too long
    283283        if ( bbp_is_title_too_long( $reply_title ) ) {
    284                 bbp_add_error( 'bbp_reply_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) );
     284                bbp_add_error( 'bbp_reply_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) );
    285285        }
    286286
    287287        /** Reply Content *********************************************************/
     
    295295
    296296        // No reply content
    297297        if ( empty( $reply_content ) ) {
    298                 bbp_add_error( 'bbp_reply_content', __( '<strong>ERROR</strong>: Your reply cannot be empty.', 'bbpress' ) );
     298                bbp_add_error( 'bbp_reply_content', __( '<strong>Error</strong>: Your reply cannot be empty.', 'bbpress' ) );
    299299        }
    300300
    301301        /** Reply Flooding ********************************************************/
    302302
    303303        if ( ! bbp_check_for_flood( $anonymous_data, $reply_author ) ) {
    304                 bbp_add_error( 'bbp_reply_flood', __( '<strong>ERROR</strong>: Slow down; you move too fast.', 'bbpress' ) );
     304                bbp_add_error( 'bbp_reply_flood', __( '<strong>Error</strong>: Slow down; you move too fast.', 'bbpress' ) );
    305305        }
    306306
    307307        /** Reply Duplicate *******************************************************/
    308308
    309309        if ( ! bbp_check_for_duplicate( array( 'post_type' => bbp_get_reply_post_type(), 'post_author' => $reply_author, 'post_content' => $reply_content, 'post_parent' => $topic_id, 'anonymous_data' => $anonymous_data ) ) ) {
    310                 bbp_add_error( 'bbp_reply_duplicate', __( '<strong>ERROR</strong>: Duplicate reply detected; it looks as though you&#8217;ve already said that.', 'bbpress' ) );
     310                bbp_add_error( 'bbp_reply_duplicate', __( '<strong>Error</strong>: Duplicate reply detected; it looks as though you&#8217;ve already said that.', 'bbpress' ) );
    311311        }
    312312
    313313        /** Reply Bad Words *******************************************************/
    314314
    315315        if ( ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content, true ) ) {
    316                 bbp_add_error( 'bbp_reply_moderation', __( '<strong>ERROR</strong>: Your reply cannot be created at this time.', 'bbpress' ) );
     316                bbp_add_error( 'bbp_reply_moderation', __( '<strong>Error</strong>: Your reply cannot be created at this time.', 'bbpress' ) );
    317317        }
    318318
    319319        /** Reply Status **********************************************************/
     
    338338
    339339        // If topic is closed, moderators can still reply
    340340        if ( bbp_is_topic_closed( $topic_id ) && ! current_user_can( 'moderate', $topic_id ) ) {
    341                 bbp_add_error( 'bbp_reply_topic_closed', __( '<strong>ERROR</strong>: Topic is closed.', 'bbpress' ) );
     341                bbp_add_error( 'bbp_reply_topic_closed', __( '<strong>Error</strong>: Topic is closed.', 'bbpress' ) );
    342342        }
    343343
    344344        /** Topic Tags ************************************************************/
     
    398398
    399399                // Term error
    400400                if ( is_wp_error( $terms ) ) {
    401                         bbp_add_error( 'bbp_reply_tags', __( '<strong>ERROR</strong>: There was a problem adding the tags to the topic.', 'bbpress' ) );
     401                        bbp_add_error( 'bbp_reply_tags', __( '<strong>Error</strong>: There was a problem adding the tags to the topic.', 'bbpress' ) );
    402402                }
    403403
    404404                /** Trash Check *******************************************************/
     
    471471
    472472        // WP_Error
    473473        } elseif ( is_wp_error( $reply_id ) ) {
    474                 bbp_add_error( 'bbp_reply_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) occurred: %s', 'bbpress' ), $reply_id->get_error_message() ) );
     474                bbp_add_error( 'bbp_reply_error', sprintf( __( '<strong>Error</strong>: The following problem(s) occurred: %s', 'bbpress' ), $reply_id->get_error_message() ) );
    475475
    476476        // Generic error
    477477        } else {
    478                 bbp_add_error( 'bbp_reply_error', __( '<strong>ERROR</strong>: The reply was not created.', 'bbpress' ) );
     478                bbp_add_error( 'bbp_reply_error', __( '<strong>Error</strong>: The reply was not created.', 'bbpress' ) );
    479479        }
    480480}
    481481
     
    503503
    504504        // Reply id was not passed
    505505        if ( empty( $_POST['bbp_reply_id'] ) ) {
    506                 bbp_add_error( 'bbp_edit_reply_id', __( '<strong>ERROR</strong>: Reply ID not found.', 'bbpress' ) );
     506                bbp_add_error( 'bbp_edit_reply_id', __( '<strong>Error</strong>: Reply ID not found.', 'bbpress' ) );
    507507                return;
    508508
    509509        // Reply id was passed
     
    514514
    515515        // Nonce check
    516516        if ( ! bbp_verify_nonce_request( 'bbp-edit-reply_' . $reply_id ) ) {
    517                 bbp_add_error( 'bbp_edit_reply_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     517                bbp_add_error( 'bbp_edit_reply_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    518518                return;
    519519        }
    520520
    521521        // Reply does not exist
    522522        if ( empty( $reply ) ) {
    523                 bbp_add_error( 'bbp_edit_reply_not_found', __( '<strong>ERROR</strong>: The reply you want to edit was not found.', 'bbpress' ) );
     523                bbp_add_error( 'bbp_edit_reply_not_found', __( '<strong>Error</strong>: The reply you want to edit was not found.', 'bbpress' ) );
    524524                return;
    525525
    526526        // Reply exists
     
    531531
    532532                        // User cannot edit this reply
    533533                        if ( ! current_user_can( 'edit_reply', $reply_id ) ) {
    534                                 bbp_add_error( 'bbp_edit_reply_permission', __( '<strong>ERROR</strong>: You do not have permission to edit that reply.', 'bbpress' ) );
     534                                bbp_add_error( 'bbp_edit_reply_permission', __( '<strong>Error</strong>: You do not have permission to edit that reply.', 'bbpress' ) );
    535535                                return;
    536536                        }
    537537
     
    566566
    567567                // Forum is a category
    568568                if ( bbp_is_forum_category( $forum_id ) ) {
    569                         bbp_add_error( 'bbp_edit_reply_forum_category', __( '<strong>ERROR</strong>: This forum is a category. No replies can be created in this forum.', 'bbpress' ) );
     569                        bbp_add_error( 'bbp_edit_reply_forum_category', __( '<strong>Error</strong>: This forum is a category. No replies can be created in this forum.', 'bbpress' ) );
    570570
    571571                // Forum is not a category
    572572                } else {
     
    573573
    574574                        // Forum is closed and user cannot access
    575575                        if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) {
    576                                 bbp_add_error( 'bbp_edit_reply_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new replies.', 'bbpress' ) );
     576                                bbp_add_error( 'bbp_edit_reply_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new replies.', 'bbpress' ) );
    577577                        }
    578578
    579579                        // Forum is private and user cannot access
    580580                        if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
    581                                 bbp_add_error( 'bbp_edit_reply_forum_private', __( '<strong>ERROR</strong>: This forum is private and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
     581                                bbp_add_error( 'bbp_edit_reply_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
    582582
    583583                        // Forum is hidden and user cannot access
    584584                        } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
    585                                 bbp_add_error( 'bbp_edit_reply_forum_hidden', __( '<strong>ERROR</strong>: This forum is hidden and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
     585                                bbp_add_error( 'bbp_edit_reply_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
    586586                        }
    587587                }
    588588        }
     
    598598
    599599        // Title too long
    600600        if ( bbp_is_title_too_long( $reply_title ) ) {
    601                 bbp_add_error( 'bbp_reply_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) );
     601                bbp_add_error( 'bbp_reply_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) );
    602602        }
    603603
    604604        /** Reply Content *********************************************************/
     
    612612
    613613        // No reply content
    614614        if ( empty( $reply_content ) ) {
    615                 bbp_add_error( 'bbp_edit_reply_content', __( '<strong>ERROR</strong>: Your reply cannot be empty.', 'bbpress' ) );
     615                bbp_add_error( 'bbp_edit_reply_content', __( '<strong>Error</strong>: Your reply cannot be empty.', 'bbpress' ) );
    616616        }
    617617
    618618        /** Reply Bad Words *******************************************************/
    619619
    620620        if ( ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content, true ) ) {
    621                 bbp_add_error( 'bbp_reply_moderation', __( '<strong>ERROR</strong>: Your reply cannot be edited at this time.', 'bbpress' ) );
     621                bbp_add_error( 'bbp_reply_moderation', __( '<strong>Error</strong>: Your reply cannot be edited at this time.', 'bbpress' ) );
    622622        }
    623623
    624624        /** Reply Status **********************************************************/
     
    708708
    709709        // Term error
    710710        if ( is_wp_error( $terms ) ) {
    711                 bbp_add_error( 'bbp_reply_tags', __( '<strong>ERROR</strong>: There was a problem adding the tags to the topic.', 'bbpress' ) );
     711                bbp_add_error( 'bbp_reply_tags', __( '<strong>Error</strong>: There was a problem adding the tags to the topic.', 'bbpress' ) );
    712712        }
    713713
    714714        /** No Errors *************************************************************/
     
    766766
    767767        } else {
    768768                $append_error = ( is_wp_error( $reply_id ) && $reply_id->get_error_message() ) ? $reply_id->get_error_message() . ' ' : '';
    769                 bbp_add_error( 'bbp_reply_error', __( '<strong>ERROR</strong>: The following problem(s) have been found with your reply:' . $append_error . 'Please try again.', 'bbpress' ) );
     769                bbp_add_error( 'bbp_reply_error', __( '<strong>Error</strong>: The following problem(s) have been found with your reply:' . $append_error . 'Please try again.', 'bbpress' ) );
    770770        }
    771771}
    772772
     
    12121212        /** Move Reply ***********************************************************/
    12131213
    12141214        if ( empty( $_POST['bbp_reply_id'] ) ) {
    1215                 bbp_add_error( 'bbp_move_reply_reply_id', __( '<strong>ERROR</strong>: A reply ID is required', 'bbpress' ) );
     1215                bbp_add_error( 'bbp_move_reply_reply_id', __( '<strong>Error</strong>: A reply ID is required', 'bbpress' ) );
    12161216        } else {
    12171217                $move_reply_id = (int) $_POST['bbp_reply_id'];
    12181218        }
     
    12211221
    12221222        // Reply exists
    12231223        if ( empty( $move_reply ) ) {
    1224                 bbp_add_error( 'bbp_mover_reply_r_not_found', __( '<strong>ERROR</strong>: The reply you want to move was not found.', 'bbpress' ) );
     1224                bbp_add_error( 'bbp_mover_reply_r_not_found', __( '<strong>Error</strong>: The reply you want to move was not found.', 'bbpress' ) );
    12251225        }
    12261226
    12271227        /** Topic to Move From ***************************************************/
     
    12311231
    12321232        // No topic
    12331233        if ( empty( $source_topic ) ) {
    1234                 bbp_add_error( 'bbp_move_reply_source_not_found', __( '<strong>ERROR</strong>: The topic you want to move from was not found.', 'bbpress' ) );
     1234                bbp_add_error( 'bbp_move_reply_source_not_found', __( '<strong>Error</strong>: The topic you want to move from was not found.', 'bbpress' ) );
    12351235        }
    12361236
    12371237        // Nonce check failed
    12381238        if ( ! bbp_verify_nonce_request( 'bbp-move-reply_' . $move_reply->ID ) ) {
    1239                 bbp_add_error( 'bbp_move_reply_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1239                bbp_add_error( 'bbp_move_reply_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    12401240                return;
    12411241        }
    12421242
    12431243        // Use cannot edit topic
    12441244        if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) {
    1245                 bbp_add_error( 'bbp_move_reply_source_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
     1245                bbp_add_error( 'bbp_move_reply_source_permission', __( '<strong>Error</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
    12461246        }
    12471247
    12481248        // How to move
     
    12521252
    12531253        // Invalid move option
    12541254        if ( empty( $move_option ) || ! in_array( $move_option, array( 'existing', 'topic' ), true ) ) {
    1255                 bbp_add_error( 'bbp_move_reply_option', __( '<strong>ERROR</strong>: You need to choose a valid move option.', 'bbpress' ) );
     1255                bbp_add_error( 'bbp_move_reply_option', __( '<strong>Error</strong>: You need to choose a valid move option.', 'bbpress' ) );
    12561256
    12571257        // Valid move option
    12581258        } else {
     
    12651265
    12661266                                // Get destination topic id
    12671267                                if ( empty( $_POST['bbp_destination_topic'] ) ) {
    1268                                         bbp_add_error( 'bbp_move_reply_destination_id', __( '<strong>ERROR</strong>: A topic ID is required.', 'bbpress' ) );
     1268                                        bbp_add_error( 'bbp_move_reply_destination_id', __( '<strong>Error</strong>: A topic ID is required.', 'bbpress' ) );
    12691269                                } else {
    12701270                                        $destination_topic_id = (int) $_POST['bbp_destination_topic'];
    12711271                                }
     
    12751275
    12761276                                // No destination topic
    12771277                                if ( empty( $destination_topic ) ) {
    1278                                         bbp_add_error( 'bbp_move_reply_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to move to was not found.', 'bbpress' ) );
     1278                                        bbp_add_error( 'bbp_move_reply_destination_not_found', __( '<strong>Error</strong>: The topic you want to move to was not found.', 'bbpress' ) );
    12791279                                }
    12801280
    12811281                                // User cannot edit the destination topic
    12821282                                if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) {
    1283                                         bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
     1283                                        bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>Error</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
    12841284                                }
    12851285
    12861286                                // Bump the reply position
     
    13341334
    13351335                                        // Shouldn't happen
    13361336                                        if ( false === $destination_topic_id || is_wp_error( $destination_topic_id ) || empty( $destination_topic ) ) {
    1337                                                 bbp_add_error( 'bbp_move_reply_destination_reply', __( '<strong>ERROR</strong>: There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) );
     1337                                                bbp_add_error( 'bbp_move_reply_destination_reply', __( '<strong>Error</strong>: There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) );
    13381338                                        }
    13391339
    13401340                                // User cannot publish posts
    13411341                                } else {
    1342                                         bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) );
     1342                                        bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>Error</strong>: You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) );
    13431343                                }
    13441344
    13451345                                break;
     
    14871487        // Make sure reply exists
    14881488        $reply = bbp_get_reply( $reply_id );
    14891489        if ( empty( $reply ) ) {
    1490                 bbp_add_error( 'bbp_toggle_reply_missing', __( '<strong>ERROR</strong>: This reply could not be found or no longer exists.', 'bbpress' ) );
     1490                bbp_add_error( 'bbp_toggle_reply_missing', __( '<strong>Error</strong>: This reply could not be found or no longer exists.', 'bbpress' ) );
    14911491                return;
    14921492        }
    14931493
    14941494        // What is the user doing here?
    14951495        if ( ! current_user_can( 'edit_reply', $reply_id ) || ( 'bbp_toggle_reply_trash' === $action && ! current_user_can( 'delete_reply', $reply_id ) ) ) {
    1496                 bbp_add_error( 'bbp_toggle_reply_permission', __( '<strong>ERROR</strong>: You do not have permission to do that.', 'bbpress' ) );
     1496                bbp_add_error( 'bbp_toggle_reply_permission', __( '<strong>Error</strong>: You do not have permission to do that.', 'bbpress' ) );
    14971497                return;
    14981498        }
    14991499
     
    15691569
    15701570                        $is_approve         = bbp_is_reply_pending( $r['id'] );
    15711571                        $retval['status']   = $is_approve ? bbp_approve_reply( $r['id'] ) : bbp_unapprove_reply( $r['id'] );
    1572                         $retval['message']  = $is_approve ? __( '<strong>ERROR</strong>: There was a problem approving the reply.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem unapproving the reply.', 'bbpress' );
     1572                        $retval['message']  = $is_approve ? __( '<strong>Error</strong>: There was a problem approving the reply.', 'bbpress' ) : __( '<strong>Error</strong>: There was a problem unapproving the reply.', 'bbpress' );
    15731573                        $retval['view_all'] = ! $is_approve;
    15741574
    15751575                        break;
     
    15801580
    15811581                        $is_spam            = bbp_is_reply_spam( $r['id'] );
    15821582                        $retval['status']   = $is_spam ? bbp_unspam_reply( $r['id'] ) : bbp_spam_reply( $r['id'] );
    1583                         $retval['message']  = $is_spam ? __( '<strong>ERROR</strong>: There was a problem unmarking the reply as spam.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem marking the reply as spam.', 'bbpress' );
     1583                        $retval['message']  = $is_spam ? __( '<strong>Error</strong>: There was a problem unmarking the reply as spam.', 'bbpress' ) : __( '<strong>Error</strong>: There was a problem marking the reply as spam.', 'bbpress' );
    15841584                        $retval['view_all'] = ! $is_spam;
    15851585
    15861586                        break;
     
    15951595
    15961596                                        $retval['view_all'] = true;
    15971597                                        $retval['status']   = wp_trash_post( $r['id'] );
    1598                                         $retval['message']  = __( '<strong>ERROR</strong>: There was a problem trashing the reply.', 'bbpress' );
     1598                                        $retval['message']  = __( '<strong>Error</strong>: There was a problem trashing the reply.', 'bbpress' );
    15991599
    16001600                                        break;
    16011601
     
    16031603                                        check_ajax_referer( "untrash-{$nonce_suffix}" );
    16041604
    16051605                                        $retval['status']  = wp_untrash_post( $r['id'] );
    1606                                         $retval['message'] = __( '<strong>ERROR</strong>: There was a problem untrashing the reply.', 'bbpress' );
     1606                                        $retval['message'] = __( '<strong>Error</strong>: There was a problem untrashing the reply.', 'bbpress' );
    16071607
    16081608                                        break;
    16091609
     
    16111611                                        check_ajax_referer( "delete-{$nonce_suffix}" );
    16121612
    16131613                                        $retval['status']  = wp_delete_post( $r['id'] );
    1614                                         $retval['message'] = __( '<strong>ERROR</strong>: There was a problem deleting the reply.', 'bbpress' );
     1614                                        $retval['message'] = __( '<strong>Error</strong>: There was a problem deleting the reply.', 'bbpress' );
    16151615
    16161616                                        break;
    16171617                        }
  • includes/topics/functions.php

     
    102102
    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        }
    108108
     
    129129
    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                }
    135135
     
    155155
    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
    166166        /** Topic Content *********************************************************/
     
    174174
    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
    180180        /** Topic Forum ***********************************************************/
     
    184184
    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
    194194                } else {
     
    198198
    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
    212212                        } else {
     
    220220
    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
    226226                } else {
     
    227227
    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                }
    242242        }
     
    244244        /** Topic Flooding ********************************************************/
    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
    250250        /** Topic Duplicate *******************************************************/
    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
    256256        /** Topic Bad Words *******************************************************/
    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
    262262        /** Topic Status **********************************************************/
     
    397397
    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}
    407407
     
    427427
    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
    433433        // Topic id was passed
     
    438438
    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
    444444        // Topic exists
     
    449449
    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
    455455                        // Set topic author
     
    465465
    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        }
    471471
     
    480480
    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
    486486        } elseif ( is_numeric( $_POST['bbp_forum_id'] ) ) {
     
    495495
    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
    501501                } else {
     
    502502
    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                }
    517517        }
     
    527527
    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
    538538        /** Topic Content *********************************************************/
     
    546546
    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
    552552        /** Topic Bad Words *******************************************************/
    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
    558558        /** Topic Status **********************************************************/
     
    713713
    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}
    719719
     
    10831083
    10841084        // Topic id
    10851085        if ( empty( $_POST['bbp_topic_id'] ) ) {
    1086                 bbp_add_error( 'bbp_merge_topic_source_id', __( '<strong>ERROR</strong>: Topic ID not found.', 'bbpress' ) );
     1086                bbp_add_error( 'bbp_merge_topic_source_id', __( '<strong>Error</strong>: Topic ID not found.', 'bbpress' ) );
    10871087        } else {
    10881088                $source_topic_id = (int) $_POST['bbp_topic_id'];
    10891089        }
     
    10901090
    10911091        // Nonce check
    10921092        if ( ! bbp_verify_nonce_request( 'bbp-merge-topic_' . $source_topic_id ) ) {
    1093                 bbp_add_error( 'bbp_merge_topic_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1093                bbp_add_error( 'bbp_merge_topic_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    10941094                return;
    10951095
    10961096        // Source topic not found
    10971097        } elseif ( ! $source_topic = bbp_get_topic( $source_topic_id ) ) {
    1098                 bbp_add_error( 'bbp_merge_topic_source_not_found', __( '<strong>ERROR</strong>: The topic you want to merge was not found.', 'bbpress' ) );
     1098                bbp_add_error( 'bbp_merge_topic_source_not_found', __( '<strong>Error</strong>: The topic you want to merge was not found.', 'bbpress' ) );
    10991099                return;
    11001100        }
    11011101
    11021102        // Cannot edit source topic
    11031103        if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) {
    1104                 bbp_add_error( 'bbp_merge_topic_source_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
     1104                bbp_add_error( 'bbp_merge_topic_source_permission', __( '<strong>Error</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
    11051105                return;
    11061106        }
    11071107
     
    11091109
    11101110        // Topic id
    11111111        if ( empty( $_POST['bbp_destination_topic'] ) ) {
    1112                 bbp_add_error( 'bbp_merge_topic_destination_id', __( '<strong>ERROR</strong>: Destination topic ID not found.', 'bbpress' ) );
     1112                bbp_add_error( 'bbp_merge_topic_destination_id', __( '<strong>Error</strong>: Destination topic ID not found.', 'bbpress' ) );
    11131113        } else {
    11141114                $destination_topic_id = (int) $_POST['bbp_destination_topic'];
    11151115        }
     
    11161116
    11171117        // Destination topic not found
    11181118        if ( ! $destination_topic = bbp_get_topic( $destination_topic_id ) ) {
    1119                 bbp_add_error( 'bbp_merge_topic_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to merge to was not found.', 'bbpress' ) );
     1119                bbp_add_error( 'bbp_merge_topic_destination_not_found', __( '<strong>Error</strong>: The topic you want to merge to was not found.', 'bbpress' ) );
    11201120        }
    11211121
    11221122        // Cannot edit destination topic
    11231123        if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) {
    1124                 bbp_add_error( 'bbp_merge_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
     1124                bbp_add_error( 'bbp_merge_topic_destination_permission', __( '<strong>Error</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
    11251125        }
    11261126
    11271127        // Bail if errors
     
    13411341        /** Split Reply ***********************************************************/
    13421342
    13431343        if ( empty( $_POST['bbp_reply_id'] ) ) {
    1344                 bbp_add_error( 'bbp_split_topic_reply_id', __( '<strong>ERROR</strong>: A reply ID is required.', 'bbpress' ) );
     1344                bbp_add_error( 'bbp_split_topic_reply_id', __( '<strong>Error</strong>: A reply ID is required.', 'bbpress' ) );
    13451345        } else {
    13461346                $from_reply_id = (int) $_POST['bbp_reply_id'];
    13471347        }
     
    13501350
    13511351        // Reply exists
    13521352        if ( empty( $from_reply ) ) {
    1353                 bbp_add_error( 'bbp_split_topic_r_not_found', __( '<strong>ERROR</strong>: The reply you want to split from was not found.', 'bbpress' ) );
     1353                bbp_add_error( 'bbp_split_topic_r_not_found', __( '<strong>Error</strong>: The reply you want to split from was not found.', 'bbpress' ) );
    13541354        }
    13551355
    13561356        /** Topic to Split ********************************************************/
     
    13601360
    13611361        // No topic
    13621362        if ( empty( $source_topic ) ) {
    1363                 bbp_add_error( 'bbp_split_topic_source_not_found', __( '<strong>ERROR</strong>: The topic you want to split was not found.', 'bbpress' ) );
     1363                bbp_add_error( 'bbp_split_topic_source_not_found', __( '<strong>Error</strong>: The topic you want to split was not found.', 'bbpress' ) );
    13641364        }
    13651365
    13661366        // Nonce check failed
    13671367        if ( ! bbp_verify_nonce_request( 'bbp-split-topic_' . $source_topic->ID ) ) {
    1368                 bbp_add_error( 'bbp_split_topic_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1368                bbp_add_error( 'bbp_split_topic_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    13691369                return;
    13701370        }
    13711371
    13721372        // Use cannot edit topic
    13731373        if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) {
    1374                 bbp_add_error( 'bbp_split_topic_source_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
     1374                bbp_add_error( 'bbp_split_topic_source_permission', __( '<strong>Error</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
    13751375        }
    13761376
    13771377        // How to Split
     
    13811381
    13821382        // Invalid split option
    13831383        if ( empty( $split_option ) || ! in_array( $split_option, array( 'existing', 'reply' ), true ) ) {
    1384                 bbp_add_error( 'bbp_split_topic_option', __( '<strong>ERROR</strong>: You need to choose a valid split option.', 'bbpress' ) );
     1384                bbp_add_error( 'bbp_split_topic_option', __( '<strong>Error</strong>: You need to choose a valid split option.', 'bbpress' ) );
    13851385
    13861386        // Valid Split Option
    13871387        } else {
     
    13941394
    13951395                                // Get destination topic id
    13961396                                if ( empty( $_POST['bbp_destination_topic'] ) ) {
    1397                                         bbp_add_error( 'bbp_split_topic_destination_id', __( '<strong>ERROR</strong>: A topic ID is required.', 'bbpress' ) );
     1397                                        bbp_add_error( 'bbp_split_topic_destination_id', __( '<strong>Error</strong>: A topic ID is required.', 'bbpress' ) );
    13981398                                } else {
    13991399                                        $destination_topic_id = (int) $_POST['bbp_destination_topic'];
    14001400                                }
     
    14041404
    14051405                                // No destination topic
    14061406                                if ( empty( $destination_topic ) ) {
    1407                                         bbp_add_error( 'bbp_split_topic_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to split to was not found.', 'bbpress' ) );
     1407                                        bbp_add_error( 'bbp_split_topic_destination_not_found', __( '<strong>Error</strong>: The topic you want to split to was not found.', 'bbpress' ) );
    14081408                                }
    14091409
    14101410                                // User cannot edit the destination topic
    14111411                                if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) {
    1412                                         bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
     1412                                        bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>Error</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
    14131413                                }
    14141414
    14151415                                break;
     
    14471447
    14481448                                        // Shouldn't happen
    14491449                                        if ( false === $destination_topic_id || is_wp_error( $destination_topic_id ) || empty( $destination_topic ) ) {
    1450                                                 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' ) );
     1450                                                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' ) );
    14511451                                        }
    14521452
    14531453                                // User cannot publish posts
    14541454                                } else {
    1455                                         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' ) );
     1455                                        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' ) );
    14561456                                }
    14571457
    14581458                                break;
     
    16891689
    16901690        // Tag does not exist
    16911691        if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
    1692                 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() ) );
     1692                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() ) );
    16931693                return;
    16941694        }
    16951695
     
    17011701
    17021702                        // Nonce check
    17031703                        if ( ! bbp_verify_nonce_request( 'update-tag_' . $tag_id ) ) {
    1704                                 bbp_add_error( 'bbp_manage_topic_tag_update_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1704                                bbp_add_error( 'bbp_manage_topic_tag_update_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    17051705                                return;
    17061706                        }
    17071707
    17081708                        // Can user edit topic tags?
    17091709                        if ( ! current_user_can( 'edit_topic_tag', $tag_id ) ) {
    1710                                 bbp_add_error( 'bbp_manage_topic_tag_update_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );
     1710                                bbp_add_error( 'bbp_manage_topic_tag_update_permission', __( '<strong>Error</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );
    17111711                                return;
    17121712                        }
    17131713
    17141714                        // No tag name was provided
    17151715                        if ( empty( $_POST['tag-name'] ) || ! $name = $_POST['tag-name'] ) {
    1716                                 bbp_add_error( 'bbp_manage_topic_tag_update_name', __( '<strong>ERROR</strong>: You need to enter a tag name.', 'bbpress' ) );
     1716                                bbp_add_error( 'bbp_manage_topic_tag_update_name', __( '<strong>Error</strong>: You need to enter a tag name.', 'bbpress' ) );
    17171717                                return;
    17181718                        }
    17191719
     
    17281728
    17291729                        // Cannot update tag
    17301730                        if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
    1731                                 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() ) );
     1731                                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() ) );
    17321732                                return;
    17331733                        }
    17341734
     
    17451745
    17461746                        // Nonce check
    17471747                        if ( ! bbp_verify_nonce_request( 'merge-tag_' . $tag_id ) ) {
    1748                                 bbp_add_error( 'bbp_manage_topic_tag_merge_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1748                                bbp_add_error( 'bbp_manage_topic_tag_merge_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    17491749                                return;
    17501750                        }
    17511751
    17521752                        // Can user edit topic tags?
    17531753                        if ( ! current_user_can( 'edit_topic_tags' ) ) {
    1754                                 bbp_add_error( 'bbp_manage_topic_tag_merge_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );
     1754                                bbp_add_error( 'bbp_manage_topic_tag_merge_permission', __( '<strong>Error</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );
    17551755                                return;
    17561756                        }
    17571757
    17581758                        // No tag name was provided
    17591759                        if ( empty( $_POST['tag-existing-name'] ) || ! $name = $_POST['tag-existing-name'] ) {
    1760                                 bbp_add_error( 'bbp_manage_topic_tag_merge_name', __( '<strong>ERROR</strong>: You need to enter a tag name.', 'bbpress' ) );
     1760                                bbp_add_error( 'bbp_manage_topic_tag_merge_name', __( '<strong>Error</strong>: You need to enter a tag name.', 'bbpress' ) );
    17611761                                return;
    17621762                        }
    17631763
     
    17681768
    17691769                        // Problem inserting the new term
    17701770                        if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
    1771                                 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() ) );
     1771                                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() ) );
    17721772                                return;
    17731773                        }
    17741774
     
    17771777
    17781778                        // Attempting to merge a tag into itself
    17791779                        if ( $tag_id === $to_tag ) {
    1780                                 bbp_add_error( 'bbp_manage_topic_tag_merge_same', __( '<strong>ERROR</strong>: The tags which are being merged can not be the same.', 'bbpress' ) );
     1780                                bbp_add_error( 'bbp_manage_topic_tag_merge_same', __( '<strong>Error</strong>: The tags which are being merged can not be the same.', 'bbpress' ) );
    17811781                                return;
    17821782                        }
    17831783
     
    17891789
    17901790                        // Error merging the terms
    17911791                        if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
    1792                                 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() ) );
     1792                                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() ) );
    17931793                                return;
    17941794                        }
    17951795
     
    18061806
    18071807                        // Nonce check
    18081808                        if ( ! bbp_verify_nonce_request( 'delete-tag_' . $tag_id ) ) {
    1809                                 bbp_add_error( 'bbp_manage_topic_tag_delete_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1809                                bbp_add_error( 'bbp_manage_topic_tag_delete_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    18101810                                return;
    18111811                        }
    18121812
    18131813                        // Can user delete topic tags?
    18141814                        if ( ! current_user_can( 'delete_topic_tag', $tag_id ) ) {
    1815                                 bbp_add_error( 'bbp_manage_topic_tag_delete_permission', __( '<strong>ERROR</strong>: You do not have permission to delete the topic tags.', 'bbpress' ) );
     1815                                bbp_add_error( 'bbp_manage_topic_tag_delete_permission', __( '<strong>Error</strong>: You do not have permission to delete the topic tags.', 'bbpress' ) );
    18161816                                return;
    18171817                        }
    18181818
     
    18211821
    18221822                        // Error deleting term
    18231823                        if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
    1824                                 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() ) );
     1824                                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() ) );
    18251825                                return;
    18261826                        }
    18271827
     
    20172017        // Make sure topic exists
    20182018        $topic = bbp_get_topic( $topic_id );
    20192019        if ( empty( $topic ) ) {
    2020                 bbp_add_error( 'bbp_toggle_topic_missing', __( '<strong>ERROR</strong>: This topic could not be found or no longer exists.', 'bbpress' ) );
     2020                bbp_add_error( 'bbp_toggle_topic_missing', __( '<strong>Error</strong>: This topic could not be found or no longer exists.', 'bbpress' ) );
    20212021                return;
    20222022        }
    20232023
    20242024        // What is the user doing here?
    20252025        if ( ! current_user_can( 'edit_topic', $topic_id ) || ( 'bbp_toggle_topic_trash' === $action && ! current_user_can( 'delete_topic', $topic_id ) ) ) {
    2026                 bbp_add_error( 'bbp_toggle_topic_permission', __( '<strong>ERROR</strong>: You do not have permission to do that.', 'bbpress' ) );
     2026                bbp_add_error( 'bbp_toggle_topic_permission', __( '<strong>Error</strong>: You do not have permission to do that.', 'bbpress' ) );
    20272027                return;
    20282028        }
    20292029
     
    21072107
    21082108                        // Feedback
    21092109                        $retval['message'] = ( true === $is_pending )
    2110                                 ? __( '<strong>ERROR</strong>: There was a problem approving the topic.',   'bbpress' )
    2111                                 : __( '<strong>ERROR</strong>: There was a problem unapproving the topic.', 'bbpress' );
     2110                                ? __( '<strong>Error</strong>: There was a problem approving the topic.',   'bbpress' )
     2111                                : __( '<strong>Error</strong>: There was a problem unapproving the topic.', 'bbpress' );
    21122112
    21132113                        break;
    21142114
     
    21252125
    21262126                        // Feedback
    21272127                        $retval['message'] = ( true === $is_open )
    2128                                 ? __( '<strong>ERROR</strong>: There was a problem closing the topic.', 'bbpress' )
    2129                                 : __( '<strong>ERROR</strong>: There was a problem opening the topic.', 'bbpress' );
     2128                                ? __( '<strong>Error</strong>: There was a problem closing the topic.', 'bbpress' )
     2129                                : __( '<strong>Error</strong>: There was a problem opening the topic.', 'bbpress' );
    21302130
    21312131                        break;
    21322132
     
    21442144
    21452145                        // Feedback
    21462146                        $retval['message'] = ( true === $is_sticky )
    2147                                 ? __( '<strong>ERROR</strong>: There was a problem unsticking the topic.', 'bbpress' )
    2148                                 : __( '<strong>ERROR</strong>: There was a problem sticking the topic.',   'bbpress' );
     2147                                ? __( '<strong>Error</strong>: There was a problem unsticking the topic.', 'bbpress' )
     2148                                : __( '<strong>Error</strong>: There was a problem sticking the topic.',   'bbpress' );
    21492149
    21502150                        break;
    21512151
     
    21632163
    21642164                        // Feedback
    21652165                        $retval['message'] = ( true === $is_spam )
    2166                                 ? __( '<strong>ERROR</strong>: There was a problem unmarking the topic as spam.', 'bbpress' )
    2167                                 : __( '<strong>ERROR</strong>: There was a problem marking the topic as spam.',   'bbpress' );
     2166                                ? __( '<strong>Error</strong>: There was a problem unmarking the topic as spam.', 'bbpress' )
     2167                                : __( '<strong>Error</strong>: There was a problem marking the topic as spam.',   'bbpress' );
    21682168
    21692169                        break;
    21702170
     
    21772177
    21782178                                        $retval['view_all']    = true;
    21792179                                        $retval['status']      = wp_trash_post( $r['id'] );
    2180                                         $retval['message']     = __( '<strong>ERROR</strong>: There was a problem trashing the topic.', 'bbpress' );
     2180                                        $retval['message']     = __( '<strong>Error</strong>: There was a problem trashing the topic.', 'bbpress' );
    21812181                                        $retval['redirect_to'] = current_user_can( 'view_trash' )
    21822182                                                ? bbp_get_topic_permalink( $r['id'] )
    21832183                                                : bbp_get_forum_permalink( bbp_get_topic_forum_id( $r['id'] ) );
     
    21882188                                        check_ajax_referer( "untrash-{$nonce_suffix}" );
    21892189
    21902190                                        $retval['status']      = wp_untrash_post( $r['id'] );
    2191                                         $retval['message']     = __( '<strong>ERROR</strong>: There was a problem untrashing the topic.', 'bbpress' );
     2191                                        $retval['message']     = __( '<strong>Error</strong>: There was a problem untrashing the topic.', 'bbpress' );
    21922192                                        $retval['redirect_to'] = bbp_get_topic_permalink( $r['id'] );
    21932193
    21942194                                        break;
     
    21972197                                        check_ajax_referer( "delete-{$nonce_suffix}" );
    21982198
    21992199                                        $retval['status']      = wp_delete_post( $r['id'] );
    2200                                         $retval['message']     = __( '<strong>ERROR</strong>: There was a problem deleting the topic.', 'bbpress' );
     2200                                        $retval['message']     = __( '<strong>Error</strong>: There was a problem deleting the topic.', 'bbpress' );
    22012201                                        $retval['redirect_to'] = bbp_get_forum_permalink( $retval['status']->post_parent );
    22022202
    22032203                                        break;
  • includes/users/engagements.php

     
    605605
    606606        // Check for empty topic
    607607        if ( empty( $topic_id ) ) {
    608                 bbp_add_error( 'bbp_favorite_topic_id', __( '<strong>ERROR</strong>: No topic was found. Which topic are you marking/unmarking as favorite?', 'bbpress' ) );
     608                bbp_add_error( 'bbp_favorite_topic_id', __( '<strong>Error</strong>: No topic was found. Which topic are you marking/unmarking as favorite?', 'bbpress' ) );
    609609
    610610        // Check nonce
    611611        } elseif ( ! bbp_verify_nonce_request( 'toggle-favorite_' . $topic_id ) ) {
    612                 bbp_add_error( 'bbp_favorite_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     612                bbp_add_error( 'bbp_favorite_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    613613
    614614        // Check current user's ability to edit the user
    615615        } elseif ( ! current_user_can( 'edit_user', $user_id ) ) {
    616                 bbp_add_error( 'bbp_favorite_permission', __( '<strong>ERROR</strong>: You do not have permission to edit favorites for that user.', 'bbpress' ) );
     616                bbp_add_error( 'bbp_favorite_permission', __( '<strong>Error</strong>: You do not have permission to edit favorites for that user.', 'bbpress' ) );
    617617        }
    618618
    619619        // Bail if errors
     
    654654
    655655        // Fail! Handle errors
    656656        } elseif ( 'bbp_favorite_remove' === $action ) {
    657                 bbp_add_error( 'bbp_favorite_remove', __( '<strong>ERROR</strong>: There was a problem removing that topic from favorites.', 'bbpress' ) );
     657                bbp_add_error( 'bbp_favorite_remove', __( '<strong>Error</strong>: There was a problem removing that topic from favorites.', 'bbpress' ) );
    658658        } elseif ( 'bbp_favorite_add' === $action ) {
    659                 bbp_add_error( 'bbp_favorite_add',    __( '<strong>ERROR</strong>: There was a problem favoriting that topic.', 'bbpress' ) );
     659                bbp_add_error( 'bbp_favorite_add',    __( '<strong>Error</strong>: There was a problem favoriting that topic.', 'bbpress' ) );
    660660        }
    661661
    662662        return (bool) $success;
     
    846846
    847847        // Check for empty topic
    848848        if ( empty( $object_id ) ) {
    849                 bbp_add_error( 'bbp_subscription_object_id', __( '<strong>ERROR</strong>: Not found. What are you subscribing/unsubscribing to?', 'bbpress' ) );
     849                bbp_add_error( 'bbp_subscription_object_id', __( '<strong>Error</strong>: Not found. What are you subscribing/unsubscribing to?', 'bbpress' ) );
    850850
    851851        // Check nonce
    852852        } elseif ( ! bbp_verify_nonce_request( 'toggle-subscription_' . $object_id ) ) {
    853                 bbp_add_error( 'bbp_subscription_object_id', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     853                bbp_add_error( 'bbp_subscription_object_id', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    854854
    855855        // Check current user's ability to edit the user
    856856        } elseif ( ! current_user_can( 'edit_user', $user_id ) ) {
    857                 bbp_add_error( 'bbp_subscription_permission', __( '<strong>ERROR</strong>: You do not have permission to edit subscriptions of that user.', 'bbpress' ) );
     857                bbp_add_error( 'bbp_subscription_permission', __( '<strong>Error</strong>: You do not have permission to edit subscriptions of that user.', 'bbpress' ) );
    858858        }
    859859
    860860        // Bail if we have errors
     
    897897
    898898        // Fail! Handle errors
    899899        } elseif ( 'bbp_unsubscribe' === $action ) {
    900                 bbp_add_error( 'bbp_unsubscribe', __( '<strong>ERROR</strong>: There was a problem unsubscribing.', 'bbpress' ) );
     900                bbp_add_error( 'bbp_unsubscribe', __( '<strong>Error</strong>: There was a problem unsubscribing.', 'bbpress' ) );
    901901        } elseif ( 'bbp_subscribe' === $action ) {
    902                 bbp_add_error( 'bbp_subscribe',   __( '<strong>ERROR</strong>: There was a problem subscribing.', 'bbpress' ) );
     902                bbp_add_error( 'bbp_subscribe',   __( '<strong>Error</strong>: There was a problem subscribing.', 'bbpress' ) );
    903903        }
    904904
    905905        return (bool) $success;
  • includes/users/functions.php

     
    193193
    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        }
    199199
    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        }
    205205
    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        }
    211211
     
    217217
    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                }
    223223
    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                }
    229229
     
    340340                        if ( email_exists( $new_email['newemail'] ) ) {
    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
    346346                        } else {
     
    377377        // Delete new email address from user options
    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                }
    383383
     
    403403
    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        }
    409409