bb_get_forummeta

Forum meta.

Description

bb_get_forummeta( $forum_id, $meta_key ); 

Parameters (2)

0. $forum_id
The forum id.
1. $meta_key
The meta key.

Usage

  1. if ( !function_exists( 'bb_get_forummeta' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-meta.php'; 
  3.  
  4. // The forum id. 
  5. $forum_id = null; 
  6.  
  7. // The meta key. 
  8. $meta_key = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bb_get_forummeta($forum_id, $meta_key); 
  12.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-meta.php  
  1. function bb_get_forummeta( $forum_id, $meta_key ) 
  2. if ( !$forum = bb_get_forum( $forum_id ) ) { 
  3. return; 
  4.  
  5. $meta_key = bb_sanitize_meta_key( $meta_key ); 
  6. if ( !isset( $forum->$meta_key ) ) { 
  7. return; 
  8. return $forum->$meta_key;