[buddypress-trac] [BuddyPress] #5246: Add blog_id to activities

buddypress-trac noreply at wordpress.org
Mon Nov 18 15:10:50 UTC 2013

#5246: Add blog_id to activities
 Reporter:  wpdennis     |       Owner:
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  Activity     |     Version:
 Severity:  minor        |  Resolution:  wontfix
 Keywords:               |
Changes (by boonebgorges):

 * keywords:  dev-feedback =>
 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


 This is already possible. A query like this will get you blog-related
 activity from a specific site:

 $args = array
     'component' => buddypress()->blogs->id,
     'item_id' => $blog_id,
 if ( bp_has_activities( $args ) ) { // ...

 In other words: for 'blogs' activity items, 'item_id' is set to the ID of
 the blog.

 We do this instead of a dedicated `blog_id` activity column because the
 activity column is meant to be abstract and flexible. The majority BP
 activity items do *not* need a blog_id (just like the majority do not need
 group IDs), so we have generic item_id and secondary_item_id columns,
 which activity entries can use according to whatever column they'd like.
 Contrast this with `user_id`: nearly every activity entry has an
 associated user, so we have a dedicate column for it.

 In the absence of evidence that blog_id is an overwhelmingly common
 requirement, I'm going to mark this as wontfix, because we already have
 the tools to do the necessary querying.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5246#comment:1>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list