Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to add a custom activity?

@chibib0

Participant

I tried this,
function buddypress_edit_post($post_id) {
global $bp, $user_id;
$post = get_post($post_id);
$title = $post->post_title;
$user_fullname = bp_core_get_user_displayname($user_id);

bp_activity_add(array(
‘action’ => $user_fullname.’ updated ‘ . $title . ‘:’,
‘component’ => ‘blog_post’,
‘type’ => ‘update_post’,
‘primary_link’ => get_permalink($post_id),
‘user_id’ => $user_id
));

}
add_action(‘edit_post’, ‘buddypress_edit_post’);

but there is no activity added on the user..

Skip to toolbar