bp_embed_activity_save_cache( string $cache, string $cachekey, int $id )
Set an activity item’s embed cache.
Description
Used during BP_Embed::parse_oembed() via bp_activity_embed().
See also
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
File: bp-activity/bp-activity-functions.php
4382 4383 4384 4385 4386 4387 4388 4389 4390 | 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
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.