Adds $_SESSION
-like functionality to WordPress.
Every visitor, logged in or not, will be issued an instance of WP_Session
. Their instance will be identified by an ID
stored in the _wp_session
cookie. Typically, session data will be stored in a WordPress transient, but if your
installation has a caching system in-place (i.e. memcached), the session data might be stored in memory.
This provides plugin and theme authors the ability to use WordPress-managed session variables without having to use the
standard PHP $_SESSION
superglobal.
Download
Latest version: [zip]
WP Session Manager has been downloaded 9115 times so far!
Installation
Manual Installation
- Upload the entire
/wp-session-manager
folder to the/wp-content/plugins/
directory. - Activate the plugin through the ‘Plugins’ menu in WordPress.
- Use
WP_Session::get_instance()
in your code.
Changelog
1.1.2
- Fix a race condition where session expiration options could accidentally be set to autoload
- Make the garbage collection routine run hourly to alleviate long-running tasks on larger sites
1.1.1
- Fix a bug where session expiration was not properly set upon instantiation
1.1
- Implement Recursive_ArrayAccess to provide multidimensional array support
- Better expiration for session data
- Implement garbage collection to keep the database clean
1.0.2
- Switch to object persistence rather than transients
1.0.1
- Changes implementation to avoid the use of a global variable (still registered for convenience)
1.0
- First version