bp_embed_activity_save_cache( string $cache, string $cachekey, int $id )
Set an activity item’s embed cache.
Description Description
Used during BP_Embed::parse_oembed() via bp_activity_embed().
See also See also
Parameters Parameters
- $cache
-
(Required) An empty string passed by BP_Embed::parse_oembed() for functions like this one to filter.
- $cachekey
-
(Required) The cache key generated in BP_Embed::parse_oembed().
- $id
-
(Required) The ID of the activity item.
Source Source
File: bp-activity/bp-activity-functions.php
function bp_embed_activity_save_cache( $cache, $cachekey, $id ) {
bp_activity_update_meta( $id, $cachekey, $cache );
// Cache full oEmbed response.
if ( true === isset( buddypress()->activity->oembed_response ) ) {
$cachekey = str_replace( '_oembed', '_oembed_response', $cachekey );
bp_activity_update_meta( $id, $cachekey, buddypress()->activity->oembed_response );
}
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |