Changeset 7098 for trunk/src/includes/replies/functions.php
- Timestamp:
- 06/04/2020 09:29:53 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/replies/functions.php
r7096 r7098 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 } … … 1213 1213 1214 1214 if ( empty( $_POST['bbp_reply_id'] ) ) { 1215 bbp_add_error( 'bbp_move_reply_reply_id', __( '<strong>E RROR</strong>: A reply ID is required', 'bbpress' ) );1215 bbp_add_error( 'bbp_move_reply_reply_id', __( '<strong>Error</strong>: A reply ID is required', 'bbpress' ) ); 1216 1216 } else { 1217 1217 $move_reply_id = (int) $_POST['bbp_reply_id']; … … 1222 1222 // Reply exists 1223 1223 if ( empty( $move_reply ) ) { 1224 bbp_add_error( 'bbp_mover_reply_r_not_found', __( '<strong>E RROR</strong>: The reply you want to move was not found.', 'bbpress' ) );1224 bbp_add_error( 'bbp_mover_reply_r_not_found', __( '<strong>Error</strong>: The reply you want to move was not found.', 'bbpress' ) ); 1225 1225 } 1226 1226 … … 1232 1232 // No topic 1233 1233 if ( empty( $source_topic ) ) { 1234 bbp_add_error( 'bbp_move_reply_source_not_found', __( '<strong>E RROR</strong>: The topic you want to move from was not found.', 'bbpress' ) );1234 bbp_add_error( 'bbp_move_reply_source_not_found', __( '<strong>Error</strong>: The topic you want to move from was not found.', 'bbpress' ) ); 1235 1235 } 1236 1236 1237 1237 // Nonce check failed 1238 1238 if ( ! bbp_verify_nonce_request( 'bbp-move-reply_' . $move_reply->ID ) ) { 1239 bbp_add_error( 'bbp_move_reply_nonce', __( '<strong>E RROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );1239 bbp_add_error( 'bbp_move_reply_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) ); 1240 1240 return; 1241 1241 } … … 1243 1243 // Use cannot edit topic 1244 1244 if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) { 1245 bbp_add_error( 'bbp_move_reply_source_permission', __( '<strong>E RROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );1245 bbp_add_error( 'bbp_move_reply_source_permission', __( '<strong>Error</strong>: You do not have permission to edit the source topic.', 'bbpress' ) ); 1246 1246 } 1247 1247 … … 1253 1253 // Invalid move option 1254 1254 if ( empty( $move_option ) || ! in_array( $move_option, array( 'existing', 'topic' ), true ) ) { 1255 bbp_add_error( 'bbp_move_reply_option', __( '<strong>E RROR</strong>: You need to choose a valid move option.', 'bbpress' ) );1255 bbp_add_error( 'bbp_move_reply_option', __( '<strong>Error</strong>: You need to choose a valid move option.', 'bbpress' ) ); 1256 1256 1257 1257 // Valid move option … … 1266 1266 // Get destination topic id 1267 1267 if ( empty( $_POST['bbp_destination_topic'] ) ) { 1268 bbp_add_error( 'bbp_move_reply_destination_id', __( '<strong>E RROR</strong>: A topic ID is required.', 'bbpress' ) );1268 bbp_add_error( 'bbp_move_reply_destination_id', __( '<strong>Error</strong>: A topic ID is required.', 'bbpress' ) ); 1269 1269 } else { 1270 1270 $destination_topic_id = (int) $_POST['bbp_destination_topic']; … … 1276 1276 // No destination topic 1277 1277 if ( empty( $destination_topic ) ) { 1278 bbp_add_error( 'bbp_move_reply_destination_not_found', __( '<strong>E RROR</strong>: The topic you want to move to was not found.', 'bbpress' ) );1278 bbp_add_error( 'bbp_move_reply_destination_not_found', __( '<strong>Error</strong>: The topic you want to move to was not found.', 'bbpress' ) ); 1279 1279 } 1280 1280 1281 1281 // User cannot edit the destination topic 1282 1282 if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) { 1283 bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>E RROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );1283 bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>Error</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) ); 1284 1284 } 1285 1285 … … 1335 1335 // Shouldn't happen 1336 1336 if ( false === $destination_topic_id || is_wp_error( $destination_topic_id ) || empty( $destination_topic ) ) { 1337 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' ) );1337 bbp_add_error( 'bbp_move_reply_destination_reply', __( '<strong>Error</strong>: There was a problem converting the reply into the topic. Please try again.', 'bbpress' ) ); 1338 1338 } 1339 1339 1340 1340 // User cannot publish posts 1341 1341 } else { 1342 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' ) );1342 bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>Error</strong>: You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) ); 1343 1343 } 1344 1344 … … 1488 1488 $reply = bbp_get_reply( $reply_id ); 1489 1489 if ( empty( $reply ) ) { 1490 bbp_add_error( 'bbp_toggle_reply_missing', __( '<strong>E RROR</strong>: This reply could not be found or no longer exists.', 'bbpress' ) );1490 bbp_add_error( 'bbp_toggle_reply_missing', __( '<strong>Error</strong>: This reply could not be found or no longer exists.', 'bbpress' ) ); 1491 1491 return; 1492 1492 } … … 1494 1494 // What is the user doing here? 1495 1495 if ( ! current_user_can( 'edit_reply', $reply_id ) || ( 'bbp_toggle_reply_trash' === $action && ! current_user_can( 'delete_reply', $reply_id ) ) ) { 1496 bbp_add_error( 'bbp_toggle_reply_permission', __( '<strong>E RROR</strong>: You do not have permission to do that.', 'bbpress' ) );1496 bbp_add_error( 'bbp_toggle_reply_permission', __( '<strong>Error</strong>: You do not have permission to do that.', 'bbpress' ) ); 1497 1497 return; 1498 1498 } … … 1570 1570 $is_approve = bbp_is_reply_pending( $r['id'] ); 1571 1571 $retval['status'] = $is_approve ? bbp_approve_reply( $r['id'] ) : bbp_unapprove_reply( $r['id'] ); 1572 $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' );1572 $retval['message'] = $is_approve ? __( '<strong>Error</strong>: There was a problem approving the reply.', 'bbpress' ) : __( '<strong>Error</strong>: There was a problem unapproving the reply.', 'bbpress' ); 1573 1573 $retval['view_all'] = ! $is_approve; 1574 1574 … … 1581 1581 $is_spam = bbp_is_reply_spam( $r['id'] ); 1582 1582 $retval['status'] = $is_spam ? bbp_unspam_reply( $r['id'] ) : bbp_spam_reply( $r['id'] ); 1583 $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' );1583 $retval['message'] = $is_spam ? __( '<strong>Error</strong>: There was a problem unmarking the reply as spam.', 'bbpress' ) : __( '<strong>Error</strong>: There was a problem marking the reply as spam.', 'bbpress' ); 1584 1584 $retval['view_all'] = ! $is_spam; 1585 1585 … … 1596 1596 $retval['view_all'] = true; 1597 1597 $retval['status'] = wp_trash_post( $r['id'] ); 1598 $retval['message'] = __( '<strong>E RROR</strong>: There was a problem trashing the reply.', 'bbpress' );1598 $retval['message'] = __( '<strong>Error</strong>: There was a problem trashing the reply.', 'bbpress' ); 1599 1599 1600 1600 break; … … 1604 1604 1605 1605 $retval['status'] = wp_untrash_post( $r['id'] ); 1606 $retval['message'] = __( '<strong>E RROR</strong>: There was a problem untrashing the reply.', 'bbpress' );1606 $retval['message'] = __( '<strong>Error</strong>: There was a problem untrashing the reply.', 'bbpress' ); 1607 1607 1608 1608 break; … … 1612 1612 1613 1613 $retval['status'] = wp_delete_post( $r['id'] ); 1614 $retval['message'] = __( '<strong>E RROR</strong>: There was a problem deleting the reply.', 'bbpress' );1614 $retval['message'] = __( '<strong>Error</strong>: There was a problem deleting the reply.', 'bbpress' ); 1615 1615 1616 1616 break;
Note: See TracChangeset
for help on using the changeset viewer.