Changeset 7097
- Timestamp:
- 06/04/2020 09:28:24 PM (5 years ago)
- Location:
- branches/2.6/src/includes
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.6/src/includes/common/functions.php
r6973 r7097 554 554 $r['bbp_anonymous_name'] = apply_filters( 'bbp_pre_anonymous_post_author_name', $r['bbp_anonymous_name'] ); 555 555 if ( empty( $r['bbp_anonymous_name'] ) ) { 556 bbp_add_error( 'bbp_anonymous_name', __( '<strong>E RROR</strong>: Invalid author name.', 'bbpress' ) );556 bbp_add_error( 'bbp_anonymous_name', __( '<strong>Error</strong>: Invalid author name.', 'bbpress' ) ); 557 557 } 558 558 … … 560 560 $r['bbp_anonymous_email'] = apply_filters( 'bbp_pre_anonymous_post_author_email', $r['bbp_anonymous_email'] ); 561 561 if ( empty( $r['bbp_anonymous_email'] ) ) { 562 bbp_add_error( 'bbp_anonymous_email', __( '<strong>E RROR</strong>: Invalid email address.', 'bbpress' ) );562 bbp_add_error( 'bbp_anonymous_email', __( '<strong>Error</strong>: Invalid email address.', 'bbpress' ) ); 563 563 } 564 564 -
branches/2.6/src/includes/extend/buddypress/groups.php
r7059 r7097 377 377 // If everything else has failed, then something is wrong and we need 378 378 // to add an error to prevent this topic from saving. 379 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>E RROR</strong>: Forum ID is invalid.', 'bbpress' ) );379 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID is invalid.', 'bbpress' ) ); 380 380 } 381 381 … … 440 440 441 441 // Add an error to prevent this reply from saving. 442 bbp_add_error( 'bbp_reply_to_id', __( '<strong>E RROR</strong>: Reply To is invalid.', 'bbpress' ) );442 bbp_add_error( 'bbp_reply_to_id', __( '<strong>Error</strong>: Reply To is invalid.', 'bbpress' ) ); 443 443 } 444 444 … … 529 529 // Theme-side Nonce check 530 530 } elseif ( ! bbp_verify_nonce_request( 'groups_edit_save_' . $this->slug ) ) { 531 bbp_add_error( 'bbp_edit_group_forum_screen_save', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );531 bbp_add_error( 'bbp_edit_group_forum_screen_save', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 532 532 return; 533 533 } … … 686 686 // Nonce check 687 687 if ( ! bbp_verify_nonce_request( 'groups_create_save_' . $this->slug ) ) { 688 bbp_add_error( 'bbp_create_group_forum_screen_save', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );688 bbp_add_error( 'bbp_create_group_forum_screen_save', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 689 689 return; 690 690 } -
branches/2.6/src/includes/extend/buddypress/notifications.php
r6982 r7097 194 194 // Check nonce 195 195 if ( ! bbp_verify_nonce_request( 'bbp_mark_topic_' . $topic_id ) ) { 196 bbp_add_error( 'bbp_notification_topic_id', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );196 bbp_add_error( 'bbp_notification_topic_id', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 197 197 198 198 // Check current user's ability to edit the user 199 199 } elseif ( ! current_user_can( 'edit_user', $user_id ) ) { 200 bbp_add_error( 'bbp_notification_permission', __( '<strong>E RROR</strong>: You do not have permission to mark notifications for that user.', 'bbpress' ) );200 bbp_add_error( 'bbp_notification_permission', __( '<strong>Error</strong>: You do not have permission to mark notifications for that user.', 'bbpress' ) ); 201 201 } 202 202 -
branches/2.6/src/includes/forums/functions.php
r6971 r7097 124 124 // Nonce check 125 125 if ( ! bbp_verify_nonce_request( 'bbp-new-forum' ) ) { 126 bbp_add_error( 'bbp_new_forum_nonce', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );126 bbp_add_error( 'bbp_new_forum_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 127 127 return; 128 128 } … … 138 138 // User cannot create forums 139 139 if ( ! current_user_can( 'publish_forums' ) ) { 140 bbp_add_error( 'bbp_forum_permission', __( '<strong>E RROR</strong>: You do not have permission to create new forums.', 'bbpress' ) );140 bbp_add_error( 'bbp_forum_permission', __( '<strong>Error</strong>: You do not have permission to create new forums.', 'bbpress' ) ); 141 141 return; 142 142 } … … 163 163 // No forum title 164 164 if ( empty( $forum_title ) ) { 165 bbp_add_error( 'bbp_forum_title', __( '<strong>E RROR</strong>: Your forum needs a title.', 'bbpress' ) );165 bbp_add_error( 'bbp_forum_title', __( '<strong>Error</strong>: Your forum needs a title.', 'bbpress' ) ); 166 166 } 167 167 168 168 // Title too long 169 169 if ( bbp_is_title_too_long( $forum_title ) ) { 170 bbp_add_error( 'bbp_forum_title', __( '<strong>E RROR</strong>: Your title is too long.', 'bbpress' ) );170 bbp_add_error( 'bbp_forum_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) ); 171 171 } 172 172 … … 182 182 // No forum content 183 183 if ( empty( $forum_content ) ) { 184 bbp_add_error( 'bbp_forum_content', __( '<strong>E RROR</strong>: Your forum description cannot be empty.', 'bbpress' ) );184 bbp_add_error( 'bbp_forum_content', __( '<strong>Error</strong>: Your forum description cannot be empty.', 'bbpress' ) ); 185 185 } 186 186 … … 197 197 // No forum parent was passed (should never happen) 198 198 if ( empty( $forum_parent_id ) ) { 199 bbp_add_error( 'bbp_new_forum_missing_parent', __( '<strong>E RROR</strong>: Your forum must have a parent.', 'bbpress' ) );199 bbp_add_error( 'bbp_new_forum_missing_parent', __( '<strong>Error</strong>: Your forum must have a parent.', 'bbpress' ) ); 200 200 201 201 // Forum exists … … 204 204 // Forum is a category 205 205 if ( bbp_is_forum_category( $forum_parent_id ) ) { 206 bbp_add_error( 'bbp_new_forum_forum_category', __( '<strong>E RROR</strong>: This forum is a category. No forums can be created in this forum.', 'bbpress' ) );206 bbp_add_error( 'bbp_new_forum_forum_category', __( '<strong>Error</strong>: This forum is a category. No forums can be created in this forum.', 'bbpress' ) ); 207 207 } 208 208 209 209 // Forum is closed and user cannot access 210 210 if ( bbp_is_forum_closed( $forum_parent_id ) && ! current_user_can( 'edit_forum', $forum_parent_id ) ) { 211 bbp_add_error( 'bbp_new_forum_forum_closed', __( '<strong>E RROR</strong>: This forum has been closed to new forums.', 'bbpress' ) );211 bbp_add_error( 'bbp_new_forum_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new forums.', 'bbpress' ) ); 212 212 } 213 213 214 214 // Forum is private and user cannot access 215 215 if ( bbp_is_forum_private( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) { 216 bbp_add_error( 'bbp_new_forum_forum_private', __( '<strong>E RROR</strong>: This forum is private and you do not have the capability to read or create new forums in it.', 'bbpress' ) );216 bbp_add_error( 'bbp_new_forum_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new forums in it.', 'bbpress' ) ); 217 217 } 218 218 219 219 // Forum is hidden and user cannot access 220 220 if ( bbp_is_forum_hidden( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) { 221 bbp_add_error( 'bbp_new_forum_forum_hidden', __( '<strong>E RROR</strong>: This forum is hidden and you do not have the capability to read or create new forums in it.', 'bbpress' ) );221 bbp_add_error( 'bbp_new_forum_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new forums in it.', 'bbpress' ) ); 222 222 } 223 223 } … … 226 226 227 227 if ( ! bbp_check_for_flood( $anonymous_data, $forum_author ) ) { 228 bbp_add_error( 'bbp_forum_flood', __( '<strong>E RROR</strong>: Slow down; you move too fast.', 'bbpress' ) );228 bbp_add_error( 'bbp_forum_flood', __( '<strong>Error</strong>: Slow down; you move too fast.', 'bbpress' ) ); 229 229 } 230 230 … … 232 232 233 233 if ( ! bbp_check_for_duplicate( array( 'post_type' => bbp_get_forum_post_type(), 'post_author' => $forum_author, 'post_content' => $forum_content, 'anonymous_data' => $anonymous_data ) ) ) { 234 bbp_add_error( 'bbp_forum_duplicate', __( '<strong>E RROR</strong>: This forum already exists.', 'bbpress' ) );234 bbp_add_error( 'bbp_forum_duplicate', __( '<strong>Error</strong>: This forum already exists.', 'bbpress' ) ); 235 235 } 236 236 … … 238 238 239 239 if ( ! bbp_check_for_moderation( $anonymous_data, $forum_author, $forum_title, $forum_content, true ) ) { 240 bbp_add_error( 'bbp_forum_moderation', __( '<strong>E RROR</strong>: Your forum cannot be created at this time.', 'bbpress' ) );240 bbp_add_error( 'bbp_forum_moderation', __( '<strong>Error</strong>: Your forum cannot be created at this time.', 'bbpress' ) ); 241 241 } 242 242 … … 351 351 // WP_Error 352 352 } elseif ( is_wp_error( $forum_id ) ) { 353 bbp_add_error( 'bbp_forum_error', sprintf( __( '<strong>E RROR</strong>: The following problem(s) occurred: %s', 'bbpress' ), $forum_id->get_error_message() ) );353 bbp_add_error( 'bbp_forum_error', sprintf( __( '<strong>Error</strong>: The following problem(s) occurred: %s', 'bbpress' ), $forum_id->get_error_message() ) ); 354 354 355 355 // Generic error 356 356 } else { 357 bbp_add_error( 'bbp_forum_error', __( '<strong>E RROR</strong>: The forum was not created.', 'bbpress' ) );357 bbp_add_error( 'bbp_forum_error', __( '<strong>Error</strong>: The forum was not created.', 'bbpress' ) ); 358 358 } 359 359 } … … 380 380 // Forum id was not passed 381 381 if ( empty( $_POST['bbp_forum_id'] ) ) { 382 bbp_add_error( 'bbp_edit_forum_id', __( '<strong>E RROR</strong>: Forum ID not found.', 'bbpress' ) );382 bbp_add_error( 'bbp_edit_forum_id', __( '<strong>Error</strong>: Forum ID not found.', 'bbpress' ) ); 383 383 return; 384 384 … … 391 391 // Nonce check 392 392 if ( ! bbp_verify_nonce_request( 'bbp-edit-forum_' . $forum_id ) ) { 393 bbp_add_error( 'bbp_edit_forum_nonce', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );393 bbp_add_error( 'bbp_edit_forum_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 394 394 return; 395 395 396 396 // Forum does not exist 397 397 } elseif ( empty( $forum ) ) { 398 bbp_add_error( 'bbp_edit_forum_not_found', __( '<strong>E RROR</strong>: The forum you want to edit was not found.', 'bbpress' ) );398 bbp_add_error( 'bbp_edit_forum_not_found', __( '<strong>Error</strong>: The forum you want to edit was not found.', 'bbpress' ) ); 399 399 return; 400 400 401 401 // User cannot edit this forum 402 402 } elseif ( ! current_user_can( 'edit_forum', $forum_id ) ) { 403 bbp_add_error( 'bbp_edit_forum_permission', __( '<strong>E RROR</strong>: You do not have permission to edit that forum.', 'bbpress' ) );403 bbp_add_error( 'bbp_edit_forum_permission', __( '<strong>Error</strong>: You do not have permission to edit that forum.', 'bbpress' ) ); 404 404 return; 405 405 } … … 427 427 // Forum is closed and user cannot access 428 428 if ( bbp_is_forum_closed( $forum_parent_id ) && ! current_user_can( 'edit_forum', $forum_parent_id ) ) { 429 bbp_add_error( 'bbp_edit_forum_forum_closed', __( '<strong>E RROR</strong>: This forum has been closed to new forums.', 'bbpress' ) );429 bbp_add_error( 'bbp_edit_forum_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new forums.', 'bbpress' ) ); 430 430 } 431 431 432 432 // Forum is private and user cannot access 433 433 if ( bbp_is_forum_private( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) { 434 bbp_add_error( 'bbp_edit_forum_forum_private', __( '<strong>E RROR</strong>: This forum is private and you do not have the capability to read or create new forums in it.', 'bbpress' ) );434 bbp_add_error( 'bbp_edit_forum_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new forums in it.', 'bbpress' ) ); 435 435 } 436 436 437 437 // Forum is hidden and user cannot access 438 438 if ( bbp_is_forum_hidden( $forum_parent_id ) && ! current_user_can( 'read_forum', $forum_parent_id ) ) { 439 bbp_add_error( 'bbp_edit_forum_forum_hidden', __( '<strong>E RROR</strong>: This forum is hidden and you do not have the capability to read or create new forums in it.', 'bbpress' ) );439 bbp_add_error( 'bbp_edit_forum_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new forums in it.', 'bbpress' ) ); 440 440 } 441 441 } … … 452 452 // No forum title 453 453 if ( empty( $forum_title ) ) { 454 bbp_add_error( 'bbp_edit_forum_title', __( '<strong>E RROR</strong>: Your forum needs a title.', 'bbpress' ) );454 bbp_add_error( 'bbp_edit_forum_title', __( '<strong>Error</strong>: Your forum needs a title.', 'bbpress' ) ); 455 455 } 456 456 457 457 // Title too long 458 458 if ( bbp_is_title_too_long( $forum_title ) ) { 459 bbp_add_error( 'bbp_forum_title', __( '<strong>E RROR</strong>: Your title is too long.', 'bbpress' ) );459 bbp_add_error( 'bbp_forum_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) ); 460 460 } 461 461 … … 471 471 // No forum content 472 472 if ( empty( $forum_content ) ) { 473 bbp_add_error( 'bbp_edit_forum_content', __( '<strong>E RROR</strong>: Your forum description cannot be empty.', 'bbpress' ) );473 bbp_add_error( 'bbp_edit_forum_content', __( '<strong>Error</strong>: Your forum description cannot be empty.', 'bbpress' ) ); 474 474 } 475 475 … … 477 477 478 478 if ( ! bbp_check_for_moderation( $anonymous_data, bbp_get_forum_author_id( $forum_id ), $forum_title, $forum_content, true ) ) { 479 bbp_add_error( 'bbp_forum_moderation', __( '<strong>E RROR</strong>: Your forum cannot be edited at this time.', 'bbpress' ) );479 bbp_add_error( 'bbp_forum_moderation', __( '<strong>Error</strong>: Your forum cannot be edited at this time.', 'bbpress' ) ); 480 480 } 481 481 … … 591 591 } else { 592 592 $append_error = ( is_wp_error( $forum_id ) && $forum_id->get_error_message() ) ? $forum_id->get_error_message() . ' ' : ''; 593 bbp_add_error( 'bbp_forum_error', __( '<strong>E RROR</strong>: The following problem(s) have been found with your forum:' . $append_error . 'Please try again.', 'bbpress' ) );593 bbp_add_error( 'bbp_forum_error', __( '<strong>Error</strong>: The following problem(s) have been found with your forum:' . $append_error . 'Please try again.', 'bbpress' ) ); 594 594 } 595 595 } -
branches/2.6/src/includes/replies/functions.php
r7095 r7097 132 132 // Nonce check 133 133 if ( ! bbp_verify_nonce_request( 'bbp-new-reply' ) ) { 134 bbp_add_error( 'bbp_new_reply_nonce', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );134 bbp_add_error( 'bbp_new_reply_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 135 135 return; 136 136 } … … 157 157 // User cannot create replies 158 158 if ( ! current_user_can( 'publish_replies' ) ) { 159 bbp_add_error( 'bbp_reply_permission', __( '<strong>E RROR</strong>: You do not have permission to reply.', 'bbpress' ) );159 bbp_add_error( 'bbp_reply_permission', __( '<strong>Error</strong>: You do not have permission to reply.', 'bbpress' ) ); 160 160 } 161 161 … … 168 168 // Topic id was not passed 169 169 if ( empty( $_POST['bbp_topic_id'] ) ) { 170 bbp_add_error( 'bbp_reply_topic_id', __( '<strong>E RROR</strong>: Topic ID is missing.', 'bbpress' ) );170 bbp_add_error( 'bbp_reply_topic_id', __( '<strong>Error</strong>: Topic ID is missing.', 'bbpress' ) ); 171 171 172 172 // Topic id is not a number 173 173 } elseif ( ! is_numeric( $_POST['bbp_topic_id'] ) ) { 174 bbp_add_error( 'bbp_reply_topic_id', __( '<strong>E RROR</strong>: Topic ID must be a number.', 'bbpress' ) );174 bbp_add_error( 'bbp_reply_topic_id', __( '<strong>Error</strong>: Topic ID must be a number.', 'bbpress' ) ); 175 175 176 176 // Topic id might be valid … … 182 182 // Topic id is a negative number 183 183 if ( 0 > $posted_topic_id ) { 184 bbp_add_error( 'bbp_reply_topic_id', __( '<strong>E RROR</strong>: Topic ID cannot be a negative number.', 'bbpress' ) );184 bbp_add_error( 'bbp_reply_topic_id', __( '<strong>Error</strong>: Topic ID cannot be a negative number.', 'bbpress' ) ); 185 185 186 186 // Topic does not exist 187 187 } elseif ( ! bbp_get_topic( $posted_topic_id ) ) { 188 bbp_add_error( 'bbp_reply_topic_id', __( '<strong>E RROR</strong>: Topic does not exist.', 'bbpress' ) );188 bbp_add_error( 'bbp_reply_topic_id', __( '<strong>Error</strong>: Topic does not exist.', 'bbpress' ) ); 189 189 190 190 // Use the POST'ed topic id … … 205 205 // Empty Forum id was passed 206 206 if ( empty( $_POST['bbp_forum_id'] ) ) { 207 bbp_add_error( 'bbp_reply_forum_id', __( '<strong>E RROR</strong>: Forum ID is missing.', 'bbpress' ) );207 bbp_add_error( 'bbp_reply_forum_id', __( '<strong>Error</strong>: Forum ID is missing.', 'bbpress' ) ); 208 208 209 209 // Forum id is not a number 210 210 } elseif ( ! is_numeric( $_POST['bbp_forum_id'] ) ) { 211 bbp_add_error( 'bbp_reply_forum_id', __( '<strong>E RROR</strong>: Forum ID must be a number.', 'bbpress' ) );211 bbp_add_error( 'bbp_reply_forum_id', __( '<strong>Error</strong>: Forum ID must be a number.', 'bbpress' ) ); 212 212 213 213 // Forum id might be valid … … 219 219 // Forum id is empty 220 220 if ( 0 === $posted_forum_id ) { 221 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>E RROR</strong>: Forum ID is missing.', 'bbpress' ) );221 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID is missing.', 'bbpress' ) ); 222 222 223 223 // Forum id is a negative number 224 224 } elseif ( 0 > $posted_forum_id ) { 225 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>E RROR</strong>: Forum ID cannot be a negative number.', 'bbpress' ) );225 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID cannot be a negative number.', 'bbpress' ) ); 226 226 227 227 // Forum does not exist 228 228 } elseif ( ! bbp_get_forum( $posted_forum_id ) ) { 229 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>E RROR</strong>: Forum does not exist.', 'bbpress' ) );229 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum does not exist.', 'bbpress' ) ); 230 230 231 231 // Use the POST'ed forum id … … 241 241 // Forum is a category 242 242 if ( bbp_is_forum_category( $forum_id ) ) { 243 bbp_add_error( 'bbp_new_reply_forum_category', __( '<strong>E RROR</strong>: This forum is a category. No replies can be created in this forum.', 'bbpress' ) );243 bbp_add_error( 'bbp_new_reply_forum_category', __( '<strong>Error</strong>: This forum is a category. No replies can be created in this forum.', 'bbpress' ) ); 244 244 245 245 // Forum is not a category … … 248 248 // Forum is closed and user cannot access 249 249 if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) { 250 bbp_add_error( 'bbp_new_reply_forum_closed', __( '<strong>E RROR</strong>: This forum has been closed to new replies.', 'bbpress' ) );250 bbp_add_error( 'bbp_new_reply_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new replies.', 'bbpress' ) ); 251 251 } 252 252 253 253 // Forum is private and user cannot access 254 254 if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) { 255 bbp_add_error( 'bbp_new_reply_forum_private', __( '<strong>E RROR</strong>: This forum is private and you do not have the capability to read or create new replies in it.', 'bbpress' ) );255 bbp_add_error( 'bbp_new_reply_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new replies in it.', 'bbpress' ) ); 256 256 257 257 // Forum is hidden and user cannot access 258 258 } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) { 259 bbp_add_error( 'bbp_new_reply_forum_hidden', __( '<strong>E RROR</strong>: This forum is hidden and you do not have the capability to read or create new replies in it.', 'bbpress' ) );259 bbp_add_error( 'bbp_new_reply_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new replies in it.', 'bbpress' ) ); 260 260 } 261 261 } … … 282 282 // Title too long 283 283 if ( bbp_is_title_too_long( $reply_title ) ) { 284 bbp_add_error( 'bbp_reply_title', __( '<strong>E RROR</strong>: Your title is too long.', 'bbpress' ) );284 bbp_add_error( 'bbp_reply_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) ); 285 285 } 286 286 … … 296 296 // No reply content 297 297 if ( empty( $reply_content ) ) { 298 bbp_add_error( 'bbp_reply_content', __( '<strong>E RROR</strong>: Your reply cannot be empty.', 'bbpress' ) );298 bbp_add_error( 'bbp_reply_content', __( '<strong>Error</strong>: Your reply cannot be empty.', 'bbpress' ) ); 299 299 } 300 300 … … 302 302 303 303 if ( ! bbp_check_for_flood( $anonymous_data, $reply_author ) ) { 304 bbp_add_error( 'bbp_reply_flood', __( '<strong>E RROR</strong>: Slow down; you move too fast.', 'bbpress' ) );304 bbp_add_error( 'bbp_reply_flood', __( '<strong>Error</strong>: Slow down; you move too fast.', 'bbpress' ) ); 305 305 } 306 306 … … 308 308 309 309 if ( ! bbp_check_for_duplicate( array( 'post_type' => bbp_get_reply_post_type(), 'post_author' => $reply_author, 'post_content' => $reply_content, 'post_parent' => $topic_id, 'anonymous_data' => $anonymous_data ) ) ) { 310 bbp_add_error( 'bbp_reply_duplicate', __( '<strong>E RROR</strong>: Duplicate reply detected; it looks as though you’ve already said that.', 'bbpress' ) );310 bbp_add_error( 'bbp_reply_duplicate', __( '<strong>Error</strong>: Duplicate reply detected; it looks as though you’ve already said that.', 'bbpress' ) ); 311 311 } 312 312 … … 314 314 315 315 if ( ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content, true ) ) { 316 bbp_add_error( 'bbp_reply_moderation', __( '<strong>E RROR</strong>: Your reply cannot be created at this time.', 'bbpress' ) );316 bbp_add_error( 'bbp_reply_moderation', __( '<strong>Error</strong>: Your reply cannot be created at this time.', 'bbpress' ) ); 317 317 } 318 318 … … 339 339 // If topic is closed, moderators can still reply 340 340 if ( bbp_is_topic_closed( $topic_id ) && ! current_user_can( 'moderate', $topic_id ) ) { 341 bbp_add_error( 'bbp_reply_topic_closed', __( '<strong>E RROR</strong>: Topic is closed.', 'bbpress' ) );341 bbp_add_error( 'bbp_reply_topic_closed', __( '<strong>Error</strong>: Topic is closed.', 'bbpress' ) ); 342 342 } 343 343 … … 399 399 // Term error 400 400 if ( is_wp_error( $terms ) ) { 401 bbp_add_error( 'bbp_reply_tags', __( '<strong>E RROR</strong>: There was a problem adding the tags to the topic.', 'bbpress' ) );401 bbp_add_error( 'bbp_reply_tags', __( '<strong>Error</strong>: There was a problem adding the tags to the topic.', 'bbpress' ) ); 402 402 } 403 403 … … 472 472 // WP_Error 473 473 } elseif ( is_wp_error( $reply_id ) ) { 474 bbp_add_error( 'bbp_reply_error', sprintf( __( '<strong>E RROR</strong>: The following problem(s) occurred: %s', 'bbpress' ), $reply_id->get_error_message() ) );474 bbp_add_error( 'bbp_reply_error', sprintf( __( '<strong>Error</strong>: The following problem(s) occurred: %s', 'bbpress' ), $reply_id->get_error_message() ) ); 475 475 476 476 // Generic error 477 477 } else { 478 bbp_add_error( 'bbp_reply_error', __( '<strong>E RROR</strong>: The reply was not created.', 'bbpress' ) );478 bbp_add_error( 'bbp_reply_error', __( '<strong>Error</strong>: The reply was not created.', 'bbpress' ) ); 479 479 } 480 480 } … … 504 504 // Reply id was not passed 505 505 if ( empty( $_POST['bbp_reply_id'] ) ) { 506 bbp_add_error( 'bbp_edit_reply_id', __( '<strong>E RROR</strong>: Reply ID not found.', 'bbpress' ) );506 bbp_add_error( 'bbp_edit_reply_id', __( '<strong>Error</strong>: Reply ID not found.', 'bbpress' ) ); 507 507 return; 508 508 … … 515 515 // Nonce check 516 516 if ( ! bbp_verify_nonce_request( 'bbp-edit-reply_' . $reply_id ) ) { 517 bbp_add_error( 'bbp_edit_reply_nonce', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );517 bbp_add_error( 'bbp_edit_reply_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 518 518 return; 519 519 } … … 521 521 // Reply does not exist 522 522 if ( empty( $reply ) ) { 523 bbp_add_error( 'bbp_edit_reply_not_found', __( '<strong>E RROR</strong>: The reply you want to edit was not found.', 'bbpress' ) );523 bbp_add_error( 'bbp_edit_reply_not_found', __( '<strong>Error</strong>: The reply you want to edit was not found.', 'bbpress' ) ); 524 524 return; 525 525 … … 532 532 // User cannot edit this reply 533 533 if ( ! current_user_can( 'edit_reply', $reply_id ) ) { 534 bbp_add_error( 'bbp_edit_reply_permission', __( '<strong>E RROR</strong>: You do not have permission to edit that reply.', 'bbpress' ) );534 bbp_add_error( 'bbp_edit_reply_permission', __( '<strong>Error</strong>: You do not have permission to edit that reply.', 'bbpress' ) ); 535 535 return; 536 536 } … … 567 567 // Forum is a category 568 568 if ( bbp_is_forum_category( $forum_id ) ) { 569 bbp_add_error( 'bbp_edit_reply_forum_category', __( '<strong>E RROR</strong>: This forum is a category. No replies can be created in this forum.', 'bbpress' ) );569 bbp_add_error( 'bbp_edit_reply_forum_category', __( '<strong>Error</strong>: This forum is a category. No replies can be created in this forum.', 'bbpress' ) ); 570 570 571 571 // Forum is not a category … … 574 574 // Forum is closed and user cannot access 575 575 if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) { 576 bbp_add_error( 'bbp_edit_reply_forum_closed', __( '<strong>E RROR</strong>: This forum has been closed to new replies.', 'bbpress' ) );576 bbp_add_error( 'bbp_edit_reply_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new replies.', 'bbpress' ) ); 577 577 } 578 578 579 579 // Forum is private and user cannot access 580 580 if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) { 581 bbp_add_error( 'bbp_edit_reply_forum_private', __( '<strong>E RROR</strong>: This forum is private and you do not have the capability to read or create new replies in it.', 'bbpress' ) );581 bbp_add_error( 'bbp_edit_reply_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new replies in it.', 'bbpress' ) ); 582 582 583 583 // Forum is hidden and user cannot access 584 584 } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) { 585 bbp_add_error( 'bbp_edit_reply_forum_hidden', __( '<strong>E RROR</strong>: This forum is hidden and you do not have the capability to read or create new replies in it.', 'bbpress' ) );585 bbp_add_error( 'bbp_edit_reply_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new replies in it.', 'bbpress' ) ); 586 586 } 587 587 } … … 599 599 // Title too long 600 600 if ( bbp_is_title_too_long( $reply_title ) ) { 601 bbp_add_error( 'bbp_reply_title', __( '<strong>E RROR</strong>: Your title is too long.', 'bbpress' ) );601 bbp_add_error( 'bbp_reply_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) ); 602 602 } 603 603 … … 613 613 // No reply content 614 614 if ( empty( $reply_content ) ) { 615 bbp_add_error( 'bbp_edit_reply_content', __( '<strong>E RROR</strong>: Your reply cannot be empty.', 'bbpress' ) );615 bbp_add_error( 'bbp_edit_reply_content', __( '<strong>Error</strong>: Your reply cannot be empty.', 'bbpress' ) ); 616 616 } 617 617 … … 619 619 620 620 if ( ! bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content, true ) ) { 621 bbp_add_error( 'bbp_reply_moderation', __( '<strong>E RROR</strong>: Your reply cannot be edited at this time.', 'bbpress' ) );621 bbp_add_error( 'bbp_reply_moderation', __( '<strong>Error</strong>: Your reply cannot be edited at this time.', 'bbpress' ) ); 622 622 } 623 623 … … 709 709 // Term error 710 710 if ( is_wp_error( $terms ) ) { 711 bbp_add_error( 'bbp_reply_tags', __( '<strong>E RROR</strong>: There was a problem adding the tags to the topic.', 'bbpress' ) );711 bbp_add_error( 'bbp_reply_tags', __( '<strong>Error</strong>: There was a problem adding the tags to the topic.', 'bbpress' ) ); 712 712 } 713 713 … … 767 767 } else { 768 768 $append_error = ( is_wp_error( $reply_id ) && $reply_id->get_error_message() ) ? $reply_id->get_error_message() . ' ' : ''; 769 bbp_add_error( 'bbp_reply_error', __( '<strong>E RROR</strong>: The following problem(s) have been found with your reply:' . $append_error . 'Please try again.', 'bbpress' ) );769 bbp_add_error( 'bbp_reply_error', __( '<strong>Error</strong>: The following problem(s) have been found with your reply:' . $append_error . 'Please try again.', 'bbpress' ) ); 770 770 } 771 771 } … … 1212 1212 1213 1213 if ( empty( $_POST['bbp_reply_id'] ) ) { 1214 bbp_add_error( 'bbp_move_reply_reply_id', __( '<strong>E RROR</strong>: A reply ID is required', 'bbpress' ) );1214 bbp_add_error( 'bbp_move_reply_reply_id', __( '<strong>Error</strong>: A reply ID is required', 'bbpress' ) ); 1215 1215 } else { 1216 1216 $move_reply_id = (int) $_POST['bbp_reply_id']; … … 1221 1221 // Reply exists 1222 1222 if ( empty( $move_reply ) ) { 1223 bbp_add_error( 'bbp_mover_reply_r_not_found', __( '<strong>E RROR</strong>: The reply you want to move was not found.', 'bbpress' ) );1223 bbp_add_error( 'bbp_mover_reply_r_not_found', __( '<strong>Error</strong>: The reply you want to move was not found.', 'bbpress' ) ); 1224 1224 } 1225 1225 … … 1231 1231 // No topic 1232 1232 if ( empty( $source_topic ) ) { 1233 bbp_add_error( 'bbp_move_reply_source_not_found', __( '<strong>E RROR</strong>: The topic you want to move from was not found.', 'bbpress' ) );1233 bbp_add_error( 'bbp_move_reply_source_not_found', __( '<strong>Error</strong>: The topic you want to move from was not found.', 'bbpress' ) ); 1234 1234 } 1235 1235 1236 1236 // Nonce check failed 1237 1237 if ( ! bbp_verify_nonce_request( 'bbp-move-reply_' . $move_reply->ID ) ) { 1238 bbp_add_error( 'bbp_move_reply_nonce', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );1238 bbp_add_error( 'bbp_move_reply_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 1239 1239 return; 1240 1240 } … … 1242 1242 // Use cannot edit topic 1243 1243 if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) { 1244 bbp_add_error( 'bbp_move_reply_source_permission', __( '<strong>E RROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );1244 bbp_add_error( 'bbp_move_reply_source_permission', __( '<strong>Error</strong>: You do not have permission to edit the source topic.', 'bbpress' ) ); 1245 1245 } 1246 1246 … … 1252 1252 // Invalid move option 1253 1253 if ( empty( $move_option ) || ! in_array( $move_option, array( 'existing', 'topic' ), true ) ) { 1254 bbp_add_error( 'bbp_move_reply_option', __( '<strong>E RROR</strong>: You need to choose a valid move option.', 'bbpress' ) );1254 bbp_add_error( 'bbp_move_reply_option', __( '<strong>Error</strong>: You need to choose a valid move option.', 'bbpress' ) ); 1255 1255 1256 1256 // Valid move option … … 1265 1265 // Get destination topic id 1266 1266 if ( empty( $_POST['bbp_destination_topic'] ) ) { 1267 bbp_add_error( 'bbp_move_reply_destination_id', __( '<strong>E RROR</strong>: A topic ID is required.', 'bbpress' ) );1267 bbp_add_error( 'bbp_move_reply_destination_id', __( '<strong>Error</strong>: A topic ID is required.', 'bbpress' ) ); 1268 1268 } else { 1269 1269 $destination_topic_id = (int) $_POST['bbp_destination_topic']; … … 1275 1275 // No destination topic 1276 1276 if ( empty( $destination_topic ) ) { 1277 bbp_add_error( 'bbp_move_reply_destination_not_found', __( '<strong>E RROR</strong>: The topic you want to move to was not found.', 'bbpress' ) );1277 bbp_add_error( 'bbp_move_reply_destination_not_found', __( '<strong>Error</strong>: The topic you want to move to was not found.', 'bbpress' ) ); 1278 1278 } 1279 1279 1280 1280 // User cannot edit the destination topic 1281 1281 if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) { 1282 bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>E RROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );1282 bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>Error</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) ); 1283 1283 } 1284 1284 … … 1334 1334 // Shouldn't happen 1335 1335 if ( false === $destination_topic_id || is_wp_error( $destination_topic_id ) || empty( $destination_topic ) ) { 1336 bbp_add_error( 'bbp_move_reply_destination_reply', __( '<strong>E RROR</strong>: There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) );1336 bbp_add_error( 'bbp_move_reply_destination_reply', __( '<strong>Error</strong>: There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) ); 1337 1337 } 1338 1338 1339 1339 // User cannot publish posts 1340 1340 } else { 1341 bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>E RROR</strong>: You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) );1341 bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>Error</strong>: You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) ); 1342 1342 } 1343 1343 … … 1487 1487 $reply = bbp_get_reply( $reply_id ); 1488 1488 if ( empty( $reply ) ) { 1489 bbp_add_error( 'bbp_toggle_reply_missing', __( '<strong>E RROR</strong>: This reply could not be found or no longer exists.', 'bbpress' ) );1489 bbp_add_error( 'bbp_toggle_reply_missing', __( '<strong>Error</strong>: This reply could not be found or no longer exists.', 'bbpress' ) ); 1490 1490 return; 1491 1491 } … … 1493 1493 // What is the user doing here? 1494 1494 if ( ! current_user_can( 'edit_reply', $reply_id ) || ( 'bbp_toggle_reply_trash' === $action && ! current_user_can( 'delete_reply', $reply_id ) ) ) { 1495 bbp_add_error( 'bbp_toggle_reply_permission', __( '<strong>E RROR</strong>: You do not have permission to do that.', 'bbpress' ) );1495 bbp_add_error( 'bbp_toggle_reply_permission', __( '<strong>Error</strong>: You do not have permission to do that.', 'bbpress' ) ); 1496 1496 return; 1497 1497 } … … 1569 1569 $is_approve = bbp_is_reply_pending( $r['id'] ); 1570 1570 $retval['status'] = $is_approve ? bbp_approve_reply( $r['id'] ) : bbp_unapprove_reply( $r['id'] ); 1571 $retval['message'] = $is_approve ? __( '<strong>E RROR</strong>: There was a problem approving the reply.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem unapproving the reply.', 'bbpress' );1571 $retval['message'] = $is_approve ? __( '<strong>Error</strong>: There was a problem approving the reply.', 'bbpress' ) : __( '<strong>Error</strong>: There was a problem unapproving the reply.', 'bbpress' ); 1572 1572 $retval['view_all'] = ! $is_approve; 1573 1573 … … 1580 1580 $is_spam = bbp_is_reply_spam( $r['id'] ); 1581 1581 $retval['status'] = $is_spam ? bbp_unspam_reply( $r['id'] ) : bbp_spam_reply( $r['id'] ); 1582 $retval['message'] = $is_spam ? __( '<strong>E RROR</strong>: There was a problem unmarking the reply as spam.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem marking the reply as spam.', 'bbpress' );1582 $retval['message'] = $is_spam ? __( '<strong>Error</strong>: There was a problem unmarking the reply as spam.', 'bbpress' ) : __( '<strong>Error</strong>: There was a problem marking the reply as spam.', 'bbpress' ); 1583 1583 $retval['view_all'] = ! $is_spam; 1584 1584 … … 1595 1595 $retval['view_all'] = true; 1596 1596 $retval['status'] = wp_trash_post( $r['id'] ); 1597 $retval['message'] = __( '<strong>E RROR</strong>: There was a problem trashing the reply.', 'bbpress' );1597 $retval['message'] = __( '<strong>Error</strong>: There was a problem trashing the reply.', 'bbpress' ); 1598 1598 1599 1599 break; … … 1603 1603 1604 1604 $retval['status'] = wp_untrash_post( $r['id'] ); 1605 $retval['message'] = __( '<strong>E RROR</strong>: There was a problem untrashing the reply.', 'bbpress' );1605 $retval['message'] = __( '<strong>Error</strong>: There was a problem untrashing the reply.', 'bbpress' ); 1606 1606 1607 1607 break; … … 1611 1611 1612 1612 $retval['status'] = wp_delete_post( $r['id'] ); 1613 $retval['message'] = __( '<strong>E RROR</strong>: There was a problem deleting the reply.', 'bbpress' );1613 $retval['message'] = __( '<strong>Error</strong>: There was a problem deleting the reply.', 'bbpress' ); 1614 1614 1615 1615 break; -
branches/2.6/src/includes/topics/functions.php
r7036 r7097 103 103 // Nonce check 104 104 if ( ! bbp_verify_nonce_request( 'bbp-new-topic' ) ) { 105 bbp_add_error( 'bbp_new_topic_nonce', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );105 bbp_add_error( 'bbp_new_topic_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 106 106 return; 107 107 } … … 130 130 // User cannot create topics 131 131 if ( ! current_user_can( 'publish_topics' ) ) { 132 bbp_add_error( 'bbp_topic_permission', __( '<strong>E RROR</strong>: You do not have permission to create new topics.', 'bbpress' ) );132 bbp_add_error( 'bbp_topic_permission', __( '<strong>Error</strong>: You do not have permission to create new topics.', 'bbpress' ) ); 133 133 return; 134 134 } … … 156 156 // No topic title 157 157 if ( empty( $topic_title ) ) { 158 bbp_add_error( 'bbp_topic_title', __( '<strong>E RROR</strong>: Your topic needs a title.', 'bbpress' ) );158 bbp_add_error( 'bbp_topic_title', __( '<strong>Error</strong>: Your topic needs a title.', 'bbpress' ) ); 159 159 } 160 160 161 161 // Title too long 162 162 if ( bbp_is_title_too_long( $topic_title ) ) { 163 bbp_add_error( 'bbp_topic_title', __( '<strong>E RROR</strong>: Your title is too long.', 'bbpress' ) );163 bbp_add_error( 'bbp_topic_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) ); 164 164 } 165 165 … … 175 175 // No topic content 176 176 if ( empty( $topic_content ) ) { 177 bbp_add_error( 'bbp_topic_content', __( '<strong>E RROR</strong>: Your topic cannot be empty.', 'bbpress' ) );177 bbp_add_error( 'bbp_topic_content', __( '<strong>Error</strong>: Your topic cannot be empty.', 'bbpress' ) ); 178 178 } 179 179 … … 185 185 // Empty Forum id was passed 186 186 if ( empty( $_POST['bbp_forum_id'] ) ) { 187 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>E RROR</strong>: Forum ID is missing.', 'bbpress' ) );187 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID is missing.', 'bbpress' ) ); 188 188 189 189 // Forum id is not a number 190 190 } elseif ( ! is_numeric( $_POST['bbp_forum_id'] ) ) { 191 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>E RROR</strong>: Forum ID must be a number.', 'bbpress' ) );191 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID must be a number.', 'bbpress' ) ); 192 192 193 193 // Forum id might be valid … … 199 199 // Forum id is empty 200 200 if ( 0 === $posted_forum_id ) { 201 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>E RROR</strong>: Forum ID is missing.', 'bbpress' ) );201 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID is missing.', 'bbpress' ) ); 202 202 203 203 // Forum id is a negative number 204 204 } elseif ( 0 > $posted_forum_id ) { 205 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>E RROR</strong>: Forum ID cannot be a negative number.', 'bbpress' ) );205 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID cannot be a negative number.', 'bbpress' ) ); 206 206 207 207 // Forum does not exist 208 208 } elseif ( ! bbp_get_forum( $posted_forum_id ) ) { 209 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>E RROR</strong>: Forum does not exist.', 'bbpress' ) );209 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum does not exist.', 'bbpress' ) ); 210 210 211 211 // Use the POST'ed forum id … … 221 221 // Forum is a category 222 222 if ( bbp_is_forum_category( $forum_id ) ) { 223 bbp_add_error( 'bbp_new_topic_forum_category', __( '<strong>E RROR</strong>: This forum is a category. No topics can be created in this forum.', 'bbpress' ) );223 bbp_add_error( 'bbp_new_topic_forum_category', __( '<strong>Error</strong>: This forum is a category. No topics can be created in this forum.', 'bbpress' ) ); 224 224 225 225 // Forum is not a category … … 228 228 // Forum is closed and user cannot access 229 229 if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) { 230 bbp_add_error( 'bbp_new_topic_forum_closed', __( '<strong>E RROR</strong>: This forum has been closed to new topics.', 'bbpress' ) );230 bbp_add_error( 'bbp_new_topic_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new topics.', 'bbpress' ) ); 231 231 } 232 232 233 233 // Forum is private and user cannot access 234 234 if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) { 235 bbp_add_error( 'bbp_new_topic_forum_private', __( '<strong>E RROR</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) );235 bbp_add_error( 'bbp_new_topic_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) ); 236 236 237 237 // Forum is hidden and user cannot access 238 238 } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) { 239 bbp_add_error( 'bbp_new_topic_forum_hidden', __( '<strong>E RROR</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );239 bbp_add_error( 'bbp_new_topic_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) ); 240 240 } 241 241 } … … 245 245 246 246 if ( ! bbp_check_for_flood( $anonymous_data, $topic_author ) ) { 247 bbp_add_error( 'bbp_topic_flood', __( '<strong>E RROR</strong>: Slow down; you move too fast.', 'bbpress' ) );247 bbp_add_error( 'bbp_topic_flood', __( '<strong>Error</strong>: Slow down; you move too fast.', 'bbpress' ) ); 248 248 } 249 249 … … 251 251 252 252 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>E RROR</strong>: Duplicate topic detected; it looks as though you’ve already said that.', 'bbpress' ) );253 bbp_add_error( 'bbp_topic_duplicate', __( '<strong>Error</strong>: Duplicate topic detected; it looks as though you’ve already said that.', 'bbpress' ) ); 254 254 } 255 255 … … 257 257 258 258 if ( ! bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content, true ) ) { 259 bbp_add_error( 'bbp_topic_moderation', __( '<strong>E RROR</strong>: Your topic cannot be created at this time.', 'bbpress' ) );259 bbp_add_error( 'bbp_topic_moderation', __( '<strong>Error</strong>: Your topic cannot be created at this time.', 'bbpress' ) ); 260 260 } 261 261 … … 398 398 // WP_Error 399 399 } elseif ( is_wp_error( $topic_id ) ) { 400 bbp_add_error( 'bbp_topic_error', sprintf( __( '<strong>E RROR</strong>: The following problem(s) occurred: %s', 'bbpress' ), $topic_id->get_error_message() ) );400 bbp_add_error( 'bbp_topic_error', sprintf( __( '<strong>Error</strong>: The following problem(s) occurred: %s', 'bbpress' ), $topic_id->get_error_message() ) ); 401 401 402 402 // Generic error 403 403 } else { 404 bbp_add_error( 'bbp_topic_error', __( '<strong>E RROR</strong>: The topic was not created.', 'bbpress' ) );404 bbp_add_error( 'bbp_topic_error', __( '<strong>Error</strong>: The topic was not created.', 'bbpress' ) ); 405 405 } 406 406 } … … 428 428 // Topic id was not passed 429 429 if ( empty( $_POST['bbp_topic_id'] ) ) { 430 bbp_add_error( 'bbp_edit_topic_id', __( '<strong>E RROR</strong>: Topic ID not found.', 'bbpress' ) );430 bbp_add_error( 'bbp_edit_topic_id', __( '<strong>Error</strong>: Topic ID not found.', 'bbpress' ) ); 431 431 return; 432 432 … … 439 439 // Topic does not exist 440 440 if ( empty( $topic ) ) { 441 bbp_add_error( 'bbp_edit_topic_not_found', __( '<strong>E RROR</strong>: The topic you want to edit was not found.', 'bbpress' ) );441 bbp_add_error( 'bbp_edit_topic_not_found', __( '<strong>Error</strong>: The topic you want to edit was not found.', 'bbpress' ) ); 442 442 return; 443 443 … … 450 450 // User cannot edit this topic 451 451 if ( ! current_user_can( 'edit_topic', $topic_id ) ) { 452 bbp_add_error( 'bbp_edit_topic_permission', __( '<strong>E RROR</strong>: You do not have permission to edit that topic.', 'bbpress' ) );452 bbp_add_error( 'bbp_edit_topic_permission', __( '<strong>Error</strong>: You do not have permission to edit that topic.', 'bbpress' ) ); 453 453 } 454 454 … … 466 466 // Nonce check 467 467 if ( ! bbp_verify_nonce_request( 'bbp-edit-topic_' . $topic_id ) ) { 468 bbp_add_error( 'bbp_edit_topic_nonce', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );468 bbp_add_error( 'bbp_edit_topic_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 469 469 return; 470 470 } … … 481 481 // Forum id was not passed 482 482 if ( empty( $_POST['bbp_forum_id'] ) ) { 483 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>E RROR</strong>: Forum ID is missing.', 'bbpress' ) );483 bbp_add_error( 'bbp_topic_forum_id', __( '<strong>Error</strong>: Forum ID is missing.', 'bbpress' ) ); 484 484 485 485 // Forum id was passed … … 496 496 // Forum is a category 497 497 if ( bbp_is_forum_category( $forum_id ) ) { 498 bbp_add_error( 'bbp_edit_topic_forum_category', __( '<strong>E RROR</strong>: This forum is a category. No topics can be created in it.', 'bbpress' ) );498 bbp_add_error( 'bbp_edit_topic_forum_category', __( '<strong>Error</strong>: This forum is a category. No topics can be created in it.', 'bbpress' ) ); 499 499 500 500 // Forum is not a category … … 503 503 // Forum is closed and user cannot access 504 504 if ( bbp_is_forum_closed( $forum_id ) && ! current_user_can( 'edit_forum', $forum_id ) ) { 505 bbp_add_error( 'bbp_edit_topic_forum_closed', __( '<strong>E RROR</strong>: This forum has been closed to new topics.', 'bbpress' ) );505 bbp_add_error( 'bbp_edit_topic_forum_closed', __( '<strong>Error</strong>: This forum has been closed to new topics.', 'bbpress' ) ); 506 506 } 507 507 508 508 // Forum is private and user cannot access 509 509 if ( bbp_is_forum_private( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) { 510 bbp_add_error( 'bbp_edit_topic_forum_private', __( '<strong>E RROR</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) );510 bbp_add_error( 'bbp_edit_topic_forum_private', __( '<strong>Error</strong>: This forum is private and you do not have the capability to read or create new topics in it.', 'bbpress' ) ); 511 511 512 512 // Forum is hidden and user cannot access 513 513 } elseif ( bbp_is_forum_hidden( $forum_id ) && ! current_user_can( 'read_forum', $forum_id ) ) { 514 bbp_add_error( 'bbp_edit_topic_forum_hidden', __( '<strong>E RROR</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) );514 bbp_add_error( 'bbp_edit_topic_forum_hidden', __( '<strong>Error</strong>: This forum is hidden and you do not have the capability to read or create new topics in it.', 'bbpress' ) ); 515 515 } 516 516 } … … 528 528 // No topic title 529 529 if ( empty( $topic_title ) ) { 530 bbp_add_error( 'bbp_edit_topic_title', __( '<strong>E RROR</strong>: Your topic needs a title.', 'bbpress' ) );530 bbp_add_error( 'bbp_edit_topic_title', __( '<strong>Error</strong>: Your topic needs a title.', 'bbpress' ) ); 531 531 } 532 532 533 533 // Title too long 534 534 if ( bbp_is_title_too_long( $topic_title ) ) { 535 bbp_add_error( 'bbp_topic_title', __( '<strong>E RROR</strong>: Your title is too long.', 'bbpress' ) );535 bbp_add_error( 'bbp_topic_title', __( '<strong>Error</strong>: Your title is too long.', 'bbpress' ) ); 536 536 } 537 537 … … 547 547 // No topic content 548 548 if ( empty( $topic_content ) ) { 549 bbp_add_error( 'bbp_edit_topic_content', __( '<strong>E RROR</strong>: Your topic cannot be empty.', 'bbpress' ) );549 bbp_add_error( 'bbp_edit_topic_content', __( '<strong>Error</strong>: Your topic cannot be empty.', 'bbpress' ) ); 550 550 } 551 551 … … 553 553 554 554 if ( ! bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content, true ) ) { 555 bbp_add_error( 'bbp_topic_moderation', __( '<strong>E RROR</strong>: Your topic cannot be edited at this time.', 'bbpress' ) );555 bbp_add_error( 'bbp_topic_moderation', __( '<strong>Error</strong>: Your topic cannot be edited at this time.', 'bbpress' ) ); 556 556 } 557 557 … … 714 714 } else { 715 715 $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>E RROR</strong>: The following problem(s) have been found with your topic:' . $append_error . 'Please try again.', 'bbpress' ) );716 bbp_add_error( 'bbp_topic_error', __( '<strong>Error</strong>: The following problem(s) have been found with your topic:' . $append_error . 'Please try again.', 'bbpress' ) ); 717 717 } 718 718 } … … 1083 1083 // Topic id 1084 1084 if ( empty( $_POST['bbp_topic_id'] ) ) { 1085 bbp_add_error( 'bbp_merge_topic_source_id', __( '<strong>E RROR</strong>: Topic ID not found.', 'bbpress' ) );1085 bbp_add_error( 'bbp_merge_topic_source_id', __( '<strong>Error</strong>: Topic ID not found.', 'bbpress' ) ); 1086 1086 } else { 1087 1087 $source_topic_id = (int) $_POST['bbp_topic_id']; … … 1090 1090 // Nonce check 1091 1091 if ( ! bbp_verify_nonce_request( 'bbp-merge-topic_' . $source_topic_id ) ) { 1092 bbp_add_error( 'bbp_merge_topic_nonce', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );1092 bbp_add_error( 'bbp_merge_topic_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 1093 1093 return; 1094 1094 1095 1095 // Source topic not found 1096 1096 } elseif ( ! $source_topic = bbp_get_topic( $source_topic_id ) ) { 1097 bbp_add_error( 'bbp_merge_topic_source_not_found', __( '<strong>E RROR</strong>: The topic you want to merge was not found.', 'bbpress' ) );1097 bbp_add_error( 'bbp_merge_topic_source_not_found', __( '<strong>Error</strong>: The topic you want to merge was not found.', 'bbpress' ) ); 1098 1098 return; 1099 1099 } … … 1101 1101 // Cannot edit source topic 1102 1102 if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) { 1103 bbp_add_error( 'bbp_merge_topic_source_permission', __( '<strong>E RROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );1103 bbp_add_error( 'bbp_merge_topic_source_permission', __( '<strong>Error</strong>: You do not have permission to edit the source topic.', 'bbpress' ) ); 1104 1104 return; 1105 1105 } … … 1109 1109 // Topic id 1110 1110 if ( empty( $_POST['bbp_destination_topic'] ) ) { 1111 bbp_add_error( 'bbp_merge_topic_destination_id', __( '<strong>E RROR</strong>: Destination topic ID not found.', 'bbpress' ) );1111 bbp_add_error( 'bbp_merge_topic_destination_id', __( '<strong>Error</strong>: Destination topic ID not found.', 'bbpress' ) ); 1112 1112 } else { 1113 1113 $destination_topic_id = (int) $_POST['bbp_destination_topic']; … … 1116 1116 // Destination topic not found 1117 1117 if ( ! $destination_topic = bbp_get_topic( $destination_topic_id ) ) { 1118 bbp_add_error( 'bbp_merge_topic_destination_not_found', __( '<strong>E RROR</strong>: The topic you want to merge to was not found.', 'bbpress' ) );1118 bbp_add_error( 'bbp_merge_topic_destination_not_found', __( '<strong>Error</strong>: The topic you want to merge to was not found.', 'bbpress' ) ); 1119 1119 } 1120 1120 1121 1121 // Cannot edit destination topic 1122 1122 if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) { 1123 bbp_add_error( 'bbp_merge_topic_destination_permission', __( '<strong>E RROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );1123 bbp_add_error( 'bbp_merge_topic_destination_permission', __( '<strong>Error</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) ); 1124 1124 } 1125 1125 … … 1341 1341 1342 1342 if ( empty( $_POST['bbp_reply_id'] ) ) { 1343 bbp_add_error( 'bbp_split_topic_reply_id', __( '<strong>E RROR</strong>: A reply ID is required.', 'bbpress' ) );1343 bbp_add_error( 'bbp_split_topic_reply_id', __( '<strong>Error</strong>: A reply ID is required.', 'bbpress' ) ); 1344 1344 } else { 1345 1345 $from_reply_id = (int) $_POST['bbp_reply_id']; … … 1350 1350 // Reply exists 1351 1351 if ( empty( $from_reply ) ) { 1352 bbp_add_error( 'bbp_split_topic_r_not_found', __( '<strong>E RROR</strong>: The reply you want to split from was not found.', 'bbpress' ) );1352 bbp_add_error( 'bbp_split_topic_r_not_found', __( '<strong>Error</strong>: The reply you want to split from was not found.', 'bbpress' ) ); 1353 1353 } 1354 1354 … … 1360 1360 // No topic 1361 1361 if ( empty( $source_topic ) ) { 1362 bbp_add_error( 'bbp_split_topic_source_not_found', __( '<strong>E RROR</strong>: The topic you want to split was not found.', 'bbpress' ) );1362 bbp_add_error( 'bbp_split_topic_source_not_found', __( '<strong>Error</strong>: The topic you want to split was not found.', 'bbpress' ) ); 1363 1363 } 1364 1364 1365 1365 // Nonce check failed 1366 1366 if ( ! bbp_verify_nonce_request( 'bbp-split-topic_' . $source_topic->ID ) ) { 1367 bbp_add_error( 'bbp_split_topic_nonce', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );1367 bbp_add_error( 'bbp_split_topic_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 1368 1368 return; 1369 1369 } … … 1371 1371 // Use cannot edit topic 1372 1372 if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) { 1373 bbp_add_error( 'bbp_split_topic_source_permission', __( '<strong>E RROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );1373 bbp_add_error( 'bbp_split_topic_source_permission', __( '<strong>Error</strong>: You do not have permission to edit the source topic.', 'bbpress' ) ); 1374 1374 } 1375 1375 … … 1381 1381 // Invalid split option 1382 1382 if ( empty( $split_option ) || ! in_array( $split_option, array( 'existing', 'reply' ), true ) ) { 1383 bbp_add_error( 'bbp_split_topic_option', __( '<strong>E RROR</strong>: You need to choose a valid split option.', 'bbpress' ) );1383 bbp_add_error( 'bbp_split_topic_option', __( '<strong>Error</strong>: You need to choose a valid split option.', 'bbpress' ) ); 1384 1384 1385 1385 // Valid Split Option … … 1394 1394 // Get destination topic id 1395 1395 if ( empty( $_POST['bbp_destination_topic'] ) ) { 1396 bbp_add_error( 'bbp_split_topic_destination_id', __( '<strong>E RROR</strong>: A topic ID is required.', 'bbpress' ) );1396 bbp_add_error( 'bbp_split_topic_destination_id', __( '<strong>Error</strong>: A topic ID is required.', 'bbpress' ) ); 1397 1397 } else { 1398 1398 $destination_topic_id = (int) $_POST['bbp_destination_topic']; … … 1404 1404 // No destination topic 1405 1405 if ( empty( $destination_topic ) ) { 1406 bbp_add_error( 'bbp_split_topic_destination_not_found', __( '<strong>E RROR</strong>: The topic you want to split to was not found.', 'bbpress' ) );1406 bbp_add_error( 'bbp_split_topic_destination_not_found', __( '<strong>Error</strong>: The topic you want to split to was not found.', 'bbpress' ) ); 1407 1407 } 1408 1408 1409 1409 // User cannot edit the destination topic 1410 1410 if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) { 1411 bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>E RROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );1411 bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>Error</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) ); 1412 1412 } 1413 1413 … … 1447 1447 // Shouldn't happen 1448 1448 if ( false === $destination_topic_id || is_wp_error( $destination_topic_id ) || empty( $destination_topic ) ) { 1449 bbp_add_error( 'bbp_split_topic_destination_reply', __( '<strong>E RROR</strong>: There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) );1449 bbp_add_error( 'bbp_split_topic_destination_reply', __( '<strong>Error</strong>: There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) ); 1450 1450 } 1451 1451 1452 1452 // User cannot publish posts 1453 1453 } else { 1454 bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>E RROR</strong>: You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) );1454 bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>Error</strong>: You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) ); 1455 1455 } 1456 1456 … … 1689 1689 // Tag does not exist 1690 1690 if ( is_wp_error( $tag ) && $tag->get_error_message() ) { 1691 bbp_add_error( 'bbp_manage_topic_invalid_tag', sprintf( __( '<strong>E RROR</strong>: The following problem(s) have been found while getting the tag: %s', 'bbpress' ), $tag->get_error_message() ) );1691 bbp_add_error( 'bbp_manage_topic_invalid_tag', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found while getting the tag: %s', 'bbpress' ), $tag->get_error_message() ) ); 1692 1692 return; 1693 1693 } … … 1701 1701 // Nonce check 1702 1702 if ( ! bbp_verify_nonce_request( 'update-tag_' . $tag_id ) ) { 1703 bbp_add_error( 'bbp_manage_topic_tag_update_nonce', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );1703 bbp_add_error( 'bbp_manage_topic_tag_update_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 1704 1704 return; 1705 1705 } … … 1707 1707 // Can user edit topic tags? 1708 1708 if ( ! current_user_can( 'edit_topic_tag', $tag_id ) ) { 1709 bbp_add_error( 'bbp_manage_topic_tag_update_permission', __( '<strong>E RROR</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );1709 bbp_add_error( 'bbp_manage_topic_tag_update_permission', __( '<strong>Error</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) ); 1710 1710 return; 1711 1711 } … … 1713 1713 // No tag name was provided 1714 1714 if ( empty( $_POST['tag-name'] ) || ! $name = $_POST['tag-name'] ) { 1715 bbp_add_error( 'bbp_manage_topic_tag_update_name', __( '<strong>E RROR</strong>: You need to enter a tag name.', 'bbpress' ) );1715 bbp_add_error( 'bbp_manage_topic_tag_update_name', __( '<strong>Error</strong>: You need to enter a tag name.', 'bbpress' ) ); 1716 1716 return; 1717 1717 } … … 1728 1728 // Cannot update tag 1729 1729 if ( is_wp_error( $tag ) && $tag->get_error_message() ) { 1730 bbp_add_error( 'bbp_manage_topic_tag_update_error', sprintf( __( '<strong>E RROR</strong>: The following problem(s) have been found while updating the tag: %s', 'bbpress' ), $tag->get_error_message() ) );1730 bbp_add_error( 'bbp_manage_topic_tag_update_error', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found while updating the tag: %s', 'bbpress' ), $tag->get_error_message() ) ); 1731 1731 return; 1732 1732 } … … 1745 1745 // Nonce check 1746 1746 if ( ! bbp_verify_nonce_request( 'merge-tag_' . $tag_id ) ) { 1747 bbp_add_error( 'bbp_manage_topic_tag_merge_nonce', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );1747 bbp_add_error( 'bbp_manage_topic_tag_merge_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 1748 1748 return; 1749 1749 } … … 1751 1751 // Can user edit topic tags? 1752 1752 if ( ! current_user_can( 'edit_topic_tags' ) ) { 1753 bbp_add_error( 'bbp_manage_topic_tag_merge_permission', __( '<strong>E RROR</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );1753 bbp_add_error( 'bbp_manage_topic_tag_merge_permission', __( '<strong>Error</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) ); 1754 1754 return; 1755 1755 } … … 1757 1757 // No tag name was provided 1758 1758 if ( empty( $_POST['tag-existing-name'] ) || ! $name = $_POST['tag-existing-name'] ) { 1759 bbp_add_error( 'bbp_manage_topic_tag_merge_name', __( '<strong>E RROR</strong>: You need to enter a tag name.', 'bbpress' ) );1759 bbp_add_error( 'bbp_manage_topic_tag_merge_name', __( '<strong>Error</strong>: You need to enter a tag name.', 'bbpress' ) ); 1760 1760 return; 1761 1761 } … … 1768 1768 // Problem inserting the new term 1769 1769 if ( is_wp_error( $tag ) && $tag->get_error_message() ) { 1770 bbp_add_error( 'bbp_manage_topic_tag_merge_error', sprintf( __( '<strong>E RROR</strong>: The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) );1770 bbp_add_error( 'bbp_manage_topic_tag_merge_error', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) ); 1771 1771 return; 1772 1772 } … … 1777 1777 // Attempting to merge a tag into itself 1778 1778 if ( $tag_id === $to_tag ) { 1779 bbp_add_error( 'bbp_manage_topic_tag_merge_same', __( '<strong>E RROR</strong>: The tags which are being merged can not be the same.', 'bbpress' ) );1779 bbp_add_error( 'bbp_manage_topic_tag_merge_same', __( '<strong>Error</strong>: The tags which are being merged can not be the same.', 'bbpress' ) ); 1780 1780 return; 1781 1781 } … … 1789 1789 // Error merging the terms 1790 1790 if ( is_wp_error( $tag ) && $tag->get_error_message() ) { 1791 bbp_add_error( 'bbp_manage_topic_tag_merge_error', sprintf( __( '<strong>E RROR</strong>: The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) );1791 bbp_add_error( 'bbp_manage_topic_tag_merge_error', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found while merging the tags: %s', 'bbpress' ), $tag->get_error_message() ) ); 1792 1792 return; 1793 1793 } … … 1806 1806 // Nonce check 1807 1807 if ( ! bbp_verify_nonce_request( 'delete-tag_' . $tag_id ) ) { 1808 bbp_add_error( 'bbp_manage_topic_tag_delete_nonce', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );1808 bbp_add_error( 'bbp_manage_topic_tag_delete_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 1809 1809 return; 1810 1810 } … … 1812 1812 // Can user delete topic tags? 1813 1813 if ( ! current_user_can( 'delete_topic_tag', $tag_id ) ) { 1814 bbp_add_error( 'bbp_manage_topic_tag_delete_permission', __( '<strong>E RROR</strong>: You do not have permission to delete the topic tags.', 'bbpress' ) );1814 bbp_add_error( 'bbp_manage_topic_tag_delete_permission', __( '<strong>Error</strong>: You do not have permission to delete the topic tags.', 'bbpress' ) ); 1815 1815 return; 1816 1816 } … … 1821 1821 // Error deleting term 1822 1822 if ( is_wp_error( $tag ) && $tag->get_error_message() ) { 1823 bbp_add_error( 'bbp_manage_topic_tag_delete_error', sprintf( __( '<strong>E RROR</strong>: The following problem(s) have been found while deleting the tag: %s', 'bbpress' ), $tag->get_error_message() ) );1823 bbp_add_error( 'bbp_manage_topic_tag_delete_error', sprintf( __( '<strong>Error</strong>: The following problem(s) have been found while deleting the tag: %s', 'bbpress' ), $tag->get_error_message() ) ); 1824 1824 return; 1825 1825 } … … 2017 2017 $topic = bbp_get_topic( $topic_id ); 2018 2018 if ( empty( $topic ) ) { 2019 bbp_add_error( 'bbp_toggle_topic_missing', __( '<strong>E RROR</strong>: This topic could not be found or no longer exists.', 'bbpress' ) );2019 bbp_add_error( 'bbp_toggle_topic_missing', __( '<strong>Error</strong>: This topic could not be found or no longer exists.', 'bbpress' ) ); 2020 2020 return; 2021 2021 } … … 2023 2023 // What is the user doing here? 2024 2024 if ( ! current_user_can( 'edit_topic', $topic_id ) || ( 'bbp_toggle_topic_trash' === $action && ! current_user_can( 'delete_topic', $topic_id ) ) ) { 2025 bbp_add_error( 'bbp_toggle_topic_permission', __( '<strong>E RROR</strong>: You do not have permission to do that.', 'bbpress' ) );2025 bbp_add_error( 'bbp_toggle_topic_permission', __( '<strong>Error</strong>: You do not have permission to do that.', 'bbpress' ) ); 2026 2026 return; 2027 2027 } … … 2107 2107 // Feedback 2108 2108 $retval['message'] = ( true === $is_pending ) 2109 ? __( '<strong>E RROR</strong>: There was a problem approving the topic.', 'bbpress' )2110 : __( '<strong>E RROR</strong>: There was a problem unapproving the topic.', 'bbpress' );2109 ? __( '<strong>Error</strong>: There was a problem approving the topic.', 'bbpress' ) 2110 : __( '<strong>Error</strong>: There was a problem unapproving the topic.', 'bbpress' ); 2111 2111 2112 2112 break; … … 2125 2125 // Feedback 2126 2126 $retval['message'] = ( true === $is_open ) 2127 ? __( '<strong>E RROR</strong>: There was a problem closing the topic.', 'bbpress' )2128 : __( '<strong>E RROR</strong>: There was a problem opening the topic.', 'bbpress' );2127 ? __( '<strong>Error</strong>: There was a problem closing the topic.', 'bbpress' ) 2128 : __( '<strong>Error</strong>: There was a problem opening the topic.', 'bbpress' ); 2129 2129 2130 2130 break; … … 2144 2144 // Feedback 2145 2145 $retval['message'] = ( true === $is_sticky ) 2146 ? __( '<strong>E RROR</strong>: There was a problem unsticking the topic.', 'bbpress' )2147 : __( '<strong>E RROR</strong>: There was a problem sticking the topic.', 'bbpress' );2146 ? __( '<strong>Error</strong>: There was a problem unsticking the topic.', 'bbpress' ) 2147 : __( '<strong>Error</strong>: There was a problem sticking the topic.', 'bbpress' ); 2148 2148 2149 2149 break; … … 2163 2163 // Feedback 2164 2164 $retval['message'] = ( true === $is_spam ) 2165 ? __( '<strong>E RROR</strong>: There was a problem unmarking the topic as spam.', 'bbpress' )2166 : __( '<strong>E RROR</strong>: There was a problem marking the topic as spam.', 'bbpress' );2165 ? __( '<strong>Error</strong>: There was a problem unmarking the topic as spam.', 'bbpress' ) 2166 : __( '<strong>Error</strong>: There was a problem marking the topic as spam.', 'bbpress' ); 2167 2167 2168 2168 break; … … 2177 2177 $retval['view_all'] = true; 2178 2178 $retval['status'] = wp_trash_post( $r['id'] ); 2179 $retval['message'] = __( '<strong>E RROR</strong>: There was a problem trashing the topic.', 'bbpress' );2179 $retval['message'] = __( '<strong>Error</strong>: There was a problem trashing the topic.', 'bbpress' ); 2180 2180 $retval['redirect_to'] = current_user_can( 'view_trash' ) 2181 2181 ? bbp_get_topic_permalink( $r['id'] ) … … 2188 2188 2189 2189 $retval['status'] = wp_untrash_post( $r['id'] ); 2190 $retval['message'] = __( '<strong>E RROR</strong>: There was a problem untrashing the topic.', 'bbpress' );2190 $retval['message'] = __( '<strong>Error</strong>: There was a problem untrashing the topic.', 'bbpress' ); 2191 2191 $retval['redirect_to'] = bbp_get_topic_permalink( $r['id'] ); 2192 2192 … … 2197 2197 2198 2198 $retval['status'] = wp_delete_post( $r['id'] ); 2199 $retval['message'] = __( '<strong>E RROR</strong>: There was a problem deleting the topic.', 'bbpress' );2199 $retval['message'] = __( '<strong>Error</strong>: There was a problem deleting the topic.', 'bbpress' ); 2200 2200 $retval['redirect_to'] = bbp_get_forum_permalink( $retval['status']->post_parent ); 2201 2201 -
branches/2.6/src/includes/users/engagements.php
r7012 r7097 606 606 // Check for empty topic 607 607 if ( empty( $topic_id ) ) { 608 bbp_add_error( 'bbp_favorite_topic_id', __( '<strong>E RROR</strong>: No topic was found. Which topic are you marking/unmarking as favorite?', 'bbpress' ) );608 bbp_add_error( 'bbp_favorite_topic_id', __( '<strong>Error</strong>: No topic was found. Which topic are you marking/unmarking as favorite?', 'bbpress' ) ); 609 609 610 610 // Check nonce 611 611 } elseif ( ! bbp_verify_nonce_request( 'toggle-favorite_' . $topic_id ) ) { 612 bbp_add_error( 'bbp_favorite_nonce', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );612 bbp_add_error( 'bbp_favorite_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 613 613 614 614 // Check current user's ability to edit the user 615 615 } elseif ( ! current_user_can( 'edit_user', $user_id ) ) { 616 bbp_add_error( 'bbp_favorite_permission', __( '<strong>E RROR</strong>: You do not have permission to edit favorites for that user.', 'bbpress' ) );616 bbp_add_error( 'bbp_favorite_permission', __( '<strong>Error</strong>: You do not have permission to edit favorites for that user.', 'bbpress' ) ); 617 617 } 618 618 … … 655 655 // Fail! Handle errors 656 656 } elseif ( 'bbp_favorite_remove' === $action ) { 657 bbp_add_error( 'bbp_favorite_remove', __( '<strong>E RROR</strong>: There was a problem removing that topic from favorites.', 'bbpress' ) );657 bbp_add_error( 'bbp_favorite_remove', __( '<strong>Error</strong>: There was a problem removing that topic from favorites.', 'bbpress' ) ); 658 658 } elseif ( 'bbp_favorite_add' === $action ) { 659 bbp_add_error( 'bbp_favorite_add', __( '<strong>E RROR</strong>: There was a problem favoriting that topic.', 'bbpress' ) );659 bbp_add_error( 'bbp_favorite_add', __( '<strong>Error</strong>: There was a problem favoriting that topic.', 'bbpress' ) ); 660 660 } 661 661 … … 847 847 // Check for empty topic 848 848 if ( empty( $object_id ) ) { 849 bbp_add_error( 'bbp_subscription_object_id', __( '<strong>E RROR</strong>: Not found. What are you subscribing/unsubscribing to?', 'bbpress' ) );849 bbp_add_error( 'bbp_subscription_object_id', __( '<strong>Error</strong>: Not found. What are you subscribing/unsubscribing to?', 'bbpress' ) ); 850 850 851 851 // Check nonce 852 852 } elseif ( ! bbp_verify_nonce_request( 'toggle-subscription_' . $object_id ) ) { 853 bbp_add_error( 'bbp_subscription_object_id', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );853 bbp_add_error( 'bbp_subscription_object_id', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 854 854 855 855 // Check current user's ability to edit the user 856 856 } elseif ( ! current_user_can( 'edit_user', $user_id ) ) { 857 bbp_add_error( 'bbp_subscription_permission', __( '<strong>E RROR</strong>: You do not have permission to edit subscriptions of that user.', 'bbpress' ) );857 bbp_add_error( 'bbp_subscription_permission', __( '<strong>Error</strong>: You do not have permission to edit subscriptions of that user.', 'bbpress' ) ); 858 858 } 859 859 … … 898 898 // Fail! Handle errors 899 899 } elseif ( 'bbp_unsubscribe' === $action ) { 900 bbp_add_error( 'bbp_unsubscribe', __( '<strong>E RROR</strong>: There was a problem unsubscribing.', 'bbpress' ) );900 bbp_add_error( 'bbp_unsubscribe', __( '<strong>Error</strong>: There was a problem unsubscribing.', 'bbpress' ) ); 901 901 } elseif ( 'bbp_subscribe' === $action ) { 902 bbp_add_error( 'bbp_subscribe', __( '<strong>E RROR</strong>: There was a problem subscribing.', 'bbpress' ) );902 bbp_add_error( 'bbp_subscribe', __( '<strong>Error</strong>: There was a problem subscribing.', 'bbpress' ) ); 903 903 } 904 904 -
branches/2.6/src/includes/users/functions.php
r7031 r7097 194 194 // Nonce check 195 195 if ( ! bbp_verify_nonce_request( 'update-user_' . $user_id ) ) { 196 bbp_add_error( 'bbp_update_user_nonce', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );196 bbp_add_error( 'bbp_update_user_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 197 197 return; 198 198 } … … 200 200 // Cap check 201 201 if ( ! current_user_can( 'edit_user', $user_id ) ) { 202 bbp_add_error( 'bbp_update_user_capability', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );202 bbp_add_error( 'bbp_update_user_capability', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 203 203 return; 204 204 } … … 206 206 // Empty email check 207 207 if ( empty( $_POST['email'] ) ) { 208 bbp_add_error( 'bbp_user_email_empty', __( '<strong>E RROR</strong>: That is not a valid email address.', 'bbpress' ), array( 'form-field' => 'email' ) );208 bbp_add_error( 'bbp_user_email_empty', __( '<strong>Error</strong>: That is not a valid email address.', 'bbpress' ), array( 'form-field' => 'email' ) ); 209 209 return; 210 210 } … … 218 218 // Check that new email address is valid 219 219 if ( ! is_email( $_POST['email'] ) ) { 220 bbp_add_error( 'bbp_user_email_invalid', __( '<strong>E RROR</strong>: That is not a valid email address.', 'bbpress' ), array( 'form-field' => 'email' ) );220 bbp_add_error( 'bbp_user_email_invalid', __( '<strong>Error</strong>: That is not a valid email address.', 'bbpress' ), array( 'form-field' => 'email' ) ); 221 221 return; 222 222 } … … 224 224 // Check if email address is already in use 225 225 if ( email_exists( $_POST['email'] ) ) { 226 bbp_add_error( 'bbp_user_email_taken', __( '<strong>E RROR</strong>: That email address is already in use.', 'bbpress' ), array( 'form-field' => 'email' ) );226 bbp_add_error( 'bbp_user_email_taken', __( '<strong>Error</strong>: That email address is already in use.', 'bbpress' ), array( 'form-field' => 'email' ) ); 227 227 return; 228 228 } … … 341 341 delete_user_meta( $user_id, $key ); 342 342 343 bbp_add_error( 'bbp_user_email_taken', __( '<strong>E RROR</strong>: That email address is already in use.', 'bbpress' ), array( 'form-field' => 'email' ) );343 bbp_add_error( 'bbp_user_email_taken', __( '<strong>Error</strong>: That email address is already in use.', 'bbpress' ), array( 'form-field' => 'email' ) ); 344 344 345 345 // Email address is good to change to … … 378 378 } elseif ( ! empty( $_GET['dismiss'] ) && ( "{$user_id}{$key}" === $_GET['dismiss'] ) ) { 379 379 if ( ! bbp_verify_nonce_request( "dismiss-{$user_id}{$key}" ) ) { 380 bbp_add_error( 'bbp_dismiss_new_email_nonce', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );380 bbp_add_error( 'bbp_dismiss_new_email_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 381 381 return; 382 382 } … … 404 404 // Bail if any relevant parameters are empty 405 405 if ( empty( $user_id ) || empty( $r['hash'] ) || empty( $r['newemail'] ) ) { 406 bbp_add_error( 'bbp_user_email_invalid_hash', __( '<strong>E RROR</strong>: An error occurred while updating your email address.', 'bbpress' ), array( 'form-field' => 'email' ) );406 bbp_add_error( 'bbp_user_email_invalid_hash', __( '<strong>Error</strong>: An error occurred while updating your email address.', 'bbpress' ), array( 'form-field' => 'email' ) ); 407 407 return; 408 408 } -
branches/2.6/src/includes/users/signups.php
r7087 r7097 207 207 // Add error if role is empty 208 208 if ( empty( $to_validate ) ) { 209 bbp_add_error( 'bbp_signup_role_empty', __( '<strong>E RROR</strong>: Empty role.', 'bbpress' ) );209 bbp_add_error( 'bbp_signup_role_empty', __( '<strong>Error</strong>: Empty role.', 'bbpress' ) ); 210 210 } 211 211 212 212 // Add error if posted role is not a valid role 213 213 if ( ! bbp_is_valid_role( $to_validate ) ) { 214 bbp_add_error( 'bbp_signup_role_invalid', __( '<strong>E RROR</strong>: Invalid role.', 'bbpress' ) );214 bbp_add_error( 'bbp_signup_role_invalid', __( '<strong>Error</strong>: Invalid role.', 'bbpress' ) ); 215 215 } 216 216
Note: See TracChangeset
for help on using the changeset viewer.