=') && version_compare(get_bloginfo('version'), WS_PLUGIN__S2MEMBER_MIN_WP_VERSION, '>=') && !isset($GLOBALS['WS_PLUGIN__']['s2member'])) { $GLOBALS['WS_PLUGIN__']['s2member']['l'] = __FILE__; /* Hook before loaded. */ do_action('ws_plugin__s2member_before_loaded'); /* System configuraton. */ include_once dirname(__FILE__).'/src/includes/syscon.inc.php'; /* Hooks and Filters. */ include_once dirname(__FILE__).'/src/includes/hooks.inc.php'; /* Hook after system config & Hooks are loaded. */ do_action('ws_plugin__s2member_config_hooks_loaded'); /* Load a possible Pro module, if/when available. */ if(apply_filters('ws_plugin__s2member_load_pro', TRUE)) { if(is_file($_s2member_pro = dirname(__FILE__).'-pro/pro-module.php')) include_once $_s2member_pro; else if(is_file($_s2member_pro = WP_PLUGIN_DIR.'/'.basename(dirname(__FILE__)).'-pro/pro-module.php')) include_once $_s2member_pro; unset($_s2member_pro); // Housekeeping. } /* Configure options and their defaults. */ ws_plugin__s2member_configure_options_and_their_defaults(); /* Function includes. */ include_once dirname(__FILE__).'/src/includes/funcs.inc.php'; /* Include Shortcodes. */ include_once dirname(__FILE__).'/src/includes/codes.inc.php'; /* Hooks after loaded. */ do_action('ws_plugin__s2member_loaded'); do_action('ws_plugin__s2member_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_MIN_PHP_VERSION, '>=')) { add_action('all_admin_notices', function(){ echo '

You need PHP v' . WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION . '+ to use the s2Member plugin.

'; }); } else if(!version_compare(get_bloginfo('version'), WS_PLUGIN__S2MEMBER_MIN_WP_VERSION, '>=')) { add_action('all_admin_notices', function(){ echo '

You need WordPress v' . WS_PLUGIN__S2MEMBER_MIN_WP_VERSION . '+ to use the s2Member plugin.

'; }); } } unset(${__FILE__}); // Housekeeping. //2300808 PayPal button encryption notice if they're using it if (is_admin() && !empty($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_btn_encryption"])) { // Dismiss. add_action('admin_init', function(){ //260303 Show only to administrators. if (!current_user_can('manage_options')) return; $user_id = get_current_user_id(); if (isset($_GET['s2-dismiss-2300808'])) add_user_meta($user_id, 's2_notice_dismissed_2300808', 'true', true); }); // Notice. add_action('admin_notices', function(){ //260303 Show only to administrators. if (!current_user_can('manage_options')) return; $user_id = get_current_user_id(); $logo_url = $GLOBALS['WS_PLUGIN__']['s2member']['c']['dir_url'].'/src/images/logo-square-big.png'; $dismiss_url = esc_url(add_query_arg('s2-dismiss-2300808', '', $_SERVER['REQUEST_URI'])); if (!get_user_meta($user_id, 's2_notice_dismissed_2300808')) { echo '
⚠️ PayPal has given some trouble recently with encrypted buttons, so for the time being it\'s recommended to leave encryption disabled and allow non-encrypted payments. See: s2Member > PayPal Options > Account Details > Button Encryption
Dismiss this notice.
'; } }); }