Modifying activity content
-
Hi,
I’d like to modify the activity content before it is saved. In my case I want to attach an image placeholder to the wire activity entries.
I’ve tried that below, but it does not work:
add_action(‘bp_activity_add’, ‘sw_add_image_activity’,1)
function sw_add_image_activity($activity) {
$image = createImage();
if($image === false) return $content;
$image_link.= ‘ [‘.date(‘Y’).’|’.date(‘m’).’|’.str_replace(‘.jpg’,”, basename($image)).’]’;
$activity[‘content’].= $image_link; //modifying activity stream
return $activity;
}
Does anyone have an Idea what I do wrong? TiA
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Modifying activity content’ is closed to new replies.