Filter bp_has_activities() by &inlcude=id but not its comments
-
I am successfully filtering bp_has_activities() with this function
function mod_exclude_pending_activity ( $query_string, $object, $filter, $scope, $page, $search_terms, $extras ) { global $bp, $activities_template; $group = $bp->groups->current_group->id; if ( $object != 'activity' ) return $query_string; $ids = mod_get_published_ids ($group); //return a comma separated list of ids $query_string .= "&include=" . $ids; return $query_string; } add_filter( 'bp_dtheme_ajax_querystring', 'mod_exclude_pending_activity', 1, 7 );
So this will only include activities with the ids that I include, which is what I what.
The problem is that it displays all comments on any activity (if hat activity’s id is in the include list) even if the comment’s id isn’t one of those included. Not sure what to do, I’ve searched through all the forums, and docs with no luck.
For example, when I var_dump $query_string I get “&include=147,148,149”. These have type activity_update, but in the activity stream the comments of those are displayed, even though their ids are not in the list I called.
Any help please?!?! It would be very much appreciated!
- The topic ‘Filter bp_has_activities() by &inlcude=id but not its comments’ is closed to new replies.