Filter
rpress_use_php_sessions
On this page
Filters whether RestroPress uses native PHP sessions.
Applied at the end of RPRESS_Session::use_php_sessions() after auto detection and after the RPRESS_USE_PHP_SESSIONS constant has been applied. The result is cast to bool. When false, session data is kept by the bundled WP_Session handler instead.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$use_php_sessions | bool | Whether PHP sessions are used. |
Return value#
bool. True to use PHP sessions.
Example#
function my_use_php_sessions( $use_php_sessions ) {
return false;
}
add_filter( 'rpress_use_php_sessions', 'my_use_php_sessions' );
Notes#
Evaluated when the session object is constructed, so register the filter from a plugin file rather than on a later hook.
Source#
Applied in:
includes/class-rpress-session.php(line 250), inRPRESS_Session::use_php_sessions()
See also#
Was this page helpful?
