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

buddypress-trac noreply at wordpress.org
Fri May 30 09:43:19 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       |   Keywords:  has-patch 2nd-opinion
-------------------------+-----------------------------------
 In dev-chats, we've discussed about the opportunity to split #3460
 starting with a first step to help plugins in managing activities in case
 their post type(s) is (are) published / updated / trashed / deleted.

 This ticket is not covering eventual comments made on the post type(s) as
 it could be a second step.

 I think we need to deal with two kinds of plugin :
 - BuddyPress plugins that are registering a post type in their custom
 {{{BP_Component}}}
 - Any other plugins.

 So first, i'm suggesting to create a new Activity class
 {{{BP_Activity_Tracking}}} to listen to post types so that the BuddyPress
 blogs component '''and''' custom components will be able to use it to
 generate their activities.

 You can have a look at the BuddyPress Skeleton Component (branch 1.7)
 patch (bsc.1.7.patch), i've used to test it, i've added some comments in
 the {{{BP_Example_Component->register_post_types()}}} method that explains
 how to use it.

 Then i thought for the other plugins, that as we were doing so in #3460,
 their post types should be managed if the blogs component is active. So if
 it's the case, a plugin could simply use a filter to attach its post
 type(s) to the one  managed by the blogs component (post).

 You can have a look at the function
 {{{bp_custom_set_activity_tracking()}}} in the bp-custom.php file for an
 example of use.

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


More information about the buddypress-trac mailing list