WP_User_Meta_Session_Tokens::update_sessions()protectedWP 4.0.0

Updates the user's sessions in the usermeta table.

Метод класса: WP_User_Meta_Session_Tokens{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->update_sessions( $sessions );
$sessions(array) (required)
Sessions.

Changelog

Since 4.0.0 Introduced.

Код WP_User_Meta_Session_Tokens::update_sessions() WP 6.1.1

protected function update_sessions( $sessions ) {
	if ( $sessions ) {
		update_user_meta( $this->user_id, 'session_tokens', $sessions );
	} else {
		delete_user_meta( $this->user_id, 'session_tokens' );
	}
}