WP_User_Meta_Session_Tokens::prepare_session() WordPress Method
The prepare_session() method of the WP_User_Meta_Session_Tokens class is used to prepare a user session for use. This includes creating a new session token if one does not already exist, and initializing the session data.
WP_User_Meta_Session_Tokens::prepare_session( mixed $session ) #
Converts an expiration to an array of session information.
Contents
Parameters
- $session
(mixed)(Required)Session or expiration.
Return
(array) Session.
Source
File: wp-includes/class-wp-user-meta-session-tokens.php
protected function prepare_session( $session ) {
if ( is_int( $session ) ) {
return array( 'expiration' => $session );
}
return $session;
}
Expand full source codeCollapse full source codeView on TracView on GitHub