Re: Modifying activity content
Thx Andy,
problem solved.
My mistake was:
I wanted to modify the the wire content and the activity content with two different functions. However, the activity entry is triggered by the wire save functions. Thus I had only to change the content before it’s processed by the wire functions and “forwarded” to the activity process. This is how I did it:
Solution:
add_action(‘bp_wire_post_content_before_save’, ‘sw_add_image_wire’,1);
function sw_add_image_wire($message){
$image = createImage();
if($image === false) return $message;
$image_link=”.date(‘Y’).’|’.date(‘m’).’|’.str_replace(‘.jpg’,”, basename($image)).”;
$message.= $image_link;
return $message;
}