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

Version Description

  • (s2Member). Bug fix. s2Member's File Download routine was failing on some installations running WordPress with Windows IIS 7. This was related to the fact that Windows IIS 7 does not like it when scripts use Content-Length in conjunction with Transfer-Encoding: chunked. This has been resolved in s2Member v3.5.6+.
  • (s2Member/s2Member Pro). Bug fix. s2Member's ability to force SSL by adding the Custom Field `s2member_force_ssl
Download this release

Release Info

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

Code changes from version 3.5.5 to 3.5.6

includes/classes/custom-reg-fields.inc.php CHANGED
@@ -245,7 +245,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
245
if (apply_filters ("ws_plugin__s2member_during_ms_custom_registration_fields_during_custom_fields_display", true, get_defined_vars ()))
246
{
247
echo '<label for="ws-plugin--s2member-custom-reg-field-' . esc_attr ($field_id_class) . '"' . ( (preg_match ("/^(checkbox|pre_checkbox)#x2F;", $field["type"])) ? ' style="display:none;"' : '') . '>' . $field["label"] . ( ($field["required"] === "yes") ? ' *' : '') . '</label>' . "\n";
248
- echo c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (__FUNCTION__, $field, "ws_plugin__s2member_custom_reg_field_", "ws-plugin--s2member-custom-reg-field-", "ws-plugin--s2member-custom-reg-field", "", "", "", $_p,$_p["ws_plugin__s2member_custom_reg_field_" . $field_var]);
249
echo '<br />' . "\n";
250
}
251
unset ($__refs, $__v); /* Unset defined __refs, __v. */
@@ -371,7 +371,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
371
echo '<p>' . "\n";
372
echo '<label>' . "\n";
373
echo '<span' . ( (preg_match ("/^(checkbox|pre_checkbox)#x2F;", $field["type"])) ? ' style="display:none;"' : '') . '>' . $field["label"] . ( ($field["required"] === "yes") ? ' *' : '') . '</span>' . ( (preg_match ("/^(checkbox|pre_checkbox)#x2F;", $field["type"])) ? '' : '<br />') . "\n";
374
- echo c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (__FUNCTION__, $field, "ws_plugin__s2member_custom_reg_field_", "ws-plugin--s2member-custom-reg-field-", "ws-plugin--s2member-custom-reg-field", "", ($tabindex = $tabindex + 10), "", $_p,$_p["ws_plugin__s2member_custom_reg_field_" . $field_var]);
375
echo '</label>' . "\n";
376
echo '</p>';
377
}
245
if (apply_filters ("ws_plugin__s2member_during_ms_custom_registration_fields_during_custom_fields_display", true, get_defined_vars ()))
246
{
247
echo '<label for="ws-plugin--s2member-custom-reg-field-' . esc_attr ($field_id_class) . '"' . ( (preg_match ("/^(checkbox|pre_checkbox)#x2F;", $field["type"])) ? ' style="display:none;"' : '') . '>' . $field["label"] . ( ($field["required"] === "yes") ? ' *' : '') . '</label>' . "\n";
248
+ echo c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (__FUNCTION__, $field, "ws_plugin__s2member_custom_reg_field_", "ws-plugin--s2member-custom-reg-field-", "ws-plugin--s2member-custom-reg-field", "", "", "", $_p, $_p["ws_plugin__s2member_custom_reg_field_" . $field_var]);
249
echo '<br />' . "\n";
250
}
251
unset ($__refs, $__v); /* Unset defined __refs, __v. */
371
echo '<p>' . "\n";
372
echo '<label>' . "\n";
373
echo '<span' . ( (preg_match ("/^(checkbox|pre_checkbox)#x2F;", $field["type"])) ? ' style="display:none;"' : '') . '>' . $field["label"] . ( ($field["required"] === "yes") ? ' *' : '') . '</span>' . ( (preg_match ("/^(checkbox|pre_checkbox)#x2F;", $field["type"])) ? '' : '<br />') . "\n";
374
+ echo c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (__FUNCTION__, $field, "ws_plugin__s2member_custom_reg_field_", "ws-plugin--s2member-custom-reg-field-", "ws-plugin--s2member-custom-reg-field", "", ($tabindex = $tabindex + 10), "", $_p, $_p["ws_plugin__s2member_custom_reg_field_" . $field_var]);
375
echo '</label>' . "\n";
376
echo '</p>';
377
}
includes/classes/files-in.inc.php CHANGED
@@ -146,7 +146,6 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
146
header ("Accept-Ranges: none");
147
header ("Content-Encoding: none");
148
header ("Content-Type: " . $mimetype);
149
- header ("Content-Length: " . $length);
150
header ("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("-1 week")) . " GMT");
151
header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
152
header ("Cache-Control: no-cache, must-revalidate, max-age=0");
@@ -157,6 +156,11 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
157
/**/
158
if ($length && apply_filters ("ws_plugin__s2member_stream_file_downloads", true, get_defined_vars ()) && ($stream = fopen ($file, "rb")))
159
{
160
header ("Transfer-Encoding: chunked"); /* Uses `Transfer-Encoding: chunked` for simulated streaming. */
161
/**/
162
eval ('while (@ob_end_clean ());'); /* End/clean all output buffers that may or may not exist. */
@@ -164,12 +168,16 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
164
while (!feof ($stream) && ($chunk_size = strlen ($data = fread ($stream, 2097152))))
165
eval ('echo dechex ($chunk_size) . "\r\n". $data . "\r\n"; @flush ();');
166
/**/
167
- fclose($stream);
168
/**/
169
exit ("0\r\n\r\n");
170
}
171
- else if ($length)
172
- exit (file_get_contents ($file));
173
else
174
exit (); /* Empty file. */
175
}
146
header ("Accept-Ranges: none");
147
header ("Content-Encoding: none");
148
header ("Content-Type: " . $mimetype);
149
header ("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("-1 week")) . " GMT");
150
header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
151
header ("Cache-Control: no-cache, must-revalidate, max-age=0");
156
/**/
157
if ($length && apply_filters ("ws_plugin__s2member_stream_file_downloads", true, get_defined_vars ()) && ($stream = fopen ($file, "rb")))
158
{
159
+ $_stream_w_content_length = (preg_match ("/^win/i", PHP_OS)) ? false : true; /* Windows® IIS does not jive here. */
160
+ /* Windows® IIS doesn't seem to like it when both `Content-Length` and `Transfer-Encoding: chunked` are sent together. */
161
+ if (apply_filters ("ws_plugin__s2member_stream_file_downloads_w_content_length", $_stream_w_content_length, get_defined_vars ()))
162
+ header ("Content-Length: " . $length);
163
+ /**/
164
header ("Transfer-Encoding: chunked"); /* Uses `Transfer-Encoding: chunked` for simulated streaming. */
165
/**/
166
eval ('while (@ob_end_clean ());'); /* End/clean all output buffers that may or may not exist. */
168
while (!feof ($stream) && ($chunk_size = strlen ($data = fread ($stream, 2097152))))
169
eval ('echo dechex ($chunk_size) . "\r\n". $data . "\r\n"; @flush ();');
170
/**/
171
+ fclose ($stream);
172
/**/
173
exit ("0\r\n\r\n");
174
}
175
+ else if ($length) /* Else `file_get_contents()`. */
176
+ {
177
+ header ("Content-Length: " . $length);
178
+ /**/
179
+ exit (file_get_contents ($file));
180
+ }
181
else
182
exit (); /* Empty file. */
183
}
includes/classes/ssl-in.inc.php CHANGED
@@ -20,6 +20,7 @@ if (!class_exists ("c_ws_plugin__s2member_ssl_in"))
20
{
21
/*
22
Forces SSL on specific Posts/Pages.
23
Attach to: add_action("template_redirect");
24
25
Triggered by Custom Field:
@@ -34,26 +35,28 @@ if (!class_exists ("c_ws_plugin__s2member_ssl_in"))
34
*/
35
public static function force_ssl ($vars = array ()) /* Phase 2 of `c_ws_plugin__s2member_ssl::check_force_ssl()`. */
36
{
37
- extract ($vars); /* Extract vars passed in from `c_ws_plugin__s2member_ssl::check_force_ssl()`. */
38
/**/
39
- if (!is_ssl ()) /* SSL must be enabled here. Redirect to the equivalent https:// scheme. */
40
{
41
- $ssl_host = preg_replace ("/\:[0-9]+#x2F;", "", $_SERVER["HTTP_HOST"]);
42
- $ssl_port = (is_numeric ($force_ssl) && $force_ssl > 1) ? $force_ssl : false;
43
- $ssl_host_port = $ssl_host . (($ssl_port) ? ":" . $ssl_port : "");
44
/**/
45
- wp_redirect ("https://" . $ssl_host_port . $_SERVER["REQUEST_URI"]);
46
- /**/
47
- exit (); /* Clean exit. Redirecting to SSL version of the page. */
48
}
49
else /* Otherwise, we buffer all output, and switch all content over to https. */
50
{
51
add_filter ("redirect_canonical", "__return_false");
52
/**/
53
- $ssl_host = preg_replace ("/\:[0-9]+#x2F;", "", $_SERVER["HTTP_HOST"]);
54
- $ssl_port = (is_numeric ($force_ssl) && $force_ssl > 1) ? $force_ssl : false;
55
- $ssl_host_port = $ssl_host . (($ssl_port) ? ":" . $ssl_port : "");
56
- /**/
57
define ("_ws_plugin__s2member_force_ssl_host", $ssl_host);
58
define ("_ws_plugin__s2member_force_ssl_port", $ssl_port);
59
define ("_ws_plugin__s2member_force_ssl_host_port", $ssl_host_port);
20
{
21
/*
22
Forces SSL on specific Posts/Pages.
23
+ Attach to: add_action("init");
24
Attach to: add_action("template_redirect");
25
26
Triggered by Custom Field:
35
*/
36
public static function force_ssl ($vars = array ()) /* Phase 2 of `c_ws_plugin__s2member_ssl::check_force_ssl()`. */
37
{
38
+ extract ($vars); /* Extract all vars passed in from: `c_ws_plugin__s2member_ssl::check_force_ssl()`. */
39
/**/
40
+ $force_ssl = (!is_string ($force_ssl)) ? (string)(int)$force_ssl : $force_ssl; /* Force string. */
41
+ $force_ssl = (is_numeric ($force_ssl) && $force_ssl > 1) ? $force_ssl : "yes"; /* Use `yes`. */
42
+ /**/
43
+ $ssl_host = preg_replace ("/\:[0-9]+#x2F;", "", $_SERVER["HTTP_HOST"]); /* Remove port here. */
44
+ $ssl_port = (is_numeric ($force_ssl) && $force_ssl > 1) ? $force_ssl : false; /* Port? */
45
+ $ssl_host_port = $ssl_host . (($ssl_port) ? ":" . $ssl_port : ""); /* Use port # ? */
46
+ /**/
47
+ if (!is_ssl () || !$_GET[$s2_ssl_gv]) /* Redirecting. SSL must be enabled here. */
48
{
49
+ $https = "https://" . $ssl_host_port . $_SERVER["REQUEST_URI"];
50
+ $https_with_s2_ssl_gv = add_query_arg ($s2_ssl_gv, urlencode ($force_ssl), $https);
51
/**/
52
+ wp_redirect ($https_with_s2_ssl_gv); /* Redirect to https. */
53
+ exit (); /* Clean exit. */
54
}
55
else /* Otherwise, we buffer all output, and switch all content over to https. */
56
+ /* Also, we assume here that other links on the site should NOT be converted to https. */
57
{
58
add_filter ("redirect_canonical", "__return_false");
59
/**/
60
define ("_ws_plugin__s2member_force_ssl_host", $ssl_host);
61
define ("_ws_plugin__s2member_force_ssl_port", $ssl_port);
62
define ("_ws_plugin__s2member_force_ssl_host_port", $ssl_host_port);
includes/classes/ssl.inc.php CHANGED
@@ -20,6 +20,7 @@ if (!class_exists ("c_ws_plugin__s2member_ssl"))
20
{
21
/*
22
Forces SSL on specific Posts/Pages.
23
Attach to: add_action("template_redirect");
24
25
Triggered by Custom Field:
@@ -33,17 +34,22 @@ if (!class_exists ("c_ws_plugin__s2member_ssl"))
33
public static function check_force_ssl () /* Forces SSL. */
34
{
35
global $post; /* We need the global $post variable here. */
36
/**/
37
do_action ("ws_plugin__s2member_before_check_force_ssl", get_defined_vars ());
38
/**/
39
- $force_ssl = apply_filters ("ws_plugin__s2member_check_force_ssl", false, get_defined_vars ());
40
- /**/
41
- if (($force_ssl || (is_singular () && is_object ($post) && ($__id = $post->ID))) && !preg_match ("/^(no|false)#x2F;i", $force_ssl))
42
- /**/
43
- if (($force_ssl || ($force_ssl = get_post_meta ($__id, "s2member_force_ssl", true))) && !preg_match ("/^(no|false)#x2F;i", $force_ssl))
44
- {
45
- c_ws_plugin__s2member_ssl_in::force_ssl (get_defined_vars ()); /* Call inner function now. */
46
- }
47
/**/
48
do_action ("ws_plugin__s2member_after_check_force_ssl", get_defined_vars ());
49
/**/
20
{
21
/*
22
Forces SSL on specific Posts/Pages.
23
+ Attach to: add_action("init");
24
Attach to: add_action("template_redirect");
25
26
Triggered by Custom Field:
34
public static function check_force_ssl () /* Forces SSL. */
35
{
36
global $post; /* We need the global $post variable here. */
37
+ static $forced = false; /* Only force SSL once. */
38
/**/
39
do_action ("ws_plugin__s2member_before_check_force_ssl", get_defined_vars ());
40
/**/
41
+ if (!$forced) /* Only once. This is required, because it's processed on multiple Hooks. */
42
+ {
43
+ $s2_ssl_gv = apply_filters ("ws_plugin__s2member_check_force_ssl_get_var_name", "s2-ssl", get_defined_vars ());
44
+ $force_ssl = apply_filters ("ws_plugin__s2member_check_force_ssl", $_GET[$s2_ssl_gv], get_defined_vars ());
45
+ /**/
46
+ if ($force_ssl || (function_exists ("is_singular") && is_singular () && is_object ($post) && $post->ID && ($force_ssl = get_post_meta ($post->ID, "s2member_force_ssl", true))))
47
+ /**/
48
+ if (!preg_match ("/^(0|no|false)#x2F;i", $force_ssl) && ($forced = true)) /* Make sure it's not a negative variation. */
49
+ {
50
+ c_ws_plugin__s2member_ssl_in::force_ssl (get_defined_vars ()); /* Call inner function now. */
51
+ }
52
+ }
53
/**/
54
do_action ("ws_plugin__s2member_after_check_force_ssl", get_defined_vars ());
55
/**/
includes/classes/user-new-in.inc.php CHANGED
@@ -189,7 +189,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
189
{
190
$unfs .= '<tr>' . "\n";
191
$unfs .= '<th><label>' . ( (preg_match ("/^(checkbox|pre_checkbox)#x2F;", $field["type"])) ? ucwords (preg_replace ("/_/", " ", $field_var)) : $field["label"]) . ':</label></th>' . "\n";
192
- $unfs .= '<td>' . c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (__FUNCTION__, $field, "ws_plugin__s2member_user_new_", "ws-plugin--s2member-user-new-", "", ( (preg_match ("/^(text|textarea|select|selects)#x2F;", $field["type"])) ? "width:99%;" : ""), "", "", $_p,$_p["ws_plugin__s2member_user_new_" . $field_var]) . '</td>' . "\n";
193
$unfs .= '</tr>' . "\n";
194
}
195
unset ($__refs, $__v); /* Unset defined __refs, __v. */
@@ -215,7 +215,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
215
unset ($__refs, $__v); /* Unset defined __refs, __v. */
216
/**/
217
$unfs .= '<tr>' . "\n";
218
- $unfs .= '<th><label>Administrative<br />Notations:</label> <a href="#" onclick="alert(\'This is for Administrative purposes. You can keep a list of Notations about this account. These Notations are private; Users/Members will never see these.\\n\\n*Note* The s2Member software may `append` Notes to this field occassionaly, under special circumstances. For example, when/if s2Member demotes a paid Member to a Free Subscriber, s2Member will leave a Note in this field.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
219
$unfs .= '<td><textarea name="ws_plugin__s2member_user_new_s2member_notes" id="ws-plugin--s2member-user-new-s2member-notes" rows="5" wrap="off" spellcheck="false" style="width:99%;">' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_notes"]) . '</textarea></td>' . "\n";
220
$unfs .= '</tr>' . "\n";
221
/**/
189
{
190
$unfs .= '<tr>' . "\n";
191
$unfs .= '<th><label>' . ( (preg_match ("/^(checkbox|pre_checkbox)#x2F;", $field["type"])) ? ucwords (preg_replace ("/_/", " ", $field_var)) : $field["label"]) . ':</label></th>' . "\n";
192
+ $unfs .= '<td>' . c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (__FUNCTION__, $field, "ws_plugin__s2member_user_new_", "ws-plugin--s2member-user-new-", "", ( (preg_match ("/^(text|textarea|select|selects)#x2F;", $field["type"])) ? "width:99%;" : ""), "", "", $_p, $_p["ws_plugin__s2member_user_new_" . $field_var]) . '</td>' . "\n";
193
$unfs .= '</tr>' . "\n";
194
}
195
unset ($__refs, $__v); /* Unset defined __refs, __v. */
215
unset ($__refs, $__v); /* Unset defined __refs, __v. */
216
/**/
217
$unfs .= '<tr>' . "\n";
218
+ $unfs .= '<th><label>Administrative<br />Notations:</label> <a href="#" onclick="alert(\'This is for Administrative purposes. You can keep a list of Notations about this account. These Notations are private; Users/Members will never see these.\\n\\n*Note* The s2Member software may `append` Notes to this field occasionally, under special circumstances. For example, when/if s2Member demotes a paid Member to a Free Subscriber, s2Member will leave a Note in this field.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
219
$unfs .= '<td><textarea name="ws_plugin__s2member_user_new_s2member_notes" id="ws-plugin--s2member-user-new-s2member-notes" rows="5" wrap="off" spellcheck="false" style="width:99%;">' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_notes"]) . '</textarea></td>' . "\n";
220
$unfs .= '</tr>' . "\n";
221
/**/
includes/classes/users-list-in.inc.php CHANGED
@@ -214,7 +214,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
214
{
215
echo '<tr>' . "\n";
216
echo '<th><label>' . ( (preg_match ("/^(checkbox|pre_checkbox)#x2F;", $field["type"])) ? ucwords (preg_replace ("/_/", " ", $field_var)) : $field["label"]) . ':</label></th>' . "\n";
217
- echo '<td>' . c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (__FUNCTION__, $field, "ws_plugin__s2member_profile_", "ws-plugin--s2member-profile-", "", ( (preg_match ("/^(text|textarea|select|selects)#x2F;", $field["type"])) ? "width:99%;" : ""), "", "", $fields,$fields[$field_var]) . '</td>' . "\n";
218
echo '</tr>' . "\n";
219
}
220
unset ($__refs, $__v); /* Unset defined __refs, __v. */
@@ -241,7 +241,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
241
unset ($__refs, $__v); /* Unset defined __refs, __v. */
242
/**/
243
echo '<tr>' . "\n";
244
- echo '<th><label>Administrative<br />Notations:</label> <a href="#" onclick="alert(\'This is for Administrative purposes. You can keep a list of Notations about this account. These Notations are private; Users/Members will never see these.\\n\\n*Note* The s2Member software may `append` Notes to this field occassionaly, under special circumstances. For example, when/if s2Member demotes a paid Member to a Free Subscriber, s2Member will leave a Note in this field.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
245
echo '<td><textarea name="ws_plugin__s2member_profile_s2member_notes" id="ws-plugin--s2member-profile-s2member-notes" rows="5" wrap="off" spellcheck="false" style="width:99%;">' . format_to_edit (get_user_option ("s2member_notes", $user->ID)) . '</textarea></td>' . "\n";
246
echo '</tr>' . "\n";
247
/**/
@@ -295,7 +295,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
295
{
296
echo '<tr>' . "\n";
297
echo '<th><label>' . ( (preg_match ("/^(checkbox|pre_checkbox)#x2F;", $field["type"])) ? ucwords (preg_replace ("/_/", " ", $field_var)) : $field["label"]) . ':</label></th>' . "\n";
298
- echo '<td>' . c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (__FUNCTION__, $field, "ws_plugin__s2member_profile_", "ws-plugin--s2member-profile-", "", ( (preg_match ("/^(text|textarea|select|selects)#x2F;", $field["type"])) ? "width:99%;" : ""), "", "", $fields,$fields[$field_var], true) . '</td>' . "\n";
299
echo '</tr>' . "\n";
300
}
301
unset ($__refs, $__v); /* Unset defined __refs, __v. */
@@ -409,7 +409,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
409
}
410
/**/
411
if ($_p["ws_plugin__s2member_profile_opt_in"]) /* Should we process List Servers for this User? */
412
- c_ws_plugin__s2member_list_servers::process_list_servers (c_ws_plugin__s2member_user_access::user_access_role ($user), c_ws_plugin__s2member_user_access::user_access_level ($user), $user->user_login,$_p["pass1"], $user->user_email, $user->first_name, $user->last_name, false, true, $user_id);
413
/**/
414
if ($_p["ws_plugin__s2member_profile_ip_restrictions"]) /* Delete/reset IP Restrictions? */
415
c_ws_plugin__s2member_ip_restrictions::delete_reset_specific_ip_restrictions (strtolower ($user->user_login));
214
{
215
echo '<tr>' . "\n";
216
echo '<th><label>' . ( (preg_match ("/^(checkbox|pre_checkbox)#x2F;", $field["type"])) ? ucwords (preg_replace ("/_/", " ", $field_var)) : $field["label"]) . ':</label></th>' . "\n";
217
+ echo '<td>' . c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (__FUNCTION__, $field, "ws_plugin__s2member_profile_", "ws-plugin--s2member-profile-", "", ( (preg_match ("/^(text|textarea|select|selects)#x2F;", $field["type"])) ? "width:99%;" : ""), "", "", $fields, $fields[$field_var]) . '</td>' . "\n";
218
echo '</tr>' . "\n";
219
}
220
unset ($__refs, $__v); /* Unset defined __refs, __v. */
241
unset ($__refs, $__v); /* Unset defined __refs, __v. */
242
/**/
243
echo '<tr>' . "\n";
244
+ echo '<th><label>Administrative<br />Notations:</label> <a href="#" onclick="alert(\'This is for Administrative purposes. You can keep a list of Notations about this account. These Notations are private; Users/Members will never see these.\\n\\n*Note* The s2Member software may `append` Notes to this field occasionally, under special circumstances. For example, when/if s2Member demotes a paid Member to a Free Subscriber, s2Member will leave a Note in this field.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
245
echo '<td><textarea name="ws_plugin__s2member_profile_s2member_notes" id="ws-plugin--s2member-profile-s2member-notes" rows="5" wrap="off" spellcheck="false" style="width:99%;">' . format_to_edit (get_user_option ("s2member_notes", $user->ID)) . '</textarea></td>' . "\n";
246
echo '</tr>' . "\n";
247
/**/
295
{
296
echo '<tr>' . "\n";
297
echo '<th><label>' . ( (preg_match ("/^(checkbox|pre_checkbox)#x2F;", $field["type"])) ? ucwords (preg_replace ("/_/", " ", $field_var)) : $field["label"]) . ':</label></th>' . "\n";
298
+ echo '<td>' . c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (__FUNCTION__, $field, "ws_plugin__s2member_profile_", "ws-plugin--s2member-profile-", "", ( (preg_match ("/^(text|textarea|select|selects)#x2F;", $field["type"])) ? "width:99%;" : ""), "", "", $fields, $fields[$field_var], true) . '</td>' . "\n";
299
echo '</tr>' . "\n";
300
}
301
unset ($__refs, $__v); /* Unset defined __refs, __v. */
409
}
410
/**/
411
if ($_p["ws_plugin__s2member_profile_opt_in"]) /* Should we process List Servers for this User? */
412
+ c_ws_plugin__s2member_list_servers::process_list_servers (c_ws_plugin__s2member_user_access::user_access_role ($user), c_ws_plugin__s2member_user_access::user_access_level ($user), $user->user_login, $_p["pass1"], $user->user_email, $user->first_name, $user->last_name, false, true, $user_id);
413
/**/
414
if ($_p["ws_plugin__s2member_profile_ip_restrictions"]) /* Delete/reset IP Restrictions? */
415
c_ws_plugin__s2member_ip_restrictions::delete_reset_specific_ip_restrictions (strtolower ($user->user_login));
includes/hooks.inc.php CHANGED
@@ -20,6 +20,7 @@ add_action ("pre_get_posts", /* WP Query. */
20
"c_ws_plugin__s2member_security::security_gate_query", 20);
21
/* Priority matches `/api-functions.inc.php`.
22
/**/
23
add_action ("init", "c_ws_plugin__s2member_user_securities::initialize", 1);
24
/**/
25
add_action ("init", "c_ws_plugin__s2member_nocache::nocache", 1);
20
"c_ws_plugin__s2member_security::security_gate_query", 20);
21
/* Priority matches `/api-functions.inc.php`.
22
/**/
23
+ add_action ("init", "c_ws_plugin__s2member_ssl::check_force_ssl", 1);
24
add_action ("init", "c_ws_plugin__s2member_user_securities::initialize", 1);
25
/**/
26
add_action ("init", "c_ws_plugin__s2member_nocache::nocache", 1);
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
=== s2Member ( Membership w/ PayPal® ) ===
2
3
- Version: 3.5.5
4
- Stable tag: 3.5.5
5
Framework: WS-P-3.5
6
7
SSL Compatible: yes
@@ -169,11 +169,16 @@ Yes and no. We've left this feature out of the plugin intentionally, because man
169
170
== Upgrade Notice ==
171
172
- = 3.5.5+ =
173
* Upgrade highly recommended. Many new features, WordPress® 3.1 compatible, speed optimizations, and several bug fixes.
174
175
== Changelog ==
176
177
= 3.5.5 =
178
* **(s2Member). New feature.** It is now possible to configure Custom Registration Fields with s2Member that are NOT actually visible during the registration process. Instead, they will only be visible after registration ( i.e. during a Profile edit ). In order to accomplish this, you will need to choose this option from the dropdown menu for a specific Custom Registration Field that you configure with s2Member. This option is in the dropdown menu entitled: `Allow Profile Edits?`. You can choose: `Yes ( editable after registration / invisible during registration )`.
179
* **(s2Member Pro). Feature Improvement.** The display of the Coupon Code field on Pro Forms has been improved ( i.e. enhanced with an icon and the "Apply Coupon" button is now floated to the right to save space ).
1
=== s2Member ( Membership w/ PayPal® ) ===
2
3
+ Version: 3.5.6
4
+ Stable tag: 3.5.6
5
Framework: WS-P-3.5
6
7
SSL Compatible: yes
169
170
== Upgrade Notice ==
171
172
+ = 3.5.6+ =
173
* Upgrade highly recommended. Many new features, WordPress® 3.1 compatible, speed optimizations, and several bug fixes.
174
175
== Changelog ==
176
177
+ = 3.5.6 =
178
+ * **(s2Member). Bug fix.** s2Member's File Download routine was failing on some installations running WordPress® with Windows® IIS 7. This was related to the fact that Windows® IIS 7 does not like it when scripts use `Content-Length` in conjunction with `Transfer-Encoding: chunked`. This has been resolved in s2Member v3.5.6+.
179
+ * **(s2Member/s2Member Pro). Bug fix.** s2Member's ability to force SSL by adding the Custom Field `s2member_force_ssl = yes`, was failing to achieve the desired result for links generated during some Pro Form submissions. A symptom of this bug was to see s2Member generate Specific Post/Page Access Links in SSL mode when running together with s2Member Pro Forms. This was related to the fact that s2Member's SSL Filters, which handle SSL conversions were applied on the `template_redirect` Hook instead of earlier in the routine ( i.e. on the `init` Hook ). In order to improve the reliability of this feature, s2Member now attaches itself to both `init` and `template_redirect`; checking in both cases, and only processing on one or the other. Another change, s2Member now forces a new query string parameter in all URLs that are forced to SSL mode by s2Member ( you will see: `?s2-ssl=yes` ). This improves clarity for site owners implementing Pro Forms, and it also makes this feature more compatible with other plugins running in concert with s2Member and s2Member Pro. For advanced site owners, it is possible to modify the name of this special query string variable using s2Member's Filter: `ws_plugin__s2member_check_force_ssl_get_var_name`. If you're interested in this and need assistance, please check the [s2Member forum](http://www.primothemes.com/forums/viewforum.php?f=4).
180
+ * **(s2Member Pro). Bug fix.** The Pro Login Widget for s2Member ( when integrated via PHP ), was not appearing on some sites running early versions of PHP v5.2. This bug has been resolved in s2Member Pro v1.5.6+.
181
+
182
= 3.5.5 =
183
* **(s2Member). New feature.** It is now possible to configure Custom Registration Fields with s2Member that are NOT actually visible during the registration process. Instead, they will only be visible after registration ( i.e. during a Profile edit ). In order to accomplish this, you will need to choose this option from the dropdown menu for a specific Custom Registration Field that you configure with s2Member. This option is in the dropdown menu entitled: `Allow Profile Edits?`. You can choose: `Yes ( editable after registration / invisible during registration )`.
184
* **(s2Member Pro). Feature Improvement.** The display of the Coupon Code field on Pro Forms has been improved ( i.e. enhanced with an icon and the "Apply Coupon" button is now floated to the right to save space ).
s2member.php CHANGED
@@ -9,8 +9,8 @@ along with this software. In the main directory, see: /licensing/
9
If not, see: <http://www.gnu.org/licenses/>.
10
*/
11
/*
12
- Version: 3.5.5
13
- Stable tag: 3.5.5
14
Framework: WS-P-3.5
15
16
SSL Compatible: yes
@@ -54,10 +54,10 @@ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
54
/*
55
Define versions.
56
*/
57
- @define ("WS_PLUGIN__S2MEMBER_VERSION", "3.5.5");
58
@define ("WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION", "5.2");
59
@define ("WS_PLUGIN__S2MEMBER_MIN_WP_VERSION", "3.0");
60
- @define ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "1.5.5");
61
/*
62
Compatibility checks.
63
*/
9
If not, see: <http://www.gnu.org/licenses/>.
10
*/
11
/*
12
+ Version: 3.5.6
13
+ Stable tag: 3.5.6
14
Framework: WS-P-3.5
15
16
SSL Compatible: yes
54
/*
55
Define versions.
56
*/
57
+ @define ("WS_PLUGIN__S2MEMBER_VERSION", "3.5.6");
58
@define ("WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION", "5.2");
59
@define ("WS_PLUGIN__S2MEMBER_MIN_WP_VERSION", "3.0");
60
+ @define ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "1.5.6");
61
/*
62
Compatibility checks.
63
*/