WordPress at a glance
function is not described

WP_User_Meta_Session_Tokens::prepare_session() protected WP 1.0

Converts an expiration to an array of session information.

{} It's a method of the class: WP_User_Meta_Session_Tokens{}

No Hooks.


Array. Session.


// protected - for code of main (parent) or child class
$result = $this->prepare_session( $session );
$session(mixed) (required)
Session or expiration.

Code of WP_User_Meta_Session_Tokens::prepare_session() WP 5.7

protected function prepare_session( $session ) {
	if ( is_int( $session ) ) {
		return array( 'expiration' => $session );

	return $session;