WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Session_Tokens::get_instance() public WP 4.0.0

Retrieves a session manager instance for a user.

This method contains a 'session_token_manager' filter, allowing a plugin to swap out the session manager for a subclass of WP_Session_Tokens.

Это метод класса: WP_Session_Tokens{}

Хуки из метода

WP_Session_Tokens. The session object, which is by default an instance of the WP_User_Meta_Session_Tokens class.


$result = WP_Session_Tokens::get_instance( $user_id );
$user_id(число) (обязательный)
User whose session to manage.

Список изменений

С версии 4.0.0 Введена.

Код WP Session Tokens::get instance: wp-includes/class-wp-session-tokens.php WP 5.4.2

final public static function get_instance( $user_id ) {
	 * Filters the class name for the session token manager.
	 * @since 4.0.0
	 * @param string $session Name of class to use as the manager.
	 *                        Default 'WP_User_Meta_Session_Tokens'.
	$manager = apply_filters( 'session_token_manager', 'WP_User_Meta_Session_Tokens' );
	return new $manager( $user_id );