_bb_get_key

The BuddyPress bb get key function.

Description

_bb_get_key( $key, (bool) $default_key = false ); 

Parameters (2)

0. $key
The key.
1. $default_key — Optional. (bool) => false
The default key.

Usage

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

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-pluggable.php  
  1. function _bb_get_key( $key, $default_key = false ) 
  2. global $bb_default_secret_key; 
  3.  
  4. if ( defined( $key ) && '' != constant( $key ) && $bb_default_secret_key != constant( $key ) ) { 
  5. return constant( $key ); 
  6.  
  7. return '';