bp_embed_message_save_cache

Set a private message item's embed cache.

Description

bp_embed_message_save_cache( (string) $cache, (string) $cachekey, (int) $id ); 

Used during via .

Parameters (3)

0. $cache (string)
An empty string passed by BP_Embed::parse_oembed() for functions like this one to filter.
1. $cachekey (string)
The cache key generated in BP_Embed::parse_oembed().
2. $id (int)
The ID of the message item.

Usage

  1. if ( !function_exists( 'bp_embed_message_save_cache' ) ) { 
  2. require_once '/bp-messages/bp-messages-template.php'; 
  3.  
  4. // An empty string passed by BP_Embed::parse_oembed() for 
  5. // functions like this one to filter. 
  6. $cache = ''; 
  7.  
  8. // The cache key generated in BP_Embed::parse_oembed(). 
  9. $cachekey = ''; 
  10.  
  11. // The ID of the message item. 
  12. $id = -1; 
  13.  
  14. // NOTICE! Understand what this does before running. 
  15. $result = bp_embed_message_save_cache($cache, $cachekey, $id); 
  16.  

Defined (1)

The function is defined in the following location(s).

/bp-messages/bp-messages-template.php  
  1. function bp_embed_message_save_cache( $cache, $cachekey, $id ) { 
  2. bp_messages_update_meta( $id, $cachekey, $cache );