Support custom post types in activity stream
|Reported by:||boonebgorges||Owned by:||boonebgorges|
|Cc:||trisha@…, karmatosed@…, hugoashmore@…, math.viet@…, sascha@…, roger@…|
Right now, custom post types are not tracked in the activity stream - we do a check to make sure that 'post' == $post->post_type before posting activity items.
This is fine for the blogs component, but we should have a more general solution for post types.
I suggest a solution with two parts:
- default support for all CPTs. That is, we hook to save_post and catch everything that is *not* 'post', and we do it regardless of whether the BP Blogs component is enabled. We can get the singular term for the post type, which we'll need to guess at the "Boone edited the x..." activity action, out of the post type labels.
- Have an easy way to turn off support for activity tracking of post types. Though generally I know we like to avoid admin screens, I think that an all-purpose Activity admin panel would be useful in allowing admins to toggle activity tracking on *any* kind of activity. The list of activity types would be populated by all of our core activity types (activity_update, joined_group, etc), and also by the create/edit actions of all registered post types.
At the very least, we will need filters to allow the latter to happen with plugins. But I think that this would be a popular enough feature (going by the 80% rule) that we should consider an options panel.
Probably we would also want to include support in the activity filter dropdown for the create/edit actions for registered post type that has activity posting disabled.
Once we get into the next dev cycle, I can work up a rough sketch of what I'm suggesting, in the form of a plugin. (at least the CPT stuff, anyway) I'd love to get feedback first, though.
Change History (102)
5 years ago
- Keywords 1.7-early removed
- Milestone changed from Future Release to 1.7
- Priority changed from normal to low
4 years ago
- Cc trisha@… added
- Keywords has-patch needs-testing removed
- Milestone changed from 2.2 to Future Release
- Keywords 2nd-opinion removed
- Milestone Future Release deleted
- Status changed from new to closed
- Version changed from 1.2.8 to 1.2