[buddypress-trac] [BuddyPress Trac] #7362: Query only registered activity types like WP_Query does with post types

buddypress-trac noreply at wordpress.org
Wed Nov 23 22:37:12 UTC 2016

#7362: Query only registered activity types like WP_Query does with post types
 Reporter:  Offereins    |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Activity     |    Version:
 Severity:  normal       |   Keywords:
 Multiple times I find myself in a situation where private activity items*
 are near-impossible to hide for unpriviledged members. Especially when
 their plugin is removed or even temporally deactivated, and its shielding
 logic is absent, then the activity items are out in the open.

 I suggest to go the WordPress way, like `WP_Query` handles post types:
 only query posts whose post types are registered (as does `WP_Tax_Query`
 for registered taxonomies). Meaning, that we'd register activity types in
 something like an array of `bp_activity_types`, and check that collection
 before querying activity items. This way, custom activity items are hidden
 by default, which would also benefit their presentation - when otherwise
 additional markup would be needed from their plugin.

 Now, one can imagine that this has never been the case, because the
 Activity Stream in its current fashion is a great activity archive for
 data that isn't explicitly supported (registered) anymore, while still
 being relevant to the community.

 The question is, what would be best to have as default?

 *) Currently, there is no such thing as a 'private' activity item, but by
 ways of plugin filters, such items could be removed from the Activity
 Stream for certain members.

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

More information about the buddypress-trac mailing list