Reply To: Let’s prepare the BuddyPress 12.0.0 next major release
I had the option Allow activity stream commenting on posts and comments disabled I also have some code in custom.php file. I am not sure if it could have any effect
/* Disable comment for all activity but still enable @mention autosuggestion. */
function disable_activity_comments($can_comment, $activity) {
// Disable comments
$can_comment = false;
return $can_comment;
}
add_filter('bp_activity_can_comment', 'disable_activity_comments', 10, 2);
/* Hide comment from activity page */
add_action( 'bp_after_has_activities_parse_args', function ( $r ) {
if ( bp_is_activity_directory() || bp_is_single_activity() ) {
$r['display_comments'] = false;
}
return $r;
} );
// Exclude activity updates from subscribers who are not logged in on the activity directory page.
function hide_new_member_activities_from_unlogged_users( $args ) {
if ( ! is_user_logged_in() ) {
$args['action'] = array(
'activity_comment',
'activity_update',
'last_activity',
'new_avatar',
'new_blog_comment',
'new_blog_post',
'new_classified',
'updated_profile'
);
}
return $args;
}
add_filter( 'bp_after_has_activities_parse_args', 'hide_new_member_activities_from_unlogged_users' );