Group Moderator Function Broken?
-
Hi,
I have noticed that when a member is promoted to group moderator, they are not able to delete activity or comments/replies. This contradicts the Codex which says that group moderators can delete posts from the group wall. Is this a bug?
I found a topic from 7 years ago where a function was posted to enable this feature so I have tried this and it does allow group mods to delete activity posts from the group wall.
Link to the topic:
This is the function….
function majecdad_group_mod_delete( $can_delete, $activity ) { if( $activity->component == 'groups' ) { $group_id = $activity->item_id; if( bp_current_user_can( 'bp_moderate' ) || groups_is_user_mod( bp_loggedin_user_id(), $group_id ) ) $can_delete = true; } return $can_delete; } add_filter('bp_activity_user_can_delete', 'majecdad_group_mod_delete', 21, 2 );
The problem I have is that while this code allows group activity posts to be deleted, it doesn’t allow comments/replies to that activity post to be deleted.
So a moderator can only delete entire activity posts (including all comments/replies) and not just delete an individual comment/reply.
Can anyone give some advice on how to allow group moderators to delete comments/replies?
Many thanks
Alex
- You must be logged in to reply to this topic.