session_token_manager

Filters the session token manager used.

Description

apply_filters( 'session_token_manager', (string) $wp_user_meta_session_tokens ); 

Parameters (1)

0. $wp_user_meta_session_tokens (string) => 'WP_User_Meta_Session_Tokens'
Name of class to use as the manager. Default WP_User_Meta_Session_Tokens..

Usage

To run the hook, copy the example below.
  1. $wp_user_meta_session_tokens = apply_filters( 'session_token_manager', $wp_user_meta_session_tokens ); 
  2.  
  3. if ( !empty( $wp_user_meta_session_tokens ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the session_token_manager callback 
  2. function filter_session_token_manager( $wp_user_meta_session_tokens ) { 
  3. // make filter magic happen here... 
  4. return $wp_user_meta_session_tokens
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'session_token_manager', 'filter_session_token_manager', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'session_token_manager', 'filter_session_token_manager', 10, 1 ); 

Defined (2)

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

/wp-includes/class-wp-session-tokens.php  
  1. $manager = apply_filters( 'session_token_manager', 'WP_User_Meta_Session_Tokens' ); 
  1. $manager = apply_filters( 'session_token_manager', 'WP_User_Meta_Session_Tokens' );