s2Member v110815
Source Code: s2member-pro\pro-module.php
Docs updated: August 15, 2011, 4:21 pm
Open for public discussion.
(!-- s-words :: --)Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code jQuery(window).load(function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli'+location.hash).addClass('hilite'); }); jQuery(window).bind('hashchange', function(){ if(typeof location.hash === 'string' && location.hash.match(/^#/)) jQuery('olli').removeClass('hilite'); jQuery('olli'+location.hash).addClass('hilite'); }); [ full view ]s2member-pro\pro-module.php ?php /** * The main plugin file. * * This file loads the plugin after checking * PHP, WordPress® and other compatibility requirements. * * Copyright: © 2009-2011 * {@link http://www.websharks-inc.com/ WebSharks, Inc.} * ( coded in the USA ) * * This WordPress® plugin ( s2Member Pro ) is comprised of two parts: * * o (1) Its PHP code is licensed under the GPL license, as is WordPress®. * You should have received a copy of the GNU General Public License, * along with this software. In the main directory, see: /licensing/ * If not, see: {@link http://www.gnu.org/licenses/}. * * o (2) All other parts of ( s2Member Pro ); including, but not limited to: * the CSS code, some JavaScript code, images, and design; * are licensed according to the license purchased. * See: {@link http://www.s2member.com/prices/} * * Unless you have our prior written consent, you must NOT directly or indirectly license, * sub-license, sell, resell, or provide for free; part (2) of the s2Member Pro Module; * or make an offer to do any of these things. All of these things are strictly * prohibited with part (2) of the s2Member Pro Module. * * Your purchase of s2Member Pro includes free lifetime upgrades via s2Member.com * ( i.e. new features, bug fixes, updates, improvements ); along with full access * to our video tutorial library: {@link http://www.s2member.com/videos/} * * @package s2Member * @since 1.0 */ if ( realpath ( __FILE__ ) === realpath ( $_SERVER [ "SCRIPT_FILENAME" ] ) ) exit ( "Do not access this file directly." ) ; /** * The installed version of s2Member Pro. * * @package s2Member * @since 1.0 * * @var str */ if ( ! defined ( "WS_PLUGIN__S2MEMBER_PRO_VERSION" ) ) define ( "WS_PLUGIN__S2MEMBER_PRO_VERSION" , "110815" ) ; /** * Minimum PHP version required to run s2Member Pro. * * @package s2Member * @since 1.0 * * @var str */ if ( ! defined ( "WS_PLUGIN__S2MEMBER_PRO_MIN_PHP_VERSION" ) ) define ( "WS_PLUGIN__S2MEMBER_PRO_MIN_PHP_VERSION" , "5.2.3" ) ; /** * Minimum WordPress® version required to run s2Member Pro. * * @package s2Member * @since 1.0 * * @var str */ if ( ! defined ( "WS_PLUGIN__S2MEMBER_PRO_MIN_WP_VERSION" ) ) define ( "WS_PLUGIN__S2MEMBER_PRO_MIN_WP_VERSION" , "3.1" ) ; /** * Minimum Framework version required by s2Member Pro. * * @package s2Member * @since 1.0 * * @var str */ if ( ! defined ( "WS_PLUGIN__S2MEMBER_PRO_MIN_FRAMEWORK_VERSION" ) ) define ( "WS_PLUGIN__S2MEMBER_PRO_MIN_FRAMEWORK_VERSION" , "110815" ) ; /* Several compatibility checks. If all pass, load the s2Member plugin. */ if ( version_compare ( PHP_VERSION , WS_PLUGIN__S2MEMBER_PRO_MIN_PHP_VERSION, "=" ) && version_compare ( get_bloginfo ( "version" ) , WS_PLUGIN__S2MEMBER_PRO_MIN_WP_VERSION, "=" ) && defined ( "WS_PLUGIN__S2MEMBER_VERSION" ) && defined ( "WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION" ) && version_compare (WS_PLUGIN__S2MEMBER_VERSION, WS_PLUGIN__S2MEMBER_PRO_MIN_FRAMEWORK_VERSION, "=" ) && version_compare (WS_PLUGIN__S2MEMBER_PRO_VERSION, WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION, "=" ) && ! isset ( $GLOBALS [ "WS_PLUGIN__" ] [ "s2member_pro" ] ) ) { $GLOBALS [ "WS_PLUGIN__" ] [ "s2member_pro" ] [ "l" ] = __FILE__ ; /* Hook before loaded. */ do_action ( "ws_plugin__s2member_pro_before_loaded" ) ; /* System configuraton. */ include_once dirname ( __FILE__ ) . "/includes/syscon.inc.php" ; /* Hooks and Filters. */ include_once dirname ( __FILE__ ) . "/includes/hooks.inc.php" ; /* Hook after system config & Hooks are loaded. */ do_action ( "ws_plugin__s2member_pro_config_hooks_loaded" ) ; /* Function includes. */ include_once dirname ( __FILE__ ) . "/includes/funcs.inc.php" ; /* Include Shortcodes. */ include_once dirname ( __FILE__ ) . "/includes/codes.inc.php" ; /* Hook after loaded. */ do_action ( "ws_plugin__s2member_pro_after_loaded" ) ; } /* Else NOT compatible. Do we need admin compatibility errors now? */ else if ( is_admin ( ) ) /* Admin compatibility errors. */ { if ( ! version_compare ( PHP_VERSION , WS_PLUGIN__S2MEMBER_PRO_MIN_PHP_VERSION, "=" ) ) { add_action ( "all_admin_notices" , create_function ( '' , 'echo \'div class="error fade"pYou need PHP v\' . WS_PLUGIN__S2MEMBER_PRO_MIN_PHP_VERSION . \'+ to use the s2Member Pro Module./p/div\';' ) ) ; } else if ( ! version_compare ( get_bloginfo ( "version" ) , WS_PLUGIN__S2MEMBER_PRO_MIN_WP_VERSION, "=" ) ) { add_action ( "all_admin_notices" , create_function ( '' , 'echo \'div class="error fade"pYou need WordPress® v\' . WS_PLUGIN__S2MEMBER_PRO_MIN_WP_VERSION . \'+ to use the s2Member Pro Module./p/div\';' ) ) ; } else if ( ! defined ( "WS_PLUGIN__S2MEMBER_VERSION" ) || ! defined ( "WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION" ) || ! version_compare (WS_PLUGIN__S2MEMBER_VERSION, WS_PLUGIN__S2MEMBER_PRO_MIN_FRAMEWORK_VERSION, "=" ) ) { add_action ( "all_admin_notices" , create_function ( '' , 'echo \'div class="error fade"pIn order to load the s2Member Pro Module, you need the a href="http://www.primothemes.com/post/product/s2member-membership-plugin-with-paypal/" target="_blank"s2Member Framework/a, v\' . WS_PLUGIN__S2MEMBER_PRO_MIN_FRAMEWORK_VERSION . \'+. It\\\'s free./p/div\';' ) ) ; } else if ( ! version_compare (WS_PLUGIN__S2MEMBER_PRO_VERSION, WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION, "=" ) ) { add_action ( "admin_init" , "c_ws_plugin__s2member_pro_upgrader::upgrade" ) ; /* Upgrade Hook. */ include_once dirname ( __FILE__ ) . "/includes/classes/upgrader.inc.php" ; /* Include upgrader class. */ add_action ( "all_admin_notices" , create_function ( '' , 'echo \'div class="error fade"pYour a href="http://www.s2member.com/" target="_blank"s2Member Pro Module/a must be updated to v\' . WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION . \'+.br /Please log in at a href="http://www.s2member.com/" target="_blank" rel="external"s2Member.com/a for access to the latest version./p\' . c_ws_plugin__s2member_pro_upgrader::wizard () . \'/div\';' ) ) ; } } ? [ full view ]s2member-pro\pro-module.php Source Code Documentation Packages ( Overview ) Classes Deprecated Todo Index Source Code(!-- :: s-words --)Statistics: Posted by System Robot — August 15th, 2011, 3:20 pm
]]>