WP_Session_Tokens::is_still_valid() WordPress Method
The WP_Session_Tokens::is_still_valid() method checks whether a session is still valid. A session is considered valid if it has not expired and if the user has not been logged out of the session.
WP_Session_Tokens::is_still_valid( array $session ) #
Determines whether a session is still valid, based on its expiration timestamp.
Contents
Parameters
- $session
(array)(Required)Session to check.
Return
(bool) Whether session is valid.
Source
File: wp-includes/class-wp-session-tokens.php
final protected function is_still_valid( $session ) { return $session['expiration'] >= time(); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.0.0 | Introduced. |