wp_session_register_garbage_collection

Register the garbage collector as a twice daily event.

Description

wp_session_register_garbage_collection(); 

Usage

  1. if ( !function_exists( 'wp_session_register_garbage_collection' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/libraries/wp-session.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wp_session_register_garbage_collection(); 
  7.  

Defined (2)

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

/deprecated/includes/libraries/wp-session.php  
  1. function wp_session_register_garbage_collection() { 
  2. if ( ! wp_next_scheduled( 'wp_session_garbage_collection' ) ) { 
  3. wp_schedule_event( current_time( 'timestamp' ), 'twicedaily', 'wp_session_garbage_collection' ); 
/includes/Libraries/Session/wp-session.php  
  1. function wp_session_register_garbage_collection() { 
  2. if ( ! wp_next_scheduled( 'wp_session_garbage_collection' ) ) { 
  3. wp_schedule_event( current_time( 'timestamp' ), 'twicedaily', 'wp_session_garbage_collection' );