Changeset 12012 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-user-moderation/inc/class-plugin.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/wporg-bbp-user-moderation/inc/class-plugin.php
r8117 r12012 183 183 $post = get_post( $post_id ); 184 184 if ( ! $post ) { 185 bbp_add_error( 'wporg_bbp_flag_post_id', __( '<strong>E RROR</strong>:No post was found! Which topic or reply are you marking for moderation?', 'wporg-forums' ) );185 bbp_add_error( 'wporg_bbp_flag_post_id', __( '<strong>Error:</strong> No post was found! Which topic or reply are you marking for moderation?', 'wporg-forums' ) ); 186 186 187 187 // Check that user id matches post author 188 188 } elseif ( $post->post_author != intval( $_GET['user_id'] ) ) { 189 bbp_add_error( 'wporg_bbp_flag_post_user', __( '<strong>E RROR</strong>:That author does not match the flagged post.', 'wporg-forums' ) );189 bbp_add_error( 'wporg_bbp_flag_post_user', __( '<strong>Error:</strong> That author does not match the flagged post.', 'wporg-forums' ) ); 190 190 191 191 // Check nonce 192 192 } elseif ( ! bbp_verify_nonce_request( 'toggle-flag_' . $post->post_author . '_' . $post->ID ) ) { 193 bbp_add_error( 'wporg_bbp_flag_nonce', __( '<strong>E RROR</strong>:Are you sure you wanted to do that?', 'wporg-forums' ) );193 bbp_add_error( 'wporg_bbp_flag_nonce', __( '<strong>Error:</strong> Are you sure you wanted to do that?', 'wporg-forums' ) ); 194 194 195 195 // Check current user's ability to moderate 196 196 } elseif ( ! current_user_can( 'moderate' ) ) { 197 bbp_add_error( 'wporg_bbp_flag_permissions', __( '<strong>E RROR</strong>:You don\'t have permission to moderate that user!', 'wporg-forums' ) );197 bbp_add_error( 'wporg_bbp_flag_permissions', __( '<strong>Error:</strong> You don\'t have permission to moderate that user!', 'wporg-forums' ) ); 198 198 } 199 199 … … 218 218 bbp_redirect( $redirect ); 219 219 } elseif ( true === $is_flagged && 'bbp_flag_user' === $action ) { 220 bbp_add_error( 'wporg_bbp_flag_user', __( '<strong>E RROR</strong>:There was a problem flagging that user!', 'wporg-forums' ) );220 bbp_add_error( 'wporg_bbp_flag_user', __( '<strong>Error:</strong> There was a problem flagging that user!', 'wporg-forums' ) ); 221 221 } elseif ( false === $is_flagged && 'bbp_unflag_user' == $action ) { 222 bbp_add_error( 'wporg_bbp_flag_unuser', __( '<strong>E RROR</strong>:There was a problem unflagging that user!', 'wporg-forums' ) );222 bbp_add_error( 'wporg_bbp_flag_unuser', __( '<strong>Error:</strong> There was a problem unflagging that user!', 'wporg-forums' ) ); 223 223 } 224 224 }
Note: See TracChangeset
for help on using the changeset viewer.