Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Block activity stream types

@naijaping

Participant

@palmdoc, @benny390

You can try @imath solution and edit it accordingly to include bbpress.

/* beginning of the code to paste in the functions.php of your active theme */

‘function imath_activivity_dont_save( $activity_object ) {
// friendship_created is fired when a member accepts a friend request
// joined_group is fired when a member joins a group.
$exclude = array( ‘friendship_created’, ‘joined_group’);

// if the activity type is empty, it stops BuddyPress BP_Activity_Activity::save() function
if( in_array( $activity_object->type, $exclude ) )
$activity_object->type = false;

}

‘add_action(‘bp_activity_before_save’, ‘imath_activivity_dont_save’, 10, 1 );’

Skip to toolbar