| 1 |
<?php |
| 2 |
/** |
| 3 |
* The main plugin file. |
| 4 |
* |
| 5 |
* This file loads the plugin after checking |
| 6 |
* PHP, WordPress® and other compatibility requirements. |
| 7 |
* |
| 8 |
* Copyright: © 2009-2011 |
| 9 |
* {@link http://www.websharks-inc.com/ WebSharks, Inc.} |
| 10 |
* ( coded in the USA ) |
| 11 |
* |
| 12 |
* Released under the terms of the GNU General Public License. |
| 13 |
* You should have received a copy of the GNU General Public License, |
| 14 |
* along with this software. In the main directory, see: /licensing/ |
| 15 |
* If not, see: {@link http://www.gnu.org/licenses/}. |
| 16 |
* |
| 17 |
* @package s2Member |
| 18 |
* @since 1.0 |
| 19 |
*/ |
| 20 |
/* -- This section for WordPress® parsing. ------------------------------------------------------------------------------ |
| 21 |
|
| 22 |
Version: 120213 |
| 23 |
Stable tag: 120213 |
| 24 |
|
| 25 |
SSL Compatible: yes |
| 26 |
bbPress® Compatible: yes |
| 27 |
WordPress® Compatible: yes |
| 28 |
BuddyPress® Compatible: yes |
| 29 |
WP® Multisite Compatible: yes |
| 30 |
Multisite Blog Farm Compatible: yes |
| 31 |
|
| 32 |
PayPal® Standard Compatible: yes |
| 33 |
PayPal® Pro Compatible: yes w/s2Member® Pro |
| 34 |
Authorize.Net® Compatible: yes w/s2Member® Pro |
| 35 |
Google® Checkout Compatible: yes w/s2Member® Pro |
| 36 |
ClickBank® Compatible: yes w/s2Member® Pro |
| 37 |
|
| 38 |
Tested up to: 3.3.1 |
| 39 |
Requires at least: 3.2 |
| 40 |
|
| 41 |
Copyright: © 2009 WebSharks, Inc. |
| 42 |
License: GNU General Public License |
| 43 |
Contributors: WebSharks |
| 44 |
|
| 45 |
Author: s2Member® / WebSharks, Inc. |
| 46 |
Author URI: http://www.s2member.com/ |
| 47 |
Donate link: http://www.s2member.com/donate/ |
| 48 |
|
| 49 |
Text Domain: s2member |
| 50 |
Domain Path: /includes/translations |
| 51 |
|
| 52 |
Plugin Name: s2Member® Framework |
| 53 |
Forum URI: http://www.s2member.com/forums/ |
| 54 |
Plugin URI: http://www.s2member.com/framework/ |
| 55 |
Privacy URI: http://www.s2member.com/privacy/ |
| 56 |
Video Tutorials: http://www.s2member.com/videos/ |
| 57 |
Pro Module / Home Page: http://www.s2member.com/ |
| 58 |
Pro Module / Prices: http://www.s2member.com/prices/ |
| 59 |
Pro Module / Auto-Update URL: http://www.s2member.com/ |
| 60 |
PayPal Pro Integration: http://www.s2member.com/videos/ED70D90C6749DA3D/ |
| 61 |
Professional Installation URI: http://www.s2member.com/professional-installation/ |
| 62 |
|
| 63 |
Description: s2Member®, a powerful (free) membership plugin for WordPress®. Protect/secure members only content with roles/capabilities. |
| 64 |
Tags: s2, s2member, s2 member, membership, users, user, members, member, subscribers, subscriber, members only, roles, capabilities, capability, register, signup, paypal, paypal pro, pay pal, authorize, authorize.net, google checkout, clickbank, click bank, buddypress, buddy press, bbpress, bb press, shopping cart, cart, checkout, ecommerce |
| 65 |
|
| 66 |
-- end section for WordPress® parsing. ------------------------------------------------------------------------------- */ |
| 67 |
if(realpath(__FILE__) === realpath($_SERVER["SCRIPT_FILENAME"])) |
| 68 |
exit("Do not access this file directly."); |
| 69 |
/** |
| 70 |
* The installed version of s2Member. |
| 71 |
* |
| 72 |
* @package s2Member |
| 73 |
* @since 3.0 |
| 74 |
* |
| 75 |
* @var str |
| 76 |
*/ |
| 77 |
if(!defined("WS_PLUGIN__S2MEMBER_VERSION")) |
| 78 |
define("WS_PLUGIN__S2MEMBER_VERSION", "120213" /* !#distro-version#! */); |
| 79 |
/** |
| 80 |
* Minimum PHP version required to run s2Member. |
| 81 |
* |
| 82 |
* @package s2Member |
| 83 |
* @since 3.0 |
| 84 |
* |
| 85 |
* @var str |
| 86 |
*/ |
| 87 |
if(!defined("WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION")) |
| 88 |
define("WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION", "5.2.3" /* !#php-requires-at-least-version#! */); |
| 89 |
/** |
| 90 |
* Minimum WordPress® version required to run s2Member. |
| 91 |
* |
| 92 |
* @package s2Member |
| 93 |
* @since 3.0 |
| 94 |
* |
| 95 |
* @var str |
| 96 |
*/ |
| 97 |
if(!defined("WS_PLUGIN__S2MEMBER_MIN_WP_VERSION")) |
| 98 |
define("WS_PLUGIN__S2MEMBER_MIN_WP_VERSION", "3.2" /* !#wp-requires-at-least-version#! */); |
| 99 |
/** |
| 100 |
* Minimum Pro version required by the Framework. |
| 101 |
* |
| 102 |
* @package s2Member |
| 103 |
* @since 3.0 |
| 104 |
* |
| 105 |
* @var str |
| 106 |
*/ |
| 107 |
if(!defined("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION")) |
| 108 |
define("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "120213" /* !#distro-version#! */); |
| 109 |
/* |
| 110 |
Several compatibility checks. |
| 111 |
If all pass, load the s2Member plugin. |
| 112 |
*/ |
| 113 |
if(version_compare(PHP_VERSION, WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION, ">=") && version_compare(get_bloginfo("version"), WS_PLUGIN__S2MEMBER_MIN_WP_VERSION, ">=") && !isset($GLOBALS["WS_PLUGIN__"]["s2member"])) |
| 114 |
{ |
| 115 |
$GLOBALS["WS_PLUGIN__"]["s2member"]["l"] = __FILE__; |
| 116 |
/* |
| 117 |
Hook before loaded. |
| 118 |
*/ |
| 119 |
do_action("ws_plugin__s2member_before_loaded"); |
| 120 |
/* |
| 121 |
System configuraton. |
| 122 |
*/ |
| 123 |
include_once dirname(__FILE__)."/includes/syscon.inc.php"; |
| 124 |
/* |
| 125 |
Hooks and Filters. |
| 126 |
*/ |
| 127 |
include_once dirname(__FILE__)."/includes/hooks.inc.php"; |
| 128 |
/* |
| 129 |
Hook after system config & Hooks are loaded. |
| 130 |
*/ |
| 131 |
do_action("ws_plugin__s2member_config_hooks_loaded"); |
| 132 |
/* |
| 133 |
Load a possible Pro module, if/when available. |
| 134 |
*/ |
| 135 |
if(apply_filters("ws_plugin__s2member_load_pro", true) && file_exists(dirname(__FILE__)."-pro/pro-module.php")) |
| 136 |
include_once dirname(__FILE__)."-pro/pro-module.php"; |
| 137 |
/* |
| 138 |
Configure options and their defaults. |
| 139 |
*/ |
| 140 |
ws_plugin__s2member_configure_options_and_their_defaults(); |
| 141 |
/* |
| 142 |
Function includes. |
| 143 |
*/ |
| 144 |
include_once dirname(__FILE__)."/includes/funcs.inc.php"; |
| 145 |
/* |
| 146 |
Include Shortcodes. |
| 147 |
*/ |
| 148 |
include_once dirname(__FILE__)."/includes/codes.inc.php"; |
| 149 |
/* |
| 150 |
Hooks after loaded. |
| 151 |
*/ |
| 152 |
do_action("ws_plugin__s2member_loaded"); |
| 153 |
do_action("ws_plugin__s2member_after_loaded"); |
| 154 |
} |
| 155 |
/* |
| 156 |
Else NOT compatible. Do we need admin compatibility errors now? |
| 157 |
*/ |
| 158 |
else if(is_admin()) /* Admin compatibility errors. */ |
| 159 |
{ |
| 160 |
if(!version_compare(PHP_VERSION, WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION, ">=")) |
| 161 |
{ |
| 162 |
add_action("all_admin_notices", create_function('', 'echo \'<div class="error fade"><p>You need PHP v\' . WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION . \'+ to use the s2Member plugin.</p></div>\';')); |
| 163 |
} |
| 164 |
else if(!version_compare(get_bloginfo("version"), WS_PLUGIN__S2MEMBER_MIN_WP_VERSION, ">=")) |
| 165 |
{ |
| 166 |
add_action("all_admin_notices", create_function('', 'echo \'<div class="error fade"><p>You need WordPress® v\' . WS_PLUGIN__S2MEMBER_MIN_WP_VERSION . \'+ to use the s2Member plugin.</p></div>\';')); |
| 167 |
} |
| 168 |
} |
| 169 |
?> |