Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to exclude who joined the group from the activity stream?


  • Iryna_B
    Participant

    @iryna_b

    I’ve seen similar topics many times, but I haven’t found a helpful solution. I found the following code for bp-custom.php, it helped someone, but not me.

     function random3289_dont_save_join_group_activity( $activity_object ) {
    $exclude = array( ‘joined_group’ );
    if( in_array( $activity_object->type, $exclude ) )
    $activity_object->type = false;
    }
    add_action(‘bp_activity_before_save’, ‘random3289_dont_save_join_group_activity’, 1, 1 );

    Is there a way to filter who joined the group activity so that it was not visible in the users activity stream?
    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)

  • danbp
    Participant

    @danbp

    Introduced since 2.0, see bp_parse_args on the codex. It’s explained in deep how to filter templates. Then surch using same keyword or $retval on the forum. The’re several topics containing snippets to achieve that.


    Iryna_B
    Participant

    @iryna_b

    Thanks! I’ll look at that!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to exclude who joined the group from the activity stream?’ is closed to new replies.
Skip to toolbar