Support custom post types in activity stream
|Reported by:||boonebgorges||Owned by:||boonebgorges|
|Component:||Component - Activity||Keywords:||2nd-opinion|
|Cc:||trisha@…, karmatosed@…, hugoashmore@…, math.viet@…, sascha@…, ubernaut@…|
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 (98)
comment:2 @boonebgorges — 3 years ago
- Keywords 1.7-early added
- Milestone changed from 1.6 to Future Release
comment:3 @boonebgorges — 3 years ago
- Keywords 1.7-early removed
- Milestone changed from Future Release to 1.7
- Priority changed from normal to low
comment:5 @trishasalas — 2 years ago
- Cc trisha@… added
comment:62 in reply to: ↑ 61 @imath — 14 months ago
comment:72 follow-up: ↓ 73 @boonebgorges — 13 months ago
- Milestone changed from Future Release to 2.1