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

Version Description

= v160120 =

(Maintenance Release) Upgrade immediately.

Download this release

Release Info

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

Code changes from version 151218 to 160120

changelog.md CHANGED
@@ -1,3 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  = v151218 =
2
 
3
  - (s2Member Pro) **Reminder Email Notification Exclusions:** It is now possible to enable/disable EOT Renewal/Reminder Email notifications on a per-user basis. You can edit a user's profile in the WP Dashboard and check "_No (exclude)_" to prevent specific users from receiving any reminder emails that you configured. Props at @patdumond @luisrock. See also [this GitHub issue](https://github.com/websharks/s2member/issues/816).
1
+ = v160120 =
2
+
3
+ - (s2Member,s2Member Pro) **Bug Fix:** Resolved a minor glitch in the **WordPress Dashboard → Settings → General** panel, where s2Member's notice regarding Open Registration was inadvertently forcing the entire page into italics. Props @renzms @kristineds @raamdev ~ See also: [this GitHub issue](https://github.com/websharks/s2member/issues/831) if you'd like additional details.
4
+
5
+ - (s2Member) **Multisite Support:** This release of s2Member (the free version only) removes full support for Multisite Networks, which is now a Pro feature; i.e., only available in the Pro version.
6
+
7
+ ##### Is s2Member still compatible with WordPress Multisite Networking?
8
+ Multisite support is no longer included in the s2Member Framework. However, it is available with s2Member Pro. s2Member Pro is compatible with Multisite Networking. After you enable Multisite Networking, install the s2Member Pro Add-On. Then, navigate to `s2Member → Multisite (Config)` in the Dashboard of your Main Site. You can learn more about s2Member Pro at [s2Member.com](http://www.s2member.com/).
9
+
10
+ ##### I was using the free version in a Multisite Network before. What happened?
11
+ s2Member (when running on a Multisite Network) requires minor alterations in WordPress core that are not compatible with plugins available at WordPress.org (i.e., not allowed) at this time. For this reason, full support for Multisite Networks is now available only in the pro version.
12
+
13
+ ##### What if I already configured Multisite options on a site running the free version?
14
+ If you already customized s2Member's Multisite Network configuration options in a previous release, those settings will remain and still be functional over the short-term; i.e., the functionality that makes s2Member compatible with Multisite Networking is still included, even in the s2Member Framework. However, the routines that deal with core patches, and those that allow you to change Multisite options are no longer available. You will need to acquire the Pro version. Or, you can revert to [a previous release](http://s2member.com/release-archive/). s2Member Framework v151218 is suggested if you go that route.
15
+
16
+ _See also: [this GitHub issue](https://github.com/websharks/s2member/issues/850) for further details._
17
+
18
  = v151218 =
19
 
20
  - (s2Member Pro) **Reminder Email Notification Exclusions:** It is now possible to enable/disable EOT Renewal/Reminder Email notifications on a per-user basis. You can edit a user's profile in the WP Dashboard and check "_No (exclude)_" to prevent specific users from receiving any reminder emails that you configured. Props at @patdumond @luisrock. See also [this GitHub issue](https://github.com/websharks/s2member/issues/816).
checksum.txt CHANGED
@@ -1 +1 @@
1
- 35a15209842402cdccb9dd5222d6bd47
1
+ 11d370c25f342a327ffe729210727337
includes/classes/installation.inc.php CHANGED
@@ -124,7 +124,7 @@ if(!class_exists('c_ws_plugin__s2member_installation'))
124
  c_ws_plugin__s2member_admin_notices::enqueue_admin_notice($notice, 'blog:users.php', FALSE, FALSE, TRUE);
125
 
126
  $notice = '<strong>s2Member v'.esc_html(WS_PLUGIN__S2MEMBER_VERSION).' has been activated. Nice work!</strong><br />';
127
- $notice .= 'We suggest a review of the "Getting Started" page to familiarize yourself with s2Member terminology and basic configuration.<br />&#8627;&nbsp; Would you want to review now? &nbsp;&nbsp;&nbsp; <a href="'.esc_attr(admin_url('/admin.php?page=ws-plugin--s2member-start')).'"><strong>Yes (explain)</strong></a>';
128
 
129
  c_ws_plugin__s2member_admin_notices::enqueue_admin_notice($notice, array('blog|network:plugins.php', 'blog|network:ws-plugin--s2member-start', 'blog|network:ws-plugin--s2member-mms-ops', 'blog|network:ws-plugin--s2member-gen-ops', 'blog|network:ws-plugin--s2member-res-ops'));
130
  }
124
  c_ws_plugin__s2member_admin_notices::enqueue_admin_notice($notice, 'blog:users.php', FALSE, FALSE, TRUE);
125
 
126
  $notice = '<strong>s2Member v'.esc_html(WS_PLUGIN__S2MEMBER_VERSION).' has been activated. Nice work!</strong><br />';
127
+ $notice .= 'We suggest a review of the "Getting Started" page to familiarize yourself with s2Member terminology and basic configuration.<br />&#8627;&nbsp; Would you like to review now? &nbsp;&nbsp;&nbsp; <a href="'.esc_attr(admin_url('/admin.php?page=ws-plugin--s2member-start')).'"><strong>Yes (explain)</strong></a>';
128
 
129
  c_ws_plugin__s2member_admin_notices::enqueue_admin_notice($notice, array('blog|network:plugins.php', 'blog|network:ws-plugin--s2member-start', 'blog|network:ws-plugin--s2member-mms-ops', 'blog|network:ws-plugin--s2member-gen-ops', 'blog|network:ws-plugin--s2member-res-ops'));
130
  }
