Re: Replace Activity Stream blog excerpt with the_excerpt
We came up with a solution to include the featured image (post_thumbnail) in the activity stream. The solution avoids the need to use switch_to_blog
It isn’t simple, but it might help:
We removed the action bp_blogs_record_post and replaced it with our own version that populates the content field with the post_thumbnail (you could also add the excerpt), i.e. `$activity_content = get_the_post_thumbnail( $post_id );`
Unfortunately, bp_blogs_record_activity then takes the image and mangles it. To get around this we had to implement our own version of bp_blogs_record_activity, and call that instead from our blogs_record_post function.
You can see the whole set of code here:
Then in your activity loop, just use bp_activity_content_body() to display the thumbnail / excerpt, etc.
IMHO – bp_blogs_record_activity() needs a rework in the core to give theme designers much more control.