Property | Type | Description | |
---|---|---|---|
$session_id | string | ID of the current session. |
Property | Type | Description | |
---|---|---|---|
$exp_variant | integer | Unix timestamp indicating when the expiration time needs to be reset. | |
$expires | integer | Unix timestamp when session expires. |
Method | Description | |
---|---|---|
cache_expiration ( ) : integer | Return the read-only cache expiration value. | |
get_instance ( ) : boolean | WP_Session | Retrieve the current session instance. | |
json_in ( string $data ) : boolean | Decodes a JSON string and, if the object is an array, overwrites the session container with its contents. | |
json_out ( ) : string | Output the current container contents as a JSON-encoded string. | |
regenerate_id ( boolean $delete_old = false ) | Regenerate the current session's ID. | |
reset ( ) | Flushes all session variables. | |
session_started ( ) : boolean | Check if a session has been initialized. | |
write_data ( ) | Write the data from the current session to the data storage system. |
Method | Description | |
---|---|---|
__construct ( ) | Default constructor. | |
read_data ( ) : array | Read data from a transient for the current session. | |
set_cookie ( ) | Set the session cookie | |
set_expiration ( ) | Set both the expiration time and the expiration variant. |
protected __construct ( ) |
public cache_expiration ( ) : integer | ||
return | integer |
public static get_instance ( ) : boolean | WP_Session | ||
return | boolean | WP_Session |
public regenerate_id ( boolean $delete_old = false ) | ||
$delete_old | boolean | Flag whether or not to delete the old session data from the server. |
public session_started ( ) : boolean | ||
return | boolean |
protected set_expiration ( ) |
public write_data ( ) |
protected int $exp_variant | ||
return | integer |
protected int $expires | ||
return | integer |