bp_activity_embed()

Set up activity oEmbed cache during the activity loop.

Description

During an activity loop, this function sets up the hooks necessary to grab each item’s embeds from the cache, or put them in the cache if they are not there yet.

This does not cover recursive activity comments, as they do not use a real loop. For that, see bp_activity_comment_embed().

See also

Source

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

function bp_activity_embed() {
	add_filter( 'embed_post_id',         'bp_get_activity_id'                  );
	add_filter( 'oembed_dataparse',      'bp_activity_oembed_dataparse', 10, 2 );
	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 );
}

Changelog

Changelog
Version Description
BuddyPress 1.5.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.