Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Block activity stream types

@palmdoc

Participant

@sharmavishal: It doesn’t seem to work for me
I put Blocked Activity Types:
new_forum_topic, new_forum_post
and the bbPress topics and replies still go thru

@naijaping and anyone, what should the code be? Like this? :

// Filter bbPress from updating activity stream
function imath_activity_dont_save( $activity_object ) {
$exclude = array( 'new_forum_topic', 'new_forum_post');

// 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_activity_dont_save', 10, 1 );
Skip to toolbar