bp_embed_forum_cache

Used during {@link BP_Embed::parse_oembed()} via {@link bp_forums_embed()}.

Description

bp_embed_forum_cache( (object) $cache, (int) $id, (string) $cachekey ); 

Wrapper function for .

Parameters (3)

0. $cache (object)
Cache object.
1. $id (int)
ID of the forum being cached.
2. $cachekey (string)
Key to use with forum embed cache.

Usage

  1. if ( !function_exists( 'bp_embed_forum_cache' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bp-forums-functions.php'; 
  3.  
  4. // Cache object. 
  5. $cache = null; 
  6.  
  7. // ID of the forum being cached. 
  8. $id = -1; 
  9.  
  10. // Key to use with forum embed cache. 
  11. $cachekey = ''; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = bp_embed_forum_cache($cache, $id, $cachekey); 
  15.  

Defined (1)

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

/bp-forums/bp-forums-functions.php  
  1. function bp_embed_forum_cache( $cache, $id, $cachekey ) { 
  2. return bb_get_postmeta( $id, $cachekey );