[buddypress-trac] [BuddyPress Trac] #6293: Support customising of activity content for custom post type activities
buddypress-trac
noreply at wordpress.org
Sat Mar 14 22:57:15 UTC 2015
#6293: Support customising of activity content for custom post type activities
----------------------------------+------------------
Reporter: rogercoathup | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 2.3
Component: Component - Activity | Version:
Severity: normal | Resolution:
Keywords: has-patch |
----------------------------------+------------------
Comment (by r-a-y):
1. Would make a nice enhancement. In the meantime, you can use the
existing `'bp_get_activity_content_body'` filter.
2. A new filter before saving is not necessary. Use the
`'bp_activity_before_save'` hook:
{{{
function my_activity_before_save( $activity ) {
if ( 'whatever' === $activity->type ) {
$activity->content = 'blah';
}
}
add_action( 'bp_activity_before_save', 'my_activity_before_save' );
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6293#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list