Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: stop public groups posting to the activity stream?

@mcpeanut

Participant

found this section in the bp-groups-activity.php
this seems to relate to the public groups, does anyone have any ideas on what to change here?

// Set the default for hide_sitewide by checking the status of the group
$hide_sitewide = false;
if ( !empty( $args[‘item_id’] ) ) {
if ( bp_get_current_group_id() == $args[‘item_id’] ) {
$group = groups_get_current_group();
} else {
$group = groups_get_group( array( ‘group_id’ => $args[‘item_id’] ) );
}

if ( isset( $group->status ) && ‘public’ != $group->status ) {
$hide_sitewide = true;
}
}

$r = wp_parse_args( $args, array(
‘id’ => false,
‘user_id’ => bp_loggedin_user_id(),
‘action’ => ”,
‘content’ => ”,
‘primary_link’ => ”,
‘component’ => buddypress()->groups->id,
‘type’ => false,
‘item_id’ => false,
‘secondary_item_id’ => false,
‘recorded_time’ => bp_core_current_time(),
‘hide_sitewide’ => $hide_sitewide
) );

return bp_activity_add( $r );
}

i have tried changing the $hide_sitewide = false; to $hide_sitewide = true;
but this doesnt work properly.

Skip to toolbar