bb_nonce_tick

Get the time-dependent variable for nonce creation.

Description

(int) bb_nonce_tick(); 

A nonce has a lifespan of two ticks. Nonces in their second tick may be updated, e.g. by autosave.

Returns (int)


Usage

  1. if ( !function_exists( 'bb_nonce_tick' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-pluggable.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bb_nonce_tick(); 
  7.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-pluggable.php  
  1. function bb_nonce_tick() { 
  2. $nonce_life = apply_filters('bb_nonce_life', 86400); 
  3.  
  4. return ceil(time() / ( $nonce_life / 2 ));