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.


Parameters

$user_id

(int)(Required)User whose session to manage.


Top ↑

Source

File: wp-includes/class-wp-session-tokens.php

	protected function __construct( $user_id ) {
		$this->user_id = $user_id;
	}

Top ↑

Changelog

Changelog
VersionDescription
4.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.