If you need to prepend the Medium to the activity content, you simply need to use the bp_attachments_activity_attach_media filter this way:
/**
* Filter to prepend the Medium to the Activity text.
*
* @param string $content The Activity text block with the appended Medium block.
* @param string $text_block The serialized Activity text block.
* @param string $medium_block The serialized Medium block.
* @return string The Activity text block with the prepended Medium block.
*/
function testovac_attachments_activity_prepend_media( $content, $text_block, $medium_block ) {
return $medium_block . "\n" . $text_block;
}
add_filter( 'bp_attachments_activity_attach_media', 'testovac_attachments_activity_prepend_media', 10, 3 );
If you need to prepend the Medium to the activity content, you simply need to use the
bp_attachments_activity_attach_media
filter this way:Fixes #81