Changeset 6141 for trunk/src/includes/replies/functions.php
- Timestamp:
- 12/08/2016 04:14:17 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/replies/functions.php (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/replies/functions.php
r6140 r6141 180 180 // User cannot create replies 181 181 if ( !current_user_can( 'publish_replies' ) ) { 182 bbp_add_error( 'bbp_reply_permission s', __( '<strong>ERROR</strong>: You do not have permission to reply.', 'bbpress' ) );182 bbp_add_error( 'bbp_reply_permission', __( '<strong>ERROR</strong>: You do not have permission to reply.', 'bbpress' ) ); 183 183 } 184 184 … … 573 573 // User cannot edit this reply 574 574 if ( !current_user_can( 'edit_reply', $reply_id ) ) { 575 bbp_add_error( 'bbp_edit_reply_permission s', __( '<strong>ERROR</strong>: You do not have permission to edit that reply.', 'bbpress' ) );575 bbp_add_error( 'bbp_edit_reply_permission', __( '<strong>ERROR</strong>: You do not have permission to edit that reply.', 'bbpress' ) ); 576 576 return; 577 577 } … … 1331 1331 1332 1332 if ( empty( $_POST['bbp_reply_id'] ) ) { 1333 bbp_add_error( 'bbp_move_reply_reply_id', __( '<strong>ERROR</strong>: Reply ID to move not found!', 'bbpress' ) );1333 bbp_add_error( 'bbp_move_reply_reply_id', __( '<strong>ERROR</strong>: A reply ID is required', 'bbpress' ) ); 1334 1334 } else { 1335 1335 $move_reply_id = (int) $_POST['bbp_reply_id']; … … 1361 1361 // Use cannot edit topic 1362 1362 if ( !current_user_can( 'edit_topic', $source_topic->ID ) ) { 1363 bbp_add_error( 'bbp_move_reply_source_permission', __( '<strong>ERROR</strong>: You do not have the permissionsto edit the source topic.', 'bbpress' ) );1363 bbp_add_error( 'bbp_move_reply_source_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) ); 1364 1364 } 1365 1365 … … 1384 1384 // Get destination topic id 1385 1385 if ( empty( $_POST['bbp_destination_topic'] ) ) { 1386 bbp_add_error( 'bbp_move_reply_destination_id', __( '<strong>ERROR</strong>: Destination topic ID not found!', 'bbpress' ) );1386 bbp_add_error( 'bbp_move_reply_destination_id', __( '<strong>ERROR</strong>: A topic ID is required.', 'bbpress' ) ); 1387 1387 } else { 1388 1388 $destination_topic_id = (int) $_POST['bbp_destination_topic']; … … 1394 1394 // No destination topic 1395 1395 if ( empty( $destination_topic ) ) { 1396 bbp_add_error( 'bbp_move_reply_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to move to was not found !', 'bbpress' ) );1396 bbp_add_error( 'bbp_move_reply_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to move to was not found.', 'bbpress' ) ); 1397 1397 } 1398 1398 1399 1399 // User cannot edit the destination topic 1400 1400 if ( !current_user_can( 'edit_topic', $destination_topic->ID ) ) { 1401 bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>ERROR</strong>: You do not have the permissions to edit the destination topic!', 'bbpress' ) );1401 bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) ); 1402 1402 } 1403 1403 … … 1458 1458 // User cannot publish posts 1459 1459 } else { 1460 bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>ERROR</strong>: You do not have the permissionsto create new topics. The reply could not be converted into a topic.', 'bbpress' ) );1460 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' ) ); 1461 1461 } 1462 1462 … … 1636 1636 // What is the user doing here? 1637 1637 if ( ! current_user_can( 'edit_reply', $reply_id ) || ( 'bbp_toggle_reply_trash' === $action && ! current_user_can( 'delete_reply', $reply_id ) ) ) { 1638 bbp_add_error( 'bbp_toggle_reply_permission', __( '<strong>ERROR:</strong> You do not have thepermission to do that.', 'bbpress' ) );1638 bbp_add_error( 'bbp_toggle_reply_permission', __( '<strong>ERROR:</strong> You do not have permission to do that.', 'bbpress' ) ); 1639 1639 return; 1640 1640 } … … 1712 1712 $is_approve = bbp_is_reply_pending( $r['id'] ); 1713 1713 $retval['status'] = $is_approve ? bbp_approve_reply( $r['id'] ) : bbp_unapprove_reply( $r['id'] ); 1714 $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' );1714 $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' ); 1715 1715 $retval['view_all'] = ! $is_approve; 1716 1716 … … 1723 1723 $is_spam = bbp_is_reply_spam( $r['id'] ); 1724 1724 $retval['status'] = $is_spam ? bbp_unspam_reply( $r['id'] ) : bbp_spam_reply( $r['id'] ); 1725 $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' );1725 $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' ); 1726 1726 $retval['view_all'] = ! $is_spam; 1727 1727 … … 1738 1738 $retval['view_all'] = true; 1739 1739 $retval['status'] = wp_trash_post( $r['id'] ); 1740 $retval['message'] = __( '<strong>ERROR</strong>: There was a problem trashing the reply !', 'bbpress' );1740 $retval['message'] = __( '<strong>ERROR</strong>: There was a problem trashing the reply.', 'bbpress' ); 1741 1741 1742 1742 break; … … 1746 1746 1747 1747 $retval['status'] = wp_untrash_post( $r['id'] ); 1748 $retval['message'] = __( '<strong>ERROR</strong>: There was a problem untrashing the reply !', 'bbpress' );1748 $retval['message'] = __( '<strong>ERROR</strong>: There was a problem untrashing the reply.', 'bbpress' ); 1749 1749 1750 1750 break; … … 1754 1754 1755 1755 $retval['status'] = wp_delete_post( $r['id'] ); 1756 $retval['message'] = __( '<strong>ERROR</strong>: There was a problem deleting the reply !', 'bbpress' );1756 $retval['message'] = __( '<strong>ERROR</strong>: There was a problem deleting the reply.', 'bbpress' ); 1757 1757 1758 1758 break;
Note: See TracChangeset
for help on using the changeset viewer.