Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • @mihai440

    Participant

    Found this.

    <?php
    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 );
    ?>

    This code works great but only for moderators (not for admins) and only activity posts in a group and not the comments.

    Can anyone please help me with a code like this for bp-custom.php but that gives both admins and mods the “power” to delete activity posts and also comments in the groups they are admin/mod?

    Thank you

    @mihai440

    Participant

    @mihai440

    Participant

    Any way to force this using bp-custom.php? The codex says it should work but it simply doesn’t. The site is 10+ years old and was stuck for some time with an older WP & BP version. The latest version used was 6.1.0 and users reported this problem so I updated everything hoping it would help

    Please help me with this

Viewing 3 replies - 1 through 3 (of 3 total)
Skip to toolbar