*sigh*
Of course, as soon as I post this, I find the problem.
function my_hidden_activities($a, $activities) {
	//if admin we want to know
	//if (is_site_admin())
		//return $activities;
	$nothanks = array('activity_comment');
	foreach ($activities->activities as $key => $activity) {
		if (in_array($activity->type, $nothanks, true)) {
			unset($activities->activities[$key]);
			$activities->activity_count = $activities->activity_count-1;
			$activities->total_activity_count = $activities->total_activity_count-1;
			$activities->pag_num = $activities->pag_num -1;
		}
	}
	// Renumber the array keys to account for missing items.
	$activities_new = array_values( $activities->activities );
	$activities->activities = $activities_new;
	return $activities;
}
add_action('bp_has_activities', 'my_hidden_activities', 1, 2 );
The above code causes this problem. The code is attempting to hide comments from appearing as their own activity stream items. Any suggestions on how I can hide comments from appear anywhere except for in the thread they are nested in?
		
	 
	
	
	
 
		
	
@godavid33
11 years, 6 months ago
When I post a comment on an activity, none of the information is populating correctly. It shows that a new comment is posted, but all it says is replied. When inspecting the element, I notice that the ID is not filled out either (the id of the div is “acomment-” instead of “acomment-xxx”). When I refresh the page, the content shows up normally.
I’m not sure what other info to give, I tried deactivating plugins and it seems to be only with buddypress.
Running BP 2.0 and WP 3.9