WP_Session_Tokens::create

SummerySummery

Generates a session token and attaches session information to it.

Syntax

WP_Session_Tokens::create( int $expiration )

DescriptionDescription

A session token is a long, random string. It is used in a cookie to link that cookie to an expiration time and to ensure the cookie becomes invalidated when the user logs out.

This function generates a token and stores it with the associated expiration time (and potentially other session information via the ‘attach_session_information’ filter).

ParametersParameters

$expiration

(int) (Required) Session expiration timestamp.

ReturnReturn

(string) Session token.

SourceSource

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


			

ChangelogChangelog

Changelog
Version Description
4.0.0 Introduced.
Scroll to Top