Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Activity Stream – “XYZ User has a new avatar”


paulhastings0
Participant

@paulhastings0

So I’m looking at this page. Would these be the 10 appropriate variables?

'user_id' => $bp->loggedin_user->id,
'action' => '',
'content' => '',
'primary_link' => '',
'component' => $bp->profile->id,
'type' => false,
'item_id' => false,
'secondary_item_id' => false,
'recorded_time' => gmdate( "Y-m-d H:i:s" ),
'hide_sitewide' => false

So for example?

function my_activity_avatar_changed() {

//then pass in whatever array args you want to the activity item
xprofile_record_activity( $user_id, $component );
echo ("

$user_id has a new $component

");
}
add_action(‘xprofile_avatar_uploaded’,'my_activity_avatar_changed’);

Skip to toolbar