bp_dtheme_embed_read_more( object $activity )

When a user clicks on a “Read More” item, make sure embeds are correctly parsed and shown for the expanded content.


Description Description

See also See also


Top ↑

Parameters Parameters

$activity

(Required) The activity that is being expanded.


Top ↑

Source Source

File: bp-activity/bp-activity-functions.php

function bp_dtheme_embed_read_more( $activity ) {
	buddypress()->activity->read_more_id = $activity->id;

	add_filter( 'embed_post_id',         function() { return buddypress()->activity->read_more_id; } );
	add_filter( 'bp_embed_get_cache',    'bp_embed_activity_cache',      10, 3 );
	add_action( 'bp_embed_update_cache', 'bp_embed_activity_save_cache', 10, 3 );
}

Top ↑

Changelog Changelog

Changelog
Version Description
1.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.