Simple Session Support

INTRODUCTION

Simple Session Support adds support for the PHP session to a site.  The session is created at initialization and destroyed at login or logout.   For details on how it works see my post Using Sessions in WordPress.  Feel free to borrow this code for use in your own plugins and themes.

INSTALLATION

Install from the WordPress  Plugins – Add New menu in wp-admin.

Activate the plugin.

More details, change history and download may be found at the WordPress Plugin Directory .

USING THE SESSION

The PHP session is an superglobal array named $_SESSION.  See the PHP Manual – Sessions for details on its use.

To save some data into the session

$_SESSION['myKey'] = "Some data I need later";

And to get that data out at a later time

if(isset($_SESSION['myKey'])) {
    $value = $_SESSION['myKey'];
} else {
    $value = '';
}

CONFIGURATION

There is no configuration required.

ADDITIONAL FEATURES

There are no additional features supported by Simple Session Support.  The code is simple, small and well documented, so you can use it as a starting point for your own plugin.

SUPPORT

This plugin has been tested against WordPress 3.8.

For support please Contact Silver Maple Web.

Thank you for your interest.