Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Demo Data Plugin with BuddyPress 1.2

$activity_id = bp_activity_post_update( array( ‘content’ => $content, ‘user_id’ => $user_id ) );

$activity_id = groups_post_update( array( ‘content’ => $content, ‘user_id’ => $user_id, ‘group_id’ => $group_id ) );

The functions above will post an update by the user on their profile, or in a group. It will return the activity ID which you can use to attach a comment:

$comment_id = bp_activity_new_comment( array( ‘activity_id’ => $activity_id, ‘content’ => $content, ‘user_id’ => $user_id, ‘parent_id’ => [optional] ) );

You could post a reply to that comment by using the same function and passing the $comment_id as the parent_id param.

Skip to toolbar