You appear to be a bot. Output may be restricted
Description
Get things started
Defines our WP_Session constants, includes the necessary libraries and retrieves the WP Session instance
Usage
EDD_Session::__construct();
Parameters
Returns
void
Source
File name: easy-digital-downloads/includes/class-edd-session.php
Lines:
1 to 48 of 48
public function __construct() { $this->use_php_sessions = $this->use_php_sessions(); if( $this->use_php_sessions ) { if( is_multisite() ) { $this->prefix = '_' . get_current_blog_id(); } // Use PHP SESSION (must be enabled via the EDD_USE_PHP_SESSIONS constant) add_action( 'init', array( $this, 'maybe_start_session' ), -2 ); } else { if( ! $this->should_start_session() ) { return; } // Use WP_Session (default) if ( ! defined( 'WP_SESSION_COOKIE' ) ) { define( 'WP_SESSION_COOKIE', 'edd_wp_session' ); } if ( ! class_exists( 'Recursive_ArrayAccess' ) ) { require_once EDD_PLUGIN_DIR . 'includes/libraries/class-recursive-arrayaccess.php'; } if ( ! class_exists( 'WP_Session' ) ) { require_once EDD_PLUGIN_DIR . 'includes/libraries/class-wp-session.php'; require_once EDD_PLUGIN_DIR . 'includes/libraries/wp-session.php'; } add_filter( 'wp_session_expiration_variant', array( $this, 'set_expiration_variant_time' ), 99999 ); add_filter( 'wp_session_expiration', array( $this, 'set_expiration_time' ), 99999 ); } if ( empty( $this->session ) && ! $this->use_php_sessions ) { add_action( 'plugins_loaded', array( $this, 'init' ), -1 ); } else { add_action( 'init', array( $this, 'init' ), -1 ); } }