s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members) - Version 220318

Version Description

= v160801 =

(Maintenance Release) Upgrade immediately.

Download this release

Release Info

Developer clavaque
Plugin Icon 128x128 s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members)
Version 220318
Comparing to
See all releases

Code changes from version 210526 to 220318

readme.txt CHANGED
@@ -3,9 +3,9 @@
3
  Plugin Name: s2Member® Framework
4
  Plugin URI: http://s2member.com/
5
  Tags: membership, subscribers, subscriber, members only, roles, capabilities, capability, register, signup, paypal, ecommerce, restriction
6
- Version: 210526
7
- Stable tag: 210526
8
- Tested up to: 6.0-alpha-52831
9
  Requires at least: 4.2
10
  Requires PHP: 5.6.2
11
  Tested up to PHP: 7.4.6
@@ -33,11 +33,11 @@ The free s2Member® Framework lets you protect WordPress content and offer users
33
 
34
  Easy to configure and highly extensible.
35
 
36
- You can protect the whole site, just certain areas, or even just parts of pages.
37
 
38
- Sell recurring subscriptions with lots of flexibility. Or sell "Buy Now" access in various ways.
39
 
40
- Protect your WordPress posts, pages, tags, categories, URIs, BuddyPress, bbPress, and even portions of them.
41
 
42
  Provide highly configurable access to specific portions of your content with Levels or Access Capabilities.
43
 
