[buddypress-trac] [BuddyPress Trac] #5851: Add bp_has_activities param to exclude profile activity

buddypress-trac noreply at wordpress.org
Tue Sep 2 13:10:25 UTC 2014

#5851: Add bp_has_activities param to exclude profile activity
 Reporter:  tobyhawkins  |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Core         |    Version:
 Severity:  normal       |   Keywords:
 When setting up a sitewide feed I have found it useful to remove personal
 activity (i.e. profile based activity) from the feed, focussing on
 group/public activity across the site. Thought I'd suggest it here to see
 what people thought about adding the option.

 Since item_id in wp_bp_activity will be 0 if an activity item is on
 someone's profile I have added

 'non_profile' => false,

 to the defaults in the get() function in bp-activity-classes.php

 And then
 if ( $non_profile ) $where_conditions['non_profile'] = 'a.item_id > 0';
 To the where conditions in the same.

 I've then added the defaults/variable handling to all the other relevant

 in bp-activity-functions.php

 in the BP_Activity_Template class in bp-activity-template.php

 My apologies if there is a simpler way to do this that I've missed, or if
 this is too specific to be of general use.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5851>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list