backpress_set_transient

The BuddyPress backpress set transient function.

Description

backpress_set_transient( $transient, $value, (int) $expiration = 0 ); 

Parameters (3)

0. $transient
The transient.
1. $value
The value.
2. $expiration — Optional. (int)
The expiration.

Usage

  1. if ( !function_exists( 'backpress_set_transient' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/backpress/functions.bp-options.php'; 
  3.  
  4. // The transient. 
  5. $transient = null; 
  6.  
  7. // The value. 
  8. $value = null; 
  9.  
  10. // The expiration. 
  11. $expiration = -1; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = backpress_set_transient($transient, $value, $expiration); 
  15.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/backpress/functions.bp-options.php  
  1. function backpress_set_transient( $transient, $value, $expiration = 0 ) 
  2. if ( !class_exists('BP_Transients') ) { 
  3. return; 
  4.  
  5. return BP_Transients::set( $transient, $value, $expiration );