@@ -139,6 +139,12 @@ Released under the terms of the [GNU General Public License](http://www.gnu.org/
139
 
140
  == Changelog ==
141
 
 
 
 
 
 
 
142
  = v210526 =
143
 
144
  - (s2Member Framework & Pro) **UI Enhancement**: Started improving the admin interface. Lightened up the colors, and changed the layout a little bit.
3
  Plugin Name: s2Member® Framework
4
  Plugin URI: http://s2member.com/
5
  Tags: membership, subscribers, subscriber, members only, roles, capabilities, capability, register, signup, paypal, ecommerce, restriction
6
+ Version: 220318
7
+ Stable tag: 220318
8
+ Tested up to: 6.0-alpha-52937
9
  Requires at least: 4.2
10
  Requires PHP: 5.6.2
11
  Tested up to PHP: 7.4.6
33
 
34
  Easy to configure and highly extensible.
35
 
36
+ You can protect the whole site, certain areas, or even just parts of pages.
37
 
38
+ Sell recurring (or non-recurring) subscriptions with lots of flexibility. Or sell "Buy Now" access in various ways.
39
 
40
+ Protect your WordPress posts, pages, tags, categories, URIs, BuddyPress/bbPress, and even portions of them.
41
 
42
  Provide highly configurable access to specific portions of your content with Levels or Access Capabilities.
43
 
139
 
140
  == Changelog ==
141
 
142
+ = v220318 =
143
+
144
+ - (Framework) **Enhancement**: New `current_user_gateway_is` function for conditionals. Useful for sites using more than one gateway. E.g. `[s2If current_user_gateway_is(stripe)] ...`
145
+
146
+ - (Pro) **UI Fix**: Removed "Image Branding" setting from s2's Stripe options, not used in current integration.
147
+
148
  = v210526 =
149
 
150
  - (s2Member Framework & Pro) **UI Enhancement**: Started improving the admin interface. Lightened up the colors, and changed the layout a little bit.
s2member.php CHANGED
@@ -20,8 +20,8 @@
20
  */
21
  /* -- This section for WordPress parsing. ------------------------------------------------------------------------------
22
 
23
- Version: 210526
24
- Stable tag: 210526
25
 
26
  SSL Compatible: yes
27
  bbPress Compatible: yes
@@ -36,7 +36,7 @@ PayPal Pro Compatible: yes w/s2Member Pro
36
  Authorize.Net Compatible: yes w/s2Member Pro
37
  ClickBank Compatible: yes w/s2Member Pro
38
 
39
- Tested up to: 5.7-RC3-50511
40
  Requires at least: 4.2
41
 
42
  Requires PHP: 5.6.2
@@ -77,7 +77,7 @@ if(!defined('WPINC')) // MUST have WordPress.
77
  *
78
  * @var string
79
  */
80
- ${__FILE__}['tmp'] = '210526'; //version//
81
  if(!defined('WS_PLUGIN__S2MEMBER_VERSION'))
82
  define('WS_PLUGIN__S2MEMBER_VERSION', ${__FILE__}['tmp']);
83
  /**
@@ -110,7 +110,7 @@ if(!defined('WS_PLUGIN__S2MEMBER_MIN_WP_VERSION'))
110
  *
111
  * @var string
112
  */
113
- ${__FILE__}['tmp'] = '210526'; //version//
114
  if(!defined('WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION'))
115
  define('WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION', ${__FILE__}['tmp']);
116
  /*
20
  */
21
  /* -- This section for WordPress parsing. ------------------------------------------------------------------------------
22
 
23
+ Version: 220318
24
+ Stable tag: 220318
25
 
26
  SSL Compatible: yes
27
  bbPress Compatible: yes
36
  Authorize.Net Compatible: yes w/s2Member Pro
37
  ClickBank Compatible: yes w/s2Member Pro
38
 
39
+ Tested up to: 6.0-alpha-52937
40
  Requires at least: 4.2
41
 
42
  Requires PHP: 5.6.2
77
  *
78
  * @var string
79
  */
80
+ ${__FILE__}['tmp'] = '220318'; //version//
81
  if(!defined('WS_PLUGIN__S2MEMBER_VERSION'))
82
  define('WS_PLUGIN__S2MEMBER_VERSION', ${__FILE__}['tmp']);
83
  /**
110
  *
111
  * @var string
112
  */
113
+ ${__FILE__}['tmp'] = '220318'; //version//
114
  if(!defined('WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION'))
115
  define('WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION', ${__FILE__}['tmp']);
116
  /*
src/images/logo-square-big.png ADDED
Binary file
src/includes/functions/api-functions.inc.php CHANGED
@@ -2770,3 +2770,33 @@ if(!function_exists('s2member_eot'))
2770
  return c_ws_plugin__s2member_utils_users::get_user_eot($user_id, $check_gateway, $favor);
2771
  }
2772
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2770
  return c_ws_plugin__s2member_utils_users::get_user_eot($user_id, $check_gateway, $favor);
2771
  }
2772
  }
2773
+
2774
+ /**
2775
+ * Conditional to determine if the current User has a specific gateway set in his profile.
2776
+ *
2777
+ * ———— Code Sample Using Both Functions ————
2778
+ * ```
2779
+ * <!php
2780
+ * if(current_user_gateway_is("stripe"))
2781
+ * echo "Current user's payment gateway is set to Stripe (e.g. last paid through s2's Stripe pro-form)";
2782
+ * !>
2783
+ * ```
2784
+ *
2785
+ * ———— Shortcode Conditional Equivalent ————
2786
+ * ```
2787
+ * [s2If current_user_gateway_is(stripe)]
2788
+ * Current user's payment gateway is set to Stripe (e.g. last paid through s2's Stripe pro-form)
2789
+ * [/s2If]
2790
+ * ```
2791
+ *
2792
+ * @package s2Member\API_Functions
2793
+ * @since 220316
2794
+ *
2795
+ * @param string $gateway A gateway ID *( e.g. `stripe`, `paypal`, `authnet`, `clickbank` )*.
2796
+ * @return bool True if the specific User has the specified gateway, else false.
2797
+ */
2798
+ if (!function_exists("current_user_gateway_is")) {
2799
+ function current_user_gateway_is($gateway) {
2800
+ return ($gateway === S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY);
2801
+ }
2802
+ }
src/includes/menu-pages/logs.inc.php CHANGED
@@ -54,11 +54,11 @@ if(!class_exists("c_ws_plugin__s2member_menu_page_logs"))
54
  echo '<div class="ws-menu-page-group" title="Logging Configuration">'."\n";
55
  echo '<div class="ws-menu-page-section ws-plugin--s2member-log-settings-section">'."\n";
56
 
57
- echo '<h3>Logging Configuration</h3>'."\n";
58
-
59
- echo '<div class="info">'."\n";
60
- echo '<p style="margin-top:0;"><span>We highly recommend that you enable logging during your initial testing phase. Logs produce lots of useful details that can help in debugging. Logs can help you find issues in your configuration and/or problems that occur during processing. Enable logging here, and then view your log files below, in the s2Member Log Viewer.</span></p>'."\n";
61
- echo '<p style="margin-bottom:0;"><span class="ws-menu-page-error">However, it is very important to disable logging once you go live. Log files may contain personally identifiable information, credit card numbers, secret API credentials, passwords and/or other sensitive information. We strongly suggest that logging be disabled on a live site (for security reasons).</span></p>'."\n";
62
  echo '</div>'."\n";
63
 
64
  echo '<div class="warning" style="margin-bottom:0;">'."\n";
54
  echo '<div class="ws-menu-page-group" title="Logging Configuration">'."\n";
55
  echo '<div class="ws-menu-page-section ws-plugin--s2member-log-settings-section">'."\n";
56
 
57
+ echo '<div class="">'."\n";
58
+ echo '<p>We highly recommend that you enable logging during your initial testing phase. Logs produce lots of useful details that can help in debugging. Logs can help you find issues in your configuration and/or problems that occur during processing. Enable logging here, and then view your log files below, in the s2Member Log Viewer.</p>'."\n";
59
+ echo '<p>However, it is recommended to disable logging once you go live. Log files may contain personally identifiable information, credit card numbers, API credentials, passwords and/or other sensitive information. We strongly suggest that logging be disabled on a live site (for security reasons) when not needed.</p>'."\n";
60
+ echo '<p>It is fine to enable logging on a live site for troubleshooting purposes. This is what the logs are meant for. Troubleshooting is not just done while building the site, they are sometimes needed after the site has been live a while and being used. Just remember to disable logging after you are done with it.</p>'."\n";
61
+ echo '<p></p>'."\n";
62
  echo '</div>'."\n";
63
 
64
  echo '<div class="warning" style="margin-bottom:0;">'."\n";
src/includes/translations/s2member.pot CHANGED
@@ -1,14 +1,14 @@
1
- # Copyright (C) 2021
2
  # This file is distributed under the same license as the package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: 210526\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/s2member\n"
7
- "POT-Creation-Date: 2021-05-25 23:49:03+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2021-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
1
+ # Copyright (C) 2022
2
  # This file is distributed under the same license as the package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: 220318\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/s2member\n"
7
+ "POT-Creation-Date: 2022-03-18 01:20:36+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2022-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
src/vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit33b208bdf6e6720d9c1548990588b9f5::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit8fe9b31b7fa2ae60e3895dff21199f00::getLoader();
src/vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit33b208bdf6e6720d9c1548990588b9f5
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit33b208bdf6e6720d9c1548990588b9f5
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit33b208bdf6e6720d9c1548990588b9f5', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit33b208bdf6e6720d9c1548990588b9f5', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInit33b208bdf6e6720d9c1548990588b9f5::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit33b208bdf6e6720d9c1548990588b9f5
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInit33b208bdf6e6720d9c1548990588b9f5::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequire33b208bdf6e6720d9c1548990588b9f5($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequire33b208bdf6e6720d9c1548990588b9f5($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit8fe9b31b7fa2ae60e3895dff21199f00
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit8fe9b31b7fa2ae60e3895dff21199f00', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit8fe9b31b7fa2ae60e3895dff21199f00', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit8fe9b31b7fa2ae60e3895dff21199f00::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
+ $includeFiles = Composer\Autoload\ComposerStaticInit8fe9b31b7fa2ae60e3895dff21199f00::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequire8fe9b31b7fa2ae60e3895dff21199f00($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequire8fe9b31b7fa2ae60e3895dff21199f00($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
src/vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit33b208bdf6e6720d9c1548990588b9f5
8
  {
9
  public static $files = array (
10
  '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php',
@@ -30,7 +30,7 @@ class ComposerStaticInit33b208bdf6e6720d9c1548990588b9f5
30
  public static function getInitializer(ClassLoader $loader)
31
  {
32
  return \Closure::bind(function () use ($loader) {
33
- $loader->classMap = ComposerStaticInit33b208bdf6e6720d9c1548990588b9f5::$classMap;
34
 
35
  }, null, ClassLoader::class);
36
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit8fe9b31b7fa2ae60e3895dff21199f00
8
  {
9
  public static $files = array (
10
  '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php',
30
  public static function getInitializer(ClassLoader $loader)
31
  {
32
  return \Closure::bind(function () use ($loader) {
33
+ $loader->classMap = ComposerStaticInit8fe9b31b7fa2ae60e3895dff21199f00::$classMap;
34
 
35
  }, null, ClassLoader::class);
36
  }