includes/classes/menu-pages.inc.php CHANGED
@@ -538,9 +538,6 @@ if(!class_exists('c_ws_plugin__s2member_menu_pages'))
538
  {
539
  do_action('ws_plugin__s2member_before_mms_ops_page', get_defined_vars());
540
 
541
- if(c_ws_plugin__s2member_menu_pages::update_all_options())
542
- c_ws_plugin__s2member_mms_patches::mms_patches(TRUE);
543
-
544
  include_once dirname(dirname(__FILE__)).'/menu-pages/mms-ops.inc.php';
545
 
546
  do_action('ws_plugin__s2member_after_mms_ops_page', get_defined_vars());
538
  {
539
  do_action('ws_plugin__s2member_before_mms_ops_page', get_defined_vars());
540
 
 
 
 
541
  include_once dirname(dirname(__FILE__)).'/menu-pages/mms-ops.inc.php';
542
 
543
  do_action('ws_plugin__s2member_after_mms_ops_page', get_defined_vars());
includes/classes/mms-patches.inc.php DELETED
@@ -1,149 +0,0 @@
1
- <?php
2
- /**
3
- * Main Multisite patches.
4
- *
5
- * Copyright: © 2009-2011
6
- * {@link http://websharks-inc.com/ WebSharks, Inc.}
7
- * (coded in the USA)
8
- *
9
- * Released under the terms of the GNU General Public License.
10
- * You should have received a copy of the GNU General Public License,
11
- * along with this software. In the main directory, see: /licensing/
12
- * If not, see: {@link http://www.gnu.org/licenses/}.
13
- *
14
- * @package s2Member\Main_Multisite_Patches
15
- * @since 3.5
16
- */
17
- if(!defined('WPINC')) // MUST have WordPress.
18
- exit("Do not access this file directly.");
19
-
20
- if (!class_exists ("c_ws_plugin__s2member_mms_patches"))
21
- {
22
- /**
23
- * Main Multisite patches.
24
- *
25
- * @package s2Member\Main_Multisite_Patches
26
- * @since 3.5
27
- */
28
- class c_ws_plugin__s2member_mms_patches
29
- {
30
- /**
31
- * Synchronizes Multisite patches with WordPress core upgrades.
32
- *
33
- * @package s2Member\Main_Multisite_Patches
34
- * @since 3.5
35
- *
36
- * @attaches-to ``add_filter("update_feedback");``
37
- *
38
- * @param string $message Expects message string passed through by the Filter.
39
- * @return string Message after having been Filtered by this routine.
40
- */
41
- public static function sync_mms_patches ($message = FALSE)
42
- {
43
- global $pagenow; // Need access to this global var.
44
-
45
- foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
46
- do_action("ws_plugin__s2member_before_sync_mms_patches", get_defined_vars ());
47
- unset($__refs, $__v);
48
-
49
- if (is_multisite () && is_network_admin () && $pagenow === "update-core.php")
50
- if ($message === "Upgrading database&#8230;" && c_ws_plugin__s2member_mms_patches::mms_patches ())
51
- apply_filters("update_feedback", "s2 Multisite patches applied&#8230;");
52
-
53
- return apply_filters("ws_plugin__s2member_sync_mms_patches", $message, get_defined_vars ());
54
- }
55
- /**
56
- * Handles patches on a Multisite Network installation.
57
- *
58
- * @package s2Member\Main_Multisite_Patches
59
- * @since 3.5
60
- *
61
- * @param bool $display_notices Defaults to false. If true, notices are displayed.
62
- * @return bool True if Multisite patches were processed, else false.
63
- */
64
- public static function mms_patches ($display_notices = FALSE)
65
- {
66
- foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
67
- do_action("ws_plugin__s2member_before_mms_patches", get_defined_vars ());
68
- unset($__refs, $__v);
69
-
70
- if (is_multisite () && is_admin () && is_main_site () && $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["configured"])
71
- if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_auto_patch"] && (!defined ("DISALLOW_FILE_MODS") || !DISALLOW_FILE_MODS))
72
- {
73
- do_action("ws_plugin__s2member_during_mms_patches_before", get_defined_vars ());
74
-
75
- $wp_login_file = ABSPATH . "wp-login.php"; // This works for WordPress 3.0, 3.1, all the way up to 3.7. WordPress 3.1+ uses: `site_url('wp-signup.php')`. WordPress 3.5+ uses: `network_site_url('wp-signup.php')`. WordPress v3.7 uses `$sign_up_url`.
76
- $wp_login_section = "/(\s+)(wp_redirect( *?)\(( *?)apply_filters( *?)\(( *?)['\"]wp_signup_location['\"]( *?),( *?)(site_url( *?)\(( *?)['\"]wp-signup\.php['\"]( *?)\)|network_site_url( *?)\(( *?)['\"]wp-signup\.php['\"]( *?)\)|get_bloginfo( *?)\(['\"]wpurl['\"]\)( *?)\.( *?)['\"]\/wp-signup\.php['\"]|\\\$sign_?up_url)( *?)\)( *?)\)( *?);)(\s+)(exit( *?);)/";
77
- $wp_login_replace = "\n\t\t// Modified for full plugin compatiblity.\n\t\t//wp_redirect( apply_filters( 'wp_signup_location', \$sign_up_url ) );\n\t\t//exit;";
78
-
79
- if (file_exists ($wp_login_file) && ($wp_login = file_get_contents ($wp_login_file)) && is_writable ($wp_login_file))
80
- {
81
- if ((($wp_login_written = file_put_contents ($wp_login_file, preg_replace ($wp_login_section, $wp_login_replace, $wp_login, 1, $wp_login_patched))) && $wp_login_patched) || ($wp_login_patched_already = $wp_login_patched = strpos ($wp_login, $wp_login_replace)))
82
- ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-login.php</code> file ' . (!empty($wp_login_patched_already) ? 'is patched' : 'has been patched successfully') . '.') : null;
83
- else if (!$wp_login_written) // Otherwise, we need to report that /wp-login.php could NOT be updated. Possibly a permissions error.
84
- ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-login.php</code> file could NOT be patched. Patch NOT written.', true) : null;
85
- else if (!$wp_login_patched) // Otherwise, we need to report that /wp-login.php could NOT be updated. Wrong WordPress version?
86
- ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-login.php</code> file could NOT be patched. Unverifiable.', true) : null;
87
- }
88
- else // Otherwise, we need to report that /wp-login.php could NOT be updated. Possibly a permissions error.
89
- ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-login.php</code> file could NOT be patched. File NOT writable.', true) : null;
90
-
91
- $load_file = ABSPATH . WPINC . "/load.php"; // WordPress v4.4 uses `wp_installing()` instead of `defined( 'WP_INSTALLING' )`
92
- $load_section = "/([\r\n\t\s ]+)(if( *?)\(( *?)empty( *?)\(( *?)\\\$active_plugins( *?)\)( *?)\|\|( *?)(wp_installing\s*\(\s*\)|defined( *?)\(( *?)['\"]WP_INSTALLING['\"]( *?)\))( *?)\))/";
93
- $load_replace = "\n\n\t// Modified for full plugin compatiblity.\n\t//if ( empty( \$active_plugins ) || wp_installing() )\n\tif ( empty( \$active_plugins ) || ( wp_installing() && !preg_match(\"/\/wp-activate\.php/\", \$_SERVER[\"REQUEST_URI\"]) ) )";
94
-
95
- if (file_exists ($load_file) && ($load = file_get_contents ($load_file)) && is_writable ($load_file))
96
- {
97
- if ((($load_written = file_put_contents ($load_file, preg_replace ($load_section, $load_replace, $load, 1, $load_patched))) && $load_patched) || ($load_patched_already = $load_patched = strpos ($load, $load_replace)))
98
- ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-includes/load.php</code> file ' . (!empty($load_patched_already) ? 'is patched' : 'has been patched successfully') . '.') : null;
99
- else if (!$load_written) // Otherwise, we need to report that /wp-includes/load.php could NOT be updated. Possibly a permissions error.
100
- ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-includes/load.php</code> file could NOT be patched. Patch NOT written.', true) : null;
101
- else if (!$load_patched) // Otherwise, we need to report that /wp-includes/load.php could NOT be updated. Wrong WordPress version?
102
- ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-includes/load.php</code> file could NOT be patched. Unverifiable.', true) : null;
103
- }
104
- else // Otherwise, we need to report that /wp-includes/load.php could NOT be updated. Possibly a permissions error.
105
- ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-includes/load.php</code> file could NOT be patched. File NOT writable.', true) : null;
106
-
107
- $user_new_file = ABSPATH . "wp-admin/user-new.php";
108
- $user_new_section = "/([\r\n\t\s ]+)(wpmu_signup_user( *?)\(( *?)\\\$new_user_login,( *?)(?:\\\$new_user_email|\\\$_REQUEST\[( *?)'email'( *?)\]),( *?)array( *?)\(( *?)'add_to_blog'( *?)\=\>( *?)\\\$wpdb->blogid,( *?)'new_role'( *?)\=\>( *?)\\\$_REQUEST\[( *?)'role'( *?)\]( *?)\)( *?)\);)/";
109
- $user_new_replace = "\n\t\t\t// Modified for full plugin compatiblity.\n\t\t\t//wpmu_signup_user( \$new_user_login, \$_REQUEST[ 'email' ], array( 'add_to_blog' => \$wpdb->blogid, 'new_role' => \$_REQUEST[ 'role' ] ) );\n\t\t\twpmu_signup_user( \$new_user_login, \$_REQUEST[ 'email' ], apply_filters( 'add_signup_meta', array( 'add_to_blog' => \$wpdb->blogid, 'new_role' => \$_REQUEST[ 'role' ] ) ) );";
110
-
111
- if (file_exists ($user_new_file) && ($user_new = file_get_contents ($user_new_file)) && is_writable ($user_new_file))
112
- {
113
- if ((($user_new_written = file_put_contents ($user_new_file, preg_replace ($user_new_section, $user_new_replace, $user_new, 1, $user_new_patched))) && $user_new_patched) || ($user_new_patched_already = $user_new_patched = strpos ($user_new, $user_new_replace)))
114
- ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-admin/user-new.php</code> file ' . (!empty($user_new_patched_already) ? 'is patched' : 'has been patched successfully') . '.') : null;
115
- else if (!$user_new_written) // Otherwise, we need to report that /wp-admin/user-new.php could NOT be updated. Possibly a permissions error.
116
- ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-admin/user-new.php</code> file could NOT be patched. Patch NOT written.', true) : null;
117
- else if (!$user_new_patched) // Otherwise, we need to report that /wp-admin/user-new.php could NOT be updated. Wrong WordPress version?
118
- ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-admin/user-new.php</code> file could NOT be patched. Unverifiable.', true) : null;
119
- }
120
- else // Otherwise, we need to report that /wp-admin/user-new.php could NOT be updated. Possibly a permissions error.
121
- ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-admin/user-new.php</code> file could NOT be patched. File NOT writable.', true) : null;
122
-
123
- $ms_functions_file = ABSPATH . "wp-includes/ms-functions.php";
124
- $ms_functions_section = "/([\r\n\t\s ]+)(return new WP_Error( *?)\(( *?)'user_already_exists'( *?),( *?)__( *?)\(( *?)'That username is already activated.'( *?)\),( *?)\\\$signup( *?)\);)/";
125
- $ms_functions_replace = "\n\t\t\t// Modified for full plugin compatiblity.\n\t\t\t//return new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), \$signup);\n\t\t\treturn apply_filters('_wpmu_activate_existing_error_', new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), \$signup), get_defined_vars());";
126
-
127
- if (file_exists ($ms_functions_file) && ($ms_functions = file_get_contents ($ms_functions_file)) && is_writable ($ms_functions_file))
128
- {
129
- if ((($ms_functions_written = file_put_contents ($ms_functions_file, preg_replace ($ms_functions_section, $ms_functions_replace, $ms_functions, 1, $ms_functions_patched))) && $ms_functions_patched) || ($ms_functions_patched_already = $ms_functions_patched = strpos ($ms_functions, $ms_functions_replace)))
130
- ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-includes/ms-functions.php</code> file ' . (!empty($ms_functions_patched_already) ? 'is patched' : 'has been patched successfully') . '.') : null;
131
- else if (!$ms_functions_written) // Otherwise, we need to report that /wp-includes/ms-functions.php could NOT be updated. Possibly a permissions error.
132
- ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-includes/ms-functions.php</code> file could NOT be patched. Patch NOT written.', true) : null;
133
- else if (!$ms_functions_patched) // Otherwise, we need to report that /wp-includes/ms-functions.php could NOT be updated. Wrong WordPress version?
134
- ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-includes/ms-functions.php</code> file could NOT be patched. Unverifiable.', true) : null;
135
- }
136
- else // Otherwise, we need to report that /wp-includes/ms-functions.php could NOT be updated. Possibly a permissions error.
137
- ($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-includes/ms-functions.php</code> file could NOT be patched. File NOT writable.', true) : null;
138
-
139
- $ran_mms_patches = true; // Flag indicating this routine was indeed processed.
140
-
141
- do_action("ws_plugin__s2member_during_mms_patches_after", get_defined_vars ());
142
- }
143
-
144
- do_action("ws_plugin__s2member_after_mms_patches", get_defined_vars ());
145
-
146
- return !empty($ran_mms_patches) ? $ran_mms_patches : false;
147
- }
148
- }
149
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/classes/op-notices.inc.php CHANGED
@@ -45,7 +45,7 @@ if (!class_exists ("c_ws_plugin__s2member_op_notices"))
45
 
46
  if (is_blog_admin () && $pagenow === "options-general.php" && !isset ($_GET["page"]) && !is_multisite ()) // Multisite does NOT provide these options.
47
  {
48
- $notice = "<em>* Note: The s2Member plugin has control over two options on this page.<br /><code>Anyone Can Register = " . esc_html (get_option ("users_can_register")) . "</code>, and <code>New User Default Role = " . esc_html (get_option ("default_role")) . "</code>.<br />For further details, see: <strong>s2Member → General Options → Open Registration</strong>.";
49
 
50
  $js = '<script type="text/javascript">';
51
  $js .= "jQuery(document).ready(function(\$){ \$('input#users_can_register, select#default_role').attr('disabled', 'disabled'); });";
@@ -78,7 +78,7 @@ if (!class_exists ("c_ws_plugin__s2member_op_notices"))
78
 
79
  if (is_multisite () && is_network_admin () && in_array($pagenow, array("settings.php")) && !isset ($_GET["page"]))
80
  {
81
- $notice = "<em>* Note: The s2Member plugin has control over two options on this page.<br /><code>Allow Open Registration = " . esc_html (get_site_option ("registration")) . "</code> and <code>Add New Users = " . esc_html (get_site_option ("add_new_users")) . "</code>.<br />Please check: <strong>s2Member → Multisite (Config)</strong>.";
82
 
83
  $js = '<script type="text/javascript">';
84
  $js .= "jQuery(document).ready(function(\$){ \$('input[name=registration], input#add_new_users').attr('disabled', 'disabled'); });";
45
 
46
  if (is_blog_admin () && $pagenow === "options-general.php" && !isset ($_GET["page"]) && !is_multisite ()) // Multisite does NOT provide these options.
47
  {
48
+ $notice = "<em>* Note: The s2Member plugin has control over two options on this page.<br /><code>Anyone Can Register = " . esc_html (get_option ("users_can_register")) . "</code>, and <code>New User Default Role = " . esc_html (get_option ("default_role")) . "</code>.<br />For further details, see: <strong>s2Member → General Options → Open Registration</strong>.</em>";
49
 
50
  $js = '<script type="text/javascript">';
51
  $js .= "jQuery(document).ready(function(\$){ \$('input#users_can_register, select#default_role').attr('disabled', 'disabled'); });";
78
 
79
  if (is_multisite () && is_network_admin () && in_array($pagenow, array("settings.php")) && !isset ($_GET["page"]))
80
  {
81
+ $notice = "<em>* Note: The s2Member plugin has control over two options on this page.<br /><code>Allow Open Registration = " . esc_html (get_site_option ("registration")) . "</code> and <code>Add New Users = " . esc_html (get_site_option ("add_new_users")) . "</code>.<br />Please check: <strong>s2Member → Multisite (Config)</strong>.</em>";
82
 
83
  $js = '<script type="text/javascript">';
84
  $js .= "jQuery(document).ready(function(\$){ \$('input[name=registration], input#add_new_users').attr('disabled', 'disabled'); });";
includes/hooks.inc.php CHANGED
@@ -156,7 +156,6 @@ add_action('network_admin_menu', 'c_ws_plugin__s2member_menu_pages::add_network_
156
  add_action('admin_bar_menu', 'c_ws_plugin__s2member_admin_lockouts::filter_admin_menu_bar', 100);
157
  add_action('admin_print_scripts', 'c_ws_plugin__s2member_menu_pages::add_admin_scripts');
158
  add_action('admin_print_styles', 'c_ws_plugin__s2member_menu_pages::add_admin_styles');
159
- add_filter('update_feedback', 'c_ws_plugin__s2member_mms_patches::sync_mms_patches');
160
 
161
  add_action('admin_notices', 'c_ws_plugin__s2member_admin_notices::admin_notices');
162
  add_action('user_admin_notices', 'c_ws_plugin__s2member_admin_notices::admin_notices');
156
  add_action('admin_bar_menu', 'c_ws_plugin__s2member_admin_lockouts::filter_admin_menu_bar', 100);
157
  add_action('admin_print_scripts', 'c_ws_plugin__s2member_menu_pages::add_admin_scripts');
158
  add_action('admin_print_styles', 'c_ws_plugin__s2member_menu_pages::add_admin_styles');
 
159
 
160
  add_action('admin_notices', 'c_ws_plugin__s2member_admin_notices::admin_notices');
161
  add_action('user_admin_notices', 'c_ws_plugin__s2member_admin_notices::admin_notices');
includes/menu-pages/code-samples/mms-patch-load.x-php DELETED
@@ -1,4 +0,0 @@
1
- // Modified for full plugin compatiblity.
2
- //if ( empty( $active_plugins ) || wp_installing() )
3
- if ( empty( $active_plugins ) || ( wp_installing() && !preg_match("/\/wp-activate\.php/", $_SERVER["REQUEST_URI"]) ) )
4
- return $plugins;
 
 
 
 
includes/menu-pages/code-samples/mms-patch-ms-functions.x-php DELETED
@@ -1,3 +0,0 @@
1
- // Modified for full plugin compatiblity.
2
- //return new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup);
3
- return apply_filters('_wpmu_activate_existing_error_', new WP_Error( 'user_already_exists', __( 'That username is already activated.' ), $signup), get_defined_vars());
 
 
 
includes/menu-pages/code-samples/mms-patch-user-new.x-php DELETED
@@ -1,3 +0,0 @@
1
- // Modified for full plugin compatiblity.
2
- //wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) );
3
- wpmu_signup_user( $new_user_login, $_REQUEST[ 'email' ], apply_filters( 'add_signup_meta', array( 'add_to_blog' => $wpdb->blogid, 'new_role' => $_REQUEST[ 'role' ] ) ) );
 
 
 
includes/menu-pages/code-samples/mms-patch-wp-login.x-php DELETED
@@ -1,8 +0,0 @@
1
- case 'register' :
2
- if ( is_multisite() ) {
3
- $sign_up_url = network_site_url( 'wp-signup.php' );
4
- // Multisite uses wp-signup.php
5
- // Modified for full plugin compatiblity.
6
- //wp_redirect( apply_filters( 'wp_signup_location', $sign_up_url ) );
7
- //exit;
8
- }
 
 
 
 
 
 
 
 
includes/menu-pages/mms-ops.inc.php CHANGED
@@ -29,6 +29,10 @@ if(!class_exists("c_ws_plugin__s2member_menu_page_mms_ops"))
29
  {
30
  public function __construct()
31
  {
 
 
 
 
32
  echo '<div class="wrap ws-menu-page">'."\n";
33
 
34
  echo '<div class="ws-menu-page-toolbox">'."\n";
@@ -42,265 +46,25 @@ if(!class_exists("c_ws_plugin__s2member_menu_page_mms_ops"))
42
  echo '<tr class="ws-menu-page-table-tr">'."\n";
43
  echo '<td class="ws-menu-page-table-l">'."\n";
44
 
45
- if(is_multisite() && is_main_site()) // These panels will ONLY be available on the Main Site; with Multisite Networking.
46
  {
47
- echo '<form method="post" name="ws_plugin__s2member_options_form" id="ws-plugin--s2member-options-form" autocomplete="off">'."\n";
48
- echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="'.esc_attr(wp_create_nonce("ws-plugin--s2member-options-save")).'" />'."\n";
49
- echo '<input type="hidden" name="ws_plugin__s2member_configured" id="ws-plugin--s2member-configured" value="1" />'."\n";
50
-
51
- do_action("ws_plugin__s2member_during_mms_ops_page_before_left_sections", get_defined_vars());
52
-
53
- if(apply_filters("ws_plugin__s2member_during_mms_ops_page_during_left_sections_display_mms_patches", true, get_defined_vars()))
54
- {
55
- do_action("ws_plugin__s2member_during_mms_ops_page_during_left_sections_before_mms_patches", get_defined_vars());
56
-
57
- echo '<div class="ws-menu-page-group" title="Multisite WordPress Patches" default-state="open">'."\n";
58
-
59
- echo '<div class="ws-menu-page-section ws-plugin--s2member-mms-patches-section">'."\n";
60
- echo '<img src="'.esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]).'/images/small-icon.png" title="s2Member (a Membership management system for WordPress)" alt="" style="float:right; margin:0 0 0 25px; border:0;" />'."\n";
61
- echo '<h3>Multisite WordPress Patches (required for compatiblity)</h3>'."\n";
62
- echo '<p>In order for s2Member to function properly in a Multisite environment, you MUST implement four patches. One goes into your <code>/wp-login.php</code> file, one into <code>/wp-includes/load.php</code>, one into <code>/wp-includes/ms-functions.php</code>, and another into <code>/wp-admin/user-new.php</code>. Please use the automatic patcher below. All you do is check the box &amp; click Save.</p>'."\n";
63
- do_action("ws_plugin__s2member_during_mms_ops_page_during_left_sections_during_mms_patches", get_defined_vars());
64
-
65
- echo '<table class="form-table">'."\n";
66
- echo '<tbody>'."\n";
67
- echo '<tr>'."\n";
68
-
69
- echo '<th>'."\n";
70
- echo '<label for="ws-plugin--s2member-mms-auto-patch">'."\n";
71
- echo 'Patch Automatically? (the easiest way)'."\n";
72
- echo '</label>'."\n";
73
- echo '</th>'."\n";
74
-
75
- echo '</tr>'."\n";
76
- echo '<tr>'."\n";
77
-
78
- echo '<td>'."\n";
79
-
80
- if(defined("DISALLOW_FILE_MODS") && DISALLOW_FILE_MODS)
81
- {
82
- echo '<select name="ws_plugin__s2member_mms_auto_patch" id="ws-plugin--s2member-mms-auto-patch" disabled="disabled">'."\n";
83
- echo '<option value="0" selected="selected">No (I\'ll patch WordPress myself)</option>'."\n";
84
- echo '</select><br />'."\n";
85
- echo '<em class="ws-menu-page-hilite">This is now locked. Your <code>/wp-config.php</code> file says: <code>DISALLOW_FILE_MODS = true</code></em>.'."\n";
86
- }
87
- else // Otherwise we can display these options.
88
- {
89
- echo '<select name="ws_plugin__s2member_mms_auto_patch" id="ws-plugin--s2member-mms-auto-patch">'."\n";
90
- echo '<option value="1"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_auto_patch"]) ? ' selected="selected"' : '').'>Yes (automatically patch WordPress)</option>'."\n";
91
- echo '<option value="0"'.((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_auto_patch"]) ? ' selected="selected"' : '').'>No (I\'ll patch WordPress myself)</option>'."\n";
92
- echo '</select><br />'."\n";
93
- echo '<em class="ws-menu-page-hilite">These files MUST be patched, each time you upgrade the WordPress core. If you set this option to <code>Yes (Patch Automatically)</code>, s2Member will patch your installation now, and also in the future, should you upgrade to newer version. That way, you won\'t need to patch manually each time WordPress is upgraded.</em>'."\n";
94
- }
95
-
96
- echo '</td>'."\n";
97
-
98
- echo '</tr>'."\n";
99
- echo '</tbody>'."\n";
100
- echo '</table>'."\n";
101
-
102
- echo '<div class="ws-menu-page-hr"></div>'."\n";
103
-
104
- echo '<div id="ws-plugin--s2member-mms-patches-details-wrapper">'."\n";
105
- echo '<h3>Rather Do It Yourself? (<a href="#" onclick="jQuery(\'div#ws-plugin--s2member-mms-patches-details\').toggle(); return false;" class="ws-dotted-link">manual instructions</a>)</h3>'."\n";
106
- echo '<div id="ws-plugin--s2member-mms-patches-details" style="display:none;">'."\n";
107
- echo '<p><strong>Patch #1</strong> ( /wp-login.php )</p>'."\n";
108
- echo '<p>'.c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/mms-patch-wp-login.x-php")).'</p>'."\n";
109
- echo '<p><strong>Patch #2</strong> ( /wp-includes/load.php )</p>'."\n";
110
- echo '<p>'.c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/mms-patch-load.x-php")).'</p>'."\n";
111
- echo '<p><strong>Patch #3</strong> ( /wp-admin/user-new.php )</p>'."\n";
112
- echo '<p>'.c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/mms-patch-user-new.x-php")).'</p>'."\n";
113
- echo '<p><strong>Patch #4</strong> ( /wp-includes/ms-functions.php )</p>'."\n";
114
- echo '<p>'.c_ws_plugin__s2member_utils_strings::highlight_php(file_get_contents(dirname(__FILE__)."/code-samples/mms-patch-ms-functions.x-php")).'</p>'."\n";
115
- echo '<p><em class="ws-menu-page-hilite">Don\'t forget to patch these files again, each time you upgrade the WordPress core.</em></p>'."\n";
116
- echo '</div>'."\n";
117
- echo '</div>'."\n";
118
- echo '</div>'."\n";
119
-
120
- echo '</div>'."\n";
121
-
122
- do_action("ws_plugin__s2member_during_mms_ops_page_during_left_sections_after_mms_patches", get_defined_vars());
123
- }
124
 
125
- if(apply_filters("ws_plugin__s2member_during_mms_ops_page_during_left_sections_display_mms_registration", true, get_defined_vars()))
126
  {
127
- do_action("ws_plugin__s2member_during_mms_ops_page_during_left_sections_before_mms_registration", get_defined_vars());
128
-
129
- echo '<div class="ws-menu-page-group" title="Multisite Registration Configuration" default-state="open">'."\n";
130
-
131
- echo '<div class="ws-menu-page-section ws-plugin--s2member-mms-registration-section">'."\n";
132
- echo '<img src="'.esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]).'/images/large-icon.png" title="s2Member (a Membership management system for WordPress)" alt="" style="float:right; margin:0 0 0 25px; border:0;" />'."\n";
133
- echo '<h3>Multisite Registration (Main Site Configuration)</h3>'."\n";
134
- echo '<p>s2Member supports Free Subscribers <em>(at Level #0)</em>, and several Primary Roles created by the s2Member plugin (<em> i.e., s2Member Levels 1-4, or up to the number of configured Levels )</em>. If you want your visitors to be capable of registering absolutely free, you will want to "allow" Open Registration. Whenever a visitor registers without paying, they\'ll automatically become a Free Subscriber, at Level #0.</p>'."\n";
135
- echo '<p><strong>Running A Multisite Blog Farm?</strong> With Multisite Networking enabled, your Main Site could ALSO offer a Customer access to create a Blog of their own <em>(optional)</em>, where a Customer becomes a "Member" of your Main Site, and also a Blog Owner/Administrator of at least one other Blog on your Network. With s2Member installed <em>(Network wide)</em>, each of your Blog Owners could offer Membership too, using a single copy of the s2Member plugin, which is a great selling point<em>!</em> We refer to this type of installation as a Multisite Blog Farm.</p>'."\n";
136
- echo '<p>Multisite Networking makes a new Registration Form available <em>(driven by your theme)</em>; which we refer to as: <code>/wp-signup.php</code>. If, and only if, you\'re planning to offer Blogs, you MUST use <a href="'.esc_attr(c_ws_plugin__s2member_utils_urls::wp_signup_url()).'" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Multisite Registration Form.\\n* s2Member makes this form available to logged-in Super Administrators, at all times (for testing purposes), regardless of configuration.'.((c_ws_plugin__s2member_utils_conds::bp_is_installed()) ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( '.c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()).' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '').'\');">/wp-signup.php</a>, instead of using the Standard Login/Registration Form. In a Multisite installation, we refer to the Standard Login/Registration Form, as: <a href="'.esc_attr(c_ws_plugin__s2member_utils_urls::wp_register_url()).'" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Standard Registration Form.\\n* s2Member makes this form available to logged-in Administrators, at all times (for testing purposes), regardless of configuration.'.((c_ws_plugin__s2member_utils_conds::bp_is_installed()) ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( '.c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()).' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '').'\');">/wp-login.php?action=register</a>. If you\'re planning to offer Membership Access only, and NOT Blogs, you can simply use the <a href="'.esc_attr(c_ws_plugin__s2member_utils_urls::wp_register_url()).'" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Standard Registration Form.\\n* s2Member makes this form available to logged-in Administrators, at all times (for testing purposes), regardless of configuration.'.((c_ws_plugin__s2member_utils_conds::bp_is_installed()) ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( '.c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()).' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '').'\');">Standard Login/Registration Form</a>, which is easily customized through <strong>s2Member → General Options → Login/Registration Design</strong>.</p>'."\n";
137
- echo '<p>In either case, s2Member Pro-Forms are possible too. If you\'ve purchased s2Member Pro, you could use Pro-Forms instead of these WordPress defaults. That being said, even with s2Member Pro-Forms, if you are offering Blogs, you will still need to facilitate the actual creation of each Blog through <code>/wp-signup.php</code>. In other words, Customers can register through s2Member Pro-Forms, and even checkout. But when it comes time to setup a new Blog, you will need to redirect your Customer to <code>/wp-signup.php</code>, while they are logged-in. This will allow them to create a new Blog on your Network. That is, if they are allowed to <em>(based on your configuration below)</em>.</p>'."\n";
138
- echo (c_ws_plugin__s2member_utils_conds::bp_is_installed()) ? '<p><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form, powered by your theme.<br />(BuddyPress can handle both Membership and Blog creation in its integration)<br />(<a href="'.esc_attr(c_ws_plugin__s2member_utils_urls::bp_register_url()).'" target="_blank" rel="external" onclick="alert(\'s2Member will now open your BuddyPress Registration Form.\\n* However, you will probably be redirected away from this BuddyPress Registration Form ( '.c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()).' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.\');">'.esc_html(c_ws_plugin__s2member_utils_urls::bp_register_url()).'</a>)</em></p>'."\n" : '';
139
- do_action("ws_plugin__s2member_during_mms_ops_page_during_left_sections_during_mms_registration", get_defined_vars());
140
-
141
- echo '<div id="ws-plugin--s2member-mms-registration-support-package-details-wrapper">'."\n";
142
- echo '<h4 style="margin-bottom:0;">Running a Multisite Blog Farm? (<a href="#" onclick="jQuery(\'div#ws-plugin--s2member-mms-registration-support-package-details\').toggle(); return false;" class="ws-dotted-link">click here / please read</a>)</h4>'."\n";
143
- echo '<div id="ws-plugin--s2member-mms-registration-support-package-details" style="display:none;">'."\n";
144
- echo '<p>The most important thing to do when setting up a Blog Farm with s2Member, is to add this line to your <code>/wp-config.php</code> file: <code><span style="color:#0000BB;">define</span><span style="color:#007700;">(</span><span style="color:#DD0000;">"MULTISITE_FARM"</span>, <span style="color:#0000BB;">true</span><span style="color:#007700;">);</span></code>. This will add a default layer of security, to all Blogs within your Network, with respect to s2Member. <strong>But, before you go live</strong>, please contact <a href="'.esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Pro Add-on / Prices")).'" target="_blank" rel="external">s2Member.com</a> for full documentation. There is some additional functionality that can be enabled for security on a Blog Farm installation; and also some menus/documentation/functionality that can be disabled. You will be asked to purchase our <a href="'.esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Pro Add-on / Prices")).'" target="_blank" rel="external">Network Support Package</a> when you need assistance in this regard.</p>'."\n";
145
- echo '<p>Multisite Blog Farms require a site owner that fully understands the potential security risks associated with Blog Farming. s2Member\'s <a href="'.esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Pro Add-on / Prices")).'" target="_blank" rel="external">Network Support Package</a> provides you with the information you need, and priority support for anything about s2Member that you don\'t understand. In addition, our Network Support Package includes a lengthy PDF file that details a list of things affected by <code><span style="color:#0000BB;">define</span><span style="color:#007700;">(</span><span style="color:#DD0000;">"MULTISITE_FARM"</span>, <span style="color:#0000BB;">true</span><span style="color:#007700;">);</span></code>, best practices, and other supplemental documentation focused on Blog Farms.</p>'."\n";
146
- echo '<p><em><strong>Definition of a Multisite Blog Farm:</strong> If your Network is making it possible for "Members" of your Main Site, to create and/or manage Blogs (in any way), s2Member will consider your installation to be a Multisite Blog Farm. That being said, some site owners run a Multisite Network for the purpose of maintaining their own sites. The term Multisite Blog Farm does NOT apply to a Network that hosts multiple Child Blogs, all of which are operated by a single site owner and/or a single company. Again, a Multisite Blog Farm (in the eyes of s2Member), is any Network that is making it possible for "Members" of its Main Site, to create and/or manage Blogs; where one or more of these Child Blogs is being administered by a Customer (i.e., if you offer both Membership and Blog creation, as configured below).</em></p>'."\n";
147
- echo '<p><em><strong>When NOT to run a Multisite Blog Farm:</strong> If you run a Multisite Network for the purpose of maintaining your own sites. You should NOT run a Multisite Blog Farm. You can still activate s2Member Network-wide, if you like (optional), but the advanced security considerations offered through s2Member\'s Multisite Blog Farm functionality are NOT needed in this case; because all of the Child Blogs in your Network belong to trusted Administrators (i.e., your Customers are NOT going to run Child Blogs on your Network in this case).</em></p>'."\n";
148
- echo '</div>'."\n";
149
- echo '</div>'."\n";
150
-
151
  echo '<div class="ws-menu-page-hr"></div>'."\n";
152
 
153
- echo '<table class="form-table">'."\n";
154
- echo '<tbody>'."\n";
155
- echo '<tr>'."\n";
156
-
157
- echo '<th>'."\n";
158
- echo '<label for="ws-plugin--s2member-mms-registration-file">'."\n";
159
- echo 'What Do You Plan To Offer? (please choose one)'."\n";
160
- echo '</label>'."\n";
161
- echo '</th>'."\n";
162
-
163
- echo '</tr>'."\n";
164
- echo '<tr>'."\n";
165
-
166
- echo '<td>'."\n";
167
-
168
- if(defined("MULTISITE_FARM") && MULTISITE_FARM) // Lock this down if a config option is set in /wp-config.php.
169
- {
170
- echo '<select name="ws_plugin__s2member_mms_registration_file" id="ws-plugin--s2member-mms-registration-file" disabled="disabled">'."\n";
171
- echo '<option value="wp-signup" selected="selected">Blog Farm (I plan to offer both Membership &amp; Blog creation)</option>'."\n";
172
- echo '</select><br />'."\n";
173
- echo '<em class="ws-menu-page-hilite">This is now locked. Your <code>/wp-config.php</code> file says: <code>MULTISITE_FARM = true</code></em>.'."\n";
174
- }
175
- else // Otherwise we can display these options normally.
176
- {
177
- echo '<select name="ws_plugin__s2member_mms_registration_file" id="ws-plugin--s2member-mms-registration-file">'."\n";
178
- echo '<option value="wp-login"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_file"] === "wp-login") ? ' selected="selected"' : '').'>Membership Only (I\'m NOT offering Blogs)</option>'."\n";
179
- echo '<option value="wp-signup"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_file"] === "wp-signup") ? ' selected="selected"' : '').'>Blog Farm (I plan to offer both Membership &amp; Blog creation)</option>'."\n";
180
- echo '</select><br />'."\n";
181
- echo 'Depending on your selection, the options below may change.'."\n";
182
- }
183
-
184
- echo '</td>'."\n";
185
-
186
- echo '</tr>'."\n";
187
- echo '</tbody>'."\n";
188
- echo '</table>'."\n";
189
-
190
- echo '<div class="ws-menu-page-hr"></div>'."\n";
191
-
192
- echo '<table class="form-table ws-plugin--s2member-mms-registration-wp-login" style="margin:0;">'."\n";
193
- echo '<tbody>'."\n";
194
- echo '<tr>'."\n";
195
-
196
- echo '<th style="padding-top:0;">'."\n";
197
- echo '<label for="ws-plugin--s2member-allow-subscribers-in">'."\n";
198
- echo 'Your Main Site / Allow Open Registration? (via <code>wp-login.php?action=register</code>)'."\n";
199
- echo '</label>'."\n";
200
- echo '</th>'."\n";
201
-
202
- echo '</tr>'."\n";
203
- echo '<tr>'."\n";
204
-
205
- echo '<td>'."\n";
206
- echo '<select name="ws_plugin__s2member_allow_subscribers_in" id="ws-plugin--s2member-allow-subscribers-in">'."\n";
207
- echo '<option value="0"'.((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["allow_subscribers_in"]) ? ' selected="selected"' : '').'>No (do NOT allow Open Registration)</option>'."\n";
208
- echo '<option value="1"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["allow_subscribers_in"]) ? ' selected="selected"' : '').'>Yes (allow Open Registration; Free Subscribers at Level #0)</option>'."\n";
209
- echo '</select><br />'."\n";
210
- echo 'If you set this to <code>Yes</code>, you\'re unlocking <a href="'.esc_attr(c_ws_plugin__s2member_utils_urls::wp_register_url()).'" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Standard Registration Form.\\n* s2Member makes this form available to logged-in Administrators, at all times (for testing purposes), regardless of configuration.'.((c_ws_plugin__s2member_utils_conds::bp_is_installed()) ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( '.c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()).' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '').'\');">wp-login.php?action=register</a> (on your Main Site). When a visitor registers without paying, they\'ll automatically become a Free Subscriber, at Level #0. The s2Member software reserves Level #0; to be used ONLY for Free Subscribers. All other Membership Levels [1-4] require payment.'."\n";
211
- echo '</td>'."\n";
212
-
213
- echo '</tr>'."\n";
214
- echo '</tbody>'."\n";
215
- echo '</table>'."\n";
216
-
217
- echo '<table class="form-table ws-plugin--s2member-mms-registration-wp-signup" style="margin:0;">'."\n";
218
- echo '<tbody>'."\n";
219
- echo '<tr>'."\n";
220
-
221
- echo '<th style="padding-top:0;">'."\n";
222
- echo '<label for="ws-plugin--s2member-mms-registration-grants">'."\n";
223
- echo 'Your Main Site / Allow Open Registration? (via <code>wp-signup.php</code>)'."\n";
224
- echo '</label>'."\n";
225
- echo '</th>'."\n";
226
-
227
- echo '</tr>'."\n";
228
- echo '<tr>'."\n";
229
-
230
- echo '<td style="padding-bottom:0;">'."\n";
231
- echo '<select name="ws_plugin__s2member_mms_registration_grants" id="ws-plugin--s2member-mms-registration-grants">'."\n";
232
- echo '<option value="none"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_grants"] === "none") ? ' selected="selected"' : '').'>No (do NOT allow Open Registration)</option>'."\n";
233
- echo '<option value="user"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_grants"] === "user") ? ' selected="selected"' : '').'>Yes (allow Open Registration; Free Subscribers at Level #0)</option>'."\n";
234
- echo '<option value="all"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_grants"] === "all") ? ' selected="selected"' : '').'>Yes (allow Open Registration; Free Subscribers, with a free Blog too)</option>'."\n";
235
- echo '</select><br />'."\n";
236
- echo 'If you set this to <code>Yes</code>, you\'re unlocking <a href="'.esc_attr(c_ws_plugin__s2member_utils_urls::wp_signup_url()).'" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Multisite Registration Form.\\n* s2Member makes this form available to logged-in Super Administrators, at all times (for testing purposes), regardless of configuration.'.((c_ws_plugin__s2member_utils_conds::bp_is_installed()) ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( '.c_ws_plugin__s2member_utils_strings::esc_js_sq(c_ws_plugin__s2member_utils_urls::bp_register_url()).' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '').'\');">wp-signup.php</a> (on your Main Site).'."\n";
237
- echo '</td>'."\n";
238
-
239
- echo '</tr>'."\n";
240
- echo '</tbody>'."\n";
241
- echo '</table>'."\n";
242
-
243
- echo '<table class="form-table ws-plugin--s2member-mms-registration-wp-signup ws-plugin--s2member-mms-registration-wp-signup-blogs-level0">'."\n";
244
- echo '<tbody>'."\n";
245
- echo '<tr>'."\n";
246
-
247
- echo '<th>'."\n";
248
- echo '<label for="ws-plugin--s2member-mms-registration-blogs-level0">'."\n";
249
- echo 'Level #0 (Free Subscribers):'."\n";
250
- echo '</label>'."\n";
251
- echo '</th>'."\n";
252
-
253
- echo '</tr>'."\n";
254
- echo '<tr>'."\n";
255
-
256
- echo '<td style="padding-bottom:0;">'."\n";
257
- echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_mms_registration_blogs_level0" id="ws-plugin--s2member-mms-registration-blogs-level0" value="'.format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_blogs_level0"]).'" /><br />'."\n";
258
- echo 'How many blogs can a Free Subscriber create?'."\n";
259
- echo '</td>'."\n";
260
-
261
- echo '</tr>'."\n";
262
- echo '</tbody>'."\n";
263
- echo '</table>'."\n";
264
-
265
- echo '<div class="ws-menu-page-hr ws-plugin--s2member-mms-registration-wp-signup"></div>'."\n";
266
-
267
- echo '<table class="form-table ws-plugin--s2member-mms-registration-wp-signup" style="margin:0;">'."\n";
268
- echo '<tbody>'."\n";
269
-
270
- for($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
271
- {
272
- echo '<tr>'."\n";
273
-
274
- echo '<th style="padding-top:0;">'."\n";
275
- echo '<label for="ws-plugin--s2member-mms-registration-blogs-level'.$n.'">'."\n";
276
- echo 'Membership Level #'.$n.' / Maximum Blogs Allowed:'."\n";
277
- echo '</label>'."\n";
278
- echo '</th>'."\n";
279
-
280
- echo '</tr>'."\n";
281
- echo '<tr>'."\n";
282
-
283
- echo '<td>'."\n";
284
- echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_mms_registration_blogs_level'.$n.'" id="ws-plugin--s2member-mms-registration-blogs-level'.$n.'" value="'.format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_blogs_level".$n]).'" /><br />'."\n";
285
- echo 'How many blogs can a Member ( at Level #'.$n.' ) create?'."\n";
286
- echo '</td>'."\n";
287
-
288
- echo '</tr>'."\n";
289
- }
290
-
291
- echo '</tbody>'."\n";
292
- echo '</table>'."\n";
293
- echo '</div>'."\n";
294
 
295
- echo '</div>'."\n";
 
 
296
 
297
- do_action("ws_plugin__s2member_during_mms_ops_page_during_left_sections_after_mms_registration", get_defined_vars());
 
 
298
  }
299
- do_action("ws_plugin__s2member_during_mms_ops_page_after_left_sections", get_defined_vars());
300
-
301
- echo '<p class="submit"><input type="submit" value="Save All Changes" /></p>'."\n";
302
-
303
- echo '</form>'."\n";
304
  }
305
  else // Otherwise, we can display a simple notation; leading into Multisite Networking.
306
  {
@@ -318,7 +82,9 @@ if(!class_exists("c_ws_plugin__s2member_menu_page_mms_ops"))
318
  $ws_plugin__s2member_temp = preg_replace("/(\=)( )(.+?)( )(\=)/", "<h3>$3</h3>", $ws_plugin__s2member_temp);
319
  $ws_plugin__s2member_temp = NC_Markdown($ws_plugin__s2member_temp);
320
 
 
321
  echo preg_replace("/(\<a)( href)/i", "$1".' target="_blank" rel="nofollow external"'."$2", $ws_plugin__s2member_temp);
 
322
  }
323
  }
324
 
29
  {
30
  public function __construct()
31
  {
32
+ if(c_ws_plugin__s2member_utils_conds::pro_is_installed()) {
33
+ c_ws_plugin__s2member_pro_menu_pages::mms_ops_page_display();
34
+ return; // Stop here.
35
+ }
36
  echo '<div class="wrap ws-menu-page">'."\n";
37
 
38
  echo '<div class="ws-menu-page-toolbox">'."\n";
46
  echo '<tr class="ws-menu-page-table-tr">'."\n";
47
  echo '<td class="ws-menu-page-table-l">'."\n";
48
 
49
+ if(is_multisite() && is_main_site()) // These panels will ONLY be available on the Main Site.
50
  {
51
+ echo '<img src="'.esc_attr($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]).'/images/large-icon.png" title="s2Member (a Membership management system for WordPress)" alt="" style="float:right; margin:25px 0 0 25px; border:0;" />'."\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
+ if(file_exists($ws_plugin__s2member_temp = dirname(dirname(dirname(__FILE__)))."/readme-ms.txt"))
54
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  echo '<div class="ws-menu-page-hr"></div>'."\n";
56
 
57
+ if(!function_exists("NC_Markdown"))
58
+ include_once dirname(dirname(__FILE__))."/externals/markdown/nc-markdown.inc.php";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
+ $ws_plugin__s2member_temp = file_get_contents($ws_plugin__s2member_temp);
61
+ $ws_plugin__s2member_temp = preg_replace("/(\=)( )(.+?)( )(\=)/", "<h3>$3</h3>", $ws_plugin__s2member_temp);
62
+ $ws_plugin__s2member_temp = NC_Markdown($ws_plugin__s2member_temp);
63
 
64
+ echo '<div style="max-width:1024px;">';
65
+ echo preg_replace("/(\<a)( href)/i", "$1".' target="_blank" rel="nofollow external"'."$2", $ws_plugin__s2member_temp);
66
+ echo '</div>';
67
  }
 
 
 
 
 
68
  }
69
  else // Otherwise, we can display a simple notation; leading into Multisite Networking.
70
  {
82
  $ws_plugin__s2member_temp = preg_replace("/(\=)( )(.+?)( )(\=)/", "<h3>$3</h3>", $ws_plugin__s2member_temp);
83
  $ws_plugin__s2member_temp = NC_Markdown($ws_plugin__s2member_temp);
84
 
85
+ echo '<div style="max-width:1024px;">';
86
  echo preg_replace("/(\<a)( href)/i", "$1".' target="_blank" rel="nofollow external"'."$2", $ws_plugin__s2member_temp);
87
+ echo '</div>';
88
  }
89
  }
90
 
includes/translations/s2member.pot CHANGED
@@ -1,14 +1,14 @@
1
- # Copyright (C) 2015
2
  # This file is distributed under the same license as the package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: 151218\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/s2member\n"
7
- "POT-Creation-Date: 2015-12-18 16:43:20+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: 2015-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) 2016
2
  # This file is distributed under the same license as the package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: 160120\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/s2member\n"
7
+ "POT-Creation-Date: 2016-01-20 00:02: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: 2016-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
readme-ms.txt CHANGED
@@ -1,4 +1,10 @@
1
  = Is s2Member compatible with WordPress Multisite Networking? =
2
- Yes. s2Member and s2Member Pro are both compatible with Multisite Networking. After you enable Multisite Networking, install the s2Member plugin. Then navigate to `s2Member → Multisite (Config)` in the Dashboard on your Main Site. You can get started now, by turning on [Multisite Networking](http://codex.wordpress.org/Create_A_Network) inside your installation of WordPress®.
3
 
4
- You can learn more about s2Member® at [s2Member.com](http://www.s2member.com/).
 
 
 
 
 
 
1
  = Is s2Member compatible with WordPress Multisite Networking? =
2
+ Multisite support is no longer included in the s2Member Framework. However, it is available with s2Member Pro. s2Member Pro is compatible with Multisite Networking. After you enable Multisite Networking, install the s2Member Pro Add-On. Then, navigate to `s2Member → Multisite (Config)` in the Dashboard of your Main Site. You can learn more about s2Member Pro at [s2Member.com](http://www.s2member.com/).
3
 
4
+ = I was using the free version in a Multisite Network before. What happened? =
5
+ s2Member (when running on a Multisite Network) requires minor alterations in WordPress core that are not compatible with plugins available at WordPress.org (i.e., not allowed) at this time. For this reason, full support for Multisite Networks is now available only in the pro version.
6
+
7
+ = What if I have already configured Multisite Network options on this site? =
8
+ If you already customized s2Member's Multisite Network configuration options in a previous release, those settings will remain and still be functional over the short-term; i.e., the functionality that makes s2Member compatible with Multisite Networking is still included, even in the s2Member Framework. However, the routines that deal with core patches, and those that allow you to change Multisite options are no longer available. You will need to acquire the Pro version to regain that portion of the s2Member Dashboard.
9
+
10
+ _Or, you can revert to [a previous release](http://s2member.com/release-archive/) of s2Member if you'd like. s2Member Framework v151218 is suggested if you go that route._
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members) ===
2
 
3
- Version: 151218
4
- Stable tag: 151218
5
 
6
  SSL Compatible: yes
7
  bbPress® Compatible: yes
@@ -169,12 +169,29 @@ Released under the terms of the [GNU General Public License](http://www.gnu.org/
169
 
170
  == Upgrade Notice ==
171
 
172
- = v151218 =
173
 
174
  (Maintenance Release) Upgrade immediately.
175
 
176
  == Changelog ==
177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  = v151218 =
179
 
180
  - (s2Member Pro) **Reminder Email Notification Exclusions:** It is now possible to enable/disable EOT Renewal/Reminder Email notifications on a per-user basis. You can edit a user's profile in the WP Dashboard and check "_No (exclude)_" to prevent specific users from receiving any reminder emails that you configured. Props at @patdumond @luisrock. See also [this GitHub issue](https://github.com/websharks/s2member/issues/816).
1
  === s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members) ===
2
 
3
+ Version: 160120
4
+ Stable tag: 160120
5
 
6
  SSL Compatible: yes
7
  bbPress® Compatible: yes
169
 
170
  == Upgrade Notice ==
171
 
172
+ = v160120 =
173
 
174
  (Maintenance Release) Upgrade immediately.
175
 
176
  == Changelog ==
177
 
178
+ = v160120 =
179
+
180
+ - (s2Member,s2Member Pro) **Bug Fix:** Resolved a minor glitch in the **WordPress Dashboard → Settings → General** panel, where s2Member's notice regarding Open Registration was inadvertently forcing the entire page into italics. Props @renzms @kristineds @raamdev ~ See also: [this GitHub issue](https://github.com/websharks/s2member/issues/831) if you'd like additional details.
181
+
182
+ - (s2Member) **Multisite Support:** This release of s2Member (the free version only) removes full support for Multisite Networks, which is now a Pro feature; i.e., only available in the Pro version.
183
+
184
+ ##### Is s2Member still compatible with WordPress Multisite Networking?
185
+ Multisite support is no longer included in the s2Member Framework. However, it is available with s2Member Pro. s2Member Pro is compatible with Multisite Networking. After you enable Multisite Networking, install the s2Member Pro Add-On. Then, navigate to `s2Member → Multisite (Config)` in the Dashboard of your Main Site. You can learn more about s2Member Pro at [s2Member.com](http://www.s2member.com/).
186
+
187
+ ##### I was using the free version in a Multisite Network before. What happened?
188
+ s2Member (when running on a Multisite Network) requires minor alterations in WordPress core that are not compatible with plugins available at WordPress.org (i.e., not allowed) at this time. For this reason, full support for Multisite Networks is now available only in the pro version.
189
+
190
+ ##### What if I already configured Multisite options on a site running the free version?
191
+ If you already customized s2Member's Multisite Network configuration options in a previous release, those settings will remain and still be functional over the short-term; i.e., the functionality that makes s2Member compatible with Multisite Networking is still included, even in the s2Member Framework. However, the routines that deal with core patches, and those that allow you to change Multisite options are no longer available. You will need to acquire the Pro version. Or, you can revert to [a previous release](http://s2member.com/release-archive/). s2Member Framework v151218 is suggested if you go that route.
192
+
193
+ _See also: [this GitHub issue](https://github.com/websharks/s2member/issues/850) for further details._
194
+
195
  = v151218 =
196
 
197
  - (s2Member Pro) **Reminder Email Notification Exclusions:** It is now possible to enable/disable EOT Renewal/Reminder Email notifications on a per-user basis. You can edit a user's profile in the WP Dashboard and check "_No (exclude)_" to prevent specific users from receiving any reminder emails that you configured. Props at @patdumond @luisrock. See also [this GitHub issue](https://github.com/websharks/s2member/issues/816).
s2member.php CHANGED
@@ -19,8 +19,8 @@
19
  */
20
  /* -- This section for WordPress parsing. ------------------------------------------------------------------------------
21
 
22
- Version: 151218
23
- Stable tag: 151218
24
 
25
  SSL Compatible: yes
26
  bbPress Compatible: yes
@@ -81,7 +81,7 @@ if(!defined('WPINC')) // MUST have WordPress.
81
  * @var string
82
  */
83
  if(!defined('WS_PLUGIN__S2MEMBER_VERSION'))
84
- define('WS_PLUGIN__S2MEMBER_VERSION', '151218' /* !#distro-version#! */);
85
  /**
86
  * Minimum PHP version required to run s2Member.
87
  *
@@ -111,7 +111,7 @@ if(!defined('WS_PLUGIN__S2MEMBER_MIN_WP_VERSION'))
111
  * @var string
112
  */
113
  if(!defined('WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION'))
114
- define('WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION', '151218' /* !#distro-version#! */);
115
  /*
116
  Several compatibility checks.
117
  If all pass, load the s2Member plugin.
19
  */
20
  /* -- This section for WordPress parsing. ------------------------------------------------------------------------------
21
 
22
+ Version: 160120
23
+ Stable tag: 160120
24
 
25
  SSL Compatible: yes
26
  bbPress Compatible: yes
81
  * @var string
82
  */
83
  if(!defined('WS_PLUGIN__S2MEMBER_VERSION'))
84
+ define('WS_PLUGIN__S2MEMBER_VERSION', '160120' /* !#distro-version#! */);
85
  /**
86
  * Minimum PHP version required to run s2Member.
87
  *
111
  * @var string
112
  */
113
  if(!defined('WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION'))
114
+ define('WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION', '160120' /* !#distro-version#! */);
115
  /*
116
  Several compatibility checks.
117
  If all pass, load the s2Member plugin.