WP_Session_Tokens::__construct() WordPress Method
The WP_Session_Tokens::__construct() method initializes the session tokens for a user. It accepts two parameters: the user_id for which the tokens are being generated, and an array of options. The method then calls the WP_Session_Tokens::generate_tokens() method to generate the actual tokens.
WP_Session_Tokens::__construct( int $user_id ) #
Protected constructor. Use the get_instance()
method to get the instance.
Contents
Parameters
- $user_id
(int)(Required)User whose session to manage.
Source
File: wp-includes/class-wp-session-tokens.php
protected function __construct( $user_id ) { $this->user_id = $user_id; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.0.0 | Introduced. |