Hi Tosin,
You can enable/disable it for post types from the settings(General tab).Currently, we do not have settings to exclude users but we have a filter and if you can give me some ids, I can post the code for excluding them.
Regards
BrajeshHi Tosin,
thank you for the clarification.providing a UI for categories is not in the plan and I do not see it as an efficient thing to do(testing against each report button for category).
I will add a filter and put some code in future for category exclusion.
for users exclusion, I will post the code today.
By user exclusion, I am assuming you do not want any content from them to be reported by others.Regards
BrajeshHi Tosin,
I am sorry for the delay.Here is the code
// BuddyPress Moderation Tools: White list specific user's content from moderation. add_filter( 'bpmts_is_user_whitelisted', function ( $is, $user_id ) { $white_listed_users = array( 284, 37845, 4578, 2357 ); if ( in_array( $user_id, $white_listed_users, true ) ) { $is = true; } return $is; }, 10, 2 ); // BuddyPress Moderation Tools: Do not allow white listed user's profile to be reported. add_filter( 'bpmts_is_item_reportable', function ( $is, $item_type, $item_id ) { if ( 'user' !== $item_type ) { return $is; } $white_listed_users = array( 284, 37845, 4578, 2357 ); if ( in_array( $item_id, $white_listed_users, true ) ) { $is = true; } return $is; }, 10, 3 );
Please put it in your bp-custom.php and it will work.
Regards
BrajeshAlso, I forgot to mention, for users content the buttons will appear but when someone will try to report, they will get an error that it can not be reported.
The reason behind this decision was site performance.
Regards
Brajesh1. I just tested it now but the white listed ID’s User and Content can still be reported.
2. For the User profiles I was wondering if the report button itself can be hidden entirely in the members directory and the single profile from the white listed users that is the REPORT BUTTON should not display for the user ID’s 284, 37845, 4578, 2357
3. Just to be sure should the ID’s be white listed or black listed
- This reply was modified 5 years, 1 month ago by Tosin.
Hi Tosin,
Are you using the latest version of Moderation tools? The white listing option was added in our last release only.Regards
Brajesh
You must be logged in to reply to this topic.