[buddypress-trac] [BuddyPress Trac] #5669: Help plugins to generate activities for their post type(s)
buddypress-trac
noreply at wordpress.org
Thu Nov 27 17:13:29 UTC 2014
#5669: Help plugins to generate activities for their post type(s)
------------------------------+---------------------
Reporter: imath | Owner: imath
Type: enhancement | Status: closed
Priority: normal | Milestone: 2.2
Component: Activity | Version: 2.0
Severity: normal | Resolution: fixed
Keywords: has-patch commit |
------------------------------+---------------------
Changes (by imath):
* owner: => imath
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"9194"]:
{{{
#!CommitTicketReference repository="" revision="9194"
Post Type Activity Tracking feature
So far the tracking feature was requiring the Blogs component to be
active. In 2.2 we are centralizing the majority of the tracking code into
the Activity component. A new set of functions and hooks has been created
to catch public post types supporting the feature 'buddypress-activity'
and to automatically generate an activity when a new item is publicly
published.
It's now possible to add this support to any public post type using one
unique line of code, eg: {{{add_post_type_support( 'page', 'buddypress-
activity' )}}}. In this case BuddyPress will use generic activity
attributes.
Each activity attribute of the supported post type can be customized using
a specific function (eg: set custom strings to describe the post type
activity action).
When registering a post type in WordPress it's also possible to set the
'buddypress-activity' feature using the support parameter of the second
argument of the register_post_type() function. Custom activity action
strings can be defined within the labels parameter and activity attributes
can be set using the new parameter 'bp_activity'.
When the Blogs component is active, the 'post' post type is automatically
supporting the 'buddypress-activity' feature. The conditional logic (eg:
blog_public option set to 1 ...) that occurs before a new activity is
posted and the comments tracking remain unchanged.
props boonebgorges, DJPaul
Fixes #5669
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5669#comment:28>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list