Created
March 12, 2020 06:35
-
-
Save sbrajesh/37bba98e7d20b89b5f8a61ce6e49f37c to your computer and use it in GitHub Desktop.
White list users from BuddyPress Moderation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* BuddyPress Moderation Tools:- White List users | |
* | |
* All contents from whitelisted users are disabled from reporting. | |
*/ | |
add_filter( 'bpmts_is_user_whitelisted', function ( $is, $user_id ) { | |
$white_listed_user_ids = [ 1, 2, 3 ];// add your own ids. | |
if ( in_array( $user_id, $white_listed_user_ids ) ) { | |
$is = true; | |
} | |
return $is; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment