Skip to:
Content

bbPress.org

Ticket #3210: 3210.diff

File 3210.diff, 74.4 KB (added by johnjamesjacoby, 8 years ago)

Move many "ERROR" usages into 1

  • src/includes/common/functions.php

     
    526526        // Filter name
    527527        $r['bbp_anonymous_name'] = apply_filters( 'bbp_pre_anonymous_post_author_name', $r['bbp_anonymous_name'] );
    528528        if ( empty( $r['bbp_anonymous_name'] ) ) {
    529                 bbp_add_error( 'bbp_anonymous_name',  __( '<strong>ERROR</strong>: Invalid author name.', 'bbpress' ) );
     529                bbp_add_error( 'bbp_anonymous_name',  __( 'Invalid author name.', 'bbpress' ) );
    530530        }
    531531
    532532        // Filter email address
    533533        $r['bbp_anonymous_email'] = apply_filters( 'bbp_pre_anonymous_post_author_email', $r['bbp_anonymous_email'] );
    534534        if ( empty( $r['bbp_anonymous_email'] ) ) {
    535                 bbp_add_error( 'bbp_anonymous_email', __( '<strong>ERROR</strong>: Invalid email address.', 'bbpress' ) );
     535                bbp_add_error( 'bbp_anonymous_email', __( 'Invalid email address.', 'bbpress' ) );
    536536        }
    537537
    538538        // Website is optional (can be empty)
  • src/includes/core/functions.php

     
    286286 * @param string $message Translated error message
    287287 * @param string $data Any additional data passed with the error message
    288288 */
    289 function bbp_add_error( $code = '', $message = '', $data = '' ) {
     289function bbp_add_notice( $code = '', $message = '', $data = '' ) {
    290290        bbpress()->errors->add( $code, $message, $data );
    291291}
    292292
    293293/**
     294 * Adds an error message to later be output in the theme
     295 *
     296 * @since 2.0.0 bbPress (r3381)
     297 *
     298 * @see WP_Error()
     299 *
     300 * @param string $code Unique code for the error message
     301 * @param string $message Translated error message
     302 * @param string $data Any additional data passed with the error message
     303 */
     304function bbp_add_error( $code = '', $message = '', $data = '' ) {
     305
     306        // Add "Error" prefix
     307        $prefix  = __( '<strong>ERROR</strong>: ', 'bbpress' );
     308
     309        bbpress()->errors->add( $code, $prefix . $message, $data );
     310}
     311
     312/**
    294313 * Check if error messages exist in queue
    295314 *
    296315 * @since 2.0.0 bbPress (r3381)
  • src/includes/extend/buddypress/groups.php

     
    397397
    398398                // Theme-side Nonce check
    399399                } elseif ( ! bbp_verify_nonce_request( 'groups_edit_save_' . $this->slug ) ) {
    400                         bbp_add_error( 'bbp_edit_group_forum_screen_save', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     400                        bbp_add_error( 'bbp_edit_group_forum_screen_save', __( 'Are you sure you wanted to do that?', 'bbpress' ) );
    401401                        return;
    402402                }
    403403
    … …  
    554554
    555555                // Nonce check
    556556                if ( ! bbp_verify_nonce_request( 'groups_create_save_' . $this->slug ) ) {
    557                         bbp_add_error( 'bbp_create_group_forum_screen_save', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     557                        bbp_add_error( 'bbp_create_group_forum_screen_save', __( 'Are you sure you wanted to do that?', 'bbpress' ) );
    558558                        return;
    559559                }
    560560
  • src/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', __( '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', __( 'You do not have permission to mark notifications for that user.', 'bbpress' ) );
    201201        }
    202202
    203203        // Bail if we have errors
  • src/includes/forums/functions.php

     
    119119
    120120        // Nonce check
    121121        if ( ! bbp_verify_nonce_request( 'bbp-new-forum' ) ) {
    122                 bbp_add_error( 'bbp_new_forum_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     122                bbp_add_error( 'bbp_new_forum_nonce', __( 'Are you sure you wanted to do that?', 'bbpress' ) );
    123123                return;
    124124        }
    125125
    … …  
    133133
    134134        // User cannot create forums
    135135        if ( ! current_user_can( 'publish_forums' ) ) {
    136                 bbp_add_error( 'bbp_forum_permission', __( '<strong>ERROR</strong>: You do not have permission to create new forums.', 'bbpress' ) );
     136                bbp_add_error( 'bbp_forum_permission', __( 'You do not have permission to create new forums.', 'bbpress' ) );
    137137                return;
    138138        }
    139139
    … …  
    158158
    159159        // No forum title
    160160        if ( empty( $forum_title ) ) {
    161                 bbp_add_error( 'bbp_forum_title', __( '<strong>ERROR</strong>: Your forum needs a title.', 'bbpress' ) );
     161                bbp_add_error( 'bbp_forum_title', __( 'Your forum needs a title.', 'bbpress' ) );
    162162        }
    163163
    164164        // Title too long
    165165        if ( bbp_is_title_too_long( $forum_title ) ) {
    166                 bbp_add_error( 'bbp_forum_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) );
     166                bbp_add_error( 'bbp_forum_title', __( 'Your title is too long.', 'bbpress' ) );
    167167        }
    168168
    169169        /** Forum Content *********************************************************/
    … …  
    177177
    178178        // No forum content
    179179        if ( empty( $forum_content ) ) {
    180                 bbp_add_error( 'bbp_forum_content', __( '<strong>ERROR</strong>: Your forum description cannot be empty.', 'bbpress' ) );
     180                bbp_add_error( 'bbp_forum_content', __( 'Your forum description cannot be empty.', 'bbpress' ) );
    181181        }
    182182
    183183        /** Forum Parent **********************************************************/
    … …  
    192192
    193193        // No forum parent was passed (should never happen)
    194194        if ( empty( $forum_parent_id ) ) {
    195                 bbp_add_error( 'bbp_new_forum_missing_parent', __( '<strong>ERROR</strong>: Your forum must have a parent.', 'bbpress' ) );
     195                bbp_add_error( 'bbp_new_forum_missing_parent', __( 'Your forum must have a parent.', 'bbpress' ) );
    196196
    197197        // Forum exists
    198198        } elseif ( ! empty( $forum_parent_id ) ) {
    199199
    200200                // Forum is a category
    201201                if ( bbp_is_forum_category( $forum_parent_id ) ) {
    202                         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' ) );
     202                        bbp_add_error( 'bbp_new_forum_forum_category', __( 'This forum is a category. No forums can be created in this forum.', 'bbpress' ) );
    203203                }
    204204
    205205                // Forum is closed and user cannot access
    206206                if ( bbp_is_forum_closed( $forum_parent_id ) && ! current_user_can( 'edit_forum', $forum_parent_id ) ) {
    207                         bbp_add_error( 'bbp_new_forum_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new forums.', 'bbpress' ) );
     207                        bbp_add_error( 'bbp_new_forum_forum_closed', __( 'This forum has been closed to new forums.', 'bbpress' ) );
    208208                }
    209209
    210210                // Forum is private and user cannot access
    211211                if ( bbp_is_forum_private( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
    212                         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' ) );
     212                        bbp_add_error( 'bbp_new_forum_forum_private', __( 'This forum is private and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
    213213                }
    214214
    215215                // Forum is hidden and user cannot access
    216216                if ( bbp_is_forum_hidden( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
    217                         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' ) );
     217                        bbp_add_error( 'bbp_new_forum_forum_hidden', __( 'This forum is hidden and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
    218218                }
    219219        }
    220220
    221221        /** Forum Flooding ********************************************************/
    222222
    223223        if ( ! bbp_check_for_flood( $anonymous_data, $forum_author ) ) {
    224                 bbp_add_error( 'bbp_forum_flood', __( '<strong>ERROR</strong>: Slow down; you move too fast.', 'bbpress' ) );
     224                bbp_add_error( 'bbp_forum_flood', __( 'Slow down; you move too fast.', 'bbpress' ) );
    225225        }
    226226
    227227        /** Forum Duplicate *******************************************************/
    228228
    229229        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 ) ) ) {
    230                 bbp_add_error( 'bbp_forum_duplicate', __( '<strong>ERROR</strong>: This forum already exists.', 'bbpress' ) );
     230                bbp_add_error( 'bbp_forum_duplicate', __( 'This forum already exists.', 'bbpress' ) );
    231231        }
    232232
    233233        /** Forum Blacklist *******************************************************/
    234234
    235235        if ( ! bbp_check_for_blacklist( $anonymous_data, $forum_author, $forum_title, $forum_content ) ) {
    236                 bbp_add_error( 'bbp_forum_blacklist', __( '<strong>ERROR</strong>: Your forum cannot be created at this time.', 'bbpress' ) );
     236                bbp_add_error( 'bbp_forum_blacklist', __( 'Your forum cannot be created at this time.', 'bbpress' ) );
    237237        }
    238238
    239239        /** Forum Moderation ******************************************************/
    … …  
    346346
    347347        // WP_Error
    348348        } elseif ( is_wp_error( $forum_id ) ) {
    349                 bbp_add_error( 'bbp_forum_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) occurred: %s', 'bbpress' ), $forum_id->get_error_message() ) );
     349                bbp_add_error( 'bbp_forum_error', sprintf( __( 'The following problem(s) occurred: %s', 'bbpress' ), $forum_id->get_error_message() ) );
    350350
    351351        // Generic error
    352352        } else {
    353                 bbp_add_error( 'bbp_forum_error', __( '<strong>ERROR</strong>: The forum was not created.', 'bbpress' ) );
     353                bbp_add_error( 'bbp_forum_error', __( 'The forum was not created.', 'bbpress' ) );
    354354        }
    355355}
    356356
    … …  
    375375
    376376        // Forum id was not passed
    377377        if ( empty( $_POST['bbp_forum_id'] ) ) {
    378                 bbp_add_error( 'bbp_edit_forum_id', __( '<strong>ERROR</strong>: Forum ID not found.', 'bbpress' ) );
     378                bbp_add_error( 'bbp_edit_forum_id', __( 'Forum ID not found.', 'bbpress' ) );
    379379                return;
    380380
    381381        // Forum id was passed
    … …  
    386386
    387387        // Nonce check
    388388        if ( ! bbp_verify_nonce_request( 'bbp-edit-forum_' . $forum_id ) ) {
    389                 bbp_add_error( 'bbp_edit_forum_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     389                bbp_add_error( 'bbp_edit_forum_nonce', __( 'Are you sure you wanted to do that?', 'bbpress' ) );
    390390                return;
    391391
    392392        // Forum does not exist
    393393        } elseif ( empty( $forum ) ) {
    394                 bbp_add_error( 'bbp_edit_forum_not_found', __( '<strong>ERROR</strong>: The forum you want to edit was not found.', 'bbpress' ) );
     394                bbp_add_error( 'bbp_edit_forum_not_found', __( 'The forum you want to edit was not found.', 'bbpress' ) );
    395395                return;
    396396
    397397        // User cannot edit this forum
    398398        } elseif ( ! current_user_can( 'edit_forum', $forum_id ) ) {
    399                 bbp_add_error( 'bbp_edit_forum_permission', __( '<strong>ERROR</strong>: You do not have permission to edit that forum.', 'bbpress' ) );
     399                bbp_add_error( 'bbp_edit_forum_permission', __( 'You do not have permission to edit that forum.', 'bbpress' ) );
    400400                return;
    401401        }
    402402
    … …  
    422422
    423423                // Forum is closed and user cannot access
    424424                if ( bbp_is_forum_closed( $forum_parent_id ) && ! current_user_can( 'edit_forum', $forum_parent_id ) ) {
    425                         bbp_add_error( 'bbp_edit_forum_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new forums.', 'bbpress' ) );
     425                        bbp_add_error( 'bbp_edit_forum_forum_closed', __( 'This forum has been closed to new forums.', 'bbpress' ) );
    426426                }
    427427
    428428                // Forum is private and user cannot access
    429429                if ( bbp_is_forum_private( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
    430                         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' ) );
     430                        bbp_add_error( 'bbp_edit_forum_forum_private', __( 'This forum is private and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
    431431                }
    432432
    433433                // Forum is hidden and user cannot access
    434434                if ( bbp_is_forum_hidden( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) {
    435                         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' ) );
     435                        bbp_add_error( 'bbp_edit_forum_forum_hidden', __( 'This forum is hidden and you do not have the capability to read or create new forums in it.', 'bbpress' ) );
    436436                }
    437437        }
    438438
    … …  
    447447
    448448        // No forum title
    449449        if ( empty( $forum_title ) ) {
    450                 bbp_add_error( 'bbp_edit_forum_title', __( '<strong>ERROR</strong>: Your forum needs a title.', 'bbpress' ) );
     450                bbp_add_error( 'bbp_edit_forum_title', __( 'Your forum needs a title.', 'bbpress' ) );
    451451        }
    452452
    453453        // Title too long
    454454        if ( bbp_is_title_too_long( $forum_title ) ) {
    455                 bbp_add_error( 'bbp_forum_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) );
     455                bbp_add_error( 'bbp_forum_title', __( 'Your title is too long.', 'bbpress' ) );
    456456        }
    457457
    458458        /** Forum Content *********************************************************/
    … …  
    466466
    467467        // No forum content
    468468        if ( empty( $forum_content ) ) {
    469                 bbp_add_error( 'bbp_edit_forum_content', __( '<strong>ERROR</strong>: Your forum description cannot be empty.', 'bbpress' ) );
     469                bbp_add_error( 'bbp_edit_forum_content', __( 'Your forum description cannot be empty.', 'bbpress' ) );
    470470        }
    471471
    472472        /** Forum Blacklist *******************************************************/
    473473
    474474        if ( ! bbp_check_for_blacklist( $anonymous_data, bbp_get_forum_author_id( $forum_id ), $forum_title, $forum_content ) ) {
    475                 bbp_add_error( 'bbp_forum_blacklist', __( '<strong>ERROR</strong>: Your forum cannot be edited at this time.', 'bbpress' ) );
     475                bbp_add_error( 'bbp_forum_blacklist', __( 'Your forum cannot be edited at this time.', 'bbpress' ) );
    476476        }
    477477
    478478        /** Forum Moderation ******************************************************/
    … …  
    586586
    587587        } else {
    588588                $append_error = ( is_wp_error( $forum_id ) && $forum_id->get_error_message() ) ? $forum_id->get_error_message() . ' ' : '';
    589                 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' ) );
     589                bbp_add_error( 'bbp_forum_error', __( 'The following problem(s) have been found with your forum:' . $append_error . 'Please try again.', 'bbpress' ) );
    590590        }
    591591}
    592592
  • src/includes/replies/functions.php

     
    126126
    127127        // Nonce check
    128128        if ( ! bbp_verify_nonce_request( 'bbp-new-reply' ) ) {
    129                 bbp_add_error( 'bbp_new_reply_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     129                bbp_add_error( 'bbp_new_reply_nonce', __( 'Are you sure you wanted to do that?', 'bbpress' ) );
    130130                return;
    131131        }
    132132
    … …  
    151151
    152152                // User cannot create replies
    153153                if ( ! current_user_can( 'publish_replies' ) ) {
    154                         bbp_add_error( 'bbp_reply_permission', __( '<strong>ERROR</strong>: You do not have permission to reply.', 'bbpress' ) );
     154                        bbp_add_error( 'bbp_reply_permission', __( 'You do not have permission to reply.', 'bbpress' ) );
    155155                }
    156156
    157157                // Reply author is current user
    … …  
    162162
    163163        // Topic id was not passed
    164164        if ( empty( $_POST['bbp_topic_id'] ) ) {
    165                 bbp_add_error( 'bbp_reply_topic_id', __( '<strong>ERROR</strong>: Topic ID is missing.', 'bbpress' ) );
     165                bbp_add_error( 'bbp_reply_topic_id', __( 'Topic ID is missing.', 'bbpress' ) );
    166166
    167167        // Topic id is not a number
    168168        } elseif ( ! is_numeric( $_POST['bbp_topic_id'] ) ) {
    169                 bbp_add_error( 'bbp_reply_topic_id', __( '<strong>ERROR</strong>: Topic ID must be a number.', 'bbpress' ) );
     169                bbp_add_error( 'bbp_reply_topic_id', __( 'Topic ID must be a number.', 'bbpress' ) );
    170170
    171171        // Topic id might be valid
    172172        } else {
    … …  
    176176
    177177                // Topic id is a negative number
    178178                if ( 0 > $posted_topic_id ) {
    179                         bbp_add_error( 'bbp_reply_topic_id', __( '<strong>ERROR</strong>: Topic ID cannot be a negative number.', 'bbpress' ) );
     179                        bbp_add_error( 'bbp_reply_topic_id', __( 'Topic ID cannot be a negative number.', 'bbpress' ) );
    180180
    181181                // Topic does not exist
    182182                } elseif ( ! bbp_get_topic( $posted_topic_id ) ) {
    183                         bbp_add_error( 'bbp_reply_topic_id', __( '<strong>ERROR</strong>: Topic does not exist.', 'bbpress' ) );
     183                        bbp_add_error( 'bbp_reply_topic_id', __( 'Topic does not exist.', 'bbpress' ) );
    184184
    185185                // Use the POST'ed topic id
    186186                } else {
    … …  
    199199
    200200                // Empty Forum id was passed
    201201                if ( empty( $_POST['bbp_forum_id'] ) ) {
    202                         bbp_add_error( 'bbp_reply_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
     202                        bbp_add_error( 'bbp_reply_forum_id', __( 'Forum ID is missing.', 'bbpress' ) );
    203203
    204204                // Forum id is not a number
    205205                } elseif ( ! is_numeric( $_POST['bbp_forum_id'] ) ) {
    206                         bbp_add_error( 'bbp_reply_forum_id', __( '<strong>ERROR</strong>: Forum ID must be a number.', 'bbpress' ) );
     206                        bbp_add_error( 'bbp_reply_forum_id', __( 'Forum ID must be a number.', 'bbpress' ) );
    207207
    208208                // Forum id might be valid
    209209                } else {
    … …  
    213213
    214214                        // Forum id is empty
    215215                        if ( 0 === $posted_forum_id ) {
    216                                 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID is missing.', 'bbpress' ) );
     216                                bbp_add_error( 'bbp_topic_forum_id', __( 'Forum ID is missing.', 'bbpress' ) );
    217217
    218218                        // Forum id is a negative number
    219219                        } elseif ( 0 > $posted_forum_id ) {
    220                                 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum ID cannot be a negative number.', 'bbpress' ) );
     220                                bbp_add_error( 'bbp_topic_forum_id', __( 'Forum ID cannot be a negative number.', 'bbpress' ) );
    221221
    222222                        // Forum does not exist
    223223                        } elseif ( ! bbp_get_forum( $posted_forum_id ) ) {
    224                                 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>ERROR</strong>: Forum does not exist.', 'bbpress' ) );
     224                                bbp_add_error( 'bbp_topic_forum_id', __( 'Forum does not exist.', 'bbpress' ) );
    225225
    226226                        // Use the POST'ed forum id
    227227                        } else {
    … …  
    235235
    236236                // Forum is a category
    237237                if ( bbp_is_forum_category( $forum_id ) ) {
    238                         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' ) );
     238                        bbp_add_error( 'bbp_new_reply_forum_category', __( 'This forum is a category. No replies can be created in this forum.', 'bbpress' ) );
    239239
    240240                // Forum is not a category
    241241                } else {
    242242
    243243                        // Forum is closed and user cannot access
    244244                        if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) {
    245                                 bbp_add_error( 'bbp_new_reply_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new replies.', 'bbpress' ) );
     245                                bbp_add_error( 'bbp_new_reply_forum_closed', __( 'This forum has been closed to new replies.', 'bbpress' ) );
    246246                        }
    247247
    248248                        // Forum is private and user cannot access
    249249                        if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
    250                                 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' ) );
     250                                bbp_add_error( 'bbp_new_reply_forum_private', __( 'This forum is private and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
    251251
    252252                        // Forum is hidden and user cannot access
    253253                        } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
    254                                 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' ) );
     254                                bbp_add_error( 'bbp_new_reply_forum_hidden', __( 'This forum is hidden and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
    255255                        }
    256256                }
    257257        }
    … …  
    276276
    277277        // Title too long
    278278        if ( bbp_is_title_too_long( $reply_title ) ) {
    279                 bbp_add_error( 'bbp_reply_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) );
     279                bbp_add_error( 'bbp_reply_title', __( 'Your title is too long.', 'bbpress' ) );
    280280        }
    281281
    282282        /** Reply Content *********************************************************/
    … …  
    290290
    291291        // No reply content
    292292        if ( empty( $reply_content ) ) {
    293                 bbp_add_error( 'bbp_reply_content', __( '<strong>ERROR</strong>: Your reply cannot be empty.', 'bbpress' ) );
     293                bbp_add_error( 'bbp_reply_content', __( 'Your reply cannot be empty.', 'bbpress' ) );
    294294        }
    295295
    296296        /** Reply Flooding ********************************************************/
    297297
    298298        if ( ! bbp_check_for_flood( $anonymous_data, $reply_author ) ) {
    299                 bbp_add_error( 'bbp_reply_flood', __( '<strong>ERROR</strong>: Slow down; you move too fast.', 'bbpress' ) );
     299                bbp_add_error( 'bbp_reply_flood', __( 'Slow down; you move too fast.', 'bbpress' ) );
    300300        }
    301301
    302302        /** Reply Duplicate *******************************************************/
    303303
    304304        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 ) ) ) {
    305                 bbp_add_error( 'bbp_reply_duplicate', __( '<strong>ERROR</strong>: Duplicate reply detected; it looks as though you&#8217;ve already said that.', 'bbpress' ) );
     305                bbp_add_error( 'bbp_reply_duplicate', __( 'Duplicate reply detected; it looks as though you&#8217;ve already said that.', 'bbpress' ) );
    306306        }
    307307
    308308        /** Reply Blacklist *******************************************************/
    309309
    310310        if ( ! bbp_check_for_blacklist( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) {
    311                 bbp_add_error( 'bbp_reply_blacklist', __( '<strong>ERROR</strong>: Your reply cannot be created at this time.', 'bbpress' ) );
     311                bbp_add_error( 'bbp_reply_blacklist', __( 'Your reply cannot be created at this time.', 'bbpress' ) );
    312312        }
    313313
    314314        /** Reply Status **********************************************************/
    … …  
    333333
    334334        // If topic is closed, moderators can still reply
    335335        if ( bbp_is_topic_closed( $topic_id ) && ! current_user_can( 'moderate', $topic_id ) ) {
    336                 bbp_add_error( 'bbp_reply_topic_closed', __( '<strong>ERROR</strong>: Topic is closed.', 'bbpress' ) );
     336                bbp_add_error( 'bbp_reply_topic_closed', __( 'Topic is closed.', 'bbpress' ) );
    337337        }
    338338
    339339        /** Topic Tags ************************************************************/
    … …  
    393393
    394394                // Term error
    395395                if ( is_wp_error( $terms ) ) {
    396                         bbp_add_error( 'bbp_reply_tags', __( '<strong>ERROR</strong>: There was a problem adding the tags to the topic.', 'bbpress' ) );
     396                        bbp_add_error( 'bbp_reply_tags', __( 'There was a problem adding the tags to the topic.', 'bbpress' ) );
    397397                }
    398398
    399399                /** Trash Check *******************************************************/
    … …  
    466466
    467467        // WP_Error
    468468        } elseif ( is_wp_error( $reply_id ) ) {
    469                 bbp_add_error( 'bbp_reply_error', sprintf( __( '<strong>ERROR</strong>: The following problem(s) occurred: %s', 'bbpress' ), $reply_id->get_error_message() ) );
     469                bbp_add_error( 'bbp_reply_error', sprintf( __( 'The following problem(s) occurred: %s', 'bbpress' ), $reply_id->get_error_message() ) );
    470470
    471471        // Generic error
    472472        } else {
    473                 bbp_add_error( 'bbp_reply_error', __( '<strong>ERROR</strong>: The reply was not created.', 'bbpress' ) );
     473                bbp_add_error( 'bbp_reply_error', __( 'The reply was not created.', 'bbpress' ) );
    474474        }
    475475}
    476476
    … …  
    498498
    499499        // Reply id was not passed
    500500        if ( empty( $_POST['bbp_reply_id'] ) ) {
    501                 bbp_add_error( 'bbp_edit_reply_id', __( '<strong>ERROR</strong>: Reply ID not found.', 'bbpress' ) );
     501                bbp_add_error( 'bbp_edit_reply_id', __( 'Reply ID not found.', 'bbpress' ) );
    502502                return;
    503503
    504504        // Reply id was passed
    … …  
    509509
    510510        // Nonce check
    511511        if ( ! bbp_verify_nonce_request( 'bbp-edit-reply_' . $reply_id ) ) {
    512                 bbp_add_error( 'bbp_edit_reply_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     512                bbp_add_error( 'bbp_edit_reply_nonce', __( 'Are you sure you wanted to do that?', 'bbpress' ) );
    513513                return;
    514514        }
    515515
    516516        // Reply does not exist
    517517        if ( empty( $reply ) ) {
    518                 bbp_add_error( 'bbp_edit_reply_not_found', __( '<strong>ERROR</strong>: The reply you want to edit was not found.', 'bbpress' ) );
     518                bbp_add_error( 'bbp_edit_reply_not_found', __( 'The reply you want to edit was not found.', 'bbpress' ) );
    519519                return;
    520520
    521521        // Reply exists
    … …  
    526526
    527527                        // User cannot edit this reply
    528528                        if ( ! current_user_can( 'edit_reply', $reply_id ) ) {
    529                                 bbp_add_error( 'bbp_edit_reply_permission', __( '<strong>ERROR</strong>: You do not have permission to edit that reply.', 'bbpress' ) );
     529                                bbp_add_error( 'bbp_edit_reply_permission', __( 'You do not have permission to edit that reply.', 'bbpress' ) );
    530530                                return;
    531531                        }
    532532
    … …  
    561561
    562562                // Forum is a category
    563563                if ( bbp_is_forum_category( $forum_id ) ) {
    564                         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' ) );
     564                        bbp_add_error( 'bbp_edit_reply_forum_category', __( 'This forum is a category. No replies can be created in this forum.', 'bbpress' ) );
    565565
    566566                // Forum is not a category
    567567                } else {
    568568
    569569                        // Forum is closed and user cannot access
    570570                        if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) {
    571                                 bbp_add_error( 'bbp_edit_reply_forum_closed', __( '<strong>ERROR</strong>: This forum has been closed to new replies.', 'bbpress' ) );
     571                                bbp_add_error( 'bbp_edit_reply_forum_closed', __( 'This forum has been closed to new replies.', 'bbpress' ) );
    572572                        }
    573573
    574574                        // Forum is private and user cannot access
    575575                        if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
    576                                 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' ) );
     576                                bbp_add_error( 'bbp_edit_reply_forum_private', __( 'This forum is private and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
    577577
    578578                        // Forum is hidden and user cannot access
    579579                        } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) {
    580                                 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' ) );
     580                                bbp_add_error( 'bbp_edit_reply_forum_hidden', __( 'This forum is hidden and you do not have the capability to read or create new replies in it.', 'bbpress' ) );
    581581                        }
    582582                }
    583583        }
    … …  
    593593
    594594        // Title too long
    595595        if ( bbp_is_title_too_long( $reply_title ) ) {
    596                 bbp_add_error( 'bbp_reply_title', __( '<strong>ERROR</strong>: Your title is too long.', 'bbpress' ) );
     596                bbp_add_error( 'bbp_reply_title', __( 'Your title is too long.', 'bbpress' ) );
    597597        }
    598598
    599599        /** Reply Content *********************************************************/
    … …  
    607607
    608608        // No reply content
    609609        if ( empty( $reply_content ) ) {
    610                 bbp_add_error( 'bbp_edit_reply_content', __( '<strong>ERROR</strong>: Your reply cannot be empty.', 'bbpress' ) );
     610                bbp_add_error( 'bbp_edit_reply_content', __( 'Your reply cannot be empty.', 'bbpress' ) );
    611611        }
    612612
    613613        /** Reply Blacklist *******************************************************/
    614614
    615615        if ( ! bbp_check_for_blacklist( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) {
    616                 bbp_add_error( 'bbp_reply_blacklist', __( '<strong>ERROR</strong>: Your reply cannot be edited at this time.', 'bbpress' ) );
     616                bbp_add_error( 'bbp_reply_blacklist', __( 'Your reply cannot be edited at this time.', 'bbpress' ) );
    617617        }
    618618
    619619        /** Reply Status **********************************************************/
    … …  
    703703
    704704        // Term error
    705705        if ( is_wp_error( $terms ) ) {
    706                 bbp_add_error( 'bbp_reply_tags', __( '<strong>ERROR</strong>: There was a problem adding the tags to the topic.', 'bbpress' ) );
     706                bbp_add_error( 'bbp_reply_tags', __( 'There was a problem adding the tags to the topic.', 'bbpress' ) );
    707707        }
    708708
    709709        /** No Errors *************************************************************/
    … …  
    761761
    762762        } else {
    763763                $append_error = ( is_wp_error( $reply_id ) && $reply_id->get_error_message() ) ? $reply_id->get_error_message() . ' ' : '';
    764                 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' ) );
     764                bbp_add_error( 'bbp_reply_error', __( 'The following problem(s) have been found with your reply:' . $append_error . 'Please try again.', 'bbpress' ) );
    765765        }
    766766}
    767767
    … …  
    11951195        /** Move Reply ***********************************************************/
    11961196
    11971197        if ( empty( $_POST['bbp_reply_id'] ) ) {
    1198                 bbp_add_error( 'bbp_move_reply_reply_id', __( '<strong>ERROR</strong>: A reply ID is required', 'bbpress' ) );
     1198                bbp_add_error( 'bbp_move_reply_reply_id', __( 'A reply ID is required', 'bbpress' ) );
    11991199        } else {
    12001200                $move_reply_id = (int) $_POST['bbp_reply_id'];
    12011201        }
    … …  
    12041204
    12051205        // Reply exists
    12061206        if ( empty( $move_reply ) ) {
    1207                 bbp_add_error( 'bbp_mover_reply_r_not_found', __( '<strong>ERROR</strong>: The reply you want to move was not found.', 'bbpress' ) );
     1207                bbp_add_error( 'bbp_mover_reply_r_not_found', __( 'The reply you want to move was not found.', 'bbpress' ) );
    12081208        }
    12091209
    12101210        /** Topic to Move From ***************************************************/
    … …  
    12141214
    12151215        // No topic
    12161216        if ( empty( $source_topic ) ) {
    1217                 bbp_add_error( 'bbp_move_reply_source_not_found', __( '<strong>ERROR</strong>: The topic you want to move from was not found.', 'bbpress' ) );
     1217                bbp_add_error( 'bbp_move_reply_source_not_found', __( 'The topic you want to move from was not found.', 'bbpress' ) );
    12181218        }
    12191219
    12201220        // Nonce check failed
    12211221        if ( ! bbp_verify_nonce_request( 'bbp-move-reply_' . $move_reply->ID ) ) {
    1222                 bbp_add_error( 'bbp_move_reply_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1222                bbp_add_error( 'bbp_move_reply_nonce', __( 'Are you sure you wanted to do that?', 'bbpress' ) );
    12231223                return;
    12241224        }
    12251225
    12261226        // Use cannot edit topic
    12271227        if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) {
    1228                 bbp_add_error( 'bbp_move_reply_source_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
     1228                bbp_add_error( 'bbp_move_reply_source_permission', __( 'You do not have permission to edit the source topic.', 'bbpress' ) );
    12291229        }
    12301230
    12311231        // How to move
    … …  
    12351235
    12361236        // Invalid move option
    12371237        if ( empty( $move_option ) || ! in_array( $move_option, array( 'existing', 'topic' ), true ) ) {
    1238                 bbp_add_error( 'bbp_move_reply_option', __( '<strong>ERROR</strong>: You need to choose a valid move option.', 'bbpress' ) );
     1238                bbp_add_error( 'bbp_move_reply_option', __( 'You need to choose a valid move option.', 'bbpress' ) );
    12391239
    12401240        // Valid move option
    12411241        } else {
    … …  
    12481248
    12491249                                // Get destination topic id
    12501250                                if ( empty( $_POST['bbp_destination_topic'] ) ) {
    1251                                         bbp_add_error( 'bbp_move_reply_destination_id', __( '<strong>ERROR</strong>: A topic ID is required.', 'bbpress' ) );
     1251                                        bbp_add_error( 'bbp_move_reply_destination_id', __( 'A topic ID is required.', 'bbpress' ) );
    12521252                                } else {
    12531253                                        $destination_topic_id = (int) $_POST['bbp_destination_topic'];
    12541254                                }
    … …  
    12581258
    12591259                                // No destination topic
    12601260                                if ( empty( $destination_topic ) ) {
    1261                                         bbp_add_error( 'bbp_move_reply_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to move to was not found.', 'bbpress' ) );
     1261                                        bbp_add_error( 'bbp_move_reply_destination_not_found', __( 'The topic you want to move to was not found.', 'bbpress' ) );
    12621262                                }
    12631263
    12641264                                // User cannot edit the destination topic
    12651265                                if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) {
    1266                                         bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
     1266                                        bbp_add_error( 'bbp_move_reply_destination_permission', __( 'You do not have permission to edit the destination topic.', 'bbpress' ) );
    12671267                                }
    12681268
    12691269                                // Bump the reply position
    … …  
    13171317
    13181318                                        // Shouldn't happen
    13191319                                        if ( false === $destination_topic_id || is_wp_error( $destination_topic_id ) || empty( $destination_topic ) ) {
    1320                                                 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' ) );
     1320                                                bbp_add_error( 'bbp_move_reply_destination_reply', __( 'There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) );
    13211321                                        }
    13221322
    13231323                                // User cannot publish posts
    13241324                                } else {
    1325                                         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' ) );
     1325                                        bbp_add_error( 'bbp_move_reply_destination_permission', __( 'You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) );
    13261326                                }
    13271327
    13281328                                break;
    … …  
    14701470        // Make sure reply exists
    14711471        $reply = bbp_get_reply( $reply_id );
    14721472        if ( empty( $reply ) ) {
    1473                 bbp_add_error( 'bbp_toggle_reply_missing', __( '<strong>ERROR:</strong> This reply could not be found or no longer exists.', 'bbpress' ) );
     1473                bbp_add_error( 'bbp_toggle_reply_missing', __( 'This reply could not be found or no longer exists.', 'bbpress' ) );
    14741474                return;
    14751475        }
    14761476
    14771477        // What is the user doing here?
    14781478        if ( ! current_user_can( 'edit_reply', $reply_id ) || ( 'bbp_toggle_reply_trash' === $action && ! current_user_can( 'delete_reply', $reply_id ) ) ) {
    1479                 bbp_add_error( 'bbp_toggle_reply_permission', __( '<strong>ERROR:</strong> You do not have permission to do that.', 'bbpress' ) );
     1479                bbp_add_error( 'bbp_toggle_reply_permission', __( 'You do not have permission to do that.', 'bbpress' ) );
    14801480                return;
    14811481        }
    14821482
    … …  
    15521552
    15531553                        $is_approve         = bbp_is_reply_pending( $r['id'] );
    15541554                        $retval['status']   = $is_approve ? bbp_approve_reply( $r['id'] ) : bbp_unapprove_reply( $r['id'] );
    1555                         $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' );
     1555                        $retval['message']  = $is_approve ? __( 'There was a problem approving the reply.', 'bbpress' ) : __( 'There was a problem unapproving the reply.', 'bbpress' );
    15561556                        $retval['view_all'] = ! $is_approve;
    15571557
    15581558                        break;
    … …  
    15631563
    15641564                        $is_spam            = bbp_is_reply_spam( $r['id'] );
    15651565                        $retval['status']   = $is_spam ? bbp_unspam_reply( $r['id'] ) : bbp_spam_reply( $r['id'] );
    1566                         $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' );
     1566                        $retval['message']  = $is_spam ? __( 'There was a problem unmarking the reply as spam.', 'bbpress' ) : __( 'There was a problem marking the reply as spam.', 'bbpress' );
    15671567                        $retval['view_all'] = ! $is_spam;
    15681568
    15691569                        break;
    … …  
    15781578
    15791579                                        $retval['view_all'] = true;
    15801580                                        $retval['status']   = wp_trash_post( $r['id'] );
    1581                                         $retval['message']  = __( '<strong>ERROR</strong>: There was a problem trashing the reply.', 'bbpress' );
     1581                                        $retval['message']  = __( 'There was a problem trashing the reply.', 'bbpress' );
    15821582
    15831583                                        break;
    15841584
    … …  
    15861586                                        check_ajax_referer( "untrash-{$nonce_suffix}" );
    15871587
    15881588                                        $retval['status']  = wp_untrash_post( $r['id'] );
    1589                                         $retval['message'] = __( '<strong>ERROR</strong>: There was a problem untrashing the reply.', 'bbpress' );
     1589                                        $retval['message'] = __( 'There was a problem untrashing the reply.', 'bbpress' );
    15901590
    15911591                                        break;
    15921592
    … …  
    15941594                                        check_ajax_referer( "delete-{$nonce_suffix}" );
    15951595
    15961596                                        $retval['status']  = wp_delete_post( $r['id'] );
    1597                                         $retval['message'] = __( '<strong>ERROR</strong>: There was a problem deleting the reply.', 'bbpress' );
     1597                                        $retval['message'] = __( 'There was a problem deleting the reply.', 'bbpress' );
    15981598
    15991599                                        break;
    16001600                        }
  • src/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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( 'Duplicate topic detected; it looks as though you&#8217;ve already said that.', 'bbpress' ) );
    254254        }
    255255
    256256        /** Topic Blacklist *******************************************************/
    257257
    258258        if ( ! bbp_check_for_blacklist( $anonymous_data, $topic_author, $topic_title, $topic_content ) ) {
    259                 bbp_add_error( 'bbp_topic_blacklist', __( '<strong>ERROR</strong>: Your topic cannot be created at this time.', 'bbpress' ) );
     259                bbp_add_error( 'bbp_topic_blacklist', __( '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( __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( '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', __( 'Your topic cannot be empty.', 'bbpress' ) );
    550550        }
    551551
    552552        /** Topic Blacklist *******************************************************/
    553553
    554554        if ( ! bbp_check_for_blacklist( $anonymous_data, $topic_author, $topic_title, $topic_content ) ) {
    555                 bbp_add_error( 'bbp_topic_blacklist', __( '<strong>ERROR</strong>: Your topic cannot be edited at this time.', 'bbpress' ) );
     555                bbp_add_error( 'bbp_topic_blacklist', __( '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', __( 'The following problem(s) have been found with your topic:' . $append_error . 'Please try again.', 'bbpress' ) );
    717717        }
    718718}
    719719
    … …  
    10671067
    10681068        // Topic id
    10691069        if ( empty( $_POST['bbp_topic_id'] ) ) {
    1070                 bbp_add_error( 'bbp_merge_topic_source_id', __( '<strong>ERROR</strong>: Topic ID not found.', 'bbpress' ) );
     1070                bbp_add_error( 'bbp_merge_topic_source_id', __( 'Topic ID not found.', 'bbpress' ) );
    10711071        } else {
    10721072                $source_topic_id = (int) $_POST['bbp_topic_id'];
    10731073        }
    10741074
    10751075        // Nonce check
    10761076        if ( ! bbp_verify_nonce_request( 'bbp-merge-topic_' . $source_topic_id ) ) {
    1077                 bbp_add_error( 'bbp_merge_topic_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1077                bbp_add_error( 'bbp_merge_topic_nonce', __( 'Are you sure you wanted to do that?', 'bbpress' ) );
    10781078                return;
    10791079
    10801080        // Source topic not found
    10811081        } elseif ( ! $source_topic = bbp_get_topic( $source_topic_id ) ) {
    1082                 bbp_add_error( 'bbp_merge_topic_source_not_found', __( '<strong>ERROR</strong>: The topic you want to merge was not found.', 'bbpress' ) );
     1082                bbp_add_error( 'bbp_merge_topic_source_not_found', __( 'The topic you want to merge was not found.', 'bbpress' ) );
    10831083                return;
    10841084        }
    10851085
    10861086        // Cannot edit source topic
    10871087        if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) {
    1088                 bbp_add_error( 'bbp_merge_topic_source_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
     1088                bbp_add_error( 'bbp_merge_topic_source_permission', __( 'You do not have permission to edit the source topic.', 'bbpress' ) );
    10891089                return;
    10901090        }
    10911091
    … …  
    10931093
    10941094        // Topic id
    10951095        if ( empty( $_POST['bbp_destination_topic'] ) ) {
    1096                 bbp_add_error( 'bbp_merge_topic_destination_id', __( '<strong>ERROR</strong>: Destination topic ID not found.', 'bbpress' ) );
     1096                bbp_add_error( 'bbp_merge_topic_destination_id', __( 'Destination topic ID not found.', 'bbpress' ) );
    10971097        } else {
    10981098                $destination_topic_id = (int) $_POST['bbp_destination_topic'];
    10991099        }
    11001100
    11011101        // Destination topic not found
    11021102        if ( ! $destination_topic = bbp_get_topic( $destination_topic_id ) ) {
    1103                 bbp_add_error( 'bbp_merge_topic_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to merge to was not found.', 'bbpress' ) );
     1103                bbp_add_error( 'bbp_merge_topic_destination_not_found', __( 'The topic you want to merge to was not found.', 'bbpress' ) );
    11041104        }
    11051105
    11061106        // Cannot edit destination topic
    11071107        if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) {
    1108                 bbp_add_error( 'bbp_merge_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
     1108                bbp_add_error( 'bbp_merge_topic_destination_permission', __( 'You do not have permission to edit the destination topic.', 'bbpress' ) );
    11091109        }
    11101110
    11111111        // Bail if errors
    … …  
    13251325        /** Split Reply ***********************************************************/
    13261326
    13271327        if ( empty( $_POST['bbp_reply_id'] ) ) {
    1328                 bbp_add_error( 'bbp_split_topic_reply_id', __( '<strong>ERROR</strong>: A reply ID is required.', 'bbpress' ) );
     1328                bbp_add_error( 'bbp_split_topic_reply_id', __( 'A reply ID is required.', 'bbpress' ) );
    13291329        } else {
    13301330                $from_reply_id = (int) $_POST['bbp_reply_id'];
    13311331        }
    … …  
    13341334
    13351335        // Reply exists
    13361336        if ( empty( $from_reply ) ) {
    1337                 bbp_add_error( 'bbp_split_topic_r_not_found', __( '<strong>ERROR</strong>: The reply you want to split from was not found.', 'bbpress' ) );
     1337                bbp_add_error( 'bbp_split_topic_r_not_found', __( 'The reply you want to split from was not found.', 'bbpress' ) );
    13381338        }
    13391339
    13401340        /** Topic to Split ********************************************************/
    … …  
    13441344
    13451345        // No topic
    13461346        if ( empty( $source_topic ) ) {
    1347                 bbp_add_error( 'bbp_split_topic_source_not_found', __( '<strong>ERROR</strong>: The topic you want to split was not found.', 'bbpress' ) );
     1347                bbp_add_error( 'bbp_split_topic_source_not_found', __( 'The topic you want to split was not found.', 'bbpress' ) );
    13481348        }
    13491349
    13501350        // Nonce check failed
    13511351        if ( ! bbp_verify_nonce_request( 'bbp-split-topic_' . $source_topic->ID ) ) {
    1352                 bbp_add_error( 'bbp_split_topic_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1352                bbp_add_error( 'bbp_split_topic_nonce', __( 'Are you sure you wanted to do that?', 'bbpress' ) );
    13531353                return;
    13541354        }
    13551355
    13561356        // Use cannot edit topic
    13571357        if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) {
    1358                 bbp_add_error( 'bbp_split_topic_source_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
     1358                bbp_add_error( 'bbp_split_topic_source_permission', __( 'You do not have permission to edit the source topic.', 'bbpress' ) );
    13591359        }
    13601360
    13611361        // How to Split
    … …  
    13651365
    13661366        // Invalid split option
    13671367        if ( empty( $split_option ) || ! in_array( $split_option, array( 'existing', 'reply' ), true ) ) {
    1368                 bbp_add_error( 'bbp_split_topic_option', __( '<strong>ERROR</strong>: You need to choose a valid split option.', 'bbpress' ) );
     1368                bbp_add_error( 'bbp_split_topic_option', __( 'You need to choose a valid split option.', 'bbpress' ) );
    13691369
    13701370        // Valid Split Option
    13711371        } else {
    … …  
    13781378
    13791379                                // Get destination topic id
    13801380                                if ( empty( $_POST['bbp_destination_topic'] ) ) {
    1381                                         bbp_add_error( 'bbp_split_topic_destination_id', __( '<strong>ERROR</strong>: A topic ID is required.', 'bbpress' ) );
     1381                                        bbp_add_error( 'bbp_split_topic_destination_id', __( 'A topic ID is required.', 'bbpress' ) );
    13821382                                } else {
    13831383                                        $destination_topic_id = (int) $_POST['bbp_destination_topic'];
    13841384                                }
    … …  
    13881388
    13891389                                // No destination topic
    13901390                                if ( empty( $destination_topic ) ) {
    1391                                         bbp_add_error( 'bbp_split_topic_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to split to was not found.', 'bbpress' ) );
     1391                                        bbp_add_error( 'bbp_split_topic_destination_not_found', __( 'The topic you want to split to was not found.', 'bbpress' ) );
    13921392                                }
    13931393
    13941394                                // User cannot edit the destination topic
    13951395                                if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) {
    1396                                         bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
     1396                                        bbp_add_error( 'bbp_split_topic_destination_permission', __( 'You do not have permission to edit the destination topic.', 'bbpress' ) );
    13971397                                }
    13981398
    13991399                                break;
    … …  
    14311431
    14321432                                        // Shouldn't happen
    14331433                                        if ( false === $destination_topic_id || is_wp_error( $destination_topic_id ) || empty( $destination_topic ) ) {
    1434                                                 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' ) );
     1434                                                bbp_add_error( 'bbp_split_topic_destination_reply', __( 'There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) );
    14351435                                        }
    14361436
    14371437                                // User cannot publish posts
    14381438                                } else {
    1439                                         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' ) );
     1439                                        bbp_add_error( 'bbp_split_topic_destination_permission', __( 'You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) );
    14401440                                }
    14411441
    14421442                                break;
    … …  
    16731673
    16741674        // Tag does not exist
    16751675        if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
    1676                 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() ) );
     1676                bbp_add_error( 'bbp_manage_topic_invalid_tag', sprintf( __( 'The following problem(s) have been found while getting the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
    16771677                return;
    16781678        }
    16791679
    … …  
    16851685
    16861686                        // Nonce check
    16871687                        if ( ! bbp_verify_nonce_request( 'update-tag_' . $tag_id ) ) {
    1688                                 bbp_add_error( 'bbp_manage_topic_tag_update_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1688                                bbp_add_error( 'bbp_manage_topic_tag_update_nonce', __( 'Are you sure you wanted to do that?', 'bbpress' ) );
    16891689                                return;
    16901690                        }
    16911691
    16921692                        // Can user edit topic tags?
    16931693                        if ( ! current_user_can( 'edit_topic_tag', $tag_id ) ) {
    1694                                 bbp_add_error( 'bbp_manage_topic_tag_update_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );
     1694                                bbp_add_error( 'bbp_manage_topic_tag_update_permission', __( 'You do not have permission to edit the topic tags.', 'bbpress' ) );
    16951695                                return;
    16961696                        }
    16971697
    16981698                        // No tag name was provided
    16991699                        if ( empty( $_POST['tag-name'] ) || ! $name = $_POST['tag-name'] ) {
    1700                                 bbp_add_error( 'bbp_manage_topic_tag_update_name', __( '<strong>ERROR</strong>: You need to enter a tag name.', 'bbpress' ) );
     1700                                bbp_add_error( 'bbp_manage_topic_tag_update_name', __( 'You need to enter a tag name.', 'bbpress' ) );
    17011701                                return;
    17021702                        }
    17031703
    … …  
    17121712
    17131713                        // Cannot update tag
    17141714                        if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
    1715                                 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() ) );
     1715                                bbp_add_error( 'bbp_manage_topic_tag_update_error', sprintf( __( 'The following problem(s) have been found while updating the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
    17161716                                return;
    17171717                        }
    17181718
    … …  
    17291729
    17301730                        // Nonce check
    17311731                        if ( ! bbp_verify_nonce_request( 'merge-tag_' . $tag_id ) ) {
    1732                                 bbp_add_error( 'bbp_manage_topic_tag_merge_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1732                                bbp_add_error( 'bbp_manage_topic_tag_merge_nonce', __( 'Are you sure you wanted to do that?', 'bbpress' ) );
    17331733                                return;
    17341734                        }
    17351735
    17361736                        // Can user edit topic tags?
    17371737                        if ( ! current_user_can( 'edit_topic_tags' ) ) {
    1738                                 bbp_add_error( 'bbp_manage_topic_tag_merge_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );
     1738                                bbp_add_error( 'bbp_manage_topic_tag_merge_permission', __( 'You do not have permission to edit the topic tags.', 'bbpress' ) );
    17391739                                return;
    17401740                        }
    17411741
    17421742                        // No tag name was provided
    17431743                        if ( empty( $_POST['tag-existing-name'] ) || ! $name = $_POST['tag-existing-name'] ) {
    1744                                 bbp_add_error( 'bbp_manage_topic_tag_merge_name', __( '<strong>ERROR</strong>: You need to enter a tag name.', 'bbpress' ) );
     1744                                bbp_add_error( 'bbp_manage_topic_tag_merge_name', __( 'You need to enter a tag name.', 'bbpress' ) );
    17451745                                return;
    17461746                        }
    17471747
    … …  
    17521752
    17531753                        // Problem inserting the new term
    17541754                        if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
    1755                                 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() ) );
     1755                                bbp_add_error( 'bbp_manage_topic_tag_merge_error', sprintf( __( 'The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) );
    17561756                                return;
    17571757                        }
    17581758
    … …  
    17611761
    17621762                        // Attempting to merge a tag into itself
    17631763                        if ( $tag_id === $to_tag ) {
    1764                                 bbp_add_error( 'bbp_manage_topic_tag_merge_same', __( '<strong>ERROR</strong>: The tags which are being merged can not be the same.', 'bbpress' ) );
     1764                                bbp_add_error( 'bbp_manage_topic_tag_merge_same', __( 'The tags which are being merged can not be the same.', 'bbpress' ) );
    17651765                                return;
    17661766                        }
    17671767
    … …  
    17731773
    17741774                        // Error merging the terms
    17751775                        if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
    1776                                 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() ) );
     1776                                bbp_add_error( 'bbp_manage_topic_tag_merge_error', sprintf( __( 'The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) );
    17771777                                return;
    17781778                        }
    17791779
    … …  
    17901790
    17911791                        // Nonce check
    17921792                        if ( ! bbp_verify_nonce_request( 'delete-tag_' . $tag_id ) ) {
    1793                                 bbp_add_error( 'bbp_manage_topic_tag_delete_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     1793                                bbp_add_error( 'bbp_manage_topic_tag_delete_nonce', __( 'Are you sure you wanted to do that?', 'bbpress' ) );
    17941794                                return;
    17951795                        }
    17961796
    17971797                        // Can user delete topic tags?
    17981798                        if ( ! current_user_can( 'delete_topic_tag', $tag_id ) ) {
    1799                                 bbp_add_error( 'bbp_manage_topic_tag_delete_permission', __( '<strong>ERROR</strong>: You do not have permission to delete the topic tags.', 'bbpress' ) );
     1799                                bbp_add_error( 'bbp_manage_topic_tag_delete_permission', __( 'You do not have permission to delete the topic tags.', 'bbpress' ) );
    18001800                                return;
    18011801                        }
    18021802
    … …  
    18051805
    18061806                        // Error deleting term
    18071807                        if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
    1808                                 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() ) );
     1808                                bbp_add_error( 'bbp_manage_topic_tag_delete_error', sprintf( __( 'The following problem(s) have been found while deleting the tag: %s', 'bbpress' ), $tag->get_error_message() ) );
    18091809                                return;
    18101810                        }
    18111811
    … …  
    19661966        // Make sure topic exists
    19671967        $topic = bbp_get_topic( $topic_id );
    19681968        if ( empty( $topic ) ) {
    1969                 bbp_add_error( 'bbp_toggle_topic_missing', __( '<strong>ERROR:</strong> This topic could not be found or no longer exists.', 'bbpress' ) );
     1969                bbp_add_error( 'bbp_toggle_topic_missing', __( 'This topic could not be found or no longer exists.', 'bbpress' ) );
    19701970                return;
    19711971        }
    19721972
    19731973        // What is the user doing here?
    19741974        if ( ! current_user_can( 'edit_topic', $topic_id ) || ( 'bbp_toggle_topic_trash' === $action && ! current_user_can( 'delete_topic', $topic_id ) ) ) {
    1975                 bbp_add_error( 'bbp_toggle_topic_permission', __( '<strong>ERROR:</strong> You do not have permission to do that.', 'bbpress' ) );
     1975                bbp_add_error( 'bbp_toggle_topic_permission', __( 'You do not have permission to do that.', 'bbpress' ) );
    19761976                return;
    19771977        }
    19781978
    … …  
    20562056
    20572057                        // Feedback
    20582058                        $retval['message'] = ( true === $is_pending )
    2059                                 ? __( '<strong>ERROR</strong>: There was a problem approving the topic.',   'bbpress' )
    2060                                 : __( '<strong>ERROR</strong>: There was a problem unapproving the topic.', 'bbpress' );
     2059                                ? __( 'There was a problem approving the topic.',   'bbpress' )
     2060                                : __( 'There was a problem unapproving the topic.', 'bbpress' );
    20612061
    20622062                        break;
    20632063
    … …  
    20742074
    20752075                        // Feedback
    20762076                        $retval['message'] = ( true === $is_open )
    2077                                 ? __( '<strong>ERROR</strong>: There was a problem closing the topic.', 'bbpress' )
    2078                                 : __( '<strong>ERROR</strong>: There was a problem opening the topic.', 'bbpress' );
     2077                                ? __( 'There was a problem closing the topic.', 'bbpress' )
     2078                                : __( 'There was a problem opening the topic.', 'bbpress' );
    20792079
    20802080                        break;
    20812081
    … …  
    20932093
    20942094                        // Feedback
    20952095                        $retval['message'] = ( true === $is_sticky )
    2096                                 ? __( '<strong>ERROR</strong>: There was a problem unsticking the topic.', 'bbpress' )
    2097                                 : __( '<strong>ERROR</strong>: There was a problem sticking the topic.',   'bbpress' );
     2096                                ? __( 'There was a problem unsticking the topic.', 'bbpress' )
     2097                                : __( 'There was a problem sticking the topic.',   'bbpress' );
    20982098
    20992099                        break;
    21002100
    … …  
    21122112
    21132113                        // Feedback
    21142114                        $retval['message'] = ( true === $is_spam )
    2115                                 ? __( '<strong>ERROR</strong>: There was a problem unmarking the topic as spam.', 'bbpress' )
    2116                                 : __( '<strong>ERROR</strong>: There was a problem marking the topic as spam.',   'bbpress' );
     2115                                ? __( 'There was a problem unmarking the topic as spam.', 'bbpress' )
     2116                                : __( 'There was a problem marking the topic as spam.',   'bbpress' );
    21172117
    21182118                        break;
    21192119
    … …  
    21262126
    21272127                                        $retval['view_all']    = true;
    21282128                                        $retval['status']      = wp_trash_post( $r['id'] );
    2129                                         $retval['message']     = __( '<strong>ERROR</strong>: There was a problem trashing the topic.', 'bbpress' );
     2129                                        $retval['message']     = __( 'There was a problem trashing the topic.', 'bbpress' );
    21302130                                        $retval['redirect_to'] = current_user_can( 'view_trash' )
    21312131                                                ? bbp_get_topic_permalink( $r['id'] )
    21322132                                                : bbp_get_forum_permalink( bbp_get_topic_forum_id( $r['id'] ) );
    … …  
    21372137                                        check_ajax_referer( "untrash-{$nonce_suffix}" );
    21382138
    21392139                                        $retval['status']      = wp_untrash_post( $r['id'] );
    2140                                         $retval['message']     = __( '<strong>ERROR</strong>: There was a problem untrashing the topic.', 'bbpress' );
     2140                                        $retval['message']     = __( 'There was a problem untrashing the topic.', 'bbpress' );
    21412141                                        $retval['redirect_to'] = bbp_get_topic_permalink( $r['id'] );
    21422142
    21432143                                        break;
    … …  
    21462146                                        check_ajax_referer( "delete-{$nonce_suffix}" );
    21472147
    21482148                                        $retval['status']      = wp_delete_post( $r['id'] );
    2149                                         $retval['message']     = __( '<strong>ERROR</strong>: There was a problem deleting the topic.', 'bbpress' );
     2149                                        $retval['message']     = __( 'There was a problem deleting the topic.', 'bbpress' );
    21502150                                        $retval['redirect_to'] = bbp_get_forum_permalink( $retval['status']->post_parent );
    21512151
    21522152                                        break;
  • src/includes/users/engagements.php

     
    597597
    598598        // Check for empty topic
    599599        if ( empty( $topic_id ) ) {
    600                 bbp_add_error( 'bbp_favorite_topic_id', __( '<strong>ERROR</strong>: No topic was found. Which topic are you marking/unmarking as favorite?', 'bbpress' ) );
     600                bbp_add_error( 'bbp_favorite_topic_id', __( 'No topic was found. Which topic are you marking/unmarking as favorite?', 'bbpress' ) );
    601601
    602602        // Check nonce
    603603        } elseif ( ! bbp_verify_nonce_request( 'toggle-favorite_' . $topic_id ) ) {
    604                 bbp_add_error( 'bbp_favorite_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     604                bbp_add_error( 'bbp_favorite_nonce', __( 'Are you sure you wanted to do that?', 'bbpress' ) );
    605605
    606606        // Check current user's ability to edit the user
    607607        } elseif ( ! current_user_can( 'edit_user', $user_id ) ) {
    608                 bbp_add_error( 'bbp_favorite_permission', __( '<strong>ERROR</strong>: You do not have permission to edit favorites for that user!.', 'bbpress' ) );
     608                bbp_add_error( 'bbp_favorite_permission', __( 'You do not have permission to edit favorites for that user!.', 'bbpress' ) );
    609609        }
    610610
    611611        // Bail if errors
    … …  
    646646
    647647        // Fail! Handle errors
    648648        } elseif ( 'bbp_favorite_remove' === $action ) {
    649                 bbp_add_error( 'bbp_favorite_remove', __( '<strong>ERROR</strong>: There was a problem removing that topic from favorites.', 'bbpress' ) );
     649                bbp_add_error( 'bbp_favorite_remove', __( 'There was a problem removing that topic from favorites.', 'bbpress' ) );
    650650        } elseif ( 'bbp_favorite_add' === $action ) {
    651                 bbp_add_error( 'bbp_favorite_add',    __( '<strong>ERROR</strong>: There was a problem favoriting that topic.', 'bbpress' ) );
     651                bbp_add_error( 'bbp_favorite_add',    __( 'There was a problem favoriting that topic.', 'bbpress' ) );
    652652        }
    653653
    654654        return (bool) $success;
    … …  
    834834
    835835        // Check for empty topic
    836836        if ( empty( $object_id ) ) {
    837                 bbp_add_error( 'bbp_subscription_object_id', __( '<strong>ERROR</strong>: Not found. What are you subscribing/unsubscribing to?', 'bbpress' ) );
     837                bbp_add_error( 'bbp_subscription_object_id', __( 'Not found. What are you subscribing/unsubscribing to?', 'bbpress' ) );
    838838
    839839        // Check nonce
    840840        } elseif ( ! bbp_verify_nonce_request( 'toggle-subscription_' . $object_id ) ) {
    841                 bbp_add_error( 'bbp_subscription_object_id', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     841                bbp_add_error( 'bbp_subscription_object_id', __( 'Are you sure you wanted to do that?', 'bbpress' ) );
    842842
    843843        // Check current user's ability to edit the user
    844844        } elseif ( ! current_user_can( 'edit_user', $user_id ) ) {
    845                 bbp_add_error( 'bbp_subscription_permission', __( '<strong>ERROR</strong>: You do not have permission to edit subscriptions of that user.', 'bbpress' ) );
     845                bbp_add_error( 'bbp_subscription_permission', __( 'You do not have permission to edit subscriptions of that user.', 'bbpress' ) );
    846846        }
    847847
    848848        // Bail if we have errors
    … …  
    885885
    886886        // Fail! Handle errors
    887887        } elseif ( 'bbp_unsubscribe' === $action ) {
    888                 bbp_add_error( 'bbp_unsubscribe', __( '<strong>ERROR</strong>: There was a problem unsubscribing.', 'bbpress' ) );
     888                bbp_add_error( 'bbp_unsubscribe', __( 'There was a problem unsubscribing.', 'bbpress' ) );
    889889        } elseif ( 'bbp_subscribe' === $action ) {
    890                 bbp_add_error( 'bbp_subscribe',   __( '<strong>ERROR</strong>: There was a problem subscribing.', 'bbpress' ) );
     890                bbp_add_error( 'bbp_subscribe',   __( 'There was a problem subscribing.', 'bbpress' ) );
    891891        }
    892892
    893893        return (bool) $success;
  • src/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', __( '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', __( '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', __( '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', __( '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', __( 'That email address is already in use.', 'bbpress' ), array( 'form-field' => 'email' ) );
    227227                        return;
    228228                }
    229229
    … …  
    342342                        if ( email_exists( $new_email['newemail'] ) ) {
    343343                                delete_option( $key );
    344344
    345                                 bbp_add_error( 'bbp_user_email_taken', __( '<strong>ERROR</strong>: That email address is already in use.', 'bbpress' ), array( 'form-field' => 'email' ) );
     345                                bbp_add_error( 'bbp_user_email_taken', __( 'That email address is already in use.', 'bbpress' ), array( 'form-field' => 'email' ) );
    346346
    347347                        // Email address is good to change to
    348348                        } else {
    … …  
    379379        // Delete new email address from user options
    380380        } elseif ( ! empty( $_GET['dismiss'] ) && ( $key === $_GET['dismiss'] ) ) {
    381381                if ( ! bbp_verify_nonce_request( "dismiss-{$key}" ) ) {
    382                         bbp_add_error( 'bbp_dismiss_new_email_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     382                        bbp_add_error( 'bbp_dismiss_new_email_nonce', __( 'Are you sure you wanted to do that?', 'bbpress' ) );
    383383                        return;
    384384                }
    385385
    … …  
    405405
    406406        // Bail if any relevant parameters are empty
    407407        if ( empty( $user_id ) || empty( $r['hash'] ) || empty( $r['newemail'] ) ) {
    408                 bbp_add_error( 'bbp_user_email_invalid_hash', __( '<strong>ERROR</strong>: An error occurred while updating your email address.', 'bbpress' ), array( 'form-field' => 'email' ) );
     408                bbp_add_error( 'bbp_user_email_invalid_hash', __( 'An error occurred while updating your email address.', 'bbpress' ), array( 'form-field' => 'email' ) );
    409409                return;
    410410        }
    411411
  • src/includes/users/template.php

     
    18211821
    18221822        // loggedout was passed
    18231823        if ( ! empty( $_GET['loggedout'] ) && ( true === $_GET['loggedout'] ) ) {
    1824                 bbp_add_error( 'loggedout', esc_html__( 'You are now logged out.', 'bbpress' ), 'message' );
     1824                bbp_add_notice( 'loggedout', esc_html__( 'You are now logged out.', 'bbpress' ), 'message' );
    18251825
    18261826        // registration is disabled
    18271827        } elseif ( ! empty( $_GET['registration'] ) && ( 'disabled' === $_GET['registration'] ) ) {
    1828                 bbp_add_error( 'registerdisabled', esc_html__( 'New user registration is currently not allowed.', 'bbpress' ) );
     1828                bbp_add_notice( 'registerdisabled', esc_html__( 'New user registration is currently not allowed.', 'bbpress' ) );
    18291829
    18301830        // Prompt user to check their email
    18311831        } elseif ( ! empty( $_GET['checkemail'] ) && in_array( $_GET['checkemail'], array( 'confirm', 'newpass', 'registered' ), true ) ) {
    … …  
    18341834
    18351835                        // Email needs confirmation
    18361836                        case 'confirm' :
    1837                                 bbp_add_error( 'confirm',    esc_html__( 'Check your e-mail for the confirmation link.',     'bbpress' ), 'message' );
     1837                                bbp_add_notice( 'confirm',    esc_html__( 'Check your e-mail for the confirmation link.',     'bbpress' ), 'message' );
    18381838                                break;
    18391839
    18401840                        // User requested a new password
    18411841                        case 'newpass' :
    1842                                 bbp_add_error( 'newpass',    esc_html__( 'Check your e-mail for your new password.',         'bbpress' ), 'message' );
     1842                                bbp_add_notice( 'newpass',    esc_html__( 'Check your e-mail for your new password.',         'bbpress' ), 'message' );
    18431843                                break;
    18441844
    18451845                        // User is newly registered
    18461846                        case 'registered' :
    1847                                 bbp_add_error( 'registered', esc_html__( 'Registration complete. Please check your e-mail.', 'bbpress' ), 'message' );
     1847                                bbp_add_notice( 'registered', esc_html__( 'Registration complete. Please check your e-mail.', 'bbpress' ), 'message' );
    18481848                                break;
    18491849                }
    18501850        }