[buddypress-trac] [BuddyPress Trac] #5669: Help plugins to generate activities for their post type(s)

buddypress-trac noreply at wordpress.org
Sun Jun 8 22:06:20 UTC 2014


#5669: Help plugins to generate activities for their post type(s)
-----------------------------------+------------------
 Reporter:  imath                  |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  2.1
Component:  Activity               |     Version:  2.0
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+------------------

Comment (by DJPaul):

 There are a couple of minor stylistic tweaks I'd want to see adjusted, and
 some improvements to output escaping, but I have a bigger question about
 the ideas here, plus a bunch of random thoughts:

 * I think the proposed changes to `BP_Component->register_post_types` are
 redundant and over-complicate things, and don't really help with the core
 aim of the change.
 * What I think we should do is simply allow post types to register
 themselves into the activity stream, e.g.:

 `add_post_type_support( 'post', 'buddypress-activity' )`

 and we keep the existing hooks to `transition_post_status` and add checks
 with `post_type_supports`. I think there are enough `labels` already set
 in WP's `register_post_type` that we can re-use for BuddyPress; if people
 want to change whatever we construct, we can add a filter.

 * We can then just fetch all public post types, and check if that support
 is set, and then do the `bp_activity_set_action()` stuff.
 * I like the idea to move all the existing tracking code out of the Blogs
 component and into Activity. That'd help us be in a position where we can
 discuss if we want to keep the Site Tracking component in the future, but
 I digress.
 * Why is this built in a class? Just fake namespacing? I think we can
 probably just use functions if/when this patch is trimmed down.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5669#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list