Changeset 12012 for sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-moderators.php
- Timestamp:
- 08/10/2022 05:03:34 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-moderators.php
r10660 r12012 316 316 // Check for empty post id. 317 317 if ( ! $post ) { 318 bbp_add_error( 'wporg_bbp_archive_post_id', __( '<strong>E RROR</strong>:No post was found! Which post are you archiving?', 'wporg-forums' ) );318 bbp_add_error( 'wporg_bbp_archive_post_id', __( '<strong>Error:</strong> No post was found! Which post are you archiving?', 'wporg-forums' ) ); 319 319 320 320 // Check for current user. 321 321 } elseif ( empty( $user_id ) ) { 322 bbp_add_error( 'wporg_bbp_archive_logged_in', __( '<strong>E RROR</strong>:You must be logged in to do this!', 'wporg-forums' ) );322 bbp_add_error( 'wporg_bbp_archive_logged_in', __( '<strong>Error:</strong> You must be logged in to do this!', 'wporg-forums' ) ); 323 323 324 324 // Check nonce. 325 325 } elseif ( ! bbp_verify_nonce_request( 'toggle-post-archive_' . $user_id . '_' . $post->ID ) ) { 326 bbp_add_error( 'wporg_bbp_archive_nonce', __( '<strong>E RROR</strong>:Are you sure you wanted to do that?', 'wporg-forums' ) );326 bbp_add_error( 'wporg_bbp_archive_nonce', __( '<strong>Error:</strong> Are you sure you wanted to do that?', 'wporg-forums' ) ); 327 327 328 328 } … … 351 351 bbp_redirect( $permalink ); 352 352 } elseif ( true === $is_archived && 'wporg_bbp_archive_post' === $action ) { 353 bbp_add_error( 'wporg_bbp_archive_post', __( '<strong>E RROR</strong>:There was a problem archiving that post!', 'wporg-forums' ) );353 bbp_add_error( 'wporg_bbp_archive_post', __( '<strong>Error:</strong> There was a problem archiving that post!', 'wporg-forums' ) ); 354 354 } elseif ( false === $is_archived && 'wporg_bbp_unarchive_post' === $action ) { 355 bbp_add_error( 'wporg_bbp_unarchive_post', __( '<strong>E RROR</strong>:There was a problem unarchiving that post!', 'wporg-forums' ) );355 bbp_add_error( 'wporg_bbp_unarchive_post', __( '<strong>Error:</strong> There was a problem unarchiving that post!', 'wporg-forums' ) ); 356 356 } 357 357 } … … 712 712 $topic = bbp_get_topic( $topic_id ); 713 713 if ( empty( $topic ) ) { 714 bbp_add_error( 'bbp_toggle_topic_missing', __( '<strong>E RROR:</strong> This topic could not be found or no longer exists.', 'wporg-forums' ) );714 bbp_add_error( 'bbp_toggle_topic_missing', __( '<strong>Error:</strong> This topic could not be found or no longer exists.', 'wporg-forums' ) ); 715 715 return; 716 716 } … … 718 718 // What is the user doing here? 719 719 if ( ! current_user_can( 'edit_topic', $topic_id ) ) { 720 bbp_add_error( 'bbp_toggle_topic_permission', __( '<strong>E RROR:</strong> You do not have permission to do that.', 'wporg-forums' ) );720 bbp_add_error( 'bbp_toggle_topic_permission', __( '<strong>Error:</strong> You do not have permission to do that.', 'wporg-forums' ) ); 721 721 return; 722 722 } … … 776 776 $reply = bbp_get_reply( $reply_id ); 777 777 if ( empty( $reply ) ) { 778 bbp_add_error( 'bbp_toggle_reply_missing', __( '<strong>E RROR:</strong> This reply could not be found or no longer exists.', 'wporg-forums' ) );778 bbp_add_error( 'bbp_toggle_reply_missing', __( '<strong>Error:</strong> This reply could not be found or no longer exists.', 'wporg-forums' ) ); 779 779 return; 780 780 } … … 782 782 // What is the user doing here? 783 783 if ( ! current_user_can( 'edit_reply', $reply_id ) ) { 784 bbp_add_error( 'bbp_toggle_reply_permission', __( '<strong>E RROR:</strong> You do not have permission to do that.', 'wporg-forums' ) );784 bbp_add_error( 'bbp_toggle_reply_permission', __( '<strong>Error:</strong> You do not have permission to do that.', 'wporg-forums' ) ); 785 785 return; 786 786 } … … 840 840 if ( bbp_is_topic_open( $r['id'] ) ) { 841 841 $retval['status'] = bbp_close_topic( $r['id'] ); 842 $retval['message'] = __( '<strong>E RROR</strong>:There was a problem closing the topic.', 'wporg-forums' );842 $retval['message'] = __( '<strong>Error:</strong> There was a problem closing the topic.', 'wporg-forums' ); 843 843 } 844 844 … … 850 850 if ( ! bbp_is_topic_open( $r['id'] ) ) { 851 851 $retval['status'] = bbp_open_topic( $r['id'] ); 852 $retval['message'] = __( '<strong>E RROR</strong>:There was a problem opening the topic.', 'wporg-forums' );852 $retval['message'] = __( '<strong>Error:</strong> There was a problem opening the topic.', 'wporg-forums' ); 853 853 } 854 854 … … 860 860 if ( ! bbp_is_topic_sticky( $r['id'] ) ) { 861 861 $retval['status'] = bbp_stick_topic( $r['id'], ! empty( $_GET['super'] ) ); 862 $retval['message'] = __( '<strong>E RROR</strong>:There was a problem sticking the topic.', 'wporg-forums' );862 $retval['message'] = __( '<strong>Error:</strong> There was a problem sticking the topic.', 'wporg-forums' ); 863 863 } 864 864 … … 870 870 if ( bbp_is_topic_sticky( $r['id'] ) ) { 871 871 $retval['status'] = bbp_unstick_topic( $r['id'] ); 872 $retval['message'] = __( '<strong>E RROR</strong>:There was a problem unsticking the topic.', 'wporg-forums' );872 $retval['message'] = __( '<strong>Error:</strong> There was a problem unsticking the topic.', 'wporg-forums' ); 873 873 } 874 874 … … 880 880 if ( ! bbp_is_topic_spam( $r['id'] ) ) { 881 881 $retval['status'] = bbp_spam_topic( $r['id'] ); 882 $retval['message'] = __( '<strong>E RROR</strong>:There was a problem marking the topic as spam.', 'wporg-forums' );882 $retval['message'] = __( '<strong>Error:</strong> There was a problem marking the topic as spam.', 'wporg-forums' ); 883 883 } 884 884 $retval['view_all'] = true; … … 891 891 if ( bbp_is_topic_spam( $r['id'] ) ) { 892 892 $retval['status'] = bbp_unspam_topic( $r['id'] ); 893 $retval['message'] = __( '<strong>E RROR</strong>:There was a problem unmarking the topic as spam.', 'wporg-forums' );893 $retval['message'] = __( '<strong>Error:</strong> There was a problem unmarking the topic as spam.', 'wporg-forums' ); 894 894 } 895 895 $retval['view_all'] = false; … … 902 902 if ( ! bbp_is_topic_pending( $r['id'] ) ) { 903 903 $retval['status'] = bbp_unapprove_topic( $r['id'] ); 904 $retval['message'] = __( '<strong>E RROR</strong>:There was a problem unapproving the topic.', 'wporg-forums' );904 $retval['message'] = __( '<strong>Error:</strong> There was a problem unapproving the topic.', 'wporg-forums' ); 905 905 } 906 906 $retval['view_all'] = true; … … 913 913 if ( bbp_is_topic_pending( $r['id'] ) ) { 914 914 $retval['status'] = bbp_approve_topic( $r['id'] ); 915 $retval['message'] = __( '<strong>E RROR</strong>:There was a problem approving the topic.', 'wporg-forums' );915 $retval['message'] = __( '<strong>Error:</strong> There was a problem approving the topic.', 'wporg-forums' ); 916 916 } 917 917 $retval['view_all'] = false; … … 953 953 if ( ! bbp_is_reply_spam( $r['id'] ) ) { 954 954 $retval['status'] = bbp_spam_reply( $r['id'] ); 955 $retval['message'] = __( '<strong>E RROR</strong>:There was a problem marking the reply as spam.', 'wporg-forums' );955 $retval['message'] = __( '<strong>Error:</strong> There was a problem marking the reply as spam.', 'wporg-forums' ); 956 956 } 957 957 $retval['view_all'] = true; … … 964 964 if ( bbp_is_reply_spam( $r['id'] ) ) { 965 965 $retval['status'] = bbp_unspam_reply( $r['id'] ); 966 $retval['message'] = __( '<strong>E RROR</strong>:There was a problem unmarking the reply as spam.', 'wporg-forums' );966 $retval['message'] = __( '<strong>Error:</strong> There was a problem unmarking the reply as spam.', 'wporg-forums' ); 967 967 } 968 968 $retval['view_all'] = false; … … 975 975 if ( ! bbp_is_reply_pending( $r['id'] ) ) { 976 976 $retval['status'] = bbp_unapprove_reply( $r['id'] ); 977 $retval['message'] = __( '<strong>E RROR</strong>:There was a problem unapproving the reply.', 'wporg-forums' );977 $retval['message'] = __( '<strong>Error:</strong> There was a problem unapproving the reply.', 'wporg-forums' ); 978 978 } 979 979 $retval['view_all'] = true; … … 986 986 if ( bbp_is_reply_pending( $r['id'] ) ) { 987 987 $retval['status'] = bbp_approve_reply( $r['id'] ); 988 $retval['message'] = __( '<strong>E RROR</strong>:There was a problem approving the reply.', 'wporg-forums' );988 $retval['message'] = __( '<strong>Error:</strong> There was a problem approving the reply.', 'wporg-forums' ); 989 989 } 990 990 $retval['view_all'] = false;
Note: See TracChangeset
for help on using the changeset viewer.