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

Version Description

Download this release

Release Info

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

Code changes from version 111003 to 111011

Files changed (63) hide show
  1. includes/_xtnls/mailchimp/nc-mcapi.inc.php +4 -6
  2. includes/classes/admin-css-js-in.inc.php +2 -4
  3. includes/classes/auto-eots.inc.php +13 -13
  4. includes/classes/constants.inc.php +9 -9
  5. includes/classes/css-js-in.inc.php +17 -19
  6. includes/classes/custom-reg-fields-4bp.inc.php +23 -24
  7. includes/classes/custom-reg-fields.inc.php +34 -34
  8. includes/classes/email-configs.inc.php +93 -91
  9. includes/classes/files-in.inc.php +50 -50
  10. includes/classes/files.inc.php +46 -45
  11. includes/classes/installation.inc.php +1 -1
  12. includes/classes/ip-restrictions.inc.php +108 -77
  13. includes/classes/list-servers.inc.php +58 -38
  14. includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php +11 -11
  15. includes/classes/paypal-notify-in-subscr-or-rp-cancellation-w-level.inc.php +7 -7
  16. includes/classes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php +4 -4
  17. includes/classes/paypal-notify-in-subscr-or-rp-payment-w-level.inc.php +8 -8
  18. includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php +6 -6
  19. includes/classes/paypal-notify-in-wa-ccaps-wo-level.inc.php +4 -4
  20. includes/classes/paypal-notify-in.inc.php +1 -3
  21. includes/classes/paypal-return-in-subscr-modify-w-level.inc.php +1 -1
  22. includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php +17 -17
  23. includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php +8 -8
  24. includes/classes/profile-mods-4bp-in.inc.php +10 -10
  25. includes/classes/profile-mods-in.inc.php +16 -16
  26. includes/classes/register-access.inc.php +21 -17
  27. includes/classes/register-in.inc.php +20 -17
  28. includes/classes/registrations.inc.php +1 -1
  29. includes/classes/roles-caps.inc.php +24 -10
  30. includes/classes/s-badge-status-in.inc.php +7 -3
  31. includes/classes/sc-files-in.inc.php +1 -1
  32. includes/classes/sc-gets-in.inc.php +4 -4
  33. includes/classes/sc-if-conds-in.inc.php +5 -5
  34. includes/classes/sc-keys-in.inc.php +1 -1
  35. includes/classes/sc-paypal-button-in.inc.php +2 -2
  36. includes/classes/sc-profile-in.inc.php +1 -1
  37. includes/classes/sc-s-badge-in.inc.php +5 -4
  38. includes/classes/sp-access.inc.php +41 -37
  39. includes/classes/tracking-cookies-in.inc.php +5 -5
  40. includes/classes/user-access.inc.php +5 -5
  41. includes/classes/user-deletions.inc.php +2 -2
  42. includes/classes/users-list-in.inc.php +79 -76
  43. includes/classes/utilities.inc.php +5 -5
  44. includes/classes/utils-strings.inc.php +42 -8
  45. includes/classes/utils-urls.inc.php +17 -6
  46. includes/classes/utils-users.inc.php +4 -4
  47. includes/functions/api-functions.inc.php +40 -9
  48. includes/hooks.inc.php +1 -1
  49. includes/menu-pages/api-ops.inc.php +31 -31
  50. includes/menu-pages/down-ops.inc.php +4 -3
  51. includes/menu-pages/els-ops.inc.php +12 -9
  52. includes/menu-pages/gen-ops.inc.php +55 -38
  53. includes/menu-pages/integrations.inc.php +3 -2
  54. includes/menu-pages/menu-pages-s-min.js +1 -1
  55. includes/menu-pages/menu-pages-s.js +15 -8
  56. includes/menu-pages/mms-ops.inc.php +12 -9
  57. includes/menu-pages/res-ops.inc.php +10 -9
  58. includes/menu-pages/scripting.inc.php +1 -1
  59. includes/menu-pages/start.inc.php +23 -15
  60. includes/menu-pages/trk-ops.inc.php +10 -10
  61. includes/translations/s2member.pot +175 -182
  62. readme.txt +24 -128
  63. s2member.php +8 -8
includes/_xtnls/mailchimp/nc-mcapi.inc.php CHANGED
@@ -2439,14 +2439,12 @@ class NC_MCAPI {
2439
  $this->errorMessage = $response["error"];
2440
  $this->errorCode = $response["code"];
2441
  return false;
2442
- } else if($error){
2443
- $this->errorMessage = "No error message from API server.";
2444
  $this->errorCode = $error;
2445
  return false;
2446
- } else if(!is_array($response) || empty($response)){
2447
- $this->errorMessage = "No response from API server.";
2448
- $this->errorCode = "-98";
2449
- return false;
2450
  }
2451
 
2452
  return $response;
2439
  $this->errorMessage = $response["error"];
2440
  $this->errorCode = $response["code"];
2441
  return false;
2442
+ } else if($error /* But no error message? */){
2443
+ $this->errorMessage = "No error message.";
2444
  $this->errorCode = $error;
2445
  return false;
2446
+ } else if(empty($response)){
2447
+ $response = true;
 
 
2448
  }
2449
 
2450
  return $response;
includes/classes/admin-css-js-in.inc.php CHANGED
@@ -43,9 +43,8 @@ if (!class_exists ("c_ws_plugin__s2member_admin_css_js_in"))
43
  /**/
44
  if (!empty ($_GET["ws_plugin__s2member_menu_pages_css"]) && is_user_logged_in () && current_user_can ("create_users"))
45
  {
46
- @ini_set ("zlib.output_compression", 0);
47
- /**/
48
  status_header (200); /* 200 OK status header. */
 
49
  header ("Content-Type: text/css; charset=utf-8");
50
  header ("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("-1 week")) . " GMT");
51
  header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
@@ -88,9 +87,8 @@ if (!class_exists ("c_ws_plugin__s2member_admin_css_js_in"))
88
  /**/
89
  if (!empty ($_GET["ws_plugin__s2member_menu_pages_js"]) && is_user_logged_in () && current_user_can ("create_users"))
90
  {
91
- @ini_set ("zlib.output_compression", 0);
92
- /**/
93
  status_header (200); /* 200 OK status header. */
 
94
  header ("Content-Type: text/javascript; charset=utf-8");
95
  header ("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("-1 week")) . " GMT");
96
  header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
43
  /**/
44
  if (!empty ($_GET["ws_plugin__s2member_menu_pages_css"]) && is_user_logged_in () && current_user_can ("create_users"))
45
  {
 
 
46
  status_header (200); /* 200 OK status header. */
47
+ /**/
48
  header ("Content-Type: text/css; charset=utf-8");
49
  header ("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("-1 week")) . " GMT");
50
  header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
87
  /**/
88
  if (!empty ($_GET["ws_plugin__s2member_menu_pages_js"]) && is_user_logged_in () && current_user_can ("create_users"))
89
  {
 
 
90
  status_header (200); /* 200 OK status header. */
91
+ /**/
92
  header ("Content-Type: text/javascript; charset=utf-8");
93
  header ("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("-1 week")) . " GMT");
94
  header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
includes/classes/auto-eots.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_auto_eots"))
21
  {
@@ -68,7 +68,7 @@ if (!class_exists ("c_ws_plugin__s2member_auto_eots"))
68
  /**/
69
  if (function_exists ("wp_cron")) /* Is `wp_cron()` even available? */
70
  {
71
- wp_clear_scheduled_hook("ws_plugin__s2member_auto_eot_system__schedule"); /* Since v3.0.3. */
72
  /**/
73
  return apply_filters ("ws_plugin__s2member_delete_auto_eot_system", true, get_defined_vars ());
74
  }
@@ -102,10 +102,10 @@ if (!class_exists ("c_ws_plugin__s2member_auto_eots"))
102
  /**/
103
  include_once ABSPATH . "wp-admin/includes/admin.php";
104
  /**/
105
- @set_time_limit(0); /* Make time for processing larger userbases. */
106
  @ini_set ("memory_limit", "256M"); /* Acquire some additional RAM. */
107
  /**/
108
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
109
  do_action ("ws_plugin__s2member_before_auto_eot_system", get_defined_vars ());
110
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
111
  /**/
@@ -136,7 +136,7 @@ if (!class_exists ("c_ws_plugin__s2member_auto_eots"))
136
  $demotion_role = c_ws_plugin__s2member_option_forces::force_demotion_role ("subscriber");
137
  $existing_role = c_ws_plugin__s2member_user_access::user_access_role ($user);
138
  /**/
139
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
140
  do_action ("ws_plugin__s2member_during_auto_eot_system_during_before_demote", get_defined_vars ());
141
  do_action ("ws_plugin__s2member_during_collective_mods", $user_id, get_defined_vars (), $eot_del_type, "modification", $demotion_role);
142
  do_action ("ws_plugin__s2member_during_collective_eots", $user_id, get_defined_vars (), $eot_del_type, "modification");
@@ -180,7 +180,7 @@ if (!class_exists ("c_ws_plugin__s2member_auto_eots"))
180
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
181
  {
182
  if (is_array ($fields) && !empty ($fields))
183
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
184
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
185
  break;
186
  /**/
@@ -231,7 +231,7 @@ if (!class_exists ("c_ws_plugin__s2member_auto_eots"))
231
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
232
  {
233
  if (is_array ($fields) && !empty ($fields))
234
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
235
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
236
  break;
237
  /**/
@@ -244,7 +244,7 @@ if (!class_exists ("c_ws_plugin__s2member_auto_eots"))
244
  c_ws_plugin__s2member_email_configs::email_config ();
245
  }
246
  /**/
247
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
248
  do_action ("ws_plugin__s2member_during_auto_eot_system_during_demote", get_defined_vars ());
249
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
250
  }
@@ -252,7 +252,7 @@ if (!class_exists ("c_ws_plugin__s2member_auto_eots"))
252
  {
253
  $eot_del_type = $GLOBALS["ws_plugin__s2member_eot_del_type"] = "auto-eot-cancellation-expiration-deletion";
254
  /**/
255
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
256
  do_action ("ws_plugin__s2member_during_auto_eot_system_during_before_delete", get_defined_vars ());
257
  do_action ("ws_plugin__s2member_during_collective_eots", $user_id, get_defined_vars (), $eot_del_type, "removal-deletion");
258
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
@@ -266,14 +266,14 @@ if (!class_exists ("c_ws_plugin__s2member_auto_eots"))
266
  /**/
267
  else /* Otherwise, we can actually delete them. */
268
  /* This will automatically trigger `eot_del_notification_urls` as well. */
269
- wp_delete_user($user_id); /* `c_ws_plugin__s2member_user_deletions::handle_user_deletions()` */
270
  /**/
271
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
272
  do_action ("ws_plugin__s2member_during_auto_eot_system_during_delete", get_defined_vars ());
273
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
274
  }
275
  /**/
276
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
277
  do_action ("ws_plugin__s2member_during_auto_eot_system", get_defined_vars ());
278
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
279
  }
@@ -284,7 +284,7 @@ if (!class_exists ("c_ws_plugin__s2member_auto_eots"))
284
  /**/
285
  c_ws_plugin__s2member_utils_logs::cleanup_expired_s2m_transients (); /* Cleanup. */
286
  /**/
287
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
288
  do_action ("ws_plugin__s2member_after_auto_eot_system", get_defined_vars ());
289
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
290
  /**/
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_auto_eots"))
21
  {
68
  /**/
69
  if (function_exists ("wp_cron")) /* Is `wp_cron()` even available? */
70
  {
71
+ wp_clear_scheduled_hook ("ws_plugin__s2member_auto_eot_system__schedule"); /* Since v3.0.3. */
72
  /**/
73
  return apply_filters ("ws_plugin__s2member_delete_auto_eot_system", true, get_defined_vars ());
74
  }
102
  /**/
103
  include_once ABSPATH . "wp-admin/includes/admin.php";
104
  /**/
105
+ @set_time_limit (0); /* Make time for processing larger userbases. */
106
  @ini_set ("memory_limit", "256M"); /* Acquire some additional RAM. */
107
  /**/
108
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
109
  do_action ("ws_plugin__s2member_before_auto_eot_system", get_defined_vars ());
110
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
111
  /**/
136
  $demotion_role = c_ws_plugin__s2member_option_forces::force_demotion_role ("subscriber");
137
  $existing_role = c_ws_plugin__s2member_user_access::user_access_role ($user);
138
  /**/
139
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
140
  do_action ("ws_plugin__s2member_during_auto_eot_system_during_before_demote", get_defined_vars ());
141
  do_action ("ws_plugin__s2member_during_collective_mods", $user_id, get_defined_vars (), $eot_del_type, "modification", $demotion_role);
142
  do_action ("ws_plugin__s2member_during_collective_eots", $user_id, get_defined_vars (), $eot_del_type, "modification");
180
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
181
  {
182
  if (is_array ($fields) && !empty ($fields))
183
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
184
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
185
  break;
186
  /**/
231
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
232
  {
233
  if (is_array ($fields) && !empty ($fields))
234
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
235
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
236
  break;
237
  /**/
244
  c_ws_plugin__s2member_email_configs::email_config ();
245
  }
246
  /**/
247
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
248
  do_action ("ws_plugin__s2member_during_auto_eot_system_during_demote", get_defined_vars ());
249
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
250
  }
252
  {
253
  $eot_del_type = $GLOBALS["ws_plugin__s2member_eot_del_type"] = "auto-eot-cancellation-expiration-deletion";
254
  /**/
255
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
256
  do_action ("ws_plugin__s2member_during_auto_eot_system_during_before_delete", get_defined_vars ());
257
  do_action ("ws_plugin__s2member_during_collective_eots", $user_id, get_defined_vars (), $eot_del_type, "removal-deletion");
258
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
266
  /**/
267
  else /* Otherwise, we can actually delete them. */
268
  /* This will automatically trigger `eot_del_notification_urls` as well. */
269
+ wp_delete_user ($user_id); /* `c_ws_plugin__s2member_user_deletions::handle_user_deletions()` */
270
  /**/
271
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
272
  do_action ("ws_plugin__s2member_during_auto_eot_system_during_delete", get_defined_vars ());
273
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
274
  }
275
  /**/
276
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
277
  do_action ("ws_plugin__s2member_during_auto_eot_system", get_defined_vars ());
278
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
279
  }
284
  /**/
285
  c_ws_plugin__s2member_utils_logs::cleanup_expired_s2m_transients (); /* Cleanup. */
286
  /**/
287
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
288
  do_action ("ws_plugin__s2member_after_auto_eot_system", get_defined_vars ());
289
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
290
  /**/
includes/classes/constants.inc.php CHANGED
@@ -965,7 +965,7 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
965
  * o `subscr_or_wp_id` = value of {@link s2Member\API_Constants\S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID}
966
  * o `subscr_gateway` = value of {@link s2Member\API_Constants\S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY}
967
  * o `custom` = value of {@link s2Member\API_Constants\S2MEMBER_CURRENT_USER_CUSTOM}
968
- * o and any Custom Registration Fields configured by the site owner.
969
  *
970
  * This will be an empty JSON-encoded array if NOT logged-in.
971
  *
@@ -974,7 +974,7 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
974
  * <!php
975
  * $fields = json_decode(S2MEMBER_CURRENT_USER_FIELDS, true);
976
  * echo $fields["email"]; # The current User's Email Address.
977
- * echo $fields["my_unique_field_id"]; # A Custom Registration Field configured by the site owner.
978
  * !>
979
  * ```
980
  * ———— Shortcode & JavaScript Equivalents ————
@@ -2056,7 +2056,7 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
2056
  * PayPal® value for Payment Buttons with input name: `invoice`.
2057
  *
2058
  * This can be used to auto-fill the `invoice` value in PayPal® Button Codes, with a unique Code~IP combination.
2059
- * However, in cases where multiple Buttons are displayed on the same page, the alternative {@link s2Member\API_Functions\S2MEMBER_VALUE_FOR_PP_INV()} function should be used instead.
2060
  *
2061
  * Note. This API Constant is excluded from the ``$c[]`` hash calculation used in the generation of {@link s2Member\API_Constants\WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5}.
2062
  * It MUST be excluded, because the value of this particular API Constant will change too often *( i.e. it changes, depending on microtime )*.
@@ -2073,7 +2073,7 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
2073
  * They are used by the PayPal® Button Generator for s2Member.
2074
  *
2075
  * The `INV` value can be used to auto-fill the `invoice` for PayPal® Button Codes, with a unique Code~IP combination.
2076
- * However, in cases where multiple Buttons are displayed on the same page, the alternative {@link s2Member\API_Functions\S2MEMBER_VALUE_FOR_PP_INV()} function should be used instead.
2077
  *
2078
  * The `ON0/OS0` values, are how s2Member identifies an existing Member *( and/or a Free Subscriber )*, who is already logged-in
2079
  * when they click a PayPal® Modification Button that was generated for you by s2Member's Button Generator.
@@ -2106,7 +2106,7 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
2106
  *
2107
  * @var str
2108
  *
2109
- * @see s2Member\API_Functions\S2MEMBER_VALUE_FOR_PP_INV()
2110
  *
2111
  * @see `Dashboard -> s2Member -> PayPal® Buttons`
2112
  */
@@ -2131,7 +2131,7 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
2131
  * They are used by the PayPal® Button Generator for s2Member.
2132
  *
2133
  * The `INV` value can be used to auto-fill the `invoice` for PayPal® Button Codes, with a unique Code~IP combination.
2134
- * However, in cases where multiple Buttons are displayed on the same page, the alternative {@link s2Member\API_Functions\S2MEMBER_VALUE_FOR_PP_INV()} function should be used instead.
2135
  *
2136
  * The `ON0/OS0` values, are how s2Member identifies an existing Member *( and/or a Free Subscriber )*, who is already logged-in
2137
  * when they click a PayPal® Modification Button that was generated for you by s2Member's Button Generator.
@@ -2189,7 +2189,7 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
2189
  * They are used by the PayPal® Button Generator for s2Member.
2190
  *
2191
  * The `INV` value can be used to auto-fill the `invoice` for PayPal® Button Codes, with a unique Code~IP combination.
2192
- * However, in cases where multiple Buttons are displayed on the same page, the alternative {@link s2Member\API_Functions\S2MEMBER_VALUE_FOR_PP_INV()} function should be used instead.
2193
  *
2194
  * The `ON0/OS0` values, are how s2Member identifies an existing Member *( and/or a Free Subscriber )*, who is already logged-in
2195
  * when they click a PayPal® Modification Button that was generated for you by s2Member's Button Generator.
@@ -2244,7 +2244,7 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
2244
  * They are used by the PayPal® Button Generator for s2Member.
2245
  *
2246
  * The `INV` value can be used to auto-fill the `invoice` for PayPal® Button Codes, with a unique Code~IP combination.
2247
- * However, in cases where multiple Buttons are displayed on the same page, the alternative {@link s2Member\API_Functions\S2MEMBER_VALUE_FOR_PP_INV()} function should be used instead.
2248
  *
2249
  * The `ON0/OS0` values, are how s2Member identifies an existing Member *( and/or a Free Subscriber )*, who is already logged-in
2250
  * when they click a PayPal® Modification Button that was generated for you by s2Member's Button Generator.
@@ -2299,7 +2299,7 @@ if (!class_exists ("c_ws_plugin__s2member_constants"))
2299
  * They are used by the PayPal® Button Generator for s2Member.
2300
  *
2301
  * The `INV` value can be used to auto-fill the `invoice` for PayPal® Button Codes, with a unique Code~IP combination.
2302
- * However, in cases where multiple Buttons are displayed on the same page, the alternative {@link s2Member\API_Functions\S2MEMBER_VALUE_FOR_PP_INV()} function should be used instead.
2303
  *
2304
  * The `ON0/OS0` values, are how s2Member identifies an existing Member *( and/or a Free Subscriber )*, who is already logged-in
2305
  * when they click a PayPal® Modification Button that was generated for you by s2Member's Button Generator.
965
  * o `subscr_or_wp_id` = value of {@link s2Member\API_Constants\S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID}
966
  * o `subscr_gateway` = value of {@link s2Member\API_Constants\S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY}
967
  * o `custom` = value of {@link s2Member\API_Constants\S2MEMBER_CURRENT_USER_CUSTOM}
968
+ * o and any Custom Registration/Profile Fields configured by the site owner.
969
  *
970
  * This will be an empty JSON-encoded array if NOT logged-in.
971
  *
974
  * <!php
975
  * $fields = json_decode(S2MEMBER_CURRENT_USER_FIELDS, true);
976
  * echo $fields["email"]; # The current User's Email Address.
977
+ * echo $fields["my_unique_field_id"]; # A Custom Registration/Profile Field configured by the site owner.
978
  * !>
979
  * ```
980
  * ———— Shortcode & JavaScript Equivalents ————
2056
  * PayPal® value for Payment Buttons with input name: `invoice`.
2057
  *
2058
  * This can be used to auto-fill the `invoice` value in PayPal® Button Codes, with a unique Code~IP combination.
2059
+ * However, in cases where multiple Buttons are displayed on the same page, the alternative {@link s2Member\API_Functions\s2member_value_for_pp_inv()} function should be used instead.
2060
  *
2061
  * Note. This API Constant is excluded from the ``$c[]`` hash calculation used in the generation of {@link s2Member\API_Constants\WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5}.
2062
  * It MUST be excluded, because the value of this particular API Constant will change too often *( i.e. it changes, depending on microtime )*.
2073
  * They are used by the PayPal® Button Generator for s2Member.
2074
  *
2075
  * The `INV` value can be used to auto-fill the `invoice` for PayPal® Button Codes, with a unique Code~IP combination.
2076
+ * However, in cases where multiple Buttons are displayed on the same page, the alternative {@link s2Member\API_Functions\s2member_value_for_pp_inv()} function should be used instead.
2077
  *
2078
  * The `ON0/OS0` values, are how s2Member identifies an existing Member *( and/or a Free Subscriber )*, who is already logged-in
2079
  * when they click a PayPal® Modification Button that was generated for you by s2Member's Button Generator.
2106
  *
2107
  * @var str
2108
  *
2109
+ * @see s2Member\API_Functions\s2member_value_for_pp_inv()
2110
  *
2111
  * @see `Dashboard -> s2Member -> PayPal® Buttons`
2112
  */
2131
  * They are used by the PayPal® Button Generator for s2Member.
2132
  *
2133
  * The `INV` value can be used to auto-fill the `invoice` for PayPal® Button Codes, with a unique Code~IP combination.
2134
+ * However, in cases where multiple Buttons are displayed on the same page, the alternative {@link s2Member\API_Functions\s2member_value_for_pp_inv()} function should be used instead.
2135
  *
2136
  * The `ON0/OS0` values, are how s2Member identifies an existing Member *( and/or a Free Subscriber )*, who is already logged-in
2137
  * when they click a PayPal® Modification Button that was generated for you by s2Member's Button Generator.
2189
  * They are used by the PayPal® Button Generator for s2Member.
2190
  *
2191
  * The `INV` value can be used to auto-fill the `invoice` for PayPal® Button Codes, with a unique Code~IP combination.
2192
+ * However, in cases where multiple Buttons are displayed on the same page, the alternative {@link s2Member\API_Functions\s2member_value_for_pp_inv()} function should be used instead.
2193
  *
2194
  * The `ON0/OS0` values, are how s2Member identifies an existing Member *( and/or a Free Subscriber )*, who is already logged-in
2195
  * when they click a PayPal® Modification Button that was generated for you by s2Member's Button Generator.
2244
  * They are used by the PayPal® Button Generator for s2Member.
2245
  *
2246
  * The `INV` value can be used to auto-fill the `invoice` for PayPal® Button Codes, with a unique Code~IP combination.
2247
+ * However, in cases where multiple Buttons are displayed on the same page, the alternative {@link s2Member\API_Functions\s2member_value_for_pp_inv()} function should be used instead.
2248
  *
2249
  * The `ON0/OS0` values, are how s2Member identifies an existing Member *( and/or a Free Subscriber )*, who is already logged-in
2250
  * when they click a PayPal® Modification Button that was generated for you by s2Member's Button Generator.
2299
  * They are used by the PayPal® Button Generator for s2Member.
2300
  *
2301
  * The `INV` value can be used to auto-fill the `invoice` for PayPal® Button Codes, with a unique Code~IP combination.
2302
+ * However, in cases where multiple Buttons are displayed on the same page, the alternative {@link s2Member\API_Functions\s2member_value_for_pp_inv()} function should be used instead.
2303
  *
2304
  * The `ON0/OS0` values, are how s2Member identifies an existing Member *( and/or a Free Subscriber )*, who is already logged-in
2305
  * when they click a PayPal® Modification Button that was generated for you by s2Member's Button Generator.
includes/classes/css-js-in.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
21
  {
@@ -43,21 +43,20 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
43
  /**/
44
  if (!empty ($_GET["ws_plugin__s2member_css"]))
45
  {
46
- @ini_set ("zlib.output_compression", 0);
47
  /**/
48
- status_header(200); /* 200 OK status header. */
49
- header("Content-Type: text/css; charset=utf-8");
50
- header("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("+1 week")) . " GMT");
51
- header("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
52
- header("Cache-Control: max-age=604800");
53
- header("Pragma: public");
54
  /**/
55
- eval('while (@ob_end_clean ());'); /* Clean buffers. */
56
  /**/
57
  $u = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"];
58
  $i = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images";
59
  /**/
60
- ob_start("c_ws_plugin__s2member_utils_css::compress_css");
61
  /**/
62
  include_once dirname (dirname (__FILE__)) . "/s2member.css";
63
  /**/
@@ -86,16 +85,15 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
86
  /**/
87
  if (!empty ($_GET["ws_plugin__s2member_js_w_globals"]))
88
  {
89
- @ini_set ("zlib.output_compression", 0);
90
  /**/
91
- status_header(200); /* 200 OK status header. */
92
- header("Content-Type: text/javascript; charset=utf-8");
93
- header("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("+1 week")) . " GMT");
94
- header("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
95
- header("Cache-Control: max-age=604800");
96
- header("Pragma: public");
97
  /**/
98
- eval('while (@ob_end_clean ());'); /* Clean buffers. */
99
  /**/
100
  include_once dirname (dirname (__FILE__)) . "/jquery/jquery.sprintf/jquery.sprintf-min.js";
101
  /**/
@@ -181,7 +179,7 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
181
  echo "S2MEMBER_PAYPAL_API_ENDPOINT = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_PAYPAL_API_ENDPOINT) . "',";
182
  /**/
183
  echo "S2MEMBER_VALUE_FOR_PP_INV = Math.round (new Date ().getTime ()) + '~" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_IP) . "',";
184
- echo "S2MEMBER_VALUE_FOR_PP_INV_GEN = function(){ var invoice = '', formatSeed = function(seed, reqWidth) { seed = parseInt(seed, 10).toString (16); if (reqWidth < seed.length) return seed.slice (seed.length - reqWidth); else if (reqWidth > seed.length) return Array(1 + (reqWidth - seed.length)).join ('0') + seed; return seed; }; if (typeof S2MEMBER_VALUE_FOR_PP_INV_GEN_UNIQUE_SEED === 'undefined') S2MEMBER_VALUE_FOR_PP_INV_GEN_UNIQUE_SEED = Math.floor (Math.random () * 0x75bcd15); S2MEMBER_VALUE_FOR_PP_INV_GEN_UNIQUE_SEED++; invoice = formatSeed(parseInt(new Date ().getTime () / 1000, 10), 8); invoice += formatSeed(S2MEMBER_VALUE_FOR_PP_INV_GEN_UNIQUE_SEED, 5); invoice += '~' + S2MEMBER_CURRENT_USER_IP; return invoice; },";
185
  /**/
186
  echo "S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0 = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0) . "',";
187
  echo "S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0 = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0) . "',";
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
21
  {
43
  /**/
44
  if (!empty ($_GET["ws_plugin__s2member_css"]))
45
  {
46
+ status_header (200); /* 200 OK status header. */
47
  /**/
48
+ header ("Content-Type: text/css; charset=utf-8");
49
+ header ("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("+1 week")) . " GMT");
50
+ header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
51
+ header ("Cache-Control: max-age=604800");
52
+ header ("Pragma: public");
 
53
  /**/
54
+ eval ('while (@ob_end_clean ());'); /* Clean buffers. */
55
  /**/
56
  $u = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"];
57
  $i = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images";
58
  /**/
59
+ ob_start ("c_ws_plugin__s2member_utils_css::compress_css");
60
  /**/
61
  include_once dirname (dirname (__FILE__)) . "/s2member.css";
62
  /**/
85
  /**/
86
  if (!empty ($_GET["ws_plugin__s2member_js_w_globals"]))
87
  {
88
+ status_header (200); /* 200 OK status header. */
89
  /**/
90
+ header ("Content-Type: text/javascript; charset=utf-8");
91
+ header ("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("+1 week")) . " GMT");
92
+ header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
93
+ header ("Cache-Control: max-age=604800");
94
+ header ("Pragma: public");
 
95
  /**/
96
+ eval ('while (@ob_end_clean ());'); /* Clean buffers. */
97
  /**/
98
  include_once dirname (dirname (__FILE__)) . "/jquery/jquery.sprintf/jquery.sprintf-min.js";
99
  /**/
179
  echo "S2MEMBER_PAYPAL_API_ENDPOINT = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_PAYPAL_API_ENDPOINT) . "',";
180
  /**/
181
  echo "S2MEMBER_VALUE_FOR_PP_INV = Math.round (new Date ().getTime ()) + '~" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_IP) . "',";
182
+ echo "S2MEMBER_VALUE_FOR_PP_INV_GEN = s2member_value_for_pp_inv_gen = function(){ var invoice = '', formatSeed = function(seed, reqWidth) { seed = parseInt(seed, 10).toString (16); if (reqWidth < seed.length) return seed.slice (seed.length - reqWidth); else if (reqWidth > seed.length) return Array(1 + (reqWidth - seed.length)).join ('0') + seed; return seed; }; if (typeof S2MEMBER_VALUE_FOR_PP_INV_GEN_UNIQUE_SEED === 'undefined') S2MEMBER_VALUE_FOR_PP_INV_GEN_UNIQUE_SEED = Math.floor (Math.random () * 0x75bcd15); S2MEMBER_VALUE_FOR_PP_INV_GEN_UNIQUE_SEED++; invoice = formatSeed(parseInt(new Date ().getTime () / 1000, 10), 8); invoice += formatSeed(S2MEMBER_VALUE_FOR_PP_INV_GEN_UNIQUE_SEED, 5); invoice += '~' + S2MEMBER_CURRENT_USER_IP; return invoice; },";
183
  /**/
184
  echo "S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0 = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0) . "',";
185
  echo "S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0 = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0) . "',";
includes/classes/custom-reg-fields-4bp.inc.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Custom Registration Fields for BuddyPress integration.
4
  *
5
  * Copyright: © 2009-2011
6
  * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
@@ -15,12 +15,12 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
21
  {
22
  /**
23
- * Custom Registration Fields for BuddyPress integration.
24
  *
25
  * @package s2Member\Custom_Reg_Fields
26
  * @since 3.5
@@ -52,8 +52,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
52
  $_p = (!empty ($_POST)) ? c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_POST)) : array ();
53
  /**/
54
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"])
55
- if ($fields_applicable = c_ws_plugin__s2member_custom_reg_fields::custom_fields_configured_at_level ("auto-detection", "registration")/**/
56
- || ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"] && c_ws_plugin__s2member_list_servers::list_servers_integrated ()))
57
  if (($close_section_container = true))
58
  {
59
  echo '<div id="ws-plugin--s2member-custom-reg-fields-4bp-section" class="ws-plugin--s2member-custom-reg-fields-4bp-section register-section">' . "\n";
@@ -61,7 +60,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
61
  echo '<input type="hidden" name="ws_plugin__s2member_registration" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-registration")) . '" />' . "\n";
62
  }
63
  /**/
64
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
65
  do_action ("ws_plugin__s2member_during_custom_registration_fields_4bp_before", get_defined_vars ());
66
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
67
  /**/
@@ -70,7 +69,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
70
  {
71
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
72
  {
73
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
74
  do_action ("ws_plugin__s2member_during_custom_registration_fields_4bp_before_custom_fields", get_defined_vars ());
75
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
76
  /**/
@@ -79,7 +78,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
79
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
80
  $field_id_class = preg_replace ("/_/", "-", $field_var);
81
  /**/
82
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
83
  if (apply_filters ("ws_plugin__s2member_during_custom_registration_fields_4bp_during_custom_fields_display", true, get_defined_vars ()))
84
  {
85
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
@@ -94,7 +93,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
94
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
95
  }
96
  /**/
97
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
98
  do_action ("ws_plugin__s2member_during_custom_registration_fields_4bp_after_custom_fields", get_defined_vars ());
99
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
100
  }
@@ -102,7 +101,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
102
  /**/
103
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"] && c_ws_plugin__s2member_list_servers::list_servers_integrated ())
104
  {
105
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
106
  do_action ("ws_plugin__s2member_during_custom_registration_fields_4bp_before_opt_in", get_defined_vars ());
107
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
108
  /**/
@@ -113,15 +112,15 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
113
  echo '</label>' . "\n";
114
  echo '</div>' . "\n";
115
  /**/
116
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
117
  do_action ("ws_plugin__s2member_during_custom_registration_fields_4bp_after_opt_in", get_defined_vars ());
118
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
119
  }
120
  /**/
121
- if ($close_section_container)
122
- echo '</div></div>' . "\n";
123
  /**/
124
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
125
  do_action ("ws_plugin__s2member_during_custom_registration_fields_4bp_after", get_defined_vars ());
126
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
127
  }
@@ -156,7 +155,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
156
  {
157
  echo '<input type="hidden" name="ws_plugin__s2member_profile_4bp_save" id="ws-plugin--s2member-profile-4bp-save" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-profile-4bp-save")) . '" />' . "\n";
158
  /**/
159
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
160
  do_action ("ws_plugin__s2member_during_custom_profile_fields_4bp_before", get_defined_vars ());
161
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
162
  /**/
@@ -168,7 +167,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
168
  /**/
169
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
170
  {
171
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
172
  do_action ("ws_plugin__s2member_during_custom_profile_fields_4bp_before_custom_fields", get_defined_vars ());
173
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
174
  /**/
@@ -177,7 +176,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
177
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
178
  $field_id_class = preg_replace ("/_/", "-", $field_var);
179
  /**/
180
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
181
  if (apply_filters ("ws_plugin__s2member_during_custom_profile_fields_4bp_during_custom_fields_display", true, get_defined_vars ()))
182
  {
183
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
@@ -192,13 +191,13 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
192
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
193
  }
194
  /**/
195
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
196
  do_action ("ws_plugin__s2member_during_custom_profile_fields_4bp_after_custom_fields", get_defined_vars ());
197
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
198
  }
199
  }
200
  /**/
201
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
202
  do_action ("ws_plugin__s2member_during_custom_profile_fields_4bp_after", get_defined_vars ());
203
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
204
  }
@@ -231,7 +230,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
231
  if (isset ($bp->displayed_user->id) && ($user_id = $bp->displayed_user->id))
232
  if (($processed = true)) /* Mark as having been processed now. */
233
  {
234
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
235
  do_action ("ws_plugin__s2member_during_custom_profile_field_items_4bp_before", get_defined_vars ());
236
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
237
  /**/
@@ -243,7 +242,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
243
  /**/
244
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
245
  {
246
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
247
  do_action ("ws_plugin__s2member_during_custom_profile_field_items_4bp_before_custom_fields", get_defined_vars ());
248
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
249
  /**/
@@ -252,7 +251,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
252
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
253
  $field_id_class = preg_replace ("/_/", "-", $field_var);
254
  /**/
255
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
256
  if (apply_filters ("ws_plugin__s2member_during_custom_profile_field_items_4bp_during_custom_fields_display", true, get_defined_vars ()))
257
  {
258
  if (!empty ($field["section"]) && $field["section"] === "yes") /* New section? */
@@ -270,13 +269,13 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
270
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
271
  }
272
  /**/
273
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
274
  do_action ("ws_plugin__s2member_during_custom_profile_field_items_4bp_after_custom_fields", get_defined_vars ());
275
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
276
  }
277
  }
278
  /**/
279
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
280
  do_action ("ws_plugin__s2member_during_custom_profile_field_items_4bp_after", get_defined_vars ());
281
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
282
  }
1
  <?php
2
  /**
3
+ * Custom Registration/Profile Fields for BuddyPress integration.
4
  *
5
  * Copyright: © 2009-2011
6
  * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
21
  {
22
  /**
23
+ * Custom Registration/Profile Fields for BuddyPress integration.
24
  *
25
  * @package s2Member\Custom_Reg_Fields
26
  * @since 3.5
52
  $_p = (!empty ($_POST)) ? c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_POST)) : array ();
53
  /**/
54
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"])
55
+ if (($fields_applicable = c_ws_plugin__s2member_custom_reg_fields::custom_fields_configured_at_level ("auto-detection", "registration")) || ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"] && c_ws_plugin__s2member_list_servers::list_servers_integrated ()))
 
56
  if (($close_section_container = true))
57
  {
58
  echo '<div id="ws-plugin--s2member-custom-reg-fields-4bp-section" class="ws-plugin--s2member-custom-reg-fields-4bp-section register-section">' . "\n";
60
  echo '<input type="hidden" name="ws_plugin__s2member_registration" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-registration")) . '" />' . "\n";
61
  }
62
  /**/
63
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
64
  do_action ("ws_plugin__s2member_during_custom_registration_fields_4bp_before", get_defined_vars ());
65
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
66
  /**/
69
  {
70
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
71
  {
72
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
73
  do_action ("ws_plugin__s2member_during_custom_registration_fields_4bp_before_custom_fields", get_defined_vars ());
74
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
75
  /**/
78
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
79
  $field_id_class = preg_replace ("/_/", "-", $field_var);
80
  /**/
81
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
82
  if (apply_filters ("ws_plugin__s2member_during_custom_registration_fields_4bp_during_custom_fields_display", true, get_defined_vars ()))
83
  {
84
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
93
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
94
  }
95
  /**/
96
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
97
  do_action ("ws_plugin__s2member_during_custom_registration_fields_4bp_after_custom_fields", get_defined_vars ());
98
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
99
  }
101
  /**/
102
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"] && c_ws_plugin__s2member_list_servers::list_servers_integrated ())
103
  {
104
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
105
  do_action ("ws_plugin__s2member_during_custom_registration_fields_4bp_before_opt_in", get_defined_vars ());
106
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
107
  /**/
112
  echo '</label>' . "\n";
113
  echo '</div>' . "\n";
114
  /**/
115
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
116
  do_action ("ws_plugin__s2member_during_custom_registration_fields_4bp_after_opt_in", get_defined_vars ());
117
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
118
  }
119
  /**/
120
+ if (isset ($close_section_container) && $close_section_container)
121
+ echo '</div>' . "\n" . '</div>' . "\n";
122
  /**/
123
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
124
  do_action ("ws_plugin__s2member_during_custom_registration_fields_4bp_after", get_defined_vars ());
125
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
126
  }
155
  {
156
  echo '<input type="hidden" name="ws_plugin__s2member_profile_4bp_save" id="ws-plugin--s2member-profile-4bp-save" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-profile-4bp-save")) . '" />' . "\n";
157
  /**/
158
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
159
  do_action ("ws_plugin__s2member_during_custom_profile_fields_4bp_before", get_defined_vars ());
160
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
161
  /**/
167
  /**/
168
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
169
  {
170
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
171
  do_action ("ws_plugin__s2member_during_custom_profile_fields_4bp_before_custom_fields", get_defined_vars ());
172
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
173
  /**/
176
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
177
  $field_id_class = preg_replace ("/_/", "-", $field_var);
178
  /**/
179
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
180
  if (apply_filters ("ws_plugin__s2member_during_custom_profile_fields_4bp_during_custom_fields_display", true, get_defined_vars ()))
181
  {
182
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
191
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
192
  }
193
  /**/
194
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
195
  do_action ("ws_plugin__s2member_during_custom_profile_fields_4bp_after_custom_fields", get_defined_vars ());
196
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
197
  }
198
  }
199
  /**/
200
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
201
  do_action ("ws_plugin__s2member_during_custom_profile_fields_4bp_after", get_defined_vars ());
202
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
203
  }
230
  if (isset ($bp->displayed_user->id) && ($user_id = $bp->displayed_user->id))
231
  if (($processed = true)) /* Mark as having been processed now. */
232
  {
233
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
234
  do_action ("ws_plugin__s2member_during_custom_profile_field_items_4bp_before", get_defined_vars ());
235
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
236
  /**/
242
  /**/
243
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
244
  {
245
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
246
  do_action ("ws_plugin__s2member_during_custom_profile_field_items_4bp_before_custom_fields", get_defined_vars ());
247
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
248
  /**/
251
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
252
  $field_id_class = preg_replace ("/_/", "-", $field_var);
253
  /**/
254
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
255
  if (apply_filters ("ws_plugin__s2member_during_custom_profile_field_items_4bp_during_custom_fields_display", true, get_defined_vars ()))
256
  {
257
  if (!empty ($field["section"]) && $field["section"] === "yes") /* New section? */
269
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
270
  }
271
  /**/
272
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
273
  do_action ("ws_plugin__s2member_during_custom_profile_field_items_4bp_after_custom_fields", get_defined_vars ());
274
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
275
  }
276
  }
277
  /**/
278
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
279
  do_action ("ws_plugin__s2member_during_custom_profile_field_items_4bp_after", get_defined_vars ());
280
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
281
  }
includes/classes/custom-reg-fields.inc.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Custom Registration Fields for s2Member.
4
  *
5
  * Copyright: © 2009-2011
6
  * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
@@ -15,12 +15,12 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
21
  {
22
  /**
23
- * Custom Registration Fields for s2Member.
24
  *
25
  * @package s2Member\Custom_Reg_Fields
26
  * @since 3.5
@@ -48,13 +48,13 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
48
  */
49
  public static function custom_field_gen ($_function = FALSE, $_field = FALSE, $_name_prefix = FALSE, $_id_prefix = FALSE, $_classes = FALSE, $_styles = FALSE, $_tabindex = FALSE, $_attrs = FALSE, $_submission = FALSE, $_value = FALSE, $_editable_context = FALSE)
50
  {
51
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
52
  do_action ("ws_plugin__s2member_before_custom_field_gen", get_defined_vars ());
53
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
54
  /**/
55
  if (!($gen = "") && $_function && is_array ($field = $_field) && !empty ($field["type"]) && !empty ($field["id"]) && $_name_prefix && $_id_prefix)
56
  {
57
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
58
  do_action ("ws_plugin__s2member_during_custom_field_gen_before", get_defined_vars ());
59
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
60
  /**/
@@ -70,7 +70,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
70
  $common .= ((!empty ($field["required"]) && $field["required"] === "yes") ? ' aria-required="true"' : '');
71
  $common .= ((strlen ($_tabindex)) ? ' tabindex="' . esc_attr ($_tabindex) . '"' : ''); /* No tabindex if empty. */
72
  $common .= ((!empty ($field["expected"])) ? ' data-expected="' . esc_attr ($field["expected"]) . '"' : ''); /* Certain data expected? */
73
- $common .= (($_editable_context === "profile-view" || (!empty ($field["editable"]) && preg_match ("/^no/", $field["editable"]) && $_editable_context === "profile")) ? ' disabled="disabled"' : '');
74
  $common .= (($_classes || !empty ($field["classes"])) ? ' class="' . esc_attr (trim ($_classes . ((!empty ($field["classes"])) ? ' ' . $field["classes"] : ''))) . '"' : '');
75
  $common .= (($_styles || !empty ($field["styles"])) ? ' style="' . esc_attr (trim ($_styles . ((!empty ($field["styles"])) ? ' ' . $field["styles"] : ''))) . '"' : '');
76
  $common .= (($_attrs || !empty ($field["attrs"])) ? ' ' . trim ($_attrs . ((!empty ($field["attrs"])) ? ' ' . $field["attrs"] : '')) : '');
@@ -258,7 +258,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
258
  }
259
  }
260
  /**/
261
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
262
  do_action ("ws_plugin__s2member_during_custom_field_gen_after", get_defined_vars ());
263
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
264
  }
@@ -278,7 +278,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
278
  */
279
  public static function custom_fields_configured_at_level ($_level = "auto-detection", $_editable_context = FALSE)
280
  {
281
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
282
  do_action ("ws_plugin__s2member_before_custom_fields_configured_at_level", get_defined_vars ());
283
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
284
  /**/
@@ -322,7 +322,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
322
  /**/
323
  echo '<input type="hidden" name="ws_plugin__s2member_registration" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-registration")) . '" />' . "\n";
324
  /**/
325
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
326
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_before", get_defined_vars ());
327
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
328
  /**/
@@ -330,7 +330,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
330
  {
331
  echo '<div class="ws-plugin--s2member-custom-reg-field-divider-section"></div>' . "\n";
332
  /**/
333
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
334
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_before_first_name", get_defined_vars ());
335
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
336
  /**/
@@ -338,11 +338,11 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
338
  echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_custom_reg_field_first_name" id="ws-plugin--s2member-custom-reg-field-first-name" class="ws-plugin--s2member-custom-reg-field" value="' . esc_attr ($_p["ws_plugin__s2member_custom_reg_field_first_name"]) . '" />' . "\n";
339
  echo '<br />' . "\n";
340
  /**/
341
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
342
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_after_first_name", get_defined_vars ());
343
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
344
  /**/
345
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
346
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_before_last_name", get_defined_vars ());
347
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
348
  /**/
@@ -350,7 +350,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
350
  echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_custom_reg_field_last_name" id="ws-plugin--s2member-custom-reg-field-last-name" class="ws-plugin--s2member-custom-reg-field" value="' . esc_attr ($_p["ws_plugin__s2member_custom_reg_field_last_name"]) . '" />' . "\n";
351
  echo '<br />' . "\n";
352
  /**/
353
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
354
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_after_last_name", get_defined_vars ());
355
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
356
  }
@@ -359,7 +359,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
359
  if ($fields_applicable = c_ws_plugin__s2member_custom_reg_fields::custom_fields_configured_at_level ("auto-detection", "registration"))
360
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
361
  {
362
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
363
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_before_custom_fields", get_defined_vars ());
364
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
365
  /**/
@@ -368,7 +368,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
368
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
369
  $field_id_class = preg_replace ("/_/", "-", $field_var);
370
  /**/
371
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
372
  if (apply_filters ("ws_plugin__s2member_during_ms_custom_registration_fields_during_custom_fields_display", true, get_defined_vars ()))
373
  {
374
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
@@ -381,14 +381,14 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
381
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
382
  }
383
  /**/
384
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
385
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_after_custom_fields", get_defined_vars ());
386
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
387
  }
388
  /**/
389
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"] && c_ws_plugin__s2member_list_servers::list_servers_integrated ())
390
  {
391
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
392
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_before_opt_in", get_defined_vars ());
393
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
394
  /**/
@@ -398,17 +398,17 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
398
  echo '</label>' . "\n";
399
  echo '<br />' . "\n";
400
  /**/
401
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
402
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_after_opt_in", get_defined_vars ());
403
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
404
  }
405
  /**/
406
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
407
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_after", get_defined_vars ());
408
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
409
  }
410
  /**/
411
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
412
  do_action ("ws_plugin__s2member_after_ms_custom_registration_fields", get_defined_vars ());
413
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
414
  /**/
@@ -436,13 +436,13 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
436
  /**/
437
  $tabindex = 20; /* Incremented tabindex starting with 20. */
438
  /**/
439
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
440
  do_action ("ws_plugin__s2member_during_custom_registration_fields_before", get_defined_vars ());
441
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
442
  /**/
443
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"])
444
  {
445
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
446
  do_action ("ws_plugin__s2member_during_custom_registration_fields_before_user_pass", get_defined_vars ());
447
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
448
  /**/
@@ -461,7 +461,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
461
  /**/
462
  echo '</p>' . "\n";
463
  /**/
464
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
465
  do_action ("ws_plugin__s2member_during_custom_registration_fields_after_user_pass", get_defined_vars ());
466
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
467
  }
@@ -470,7 +470,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
470
  {
471
  echo '<div class="ws-plugin--s2member-custom-reg-field-divider-section"></div>' . "\n";
472
  /**/
473
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
474
  do_action ("ws_plugin__s2member_during_custom_registration_fields_before_first_name", get_defined_vars ());
475
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
476
  /**/
@@ -481,11 +481,11 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
481
  echo '</label>' . "\n";
482
  echo '</p>' . "\n";
483
  /**/
484
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
485
  do_action ("ws_plugin__s2member_during_custom_registration_fields_after_first_name", get_defined_vars ());
486
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
487
  /**/
488
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
489
  do_action ("ws_plugin__s2member_during_custom_registration_fields_before_last_name", get_defined_vars ());
490
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
491
  /**/
@@ -496,7 +496,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
496
  echo '</label>' . "\n";
497
  echo '</p>' . "\n";
498
  /**/
499
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
500
  do_action ("ws_plugin__s2member_during_custom_registration_fields_after_last_name", get_defined_vars ());
501
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
502
  }
@@ -508,7 +508,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
508
  /**/
509
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
510
  {
511
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
512
  do_action ("ws_plugin__s2member_during_custom_registration_fields_before_custom_fields", get_defined_vars ());
513
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
514
  /**/
@@ -517,7 +517,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
517
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
518
  $field_id_class = preg_replace ("/_/", "-", $field_var);
519
  /**/
520
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
521
  if (apply_filters ("ws_plugin__s2member_during_custom_registration_fields_during_custom_fields_display", true, get_defined_vars ()))
522
  {
523
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
@@ -532,7 +532,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
532
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
533
  }
534
  /**/
535
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
536
  do_action ("ws_plugin__s2member_during_custom_registration_fields_after_custom_fields", get_defined_vars ());
537
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
538
  }
@@ -540,7 +540,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
540
  /**/
541
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"] && c_ws_plugin__s2member_list_servers::list_servers_integrated ())
542
  {
543
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
544
  do_action ("ws_plugin__s2member_during_custom_registration_fields_before_opt_in", get_defined_vars ());
545
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
546
  /**/
@@ -551,16 +551,16 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
551
  echo '</label>' . "\n";
552
  echo '</p>' . "\n";
553
  /**/
554
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
555
  do_action ("ws_plugin__s2member_during_custom_registration_fields_after_opt_in", get_defined_vars ());
556
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
557
  }
558
  /**/
559
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
560
  do_action ("ws_plugin__s2member_during_custom_registration_fields_after", get_defined_vars ());
561
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
562
  /**/
563
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
564
  do_action ("ws_plugin__s2member_after_custom_registration_fields", get_defined_vars ());
565
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
566
  /**/
1
  <?php
2
  /**
3
+ * Custom Registration/Profile Fields for s2Member.
4
  *
5
  * Copyright: © 2009-2011
6
  * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
21
  {
22
  /**
23
+ * Custom Registration/Profile Fields for s2Member.
24
  *
25
  * @package s2Member\Custom_Reg_Fields
26
  * @since 3.5
48
  */
49
  public static function custom_field_gen ($_function = FALSE, $_field = FALSE, $_name_prefix = FALSE, $_id_prefix = FALSE, $_classes = FALSE, $_styles = FALSE, $_tabindex = FALSE, $_attrs = FALSE, $_submission = FALSE, $_value = FALSE, $_editable_context = FALSE)
50
  {
51
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
52
  do_action ("ws_plugin__s2member_before_custom_field_gen", get_defined_vars ());
53
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
54
  /**/
55
  if (!($gen = "") && $_function && is_array ($field = $_field) && !empty ($field["type"]) && !empty ($field["id"]) && $_name_prefix && $_id_prefix)
56
  {
57
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
58
  do_action ("ws_plugin__s2member_during_custom_field_gen_before", get_defined_vars ());
59
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
60
  /**/
70
  $common .= ((!empty ($field["required"]) && $field["required"] === "yes") ? ' aria-required="true"' : '');
71
  $common .= ((strlen ($_tabindex)) ? ' tabindex="' . esc_attr ($_tabindex) . '"' : ''); /* No tabindex if empty. */
72
  $common .= ((!empty ($field["expected"])) ? ' data-expected="' . esc_attr ($field["expected"]) . '"' : ''); /* Certain data expected? */
73
+ $common .= (($_editable_context === "profile-view" || (!empty ($field["editable"]) && strpos ($field["editable"], "no") === 0 && $_editable_context === "profile")) ? ' disabled="disabled"' : '');
74
  $common .= (($_classes || !empty ($field["classes"])) ? ' class="' . esc_attr (trim ($_classes . ((!empty ($field["classes"])) ? ' ' . $field["classes"] : ''))) . '"' : '');
75
  $common .= (($_styles || !empty ($field["styles"])) ? ' style="' . esc_attr (trim ($_styles . ((!empty ($field["styles"])) ? ' ' . $field["styles"] : ''))) . '"' : '');
76
  $common .= (($_attrs || !empty ($field["attrs"])) ? ' ' . trim ($_attrs . ((!empty ($field["attrs"])) ? ' ' . $field["attrs"] : '')) : '');
258
  }
259
  }
260
  /**/
261
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
262
  do_action ("ws_plugin__s2member_during_custom_field_gen_after", get_defined_vars ());
263
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
264
  }
278
  */
279
  public static function custom_fields_configured_at_level ($_level = "auto-detection", $_editable_context = FALSE)
280
  {
281
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
282
  do_action ("ws_plugin__s2member_before_custom_fields_configured_at_level", get_defined_vars ());
283
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
284
  /**/
322
  /**/
323
  echo '<input type="hidden" name="ws_plugin__s2member_registration" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-registration")) . '" />' . "\n";
324
  /**/
325
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
326
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_before", get_defined_vars ());
327
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
328
  /**/
330
  {
331
  echo '<div class="ws-plugin--s2member-custom-reg-field-divider-section"></div>' . "\n";
332
  /**/
333
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
334
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_before_first_name", get_defined_vars ());
335
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
336
  /**/
338
  echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_custom_reg_field_first_name" id="ws-plugin--s2member-custom-reg-field-first-name" class="ws-plugin--s2member-custom-reg-field" value="' . esc_attr ($_p["ws_plugin__s2member_custom_reg_field_first_name"]) . '" />' . "\n";
339
  echo '<br />' . "\n";
340
  /**/
341
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
342
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_after_first_name", get_defined_vars ());
343
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
344
  /**/
345
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
346
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_before_last_name", get_defined_vars ());
347
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
348
  /**/
350
  echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_custom_reg_field_last_name" id="ws-plugin--s2member-custom-reg-field-last-name" class="ws-plugin--s2member-custom-reg-field" value="' . esc_attr ($_p["ws_plugin__s2member_custom_reg_field_last_name"]) . '" />' . "\n";
351
  echo '<br />' . "\n";
352
  /**/
353
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
354
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_after_last_name", get_defined_vars ());
355
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
356
  }
359
  if ($fields_applicable = c_ws_plugin__s2member_custom_reg_fields::custom_fields_configured_at_level ("auto-detection", "registration"))
360
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
361
  {
362
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
363
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_before_custom_fields", get_defined_vars ());
364
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
365
  /**/
368
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
369
  $field_id_class = preg_replace ("/_/", "-", $field_var);
370
  /**/
371
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
372
  if (apply_filters ("ws_plugin__s2member_during_ms_custom_registration_fields_during_custom_fields_display", true, get_defined_vars ()))
373
  {
374
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
381
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
382
  }
383
  /**/
384
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
385
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_after_custom_fields", get_defined_vars ());
386
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
387
  }
388
  /**/
389
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"] && c_ws_plugin__s2member_list_servers::list_servers_integrated ())
390
  {
391
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
392
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_before_opt_in", get_defined_vars ());
393
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
394
  /**/
398
  echo '</label>' . "\n";
399
  echo '<br />' . "\n";
400
  /**/
401
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
402
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_after_opt_in", get_defined_vars ());
403
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
404
  }
405
  /**/
406
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
407
  do_action ("ws_plugin__s2member_during_ms_custom_registration_fields_after", get_defined_vars ());
408
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
409
  }
410
  /**/
411
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
412
  do_action ("ws_plugin__s2member_after_ms_custom_registration_fields", get_defined_vars ());
413
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
414
  /**/
436
  /**/
437
  $tabindex = 20; /* Incremented tabindex starting with 20. */
438
  /**/
439
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
440
  do_action ("ws_plugin__s2member_during_custom_registration_fields_before", get_defined_vars ());
441
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
442
  /**/
443
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"])
444
  {
445
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
446
  do_action ("ws_plugin__s2member_during_custom_registration_fields_before_user_pass", get_defined_vars ());
447
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
448
  /**/
461
  /**/
462
  echo '</p>' . "\n";
463
  /**/
464
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
465
  do_action ("ws_plugin__s2member_during_custom_registration_fields_after_user_pass", get_defined_vars ());
466
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
467
  }
470
  {
471
  echo '<div class="ws-plugin--s2member-custom-reg-field-divider-section"></div>' . "\n";
472
  /**/
473
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
474
  do_action ("ws_plugin__s2member_during_custom_registration_fields_before_first_name", get_defined_vars ());
475
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
476
  /**/
481
  echo '</label>' . "\n";
482
  echo '</p>' . "\n";
483
  /**/
484
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
485
  do_action ("ws_plugin__s2member_during_custom_registration_fields_after_first_name", get_defined_vars ());
486
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
487
  /**/
488
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
489
  do_action ("ws_plugin__s2member_during_custom_registration_fields_before_last_name", get_defined_vars ());
490
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
491
  /**/
496
  echo '</label>' . "\n";
497
  echo '</p>' . "\n";
498
  /**/
499
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
500
  do_action ("ws_plugin__s2member_during_custom_registration_fields_after_last_name", get_defined_vars ());
501
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
502
  }
508
  /**/
509
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
510
  {
511
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
512
  do_action ("ws_plugin__s2member_during_custom_registration_fields_before_custom_fields", get_defined_vars ());
513
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
514
  /**/
517
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
518
  $field_id_class = preg_replace ("/_/", "-", $field_var);
519
  /**/
520
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
521
  if (apply_filters ("ws_plugin__s2member_during_custom_registration_fields_during_custom_fields_display", true, get_defined_vars ()))
522
  {
523
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
532
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
533
  }
534
  /**/
535
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
536
  do_action ("ws_plugin__s2member_during_custom_registration_fields_after_custom_fields", get_defined_vars ());
537
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
538
  }
540
  /**/
541
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"] && c_ws_plugin__s2member_list_servers::list_servers_integrated ())
542
  {
543
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
544
  do_action ("ws_plugin__s2member_during_custom_registration_fields_before_opt_in", get_defined_vars ());
545
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
546
  /**/
551
  echo '</label>' . "\n";
552
  echo '</p>' . "\n";
553
  /**/
554
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
555
  do_action ("ws_plugin__s2member_during_custom_registration_fields_after_opt_in", get_defined_vars ());
556
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
557
  }
558
  /**/
559
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
560
  do_action ("ws_plugin__s2member_during_custom_registration_fields_after", get_defined_vars ());
561
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
562
  /**/
563
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
564
  do_action ("ws_plugin__s2member_after_custom_registration_fields", get_defined_vars ());
565
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
566
  /**/
includes/classes/email-configs.inc.php CHANGED
@@ -28,27 +28,6 @@ if (!class_exists ("c_ws_plugin__s2member_email_configs"))
28
  class c_ws_plugin__s2member_email_configs
29
  {
30
  /**
31
- * Filters email addresses passed to ``wp_mail()``.
32
- *
33
- * @package s2Member\Email_Configs
34
- * @since 3.5
35
- *
36
- * @attaches-to ``add_filter("wp_mail");``
37
- *
38
- * @param array $array Expects an array passed through by the Filter.
39
- * @return array Returns the array passed through by the Filter.
40
- */
41
- public static function email_filter ($array = FALSE)
42
- {
43
- if (!empty ($array["to"]) && is_string ($array["to"]))
44
- $array["to"] = str_replace (array ('\"', '"'), "", $array["to"]);
45
- /**/
46
- if (!empty ($array["to"]) && is_string ($array["to"]) && strpos ($array["to"], ";") !== false)
47
- $array["to"] = c_ws_plugin__s2member_utils_strings::trim_deep (preg_split ("/;+/", $array["to"]));
48
- /**/
49
- return apply_filters ("ws_plugin__s2member_after_email_filter", $array, get_defined_vars ());
50
- }
51
- /**
52
  * Modifies email From: `"Name" <address>`.
53
  *
54
  * These Filters are only needed during registration.
@@ -172,7 +151,29 @@ if (!class_exists ("c_ws_plugin__s2member_email_configs"))
172
  return apply_filters ("ws_plugin__s2member_ms_nice_email_roles", $message, get_defined_vars ());
173
  }
174
  /**
175
- * Handles new User notifications.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  *
177
  * @package s2Member\Email_Configs
178
  * @since 110707
@@ -214,7 +215,7 @@ if (!class_exists ("c_ws_plugin__s2member_email_configs"))
214
  if (($sbj = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $sbj)))
215
  {
216
  if (is_array ($fields) && !empty ($fields))
217
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
218
  if (!($sbj = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $sbj)))
219
  break;
220
  /**/
@@ -231,7 +232,7 @@ if (!class_exists ("c_ws_plugin__s2member_email_configs"))
231
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
232
  {
233
  if (is_array ($fields) && !empty ($fields))
234
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
235
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
236
  break;
237
  /**/
@@ -241,73 +242,74 @@ if (!class_exists ("c_ws_plugin__s2member_email_configs"))
241
  }
242
  }
243
  /**/
244
- if (in_array ("admin", $notify) && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_recipients"])
245
- {
246
- $fields = get_user_option ("s2member_custom_fields", $user_id);
247
- $cv = preg_split ("/\|/", get_user_option ("s2member_custom", $user_id));
248
- $user_full_name = trim ($user->first_name . " " . $user->last_name);
249
- $user_ip = $_SERVER["REMOTE_ADDR"];
250
- /**/
251
- if (($rec = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_recipients"]))
252
- if (($rec = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $rec)))
253
- if (($rec = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $rec)))
254
- if (($rec = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_dq (c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name)), $rec)))
255
- if (($rec = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_dq (c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name)), $rec)))
256
- if (($rec = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_dq (c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name)), $rec)))
257
- if (($rec = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $rec)))
258
- if (($rec = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $rec)))
259
- if (($rec = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $rec)))
260
- if (($rec = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $rec)))
261
- if (($rec = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $rec)))
262
- {
263
- if (is_array ($fields) && !empty ($fields))
264
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
265
- if (!($rec = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $rec)))
266
- break;
267
- /**/
268
- if (($sbj = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_subject"]))
269
- if (($sbj = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $sbj)))
270
- if (($sbj = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $sbj)))
271
- if (($sbj = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name), $sbj)))
272
- if (($sbj = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name), $sbj)))
273
- if (($sbj = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name), $sbj)))
274
- if (($sbj = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $sbj)))
275
- if (($sbj = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $sbj)))
276
- if (($sbj = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $sbj)))
277
- if (($sbj = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $sbj)))
278
- if (($sbj = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $sbj)))
279
- {
280
- if (is_array ($fields) && !empty ($fields))
281
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
282
- if (!($sbj = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $sbj)))
283
- break;
284
- /**/
285
- if (($msg = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_message"]))
286
- if (($msg = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $msg)))
287
- if (($msg = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $msg)))
288
- if (($msg = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name), $msg)))
289
- if (($msg = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name), $msg)))
290
- if (($msg = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name), $msg)))
291
- if (($msg = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $msg)))
292
- if (($msg = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $msg)))
293
- if (($msg = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $msg)))
294
- if (($msg = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $msg)))
295
- if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
296
- {
297
- if (is_array ($fields) && !empty ($fields))
298
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
299
- if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
300
- break;
301
- /**/
302
- if (($recipients = preg_split ("/;+/", preg_replace ("/%%(.+?)%%/i", "", $rec))) && ($sbj = trim (preg_replace ("/%%(.+?)%%/i", "", $sbj))) && ($msg = trim (preg_replace ("/%%(.+?)%%/i", "", $msg))))
303
- {
304
- foreach (c_ws_plugin__s2member_utils_strings::trim_deep ($recipients) as $recipient)
305
- ($recipient) ? wp_mail ($recipient, $sbj, $msg, "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">\r\nContent-Type: text/plain; charset=utf-8") : null;
306
- }
307
- }
308
- }
309
- }
310
- }
 
311
  /**/
312
  if ($email_configs_were_on) /* Back on? */
313
  c_ws_plugin__s2member_email_configs::email_config ();
28
  class c_ws_plugin__s2member_email_configs
29
  {
30
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  * Modifies email From: `"Name" <address>`.
32
  *
33
  * These Filters are only needed during registration.
151
  return apply_filters ("ws_plugin__s2member_ms_nice_email_roles", $message, get_defined_vars ());
152
  }
153
  /**
154
+ * Filters email addresses passed to ``wp_mail()``.
155
+ *
156
+ * @package s2Member\Email_Configs
157
+ * @since 3.5
158
+ *
159
+ * @attaches-to ``add_filter("wp_mail");``
160
+ * @uses {@link s2Member\Utilities\c_ws_plugin__s2member_utils_strings::parse_emails()}
161
+ *
162
+ * @param array $array Expects an array passed through by the Filter.
163
+ * @return array Returns the array passed through by the Filter.
164
+ */
165
+ public static function email_filter ($array = FALSE)
166
+ {
167
+ if (isset ($array["to"]) && !empty ($array["to"])) /* Filter list of recipients? */
168
+ /* Reduces `"Name" <email>`, to just an email address *(for best cross-platform compatibility across various MTAs)*. */
169
+ /* Also works around bug in PHP versions prior to fix in 5.2.11. See bug report: <https://bugs.php.net/bug.php?id=28038>. */
170
+ /* Also supplements WordPress®. WordPress® currently does NOT support semicolon `;` delimitation, s2Member does. */
171
+ $array["to"] = implode (",", c_ws_plugin__s2member_utils_strings::parse_emails ($array["to"]));
172
+ /**/
173
+ return apply_filters ("ws_plugin__s2member_after_email_filter", $array, get_defined_vars ());
174
+ }
175
+ /**
176
+ * Handles new User/Member notifications.
177
  *
178
  * @package s2Member\Email_Configs
179
  * @since 110707
215
  if (($sbj = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $sbj)))
216
  {
217
  if (is_array ($fields) && !empty ($fields))
218
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
219
  if (!($sbj = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $sbj)))
220
  break;
221
  /**/
232
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
233
  {
234
  if (is_array ($fields) && !empty ($fields))
235
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
236
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
237
  break;
238
  /**/
242
  }
243
  }
244
  /**/
245
+ if (in_array ("admin", $notify)) /* Send Admin(s) a notification? */
246
+ if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_recipients"])
247
+ {
248
+ $fields = get_user_option ("s2member_custom_fields", $user_id);
249
+ $cv = preg_split ("/\|/", get_user_option ("s2member_custom", $user_id));
250
+ $user_full_name = trim ($user->first_name . " " . $user->last_name);
251
+ $user_ip = $_SERVER["REMOTE_ADDR"];
252
+ /**/
253
+ if (($rec = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_recipients"]))
254
+ if (($rec = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $rec)))
255
+ if (($rec = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $rec)))
256
+ if (($rec = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_dq (c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name)), $rec)))
257
+ if (($rec = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_dq (c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name)), $rec)))
258
+ if (($rec = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_dq (c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name)), $rec)))
259
+ if (($rec = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $rec)))
260
+ if (($rec = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $rec)))
261
+ if (($rec = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $rec)))
262
+ if (($rec = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $rec)))
263
+ if (($rec = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $rec)))
264
+ {
265
+ if (is_array ($fields) && !empty ($fields))
266
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
267
+ if (!($rec = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $rec)))
268
+ break;
269
+ /**/
270
+ if (($sbj = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_subject"]))
271
+ if (($sbj = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $sbj)))
272
+ if (($sbj = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $sbj)))
273
+ if (($sbj = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name), $sbj)))
274
+ if (($sbj = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name), $sbj)))
275
+ if (($sbj = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name), $sbj)))
276
+ if (($sbj = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $sbj)))
277
+ if (($sbj = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $sbj)))
278
+ if (($sbj = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $sbj)))
279
+ if (($sbj = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $sbj)))
280
+ if (($sbj = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $sbj)))
281
+ {
282
+ if (is_array ($fields) && !empty ($fields))
283
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
284
+ if (!($sbj = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $sbj)))
285
+ break;
286
+ /**/
287
+ if (($msg = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_message"]))
288
+ if (($msg = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $msg)))
289
+ if (($msg = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $msg)))
290
+ if (($msg = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name), $msg)))
291
+ if (($msg = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name), $msg)))
292
+ if (($msg = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name), $msg)))
293
+ if (($msg = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $msg)))
294
+ if (($msg = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $msg)))
295
+ if (($msg = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $msg)))
296
+ if (($msg = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $msg)))
297
+ if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
298
+ {
299
+ if (is_array ($fields) && !empty ($fields))
300
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
301
+ if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
302
+ break;
303
+ /**/
304
+ if (($recipients = preg_split ("/;+/", preg_replace ("/%%(.+?)%%/i", "", $rec))) && ($sbj = trim (preg_replace ("/%%(.+?)%%/i", "", $sbj))) && ($msg = trim (preg_replace ("/%%(.+?)%%/i", "", $msg))))
305
+ {
306
+ foreach (c_ws_plugin__s2member_utils_strings::trim_deep ($recipients) as $recipient)
307
+ ($recipient) ? wp_mail ($recipient, $sbj, $msg, "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">\r\nContent-Type: text/plain; charset=utf-8") : null;
308
+ }
309
+ }
310
+ }
311
+ }
312
+ }
313
  /**/
314
  if ($email_configs_were_on) /* Back on? */
315
  c_ws_plugin__s2member_email_configs::email_config ();
includes/classes/files-in.inc.php CHANGED
@@ -73,9 +73,6 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
73
  if ($req["file_download"] && is_string ($req["file_download"]) && ($req["file_download"] = trim ($req["file_download"], "/")))
74
  if (strpos ($req["file_download"], "..") === false && strpos (basename ($req["file_download"]), ".") !== 0)
75
  {
76
- if ($serving) /* We only need this section when/if we're actually serving. */
77
- @set_time_limit(0) . @ini_set ("zlib.output_compression", 0) . eval ('while (@ob_end_clean ());');
78
- /**/
79
  $using_amazon_s3_storage = ((!$req["file_storage"] || strcasecmp ((string)$req["file_storage"], "s3") === 0) && c_ws_plugin__s2member_utils_conds::using_amazon_s3_storage ()) ? true : false;
80
  $using_amazon_cf_storage = ((!$req["file_storage"] || strcasecmp ((string)$req["file_storage"], "cf") === 0) && c_ws_plugin__s2member_utils_conds::using_amazon_cf_storage ()) ? true : false;
81
  $using_amazon_storage = ($using_amazon_s3_storage || $using_amazon_cf_storage) ? true : false; /* Either/or? */
@@ -90,7 +87,8 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
90
  if (!$using_amazon_storage && !file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $req["file_download"]))
91
  {
92
  if ($serving) /* We only need this section when/if we're actually serving. */
93
- status_header(404) . exit (_x ("404: Sorry, file not found. Please contact Support for assistance.", "s2member-front", "s2member"));
 
94
  /**/
95
  else /* Else return false. */
96
  return false;
@@ -99,13 +97,14 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
99
  else if ($req["file_download_key"] && is_string ($req["file_download_key"]) && !$valid_file_download_key)
100
  {
101
  if ($serving) /* We only need this section when/if we're actually serving. */
102
- status_header(503) . exit (_x ("503 ( Invalid Key ): Sorry, your access to this file has expired. Please contact Support for assistance.", "s2member-front", "s2member"));
 
103
  /**/
104
  else /* Else return false. */
105
  return false;
106
  }
107
  /**/
108
- else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"] || ($file_downloads_enabled = $min_level_4_downloads = c_ws_plugin__s2member_files::min_level_4_downloads ()) === false)
109
  {
110
  if ($serving) /* We only need remote functionality when/if we're actually serving. */
111
  if (!has_filter ("ws_plugin__s2member_check_file_download_access_user", "c_ws_plugin__s2member_files_in::check_file_remote_authorization"))
@@ -115,21 +114,20 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
115
  if (has_filter ("ws_plugin__s2member_check_file_download_access_user", "c_ws_plugin__s2member_files_in::check_file_remote_authorization"))
116
  remove_filter ("ws_plugin__s2member_check_file_download_access_user", "c_ws_plugin__s2member_files_in::check_file_remote_authorization", 10, 2);
117
  /**/
118
- if ((isset ($file_downloads_enabled, $min_level_4_downloads) && $file_downloads_enabled === false) || ($file_downloads_enabled = $min_level_4_downloads = c_ws_plugin__s2member_files::min_level_4_downloads ()) === false)
119
  {
120
  if ($serving) /* We only need this section when/if we're actually serving. */
121
- status_header(503) . exit (_x ("503: Sorry, File Downloads are NOT enabled yet. Please contact Support for assistance. If you are the site owner, please configure: `s2Member -> Download Options -> Basic Download Restrictions`.", "s2member-front", "s2member"));
 
122
  /**/
123
  else /* Else return false. */
124
  return false;
125
  }
126
  /**/
127
- else if (!is_object ($user = apply_filters ("ws_plugin__s2member_check_file_download_access_user", ((is_user_logged_in ()) ? wp_get_current_user () : false), get_defined_vars ())) || empty ($user->ID) || !($user_id = $user->ID))
128
  {
129
- if (preg_match ("/^access[_\-]s2member[_\-]level([0-9]+)\//", $req["file_download"], $m))
130
  {
131
- $level_req = $m[1]; /* Memebership Level required. */
132
- /**/
133
  if ($serving) /* We only need this section when/if we're actually serving. */
134
  wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $req["file_download"], "s2member_level_req" => $level_req)), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"])), apply_filters ("ws_plugin__s2member_content_redirect_status", 301, get_defined_vars ())) . exit ();
135
  /**/
@@ -137,10 +135,8 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
137
  return false;
138
  }
139
  /**/
140
- else if (preg_match ("/^access[_\-]s2member[_\-]ccap[_\-](.+?)\//", $req["file_download"], $m))
141
  {
142
- $ccap_req = preg_replace ("/-/", "_", $m[1]); /* Custom Capability required. */
143
- /**/
144
  if ($serving) /* We only need this section when/if we're actually serving. */
145
  wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $req["file_download"], "s2member_ccap_req" => $ccap_req)), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"])), apply_filters ("ws_plugin__s2member_content_redirect_status", 301, get_defined_vars ())) . exit ();
146
  /**/
@@ -155,15 +151,6 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
155
  return false;
156
  }
157
  /**/
158
- else if (!is_array ($file_downloads = c_ws_plugin__s2member_files::user_downloads ($user)) || (!$user->has_cap ("administrator") && (!$file_downloads["allowed"] || !$file_downloads["allowed_days"])))
159
- {
160
- if ($serving) /* We only need this section when/if we're actually serving. */
161
- wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $req["file_download"])), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"])), apply_filters ("ws_plugin__s2member_content_redirect_status", 301, get_defined_vars ())) . exit ();
162
- /**/
163
- else /* Else return false. */
164
- return false;
165
- }
166
- /**/
167
  else if (preg_match ("/^access[_\-]s2member[_\-]level([0-9]+)\//", $req["file_download"], $m) && strlen ($level_req = $m[1]) && !$user->has_cap ("access_s2member_level" . $level_req))
168
  {
169
  if ($serving) /* We only need this section when/if we're actually serving. */
@@ -184,34 +171,37 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
184
  /**/
185
  else if ($serving || $creating) /* In either case, the following routines apply. */
186
  {
187
- $already_downloaded = $streaming_variation_already_downloaded = false;
188
- $previous_file_downloads = 0; /* Here we're going to count how many downloads they have. */
189
- $max_days_logged = c_ws_plugin__s2member_files::max_download_period (); /* Max period/days. */
190
- $file_download_access_log = (array)get_user_option ("s2member_file_download_access_log", $user_id);
191
- $file_download_access_arc = (array)get_user_option ("s2member_file_download_access_arc", $user_id);
 
192
  $streaming_file_extns = c_ws_plugin__s2member_utils_strings::preg_quote_deep ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["streaming_file_extns"], "/");
193
  $streaming_variations = /* Only count one streaming media file variation. */ "/\.(" . implode ("|", $streaming_file_extns) . ")$/i";
194
  /**/
195
- foreach ($file_download_access_log as $file_download_access_log_entry_key => $file_download_access_log_entry)
 
 
196
  {
197
- if (strtotime ($file_download_access_log_entry["date"]) < strtotime ("-" . $max_days_logged . " days"))
198
  {
199
- unset($file_download_access_log[$file_download_access_log_entry_key]);
200
- $file_download_access_arc[] = $file_download_access_log_entry;
201
  }
202
- else if (strtotime ($file_download_access_log_entry["date"]) >= strtotime ("-" . $file_downloads["allowed_days"] . " days"))
203
  {
204
- $previous_file_downloads++; /* A previous file that counts. */
205
  /**/
206
- if ($file_download_access_log_entry["file"] === $req["file_download"]) /* Already downloaded this file? Or another streaming variation? */
207
- $already_downloaded = true; /* Already downloaded this file? Or another streaming variation? */
208
  /**/
209
- else if (preg_replace ($streaming_variations, "", $file_download_access_log_entry["file"]) === preg_replace ($streaming_variations, "", $req["file_download"]))
210
- $already_downloaded = $streaming_variation_already_downloaded = true;
211
  }
212
  }
213
  /**/
214
- if (!$already_downloaded && !$streaming_variation_already_downloaded && !$user->has_cap ("administrator") && $previous_file_downloads >= $file_downloads["allowed"])
215
  {
216
  if ($serving) /* We only need this section when/if we're actually serving. */
217
  wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $req["file_download"])), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"])), apply_filters ("ws_plugin__s2member_content_redirect_status", 301, get_defined_vars ())) . exit ();
@@ -220,13 +210,13 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
220
  return false;
221
  }
222
  /**/
223
- else if (!$already_downloaded && !$streaming_variation_already_downloaded)
224
- $file_download_access_log[] = array ("date" => date ("Y-m-d"), "file" => $req["file_download"]);
225
  /**/
226
  if ($updating_user_counter) /* By default, we do NOT update the counter when a URL is being created; but this behavior can be modified. */
227
  {
228
- update_user_option ($user_id, "s2member_file_download_access_arc", c_ws_plugin__s2member_utils_arrays::array_unique ($file_download_access_arc));
229
- update_user_option ($user_id, "s2member_file_download_access_log", c_ws_plugin__s2member_utils_arrays::array_unique ($file_download_access_log));
230
  }
231
  }
232
  }
@@ -236,7 +226,8 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
236
  if (!$using_amazon_storage && !file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $req["file_download"]))
237
  {
238
  if ($serving) /* We only need this section when/if we're actually serving. */
239
- status_header(404) . exit (_x ("404: Sorry, file not found. Please contact Support for assistance.", "s2member-front", "s2member"));
 
240
  /**/
241
  else /* Else return false. */
242
  return false;
@@ -323,7 +314,9 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
323
  /**/
324
  else /* Else, ``if ($serving)`` , use local storage option (default). */
325
  {
326
- status_header(200);
 
 
327
  /**/
328
  header("Accept-Ranges: none");
329
  header("Content-Encoding: none");
@@ -336,6 +329,8 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
336
  /**/
337
  header('Content-Disposition: ' . (($inline) ? "inline" : "attachment") . '; filename="' . $basename . '"');
338
  /**/
 
 
339
  if ($length && apply_filters ("ws_plugin__s2member_chunk_file_downloads", true, get_defined_vars ()) && is_resource ($resource = fopen ($file, "rb")))
340
  {
341
  $_chunk_size = apply_filters ("ws_plugin__s2member_chunk_file_downloads_w_chunk_size", 2097152, get_defined_vars ());
@@ -365,7 +360,8 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
365
  }
366
  /**/
367
  else if ($serving && $req["file_download"]) /* We only need this section when/if we're actually serving. */
368
- status_header(503) . exit (_x ("503: Access denied. Invalid File Download specs.", "s2member-front", "s2member"));
 
369
  /**/
370
  else if ($creating) /* We only need this section when/if we're creating a URL. */
371
  return false;
@@ -451,9 +447,13 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
451
  /**/
452
  if (empty ($_SERVER["PHP_AUTH_USER"]) || empty ($_SERVER["PHP_AUTH_PW"]) || !user_pass_ok ($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"]))
453
  {
454
- header('WWW-Authenticate: Basic realm="' . _x ("Members Only", "s2member-front", "s2member") . '"');
455
- status_header(401); /* Unauthorized status header. */
456
- exit(_x ("Access Denied", "s2member-front", "s2member"));
 
 
 
 
457
  }
458
  else if (is_object ($_user = new WP_User ($_SERVER["PHP_AUTH_USER"])) && !empty ($_user->ID))
459
  $user = $_user; /* Now assign ``$user``. */
73
  if ($req["file_download"] && is_string ($req["file_download"]) && ($req["file_download"] = trim ($req["file_download"], "/")))
74
  if (strpos ($req["file_download"], "..") === false && strpos (basename ($req["file_download"]), ".") !== 0)
75
  {
 
 
 
76
  $using_amazon_s3_storage = ((!$req["file_storage"] || strcasecmp ((string)$req["file_storage"], "s3") === 0) && c_ws_plugin__s2member_utils_conds::using_amazon_s3_storage ()) ? true : false;
77
  $using_amazon_cf_storage = ((!$req["file_storage"] || strcasecmp ((string)$req["file_storage"], "cf") === 0) && c_ws_plugin__s2member_utils_conds::using_amazon_cf_storage ()) ? true : false;
78
  $using_amazon_storage = ($using_amazon_s3_storage || $using_amazon_cf_storage) ? true : false; /* Either/or? */
87
  if (!$using_amazon_storage && !file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $req["file_download"]))
88
  {
89
  if ($serving) /* We only need this section when/if we're actually serving. */
90
+ status_header(404) . header ("Content-Type: text/html; charset=utf-8") . eval ('while (@ob_end_clean ());') #
91
+ . exit (_x ('<strong>404: Sorry, file not found.</strong> Please contact Support for assistance.', "s2member-front", "s2member"));
92
  /**/
93
  else /* Else return false. */
94
  return false;
97
  else if ($req["file_download_key"] && is_string ($req["file_download_key"]) && !$valid_file_download_key)
98
  {
99
  if ($serving) /* We only need this section when/if we're actually serving. */
100
+ status_header(503) . header ("Content-Type: text/html; charset=utf-8") . eval ('while (@ob_end_clean ());') #
101
+ . exit (_x ('<strong>503 ( Invalid Key ):</strong> Sorry, your access to this file has expired. Please contact Support for assistance.', "s2member-front", "s2member"));
102
  /**/
103
  else /* Else return false. */
104
  return false;
105
  }
106
  /**/
107
+ else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"] || ($file_downloads_enabled_by_site_owner = $min_level_4_downloads = c_ws_plugin__s2member_files::min_level_4_downloads ()) === false)
108
  {
109
  if ($serving) /* We only need remote functionality when/if we're actually serving. */
110
  if (!has_filter ("ws_plugin__s2member_check_file_download_access_user", "c_ws_plugin__s2member_files_in::check_file_remote_authorization"))
114
  if (has_filter ("ws_plugin__s2member_check_file_download_access_user", "c_ws_plugin__s2member_files_in::check_file_remote_authorization"))
115
  remove_filter ("ws_plugin__s2member_check_file_download_access_user", "c_ws_plugin__s2member_files_in::check_file_remote_authorization", 10, 2);
116
  /**/
117
+ if ((isset ($file_downloads_enabled_by_site_owner, $min_level_4_downloads) && $file_downloads_enabled_by_site_owner === false) || ($file_downloads_enabled_by_site_owner = $min_level_4_downloads = c_ws_plugin__s2member_files::min_level_4_downloads ()) === false)
118
  {
119
  if ($serving) /* We only need this section when/if we're actually serving. */
120
+ status_header(503) . header ("Content-Type: text/html; charset=utf-8") . eval ('while (@ob_end_clean ());') #
121
+ . exit (_x ('<strong>503: Basic File Downloads are NOT enabled yet.</strong> Please contact Support for assistance. If you are the site owner, please configure: <code>s2Member -> Download Options -> Basic Download Restrictions</code>.', "s2member-front", "s2member"));
122
  /**/
123
  else /* Else return false. */
124
  return false;
125
  }
126
  /**/
127
+ else if (!is_object ($user = apply_filters ("ws_plugin__s2member_check_file_download_access_user", ((is_user_logged_in ()) ? wp_get_current_user () : false), get_defined_vars ())) || empty ($user->ID) || !($user_id = $user->ID) || !is_array ($user_file_downloads = c_ws_plugin__s2member_files::user_downloads ($user)) || (!$user->has_cap ("administrator") && (!$user_file_downloads["allowed"] || !$user_file_downloads["allowed_days"])))
128
  {
129
+ if (preg_match ("/^access[_\-]s2member[_\-]level([0-9]+)\//", $req["file_download"], $m) && strlen ($level_req = $m[1]) && (!is_object ($user) || empty ($user->ID) || !$user->has_cap ("access_s2member_level" . $level_req)))
130
  {
 
 
131
  if ($serving) /* We only need this section when/if we're actually serving. */
132
  wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $req["file_download"], "s2member_level_req" => $level_req)), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"])), apply_filters ("ws_plugin__s2member_content_redirect_status", 301, get_defined_vars ())) . exit ();
133
  /**/
135
  return false;
136
  }
137
  /**/
138
+ else if (preg_match ("/^access[_\-]s2member[_\-]ccap[_\-](.+?)\//", $req["file_download"], $m) && strlen ($ccap_req = preg_replace ("/-/", "_", $m[1])) && (!is_object ($user) || empty ($user->ID) || !$user->has_cap ("access_s2member_ccap_" . $ccap_req)))
139
  {
 
 
140
  if ($serving) /* We only need this section when/if we're actually serving. */
141
  wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $req["file_download"], "s2member_ccap_req" => $ccap_req)), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"])), apply_filters ("ws_plugin__s2member_content_redirect_status", 301, get_defined_vars ())) . exit ();
142
  /**/
151
  return false;
152
  }
153
  /**/
 
 
 
 
 
 
 
 
 
154
  else if (preg_match ("/^access[_\-]s2member[_\-]level([0-9]+)\//", $req["file_download"], $m) && strlen ($level_req = $m[1]) && !$user->has_cap ("access_s2member_level" . $level_req))
155
  {
156
  if ($serving) /* We only need this section when/if we're actually serving. */
171
  /**/
172
  else if ($serving || $creating) /* In either case, the following routines apply. */
173
  {
174
+ $user_previous_file_downloads = 0; /* Downloads the User has already; in current period/cycle. */
175
+ $user_already_downloaded_this_file = $user_already_downloaded_a_streaming_variation_of_this_file = false;
176
+ /**/
177
+ $user_file_download_access_log = (array)get_user_option ("s2member_file_download_access_log", $user_id);
178
+ $user_file_download_access_arc = (array)get_user_option ("s2member_file_download_access_arc", $user_id);
179
+ /**/
180
  $streaming_file_extns = c_ws_plugin__s2member_utils_strings::preg_quote_deep ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["streaming_file_extns"], "/");
181
  $streaming_variations = /* Only count one streaming media file variation. */ "/\.(" . implode ("|", $streaming_file_extns) . ")$/i";
182
  /**/
183
+ $max_download_period_days = c_ws_plugin__s2member_files::max_download_period (); /* Max download period; counted in days. */
184
+ /**/
185
+ foreach ($user_file_download_access_log as $user_file_download_access_log_entry_key => $user_file_download_access_log_entry)
186
  {
187
+ if (strtotime ($user_file_download_access_log_entry["date"]) < strtotime ("-" . $max_download_period_days . " days"))
188
  {
189
+ unset($user_file_download_access_log[$user_file_download_access_log_entry_key]);
190
+ $user_file_download_access_arc[] = $user_file_download_access_log_entry;
191
  }
192
+ else if (strtotime ($user_file_download_access_log_entry["date"]) >= strtotime ("-" . $user_file_downloads["allowed_days"] . " days"))
193
  {
194
+ $user_previous_file_downloads++; /* A previous file that counts against this User/Member, since it's already in the log. */
195
  /**/
196
+ if ($user_file_download_access_log_entry["file"] === $req["file_download"]) /* Already downloaded this file before? */
197
+ $user_already_downloaded_this_file = true; /* Already downloaded this file? If yes, mark this flag as true. */
198
  /**/
199
+ else if (preg_replace ($streaming_variations, "", $user_file_download_access_log_entry["file"]) === preg_replace ($streaming_variations, "", $req["file_download"]))
200
+ $user_already_downloaded_this_file = $user_already_downloaded_a_streaming_variation_of_this_file = true;
201
  }
202
  }
203
  /**/
204
+ if (!$user_already_downloaded_this_file && !$user_already_downloaded_a_streaming_variation_of_this_file && !$user->has_cap ("administrator") && $user_previous_file_downloads >= $user_file_downloads["allowed"])
205
  {
206
  if ($serving) /* We only need this section when/if we're actually serving. */
207
  wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $req["file_download"])), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"])), apply_filters ("ws_plugin__s2member_content_redirect_status", 301, get_defined_vars ())) . exit ();
210
  return false;
211
  }
212
  /**/
213
+ else if (!$user_already_downloaded_this_file && !$user_already_downloaded_a_streaming_variation_of_this_file)
214
+ $user_file_download_access_log[] = array ("date" => date ("Y-m-d"), "file" => $req["file_download"]);
215
  /**/
216
  if ($updating_user_counter) /* By default, we do NOT update the counter when a URL is being created; but this behavior can be modified. */
217
  {
218
+ update_user_option ($user_id, "s2member_file_download_access_arc", c_ws_plugin__s2member_utils_arrays::array_unique ($user_file_download_access_arc));
219
+ update_user_option ($user_id, "s2member_file_download_access_log", c_ws_plugin__s2member_utils_arrays::array_unique ($user_file_download_access_log));
220
  }
221
  }
222
  }
226
  if (!$using_amazon_storage && !file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $req["file_download"]))
227
  {
228
  if ($serving) /* We only need this section when/if we're actually serving. */
229
+ status_header(404) . header ("Content-Type: text/html; charset=utf-8") . eval ('while (@ob_end_clean ());') #
230
+ . exit (_x ('<strong>404: Sorry, file not found.</strong> Please contact Support for assistance.', "s2member-front", "s2member"));
231
  /**/
232
  else /* Else return false. */
233
  return false;
314
  /**/
315
  else /* Else, ``if ($serving)`` , use local storage option (default). */
316
  {
317
+ @set_time_limit(0) . @ini_set ("zlib.output_compression", 0);
318
+ /**/
319
+ status_header(200); /* 200 OK status header. */
320
  /**/
321
  header("Accept-Ranges: none");
322
  header("Content-Encoding: none");
329
  /**/
330
  header('Content-Disposition: ' . (($inline) ? "inline" : "attachment") . '; filename="' . $basename . '"');
331
  /**/
332
+ eval('while (@ob_end_clean ());'); /* End/clean any output buffers that may exist already. */
333
+ /**/
334
  if ($length && apply_filters ("ws_plugin__s2member_chunk_file_downloads", true, get_defined_vars ()) && is_resource ($resource = fopen ($file, "rb")))
335
  {
336
  $_chunk_size = apply_filters ("ws_plugin__s2member_chunk_file_downloads_w_chunk_size", 2097152, get_defined_vars ());
360
  }
361
  /**/
362
  else if ($serving && $req["file_download"]) /* We only need this section when/if we're actually serving. */
363
+ status_header(503) . header ("Content-Type: text/html; charset=utf-8") . eval ('while (@ob_end_clean ());') #
364
+ . exit (_x ('<strong>503: Access denied.</strong> Invalid File Download specs.', "s2member-front", "s2member"));
365
  /**/
366
  else if ($creating) /* We only need this section when/if we're creating a URL. */
367
  return false;
447
  /**/
448
  if (empty ($_SERVER["PHP_AUTH_USER"]) || empty ($_SERVER["PHP_AUTH_PW"]) || !user_pass_ok ($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"]))
449
  {
450
+ header('WWW-Authenticate: Basic realm="' . c_ws_plugin__s2member_utils_strings::esc_dq (strip_tags (_x ("Members Only", "s2member-front", "s2member"))) . '"');
451
+ /**/
452
+ status_header(401); /* Send an unauthorized 401 status header now. */
453
+ header("Content-Type: text/html; charset=utf-8"); /* Content-Type with UTF-8. */
454
+ eval('while (@ob_end_clean ());'); /* End/clean any output buffers that may exist. */
455
+ /**/
456
+ exit(_x ('<strong>401:</strong> Sorry, access denied.', "s2member-front", "s2member"));
457
  }
458
  else if (is_object ($_user = new WP_User ($_SERVER["PHP_AUTH_USER"])) && !empty ($_user->ID))
459
  $user = $_user; /* Now assign ``$user``. */
includes/classes/files.inc.php CHANGED
@@ -135,7 +135,46 @@ if (!class_exists ("c_ws_plugin__s2member_files"))
135
  return apply_filters ("ws_plugin__s2member_min_level_4_downloads", ((is_int ($min)) ? $min : false), get_defined_vars ());
136
  }
137
  /**
138
- * Determines how many File Downloads are allowed, also provides some extended details.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  *
140
  * @package s2Member\Files
141
  * @since 3.5
@@ -151,7 +190,7 @@ if (!class_exists ("c_ws_plugin__s2member_files"))
151
  do_action ("ws_plugin__s2member_before_user_downloads", get_defined_vars ());
152
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
153
  /**/
154
- $allowed = $allowed_days = $currently = 0; /* Initialize all of these to zero. */
155
  /**/
156
  if ((is_object ($user) || is_object ($user = (is_user_logged_in ()) ? wp_get_current_user () : false)) && !empty ($user->ID) && ($user_id = $user->ID))
157
  {
@@ -170,54 +209,16 @@ if (!class_exists ("c_ws_plugin__s2member_files"))
170
  }
171
  }
172
  /**/
173
- $file_download_access_log = (isset ($log)) ? (array)$log : (array)get_user_option ("s2member_file_download_access_log", $user_id);
174
- foreach ($file_download_access_log as $file_download_access_log_entry_key => $file_download_access_log_entry)
175
- if (strtotime ($file_download_access_log_entry["date"]) >= strtotime ("-" . $allowed_days . " days"))
176
- if ($file_download_access_log_entry["file"] !== $not_counting_this_particular_file)
 
177
  $currently = $currently + 1;
178
  }
179
  /**/
180
  return apply_filters ("ws_plugin__s2member_user_downloads", array ("allowed" => $allowed, "allowed_days" => $allowed_days, "currently" => $currently), get_defined_vars ());
181
  }
182
- /**
183
- * Creates a File Download Key.
184
- *
185
- * Builds a hash of: ``date("Y-m-d") . $_SERVER["REMOTE_ADDR"] . $_SERVER["HTTP_USER_AGENT"] . $file``.
186
- *
187
- * @package s2Member\Files
188
- * @since 3.5
189
- *
190
- * @param str $file Location of your protected file, relative to the `/s2member-files/` directory.
191
- * In other words, just the name of the file *(i.e. `file.zip` )*.
192
- * @param str $directive Optional. One of `ip-forever|universal|cache-compatible`.
193
- * `ip-forever` = a Download Key that never expires, tied only to a specific file and IP address.
194
- * `universal` and/or `cache-compatible` = a Download Key which never expires, and is NOT tied to any specific User. Use at your own risk.
195
- * @return str A Download Key. MD5 hash, 32 characters, URL-safe.
196
- */
197
- public static function file_download_key ($file = FALSE, $directive = FALSE)
198
- {
199
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
200
- do_action ("ws_plugin__s2member_before_file_download_key", get_defined_vars ());
201
- unset ($__refs, $__v); /* Unset defined __refs, __v. */
202
- /**/
203
- $file = ($file && is_string ($file) && ($file = trim ($file, "/"))) ? $file : "";
204
- /**/
205
- if ($directive === "ip-forever") /* Allows the current IP forever. */
206
- eval ('$allow_caching = false; $salt = $file . $_SERVER["REMOTE_ADDR"];');
207
- /**/
208
- else if ($directive === "universal" || $directive === "cache-compatible" || $directive)
209
- eval ('$allow_caching = true; $salt = $file;');
210
- /**/
211
- else /* Otherwise, we use the default ``$salt``, which is VERY restrictive; even to a specific browser. */
212
- eval ('$allow_caching = false; $salt = date ("Y-m-d") . $_SERVER["REMOTE_ADDR"] . $_SERVER["HTTP_USER_AGENT"] . $file;');
213
- /**/
214
- $key = md5 (c_ws_plugin__s2member_utils_encryption::xencrypt ($salt));
215
- /**/
216
- if ($allow_caching === false) /* Disallow caching? */
217
- c_ws_plugin__s2member_no_cache::no_cache_constants (true); /* No caching. */
218
- /**/
219
- return apply_filters ("ws_plugin__s2member_file_download_key", $key, get_defined_vars ());
220
- }
221
  }
222
  }
223
  ?>
135
  return apply_filters ("ws_plugin__s2member_min_level_4_downloads", ((is_int ($min)) ? $min : false), get_defined_vars ());
136
  }
137
  /**
138
+ * Creates a File Download Key.
139
+ *
140
+ * Builds a hash of: ``date("Y-m-d") . $_SERVER["REMOTE_ADDR"] . $_SERVER["HTTP_USER_AGENT"] . $file``.
141
+ *
142
+ * @package s2Member\Files
143
+ * @since 3.5
144
+ *
145
+ * @param str $file Location of your protected file, relative to the `/s2member-files/` directory.
146
+ * In other words, just the name of the file *(i.e. `file.zip` )*.
147
+ * @param str $directive Optional. One of `ip-forever|universal|cache-compatible`.
148
+ * `ip-forever` = a Download Key that never expires, tied only to a specific file and IP address.
149
+ * `universal` and/or `cache-compatible` = a Download Key which never expires, and is NOT tied to any specific User. Use at your own risk.
150
+ * @return str A Download Key. MD5 hash, 32 characters, URL-safe.
151
+ */
152
+ public static function file_download_key ($file = FALSE, $directive = FALSE)
153
+ {
154
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
155
+ do_action ("ws_plugin__s2member_before_file_download_key", get_defined_vars ());
156
+ unset ($__refs, $__v); /* Unset defined __refs, __v. */
157
+ /**/
158
+ $file = ($file && is_string ($file) && ($file = trim ($file, "/"))) ? $file : "";
159
+ /**/
160
+ if ($directive === "ip-forever") /* Current IP forever. */
161
+ eval ('$allow_caching = false; $salt = $file . $_SERVER["REMOTE_ADDR"];');
162
+ /**/
163
+ else if ($directive === "universal" || $directive === "cache-compatible" || $directive)
164
+ eval ('$allow_caching = true; $salt = $file;');
165
+ /**/
166
+ else /* Otherwise, we use the default ``$salt``, which is VERY restrictive; even to a specific browser. */
167
+ eval ('$allow_caching = false; $salt = date ("Y-m-d") . $_SERVER["REMOTE_ADDR"] . $_SERVER["HTTP_USER_AGENT"] . $file;');
168
+ /**/
169
+ $key = md5 (c_ws_plugin__s2member_utils_encryption::xencrypt ($salt));
170
+ /**/
171
+ if ($allow_caching === false) /* Disallow caching? */
172
+ c_ws_plugin__s2member_no_cache::no_cache_constants (true);
173
+ /**/
174
+ return apply_filters ("ws_plugin__s2member_file_download_key", $key, get_defined_vars ());
175
+ }
176
+ /**
177
+ * Download details on a per-User basis.
178
  *
179
  * @package s2Member\Files
180
  * @since 3.5
190
  do_action ("ws_plugin__s2member_before_user_downloads", get_defined_vars ());
191
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
192
  /**/
193
+ $allowed = $allowed_days = $currently = 0; /* Initialize all of these to a default value of zero. */
194
  /**/
195
  if ((is_object ($user) || is_object ($user = (is_user_logged_in ()) ? wp_get_current_user () : false)) && !empty ($user->ID) && ($user_id = $user->ID))
196
  {
209
  }
210
  }
211
  /**/
212
+ $user_file_download_access_log = (isset ($log)) ? (array)$log : (array)get_user_option ("s2member_file_download_access_log", $user_id);
213
+ /**/
214
+ foreach ($user_file_download_access_log as $user_file_download_access_log_entry_key => $user_file_download_access_log_entry)
215
+ if (strtotime ($user_file_download_access_log_entry["date"]) >= strtotime ("-" . $allowed_days . " days"))
216
+ if ($user_file_download_access_log_entry["file"] !== $not_counting_this_particular_file)
217
  $currently = $currently + 1;
218
  }
219
  /**/
220
  return apply_filters ("ws_plugin__s2member_user_downloads", array ("allowed" => $allowed, "allowed_days" => $allowed_days, "currently" => $currently), get_defined_vars ());
221
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  }
223
  }
224
  ?>
includes/classes/installation.inc.php CHANGED
@@ -106,7 +106,7 @@ if (!class_exists ("c_ws_plugin__s2member_installation"))
106
  }
107
  else /* Otherwise (initial activation); we'll help the Site Owner out by giving them a link to the Quick Start Guide. */
108
  {
109
- $notice = '<strong>Note:</strong> s2Member adds some new data columns to your list of Users/Members. If your list gets overcrowded, please use the <strong>Screen Options</strong> tab <em>( upper right-hand corner )</em>. With WordPress® Screen Options, you can add/remove specific data columns; thereby making the most important data easier to read. For example, if you create Custom Registration Fields with s2Member, those Custom Fields will result in new data columns; which can cause your list of Users/Members to become nearly unreadable. So just use the Screen Options tab to clean things up.';
110
  /**/
111
  c_ws_plugin__s2member_admin_notices::enqueue_admin_notice ($notice, "blog:users.php", false, false, true);
112
  /**/
106
  }
107
  else /* Otherwise (initial activation); we'll help the Site Owner out by giving them a link to the Quick Start Guide. */
108
  {
109
+ $notice = '<strong>Note:</strong> s2Member adds some new data columns to your list of Users/Members. If your list gets overcrowded, please use the <strong>Screen Options</strong> tab <em>( upper right-hand corner )</em>. With WordPress® Screen Options, you can add/remove specific data columns; thereby making the most important data easier to read. For example, if you create Custom Registration/Profile Fields with s2Member, those Custom Fields will result in new data columns; which can cause your list of Users/Members to become nearly unreadable. So just use the Screen Options tab to clean things up.';
110
  /**/
111
  c_ws_plugin__s2member_admin_notices::enqueue_admin_notice ($notice, "blog:users.php", false, false, true);
112
  /**/
includes/classes/ip-restrictions.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_ip_restrictions"))
21
  {
@@ -30,7 +30,7 @@ if (!class_exists ("c_ws_plugin__s2member_ip_restrictions"))
30
  /**
31
  * Handles IP Restrictions.
32
  *
33
- * IP address details are stored in Transient fields.
34
  *
35
  * @package s2Member\IP_Restrictions
36
  * @since 3.5
@@ -41,65 +41,83 @@ if (!class_exists ("c_ws_plugin__s2member_ip_restrictions"))
41
  */
42
  public static function ip_restrictions_ok ($ip = FALSE, $restriction = FALSE)
43
  {
44
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
45
  do_action ("ws_plugin__s2member_before_ip_restrictions_ok", get_defined_vars ());
46
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
47
  /**/
48
- if (!apply_filters ("ws_plugin__s2member_disable_all_ip_restrictions", false, get_defined_vars ()))
49
- if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction"] && $restriction)
50
- {
51
- $prefix = "s2m_ipr_"; /* s2Member Transient prefix for all IP Restrictions. */
52
- $transient_entries = $prefix . md5 ("s2member_ip_restrictions_" . $restriction . "_entries");
53
- $transient_security_breach = $prefix . md5 ("s2member_ip_restrictions_" . $restriction . "_security_breach");
54
- /**/
55
- /* If you add Filters, use a string compatible with PHP's strtotime() function. */
56
- $concurrency = apply_filters ("ws_plugin__s2member_ip_restrictions__concurrency_time_per_ip", "30 days");
57
- /**/
58
- $entries = (is_array ($entries = get_transient ($transient_entries))) ? $entries : array ();
59
- /**/
60
- foreach ($entries as $_entry => $_time) /* Auto-expire entries. */
61
- if ($_time < strtotime ("-" . $concurrency))
62
- unset ($entries[$_entry]);
63
- /**/
64
- $ip = ($ip) ? $ip : "empty"; /* Allow empty IPs. */
65
- $entries[$ip] = strtotime ("now"); /* Log this entry. */
66
- set_transient ($transient_entries, $entries, 2 * (strtotime ("+" . $concurrency) - strtotime ("now")));
67
- /**/
68
- if (get_transient ($transient_security_breach)) /* Has this restriction already been breached? */
69
- {
70
- c_ws_plugin__s2member_no_cache::no_cache_constants (true) . wp_clear_auth_cookie ();
71
- /**/
72
- do_action ("ws_plugin__s2member_during_ip_restrictions_ok_no", get_defined_vars ());
73
- /**/
74
- status_header (503); /* Sends a status header; temporarily unavailable. */
75
- /**/
76
- echo _x ('<strong>503: Service Temporarily Unavailable</strong><br />Too many IP addresses accessing one secure area<em>!</em><br />Please contact Support if you need assistance.', "s2member-front", "s2member");
77
- /**/
78
- exit (); /* Clean exit. */
79
- }
80
- else if (count ($entries) > $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction"])
81
- {
82
- c_ws_plugin__s2member_no_cache::no_cache_constants (true) . wp_clear_auth_cookie ();
83
- /**/
84
- set_transient ($transient_security_breach, 1, $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction_time"]);
85
- /**/
86
- do_action ("ws_plugin__s2member_during_ip_restrictions_ok_no", get_defined_vars ());
87
- /**/
88
- status_header (503); /* Sends a status header; temporarily unavailable. */
89
- /**/
90
- echo _x ('<strong>503: Service Temporarily Unavailable</strong><br />Too many IP addresses accessing one secure area<em>!</em><br />Please contact Support if you need assistance.', "s2member-front", "s2member");
91
- /**/
92
- exit (); /* Clean exit. */
93
- }
94
- else /* OK, this looks legitimate. Apply Filters here and return true. */
95
- {
96
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
97
- do_action ("ws_plugin__s2member_during_ip_restrictions_ok_yes", get_defined_vars ());
98
- unset ($__refs, $__v); /* Unset defined __refs, __v. */
99
- /**/
100
- return apply_filters ("ws_plugin__s2member_ip_restrictions_ok", true, get_defined_vars ());
101
- }
102
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  /**/
104
  return apply_filters ("ws_plugin__s2member_ip_restrictions_ok", true, get_defined_vars ());
105
  }
@@ -117,10 +135,10 @@ if (!class_exists ("c_ws_plugin__s2member_ip_restrictions"))
117
  do_action ("ws_plugin__s2member_before_specific_ip_restriction_breached_security", get_defined_vars ());
118
  /**/
119
  $prefix = "s2m_ipr_"; /* s2Member Transient prefix for all IP Restrictions. */
120
- $transient_security_breach = $prefix . md5 ("s2member_ip_restrictions_" . $restriction . "_security_breach");
121
- $associated_with_security_breach = (get_transient ($transient_security_breach)) ? true : false;
122
  /**/
123
- return apply_filters ("ws_plugin__s2member_before_specific_ip_restriction_breached_security", $associated_with_security_breach, get_defined_vars ());
124
  }
125
  /**
126
  * Resets/deletes specific IP Restrictions.
@@ -129,7 +147,9 @@ if (!class_exists ("c_ws_plugin__s2member_ip_restrictions"))
129
  * @since 3.5
130
  *
131
  * @param str $restriction Unique IP Restriction name/identifier. Such as a Username, or a unique access code.
132
- * @return null
 
 
133
  */
134
  public static function delete_reset_specific_ip_restrictions ($restriction = FALSE)
135
  {
@@ -138,15 +158,15 @@ if (!class_exists ("c_ws_plugin__s2member_ip_restrictions"))
138
  do_action ("ws_plugin__s2member_before_delete_reset_specific_ip_restrictions", get_defined_vars ());
139
  /**/
140
  $prefix = "s2m_ipr_"; /* s2Member Transient prefix for all IP Restrictions. */
141
- $transient_entries = $prefix . md5 ("s2member_ip_restrictions_" . $restriction . "_entries");
142
- $transient_security_breach = $prefix . md5 ("s2member_ip_restrictions_" . $restriction . "_security_breach");
143
  /**/
144
  $wpdb->query ("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '%" . esc_sql (like_escape ($transient_entries)) . "'");
145
  $wpdb->query ("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '%" . esc_sql (like_escape ($transient_security_breach)) . "'");
146
  /**/
147
  do_action ("ws_plugin__s2member_after_delete_reset_specific_ip_restrictions", get_defined_vars ());
148
  /**/
149
- return; /* Return for uniformity. */
150
  }
151
  /**
152
  * Resets/deletes specific IP Restrictions via AJAX.
@@ -162,19 +182,24 @@ if (!class_exists ("c_ws_plugin__s2member_ip_restrictions"))
162
  {
163
  do_action ("ws_plugin__s2member_before_delete_reset_specific_ip_restrictions_via_ajax", get_defined_vars ());
164
  /**/
165
- if (current_user_can ("create_users")) /* Check priveledges as well. */
 
 
 
 
166
  /**/
167
  if (!empty ($_POST["ws_plugin__s2member_delete_reset_specific_ip_restrictions_via_ajax"]))
168
  if (($nonce = $_POST["ws_plugin__s2member_delete_reset_specific_ip_restrictions_via_ajax"]))
169
  if (wp_verify_nonce ($nonce, "ws-plugin--s2member-delete-reset-specific-ip-restrictions-via-ajax"))
170
  /**/
171
  if (!empty ($_POST["ws_plugin__s2member_delete_reset_specific_ip_restriction"]))
172
- if (($restriction = trim (stripslashes ($_POST["ws_plugin__s2member_delete_reset_specific_ip_restriction"]))))
173
- /**/
174
- if (c_ws_plugin__s2member_ip_restrictions::delete_reset_specific_ip_restrictions ($restriction) !== "nill")
175
- echo apply_filters ("ws_plugin__s2member_delete_reset_specific_ip_restrictions_via_ajax", 1, get_defined_vars ());
 
176
  /**/
177
- exit (); /* Clean exit. */
178
  }
179
  /**
180
  * Resets/deletes all IP Restrictions.
@@ -182,7 +207,9 @@ if (!class_exists ("c_ws_plugin__s2member_ip_restrictions"))
182
  * @package s2Member\IP_Restrictions
183
  * @since 3.5
184
  *
185
- * @return null
 
 
186
  */
187
  public static function delete_reset_all_ip_restrictions ()
188
  {
@@ -195,7 +222,7 @@ if (!class_exists ("c_ws_plugin__s2member_ip_restrictions"))
195
  /**/
196
  do_action ("ws_plugin__s2member_after_delete_reset_all_ip_restrictions", get_defined_vars ());
197
  /**/
198
- return; /* Return for uniformity. */
199
  }
200
  /**
201
  * Resets/deletes all IP Restrictions via AJAX.
@@ -211,16 +238,20 @@ if (!class_exists ("c_ws_plugin__s2member_ip_restrictions"))
211
  {
212
  do_action ("ws_plugin__s2member_before_delete_reset_all_ip_restrictions_via_ajax", get_defined_vars ());
213
  /**/
214
- if (current_user_can ("create_users")) /* Check priveledges as well. */
 
 
 
 
215
  /**/
216
  if (!empty ($_POST["ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax"]))
217
  if (($nonce = $_POST["ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax"]))
218
  if (wp_verify_nonce ($nonce, "ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax"))
219
  /**/
220
- if (c_ws_plugin__s2member_ip_restrictions::delete_reset_all_ip_restrictions () !== "nill")
221
- echo apply_filters ("ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax", 1, get_defined_vars ());
222
  /**/
223
- exit (); /* Clean exit. */
224
  }
225
  }
226
  }
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_ip_restrictions"))
21
  {
30
  /**
31
  * Handles IP Restrictions.
32
  *
33
+ * IP address details are stored as Transients.
34
  *
35
  * @package s2Member\IP_Restrictions
36
  * @since 3.5
41
  */
42
  public static function ip_restrictions_ok ($ip = FALSE, $restriction = FALSE)
43
  {
44
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
45
  do_action ("ws_plugin__s2member_before_ip_restrictions_ok", get_defined_vars ());
46
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
47
  /**/
48
+ if (!apply_filters ("ws_plugin__s2member_disable_all_ip_restrictions", false, get_defined_vars ())
49
+ /* Also allow specific exclusions here. */ && !apply_filters ("ws_plugin__s2member_disable_specific_ip_restriction", false, get_defined_vars ())
50
+ /* And enabled by site owner? */ && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction"] /* And a valid ``$restriction``? */ && $restriction && is_string ($restriction)
51
+ /* Flag indicating that we ARE processing this IP Restriction. Useful in Hooks/Filters. */ && ($processing = true))
52
+ {
53
+ $msg_503 = _x ('<strong>503: Service Temporarily Unavailable</strong><br />Too many IP addresses accessing one secure area<em>!</em><br />Please contact Support if you need assistance.', "s2member-front", "s2member");
54
+ /**/
55
+ $prefix = "s2m_ipr_"; /* s2Member Transient prefix for all IP Restrictions. Allows s2Member to find these easily. */
56
+ /**/
57
+ $transient_entries = $prefix . md5 ("s2member_ip_restrictions_" . $restriction . "_entries");
58
+ $transient_security_breach = $prefix . md5 ("s2member_ip_restrictions_" . $restriction . "_security_breach");
59
+ /**/
60
+ /* If you add Filters, use a string compatible with PHP's strtotime() function. */
61
+ $concurrency = apply_filters ("ws_plugin__s2member_ip_restrictions__concurrency_time_per_ip", "30 days");
62
+ /**/
63
+ $entries = (is_array ($entries = get_transient ($transient_entries))) ? $entries : array ();
64
+ /**/
65
+ foreach ($entries as $_entry => $_time) /* Auto-expire entries, based on time. */
66
+ if ($_time < strtotime ("-" . $concurrency)) /* Based on time. */
67
+ unset($entries[$_entry]); /* Unset this entry value. */
68
+ /**/
69
+ $ip = ($ip && is_string ($ip)) ? $ip : "empty"; /* Allow empty IPs. */
70
+ $entries[$ip] = strtotime ("now"); /* Log entry. Add IP with entry time. */
71
+ set_transient ($transient_entries, $entries, 2 * (strtotime ("+" . $concurrency) - strtotime ("now")));
72
+ /**/
73
+ if (get_transient ($transient_security_breach)) /* Already breached security? */
74
+ {
75
+ c_ws_plugin__s2member_no_cache::no_cache_constants (true);
76
+ /**/
77
+ status_header(503); /* Send a 503 error status header; temporarily unavailable. */
78
+ wp_clear_auth_cookie (); /* Clear authorization cookies; we need to log them out now. */
79
+ header("Content-Type: text/html; charset=utf-8"); /* Content-Type text/html with UTF-8. */
80
+ eval('while (@ob_end_clean ());'); /* End/clean any output buffers that may exist. */
81
+ /**/
82
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
83
+ do_action ("ws_plugin__s2member_during_ip_restrictions_ok_no", get_defined_vars ());
84
+ unset ($__refs, $__v); /* Unset defined __refs, __v. */
85
+ /**/
86
+ exit($msg_503); /* Clean exit with 503 error message. */
87
+ }
88
+ /**/
89
+ else if (count ($entries) > $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction"])
90
+ {
91
+ c_ws_plugin__s2member_no_cache::no_cache_constants (true);
92
+ /**/
93
+ set_transient /* A security breach has just occurred. We need to set this Transient now. */
94
+ ($transient_security_breach, 1, $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction_time"]);
95
+ /**/
96
+ status_header(503); /* Send a 503 error status header; temporarily unavailable. */
97
+ wp_clear_auth_cookie (); /* Clear authorization cookies; we need to log them out now. */
98
+ header("Content-Type: text/html; charset=utf-8"); /* Content-Type text/html with UTF-8. */
99
+ eval('while (@ob_end_clean ());'); /* End/clean any output buffers that may exist. */
100
+ /**/
101
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
102
+ do_action ("ws_plugin__s2member_during_ip_restrictions_ok_no", get_defined_vars ());
103
+ unset ($__refs, $__v); /* Unset defined __refs, __v. */
104
+ /**/
105
+ exit($msg_503); /* Clean exit with 503 error message. */
106
+ }
107
+ /**/
108
+ else /* OK, this looks legitimate. Apply Filters here and return true. */
109
+ {
110
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
111
+ do_action ("ws_plugin__s2member_during_ip_restrictions_ok_yes", get_defined_vars ());
112
+ unset ($__refs, $__v); /* Unset defined __refs, __v. */
113
+ /**/
114
+ return apply_filters ("ws_plugin__s2member_ip_restrictions_ok", true, get_defined_vars ());
115
+ }
116
+ }
117
+ /**/
118
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
119
+ do_action ("ws_plugin__s2member_during_ip_restrictions_ok_yes", get_defined_vars ());
120
+ unset ($__refs, $__v); /* Unset defined __refs, __v. */
121
  /**/
122
  return apply_filters ("ws_plugin__s2member_ip_restrictions_ok", true, get_defined_vars ());
123
  }
135
  do_action ("ws_plugin__s2member_before_specific_ip_restriction_breached_security", get_defined_vars ());
136
  /**/
137
  $prefix = "s2m_ipr_"; /* s2Member Transient prefix for all IP Restrictions. */
138
+ $transient_security_breach = $prefix . md5 ("s2member_ip_restrictions_" . (string)$restriction . "_security_breach");
139
+ $breached_security = $associated_with_security_breach = (get_transient ($transient_security_breach)) ? true : false;
140
  /**/
141
+ return apply_filters ("ws_plugin__s2member_before_specific_ip_restriction_breached_security", $breached_security, get_defined_vars ());
142
  }
143
  /**
144
  * Resets/deletes specific IP Restrictions.
147
  * @since 3.5
148
  *
149
  * @param str $restriction Unique IP Restriction name/identifier. Such as a Username, or a unique access code.
150
+ * @return bool Always returns a `true` value.
151
+ *
152
+ * @todo Make return value conditional, based on success.
153
  */
154
  public static function delete_reset_specific_ip_restrictions ($restriction = FALSE)
155
  {
158
  do_action ("ws_plugin__s2member_before_delete_reset_specific_ip_restrictions", get_defined_vars ());
159
  /**/
160
  $prefix = "s2m_ipr_"; /* s2Member Transient prefix for all IP Restrictions. */
161
+ $transient_entries = $prefix . md5 ("s2member_ip_restrictions_" . (string)$restriction . "_entries");
162
+ $transient_security_breach = $prefix . md5 ("s2member_ip_restrictions_" . (string)$restriction . "_security_breach");
163
  /**/
164
  $wpdb->query ("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '%" . esc_sql (like_escape ($transient_entries)) . "'");
165
  $wpdb->query ("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '%" . esc_sql (like_escape ($transient_security_breach)) . "'");
166
  /**/
167
  do_action ("ws_plugin__s2member_after_delete_reset_specific_ip_restrictions", get_defined_vars ());
168
  /**/
169
+ return apply_filters ("ws_plugin__s2member_delete_reset_specific_ip_restrictions", true, get_defined_vars ());
170
  }
171
  /**
172
  * Resets/deletes specific IP Restrictions via AJAX.
182
  {
183
  do_action ("ws_plugin__s2member_before_delete_reset_specific_ip_restrictions_via_ajax", get_defined_vars ());
184
  /**/
185
+ status_header(200); /* Send a 200 OK status header. */
186
+ header("Content-Type: text/plain; charset=utf-8"); /* Content-Type with UTF-8. */
187
+ eval('while (@ob_end_clean ());'); /* End/clean all output buffers that may exist. */
188
+ /**/
189
+ if (current_user_can ("create_users")) /* Check priveledges. Ability to create Users? */
190
  /**/
191
  if (!empty ($_POST["ws_plugin__s2member_delete_reset_specific_ip_restrictions_via_ajax"]))
192
  if (($nonce = $_POST["ws_plugin__s2member_delete_reset_specific_ip_restrictions_via_ajax"]))
193
  if (wp_verify_nonce ($nonce, "ws-plugin--s2member-delete-reset-specific-ip-restrictions-via-ajax"))
194
  /**/
195
  if (!empty ($_POST["ws_plugin__s2member_delete_reset_specific_ip_restriction"]))
196
+ if (is_string /* Must be a string here. */ ($_POST["ws_plugin__s2member_delete_reset_specific_ip_restriction"]))
197
+ if (($restriction = trim (stripslashes ($_POST["ws_plugin__s2member_delete_reset_specific_ip_restriction"]))))
198
+ /**/
199
+ if (c_ws_plugin__s2member_ip_restrictions::delete_reset_specific_ip_restrictions ($restriction))
200
+ $success = true; /* Yes, this IP Restriction was deleted/reset. */
201
  /**/
202
+ exit(apply_filters ("ws_plugin__s2member_delete_reset_specific_ip_restrictions_via_ajax", ((isset ($success) && $success) ? "1" : "0"), get_defined_vars ()));
203
  }
204
  /**
205
  * Resets/deletes all IP Restrictions.
207
  * @package s2Member\IP_Restrictions
208
  * @since 3.5
209
  *
210
+ * @return bool Always returns a `true` value.
211
+ *
212
+ * @todo Make return value conditional, based on success.
213
  */
214
  public static function delete_reset_all_ip_restrictions ()
215
  {
222
  /**/
223
  do_action ("ws_plugin__s2member_after_delete_reset_all_ip_restrictions", get_defined_vars ());
224
  /**/
225
+ return apply_filters ("ws_plugin__s2member_delete_reset_all_ip_restrictions", true, get_defined_vars ());
226
  }
227
  /**
228
  * Resets/deletes all IP Restrictions via AJAX.
238
  {
239
  do_action ("ws_plugin__s2member_before_delete_reset_all_ip_restrictions_via_ajax", get_defined_vars ());
240
  /**/
241
+ status_header(200); /* Send a 200 OK status header. */
242
+ header("Content-Type: text/plain; charset=utf-8"); /* Content-Type with UTF-8. */
243
+ eval('while (@ob_end_clean ());'); /* End/clean all output buffers that may exist. */
244
+ /**/
245
+ if (current_user_can ("create_users")) /* Check priveledges. Ability to create Users? */
246
  /**/
247
  if (!empty ($_POST["ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax"]))
248
  if (($nonce = $_POST["ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax"]))
249
  if (wp_verify_nonce ($nonce, "ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax"))
250
  /**/
251
+ if (c_ws_plugin__s2member_ip_restrictions::delete_reset_all_ip_restrictions ())
252
+ $success = true; /* Yes, all IP Restrictions were deleted/reset. */
253
  /**/
254
+ exit(apply_filters ("ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax", ((isset ($success) && $success) ? "1" : "0"), get_defined_vars ()));
255
  }
256
  }
257
  }
includes/classes/list-servers.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_list_servers"))
21
  {
@@ -72,16 +72,16 @@ if (!class_exists ("c_ws_plugin__s2member_list_servers"))
72
  {
73
  global $current_site, $current_blog; /* For Multisite support. */
74
  /**/
75
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
76
  do_action ("ws_plugin__s2member_before_process_list_servers", get_defined_vars ());
77
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
78
  /**/
79
- if (($args = func_get_args ()) && $role && strlen ($level) && $login && is_email ($email) && $opt_in && $user_id && is_object ($user = new WP_User ($user_id)) && ($user_id = $user->ID))
80
  {
81
- $ccaps = implode (",", c_ws_plugin__s2member_user_access::user_access_ccaps ($user)); /* Get Custom Capabilities ( comma-delimited ). */
82
  /**/
83
  $email_configs_were_on = c_ws_plugin__s2member_email_configs::email_config_status (); /* s2Member Filters enabled? */
84
- c_ws_plugin__s2member_email_configs::email_config_release (true); /* Release all mail Filters before we begin this routine. */
85
  /**/
86
  if (!empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mailchimp_api_key"]) && !empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $level . "_mailchimp_list_ids"]))
87
  {
@@ -149,11 +149,12 @@ if (!class_exists ("c_ws_plugin__s2member_list_servers"))
149
  {
150
  $aweber["bcc"] = apply_filters ("ws_plugin__s2member_aweber_bcc", false, get_defined_vars ());
151
  $aweber["pass_inclusion"] = (apply_filters ("ws_plugin__s2member_aweber_pass_inclusion", false, get_defined_vars ()) && $pass) ? "\nPass: " . $pass : false;
 
152
  /**/
153
  if ($aweber["wp_mail_response"] = wp_mail ($aweber["list_id"] . "@aweber.com", /* AWeber® List ID converts to email address @aweber.com. */
154
  ($aweber["wp_mail_sbj"] = apply_filters ("ws_plugin__s2member_aweber_sbj", "s2Member Subscription Request", get_defined_vars ())), /* These Filters make it possible to customize these emails. */
155
- ($aweber["wp_mail_msg"] = apply_filters ("ws_plugin__s2member_aweber_msg", "s2Member Subscription Request\ns2Member w/ PayPal Email ID\nAd Tracking: s2Member-" . ((is_multisite () && !is_main_site ()) ? $current_blog->domain . $current_blog->path : $_SERVER["HTTP_HOST"]) . "\nEMail Address: " . $email . "\nBuyer: " . $fname . " " . $lname . "\nFull Name: " . $fname . " " . $lname . "\nFirst Name: " . $fname . "\nLast Name: " . $lname . "\nIP Address: " . $ip . "\nUser ID: " . $user_id . "\nLogin: " . $login . $aweber["pass_inclusion"] . "\nRole: " . $role . "\nLevel: " . $level . "\nCCaps: " . $ccaps . "\n - end.", get_defined_vars ())),/**/
156
- ($aweber["wp_mail_headers"] = "From: \"" . preg_replace ("/\"/", "", $fname . " " . $lname) . "\" <" . $email . ">" . (($aweber["bcc"]) ? "\r\nBcc: " . $aweber["bcc"] : "") . "\r\nContent-Type: text/plain; charset=utf-8")))
157
  $aweber["wp_mail_success"] = $success = true; /* Flag indicating that we DO have a successful processing of a new List; affects the function's overall return value. */
158
  /**/
159
  $logv = c_ws_plugin__s2member_utilities::ver_details ();
@@ -170,7 +171,7 @@ if (!class_exists ("c_ws_plugin__s2member_list_servers"))
170
  }
171
  }
172
  /**/
173
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
174
  do_action ("ws_plugin__s2member_during_process_list_servers", get_defined_vars ());
175
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
176
  /**/
@@ -178,7 +179,7 @@ if (!class_exists ("c_ws_plugin__s2member_list_servers"))
178
  c_ws_plugin__s2member_email_configs::email_config ();
179
  }
180
  /**/
181
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
182
  do_action ("ws_plugin__s2member_after_process_list_servers", get_defined_vars ());
183
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
184
  /**/
@@ -210,14 +211,16 @@ if (!class_exists ("c_ws_plugin__s2member_list_servers"))
210
  {
211
  global $current_site, $current_blog; /* For Multisite support. */
212
  /**/
213
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
214
  do_action ("ws_plugin__s2member_before_process_list_server_removals", get_defined_vars ());
215
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
216
  /**/
217
- if (($args = func_get_args ()) && $role && strlen ($level) && $login && is_email ($email) && $opt_out && $user_id && is_object ($user = new WP_User ($user_id)) && ($user_id = $user->ID))
218
  {
 
 
219
  $email_configs_were_on = c_ws_plugin__s2member_email_configs::email_config_status (); /* s2Member Filters enabled? */
220
- c_ws_plugin__s2member_email_configs::email_config_release (true); /* Release all mail Filters before we begin this routine. */
221
  /**/
222
  if (!empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mailchimp_api_key"]) && !empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $level . "_mailchimp_list_ids"]))
223
  {
@@ -263,11 +266,16 @@ if (!class_exists ("c_ws_plugin__s2member_list_servers"))
263
  {
264
  $aweber["removal_bcc"] = apply_filters ("ws_plugin__s2member_aweber_removal_bcc", false, get_defined_vars ());
265
  /**/
 
 
 
266
  if ($aweber["wp_mail_removal_response"] = wp_mail ($aweber["list_id"] . "@aweber.com", /* AWeber® List ID converts to email address @aweber.com. */
267
  ($aweber["wp_mail_removal_sbj"] = apply_filters ("ws_plugin__s2member_aweber_removal_sbj", "REMOVE#" . $email . "#s2Member#" . $aweber["list_id"], get_defined_vars ())), /* Bug fix. AWeber® does not like dots ( possibly other chars ) in the Ad Tracking field. Now using just: `s2Member`. */
268
  ($aweber["wp_mail_removal_msg"] = "REMOVE"), ($aweber["wp_mail_removal_headers"] = "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">" . (($aweber["removal_bcc"]) ? "\r\nBcc: " . $aweber["removal_bcc"] : "") . "\r\nContent-Type: text/plain; charset=utf-8")))
269
  $aweber["wp_mail_removal_success"] = $removal_success = true; /* Flag indicating that we DO have a successful removal; affects the function's overall return value. */
270
  /**/
 
 
271
  $logv = c_ws_plugin__s2member_utilities::ver_details ();
272
  $logm = c_ws_plugin__s2member_utilities::mem_details ();
273
  $log4 = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . "\nUser-Agent: " . $_SERVER["HTTP_USER_AGENT"];
@@ -282,7 +290,7 @@ if (!class_exists ("c_ws_plugin__s2member_list_servers"))
282
  }
283
  }
284
  /**/
285
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
286
  do_action ("ws_plugin__s2member_during_process_list_server_removals", get_defined_vars ());
287
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
288
  /**/
@@ -290,7 +298,7 @@ if (!class_exists ("c_ws_plugin__s2member_list_servers"))
290
  c_ws_plugin__s2member_email_configs::email_config ();
291
  }
292
  /**/
293
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
294
  do_action ("ws_plugin__s2member_after_process_list_server_removals", get_defined_vars ());
295
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
296
  /**/
@@ -307,44 +315,56 @@ if (!class_exists ("c_ws_plugin__s2member_list_servers"))
307
  * @attaches-to: ``add_action("ws_plugin__s2member_during_collective_mods");``
308
  * @attaches-to: ``add_action("ws_plugin__s2member_during_collective_eots");``
309
  *
310
- * @param int|str $user_id A WordPress® User ID, numeric string or integer.
311
- * @param array $vars An array of defined variables from the calling Action Hook.
312
- * @param str $event A specific event that triggered this call from the Action Hook.
313
- * @param str $event_spec A specific event specification *( a broader classification )*.
314
- * @param str $mod_new_role If it's a modification, the new Role they are being modified to.
315
- * @param str $mod_old_role If it's a modification, the old Role they had previously.
316
- * @param obj $user Optional. A WP_User object that can reduce database queries for this routine.
317
- * @return null
318
- *
319
- * @todo Make it possible to transition Users, even if they were not currently on a list?
320
- * One suggestion was to send a double-opt-in email in that case; or to provide an option for this?
321
- * @todo Tighten up the call to ``c_ws_plugin__s2member_utils_strings::wrap_deep()`` by using `^$`?
322
  */
323
- public static function auto_process_list_server_removals ($user_id = FALSE, $vars = FALSE, $event = FALSE, $event_spec = FALSE, $mod_new_role = FALSE, $mod_old_role = FALSE, $user = FALSE)
324
  {
325
  global $current_site, $current_blog; /* For Multisite support. */
326
- static $auto_processed = array (); /* Only process ONE time for each User ID. */
327
  /**/
328
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
329
  do_action ("ws_plugin__s2member_before_auto_process_list_server_removals", get_defined_vars ());
330
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
331
  /**/
332
- $custom_reg_auto_op_outs = c_ws_plugin__s2member_utils_strings::wrap_deep ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_outs"], "/", "/i");
333
  /**/
334
- if ($user_id && !in_array ($user_id, $auto_processed) && (c_ws_plugin__s2member_utils_arrays::in_regex_array ($event, $custom_reg_auto_op_outs) || c_ws_plugin__s2member_utils_arrays::in_regex_array ($event_spec, $custom_reg_auto_op_outs)) && c_ws_plugin__s2member_list_servers::list_servers_integrated () && (is_object ($user) || is_object ($user = new WP_User ($user_id))) && ($user_id = $user->ID))
335
  {
336
- $role = ($event_spec === "modification" && $mod_new_role && $mod_old_role) ? $mod_old_role : c_ws_plugin__s2member_user_access::user_access_role ($user);
337
- $level = ($event_spec === "modification" && $mod_new_role && $mod_old_role) ? c_ws_plugin__s2member_user_access::user_access_role_to_level ($mod_old_role) : c_ws_plugin__s2member_user_access::user_access_level ($user);
 
 
 
338
  /**/
339
- if (($event_spec !== "modification" || ($event_spec === "modification" && $mod_new_role && $mod_new_role !== $role && strtotime ($user->user_registered) < strtotime ("-10 seconds") && ($event !== "user-role-change" || ($event === "user-role-change" && !empty ($_POST["ws_plugin__s2member_custom_reg_auto_opt_out_transitions"]))))) && ($auto_processed[$user_id] = true))
340
  {
341
- $removal_success = c_ws_plugin__s2member_list_servers::process_list_server_removals ($role, $level, $user->user_login, false, $user->user_email, $user->first_name, $user->last_name, false, true, $user_id);
342
- if ( /* Only if removed successfully. */$removal_success && $event_spec === "modification" && $mod_new_role && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_out_transitions"]) /* Transition? */
343
- c_ws_plugin__s2member_list_servers::process_list_servers ($mod_new_role, ($mod_new_level = c_ws_plugin__s2member_user_access::user_access_role_to_level ($mod_new_role)), $user->user_login, false, $user->user_email, $user->first_name, $user->last_name, false, true, false, $user_id);
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  }
345
  }
346
  /**/
347
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
348
  do_action ("ws_plugin__s2member_after_auto_process_list_server_removals", get_defined_vars ());
349
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
350
  /**/
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_list_servers"))
21
  {
72
  {
73
  global $current_site, $current_blog; /* For Multisite support. */
74
  /**/
75
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
76
  do_action ("ws_plugin__s2member_before_process_list_servers", get_defined_vars ());
77
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
78
  /**/
79
+ if (c_ws_plugin__s2member_list_servers::list_servers_integrated () && ($args = func_get_args ()) && $role && is_string ($role) && is_numeric ($level) && $login && is_string ($login) && is_string ($pass = (string)$pass) && $email && is_string ($email) && is_email ($email) && is_string ($fname = (string)$fname) && is_string ($lname = (string)$lname) && is_string ($ip = (string)$ip) && is_bool ($opt_in = (bool)$opt_in) && $opt_in && is_bool ($double_opt_in = (bool)$double_opt_in) && $user_id && is_numeric ($user_id) && is_object ($user = new WP_User ($user_id)) && !empty ($user->ID))
80
  {
81
+ $ccaps = implode (",", c_ws_plugin__s2member_user_access::user_access_ccaps ($user)); /* Get Custom Capabilities. */
82
  /**/
83
  $email_configs_were_on = c_ws_plugin__s2member_email_configs::email_config_status (); /* s2Member Filters enabled? */
84
+ c_ws_plugin__s2member_email_configs::email_config_release (); /* Release s2Member Filters before we begin this routine. */
85
  /**/
86
  if (!empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mailchimp_api_key"]) && !empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $level . "_mailchimp_list_ids"]))
87
  {
149
  {
150
  $aweber["bcc"] = apply_filters ("ws_plugin__s2member_aweber_bcc", false, get_defined_vars ());
151
  $aweber["pass_inclusion"] = (apply_filters ("ws_plugin__s2member_aweber_pass_inclusion", false, get_defined_vars ()) && $pass) ? "\nPass: " . $pass : false;
152
+ $buyer = ($fname || $lname) ? trim ($fname . " " . $lname) : /* Must have. AWeber's PayPal Email Parser chokes on an empty value. */ ucwords (preg_replace ("/^(.+?)@.+/", "$1", $email));
153
  /**/
154
  if ($aweber["wp_mail_response"] = wp_mail ($aweber["list_id"] . "@aweber.com", /* AWeber® List ID converts to email address @aweber.com. */
155
  ($aweber["wp_mail_sbj"] = apply_filters ("ws_plugin__s2member_aweber_sbj", "s2Member Subscription Request", get_defined_vars ())), /* These Filters make it possible to customize these emails. */
156
+ ($aweber["wp_mail_msg"] = apply_filters ("ws_plugin__s2member_aweber_msg", "s2Member Subscription Request\ns2Member w/ PayPal Email ID\nAd Tracking: s2Member-" . ((is_multisite () && !is_main_site ()) ? $current_blog->domain . $current_blog->path : $_SERVER["HTTP_HOST"]) . "\nEMail Address: " . $email . "\nBuyer: " . $buyer . "\nFull Name: " . trim ($fname . " " . $lname) . "\nFirst Name: " . $fname . "\nLast Name: " . $lname . "\nIP Address: " . $ip . "\nUser ID: " . $user_id . "\nLogin: " . $login . $aweber["pass_inclusion"] . "\nRole: " . $role . "\nLevel: " . $level . "\nCCaps: " . $ccaps . "\n - end.", get_defined_vars ())),/**/
157
+ ($aweber["wp_mail_headers"] = "From: \"" . preg_replace ("/\"/", "", trim ($fname . " " . $lname)) . "\" <" . $email . ">" . (($aweber["bcc"]) ? "\r\nBcc: " . $aweber["bcc"] : "") . "\r\nContent-Type: text/plain; charset=utf-8")))
158
  $aweber["wp_mail_success"] = $success = true; /* Flag indicating that we DO have a successful processing of a new List; affects the function's overall return value. */
159
  /**/
160
  $logv = c_ws_plugin__s2member_utilities::ver_details ();
171
  }
172
  }
173
  /**/
174
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
175
  do_action ("ws_plugin__s2member_during_process_list_servers", get_defined_vars ());
176
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
177
  /**/
179
  c_ws_plugin__s2member_email_configs::email_config ();
180
  }
181
  /**/
182
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
183
  do_action ("ws_plugin__s2member_after_process_list_servers", get_defined_vars ());
184
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
185
  /**/
211
  {
212
  global $current_site, $current_blog; /* For Multisite support. */
213
  /**/
214
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
215
  do_action ("ws_plugin__s2member_before_process_list_server_removals", get_defined_vars ());
216
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
217
  /**/
218
+ if (c_ws_plugin__s2member_list_servers::list_servers_integrated () && ($args = func_get_args ()) && $role && is_string ($role) && is_numeric ($level) && $login && is_string ($login) && is_string ($pass = (string)$pass) && $email && is_string ($email) && is_email ($email) && is_string ($fname = (string)$fname) && is_string ($lname = (string)$lname) && is_string ($ip = (string)$ip) && is_bool ($opt_out = (bool)$opt_out) && $opt_out && $user_id && is_numeric ($user_id) && is_object ($user = new WP_User ($user_id)) && !empty ($user->ID))
219
  {
220
+ $ccaps = implode (",", c_ws_plugin__s2member_user_access::user_access_ccaps ($user)); /* Get Custom Capabilities. */
221
+ /**/
222
  $email_configs_were_on = c_ws_plugin__s2member_email_configs::email_config_status (); /* s2Member Filters enabled? */
223
+ c_ws_plugin__s2member_email_configs::email_config_release (); /* Release s2Member Filters before we begin this routine. */
224
  /**/
225
  if (!empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mailchimp_api_key"]) && !empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $level . "_mailchimp_list_ids"]))
226
  {
266
  {
267
  $aweber["removal_bcc"] = apply_filters ("ws_plugin__s2member_aweber_removal_bcc", false, get_defined_vars ());
268
  /**/
269
+ c_ws_plugin__s2member_email_configs::email_config (); /* Email configs MUST be ON for removal requests.
270
+ The `From:` address MUST match AWeber account. See: <http://www.aweber.com/faq/questions/62/Can+I+Unsubscribe+People+Via+Email%3F>. */
271
+ /**/
272
  if ($aweber["wp_mail_removal_response"] = wp_mail ($aweber["list_id"] . "@aweber.com", /* AWeber® List ID converts to email address @aweber.com. */
273
  ($aweber["wp_mail_removal_sbj"] = apply_filters ("ws_plugin__s2member_aweber_removal_sbj", "REMOVE#" . $email . "#s2Member#" . $aweber["list_id"], get_defined_vars ())), /* Bug fix. AWeber® does not like dots ( possibly other chars ) in the Ad Tracking field. Now using just: `s2Member`. */
274
  ($aweber["wp_mail_removal_msg"] = "REMOVE"), ($aweber["wp_mail_removal_headers"] = "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">" . (($aweber["removal_bcc"]) ? "\r\nBcc: " . $aweber["removal_bcc"] : "") . "\r\nContent-Type: text/plain; charset=utf-8")))
275
  $aweber["wp_mail_removal_success"] = $removal_success = true; /* Flag indicating that we DO have a successful removal; affects the function's overall return value. */
276
  /**/
277
+ c_ws_plugin__s2member_email_configs::email_config_release (); /* Release. */
278
+ /**/
279
  $logv = c_ws_plugin__s2member_utilities::ver_details ();
280
  $logm = c_ws_plugin__s2member_utilities::mem_details ();
281
  $log4 = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . "\nUser-Agent: " . $_SERVER["HTTP_USER_AGENT"];
290
  }
291
  }
292
  /**/
293
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
294
  do_action ("ws_plugin__s2member_during_process_list_server_removals", get_defined_vars ());
295
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
296
  /**/
298
  c_ws_plugin__s2member_email_configs::email_config ();
299
  }
300
  /**/
301
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
302
  do_action ("ws_plugin__s2member_after_process_list_server_removals", get_defined_vars ());
303
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
304
  /**/
315
  * @attaches-to: ``add_action("ws_plugin__s2member_during_collective_mods");``
316
  * @attaches-to: ``add_action("ws_plugin__s2member_during_collective_eots");``
317
  *
318
+ * @param int|str $user_id Required. A WordPress® User ID, numeric string or integer.
319
+ * @param array $vars Required. An array of defined variables passed by the calling Hook.
320
+ * @param str $event Required. A specific event that triggered this call from the Action Hook.
321
+ * @param str $event_spec Required. A specific event specification *( a broader classification )*.
322
+ * @param str $mod_new_role Required if ``$event_spec === "modification"`` ( but can be empty ). Role the User is being modified to.
323
+ * @param str $mod_new_user Optional. If ``$event_spec === "modification"``, the new User object with current details.
324
+ * @param str $mod_old_user Optional. If ``$event_spec === "modification"``, the old/previous User obj with old details.
325
+ * @return null This function does not have a return value.
 
 
 
 
326
  */
327
+ public static function auto_process_list_server_removals ($user_id = FALSE, $vars = FALSE, $event = FALSE, $event_spec = FALSE, $mod_new_role = FALSE, $mod_new_user = FALSE, $mod_old_user = FALSE)
328
  {
329
  global $current_site, $current_blog; /* For Multisite support. */
330
+ static $auto_processed = array (); /* Process ONE time for each User. */
331
  /**/
332
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
333
  do_action ("ws_plugin__s2member_before_auto_process_list_server_removals", get_defined_vars ());
334
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
335
  /**/
336
+ $custom_reg_auto_op_outs = c_ws_plugin__s2member_utils_strings::wrap_deep ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_outs"], "/^", "$/i");
337
  /**/
338
+ if (c_ws_plugin__s2member_list_servers::list_servers_integrated () && $user_id && is_numeric ($user_id) && !in_array ($user_id, $auto_processed) && is_array ($vars) && is_string ($event = (string)$event) && is_string ($event_spec = (string)$event_spec) && (c_ws_plugin__s2member_utils_arrays::in_regex_array ($event, $custom_reg_auto_op_outs) || c_ws_plugin__s2member_utils_arrays::in_regex_array ($event_spec, $custom_reg_auto_op_outs)) && is_object ($user = $_user = new WP_User ($user_id)) && !empty ($user->ID))
339
  {
340
+ $mod_new_role = ($event_spec === "modification" && $mod_new_role && is_string ($mod_new_role)) ? $mod_new_role : /* Might be empty ( i.e. they now have NO Role ). */ false;
341
+ $mod_new_user = ($event_spec === "modification" && $mod_new_user && is_object ($mod_new_user) && !empty ($mod_new_user->ID) && $mod_new_user->ID === $_user->ID) ? $mod_new_user : false;
342
+ $mod_old_user = ($event_spec === "modification" && $mod_old_user && is_object ($mod_old_user) && !empty ($mod_old_user->ID) && $mod_old_user->ID === $_user->ID) ? $mod_old_user : false;
343
+ /**/
344
+ $user = ($event_spec === "modification" && $mod_old_user) ? $mod_old_user : $_user; /* Now, should we switch over to the old/previous User object ``$mod_old_user`` here? Or, should we use the one pulled by this routine with the User's ID? */
345
  /**/
346
+ if (($event_spec !== "modification" || ($event_spec === "modification" && /* Might be empty ( i.e. they now have NO Role ). */ (string)$mod_new_role !== c_ws_plugin__s2member_user_access::user_access_role ($user) && strtotime ($user->user_registered) < strtotime ("-10 seconds") && ($event !== "user-role-change" || ($event === "user-role-change" && !empty ($vars["_p"]["ws_plugin__s2member_custom_reg_auto_opt_out_transitions"]))))) && ($auto_processed[$user->ID] = true))
347
  {
348
+ $removed = c_ws_plugin__s2member_list_servers::process_list_server_removals (c_ws_plugin__s2member_user_access::user_access_role ($user), c_ws_plugin__s2member_user_access::user_access_level ($user), $user->user_login, false, $user->user_email, $user->first_name, $user->last_name, false, true, $user->ID);
349
+ /**/
350
+ if ($event_spec === "modification" && $mod_new_role && ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_out_transitions"] === "2" || ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_out_transitions"] === "1" && $removed)) /* Transitoning User/Member to different list(s)? */)
351
+ {
352
+ $user = ($event_spec === "modification" && $mod_new_user) ? $mod_new_user : $_user; /* Now, should we switch over to a new/current User object ``$mod_new_user`` here? ( which may contain newly updated details ). Or, should we simply use the User object pulled by this routine with the User's ID? */
353
+ /**/
354
+ $transitioned = c_ws_plugin__s2member_list_servers::process_list_servers ($mod_new_role, c_ws_plugin__s2member_user_access::user_access_role_to_level ($mod_new_role), $user->user_login, false, $user->user_email, $user->first_name, $user->last_name, false, true, (($removed) ? false : true), $user->ID);
355
+ /**/
356
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
357
+ do_action ("ws_plugin__s2member_during_auto_process_list_server_removal_transitions", get_defined_vars ());
358
+ unset ($__refs, $__v); /* Unset defined __refs, __v. */
359
+ }
360
+ /**/
361
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
362
+ do_action ("ws_plugin__s2member_during_auto_process_list_server_removals", get_defined_vars ());
363
+ unset ($__refs, $__v); /* Unset defined __refs, __v. */
364
  }
365
  }
366
  /**/
367
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
368
  do_action ("ws_plugin__s2member_after_auto_process_list_server_removals", get_defined_vars ());
369
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
370
  /**/
includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 110720
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level"))
21
  {
@@ -40,13 +40,13 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
40
  */
41
  public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
42
  {
43
- extract($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
44
  /**/
45
  if (/**/(!empty ($paypal["txn_type"]) && preg_match ("/^subscr_modify$/i", $paypal["txn_type"]))/**/
46
  && (!empty ($paypal["item_number"]) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"]))/**/
47
  && (!empty ($paypal["subscr_id"])) && (!empty ($paypal["payer_email"]))/**/)
48
  {
49
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
50
  do_action ("ws_plugin__s2member_during_paypal_notify_before_subscr_modify", get_defined_vars ());
51
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
52
  /**/
@@ -68,7 +68,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
68
  $paypal["regular_term"] = $paypal["period3"]; /* This is just set to keep a standard; this way both initial_term & regular_term are available. */
69
  $paypal["recurring"] = ($paypal["recurring"]) ? $paypal["mc_amount3"] : "0"; /* If non-recurring, this should be zero, otherwise Regular. */
70
  /**/
71
- eval('$ipn_signup_vars = $paypal; unset($ipn_signup_vars["s2member_log"]);'); /* Create array of IPN signup vars w/o s2member_log. */
72
  /**/
73
  if (($user_id = c_ws_plugin__s2member_utils_users::get_user_id_with ($paypal["subscr_id"])) && is_object ($user = new WP_User ($user_id)) && $user->ID)
74
  {
@@ -76,7 +76,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
76
  {
77
  $processing = $modifying = $during = true; /* Yes, we ARE processing this. */
78
  /**/
79
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
80
  do_action ("ws_plugin__s2member_during_paypal_notify_during_before_subscr_modify", get_defined_vars ());
81
  do_action ("ws_plugin__s2member_during_collective_mods", $user_id, get_defined_vars (), "ipn-upgrade-downgrade", "modification", "s2member_level" . $paypal["level"]);
82
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
@@ -87,7 +87,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
87
  /**/
88
  if (is_multisite () && !is_user_member_of_blog ($user_id)) /* Must have a Role on this Blog. */
89
  {
90
- add_existing_user_to_blog(array ("user_id" => $user_id, "role" => "s2member_level" . $paypal["level"]));
91
  $user = new WP_User ($user_id);
92
  }
93
  /**/
@@ -153,7 +153,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
153
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
154
  {
155
  if (is_array ($fields) && !empty ($fields))
156
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
157
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
158
  break;
159
  /**/
@@ -221,7 +221,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
221
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
222
  {
223
  if (is_array ($fields) && !empty ($fields))
224
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
225
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
226
  break;
227
  /**/
@@ -251,7 +251,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
251
  if (($code = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $code)))
252
  {
253
  if (is_array ($fields) && !empty ($fields))
254
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
255
  if (!($code = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $code)))
256
  break;
257
  /**/
@@ -264,7 +264,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
264
  }
265
  }
266
  /**/
267
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
268
  do_action ("ws_plugin__s2member_during_paypal_notify_during_subscr_modify", get_defined_vars ());
269
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
270
  }
@@ -281,7 +281,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
281
  $paypal["s2member_log"][] = "Duplicate IPN. Already processed. This IPN will be ignored.";
282
  }
283
  /**/
284
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
285
  do_action ("ws_plugin__s2member_during_paypal_notify_after_subscr_modify", get_defined_vars ());
286
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
287
  /**/
15
  * @since 110720
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level"))
21
  {
40
  */
41
  public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
42
  {
43
+ extract ($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
44
  /**/
45
  if (/**/(!empty ($paypal["txn_type"]) && preg_match ("/^subscr_modify$/i", $paypal["txn_type"]))/**/
46
  && (!empty ($paypal["item_number"]) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"]))/**/
47
  && (!empty ($paypal["subscr_id"])) && (!empty ($paypal["payer_email"]))/**/)
48
  {
49
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
50
  do_action ("ws_plugin__s2member_during_paypal_notify_before_subscr_modify", get_defined_vars ());
51
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
52
  /**/
68
  $paypal["regular_term"] = $paypal["period3"]; /* This is just set to keep a standard; this way both initial_term & regular_term are available. */
69
  $paypal["recurring"] = ($paypal["recurring"]) ? $paypal["mc_amount3"] : "0"; /* If non-recurring, this should be zero, otherwise Regular. */
70
  /**/
71
+ eval ('$ipn_signup_vars = $paypal; unset($ipn_signup_vars["s2member_log"]);'); /* Create array of IPN signup vars w/o s2member_log. */
72
  /**/
73
  if (($user_id = c_ws_plugin__s2member_utils_users::get_user_id_with ($paypal["subscr_id"])) && is_object ($user = new WP_User ($user_id)) && $user->ID)
74
  {
76
  {
77
  $processing = $modifying = $during = true; /* Yes, we ARE processing this. */
78
  /**/
79
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
80
  do_action ("ws_plugin__s2member_during_paypal_notify_during_before_subscr_modify", get_defined_vars ());
81
  do_action ("ws_plugin__s2member_during_collective_mods", $user_id, get_defined_vars (), "ipn-upgrade-downgrade", "modification", "s2member_level" . $paypal["level"]);
82
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
87
  /**/
88
  if (is_multisite () && !is_user_member_of_blog ($user_id)) /* Must have a Role on this Blog. */
89
  {
90
+ add_existing_user_to_blog (array ("user_id" => $user_id, "role" => "s2member_level" . $paypal["level"]));
91
  $user = new WP_User ($user_id);
92
  }
93
  /**/
153
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
154
  {
155
  if (is_array ($fields) && !empty ($fields))
156
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
157
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
158
  break;
159
  /**/
221
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
222
  {
223
  if (is_array ($fields) && !empty ($fields))
224
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
225
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
226
  break;
227
  /**/
251
  if (($code = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $code)))
252
  {
253
  if (is_array ($fields) && !empty ($fields))
254
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
255
  if (!($code = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $code)))
256
  break;
257
  /**/
264
  }
265
  }
266
  /**/
267
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
268
  do_action ("ws_plugin__s2member_during_paypal_notify_during_subscr_modify", get_defined_vars ());
269
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
270
  }
281
  $paypal["s2member_log"][] = "Duplicate IPN. Already processed. This IPN will be ignored.";
282
  }
283
  /**/
284
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
285
  do_action ("ws_plugin__s2member_during_paypal_notify_after_subscr_modify", get_defined_vars ());
286
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
287
  /**/
includes/classes/paypal-notify-in-subscr-or-rp-cancellation-w-level.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 110720
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_cancellation_w_level"))
21
  {
@@ -40,7 +40,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_cancella
40
  */
41
  public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
42
  {
43
- extract($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
44
  /**/
45
  if (/**/(!empty ($paypal["txn_type"]) && preg_match ("/^(subscr_cancel|recurring_payment_profile_cancel)$/i", $paypal["txn_type"]))/**/
46
  && !(preg_match ("/^recurring_payment_profile_cancel$/i", $paypal["txn_type"]) && !empty ($paypal["initial_payment_status"]) && preg_match ("/^failed$/i", $paypal["initial_payment_status"]))/**/
@@ -51,7 +51,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_cancella
51
  && (!empty ($paypal["item_name"]) || ($paypal["item_name"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_item_name ($paypal)))/**/
52
  && (!empty ($paypal["payer_email"]) || ($paypal["payer_email"] = c_ws_plugin__s2member_utils_users::get_user_email_with ($paypal["subscr_id"])))/**/)
53
  {
54
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
55
  do_action ("ws_plugin__s2member_during_paypal_notify_before_subscr_cancel", get_defined_vars ());
56
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
57
  /**/
@@ -82,7 +82,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_cancella
82
  /**/
83
  $paypal["s2member_log"][] = "Auto-EOT Time for this account: " . date ("D M j, Y g:i a T", $auto_eot_time);
84
  /**/
85
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
86
  do_action ("ws_plugin__s2member_during_paypal_notify_during_subscr_cancel", get_defined_vars ());
87
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
88
  }
@@ -103,7 +103,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_cancella
103
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
104
  {
105
  if (is_array ($fields) && !empty ($fields))
106
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
107
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
108
  break;
109
  /**/
@@ -155,7 +155,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_cancella
155
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
156
  {
157
  if (is_array ($fields) && !empty ($fields))
158
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
159
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
160
  break;
161
  /**/
@@ -180,7 +180,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_cancella
180
  $paypal["s2member_log"][] = "Duplicate IPN. Already processed. This IPN will be ignored.";
181
  }
182
  /**/
183
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
184
  do_action ("ws_plugin__s2member_during_paypal_notify_after_subscr_cancel", get_defined_vars ());
185
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
186
  /**/
15
  * @since 110720
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_cancellation_w_level"))
21
  {
40
  */
41
  public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
42
  {
43
+ extract ($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
44
  /**/
45
  if (/**/(!empty ($paypal["txn_type"]) && preg_match ("/^(subscr_cancel|recurring_payment_profile_cancel)$/i", $paypal["txn_type"]))/**/
46
  && !(preg_match ("/^recurring_payment_profile_cancel$/i", $paypal["txn_type"]) && !empty ($paypal["initial_payment_status"]) && preg_match ("/^failed$/i", $paypal["initial_payment_status"]))/**/
51
  && (!empty ($paypal["item_name"]) || ($paypal["item_name"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_item_name ($paypal)))/**/
52
  && (!empty ($paypal["payer_email"]) || ($paypal["payer_email"] = c_ws_plugin__s2member_utils_users::get_user_email_with ($paypal["subscr_id"])))/**/)
53
  {
54
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
55
  do_action ("ws_plugin__s2member_during_paypal_notify_before_subscr_cancel", get_defined_vars ());
56
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
57
  /**/
82
  /**/
83
  $paypal["s2member_log"][] = "Auto-EOT Time for this account: " . date ("D M j, Y g:i a T", $auto_eot_time);
84
  /**/
85
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
86
  do_action ("ws_plugin__s2member_during_paypal_notify_during_subscr_cancel", get_defined_vars ());
87
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
88
  }
103
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
104
  {
105
  if (is_array ($fields) && !empty ($fields))
106
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
107
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
108
  break;
109
  /**/
155
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
156
  {
157
  if (is_array ($fields) && !empty ($fields))
158
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
159
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
160
  break;
161
  /**/
180
  $paypal["s2member_log"][] = "Duplicate IPN. Already processed. This IPN will be ignored.";
181
  }
182
  /**/
183
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
184
  do_action ("ws_plugin__s2member_during_paypal_notify_after_subscr_cancel", get_defined_vars ());
185
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
186
  /**/
includes/classes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php CHANGED
@@ -150,7 +150,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_l
150
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
151
  {
152
  if (is_array ($fields) && !empty ($fields))
153
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
154
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
155
  break;
156
  /**/
@@ -200,7 +200,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_l
200
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
201
  {
202
  if (is_array ($fields) && !empty ($fields))
203
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
204
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
205
  break;
206
  /**/
@@ -345,7 +345,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_l
345
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
346
  {
347
  if (is_array ($fields) && !empty ($fields))
348
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
349
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
350
  break;
351
  /**/
@@ -399,7 +399,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_l
399
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
400
  {
401
  if (is_array ($fields) && !empty ($fields))
402
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
403
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
404
  break;
405
  /**/
150
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
151
  {
152
  if (is_array ($fields) && !empty ($fields))
153
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
154
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
155
  break;
156
  /**/
200
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
201
  {
202
  if (is_array ($fields) && !empty ($fields))
203
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
204
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
205
  break;
206
  /**/
345
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
346
  {
347
  if (is_array ($fields) && !empty ($fields))
348
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
349
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
350
  break;
351
  /**/
399
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
400
  {
401
  if (is_array ($fields) && !empty ($fields))
402
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
403
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
404
  break;
405
  /**/
includes/classes/paypal-notify-in-subscr-or-rp-payment-w-level.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 110720
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_w_level"))
21
  {
@@ -40,7 +40,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_
40
  */
41
  public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
42
  {
43
- extract($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
44
  /**/
45
  if (/**/(!empty ($paypal["txn_type"]) && preg_match ("/^(subscr_payment|recurring_payment)$/i", $paypal["txn_type"]))/**/
46
  && ((!empty ($paypal["item_number"]) || ($paypal["item_number"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_item_number ($paypal))) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"]))/**/
@@ -50,7 +50,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_
50
  && (!empty ($paypal["payer_email"]) || ($paypal["payer_email"] = c_ws_plugin__s2member_utils_users::get_user_email_with ($paypal["subscr_id"])))/**/
51
  && (!empty ($paypal["txn_id"])) && (!empty ($paypal["mc_gross"]))/**/)
52
  {
53
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
54
  do_action ("ws_plugin__s2member_during_paypal_notify_before_subscr_payment", get_defined_vars ());
55
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
56
  /**/
@@ -58,7 +58,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_
58
  {
59
  $paypal["s2member_log"][] = "s2Member `txn_type` identified as " . ($identified_as = "( `subscr_payment|recurring_payment` )") . ".";
60
  $paypal["s2member_log"][] = "Sleeping for 5 seconds. Waiting for a possible ( `subscr_signup|subscr_modify|recurring_payment_profile_created` ).";
61
- sleep(5); /* Sleep here for a moment. PayPal® sometimes sends a subscr_payment before the subscr_signup, subscr_modify. */
62
  /* It is NOT a big deal if they do. However, s2Member goes to sleep here, just to help keep the log files in a logical order. */
63
  $paypal["s2member_log"][] = "Awake. It's " . date ("D M j, Y g:i:s a T") . ". s2Member `txn_type` identified as " . $identified_as . ".";
64
  /**/
@@ -106,7 +106,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_
106
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
107
  {
108
  if (is_array ($fields) && !empty ($fields))
109
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
110
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
111
  break;
112
  /**/
@@ -171,7 +171,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_
171
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
172
  {
173
  if (is_array ($fields) && !empty ($fields))
174
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
175
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
176
  break;
177
  /**/
@@ -184,7 +184,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_
184
  $paypal["s2member_log"][] = "Payment Notification Emails have been processed.";
185
  }
186
  /**/
187
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
188
  do_action ("ws_plugin__s2member_during_paypal_notify_during_subscr_payment", get_defined_vars ());
189
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
190
  }
@@ -210,7 +210,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_
210
  $paypal["s2member_log"][] = "Duplicate IPN. Already processed. This IPN will be ignored.";
211
  }
212
  /**/
213
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
214
  do_action ("ws_plugin__s2member_during_paypal_notify_after_subscr_payment", get_defined_vars ());
215
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
216
  /**/
15
  * @since 110720
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_payment_w_level"))
21
  {
40
  */
41
  public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
42
  {
43
+ extract ($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
44
  /**/
45
  if (/**/(!empty ($paypal["txn_type"]) && preg_match ("/^(subscr_payment|recurring_payment)$/i", $paypal["txn_type"]))/**/
46
  && ((!empty ($paypal["item_number"]) || ($paypal["item_number"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_item_number ($paypal))) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"]))/**/
50
  && (!empty ($paypal["payer_email"]) || ($paypal["payer_email"] = c_ws_plugin__s2member_utils_users::get_user_email_with ($paypal["subscr_id"])))/**/
51
  && (!empty ($paypal["txn_id"])) && (!empty ($paypal["mc_gross"]))/**/)
52
  {
53
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
54
  do_action ("ws_plugin__s2member_during_paypal_notify_before_subscr_payment", get_defined_vars ());
55
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
56
  /**/
58
  {
59
  $paypal["s2member_log"][] = "s2Member `txn_type` identified as " . ($identified_as = "( `subscr_payment|recurring_payment` )") . ".";
60
  $paypal["s2member_log"][] = "Sleeping for 5 seconds. Waiting for a possible ( `subscr_signup|subscr_modify|recurring_payment_profile_created` ).";
61
+ sleep (5); /* Sleep here for a moment. PayPal® sometimes sends a subscr_payment before the subscr_signup, subscr_modify. */
62
  /* It is NOT a big deal if they do. However, s2Member goes to sleep here, just to help keep the log files in a logical order. */
63
  $paypal["s2member_log"][] = "Awake. It's " . date ("D M j, Y g:i:s a T") . ". s2Member `txn_type` identified as " . $identified_as . ".";
64
  /**/
106
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
107
  {
108
  if (is_array ($fields) && !empty ($fields))
109
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
110
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
111
  break;
112
  /**/
171
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
172
  {
173
  if (is_array ($fields) && !empty ($fields))
174
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
175
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
176
  break;
177
  /**/
184
  $paypal["s2member_log"][] = "Payment Notification Emails have been processed.";
185
  }
186
  /**/
187
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
188
  do_action ("ws_plugin__s2member_during_paypal_notify_during_subscr_payment", get_defined_vars ());
189
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
190
  }
210
  $paypal["s2member_log"][] = "Duplicate IPN. Already processed. This IPN will be ignored.";
211
  }
212
  /**/
213
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
214
  do_action ("ws_plugin__s2member_during_paypal_notify_after_subscr_payment", get_defined_vars ());
215
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
216
  /**/
includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php CHANGED
@@ -181,7 +181,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level"
181
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
182
  {
183
  if (is_array ($fields) && !empty ($fields))
184
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
185
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
186
  break;
187
  /**/
@@ -249,7 +249,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level"
249
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
250
  {
251
  if (is_array ($fields) && !empty ($fields))
252
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
253
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
254
  break;
255
  /**/
@@ -279,7 +279,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level"
279
  if (($code = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $code)))
280
  {
281
  if (is_array ($fields) && !empty ($fields))
282
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
283
  if (!($code = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $code)))
284
  break;
285
  /**/
@@ -485,7 +485,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level"
485
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
486
  {
487
  if (is_array ($fields) && !empty ($fields))
488
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
489
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
490
  break;
491
  /**/
@@ -537,7 +537,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level"
537
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
538
  {
539
  if (is_array ($fields) && !empty ($fields))
540
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
541
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
542
  break;
543
  /**/
@@ -602,7 +602,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level"
602
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
603
  {
604
  if (is_array ($fields) && !empty ($fields))
605
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
606
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
607
  break;
608
  /**/
181
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
182
  {
183
  if (is_array ($fields) && !empty ($fields))
184
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
185
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
186
  break;
187
  /**/
249
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
250
  {
251
  if (is_array ($fields) && !empty ($fields))
252
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
253
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
254
  break;
255
  /**/
279
  if (($code = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $code)))
280
  {
281
  if (is_array ($fields) && !empty ($fields))
282
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
283
  if (!($code = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $code)))
284
  break;
285
  /**/
485
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
486
  {
487
  if (is_array ($fields) && !empty ($fields))
488
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
489
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
490
  break;
491
  /**/
537
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
538
  {
539
  if (is_array ($fields) && !empty ($fields))
540
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
541
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
542
  break;
543
  /**/
602
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
603
  {
604
  if (is_array ($fields) && !empty ($fields))
605
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
606
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
607
  break;
608
  /**/
includes/classes/paypal-notify-in-wa-ccaps-wo-level.inc.php CHANGED
@@ -118,7 +118,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_wa_ccaps_wo_level"))
118
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
119
  {
120
  if (is_array ($fields) && !empty ($fields))
121
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
122
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
123
  break;
124
  /**/
@@ -150,7 +150,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_wa_ccaps_wo_level"))
150
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
151
  {
152
  if (is_array ($fields) && !empty ($fields))
153
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
154
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
155
  break;
156
  /**/
@@ -215,7 +215,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_wa_ccaps_wo_level"))
215
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
216
  {
217
  if (is_array ($fields) && !empty ($fields))
218
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
219
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
220
  break;
221
  /**/
@@ -245,7 +245,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_wa_ccaps_wo_level"))
245
  if (($code = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $code)))
246
  {
247
  if (is_array ($fields) && !empty ($fields))
248
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
249
  if (!($code = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $code)))
250
  break;
251
  /**/
118
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
119
  {
120
  if (is_array ($fields) && !empty ($fields))
121
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
122
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
123
  break;
124
  /**/
150
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
151
  {
152
  if (is_array ($fields) && !empty ($fields))
153
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
154
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
155
  break;
156
  /**/
215
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
216
  {
217
  if (is_array ($fields) && !empty ($fields))
218
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
219
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
220
  break;
221
  /**/
245
  if (($code = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $code)))
246
  {
247
  if (is_array ($fields) && !empty ($fields))
248
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
249
  if (!($code = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $code)))
250
  break;
251
  /**/
includes/classes/paypal-notify-in.inc.php CHANGED
@@ -190,10 +190,8 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in"))
190
  do_action ("ws_plugin__s2member_during_paypal_notify", get_defined_vars ());
191
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
192
  /**/
193
- @ini_set ("zlib.output_compression", 0); /* Turn off. */
194
- /**/
195
  status_header (200); /* Send a 200 OK status header. */
196
- header ("Content-Type: text/plain; charset=utf-8"); /* With text/plain. */
197
  eval ('while (@ob_end_clean ());'); /* End/clean all output buffers that may or may not exist. */
198
  /**/
199
  exit (((!empty ($paypal["s2member_paypal_proxy_return_url"])) ? $paypal["s2member_paypal_proxy_return_url"] : ""));
190
  do_action ("ws_plugin__s2member_during_paypal_notify", get_defined_vars ());
191
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
192
  /**/
 
 
193
  status_header (200); /* Send a 200 OK status header. */
194
+ header ("Content-Type: text/plain; charset=utf-8"); /* Content-Type text/plain with UTF-8. */
195
  eval ('while (@ob_end_clean ());'); /* End/clean all output buffers that may or may not exist. */
196
  /**/
197
  exit (((!empty ($paypal["s2member_paypal_proxy_return_url"])) ? $paypal["s2member_paypal_proxy_return_url"] : ""));
includes/classes/paypal-return-in-subscr-modify-w-level.inc.php CHANGED
@@ -149,7 +149,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_modify_w_level
149
  if (($code = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $code)))
150
  {
151
  if (is_array ($fields) && !empty ($fields))
152
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
153
  if (!($code = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $code)))
154
  break;
155
  /**/
149
  if (($code = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $code)))
150
  {
151
  if (is_array ($fields) && !empty ($fields))
152
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
153
  if (!($code = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $code)))
154
  break;
155
  /**/
includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 110720
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"))
21
  {
@@ -40,14 +40,14 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
40
  */
41
  public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
42
  {
43
- extract($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
44
  /**/
45
  if (/**/(!empty ($paypal["txn_type"]) && preg_match ("/^(web_accept|subscr_signup|subscr_payment)$/i", $paypal["txn_type"]))/**/
46
  && (!empty ($paypal["item_number"]) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"]))/**/
47
  && (!empty ($paypal["subscr_id"]) || (!empty ($paypal["txn_id"]) && ($paypal["subscr_id"] = $paypal["txn_id"])))/**/
48
  && (empty ($paypal["payment_status"]) || empty ($payment_status_issues) || !preg_match ($payment_status_issues, $paypal["payment_status"]))/**/)
49
  {
50
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
51
  do_action ("ws_plugin__s2member_during_paypal_return_before_subscr_signup", get_defined_vars ());
52
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
53
  /**/
@@ -106,7 +106,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
106
  */
107
  if (preg_match ("/(referenc|associat|updat|upgrad)/i", $paypal["option_name1"]) && $paypal["option_selection1"])
108
  {
109
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
110
  do_action ("ws_plugin__s2member_during_paypal_return_before_subscr_signup_w_update_vars", get_defined_vars ());
111
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
112
  /**/
@@ -125,7 +125,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
125
  /**/
126
  if (is_multisite () && !is_user_member_of_blog ($user_id)) /* Must have a Role on this Blog. */
127
  {
128
- add_existing_user_to_blog(array ("user_id" => $user_id, "role" => "s2member_level" . $paypal["level"]));
129
  $user = new WP_User ($user_id);
130
  }
131
  /**/
@@ -195,7 +195,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
195
  if (($code = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $code)))
196
  {
197
  if (is_array ($fields) && !empty ($fields))
198
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
199
  if (!($code = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $code)))
200
  break;
201
  /**/
@@ -208,7 +208,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
208
  }
209
  }
210
  /**/
211
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
212
  do_action ("ws_plugin__s2member_during_paypal_return_during_subscr_signup_w_update_vars", get_defined_vars ());
213
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
214
  /**/
@@ -216,7 +216,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
216
  {
217
  $paypal["s2member_log"][] = "Redirecting Customer to a custom URL after modification: " . $redirection_url_after_modification;
218
  /**/
219
- wp_redirect($redirection_url_after_modification);
220
  }
221
  else /* Else, use standard/default handling in this scenario. Have the Customer log in again. */
222
  {
@@ -249,7 +249,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
249
  _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
250
  }
251
  /**/
252
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
253
  do_action ("ws_plugin__s2member_during_paypal_return_after_subscr_signup_w_update_vars", get_defined_vars ());
254
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
255
  }
@@ -258,7 +258,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
258
  */
259
  else /* Else this is a normal Subscription signup, we are not updating an existing Subscription. */
260
  {
261
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
262
  do_action ("ws_plugin__s2member_during_paypal_return_before_subscr_signup_wo_update_vars", get_defined_vars ());
263
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
264
  /**/
@@ -295,7 +295,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
295
  }
296
  }
297
  /**/
298
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
299
  do_action ("ws_plugin__s2member_during_paypal_return_during_subscr_signup_wo_update_vars", get_defined_vars ());
300
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
301
  /**/
@@ -305,13 +305,13 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
305
  {
306
  $paypal["s2member_log"][] = "Redirecting Customer to a custom URL after signup: " . $redirection_url_after_mms_farm_signup;
307
  /**/
308
- wp_redirect($redirection_url_after_mms_farm_signup);
309
  }
310
  else if ($custom_success_redirection) /* Using a custom success redirection URL? */
311
  {
312
  $paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection;
313
  /**/
314
- wp_redirect($custom_success_redirection);
315
  }
316
  else /* Else use the default return URL in this scenario, which is the Signup Page. */
317
  {
@@ -328,13 +328,13 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
328
  {
329
  $paypal["s2member_log"][] = "Redirecting Customer to a custom URL after signup: " . $redirection_url_after_signup;
330
  /**/
331
- wp_redirect($redirection_url_after_signup);
332
  }
333
  else if ($custom_success_redirection) /* Using a custom success redirection URL? */
334
  {
335
  $paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection;
336
  /**/
337
- wp_redirect($custom_success_redirection);
338
  }
339
  else /* Else use the default return URL in this scenario, which is the Registration Page. */
340
  {
@@ -346,7 +346,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
346
  }
347
  }
348
  /**/
349
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
350
  do_action ("ws_plugin__s2member_during_paypal_return_after_subscr_signup_wo_update_vars", get_defined_vars ());
351
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
352
  }
@@ -362,7 +362,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
362
  _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
363
  }
364
  /**/
365
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
366
  do_action ("ws_plugin__s2member_during_paypal_return_after_subscr_signup", get_defined_vars ());
367
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
368
  /**/
15
  * @since 110720
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"))
21
  {
40
  */
41
  public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
42
  {
43
+ extract ($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
44
  /**/
45
  if (/**/(!empty ($paypal["txn_type"]) && preg_match ("/^(web_accept|subscr_signup|subscr_payment)$/i", $paypal["txn_type"]))/**/
46
  && (!empty ($paypal["item_number"]) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"]))/**/
47
  && (!empty ($paypal["subscr_id"]) || (!empty ($paypal["txn_id"]) && ($paypal["subscr_id"] = $paypal["txn_id"])))/**/
48
  && (empty ($paypal["payment_status"]) || empty ($payment_status_issues) || !preg_match ($payment_status_issues, $paypal["payment_status"]))/**/)
49
  {
50
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
51
  do_action ("ws_plugin__s2member_during_paypal_return_before_subscr_signup", get_defined_vars ());
52
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
53
  /**/
106
  */
107
  if (preg_match ("/(referenc|associat|updat|upgrad)/i", $paypal["option_name1"]) && $paypal["option_selection1"])
108
  {
109
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
110
  do_action ("ws_plugin__s2member_during_paypal_return_before_subscr_signup_w_update_vars", get_defined_vars ());
111
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
112
  /**/
125
  /**/
126
  if (is_multisite () && !is_user_member_of_blog ($user_id)) /* Must have a Role on this Blog. */
127
  {
128
+ add_existing_user_to_blog (array ("user_id" => $user_id, "role" => "s2member_level" . $paypal["level"]));
129
  $user = new WP_User ($user_id);
130
  }
131
  /**/
195
  if (($code = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $code)))
196
  {
197
  if (is_array ($fields) && !empty ($fields))
198
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
199
  if (!($code = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $code)))
200
  break;
201
  /**/
208
  }
209
  }
210
  /**/
211
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
212
  do_action ("ws_plugin__s2member_during_paypal_return_during_subscr_signup_w_update_vars", get_defined_vars ());
213
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
214
  /**/
216
  {
217
  $paypal["s2member_log"][] = "Redirecting Customer to a custom URL after modification: " . $redirection_url_after_modification;
218
  /**/
219
+ wp_redirect ($redirection_url_after_modification);
220
  }
221
  else /* Else, use standard/default handling in this scenario. Have the Customer log in again. */
222
  {
249
  _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
250
  }
251
  /**/
252
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
253
  do_action ("ws_plugin__s2member_during_paypal_return_after_subscr_signup_w_update_vars", get_defined_vars ());
254
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
255
  }
258
  */
259
  else /* Else this is a normal Subscription signup, we are not updating an existing Subscription. */
260
  {
261
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
262
  do_action ("ws_plugin__s2member_during_paypal_return_before_subscr_signup_wo_update_vars", get_defined_vars ());
263
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
264
  /**/
295
  }
296
  }
297
  /**/
298
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
299
  do_action ("ws_plugin__s2member_during_paypal_return_during_subscr_signup_wo_update_vars", get_defined_vars ());
300
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
301
  /**/
305
  {
306
  $paypal["s2member_log"][] = "Redirecting Customer to a custom URL after signup: " . $redirection_url_after_mms_farm_signup;
307
  /**/
308
+ wp_redirect ($redirection_url_after_mms_farm_signup);
309
  }
310
  else if ($custom_success_redirection) /* Using a custom success redirection URL? */
311
  {
312
  $paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection;
313
  /**/
314
+ wp_redirect ($custom_success_redirection);
315
  }
316
  else /* Else use the default return URL in this scenario, which is the Signup Page. */
317
  {
328
  {
329
  $paypal["s2member_log"][] = "Redirecting Customer to a custom URL after signup: " . $redirection_url_after_signup;
330
  /**/
331
+ wp_redirect ($redirection_url_after_signup);
332
  }
333
  else if ($custom_success_redirection) /* Using a custom success redirection URL? */
334
  {
335
  $paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection;
336
  /**/
337
+ wp_redirect ($custom_success_redirection);
338
  }
339
  else /* Else use the default return URL in this scenario, which is the Registration Page. */
340
  {
346
  }
347
  }
348
  /**/
349
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
350
  do_action ("ws_plugin__s2member_during_paypal_return_after_subscr_signup_wo_update_vars", get_defined_vars ());
351
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
352
  }
362
  _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
363
  }
364
  /**/
365
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
366
  do_action ("ws_plugin__s2member_during_paypal_return_after_subscr_signup", get_defined_vars ());
367
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
368
  /**/
includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 110720
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_wa_ccaps_wo_level"))
21
  {
@@ -40,14 +40,14 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_wa_ccaps_wo_level"))
40
  */
41
  public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
42
  {
43
- extract ($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
44
  /**/
45
  if (/**/(!empty ($paypal["txn_type"]) && preg_match ("/^web_accept$/i", $paypal["txn_type"]))/**/
46
  && (!empty ($paypal["item_number"]) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_wo_level_regex"], $paypal["item_number"]))/**/
47
  && (empty ($paypal["payment_status"]) || empty ($payment_status_issues) || !preg_match ($payment_status_issues, $paypal["payment_status"]))/**/
48
  && (!empty ($paypal["txn_id"]) && ($paypal["subscr_id"] = $paypal["txn_id"])) && (!empty ($paypal["payer_email"]))/**/)
49
  {
50
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
51
  do_action ("ws_plugin__s2member_during_paypal_return_before_new_ccaps", get_defined_vars ());
52
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
53
  /**/
@@ -75,7 +75,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_wa_ccaps_wo_level"))
75
  /**/
76
  if (is_multisite () && !is_user_member_of_blog ($user_id)) /* Must have a Role on this Blog. */
77
  {
78
- add_existing_user_to_blog (array ("user_id" => $user_id, "role" => get_option ("default_role")));
79
  $user = new WP_User ($user_id);
80
  }
81
  /**/
@@ -115,7 +115,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_wa_ccaps_wo_level"))
115
  if (($code = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $code)))
116
  {
117
  if (is_array ($fields) && !empty ($fields))
118
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
119
  if (!($code = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $code)))
120
  break;
121
  /**/
@@ -128,7 +128,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_wa_ccaps_wo_level"))
128
  }
129
  }
130
  /**/
131
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
132
  do_action ("ws_plugin__s2member_during_paypal_return_during_new_ccaps", get_defined_vars ());
133
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
134
  /**/
@@ -136,7 +136,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_wa_ccaps_wo_level"))
136
  {
137
  $paypal["s2member_log"][] = "Redirecting Customer to a custom URL after Capabilities: " . $redirection_url_after_capabilities;
138
  /**/
139
- wp_redirect ($redirection_url_after_capabilities);
140
  }
141
  else /* Else, use standard/default handling in this scenario. Have the Customer log in again. */
142
  {
@@ -191,7 +191,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_wa_ccaps_wo_level"))
191
  _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
192
  }
193
  /**/
194
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
195
  do_action ("ws_plugin__s2member_during_paypal_return_after_new_ccaps", get_defined_vars ());
196
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
197
  /**/
15
  * @since 110720
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_wa_ccaps_wo_level"))
21
  {
40
  */
41
  public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
42
  {
43
+ extract($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
44
  /**/
45
  if (/**/(!empty ($paypal["txn_type"]) && preg_match ("/^web_accept$/i", $paypal["txn_type"]))/**/
46
  && (!empty ($paypal["item_number"]) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_wo_level_regex"], $paypal["item_number"]))/**/
47
  && (empty ($paypal["payment_status"]) || empty ($payment_status_issues) || !preg_match ($payment_status_issues, $paypal["payment_status"]))/**/
48
  && (!empty ($paypal["txn_id"]) && ($paypal["subscr_id"] = $paypal["txn_id"])) && (!empty ($paypal["payer_email"]))/**/)
49
  {
50
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
51
  do_action ("ws_plugin__s2member_during_paypal_return_before_new_ccaps", get_defined_vars ());
52
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
53
  /**/
75
  /**/
76
  if (is_multisite () && !is_user_member_of_blog ($user_id)) /* Must have a Role on this Blog. */
77
  {
78
+ add_existing_user_to_blog(array ("user_id" => $user_id, "role" => get_option ("default_role")));
79
  $user = new WP_User ($user_id);
80
  }
81
  /**/
115
  if (($code = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $code)))
116
  {
117
  if (is_array ($fields) && !empty ($fields))
118
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
119
  if (!($code = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $code)))
120
  break;
121
  /**/
128
  }
129
  }
130
  /**/
131
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
132
  do_action ("ws_plugin__s2member_during_paypal_return_during_new_ccaps", get_defined_vars ());
133
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
134
  /**/
136
  {
137
  $paypal["s2member_log"][] = "Redirecting Customer to a custom URL after Capabilities: " . $redirection_url_after_capabilities;
138
  /**/
139
+ wp_redirect($redirection_url_after_capabilities);
140
  }
141
  else /* Else, use standard/default handling in this scenario. Have the Customer log in again. */
142
  {
191
  _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
192
  }
193
  /**/
194
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
195
  do_action ("ws_plugin__s2member_during_paypal_return_after_new_ccaps", get_defined_vars ());
196
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
197
  /**/
includes/classes/profile-mods-4bp-in.inc.php CHANGED
@@ -41,11 +41,11 @@ if (!class_exists ("c_ws_plugin__s2member_profile_mods_4bp_in"))
41
  {
42
  global $current_user; /* We'll need to update this global object. */
43
  /**/
44
- $user = &$current_user; /* Shorter reference to the $current_user object. */
45
  /**/
46
  do_action ("ws_plugin__s2member_before_handle_profile_modifications_4bp", get_defined_vars ());
47
  /**/
48
- if (!empty ($_POST["ws_plugin__s2member_profile_4bp_save"]) && is_user_logged_in () && is_object ($user) && ($user_id = $user->ID))
49
  {
50
  if (($nonce = $_POST["ws_plugin__s2member_profile_4bp_save"]) && wp_verify_nonce ($nonce, "ws-plugin--s2member-profile-4bp-save"))
51
  {
@@ -63,25 +63,25 @@ if (!class_exists ("c_ws_plugin__s2member_profile_mods_4bp_in"))
63
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
64
  $field_id_class = preg_replace ("/_/", "-", $field_var);
65
  /**/
66
- if (!in_array ($field["id"], $fields_applicable) || preg_match ("/^no/", $field["editable"]))
67
  {
68
- if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || strlen ($_existing_fields[$field_var])))
69
  $fields[$field_var] = $_existing_fields[$field_var];
70
- else /* Else unset. */
71
  unset ($fields[$field_var]);
72
  }
73
- else if ($field["required"] === "yes" && (!isset ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) || (is_array ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && empty ($_p["ws_plugin__s2member_profile_4bp_" . $field_var])) || !strlen ($_p["ws_plugin__s2member_profile_4bp_" . $field_var])))
74
  {
75
- if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || strlen ($_existing_fields[$field_var])))
76
  $fields[$field_var] = $_existing_fields[$field_var];
77
- else /* Else unset. */
78
  unset ($fields[$field_var]);
79
  }
80
  else if (isset ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]))
81
  {
82
- if ((is_array ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && !empty ($_p["ws_plugin__s2member_profile_4bp_" . $field_var])) || strlen ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]))
83
  $fields[$field_var] = $_p["ws_plugin__s2member_profile_4bp_" . $field_var];
84
- else /* Else unset. */
85
  unset ($fields[$field_var]);
86
  }
87
  else /* Else ``unset()``. */
41
  {
42
  global $current_user; /* We'll need to update this global object. */
43
  /**/
44
+ $user = &$current_user; /* Shorter reference to the ``$current_user`` object. */
45
  /**/
46
  do_action ("ws_plugin__s2member_before_handle_profile_modifications_4bp", get_defined_vars ());
47
  /**/
48
+ if (!empty ($_POST["ws_plugin__s2member_profile_4bp_save"]) && is_user_logged_in () && is_object ($user) && !empty ($user->ID) && ($user_id = $user->ID))
49
  {
50
  if (($nonce = $_POST["ws_plugin__s2member_profile_4bp_save"]) && wp_verify_nonce ($nonce, "ws-plugin--s2member-profile-4bp-save"))
51
  {
63
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
64
  $field_id_class = preg_replace ("/_/", "-", $field_var);
65
  /**/
66
+ if (!in_array ($field["id"], $fields_applicable) || strpos ($field["editable"], "no") === 0)
67
  {
68
+ if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || (is_string ($_existing_fields[$field_var]) && strlen ($_existing_fields[$field_var]))))
69
  $fields[$field_var] = $_existing_fields[$field_var];
70
+ else /* Else ``unset()``. */
71
  unset ($fields[$field_var]);
72
  }
73
+ else if ($field["required"] === "yes" && (!isset ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) || (!is_array ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && !is_string ($_p["ws_plugin__s2member_profile_4bp_" . $field_var])) || (is_array ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && empty ($_p["ws_plugin__s2member_profile_4bp_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && !strlen ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]))))
74
  {
75
+ if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || (is_string ($_existing_fields[$field_var]) && strlen ($_existing_fields[$field_var]))))
76
  $fields[$field_var] = $_existing_fields[$field_var];
77
+ else /* Else ``unset()``. */
78
  unset ($fields[$field_var]);
79
  }
80
  else if (isset ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]))
81
  {
82
+ if ((is_array ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && !empty ($_p["ws_plugin__s2member_profile_4bp_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_4bp_" . $field_var]) && strlen ($_p["ws_plugin__s2member_profile_4bp_" . $field_var])))
83
  $fields[$field_var] = $_p["ws_plugin__s2member_profile_4bp_" . $field_var];
84
+ else /* Else ``unset()``. */
85
  unset ($fields[$field_var]);
86
  }
87
  else /* Else ``unset()``. */
includes/classes/profile-mods-in.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_profile_mods_in"))
21
  {
@@ -46,7 +46,7 @@ if (!class_exists ("c_ws_plugin__s2member_profile_mods_in"))
46
  /**/
47
  do_action ("ws_plugin__s2member_before_handle_profile_modifications", get_defined_vars ());
48
  /**/
49
- if (!empty ($_POST["ws_plugin__s2member_profile_save"]) && is_user_logged_in () && is_object ($user) && ($user_id = $user->ID))
50
  {
51
  if (($nonce = $_POST["ws_plugin__s2member_profile_save"]) && wp_verify_nonce ($nonce, "ws-plugin--s2member-profile-save"))
52
  {
@@ -74,7 +74,7 @@ if (!class_exists ("c_ws_plugin__s2member_profile_mods_in"))
74
  if (!empty ($_p["ws_plugin__s2member_profile_last_name"]))
75
  $userdata["last_name"] = $_p["ws_plugin__s2member_profile_last_name"];
76
  /**/
77
- wp_update_user ($userdata); /* OK. Now send this array for an update. */
78
  /**/
79
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"])
80
  if ($fields_applicable = c_ws_plugin__s2member_custom_reg_fields::custom_fields_configured_at_level ("auto-detection", "profile"))
@@ -86,29 +86,29 @@ if (!class_exists ("c_ws_plugin__s2member_profile_mods_in"))
86
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
87
  $field_id_class = preg_replace ("/_/", "-", $field_var);
88
  /**/
89
- if (!in_array ($field["id"], $fields_applicable) || preg_match ("/^no/", $field["editable"]))
90
  {
91
- if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || strlen ($_existing_fields[$field_var])))
92
  $fields[$field_var] = $_existing_fields[$field_var];
93
- else /* Else unset. */
94
- unset ($fields[$field_var]);
95
  }
96
- else if ($field["required"] === "yes" && (!isset ($_p["ws_plugin__s2member_profile_" . $field_var]) || (is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && empty ($_p["ws_plugin__s2member_profile_" . $field_var])) || !strlen ($_p["ws_plugin__s2member_profile_" . $field_var])))
97
  {
98
- if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || strlen ($_existing_fields[$field_var])))
99
  $fields[$field_var] = $_existing_fields[$field_var];
100
- else /* Else unset. */
101
- unset ($fields[$field_var]);
102
  }
103
  else if (isset ($_p["ws_plugin__s2member_profile_" . $field_var]))
104
  {
105
- if ((is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && !empty ($_p["ws_plugin__s2member_profile_" . $field_var])) || strlen ($_p["ws_plugin__s2member_profile_" . $field_var]))
106
  $fields[$field_var] = $_p["ws_plugin__s2member_profile_" . $field_var];
107
- else /* Else unset. */
108
- unset ($fields[$field_var]);
109
  }
110
  else /* Else ``unset()``. */
111
- unset ($fields[$field_var]);
112
  }
113
  /**/
114
  if (!empty ($fields))
@@ -117,7 +117,7 @@ if (!class_exists ("c_ws_plugin__s2member_profile_mods_in"))
117
  delete_user_option ($user_id, "s2member_custom_fields");
118
  }
119
  /**/
120
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
121
  do_action ("ws_plugin__s2member_during_handle_profile_modifications", get_defined_vars ());
122
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
123
  /**/
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_profile_mods_in"))
21
  {
46
  /**/
47
  do_action ("ws_plugin__s2member_before_handle_profile_modifications", get_defined_vars ());
48
  /**/
49
+ if (!empty ($_POST["ws_plugin__s2member_profile_save"]) && is_user_logged_in () && is_object ($user) && !empty ($user->ID) && ($user_id = $user->ID))
50
  {
51
  if (($nonce = $_POST["ws_plugin__s2member_profile_save"]) && wp_verify_nonce ($nonce, "ws-plugin--s2member-profile-save"))
52
  {
74
  if (!empty ($_p["ws_plugin__s2member_profile_last_name"]))
75
  $userdata["last_name"] = $_p["ws_plugin__s2member_profile_last_name"];
76
  /**/
77
+ wp_update_user($userdata); /* OK. Now send this array for an update. */
78
  /**/
79
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"])
80
  if ($fields_applicable = c_ws_plugin__s2member_custom_reg_fields::custom_fields_configured_at_level ("auto-detection", "profile"))
86
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
87
  $field_id_class = preg_replace ("/_/", "-", $field_var);
88
  /**/
89
+ if (!in_array ($field["id"], $fields_applicable) || strpos ($field["editable"], "no") === 0)
90
  {
91
+ if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || (is_string ($_existing_fields[$field_var]) && strlen ($_existing_fields[$field_var]))))
92
  $fields[$field_var] = $_existing_fields[$field_var];
93
+ else /* Else ``unset()``. */
94
+ unset($fields[$field_var]);
95
  }
96
+ else if ($field["required"] === "yes" && (!isset ($_p["ws_plugin__s2member_profile_" . $field_var]) || (!is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && !is_string ($_p["ws_plugin__s2member_profile_" . $field_var])) || (is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && empty ($_p["ws_plugin__s2member_profile_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_" . $field_var]) && !strlen ($_p["ws_plugin__s2member_profile_" . $field_var]))))
97
  {
98
+ if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || (is_string ($_existing_fields[$field_var]) && strlen ($_existing_fields[$field_var]))))
99
  $fields[$field_var] = $_existing_fields[$field_var];
100
+ else /* Else ``unset()``. */
101
+ unset($fields[$field_var]);
102
  }
103
  else if (isset ($_p["ws_plugin__s2member_profile_" . $field_var]))
104
  {
105
+ if ((is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && !empty ($_p["ws_plugin__s2member_profile_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_" . $field_var]) && strlen ($_p["ws_plugin__s2member_profile_" . $field_var])))
106
  $fields[$field_var] = $_p["ws_plugin__s2member_profile_" . $field_var];
107
+ else /* Else ``unset()``. */
108
+ unset($fields[$field_var]);
109
  }
110
  else /* Else ``unset()``. */
111
+ unset($fields[$field_var]);
112
  }
113
  /**/
114
  if (!empty ($fields))
117
  delete_user_option ($user_id, "s2member_custom_fields");
118
  }
119
  /**/
120
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
121
  do_action ("ws_plugin__s2member_during_handle_profile_modifications", get_defined_vars ());
122
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
123
  /**/
includes/classes/register-access.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_register_access"))
21
  {
@@ -42,23 +42,21 @@ if (!class_exists ("c_ws_plugin__s2member_register_access"))
42
  */
43
  public static function register_link_gen ($subscr_gateway = FALSE, $subscr_id = FALSE, $custom = FALSE, $item_number = FALSE, $shrink = TRUE)
44
  {
45
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
46
  do_action ("ws_plugin__s2member_before_register_link_gen", get_defined_vars ());
47
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
48
  /**/
49
- if ($subscr_gateway && $subscr_id && $custom && $item_number) /* Must have all of these. */
50
  {
51
  $register = c_ws_plugin__s2member_utils_encryption::encrypt ("subscr_gateway_subscr_id_custom_item_number_time:.:|:.:" . $subscr_gateway . ":.:|:.:" . $subscr_id . ":.:|:.:" . $custom . ":.:|:.:" . $item_number . ":.:|:.:" . strtotime ("now"));
52
- $register_link = site_url ("/?s2member_register=" . urlencode ($register));
53
  /**/
54
- if ($shrink && ($shorter_url = c_ws_plugin__s2member_utils_urls::shorten ($register_link)))
55
- return apply_filters ("ws_plugin__s2member_register_link_gen", $shorter_url . "#" . $_SERVER["HTTP_HOST"], get_defined_vars ());
56
  /**/
57
- else /* Else use the long one; shortening may fail when/if an API server is down periodically. */
58
- return apply_filters ("ws_plugin__s2member_register_link_gen", $register_link, get_defined_vars ());
59
  }
60
  /**/
61
- return false;
62
  }
63
  /**
64
  * Generates Registration Access Links via AJAX.
@@ -74,11 +72,18 @@ if (!class_exists ("c_ws_plugin__s2member_register_access"))
74
  {
75
  do_action ("ws_plugin__s2member_before_reg_access_link_via_ajax", get_defined_vars ());
76
  /**/
77
- if (current_user_can ("create_users")) /* Check priveledges as well. */
78
- if (!empty ($_POST["ws_plugin__s2member_reg_access_link_via_ajax"]) && ($nonce = $_POST["ws_plugin__s2member_reg_access_link_via_ajax"]) && wp_verify_nonce ($nonce, "ws-plugin--s2member-reg-access-link-via-ajax") && ($_p = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_POST))) && isset ($_p["s2member_reg_access_link_subscr_gateway"], $_p["s2member_reg_access_link_subscr_id"], $_p["s2member_reg_access_link_custom"], $_p["s2member_reg_access_link_item_number"]))
79
- echo apply_filters ("ws_plugin__s2member_reg_access_link_via_ajax", c_ws_plugin__s2member_register_access::register_link_gen ($_p["s2member_reg_access_link_subscr_gateway"], $_p["s2member_reg_access_link_subscr_id"], $_p["s2member_reg_access_link_custom"], $_p["s2member_reg_access_link_item_number"]), get_defined_vars ());
 
 
 
 
 
 
 
80
  /**/
81
- exit (); /* Clean exit. */
82
  }
83
  /**
84
  * Checks registration cookies.
@@ -95,11 +100,10 @@ if (!class_exists ("c_ws_plugin__s2member_register_access"))
95
  do_action ("ws_plugin__s2member_before_reg_cookies_ok", get_defined_vars ());
96
  /**/
97
  if (isset ($_COOKIE["s2member_subscr_gateway"], $_COOKIE["s2member_subscr_id"], $_COOKIE["s2member_custom"], $_COOKIE["s2member_item_number"]))
98
- if (is_string ($_COOKIE["s2member_subscr_gateway"]) && is_string ($_COOKIE["s2member_subscr_id"]) && is_string ($_COOKIE["s2member_custom"]) && is_string ($_COOKIE["s2member_item_number"]))
99
- if (($subscr_gateway = c_ws_plugin__s2member_utils_encryption::decrypt ($_COOKIE["s2member_subscr_gateway"])) && ($subscr_id = c_ws_plugin__s2member_utils_encryption::decrypt ($_COOKIE["s2member_subscr_id"])) && preg_match ("/^" . preg_quote (preg_replace ("/\:([0-9]+)$/", "", $_SERVER["HTTP_HOST"]), "/") . "/i", ($custom = c_ws_plugin__s2member_utils_encryption::decrypt ($_COOKIE["s2member_custom"]))) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], ($item_number = c_ws_plugin__s2member_utils_encryption::decrypt ($_COOKIE["s2member_item_number"]))) && !$wpdb->get_var ("SELECT `user_id` FROM `" . $wpdb->usermeta . "` WHERE `meta_key` = '" . $wpdb->prefix . "s2member_subscr_id' AND `meta_value` = '" . $wpdb->escape ($subscr_id) . "' LIMIT 1"))
100
- $reg_cookies = array ("subscr_gateway" => $subscr_gateway, "subscr_id" => $subscr_id, "custom" => $custom, "item_number" => $item_number);
101
  /**/
102
- return apply_filters ("ws_plugin__s2member_reg_cookies_ok", ((isset ($reg_cookies) && is_array ($reg_cookies)) ? $reg_cookies : false), get_defined_vars ());
103
  }
104
  }
105
  }
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_register_access"))
21
  {
42
  */
43
  public static function register_link_gen ($subscr_gateway = FALSE, $subscr_id = FALSE, $custom = FALSE, $item_number = FALSE, $shrink = TRUE)
44
  {
45
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
46
  do_action ("ws_plugin__s2member_before_register_link_gen", get_defined_vars ());
47
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
48
  /**/
49
+ if ($subscr_gateway && is_string ($subscr_gateway) && $subscr_id && is_string ($subscr_id) && $custom && is_string ($custom) && $item_number && (is_string ($item_number) || is_numeric ($item_number)))
50
  {
51
  $register = c_ws_plugin__s2member_utils_encryption::encrypt ("subscr_gateway_subscr_id_custom_item_number_time:.:|:.:" . $subscr_gateway . ":.:|:.:" . $subscr_id . ":.:|:.:" . $custom . ":.:|:.:" . $item_number . ":.:|:.:" . strtotime ("now"));
 
52
  /**/
53
+ $register_link = site_url ("/?s2member_register=" . urlencode ($register)); /* Generate long URL/link. */
 
54
  /**/
55
+ if ($shrink && ($shorter_url = c_ws_plugin__s2member_utils_urls::shorten ($register_link)))
56
+ $register_link = $shorter_url . "#" . $_SERVER["HTTP_HOST"];
57
  }
58
  /**/
59
+ return apply_filters ("ws_plugin__s2member_register_link_gen", ((!empty ($register_link)) ? $register_link : false), get_defined_vars ());
60
  }
61
  /**
62
  * Generates Registration Access Links via AJAX.
72
  {
73
  do_action ("ws_plugin__s2member_before_reg_access_link_via_ajax", get_defined_vars ());
74
  /**/
75
+ status_header(200); /* Send a 200 OK status header. */
76
+ header("Content-Type: text/plain; charset=utf-8"); /* Content-Type with UTF-8. */
77
+ eval('while (@ob_end_clean ());'); /* End/clean all output buffers that may exist. */
78
+ /**/
79
+ if (current_user_can ("create_users")) /* Check priveledges as well. Ability to create Users? */
80
+ /**/
81
+ if (!empty ($_POST["ws_plugin__s2member_reg_access_link_via_ajax"]) && is_string ($nonce = $_POST["ws_plugin__s2member_reg_access_link_via_ajax"]) && wp_verify_nonce ($nonce, "ws-plugin--s2member-reg-access-link-via-ajax"))
82
+ /**/
83
+ if (($_p = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_POST))) && isset ($_p["s2member_reg_access_link_subscr_gateway"], $_p["s2member_reg_access_link_subscr_id"], $_p["s2member_reg_access_link_custom"], $_p["s2member_reg_access_link_item_number"]))
84
+ $register_link = c_ws_plugin__s2member_register_access::register_link_gen ((string)$_p["s2member_reg_access_link_subscr_gateway"], (string)$_p["s2member_reg_access_link_subscr_id"], (string)$_p["s2member_reg_access_link_custom"], (string)$_p["s2member_reg_access_link_item_number"]);
85
  /**/
86
+ exit(apply_filters ("ws_plugin__s2member_reg_access_link_via_ajax", ((!empty ($register_link)) ? $register_link : ""), get_defined_vars ()));
87
  }
88
  /**
89
  * Checks registration cookies.
100
  do_action ("ws_plugin__s2member_before_reg_cookies_ok", get_defined_vars ());
101
  /**/
102
  if (isset ($_COOKIE["s2member_subscr_gateway"], $_COOKIE["s2member_subscr_id"], $_COOKIE["s2member_custom"], $_COOKIE["s2member_item_number"]))
103
+ if (($subscr_gateway = c_ws_plugin__s2member_utils_encryption::decrypt ((string)$_COOKIE["s2member_subscr_gateway"])) && ($subscr_id = c_ws_plugin__s2member_utils_encryption::decrypt ((string)$_COOKIE["s2member_subscr_id"])) && preg_match ("/^" . preg_quote (preg_replace ("/\:([0-9]+)$/", "", $_SERVER["HTTP_HOST"]), "/") . "/i", ($custom = c_ws_plugin__s2member_utils_encryption::decrypt ((string)$_COOKIE["s2member_custom"]))) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], ($item_number = c_ws_plugin__s2member_utils_encryption::decrypt ((string)$_COOKIE["s2member_item_number"]))) && !$wpdb->get_var ("SELECT `user_id` FROM `" . $wpdb->usermeta . "` WHERE `meta_key` = '" . $wpdb->prefix . "s2member_subscr_id' AND `meta_value` = '" . $wpdb->escape ($subscr_id) . "' LIMIT 1"))
104
+ $reg_cookies_ok = $reg_cookies = array ("subscr_gateway" => $subscr_gateway, "subscr_id" => $subscr_id, "custom" => $custom, "item_number" => $item_number);
 
105
  /**/
106
+ return apply_filters ("ws_plugin__s2member_reg_cookies_ok", ((isset ($reg_cookies_ok) && $reg_cookies_ok && !empty ($reg_cookies)) ? $reg_cookies : false), get_defined_vars ());
107
  }
108
  }
109
  }
includes/classes/register-in.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_register_in"))
21
  {
@@ -43,22 +43,26 @@ if (!class_exists ("c_ws_plugin__s2member_register_in"))
43
  /**/
44
  if (!empty ($_GET["s2member_register"])) /* If they're attempting to access the registration system. */
45
  {
46
- status_header (200); /* Send a 200 OK status header. This request IS being processed, one way or the other. */
47
- eval ('while (@ob_end_clean ());'); /* End/clean all output buffers that may or may not exist. */
48
  /**/
49
- if (is_array ($register = preg_split ("/\:\.\:\|\:\.\:/", c_ws_plugin__s2member_utils_encryption::decrypt (trim (stripslashes ($_GET["s2member_register"]))))))
 
 
50
  {
51
- if (count ($register) === 6 && !empty ($register[0]) && $register[0] === "subscr_gateway_subscr_id_custom_item_number_time" && !empty ($register[1]) && !empty ($register[2]) && !empty ($register[3]) && !empty ($register[4]) && !empty ($register[5]))
52
  {
53
- if ($register[5] <= strtotime ("now") && $register[5] >= strtotime ("-" . apply_filters ("ws_plugin__s2member_register_link_exp_time", "2 days", get_defined_vars ())))
54
  {
55
- $_COOKIE["s2member_subscr_gateway"] = c_ws_plugin__s2member_utils_encryption::encrypt ($register[1]);
56
- $_COOKIE["s2member_subscr_id"] = c_ws_plugin__s2member_utils_encryption::encrypt ($register[2]);
57
- $_COOKIE["s2member_custom"] = c_ws_plugin__s2member_utils_encryption::encrypt ($register[3]);
58
- $_COOKIE["s2member_item_number"] = c_ws_plugin__s2member_utils_encryption::encrypt ($register[4]);
59
  /**/
60
- if (($reg_cookies = c_ws_plugin__s2member_register_access::reg_cookies_ok ()) && extract ($reg_cookies))
61
  {
 
 
 
62
  setcookie ("s2member_subscr_gateway", $_COOKIE["s2member_subscr_gateway"], time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie ("s2member_subscr_gateway", $_COOKIE["s2member_subscr_gateway"], time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
63
  setcookie ("s2member_subscr_id", $_COOKIE["s2member_subscr_id"], time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie ("s2member_subscr_id", $_COOKIE["s2member_subscr_id"], time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
64
  setcookie ("s2member_custom", $_COOKIE["s2member_custom"], time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie ("s2member_custom", $_COOKIE["s2member_custom"], time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
@@ -78,20 +82,19 @@ if (!class_exists ("c_ws_plugin__s2member_register_in"))
78
  echo "window.location = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq ($location) . "';";
79
  echo '</script>' . "\n";
80
  }
 
81
  }
82
  else
83
- echo _x ('<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.', "s2member-front", "s2member");
84
  }
85
  else
86
- echo _x ('<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.', "s2member-front", "s2member");
87
  }
88
  else
89
- echo _x ('<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.', "s2member-front", "s2member");
90
  }
91
  else
92
- echo _x ('<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.', "s2member-front", "s2member");
93
- /**/
94
- exit (); /* Clean exit. This is always the case with ``$_GET["s2member_register"]``. */
95
  }
96
  /**/
97
  do_action ("ws_plugin__s2member_after_register", get_defined_vars ());
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_register_in"))
21
  {
43
  /**/
44
  if (!empty ($_GET["s2member_register"])) /* If they're attempting to access the registration system. */
45
  {
46
+ eval('while (@ob_end_clean ());'); /* First we end/clean any output buffers that may exist already. */
 
47
  /**/
48
+ $msg_503 = _x ('<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.', "s2member-front", "s2member");
49
+ /**/
50
+ if (is_array ($register = preg_split ("/\:\.\:\|\:\.\:/", c_ws_plugin__s2member_utils_encryption::decrypt (trim (stripslashes ((string)$_GET["s2member_register"]))))))
51
  {
52
+ if (count ($register) === 6 && $register[0] === "subscr_gateway_subscr_id_custom_item_number_time" /* Does the checksum value match up here? */)
53
  {
54
+ if (is_numeric ($register[5]) && $register[5] <= strtotime ("now") && $register[5] >= strtotime ("-" . apply_filters ("ws_plugin__s2member_register_link_exp_time", "2 days", get_defined_vars ())))
55
  {
56
+ $_COOKIE["s2member_subscr_gateway"] = /* For ``reg_cookies_ok ()``. */ c_ws_plugin__s2member_utils_encryption::encrypt ($register[1]);
57
+ $_COOKIE["s2member_subscr_id"] = /* For ``reg_cookies_ok ()``. */ c_ws_plugin__s2member_utils_encryption::encrypt ($register[2]);
58
+ $_COOKIE["s2member_custom"] = /* For ``reg_cookies_ok ()``. */ c_ws_plugin__s2member_utils_encryption::encrypt ($register[3]);
59
+ $_COOKIE["s2member_item_number"] = /* For ``reg_cookies_ok ()``. */ c_ws_plugin__s2member_utils_encryption::encrypt ($register[4]);
60
  /**/
61
+ if (($reg_cookies = c_ws_plugin__s2member_register_access::reg_cookies_ok ()) && extract ($reg_cookies) /* Needed? */)
62
  {
63
+ status_header(200); /* Send a 200 OK status header. */
64
+ header("Content-Type: text/html; charset=utf-8"); /* Content-Type with UTF-8. */
65
+ /**/
66
  setcookie ("s2member_subscr_gateway", $_COOKIE["s2member_subscr_gateway"], time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie ("s2member_subscr_gateway", $_COOKIE["s2member_subscr_gateway"], time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
67
  setcookie ("s2member_subscr_id", $_COOKIE["s2member_subscr_id"], time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie ("s2member_subscr_id", $_COOKIE["s2member_subscr_id"], time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
68
  setcookie ("s2member_custom", $_COOKIE["s2member_custom"], time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie ("s2member_custom", $_COOKIE["s2member_custom"], time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
82
  echo "window.location = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq ($location) . "';";
83
  echo '</script>' . "\n";
84
  }
85
+ exit (); /* Clean exit. The browser will now be redirected to ``$location``. */
86
  }
87
  else
88
+ status_header(503) . header ("Content-Type: text/html; charset=utf-8") . exit ($msg_503);
89
  }
90
  else
91
+ status_header(503) . header ("Content-Type: text/html; charset=utf-8") . exit ($msg_503);
92
  }
93
  else
94
+ status_header(503) . header ("Content-Type: text/html; charset=utf-8") . exit ($msg_503);
95
  }
96
  else
97
+ status_header(503) . header ("Content-Type: text/html; charset=utf-8") . exit ($msg_503);
 
 
98
  }
99
  /**/
100
  do_action ("ws_plugin__s2member_after_register", get_defined_vars ());
includes/classes/registrations.inc.php CHANGED
@@ -39,7 +39,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
39
  * @attaches-to: ``add_filter("random_password");``
40
  *
41
  * @param str $password Expects a plain text Password passed through by the Filter.
42
- * @return str Password, possibly assigned through s2Member Custom Registration Field input.
43
  */
44
  public static function generate_password ($password = FALSE)
45
  {
39
  * @attaches-to: ``add_filter("random_password");``
40
  *
41
  * @param str $password Expects a plain text Password passed through by the Filter.
42
+ * @return str Password, possibly assigned through s2Member Custom Registration/Profile Field input.
43
  */
44
  public static function generate_password ($password = FALSE)
45
  {
includes/classes/roles-caps.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 110524RC
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_roles_caps"))
21
  {
@@ -112,7 +112,7 @@ if (!class_exists ("c_ws_plugin__s2member_roles_caps"))
112
  $role->remove_cap ("access_s2member_level0");
113
  /**/
114
  for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["max_levels"]; $n++)
115
- remove_role("s2member_level" . $n);
116
  /**/
117
  foreach (array ("administrator", "editor", "author", "contributor", "bbp_moderator") as $role)
118
  {
@@ -138,14 +138,28 @@ if (!class_exists ("c_ws_plugin__s2member_roles_caps"))
138
  */
139
  public static function update_roles_via_ajax ()
140
  {
141
- if (!apply_filters ("ws_plugin__s2member_lock_roles_caps", false))
142
- {
143
- c_ws_plugin__s2member_roles_caps::config_roles ();
144
- /**/
145
- exit("1"); /* Success. */
146
- }
147
- else
148
- exit("0"); /* Locked. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  }
150
  }
151
  }
15
  * @since 110524RC
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_roles_caps"))
21
  {
112
  $role->remove_cap ("access_s2member_level0");
113
  /**/
114
  for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["max_levels"]; $n++)
115
+ remove_role ("s2member_level" . $n);
116
  /**/
117
  foreach (array ("administrator", "editor", "author", "contributor", "bbp_moderator") as $role)
118
  {
138
  */
139
  public static function update_roles_via_ajax ()
140
  {
141
+ do_action ("ws_plugin__s2member_before_update_roles_via_ajax", get_defined_vars ());
142
+ /**/
143
+ status_header (200); /* Send a 200 OK status header. */
144
+ header ("Content-Type: text/plain; charset=utf-8"); /* Content-Type with UTF-8. */
145
+ eval ('while (@ob_end_clean ());'); /* End/clean all output buffers that may exist. */
146
+ /**/
147
+ if (current_user_can ("create_users")) /* Check priveledges. Ability to create Users? */
148
+ /**/
149
+ if (!empty ($_POST["ws_plugin__s2member_update_roles_via_ajax"]))
150
+ if (($nonce = $_POST["ws_plugin__s2member_update_roles_via_ajax"]))
151
+ if (wp_verify_nonce ($nonce, "ws-plugin--s2member-update-roles-via-ajax"))
152
+ /**/
153
+ if (!apply_filters ("ws_plugin__s2member_lock_roles_caps", false))
154
+ {
155
+ c_ws_plugin__s2member_roles_caps::config_roles ();
156
+ $success = true; /* Roles updated. */
157
+ }
158
+ else /* Else flag as having been locked here. */
159
+ $locked = true;
160
+ /**/
161
+ exit (apply_filters ("ws_plugin__s2member_update_roles_via_ajax", /* Also handle ``$locked`` here. */
162
+ ((isset ($success) && $success) ? "1" : ((isset ($locked) && $locked) ? "l" : "0")), get_defined_vars ()));
163
  }
164
  }
165
  }
includes/classes/s-badge-status-in.inc.php CHANGED
@@ -43,9 +43,13 @@ if (!class_exists ("c_ws_plugin__s2member_s_badge_status_in"))
43
  /**/
44
  if (!empty ($_GET["s2member_s_badge_status"])) /* Requesting status? */
45
  {
46
- if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["s_badge_status_enabled"])
 
 
 
 
47
  {
48
- if (strlen ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"]) >= 56)
49
  {
50
  if (defined ("AUTH_KEY") && strlen (AUTH_KEY) >= 60 && stripos (AUTH_KEY, "unique phrase") === false)
51
  if (defined ("SECURE_AUTH_KEY") && strlen (SECURE_AUTH_KEY) >= 60 && stripos (SECURE_AUTH_KEY, "unique phrase") === false)
@@ -62,7 +66,7 @@ if (!class_exists ("c_ws_plugin__s2member_s_badge_status_in"))
62
  if (defined ("DB_USER") && DB_USER && defined ("DB_PASSWORD") && DB_PASSWORD && DB_USER !== DB_PASSWORD)
63
  {
64
  if (!apply_filters ("ws_plugin__s2member_disable_all_ip_restrictions", false, get_defined_vars ()))
65
- if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction"])
66
  {
67
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_failed_login_attempts"])
68
  {
43
  /**/
44
  if (!empty ($_GET["s2member_s_badge_status"])) /* Requesting status? */
45
  {
46
+ status_header (200); /* Send a 200 OK status header. */
47
+ header ("Content-Type: text/plain; charset=utf-8"); /* Content-Type with UTF-8. */
48
+ eval ('while (@ob_end_clean ());'); /* End/clean all output buffers that may exist. */
49
+ /**/
50
+ if ( /* Badge status API enabled? */$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["s_badge_status_enabled"])
51
  {
52
+ if ( /* Valid key? */strlen ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"]) >= 56)
53
  {
54
  if (defined ("AUTH_KEY") && strlen (AUTH_KEY) >= 60 && stripos (AUTH_KEY, "unique phrase") === false)
55
  if (defined ("SECURE_AUTH_KEY") && strlen (SECURE_AUTH_KEY) >= 60 && stripos (SECURE_AUTH_KEY, "unique phrase") === false)
66
  if (defined ("DB_USER") && DB_USER && defined ("DB_PASSWORD") && DB_PASSWORD && DB_USER !== DB_PASSWORD)
67
  {
68
  if (!apply_filters ("ws_plugin__s2member_disable_all_ip_restrictions", false, get_defined_vars ()))
69
+ if ( /* Enabled by site owner? */$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_ip_restriction"])
70
  {
71
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["max_failed_login_attempts"])
72
  {
includes/classes/sc-files-in.inc.php CHANGED
@@ -46,7 +46,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_files_in"))
46
  do_action ("ws_plugin__s2member_before_sc_get_file", get_defined_vars ());
47
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
48
  /**/
49
- $attr = c_ws_plugin__s2member_utils_strings::trim_quot_deep ((array)$attr);
50
  /**/
51
  $attr = shortcode_atts (array ("download" => "", "download_key" => "", "stream" => "", "inline" => "", "storage" => "", "remote" => "", "ssl" => "", "rewrite" => "", "rewrite_base" => "", "skip_confirmation" => "", "url_to_storage_source" => "", "count_against_user" => "", "check_user" => "", /* Shortcode-specifics » */ "get_streamer_json" => "", "get_streamer_array" => ""), $attr);
52
  /**/
46
  do_action ("ws_plugin__s2member_before_sc_get_file", get_defined_vars ());
47
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
48
  /**/
49
+ $attr = c_ws_plugin__s2member_utils_strings::trim_qts_deep ((array)$attr); /* Force array; trim quote entities. */
50
  /**/
51
  $attr = shortcode_atts (array ("download" => "", "download_key" => "", "stream" => "", "inline" => "", "storage" => "", "remote" => "", "ssl" => "", "rewrite" => "", "rewrite_base" => "", "skip_confirmation" => "", "url_to_storage_source" => "", "count_against_user" => "", "check_user" => "", /* Shortcode-specifics » */ "get_streamer_json" => "", "get_streamer_array" => ""), $attr);
52
  /**/
includes/classes/sc-gets-in.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_sc_gets_in"))
21
  {
@@ -44,15 +44,15 @@ if (!class_exists ("c_ws_plugin__s2member_sc_gets_in"))
44
  */
45
  public static function sc_get_details ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
46
  {
47
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
48
  do_action ("ws_plugin__s2member_before_sc_get_details", get_defined_vars ());
49
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
50
  /**/
51
- $attr = c_ws_plugin__s2member_utils_strings::trim_quot_deep ((array)$attr);
52
  /**/
53
  $attr = shortcode_atts (array ("constant" => "", "user_field" => "", "user_option" => "", "user_id" => ""), $attr);
54
  /**/
55
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
56
  do_action ("ws_plugin__s2member_before_sc_get_details_after_shortcode_atts", get_defined_vars ());
57
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
58
  /**/
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_sc_gets_in"))
21
  {
44
  */
45
  public static function sc_get_details ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
46
  {
47
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
48
  do_action ("ws_plugin__s2member_before_sc_get_details", get_defined_vars ());
49
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
50
  /**/
51
+ $attr = c_ws_plugin__s2member_utils_strings::trim_qts_deep ((array)$attr); /* Force array; trim quote entities. */
52
  /**/
53
  $attr = shortcode_atts (array ("constant" => "", "user_field" => "", "user_option" => "", "user_id" => ""), $attr);
54
  /**/
55
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
56
  do_action ("ws_plugin__s2member_before_sc_get_details_after_shortcode_atts", get_defined_vars ());
57
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
58
  /**/
includes/classes/sc-if-conds-in.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_sc_if_conds_in"))
21
  {
@@ -56,13 +56,13 @@ if (!class_exists ("c_ws_plugin__s2member_sc_if_conds_in"))
56
  */
57
  public static function sc_if_conditionals ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
58
  {
59
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
60
  do_action ("ws_plugin__s2member_before_sc_if_conditionals", get_defined_vars ());
61
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
62
  /**/
63
  $blog_farm_safe = apply_filters ("ws_plugin__s2member_sc_if_conditionals_blog_farm_safe", array ("is_user_logged_in", "is_user_not_logged_in", "user_is", "user_is_not", "user_can", "user_cannot", "current_user_is", "current_user_is_not", "current_user_can", "current_user_cannot", "is_admin", "is_blog_admin", "is_user_admin", "is_network_admin", "is_404", "is_home", "is_front_page", "is_singular", "is_single", "is_page", "is_page_template", "is_attachment", "is_feed", "is_archive", "is_search", "is_category", "is_tax", "is_tag", "has_tag", "is_author", "is_date", "is_day", "is_month", "is_time", "is_year", "is_sticky", "is_paged", "is_preview", "is_comments_popup", "in_the_loop", "comments_open", "pings_open", "has_excerpt", "has_post_thumbnail"), get_defined_vars ());
64
  /**/
65
- $attr = c_ws_plugin__s2member_utils_strings::trim_quot_deep ((array)$attr); /* Force array, and fix &quot; in attrs. */
66
  /**/
67
  foreach ($attr as $attr_key => $attr_value) /* Detects and removes logical attributes. */
68
  /* It's NOT possible to mix logic. You MUST stick to one type of logic or another. */
@@ -71,7 +71,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_if_conds_in"))
71
  { /* Stick with AND/OR. Ampersands are corrupted by the Visual Editor. */
72
  /**/
73
  $logicals[] = strtolower ($attr_value); /* Place all logicals into an array here. */
74
- unset($attr[$attr_key]); /* ^ Detect logic here. We'll use the first key #0. */
75
  /**/
76
  if (preg_match ("/^[\!\=\<\>]+$/i", $attr_value)) /* Error on these operators. */
77
  {
@@ -88,7 +88,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_if_conds_in"))
88
  /**/
89
  $conditional_logic = (is_array ($logicals) && !empty ($logicals) && preg_match ("/^(\|\||OR)$/i", $logicals[0])) ? "OR" : "AND";
90
  /**/
91
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
92
  do_action ("ws_plugin__s2member_before_sc_if_conditionals_after_conditional_logic", get_defined_vars ());
93
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
94
  /**/
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_sc_if_conds_in"))
21
  {
56
  */
57
  public static function sc_if_conditionals ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
58
  {
59
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
60
  do_action ("ws_plugin__s2member_before_sc_if_conditionals", get_defined_vars ());
61
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
62
  /**/
63
  $blog_farm_safe = apply_filters ("ws_plugin__s2member_sc_if_conditionals_blog_farm_safe", array ("is_user_logged_in", "is_user_not_logged_in", "user_is", "user_is_not", "user_can", "user_cannot", "current_user_is", "current_user_is_not", "current_user_can", "current_user_cannot", "is_admin", "is_blog_admin", "is_user_admin", "is_network_admin", "is_404", "is_home", "is_front_page", "is_singular", "is_single", "is_page", "is_page_template", "is_attachment", "is_feed", "is_archive", "is_search", "is_category", "is_tax", "is_tag", "has_tag", "is_author", "is_date", "is_day", "is_month", "is_time", "is_year", "is_sticky", "is_paged", "is_preview", "is_comments_popup", "in_the_loop", "comments_open", "pings_open", "has_excerpt", "has_post_thumbnail"), get_defined_vars ());
64
  /**/
65
+ $attr = c_ws_plugin__s2member_utils_strings::trim_qts_deep ((array)$attr); /* Force array; trim quote entities. */
66
  /**/
67
  foreach ($attr as $attr_key => $attr_value) /* Detects and removes logical attributes. */
68
  /* It's NOT possible to mix logic. You MUST stick to one type of logic or another. */
71
  { /* Stick with AND/OR. Ampersands are corrupted by the Visual Editor. */
72
  /**/
73
  $logicals[] = strtolower ($attr_value); /* Place all logicals into an array here. */
74
+ unset ($attr[$attr_key]); /* ^ Detect logic here. We'll use the first key #0. */
75
  /**/
76
  if (preg_match ("/^[\!\=\<\>]+$/i", $attr_value)) /* Error on these operators. */
77
  {
88
  /**/
89
  $conditional_logic = (is_array ($logicals) && !empty ($logicals) && preg_match ("/^(\|\||OR)$/i", $logicals[0])) ? "OR" : "AND";
90
  /**/
91
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
92
  do_action ("ws_plugin__s2member_before_sc_if_conditionals_after_conditional_logic", get_defined_vars ());
93
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
94
  /**/
includes/classes/sc-keys-in.inc.php CHANGED
@@ -46,7 +46,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_keys_in"))
46
  do_action ("ws_plugin__s2member_before_sc_get_key", get_defined_vars ());
47
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
48
  /**/
49
- $attr = c_ws_plugin__s2member_utils_strings::trim_quot_deep ((array)$attr);
50
  /**/
51
  $attr = shortcode_atts (array ("file_download" => "", "directive" => ""), $attr);
52
  /**/
46
  do_action ("ws_plugin__s2member_before_sc_get_key", get_defined_vars ());
47
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
48
  /**/
49
+ $attr = c_ws_plugin__s2member_utils_strings::trim_qts_deep ((array)$attr);
50
  /**/
51
  $attr = shortcode_atts (array ("file_download" => "", "directive" => ""), $attr);
52
  /**/
includes/classes/sc-paypal-button-in.inc.php CHANGED
@@ -46,9 +46,9 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
46
  do_action ("ws_plugin__s2member_before_sc_paypal_button", get_defined_vars ());
47
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
48
  /**/
49
- c_ws_plugin__s2member_no_cache::no_cache_constants (true); /* No caching on pages that contain this Button. */
50
  /**/
51
- $attr = c_ws_plugin__s2member_utils_strings::trim_quot_deep ((array)$attr); /* Force array, and fix &quot; in attrs. */
52
  /**/
53
  $attr = shortcode_atts (apply_filters ("ws_plugin__s2member_sc_paypal_button_default_attrs", array ("ids" => "0", "exp" => "72", "level" => "1", "ccaps" => "", "desc" => "", "ps" => "paypal", "lc" => "", "cc" => "USD", "dg" => "0", "ns" => "1", "custom" => $_SERVER["HTTP_HOST"], "ta" => "0", "tp" => "0", "tt" => "D", "ra" => "0.01", "rp" => "1", "rt" => "M", "rr" => "1", "rrt" => "", "rra" => "1", "modify" => "0", "cancel" => "0", "sp" => "0", "image" => "default", "output" => "button"), get_defined_vars ()), $attr);
54
  /**/
46
  do_action ("ws_plugin__s2member_before_sc_paypal_button", get_defined_vars ());
47
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
48
  /**/
49
+ c_ws_plugin__s2member_no_cache::no_cache_constants (true); /* No caching on pages that contain this Payment Button. */
50
  /**/
51
+ $attr = c_ws_plugin__s2member_utils_strings::trim_qts_deep ((array)$attr); /* Force array; trim quote entities. */
52
  /**/
53
  $attr = shortcode_atts (apply_filters ("ws_plugin__s2member_sc_paypal_button_default_attrs", array ("ids" => "0", "exp" => "72", "level" => "1", "ccaps" => "", "desc" => "", "ps" => "paypal", "lc" => "", "cc" => "USD", "dg" => "0", "ns" => "1", "custom" => $_SERVER["HTTP_HOST"], "ta" => "0", "tp" => "0", "tt" => "D", "ra" => "0.01", "rp" => "1", "rt" => "M", "rr" => "1", "rrt" => "", "rra" => "1", "modify" => "0", "cancel" => "0", "sp" => "0", "image" => "default", "output" => "button"), get_defined_vars ()), $attr);
54
  /**/
includes/classes/sc-profile-in.inc.php CHANGED
@@ -52,7 +52,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
52
  /**/
53
  if (($user = (is_user_logged_in ()) ? wp_get_current_user () : false) && ($user_id = $user->ID))
54
  {
55
- $attr = c_ws_plugin__s2member_utils_strings::trim_quot_deep ((array)$attr);
56
  /**/
57
  $attr = shortcode_atts (array (), $attr); /* Possible Attributes. None. */
58
  /**/
52
  /**/
53
  if (($user = (is_user_logged_in ()) ? wp_get_current_user () : false) && ($user_id = $user->ID))
54
  {
55
+ $attr = c_ws_plugin__s2member_utils_strings::trim_qts_deep ((array)$attr);
56
  /**/
57
  $attr = shortcode_atts (array (), $attr); /* Possible Attributes. None. */
58
  /**/
includes/classes/sc-s-badge-in.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 110524RC
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_sc_s_badge_in"))
21
  {
@@ -42,12 +42,13 @@ if (!class_exists ("c_ws_plugin__s2member_sc_s_badge_in"))
42
  */
43
  public static function sc_s_badge ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
44
  {
45
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
46
  do_action ("ws_plugin__s2member_before_sc_s_badge", get_defined_vars ());
47
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
48
  /**/
49
- $attr = c_ws_plugin__s2member_utils_strings::trim_quot_deep ((array)$attr);
50
- $attr = shortcode_atts (array ("v" => "1"), $attr);
 
51
  /**/
52
  $code = c_ws_plugin__s2member_utilities::s_badge_gen ($attr["v"], false, false);
53
  /**/
15
  * @since 110524RC
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_sc_s_badge_in"))
21
  {
42
  */
43
  public static function sc_s_badge ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
44
  {
45
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
46
  do_action ("ws_plugin__s2member_before_sc_s_badge", get_defined_vars ());
47
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
48
  /**/
49
+ $attr = c_ws_plugin__s2member_utils_strings::trim_qts_deep ((array)$attr);
50
+ /**/
51
+ $attr = shortcode_atts (array ("v" => "1"), $attr); /* One attribute. */
52
  /**/
53
  $code = c_ws_plugin__s2member_utilities::s_badge_gen ($attr["v"], false, false);
54
  /**/
includes/classes/sp-access.inc.php CHANGED
@@ -33,8 +33,8 @@ if (!class_exists ("c_ws_plugin__s2member_sp_access"))
33
  * @package s2Member\SP_Access
34
  * @since 3.5
35
  *
36
- * @param str $sp_ids Comma-delimited list of Specific Post/Page IDs *( numerical )*.
37
- * @param int $hours Optional. An expiration time for this link, in hours. Defaults to `72`.
38
  * @param bool $shrink Optional. Defaults to true. If false, the raw link will NOT be processed by the tinyURL API.
39
  * @return str|bool A Specific Post/Page Access Link, or false on failure.
40
  */
@@ -44,19 +44,17 @@ if (!class_exists ("c_ws_plugin__s2member_sp_access"))
44
  do_action ("ws_plugin__s2member_before_sp_access_link_gen", get_defined_vars ());
45
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
46
  /**/
47
- if (($sp_ids = preg_replace ("/[^0-9;,]/", "", $sp_ids)) && ($leading_id = preg_replace ("/^([0-9]+)(.*?)$/", "$1", $sp_ids)) && $hours)
48
  {
49
  $sp_access = c_ws_plugin__s2member_utils_encryption::encrypt ("sp_time_hours:.:|:.:" . $sp_ids . ":.:|:.:" . strtotime ("now") . ":.:|:.:" . $hours);
50
- $sp_access_link = add_query_arg ("s2member_sp_access", urlencode ($sp_access), get_permalink ($leading_id));
51
  /**/
52
- if ($shrink && ($shorter_url = c_ws_plugin__s2member_utils_urls::shorten ($sp_access_link)))
53
- return apply_filters ("ws_plugin__s2member_sp_access_link_gen", $shorter_url . "#" . $_SERVER["HTTP_HOST"], get_defined_vars ());
54
  /**/
55
- else /* Else use the long one; shortening may fail when/if an API server is down periodically. */
56
- return apply_filters ("ws_plugin__s2member_sp_access_link_gen", $sp_access_link, get_defined_vars ());
57
  }
58
  /**/
59
- return false;
60
  }
61
  /**
62
  * Generates Specific Post/Page Access links via AJAX.
@@ -72,11 +70,18 @@ if (!class_exists ("c_ws_plugin__s2member_sp_access"))
72
  {
73
  do_action ("ws_plugin__s2member_before_sp_access_link_via_ajax", get_defined_vars ());
74
  /**/
75
- if (current_user_can ("create_users")) /* Check priveledges as well. */
76
- if (!empty ($_POST["ws_plugin__s2member_sp_access_link_via_ajax"]) && ($nonce = $_POST["ws_plugin__s2member_sp_access_link_via_ajax"]) && wp_verify_nonce ($nonce, "ws-plugin--s2member-sp-access-link-via-ajax") && ($_p = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_POST))) && isset ($_p["s2member_sp_access_link_ids"], $_p["s2member_sp_access_link_hours"]))
77
- echo apply_filters ("ws_plugin__s2member_sp_access_link_via_ajax", c_ws_plugin__s2member_sp_access::sp_access_link_gen ($_p["s2member_sp_access_link_ids"], $_p["s2member_sp_access_link_hours"]), get_defined_vars ());
 
 
 
 
 
 
 
78
  /**/
79
- exit (); /* Clean exit. */
80
  }
81
  /**
82
  * Handles Specific Post/Page Access authentication.
@@ -88,11 +93,8 @@ if (!class_exists ("c_ws_plugin__s2member_sp_access"))
88
  * @param bool $read_only Optional. Defaults to false. If ``$read_only = true``,
89
  * no session cookies are set, no IP Restrictions are checked, and script execution is not exited on Link failure.
90
  * In other words, with ``$read_only = true``, this function will simply return true or false.
91
- * @return null|bool Always returns true if access is indeed allowed in one way or another.
92
- * If access is denied with ``$read_only = true`` simply return false.
93
- * If access is denied with ``$read_only = false``, return false;
94
- * but if a Specific Post/Page Access Link is currently being used,
95
- * we exit with a warning about Access Link expiration instead.
96
  */
97
  public static function sp_access ($sp_id = FALSE, $read_only = FALSE)
98
  {
@@ -101,40 +103,40 @@ if (!class_exists ("c_ws_plugin__s2member_sp_access"))
101
  $excluded = apply_filters ("ws_plugin__s2member_sp_access_excluded", false, get_defined_vars ());
102
  /**/
103
  if ($excluded || current_user_can (apply_filters ("ws_plugin__s2member_sp_access_excluded_cap", "edit_posts", get_defined_vars ())))
104
- return apply_filters ("ws_plugin__s2member_sp_access", true, get_defined_vars ());
105
  /**/
106
- else if ($sp_id && ((!empty ($_GET["s2member_sp_access"]) && is_array ($sp_access_values = (array)trim (stripslashes ($_GET["s2member_sp_access"])))) || (is_array ($sp_access_values = c_ws_plugin__s2member_sp_access::sp_access_session ()) && !empty ($sp_access_values))))
107
  {
108
- foreach ($sp_access_values as $sp_access_value) /* Supports multiple access values in a session. */
109
  {
110
  if (is_array ($sp_access = preg_split ("/\:\.\:\|\:\.\:/", c_ws_plugin__s2member_utils_encryption::decrypt ($sp_access_value))))
111
  {
112
  if (count ($sp_access) === 4 && $sp_access[0] === "sp_time_hours" && in_array ($sp_id, preg_split ("/[\r\n\t\s;,]+/", $sp_access[1])))
113
  {
114
- if ($sp_access[2] <= strtotime ("now") && ($sp_access[2] + ($sp_access[3] * 3600)) >= strtotime ("now"))
115
  {
116
- if (!$read_only && !empty ($_GET["s2member_sp_access"])) /* Cookie session. */
117
- c_ws_plugin__s2member_sp_access::sp_access_session ($_GET["s2member_sp_access"]);
118
  /**/
119
  if ($read_only || c_ws_plugin__s2member_ip_restrictions::ip_restrictions_ok ($_SERVER["REMOTE_ADDR"], $sp_access_value))
120
- return apply_filters ("ws_plugin__s2member_sp_access", true, get_defined_vars ());
121
  }
122
  }
123
  }
124
  }
125
- /**/
126
- if (!$read_only && !empty ($_GET["s2member_sp_access"])) /* If this is a Specific Post/Page Link? */
127
  {
128
- echo _x ('<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.', "s2member-front", "s2member");
129
- /**/
130
- exit (); /* $_GET["s2member_sp_access"] has expired. Or it is simply invalid. */
131
  }
132
- /**/
133
- return apply_filters ("ws_plugin__s2member_sp_access", false, get_defined_vars ());
134
  }
135
  /**/
136
- else
137
- return apply_filters ("ws_plugin__s2member_sp_access", false, get_defined_vars ());
138
  }
139
  /**
140
  * Handles Specific Post/Page sessions, by writing access values into a cookie.
@@ -153,9 +155,9 @@ if (!class_exists ("c_ws_plugin__s2member_sp_access"))
153
  do_action ("ws_plugin__s2member_before_sp_access_session", get_defined_vars ());
154
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
155
  /**/
156
- $sp_access_values = (!empty ($_COOKIE["s2member_sp_access"])) ? preg_split ("/\:\.\:\|\:\.\:/", $_COOKIE["s2member_sp_access"]) : array ();
157
  /**/
158
- if ($add_sp_access_value && !in_array ($add_sp_access_value, $sp_access_values)) /* If it's not in the session already. */
159
  {
160
  $sp_access_values[] = $add_sp_access_value; /* Add an access value, and update the delimited session cookie. */
161
  $sp_access_values = array_unique ($sp_access_values); /* Keep this array unique; disallow double-stacking. */
@@ -163,7 +165,9 @@ if (!class_exists ("c_ws_plugin__s2member_sp_access"))
163
  $cookie = implode (":.:|:.:", $sp_access_values); /* Implode the access values into a delimited string. */
164
  $cookie = (strlen ($cookie) >= 4096) ? $add_sp_access_value : $cookie; /* Max cookie size is 4kbs. */
165
  /**/
166
- setcookie ("s2member_sp_access", $cookie, time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . setcookie ("s2member_sp_access", $cookie, time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["s2member_sp_access"] = $cookie);
 
 
167
  /**/
168
  eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
169
  do_action ("ws_plugin__s2member_during_sp_access_session", get_defined_vars ());
33
  * @package s2Member\SP_Access
34
  * @since 3.5
35
  *
36
+ * @param str|int $sp_ids Comma-delimited list of Specific Post/Page IDs *( numerical )*.
37
+ * @param int|str $hours Optional. A numeric expiration time for this link, in hours. Defaults to `72`.
38
  * @param bool $shrink Optional. Defaults to true. If false, the raw link will NOT be processed by the tinyURL API.
39
  * @return str|bool A Specific Post/Page Access Link, or false on failure.
40
  */
44
  do_action ("ws_plugin__s2member_before_sp_access_link_gen", get_defined_vars ());
45
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
46
  /**/
47
+ if ((is_string ($sp_ids) || is_numeric ($sp_ids)) && ($sp_ids = preg_replace ("/[^0-9;,]/", "", $sp_ids)) && ($leading_id = preg_replace ("/^([0-9]+).*$/", "$1", $sp_ids)) && is_numeric ($hours))
48
  {
49
  $sp_access = c_ws_plugin__s2member_utils_encryption::encrypt ("sp_time_hours:.:|:.:" . $sp_ids . ":.:|:.:" . strtotime ("now") . ":.:|:.:" . $hours);
 
50
  /**/
51
+ $sp_access_link = add_query_arg ("s2member_sp_access", urlencode ($sp_access), get_permalink ($leading_id)); /* Generate long URL/link. */
 
52
  /**/
53
+ if ($shrink && ($shorter_url = c_ws_plugin__s2member_utils_urls::shorten ($sp_access_link)))
54
+ $sp_access_link = $shorter_url . "#" . $_SERVER["HTTP_HOST"];
55
  }
56
  /**/
57
+ return apply_filters ("ws_plugin__s2member_sp_access_link_gen", ((!empty ($sp_access_link)) ? $sp_access_link : false), get_defined_vars ());
58
  }
59
  /**
60
  * Generates Specific Post/Page Access links via AJAX.
70
  {
71
  do_action ("ws_plugin__s2member_before_sp_access_link_via_ajax", get_defined_vars ());
72
  /**/
73
+ status_header (200); /* Send a 200 OK status header. */
74
+ header ("Content-Type: text/plain; charset=utf-8"); /* Content-Type with UTF-8. */
75
+ eval ('while (@ob_end_clean ());'); /* End/clean all output buffers that may exist. */
76
+ /**/
77
+ if (current_user_can ("create_users")) /* Check priveledges as well. Ability to create Users? */
78
+ /**/
79
+ if (!empty ($_POST["ws_plugin__s2member_sp_access_link_via_ajax"]) && is_string ($nonce = $_POST["ws_plugin__s2member_sp_access_link_via_ajax"]) && wp_verify_nonce ($nonce, "ws-plugin--s2member-sp-access-link-via-ajax"))
80
+ /**/
81
+ if (($_p = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_POST))) && isset ($_p["s2member_sp_access_link_ids"], $_p["s2member_sp_access_link_hours"]))
82
+ $sp_access_link = c_ws_plugin__s2member_sp_access::sp_access_link_gen ((string)$_p["s2member_sp_access_link_ids"], (string)$_p["s2member_sp_access_link_hours"]);
83
  /**/
84
+ exit (apply_filters ("ws_plugin__s2member_sp_access_link_via_ajax", ((!empty ($sp_access_link)) ? $sp_access_link : ""), get_defined_vars ()));
85
  }
86
  /**
87
  * Handles Specific Post/Page Access authentication.
93
  * @param bool $read_only Optional. Defaults to false. If ``$read_only = true``,
94
  * no session cookies are set, no IP Restrictions are checked, and script execution is not exited on Link failure.
95
  * In other words, with ``$read_only = true``, this function will simply return true or false.
96
+ * @return null|bool Always returns `true` if access is indeed allowed in one way or another.
97
+ * If access is denied with ``$read_only = true`` simply return false. If access is denied with ``$read_only = false``, return false; but if a Specific Post/Page Access Link is currently being used, we exit with a warning about Access Link expiration here.
 
 
 
98
  */
99
  public static function sp_access ($sp_id = FALSE, $read_only = FALSE)
100
  {
103
  $excluded = apply_filters ("ws_plugin__s2member_sp_access_excluded", false, get_defined_vars ());
104
  /**/
105
  if ($excluded || current_user_can (apply_filters ("ws_plugin__s2member_sp_access_excluded_cap", "edit_posts", get_defined_vars ())))
106
+ return apply_filters ("ws_plugin__s2member_sp_access", true, get_defined_vars (), "auth-via-exclusion");
107
  /**/
108
+ else if ($sp_id && is_numeric ($sp_id) && ((!empty ($_GET["s2member_sp_access"]) && ($_g["s2member_sp_access"] = trim (stripslashes ((string)$_GET["s2member_sp_access"]))) && is_array ($sp_access_values = array ($_g["s2member_sp_access"]))) || is_array ($sp_access_values = c_ws_plugin__s2member_sp_access::sp_access_session ())) && !empty ($sp_access_values))
109
  {
110
+ foreach ($sp_access_values as $sp_access_value) /* Supports multiple access values in a session. We go through each of them. */
111
  {
112
  if (is_array ($sp_access = preg_split ("/\:\.\:\|\:\.\:/", c_ws_plugin__s2member_utils_encryption::decrypt ($sp_access_value))))
113
  {
114
  if (count ($sp_access) === 4 && $sp_access[0] === "sp_time_hours" && in_array ($sp_id, preg_split ("/[\r\n\t\s;,]+/", $sp_access[1])))
115
  {
116
+ if (is_numeric ($sp_access[2]) && is_numeric ($sp_access[3]) && $sp_access[2] <= strtotime ("now") && ($sp_access[2] + ($sp_access[3] * 3600)) >= strtotime ("now"))
117
  {
118
+ if (!$read_only && !empty ($_g["s2member_sp_access"])) /* Add to session? */
119
+ c_ws_plugin__s2member_sp_access::sp_access_session ($_g["s2member_sp_access"]);
120
  /**/
121
  if ($read_only || c_ws_plugin__s2member_ip_restrictions::ip_restrictions_ok ($_SERVER["REMOTE_ADDR"], $sp_access_value))
122
+ return apply_filters ("ws_plugin__s2member_sp_access", true, get_defined_vars (), "auth-via-link-session");
123
  }
124
  }
125
  }
126
  }
127
+ /* Otherwise, authentication was NOT possible via link or session. */
128
+ if (!$read_only && /* A Specific Post/Page Link? */ !empty ($_g["s2member_sp_access"]))
129
  {
130
+ status_header (503) . header ("Content-Type: text/html; charset=utf-8");
131
+ eval ('while (@ob_end_clean ());'); /* End/clean all output buffers that may exist. */
132
+ exit (_x ('<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.', "s2member-front", "s2member"));
133
  }
134
+ else /* Else return false here. */
135
+ return apply_filters ("ws_plugin__s2member_sp_access", false, get_defined_vars (), "no-auth-via-link-session");
136
  }
137
  /**/
138
+ else /* Else return false here. */
139
+ return apply_filters ("ws_plugin__s2member_sp_access", false, get_defined_vars (), "no-auth-no-link-session");
140
  }
141
  /**
142
  * Handles Specific Post/Page sessions, by writing access values into a cookie.
155
  do_action ("ws_plugin__s2member_before_sp_access_session", get_defined_vars ());
156
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
157
  /**/
158
+ $sp_access_values = (!empty ($_COOKIE["s2member_sp_access"])) ? preg_split ("/\:\.\:\|\:\.\:/", (string)$_COOKIE["s2member_sp_access"]) : array ();
159
  /**/
160
+ if ($add_sp_access_value && is_string ($add_sp_access_value) && !in_array /* Not in session? */ ($add_sp_access_value, $sp_access_values))
161
  {
162
  $sp_access_values[] = $add_sp_access_value; /* Add an access value, and update the delimited session cookie. */
163
  $sp_access_values = array_unique ($sp_access_values); /* Keep this array unique; disallow double-stacking. */
165
  $cookie = implode (":.:|:.:", $sp_access_values); /* Implode the access values into a delimited string. */
166
  $cookie = (strlen ($cookie) >= 4096) ? $add_sp_access_value : $cookie; /* Max cookie size is 4kbs. */
167
  /**/
168
+ setcookie ("s2member_sp_access", $cookie, time () + 31556926, COOKIEPATH, COOKIE_DOMAIN);
169
+ setcookie ("s2member_sp_access", $cookie, time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
170
+ $_COOKIE["s2member_sp_access"] = $cookie; /* Real-time cookie updates. */
171
  /**/
172
  eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
173
  do_action ("ws_plugin__s2member_during_sp_access_session", get_defined_vars ());
includes/classes/tracking-cookies-in.inc.php CHANGED
@@ -51,8 +51,8 @@ if (!class_exists ("c_ws_plugin__s2member_tracking_cookies_in"))
51
  @ini_set ("zlib.output_compression", 0); /* Turn off. */
52
  /**/
53
  status_header (200); /* Send a 200 OK status header. */
54
- header ("Content-Type: image/png"); /* Send 1px trans PNG. */
55
- eval ('while (@ob_end_clean ());'); /* Clean buffers. */
56
  /**/
57
  exit (file_get_contents (dirname (dirname (dirname (__FILE__))) . "/images/trans-1px.png"));
58
  }
@@ -80,11 +80,11 @@ if (!class_exists ("c_ws_plugin__s2member_tracking_cookies_in"))
80
  /**/
81
  do_action ("ws_plugin__s2member_during_delete_sp_tracking_cookie", get_defined_vars ());
82
  /**/
83
- @ini_set ("zlib.output_compression", 0);
84
  /**/
85
  status_header (200); /* Send a 200 OK status header. */
86
- header ("Content-Type: image/png"); /* Send 1px trans PNG. */
87
- eval ('while (@ob_end_clean ());'); /* Clean buffers. */
88
  /**/
89
  exit (file_get_contents (dirname (dirname (dirname (__FILE__))) . "/images/trans-1px.png"));
90
  }
51
  @ini_set ("zlib.output_compression", 0); /* Turn off. */
52
  /**/
53
  status_header (200); /* Send a 200 OK status header. */
54
+ header ("Content-Type: image/png"); /* Content-Type image/png for 1px transparency. */
55
+ eval ('while (@ob_end_clean ());'); /* End/clean all output buffers that may or may not exist. */
56
  /**/
57
  exit (file_get_contents (dirname (dirname (dirname (__FILE__))) . "/images/trans-1px.png"));
58
  }
80
  /**/
81
  do_action ("ws_plugin__s2member_during_delete_sp_tracking_cookie", get_defined_vars ());
82
  /**/
83
+ @ini_set ("zlib.output_compression", 0); /* Turn off. */
84
  /**/
85
  status_header (200); /* Send a 200 OK status header. */
86
+ header ("Content-Type: image/png"); /* Content-Type image/png for 1px transparency. */
87
+ eval ('while (@ob_end_clean ());'); /* End/clean all output buffers that may or may not exist. */
88
  /**/
89
  exit (file_get_contents (dirname (dirname (dirname (__FILE__))) . "/images/trans-1px.png"));
90
  }
includes/classes/user-access.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_user_access"))
21
  {
@@ -43,7 +43,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_access"))
43
  */
44
  public static function user_access_role ($user = FALSE)
45
  {
46
- if ((func_num_args () && (!is_object ($user) || !$user->ID)) || (!func_num_args () && !$user && (!is_object ($user = (is_user_logged_in ()) ? wp_get_current_user () : false) || !$user->ID)))
47
  {
48
  return apply_filters ("ws_plugin__s2member_user_access_role", "", get_defined_vars ());
49
  }
@@ -66,7 +66,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_access"))
66
  */
67
  public static function user_access_ccaps ($user = FALSE)
68
  {
69
- if ((func_num_args () && (!is_object ($user) || !$user->ID)) || (!func_num_args () && !$user && (!is_object ($user = (is_user_logged_in ()) ? wp_get_current_user () : false) || !$user->ID)))
70
  {
71
  return apply_filters ("ws_plugin__s2member_user_access_ccaps", array (), get_defined_vars ());
72
  }
@@ -97,7 +97,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_access"))
97
  */
98
  public static function user_access_level ($user = FALSE)
99
  {
100
- if ((func_num_args () && (!is_object ($user) || !$user->ID)) || (!func_num_args () && !$user && (!is_object ($user = (is_user_logged_in ()) ? wp_get_current_user () : false) || !$user->ID)))
101
  {
102
  return apply_filters ("ws_plugin__s2member_user_access_level", -1, get_defined_vars ()); /* No $user, or NOT logged in. */
103
  }
@@ -157,7 +157,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_access"))
157
  */
158
  public static function user_access_label ($user = FALSE)
159
  {
160
- if ((func_num_args () && (!is_object ($user) || !$user->ID)) || (!func_num_args () && !$user && (!is_object ($user = (is_user_logged_in ()) ? wp_get_current_user () : false) || !$user->ID)))
161
  {
162
  return apply_filters ("ws_plugin__s2member_user_access_label", "", get_defined_vars ()); /* No $user, or NOT logged in. */
163
  }
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_user_access"))
21
  {
43
  */
44
  public static function user_access_role ($user = FALSE)
45
  {
46
+ if ((func_num_args () && (!is_object ($user) || empty ($user->ID))) || (!func_num_args () && !$user && (!is_object ($user = (is_user_logged_in ()) ? wp_get_current_user () : false) || empty ($user->ID))))
47
  {
48
  return apply_filters ("ws_plugin__s2member_user_access_role", "", get_defined_vars ());
49
  }
66
  */
67
  public static function user_access_ccaps ($user = FALSE)
68
  {
69
+ if ((func_num_args () && (!is_object ($user) || empty ($user->ID))) || (!func_num_args () && !$user && (!is_object ($user = (is_user_logged_in ()) ? wp_get_current_user () : false) || empty ($user->ID))))
70
  {
71
  return apply_filters ("ws_plugin__s2member_user_access_ccaps", array (), get_defined_vars ());
72
  }
97
  */
98
  public static function user_access_level ($user = FALSE)
99
  {
100
+ if ((func_num_args () && (!is_object ($user) || empty ($user->ID))) || (!func_num_args () && !$user && (!is_object ($user = (is_user_logged_in ()) ? wp_get_current_user () : false) || empty ($user->ID))))
101
  {
102
  return apply_filters ("ws_plugin__s2member_user_access_level", -1, get_defined_vars ()); /* No $user, or NOT logged in. */
103
  }
157
  */
158
  public static function user_access_label ($user = FALSE)
159
  {
160
+ if ((func_num_args () && (!is_object ($user) || empty ($user->ID))) || (!func_num_args () && !$user && (!is_object ($user = (is_user_logged_in ()) ? wp_get_current_user () : false) || empty ($user->ID))))
161
  {
162
  return apply_filters ("ws_plugin__s2member_user_access_label", "", get_defined_vars ()); /* No $user, or NOT logged in. */
163
  }
includes/classes/user-deletions.inc.php CHANGED
@@ -144,7 +144,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_deletions"))
144
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
145
  {
146
  if (is_array ($fields) && !empty ($fields))
147
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
148
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
149
  break;
150
  /**/
@@ -195,7 +195,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_deletions"))
195
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
196
  {
197
  if (is_array ($fields) && !empty ($fields))
198
- foreach ($fields as $var => $val) /* Custom Registration Fields. */
199
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
200
  break;
201
  /**/
144
  if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
145
  {
146
  if (is_array ($fields) && !empty ($fields))
147
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
148
  if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
149
  break;
150
  /**/
195
  if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
196
  {
197
  if (is_array ($fields) && !empty ($fields))
198
+ foreach ($fields as $var => $val) /* Custom Registration/Profile Fields. */
199
  if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
200
  break;
201
  /**/
includes/classes/users-list-in.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
21
  {
@@ -43,16 +43,16 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
43
  {
44
  global $current_site, $current_blog; /* Multisite Networking. */
45
  /**/
46
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
47
  do_action ("ws_plugin__s2member_before_users_list_edit_cols", get_defined_vars ());
48
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
49
  /**/
50
  $current_user = (is_user_logged_in ()) ? wp_get_current_user () : false; /* Current User. */
51
  /**/
52
- if (is_object ($user) && ($user_id = $user->ID) && is_object ($current_user) && $current_user->ID)
53
  {
54
- $role = c_ws_plugin__s2member_user_access::user_access_role ($user); /* This User's WordPress® Role. */
55
- $level = c_ws_plugin__s2member_user_access::user_access_level ($user); /* This User's Access Level for s2Member. */
56
  /**/
57
  if (current_user_can ("edit_users") && (!is_multisite () || is_super_admin () || is_user_member_of_blog ($user_id)))
58
  {
@@ -62,14 +62,14 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
62
  /**/
63
  echo '<table class="form-table">' . "\n";
64
  /**/
65
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
66
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before", get_defined_vars ());
67
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
68
  /**/
69
  if (is_multisite () && is_super_admin ()) /* MUST be a Super Admin. */
70
  /* On a Multisite Network, the Super Administrator can ALWAYS edit this. */
71
  {
72
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
73
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_originating_blog", get_defined_vars ());
74
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
75
  /**/
@@ -78,12 +78,12 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
78
  echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_originating_blog" id="ws-plugin--s2member-profile-s2member-originating-blog" value="' . format_to_edit (get_user_meta ($user_id, "s2member_originating_blog", true)) . '" class="regular-text" /></td>' . "\n";
79
  echo '</tr>' . "\n";
80
  /**/
81
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
82
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_originating_blog", get_defined_vars ());
83
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
84
  }
85
  /**/
86
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
87
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_subscr_gateway", get_defined_vars ());
88
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
89
  /**/
@@ -96,11 +96,11 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
96
  echo '</td>' . "\n";
97
  echo '</tr>' . "\n";
98
  /**/
99
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
100
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_subscr_gateway", get_defined_vars ());
101
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
102
  /**/
103
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
104
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_subscr_id", get_defined_vars ());
105
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
106
  /**/
@@ -109,11 +109,11 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
109
  echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_subscr_id" id="ws-plugin--s2member-profile-s2member-subscr-id" value="' . format_to_edit (get_user_option ("s2member_subscr_id", $user_id)) . '" class="regular-text" /></td>' . "\n";
110
  echo '</tr>' . "\n";
111
  /**/
112
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
113
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_subscr_id", get_defined_vars ());
114
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
115
  /**/
116
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
117
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_custom", get_defined_vars ());
118
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
119
  /**/
@@ -122,11 +122,11 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
122
  echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_custom" id="ws-plugin--s2member-profile-s2member-custom" value="' . format_to_edit (get_user_option ("s2member_custom", $user_id)) . '" class="regular-text" /></td>' . "\n";
123
  echo '</tr>' . "\n";
124
  /**/
125
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
126
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_custom", get_defined_vars ());
127
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
128
  /**/
129
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
130
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_registration_ip", get_defined_vars ());
131
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
132
  /**/
@@ -135,7 +135,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
135
  echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_registration_ip" id="ws-plugin--s2member-profile-s2member-registration-ip" value="' . format_to_edit (get_user_option ("s2member_registration_ip", $user_id)) . '" class="regular-text" /></td>' . "\n";
136
  echo '</tr>' . "\n";
137
  /**/
138
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
139
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_registration_ip", get_defined_vars ());
140
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
141
  /**/
@@ -146,7 +146,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
146
  if (preg_match ("/^access_s2member_ccap_/", $cap))
147
  $ccaps[] = preg_replace ("/^access_s2member_ccap_/", "", $cap);
148
  /**/
149
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
150
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_ccaps", get_defined_vars ());
151
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
152
  /**/
@@ -155,14 +155,14 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
155
  echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_ccaps" id="ws-plugin--s2member-profile-s2member-ccaps" value="' . format_to_edit (((!empty ($ccaps)) ? implode (",", $ccaps) : "")) . '" class="regular-text" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></td>' . "\n";
156
  echo '</tr>' . "\n";
157
  /**/
158
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
159
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_ccaps", get_defined_vars ());
160
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
161
  }
162
  /**/
163
  if (!$user->has_cap ("administrator")) /* Do NOT present these details for Administrator accounts. */
164
  {
165
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
166
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_auto_eot_time", get_defined_vars ());
167
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
168
  /**/
@@ -173,14 +173,14 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
173
  echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_auto_eot_time" id="ws-plugin--s2member-profile-s2member-auto-eot-time" value="' . format_to_edit ($auto_eot_time) . '" class="regular-text" /></td>' . "\n";
174
  echo '</tr>' . "\n";
175
  /**/
176
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
177
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_auto_eot_time", get_defined_vars ());
178
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
179
  }
180
  /**/
181
  if (c_ws_plugin__s2member_list_servers::list_servers_integrated ()) /* Only if integrated with s2Member. */
182
  {
183
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
184
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_opt_in", get_defined_vars ());
185
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
186
  /**/
@@ -189,15 +189,15 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
189
  echo '<td><label><input type="checkbox" name="ws_plugin__s2member_profile_opt_in" id="ws-plugin--s2member-profile-opt-in" value="1" /> Yes, send a mailing list confirmation email to this User.</label></td>' . "\n";
190
  echo '</tr>' . "\n";
191
  /**/
192
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
193
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_opt_in", get_defined_vars ());
194
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
195
  /**/
196
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_out_transitions"])
197
- if (($custom_reg_auto_op_outs = c_ws_plugin__s2member_utils_strings::wrap_deep ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_outs"], "/", "/i")))
198
  if (c_ws_plugin__s2member_utils_arrays::in_regex_array ("user-role-change", $custom_reg_auto_op_outs) || c_ws_plugin__s2member_utils_arrays::in_regex_array ("modification", $custom_reg_auto_op_outs))
199
  {
200
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
201
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_auto_opt_out_transitions", get_defined_vars ());
202
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
203
  /**/
@@ -206,13 +206,13 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
206
  echo '<td><label><input type="checkbox" name="ws_plugin__s2member_custom_reg_auto_opt_out_transitions" id="ws-plugin--s2member-custom-reg-auto-opt-out-transitions" value="1" checked="checked" /> Yes, automatically transition this User\'s mailing list subscription(s) when/if I change their Role.</label></td>' . "\n";
207
  echo '</tr>' . "\n";
208
  /**/
209
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
210
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_auto_opt_out_transitions", get_defined_vars ());
211
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
212
  }
213
  }
214
  /**/
215
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
216
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_ip_restrictions", get_defined_vars ());
217
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
218
  /**/
@@ -221,7 +221,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
221
  echo '<td><label><input type="checkbox" name="ws_plugin__s2member_profile_ip_restrictions" id="ws-plugin--s2member-profile-ip-restrictions" value="1" /> Yes, delete/reset IP Restrictions associated with this Username.</label>' . ((c_ws_plugin__s2member_ip_restrictions::specific_ip_restriction_breached_security (strtolower ($user->user_login))) ? '<br /><em>*Note* this User HAS breached security through existing IP Restrictions.</em>' : '<br /><em>*Note* this User is NOT currently banned by any of your IP Restrictions.</em>') . '</td>' . "\n";
222
  echo '</tr>' . "\n";
223
  /**/
224
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
225
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_ip_restrictions", get_defined_vars ());
226
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
227
  /**/
@@ -236,13 +236,13 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
236
  /**/
237
  $fields = get_user_option ("s2member_custom_fields", $user_id); /* Existing fields. */
238
  /**/
239
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
240
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_custom_fields", get_defined_vars ());
241
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
242
  /**/
243
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
244
  {
245
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
246
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_before", get_defined_vars ());
247
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
248
  /**/
@@ -251,7 +251,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
251
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
252
  $field_id_class = preg_replace ("/_/", "-", $field_var);
253
  /**/
254
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
255
  if (apply_filters ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_display", true, get_defined_vars ()))
256
  {
257
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
@@ -265,12 +265,12 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
265
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
266
  }
267
  /**/
268
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
269
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_after", get_defined_vars ());
270
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
271
  }
272
  /**/
273
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
274
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_custom_fields", get_defined_vars ());
275
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
276
  /**/
@@ -281,7 +281,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
281
  echo '</tr>' . "\n";
282
  }
283
  /**/
284
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
285
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_notes", get_defined_vars ());
286
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
287
  /**/
@@ -290,11 +290,11 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
290
  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";
291
  echo '</tr>' . "\n";
292
  /**/
293
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
294
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_notes", get_defined_vars ());
295
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
296
  /**/
297
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
298
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after", get_defined_vars ());
299
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
300
  /**/
@@ -314,19 +314,19 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
314
  /**/
315
  echo '<table class="form-table">' . "\n";
316
  /**/
317
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
318
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before", get_defined_vars ());
319
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
320
  /**/
321
  $fields = get_user_option ("s2member_custom_fields", $user_id); /* Existing fields. */
322
  /**/
323
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
324
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_custom_fields", get_defined_vars ());
325
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
326
  /**/
327
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
328
  {
329
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
330
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_before", get_defined_vars ());
331
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
332
  /**/
@@ -335,7 +335,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
335
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
336
  $field_id_class = preg_replace ("/_/", "-", $field_var);
337
  /**/
338
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
339
  if (apply_filters ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_display", true, get_defined_vars ()))
340
  {
341
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
@@ -349,16 +349,16 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
349
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
350
  }
351
  /**/
352
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
353
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_after", get_defined_vars ());
354
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
355
  }
356
  /**/
357
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
358
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_custom_fields", get_defined_vars ());
359
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
360
  /**/
361
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
362
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after", get_defined_vars ());
363
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
364
  /**/
@@ -369,7 +369,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
369
  }
370
  }
371
  /**/
372
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
373
  do_action ("ws_plugin__s2member_after_users_list_edit_cols", get_defined_vars ());
374
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
375
  /**/
@@ -391,31 +391,34 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
391
  {
392
  global $current_site, $current_blog; /* Multisite Networking. */
393
  /**/
394
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
395
  do_action ("ws_plugin__s2member_before_users_list_update_cols", get_defined_vars ());
396
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
397
  /**/
398
  $user = new WP_User ($user_id); /* We need both of these objects. $user and $current_user. */
399
  $current_user = (is_user_logged_in ()) ? wp_get_current_user () : false; /* Current User. */
400
  /**/
401
- if (is_object ($user) && ($user_id = $user->ID) && is_object ($current_user) && $current_user->ID)
402
  {
403
  if (current_user_can ("edit_users") && (!is_multisite () || is_super_admin () || is_user_member_of_blog ($user_id)))
404
  {
405
  if (!empty ($_POST) && is_array ($_p = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_POST))))
406
  {
407
- $old_role = c_ws_plugin__s2member_user_access::user_access_role ($user);
408
- $role = (isset ($_p["role"]) && $_p["role"] !== $old_role) ? $_p["role"] : $old_role;
409
- $level = c_ws_plugin__s2member_user_access::user_access_role_to_level ($role);
 
 
410
  /**/
411
- $user->user_email = (isset ($_p["email"]) && is_email ($_p["email"]) && $_p["email"] !== $user->user_email) ? $_p["email"] : $user->user_email;
412
- $user->first_name = (isset ($_p["first_name"]) && $_p["first_name"] !== $user->first_name) ? $_p["first_name"] : $user->first_name;
413
- $user->last_name = (isset ($_p["last_name"]) && $_p["last_name"] !== $user->last_name) ? $_p["last_name"] : $user->last_name;
 
414
  /**/
415
  $auto_eot_time = (!empty ($_p["ws_plugin__s2member_profile_s2member_auto_eot_time"])) ? strtotime ($_p["ws_plugin__s2member_profile_s2member_auto_eot_time"]) : "";
416
  /**/
417
- if ($role !== $old_role) /* In this case, we need to fire a Hook on `ws_plugin__s2member_during_collective_mods`. */
418
- do_action ("ws_plugin__s2member_during_collective_mods", $user_id, get_defined_vars (), "user-role-change", "modification", $role, $old_role, $user);
419
  /**/
420
  if (isset ($_p["ws_plugin__s2member_profile_s2member_originating_blog"]) && is_multisite () && is_super_admin ())
421
  update_user_meta ($user_id, "s2member_originating_blog", $_p["ws_plugin__s2member_profile_s2member_originating_blog"]);
@@ -457,15 +460,15 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
457
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
458
  $field_id_class = preg_replace ("/_/", "-", $field_var);
459
  /**/
460
- if (isset ($_p["ws_plugin__s2member_profile_" . $field_var]))
461
  {
462
- if ((is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && !empty ($_p["ws_plugin__s2member_profile_" . $field_var])) || strlen ($_p["ws_plugin__s2member_profile_" . $field_var]))
463
  $fields[$field_var] = $_p["ws_plugin__s2member_profile_" . $field_var];
464
  else /* Else unset. */
465
- unset ($fields[$field_var]);
466
  }
467
  else /* Else ``unset()``. */
468
- unset ($fields[$field_var]);
469
  }
470
  }
471
  /**/
@@ -477,18 +480,18 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
477
  if ($level > 0) /* We ONLY process this if they are higher than Level #0. */
478
  {
479
  $pr_times = get_user_option ("s2member_paid_registration_times", $user_id);
480
- $pr_times["level"] = (!$pr_times["level"]) ? time () : $pr_times["level"]; /* Preserve. */
481
- $pr_times["level" . $level] = (!$pr_times["level" . $level]) ? time () : $pr_times["level" . $level];
482
  update_user_option ($user_id, "s2member_paid_registration_times", $pr_times); /* Update now. */
483
  }
484
  /**/
485
- if (!empty ($_p["ws_plugin__s2member_profile_opt_in"])) /* Should we process List Servers for this User? */
486
  c_ws_plugin__s2member_list_servers::process_list_servers ($role, $level, $user->user_login, ((!empty ($_p["pass1"])) ? $_p["pass1"] : ""), $user->user_email, $user->first_name, $user->last_name, false, true, true, $user_id);
487
  /**/
488
  if (!empty ($_p["ws_plugin__s2member_profile_ip_restrictions"])) /* Delete/reset IP Restrictions? */
489
  c_ws_plugin__s2member_ip_restrictions::delete_reset_specific_ip_restrictions (strtolower ($user->user_login));
490
  /**/
491
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
492
  do_action ("ws_plugin__s2member_during_users_list_update_cols", get_defined_vars ());
493
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
494
  }
@@ -498,7 +501,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
498
  {
499
  if (!empty ($_POST) && is_array ($_p = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_POST))))
500
  {
501
- $role = c_ws_plugin__s2member_user_access::user_access_role ($user);
502
  $level = c_ws_plugin__s2member_user_access::user_access_role_to_level ($role);
503
  /**/
504
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"])
@@ -511,29 +514,29 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
511
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
512
  $field_id_class = preg_replace ("/_/", "-", $field_var);
513
  /**/
514
- if (!in_array ($field["id"], $fields_applicable) || preg_match ("/^no/", $field["editable"]))
515
  {
516
- if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || strlen ($_existing_fields[$field_var])))
517
  $fields[$field_var] = $_existing_fields[$field_var];
518
- else /* Else unset. */
519
- unset ($fields[$field_var]);
520
  }
521
- else if ($field["required"] === "yes" && (!isset ($_p["ws_plugin__s2member_profile_" . $field_var]) || (is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && empty ($_p["ws_plugin__s2member_profile_" . $field_var])) || !strlen ($_p["ws_plugin__s2member_profile_" . $field_var])))
522
  {
523
- if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || strlen ($_existing_fields[$field_var])))
524
  $fields[$field_var] = $_existing_fields[$field_var];
525
- else /* Else unset. */
526
- unset ($fields[$field_var]);
527
  }
528
  else if (isset ($_p["ws_plugin__s2member_profile_" . $field_var]))
529
  {
530
- if ((is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && !empty ($_p["ws_plugin__s2member_profile_" . $field_var])) || strlen ($_p["ws_plugin__s2member_profile_" . $field_var]))
531
  $fields[$field_var] = $_p["ws_plugin__s2member_profile_" . $field_var];
532
- else /* Else unset. */
533
- unset ($fields[$field_var]);
534
  }
535
  else /* Else ``unset()``. */
536
- unset ($fields[$field_var]);
537
  }
538
  /**/
539
  if (!empty ($fields))
@@ -542,14 +545,14 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
542
  delete_user_option ($user_id, "s2member_custom_fields");
543
  }
544
  /**/
545
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
546
  do_action ("ws_plugin__s2member_during_users_list_update_cols", get_defined_vars ());
547
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
548
  }
549
  }
550
  }
551
  /**/
552
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
553
  do_action ("ws_plugin__s2member_after_users_list_update_cols", get_defined_vars ());
554
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
555
  /**/
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
21
  {
43
  {
44
  global $current_site, $current_blog; /* Multisite Networking. */
45
  /**/
46
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
47
  do_action ("ws_plugin__s2member_before_users_list_edit_cols", get_defined_vars ());
48
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
49
  /**/
50
  $current_user = (is_user_logged_in ()) ? wp_get_current_user () : false; /* Current User. */
51
  /**/
52
+ if (is_object ($user) && !empty ($user->ID) && ($user_id = $user->ID) && is_object ($current_user) && !empty ($current_user->ID))
53
  {
54
+ $role = c_ws_plugin__s2member_user_access::user_access_role ($user); /* This User's current WordPress® Role. */
55
+ $level = c_ws_plugin__s2member_user_access::user_access_level ($user); /* User's Access Level for s2Member. */
56
  /**/
57
  if (current_user_can ("edit_users") && (!is_multisite () || is_super_admin () || is_user_member_of_blog ($user_id)))
58
  {
62
  /**/
63
  echo '<table class="form-table">' . "\n";
64
  /**/
65
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
66
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before", get_defined_vars ());
67
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
68
  /**/
69
  if (is_multisite () && is_super_admin ()) /* MUST be a Super Admin. */
70
  /* On a Multisite Network, the Super Administrator can ALWAYS edit this. */
71
  {
72
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
73
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_originating_blog", get_defined_vars ());
74
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
75
  /**/
78
  echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_originating_blog" id="ws-plugin--s2member-profile-s2member-originating-blog" value="' . format_to_edit (get_user_meta ($user_id, "s2member_originating_blog", true)) . '" class="regular-text" /></td>' . "\n";
79
  echo '</tr>' . "\n";
80
  /**/
81
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
82
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_originating_blog", get_defined_vars ());
83
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
84
  }
85
  /**/
86
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
87
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_subscr_gateway", get_defined_vars ());
88
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
89
  /**/
96
  echo '</td>' . "\n";
97
  echo '</tr>' . "\n";
98
  /**/
99
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
100
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_subscr_gateway", get_defined_vars ());
101
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
102
  /**/
103
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
104
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_subscr_id", get_defined_vars ());
105
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
106
  /**/
109
  echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_subscr_id" id="ws-plugin--s2member-profile-s2member-subscr-id" value="' . format_to_edit (get_user_option ("s2member_subscr_id", $user_id)) . '" class="regular-text" /></td>' . "\n";
110
  echo '</tr>' . "\n";
111
  /**/
112
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
113
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_subscr_id", get_defined_vars ());
114
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
115
  /**/
116
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
117
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_custom", get_defined_vars ());
118
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
119
  /**/
122
  echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_custom" id="ws-plugin--s2member-profile-s2member-custom" value="' . format_to_edit (get_user_option ("s2member_custom", $user_id)) . '" class="regular-text" /></td>' . "\n";
123
  echo '</tr>' . "\n";
124
  /**/
125
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
126
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_custom", get_defined_vars ());
127
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
128
  /**/
129
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
130
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_registration_ip", get_defined_vars ());
131
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
132
  /**/
135
  echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_registration_ip" id="ws-plugin--s2member-profile-s2member-registration-ip" value="' . format_to_edit (get_user_option ("s2member_registration_ip", $user_id)) . '" class="regular-text" /></td>' . "\n";
136
  echo '</tr>' . "\n";
137
  /**/
138
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
139
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_registration_ip", get_defined_vars ());
140
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
141
  /**/
146
  if (preg_match ("/^access_s2member_ccap_/", $cap))
147
  $ccaps[] = preg_replace ("/^access_s2member_ccap_/", "", $cap);
148
  /**/
149
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
150
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_ccaps", get_defined_vars ());
151
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
152
  /**/
155
  echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_ccaps" id="ws-plugin--s2member-profile-s2member-ccaps" value="' . format_to_edit (((!empty ($ccaps)) ? implode (",", $ccaps) : "")) . '" class="regular-text" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></td>' . "\n";
156
  echo '</tr>' . "\n";
157
  /**/
158
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
159
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_ccaps", get_defined_vars ());
160
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
161
  }
162
  /**/
163
  if (!$user->has_cap ("administrator")) /* Do NOT present these details for Administrator accounts. */
164
  {
165
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
166
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_auto_eot_time", get_defined_vars ());
167
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
168
  /**/
173
  echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_auto_eot_time" id="ws-plugin--s2member-profile-s2member-auto-eot-time" value="' . format_to_edit ($auto_eot_time) . '" class="regular-text" /></td>' . "\n";
174
  echo '</tr>' . "\n";
175
  /**/
176
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
177
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_auto_eot_time", get_defined_vars ());
178
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
179
  }
180
  /**/
181
  if (c_ws_plugin__s2member_list_servers::list_servers_integrated ()) /* Only if integrated with s2Member. */
182
  {
183
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
184
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_opt_in", get_defined_vars ());
185
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
186
  /**/
189
  echo '<td><label><input type="checkbox" name="ws_plugin__s2member_profile_opt_in" id="ws-plugin--s2member-profile-opt-in" value="1" /> Yes, send a mailing list confirmation email to this User.</label></td>' . "\n";
190
  echo '</tr>' . "\n";
191
  /**/
192
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
193
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_opt_in", get_defined_vars ());
194
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
195
  /**/
196
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_out_transitions"])
197
+ if (($custom_reg_auto_op_outs = c_ws_plugin__s2member_utils_strings::wrap_deep ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_outs"], "/^", "$/i")))
198
  if (c_ws_plugin__s2member_utils_arrays::in_regex_array ("user-role-change", $custom_reg_auto_op_outs) || c_ws_plugin__s2member_utils_arrays::in_regex_array ("modification", $custom_reg_auto_op_outs))
199
  {
200
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
201
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_auto_opt_out_transitions", get_defined_vars ());
202
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
203
  /**/
206
  echo '<td><label><input type="checkbox" name="ws_plugin__s2member_custom_reg_auto_opt_out_transitions" id="ws-plugin--s2member-custom-reg-auto-opt-out-transitions" value="1" checked="checked" /> Yes, automatically transition this User\'s mailing list subscription(s) when/if I change their Role.</label></td>' . "\n";
207
  echo '</tr>' . "\n";
208
  /**/
209
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
210
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_auto_opt_out_transitions", get_defined_vars ());
211
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
212
  }
213
  }
214
  /**/
215
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
216
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_ip_restrictions", get_defined_vars ());
217
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
218
  /**/
221
  echo '<td><label><input type="checkbox" name="ws_plugin__s2member_profile_ip_restrictions" id="ws-plugin--s2member-profile-ip-restrictions" value="1" /> Yes, delete/reset IP Restrictions associated with this Username.</label>' . ((c_ws_plugin__s2member_ip_restrictions::specific_ip_restriction_breached_security (strtolower ($user->user_login))) ? '<br /><em>*Note* this User HAS breached security through existing IP Restrictions.</em>' : '<br /><em>*Note* this User is NOT currently banned by any of your IP Restrictions.</em>') . '</td>' . "\n";
222
  echo '</tr>' . "\n";
223
  /**/
224
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
225
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_ip_restrictions", get_defined_vars ());
226
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
227
  /**/
236
  /**/
237
  $fields = get_user_option ("s2member_custom_fields", $user_id); /* Existing fields. */
238
  /**/
239
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
240
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_custom_fields", get_defined_vars ());
241
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
242
  /**/
243
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
244
  {
245
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
246
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_before", get_defined_vars ());
247
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
248
  /**/
251
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
252
  $field_id_class = preg_replace ("/_/", "-", $field_var);
253
  /**/
254
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
255
  if (apply_filters ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_display", true, get_defined_vars ()))
256
  {
257
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
265
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
266
  }
267
  /**/
268
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
269
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_after", get_defined_vars ());
270
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
271
  }
272
  /**/
273
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
274
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_custom_fields", get_defined_vars ());
275
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
276
  /**/
281
  echo '</tr>' . "\n";
282
  }
283
  /**/
284
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
285
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_notes", get_defined_vars ());
286
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
287
  /**/
290
  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";
291
  echo '</tr>' . "\n";
292
  /**/
293
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
294
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_notes", get_defined_vars ());
295
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
296
  /**/
297
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
298
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after", get_defined_vars ());
299
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
300
  /**/
314
  /**/
315
  echo '<table class="form-table">' . "\n";
316
  /**/
317
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
318
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before", get_defined_vars ());
319
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
320
  /**/
321
  $fields = get_user_option ("s2member_custom_fields", $user_id); /* Existing fields. */
322
  /**/
323
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
324
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_custom_fields", get_defined_vars ());
325
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
326
  /**/
327
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
328
  {
329
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
330
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_before", get_defined_vars ());
331
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
332
  /**/
335
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
336
  $field_id_class = preg_replace ("/_/", "-", $field_var);
337
  /**/
338
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
339
  if (apply_filters ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_display", true, get_defined_vars ()))
340
  {
341
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
349
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
350
  }
351
  /**/
352
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
353
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_after", get_defined_vars ());
354
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
355
  }
356
  /**/
357
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
358
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_custom_fields", get_defined_vars ());
359
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
360
  /**/
361
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
362
  do_action ("ws_plugin__s2member_during_users_list_edit_cols_after", get_defined_vars ());
363
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
364
  /**/
369
  }
370
  }
371
  /**/
372
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
373
  do_action ("ws_plugin__s2member_after_users_list_edit_cols", get_defined_vars ());
374
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
375
  /**/
391
  {
392
  global $current_site, $current_blog; /* Multisite Networking. */
393
  /**/
394
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
395
  do_action ("ws_plugin__s2member_before_users_list_update_cols", get_defined_vars ());
396
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
397
  /**/
398
  $user = new WP_User ($user_id); /* We need both of these objects. $user and $current_user. */
399
  $current_user = (is_user_logged_in ()) ? wp_get_current_user () : false; /* Current User. */
400
  /**/
401
+ if (is_object ($user) && !empty ($user->ID) && ($user_id = $user->ID) && is_object ($current_user) && !empty ($current_user->ID))
402
  {
403
  if (current_user_can ("edit_users") && (!is_multisite () || is_super_admin () || is_user_member_of_blog ($user_id)))
404
  {
405
  if (!empty ($_POST) && is_array ($_p = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_POST))))
406
  {
407
+ $old_user = unserialize (serialize ($user)); /* Copy existing User obj. */
408
+ $old_role = c_ws_plugin__s2member_user_access::user_access_role ($old_user);
409
+ /**/
410
+ $role = /* Might be empty! */ (isset ($_p["role"]) && $_p["role"] !== $old_role) ? $_p["role"] : $old_role;
411
+ $level = /* Might be `-1`. */ c_ws_plugin__s2member_user_access::user_access_role_to_level ($role);
412
  /**/
413
+ $user->roles = (isset ($_p["role"]) && $_p["role"] !== $old_role) ? /* Might be empty! */ array ($_p["role"]): $old_user->roles;
414
+ $user->user_email = (isset ($_p["email"]) && is_email ($_p["email"]) && $_p["email"] !== $old_user->user_email && !email_exists ($_p["email"])) ? $_p["email"] : $old_user->user_email;
415
+ $user->first_name = (isset ($_p["first_name"]) && $_p["first_name"] !== $old_user->first_name) ? $_p["first_name"] : $old_user->first_name;
416
+ $user->last_name = (isset ($_p["last_name"]) && $_p["last_name"] !== $old_user->last_name) ? $_p["last_name"] : $old_user->last_name;
417
  /**/
418
  $auto_eot_time = (!empty ($_p["ws_plugin__s2member_profile_s2member_auto_eot_time"])) ? strtotime ($_p["ws_plugin__s2member_profile_s2member_auto_eot_time"]) : "";
419
  /**/
420
+ if ($role !== $old_role) /* In this case, we need to fire Hook: `ws_plugin__s2member_during_collective_mods`. */
421
+ do_action ("ws_plugin__s2member_during_collective_mods", $user_id, get_defined_vars (), "user-role-change", "modification", $role, $user, $old_user);
422
  /**/
423
  if (isset ($_p["ws_plugin__s2member_profile_s2member_originating_blog"]) && is_multisite () && is_super_admin ())
424
  update_user_meta ($user_id, "s2member_originating_blog", $_p["ws_plugin__s2member_profile_s2member_originating_blog"]);
460
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
461
  $field_id_class = preg_replace ("/_/", "-", $field_var);
462
  /**/
463
+ if (isset ($_p["ws_plugin__s2member_profile_" . $field_var])) /* Field being set? */
464
  {
465
+ if ((is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && !empty ($_p["ws_plugin__s2member_profile_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_" . $field_var]) && strlen ($_p["ws_plugin__s2member_profile_" . $field_var])))
466
  $fields[$field_var] = $_p["ws_plugin__s2member_profile_" . $field_var];
467
  else /* Else unset. */
468
+ unset($fields[$field_var]);
469
  }
470
  else /* Else ``unset()``. */
471
+ unset($fields[$field_var]);
472
  }
473
  }
474
  /**/
480
  if ($level > 0) /* We ONLY process this if they are higher than Level #0. */
481
  {
482
  $pr_times = get_user_option ("s2member_paid_registration_times", $user_id);
483
+ $pr_times["level"] = (empty ($pr_times["level"])) ? time () : $pr_times["level"];
484
+ $pr_times["level" . $level] = (empty ($pr_times["level" . $level])) ? time () : $pr_times["level" . $level];
485
  update_user_option ($user_id, "s2member_paid_registration_times", $pr_times); /* Update now. */
486
  }
487
  /**/
488
+ if (!empty ($_p["ws_plugin__s2member_profile_opt_in"]) && !empty ($role) && $level >= 0) /* Should we process List Servers? */
489
  c_ws_plugin__s2member_list_servers::process_list_servers ($role, $level, $user->user_login, ((!empty ($_p["pass1"])) ? $_p["pass1"] : ""), $user->user_email, $user->first_name, $user->last_name, false, true, true, $user_id);
490
  /**/
491
  if (!empty ($_p["ws_plugin__s2member_profile_ip_restrictions"])) /* Delete/reset IP Restrictions? */
492
  c_ws_plugin__s2member_ip_restrictions::delete_reset_specific_ip_restrictions (strtolower ($user->user_login));
493
  /**/
494
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
495
  do_action ("ws_plugin__s2member_during_users_list_update_cols", get_defined_vars ());
496
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
497
  }
501
  {
502
  if (!empty ($_POST) && is_array ($_p = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_POST))))
503
  {
504
+ $role = /* Role is NOT changing here. */ c_ws_plugin__s2member_user_access::user_access_role ($user);
505
  $level = c_ws_plugin__s2member_user_access::user_access_role_to_level ($role);
506
  /**/
507
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"])
514
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
515
  $field_id_class = preg_replace ("/_/", "-", $field_var);
516
  /**/
517
+ if (!in_array ($field["id"], $fields_applicable) || strpos ($field["editable"], "no") === 0)
518
  {
519
+ if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || (is_string ($_existing_fields[$field_var]) && strlen ($_existing_fields[$field_var]))))
520
  $fields[$field_var] = $_existing_fields[$field_var];
521
+ else /* Else ``unset()``. */
522
+ unset($fields[$field_var]);
523
  }
524
+ else if ($field["required"] === "yes" && (!isset ($_p["ws_plugin__s2member_profile_" . $field_var]) || (!is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && !is_string ($_p["ws_plugin__s2member_profile_" . $field_var])) || (is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && empty ($_p["ws_plugin__s2member_profile_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_" . $field_var]) && !strlen ($_p["ws_plugin__s2member_profile_" . $field_var]))))
525
  {
526
+ if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || (is_string ($_existing_fields[$field_var]) && strlen ($_existing_fields[$field_var]))))
527
  $fields[$field_var] = $_existing_fields[$field_var];
528
+ else /* Else ``unset()``. */
529
+ unset($fields[$field_var]);
530
  }
531
  else if (isset ($_p["ws_plugin__s2member_profile_" . $field_var]))
532
  {
533
+ if ((is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && !empty ($_p["ws_plugin__s2member_profile_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_" . $field_var]) && strlen ($_p["ws_plugin__s2member_profile_" . $field_var])))
534
  $fields[$field_var] = $_p["ws_plugin__s2member_profile_" . $field_var];
535
+ else /* Else ``unset()``. */
536
+ unset($fields[$field_var]);
537
  }
538
  else /* Else ``unset()``. */
539
+ unset($fields[$field_var]);
540
  }
541
  /**/
542
  if (!empty ($fields))
545
  delete_user_option ($user_id, "s2member_custom_fields");
546
  }
547
  /**/
548
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
549
  do_action ("ws_plugin__s2member_during_users_list_update_cols", get_defined_vars ());
550
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
551
  }
552
  }
553
  }
554
  /**/
555
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
556
  do_action ("ws_plugin__s2member_after_users_list_update_cols", get_defined_vars ());
557
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
558
  /**/
includes/classes/utilities.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_utilities"))
21
  {
@@ -40,7 +40,7 @@ if (!class_exists ("c_ws_plugin__s2member_utilities"))
40
  {
41
  ob_start (); /* Output buffer. */
42
  /**/
43
- eval("?>" . trim ($code));
44
  /**/
45
  return ob_get_clean ();
46
  }
@@ -99,16 +99,16 @@ if (!class_exists ("c_ws_plugin__s2member_utilities"))
99
  return $checksum; /* ( i.e. version-pro version-checksum ) */
100
  }
101
  /**
102
- * String with all version details *( for WordPress® and s2Member )*.
103
  *
104
  * @package s2Member\Utilities
105
  * @since 3.5
106
  *
107
- * @return str String with `WordPress® vX.XX :: s2Member® vX.XX :: s2Member® Pro vX.XX`.
108
  */
109
  public static function ver_details ()
110
  {
111
- $details = "WordPress® v" . get_bloginfo ("version") . " :: s2Member® v" . WS_PLUGIN__S2MEMBER_VERSION;
112
  $details .= (c_ws_plugin__s2member_utils_conds::pro_is_installed ()) ? " :: s2Member® Pro v" . WS_PLUGIN__S2MEMBER_PRO_VERSION : "";
113
  /**/
114
  return $details; /* Return all details. */
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_utilities"))
21
  {
40
  {
41
  ob_start (); /* Output buffer. */
42
  /**/
43
+ eval ("?>" . trim ($code));
44
  /**/
45
  return ob_get_clean ();
46
  }
99
  return $checksum; /* ( i.e. version-pro version-checksum ) */
100
  }
101
  /**
102
+ * String with all version details *( for PHP, WordPress®, s2Member, and Pro )*.
103
  *
104
  * @package s2Member\Utilities
105
  * @since 3.5
106
  *
107
+ * @return str String with `PHP vX.XX :: WordPress® vX.XX :: s2Member® vX.XX :: s2Member® Pro vX.XX`.
108
  */
109
  public static function ver_details ()
110
  {
111
+ $details = "PHP v" . PHP_VERSION . " :: WordPress® v" . get_bloginfo ("version") . " :: s2Member® v" . WS_PLUGIN__S2MEMBER_VERSION;
112
  $details .= (c_ws_plugin__s2member_utils_conds::pro_is_installed ()) ? " :: s2Member® Pro v" . WS_PLUGIN__S2MEMBER_PRO_VERSION : "";
113
  /**/
114
  return $details; /* Return all details. */
includes/classes/utils-strings.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
21
  {
@@ -116,19 +116,20 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
116
  return is_array ($value) ? array_map ("c_ws_plugin__s2member_utils_strings::trim_deep", $value) : trim ((string)$value);
117
  }
118
  /**
119
- * Trims &quot; entities deeply.
120
  *
121
  * This is useful on Shortcode attributes mangled by a Visual Editor.
122
  *
123
  * @package s2Member\Utilities
124
- * @since 3.5
125
  *
126
  * @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values.
127
  * @return str|array Either the input string, or the input array; after all data is trimmed up.
128
  */
129
- public static function trim_quot_deep ($value = FALSE)
130
  {
131
- return is_array ($value) ? array_map ("c_ws_plugin__s2member_utils_strings::trim_quot_deep", $value) : preg_replace ("(^(&quot;)+|(&quot;)+$)", "", (string)$value);
 
132
  }
133
  /**
134
  * Trims double quotes deeply.
@@ -168,7 +169,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
168
  $r = c_ws_plugin__s2member_utils_strings::wrap_deep ($r, $beg, $end);
169
  return $value; /* Return modified array. */
170
  }
171
- return (is_string ($value) && strlen ($value)) ? (string)$beg . $value . (string)$end : (string)$value;
172
  }
173
  /**
174
  * Escapes meta characters with ``preg_quote()`` deeply.
@@ -243,6 +244,39 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
243
  return '<span style="color:#164A61;">' . $m[0] . '</span>';
244
  }
245
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
  * Base64 URL-safe encoding.
247
  *
248
  * @package s2Member\Utilities
@@ -256,7 +290,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
256
  */
257
  public static function base64_url_safe_encode ($string = FALSE, $url_unsafe_chars = array ("+", "/"), $url_safe_chars = array ("-", "_"), $trim_padding_chars = "=~.")
258
  {
259
- eval ('$string = (string)$string; $trim_padding_chars = (string)$trim_padding_chars;');
260
  /**/
261
  $base64_url_safe = str_replace ((array)$url_unsafe_chars, (array)$url_safe_chars, base64_encode ($string));
262
  $base64_url_safe = (strlen ($trim_padding_chars)) ? rtrim ($base64_url_safe, $trim_padding_chars) : $base64_url_safe;
@@ -280,7 +314,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
280
  */
281
  public static function base64_url_safe_decode ($base64_url_safe = FALSE, $url_unsafe_chars = array ("+", "/"), $url_safe_chars = array ("-", "_"), $trim_padding_chars = "=~.")
282
  {
283
- eval ('$base64_url_safe = (string)$base64_url_safe; $trim_padding_chars = (string)$trim_padding_chars;');
284
  /**/
285
  $string = (strlen ($trim_padding_chars)) ? rtrim ($base64_url_safe, $trim_padding_chars) : $base64_url_safe;
286
  $string = (strlen ($trim_padding_chars)) ? str_pad ($string, strlen ($string) % 4, "=", STR_PAD_RIGHT) : $string;
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
21
  {
116
  return is_array ($value) ? array_map ("c_ws_plugin__s2member_utils_strings::trim_deep", $value) : trim ((string)$value);
117
  }
118
  /**
119
+ * Trims all single/double quote entity variations deeply.
120
  *
121
  * This is useful on Shortcode attributes mangled by a Visual Editor.
122
  *
123
  * @package s2Member\Utilities
124
+ * @since 111011
125
  *
126
  * @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values.
127
  * @return str|array Either the input string, or the input array; after all data is trimmed up.
128
  */
129
+ public static function trim_qts_deep ($value = FALSE)
130
  {
131
+ $qts = implode ("|", array_keys /* Keys are regex patterns. */ (array ("&apos;" => "&apos;", "&#0*39;" => "&#39;", "&#[xX]0*27;" => "&#x27;"/**/, "&lsquo;" => "&lsquo;", "&#0*8216;" => "&#8216;", "&#[xX]0*2018;" => "&#x2018;"/**/, "&rsquo;" => "&rsquo;", "&#0*8217;" => "&#8217;", "&#[xX]0*2019;" => "&#x2019;"/**/, "&quot;" => "&quot;", "&#0*34;" => "&#34;", "&#[xX]0*22;" => "&#x22;"/**/, "&ldquo;" => "&ldquo;", "&#0*8220;" => "&#8220;", "&#[xX]0*201[cC];" => "&#x201C;"/**/, "&rdquo;" => "&rdquo;", "&#0*8221;" => "&#8221;", "&#[xX]0*201[dD];" => "&#x201D;")));
132
+ return is_array ($value) ? array_map ("c_ws_plugin__s2member_utils_strings::trim_qts_deep", $value) : preg_replace ("/^(?:" . $qts . ")+|(?:" . $qts . ")+$/", "", (string)$value);
133
  }
134
  /**
135
  * Trims double quotes deeply.
169
  $r = c_ws_plugin__s2member_utils_strings::wrap_deep ($r, $beg, $end);
170
  return $value; /* Return modified array. */
171
  }
172
+ return (strlen ((string)$value)) ? (string)$beg . (string)$value . (string)$end : (string)$value;
173
  }
174
  /**
175
  * Escapes meta characters with ``preg_quote()`` deeply.
244
  return '<span style="color:#164A61;">' . $m[0] . '</span>';
245
  }
246
  /**
247
+ * Parses email addresses from a string or array.
248
+ *
249
+ * @package s2Member\Utilities
250
+ * @since 111009
251
+ *
252
+ * @param str|array $value Input string or an array is also fine.
253
+ * @return array Array of parsed email addresses.
254
+ */
255
+ public static function parse_emails ($value = FALSE)
256
+ {
257
+ if (is_array ($value)) /* Handles all types of arrays.
258
+ Note, we do NOT use ``array_map()`` here, because multiple args to ``array_map()`` causes a loss of string keys.
259
+ For further details, see: <http://php.net/manual/en/function.array-map.php>. */
260
+ {
261
+ $emails = array (); /* Initialize array of emails. */
262
+ foreach ($value as $_value) /* Loop through array. */
263
+ $emails = array_merge ($emails, c_ws_plugin__s2member_utils_strings::parse_emails ($_value));
264
+ return $emails; /* Return array of parsed email addresses. */
265
+ }
266
+ /**/
267
+ $delimiter = (strpos ((string)$value, ";") !== false) ? ";" : ",";
268
+ foreach (($sections = c_ws_plugin__s2member_utils_strings::trim_deep (preg_split ("/" . preg_quote ($delimiter, "/") . "+/", (string)$value))) as $section)
269
+ {
270
+ if (preg_match ("/\<(.+?)\>/", $section, $m) && strpos ($m[1], "@") !== false)
271
+ $emails[] = $m[1]; /* Email inside brackets. */
272
+ /**/
273
+ else if (strpos ($section, "@") !== false)
274
+ $emails[] = $section;
275
+ }
276
+ /**/
277
+ return (!empty ($emails)) ? $emails : array ();
278
+ }
279
+ /**
280
  * Base64 URL-safe encoding.
281
  *
282
  * @package s2Member\Utilities
290
  */
291
  public static function base64_url_safe_encode ($string = FALSE, $url_unsafe_chars = array ("+", "/"), $url_safe_chars = array ("-", "_"), $trim_padding_chars = "=~.")
292
  {
293
+ eval('$string = (string)$string; $trim_padding_chars = (string)$trim_padding_chars;');
294
  /**/
295
  $base64_url_safe = str_replace ((array)$url_unsafe_chars, (array)$url_safe_chars, base64_encode ($string));
296
  $base64_url_safe = (strlen ($trim_padding_chars)) ? rtrim ($base64_url_safe, $trim_padding_chars) : $base64_url_safe;
314
  */
315
  public static function base64_url_safe_decode ($base64_url_safe = FALSE, $url_unsafe_chars = array ("+", "/"), $url_safe_chars = array ("-", "_"), $trim_padding_chars = "=~.")
316
  {
317
+ eval('$base64_url_safe = (string)$base64_url_safe; $trim_padding_chars = (string)$trim_padding_chars;');
318
  /**/
319
  $string = (strlen ($trim_padding_chars)) ? rtrim ($base64_url_safe, $trim_padding_chars) : $base64_url_safe;
320
  $string = (strlen ($trim_padding_chars)) ? str_pad ($string, strlen ($string) % 4, "=", STR_PAD_RIGHT) : $string;
includes/classes/utils-urls.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_utils_urls"))
21
  {
@@ -45,13 +45,24 @@ if (!class_exists ("c_ws_plugin__s2member_utils_urls"))
45
  * @package s2Member\Utilities
46
  * @since 3.5
47
  *
48
- * @param str $redirect_to Optional. Force a specific redirection after registration.
49
  * @return str Location of `/wp-login.php?action=register`.
50
  */
51
- public static function wp_register_url ($redirect_to = FALSE)
52
  {
53
- return apply_filters ("wp_register_location", /* « NOT a core Filter; we're anticipating. */
54
- add_query_arg ("action", urlencode ("register"), wp_login_url ($redirect_to)), get_defined_vars ());
 
 
 
 
 
 
 
 
 
 
 
 
55
  }
56
  /**
57
  * Filters content redirection status *( uses 302s for browsers )*.
@@ -181,7 +192,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_urls"))
181
  return $response; /* Return response. */
182
  }
183
  /**
184
- * Shortens a long URL through tinyURL, or through another backup API used by this routine.
185
  *
186
  * @package s2Member\Utilities
187
  * @since 111002
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_utils_urls"))
21
  {
45
  * @package s2Member\Utilities
46
  * @since 3.5
47
  *
 
48
  * @return str Location of `/wp-login.php?action=register`.
49
  */
50
+ public static function wp_register_url () /* With Filters. */
51
  {
52
+ return apply_filters ("wp_register_location", add_query_arg ("action", urlencode ("register"), wp_login_url ()), get_defined_vars ());
53
+ }
54
+ /**
55
+ * Builds a BuddyPress registration URL to `/register`.
56
+ *
57
+ * @package s2Member\Utilities
58
+ * @since 111009
59
+ *
60
+ * @return str Location of `/register`.
61
+ */
62
+ public static function bp_register_url () /* Only if BuddyPress is installed. */
63
+ {
64
+ if (c_ws_plugin__s2member_utils_conds::bp_is_installed ()) /* Only if BuddyPress is installed. */
65
+ return site_url (((function_exists ("bp_get_signup_slug")) ? bp_get_signup_slug () . "/" : BP_REGISTER_SLUG . "/"));
66
  }
67
  /**
68
  * Filters content redirection status *( uses 302s for browsers )*.
192
  return $response; /* Return response. */
193
  }
194
  /**
195
+ * Shortens a long URL, based on s2Member configuration.
196
  *
197
  * @package s2Member\Utilities
198
  * @since 111002
includes/classes/utils-users.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_utils_users"))
21
  {
@@ -44,8 +44,8 @@ if (!class_exists ("c_ws_plugin__s2member_utils_users"))
44
  /**/
45
  $users = (int)mysql_result ($q2, 0);
46
  /**/
47
- mysql_free_result($q2);
48
- mysql_free_result($q1);
49
  /**/
50
  return $users;
51
  }
@@ -284,7 +284,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_users"))
284
  * @package s2Member\Utilities
285
  * @since 3.5
286
  *
287
- * @param str $field_id Required. A unique Custom Registration Field ID, that you configured with s2Member.
288
  * Or, this could be set to any property that exists on the WP_User object for a particular User;
289
  * ( i.e. `id`, `ID`, `user_login`, `user_email`, `first_name`, `last_name`, `display_name`, `ip`, `IP`,
290
  * `s2member_registration_ip`, `s2member_custom`, `s2member_subscr_id`, `s2member_subscr_or_wp_id`,
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_utils_users"))
21
  {
44
  /**/
45
  $users = (int)mysql_result ($q2, 0);
46
  /**/
47
+ mysql_free_result ($q2);
48
+ mysql_free_result ($q1);
49
  /**/
50
  return $users;
51
  }
284
  * @package s2Member\Utilities
285
  * @since 3.5
286
  *
287
+ * @param str $field_id Required. A unique Custom Registration/Profile Field ID, that you configured with s2Member.
288
  * Or, this could be set to any property that exists on the WP_User object for a particular User;
289
  * ( i.e. `id`, `ID`, `user_login`, `user_email`, `first_name`, `last_name`, `display_name`, `ip`, `IP`,
290
  * `s2member_registration_ip`, `s2member_custom`, `s2member_subscr_id`, `s2member_subscr_or_wp_id`,
includes/functions/api-functions.inc.php CHANGED
@@ -2060,7 +2060,7 @@ if (!function_exists ("s2member_paid_registration_time"))
2060
  *
2061
  * It can be used to retrieve basic information like `first_name`, `last_name`, `user_email`, `user_login`.
2062
  * It can also be used to retrieve User Meta/Options, Role/Capabilities, and even supports
2063
- * Custom Registration Fields configured with s2Member and many other plugins.
2064
  *
2065
  * ———— Here Are A Few Examples ————
2066
  * ```
@@ -2090,7 +2090,7 @@ if (!function_exists ("s2member_paid_registration_time"))
2090
  * $s2member_subscr_or_wp_id = get_user_field ("s2member_subscr_or_wp_id"); # Paid Subscr. ID, else WordPress® User ID.
2091
  * $s2member_subscr_gateway = get_user_field ("s2member_subscr_gateway"); # Paid Subscr. Gateway Code for the current User.
2092
  * $s2member_registration_ip = get_user_field ("s2member_registration_ip"); # IP the current User had during registration.
2093
- * $s2member_custom_fields = get_user_field ("s2member_custom_fields"); # Associative array of all Custom Registration Fields.
2094
  * $s2member_file_download_access_log = get_user_field ("s2member_file_download_access_log"); # Associative array of all File Downloads by the current User.
2095
  * $s2member_auto_eot_time = get_user_field ("s2member_auto_eot_time"); # Auto EOT-Time for the current User ( when applicable ).
2096
  * $s2member_last_payment_time = get_user_field ("s2member_last_payment_time"); # Timestamp. Last time an actual payment was received by s2Member.
@@ -2171,7 +2171,7 @@ if (!function_exists ("s2member_paid_registration_time"))
2171
  * $s2member_subscr_id = get_user_option ("s2member_subscr_id"); # Paid Subscr. ID for the current User.
2172
  * $s2member_subscr_gateway = get_user_option ("s2member_subscr_gateway"); # Paid Subscr. Gateway Code for the current User.
2173
  * $s2member_registration_ip = get_user_option ("s2member_registration_ip"); # IP the current User had during registration.
2174
- * $s2member_custom_fields = get_user_option ("s2member_custom_fields"); # Associative array of all Custom Registration Fields.
2175
  * $s2member_file_download_access_log = get_user_option ("s2member_file_download_access_log"); # Associative array of all File Downloads by the current User.
2176
  * $s2member_auto_eot_time = get_user_option ("s2member_auto_eot_time"); # Auto EOT-Time for the current User ( when applicable ).
2177
  * $s2member_last_payment_time = get_user_option ("s2member_last_payment_time"); # Timestamp. Last time an actual payment was received by s2Member.
@@ -2191,7 +2191,7 @@ if (!function_exists ("s2member_paid_registration_time"))
2191
  * @package s2Member\API_Functions
2192
  * @since 3.5
2193
  *
2194
- * @param str $field_id Required. A unique Custom Registration Field ID, that you configured with s2Member.
2195
  * Or, this could be set to any property that exists on the WP_User object for a particular User;
2196
  * ( i.e. `id`, `ID`, `user_login`, `user_email`, `first_name`, `last_name`, `display_name`, `ip`, `IP`,
2197
  * `s2member_registration_ip`, `s2member_custom`, `s2member_subscr_id`, `s2member_subscr_or_wp_id`,
@@ -2218,7 +2218,7 @@ if (!function_exists ("get_user_field"))
2218
  }
2219
  }
2220
  /**
2221
- * Custom Registration Field configuration.
2222
  *
2223
  * Provides information about the configuration of each Custom Registration/Profile Field.
2224
  * Returns an associative array with all Custom Field configurations *( and User values too, if ``$user_id`` is passed in )*.
@@ -2278,14 +2278,14 @@ if (!function_exists ("get_s2member_custom_fields"))
2278
  *
2279
  * ———— PHP Code Sample ————
2280
  * ```
2281
- * <!php echo S2MEMBER_VALUE_FOR_PP_INV(); !>
2282
  * ```
2283
  * ———— Shortcode & JavaScript Equivalents ————
2284
  * ```
2285
  * [s2Get constant="S2MEMBER_VALUE_FOR_PP_INV" /]
2286
  *
2287
  * <script type="text/javascript">
2288
- * document.write(S2MEMBER_VALUE_FOR_PP_INV_GEN());
2289
  * </script>
2290
  * ```
2291
  *
@@ -2298,11 +2298,42 @@ if (!function_exists ("get_s2member_custom_fields"))
2298
  *
2299
  * @todo Create a true Shortcode equivalent function.
2300
  */
2301
- if (!function_exists ("S2MEMBER_VALUE_FOR_PP_INV"))
2302
  {
2303
- function S2MEMBER_VALUE_FOR_PP_INV ()
2304
  {
2305
  return uniqid () . "~" . $_SERVER["REMOTE_ADDR"];
2306
  }
2307
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2308
  ?>
2060
  *
2061
  * It can be used to retrieve basic information like `first_name`, `last_name`, `user_email`, `user_login`.
2062
  * It can also be used to retrieve User Meta/Options, Role/Capabilities, and even supports
2063
+ * Custom Registration/Profile Fields configured with s2Member and many other plugins.
2064
  *
2065
  * ———— Here Are A Few Examples ————
2066
  * ```
2090
  * $s2member_subscr_or_wp_id = get_user_field ("s2member_subscr_or_wp_id"); # Paid Subscr. ID, else WordPress® User ID.
2091
  * $s2member_subscr_gateway = get_user_field ("s2member_subscr_gateway"); # Paid Subscr. Gateway Code for the current User.
2092
  * $s2member_registration_ip = get_user_field ("s2member_registration_ip"); # IP the current User had during registration.
2093
+ * $s2member_custom_fields = get_user_field ("s2member_custom_fields"); # Associative array of all Custom Registration/Profile Fields.
2094
  * $s2member_file_download_access_log = get_user_field ("s2member_file_download_access_log"); # Associative array of all File Downloads by the current User.
2095
  * $s2member_auto_eot_time = get_user_field ("s2member_auto_eot_time"); # Auto EOT-Time for the current User ( when applicable ).
2096
  * $s2member_last_payment_time = get_user_field ("s2member_last_payment_time"); # Timestamp. Last time an actual payment was received by s2Member.
2171
  * $s2member_subscr_id = get_user_option ("s2member_subscr_id"); # Paid Subscr. ID for the current User.
2172
  * $s2member_subscr_gateway = get_user_option ("s2member_subscr_gateway"); # Paid Subscr. Gateway Code for the current User.
2173
  * $s2member_registration_ip = get_user_option ("s2member_registration_ip"); # IP the current User had during registration.
2174
+ * $s2member_custom_fields = get_user_option ("s2member_custom_fields"); # Associative array of all Custom Registration/Profile Fields.
2175
  * $s2member_file_download_access_log = get_user_option ("s2member_file_download_access_log"); # Associative array of all File Downloads by the current User.
2176
  * $s2member_auto_eot_time = get_user_option ("s2member_auto_eot_time"); # Auto EOT-Time for the current User ( when applicable ).
2177
  * $s2member_last_payment_time = get_user_option ("s2member_last_payment_time"); # Timestamp. Last time an actual payment was received by s2Member.
2191
  * @package s2Member\API_Functions
2192
  * @since 3.5
2193
  *
2194
+ * @param str $field_id Required. A unique Custom Registration/Profile Field ID, that you configured with s2Member.
2195
  * Or, this could be set to any property that exists on the WP_User object for a particular User;
2196
  * ( i.e. `id`, `ID`, `user_login`, `user_email`, `first_name`, `last_name`, `display_name`, `ip`, `IP`,
2197
  * `s2member_registration_ip`, `s2member_custom`, `s2member_subscr_id`, `s2member_subscr_or_wp_id`,
2218
  }
2219
  }
2220
  /**
2221
+ * Custom Registration/Profile Field configuration.
2222
  *
2223
  * Provides information about the configuration of each Custom Registration/Profile Field.
2224
  * Returns an associative array with all Custom Field configurations *( and User values too, if ``$user_id`` is passed in )*.
2278
  *
2279
  * ———— PHP Code Sample ————
2280
  * ```
2281
+ * <!php echo s2member_value_for_pp_inv(); !>
2282
  * ```
2283
  * ———— Shortcode & JavaScript Equivalents ————
2284
  * ```
2285
  * [s2Get constant="S2MEMBER_VALUE_FOR_PP_INV" /]
2286
  *
2287
  * <script type="text/javascript">
2288
+ * document.write(s2member_value_for_pp_inv_gen());
2289
  * </script>
2290
  * ```
2291
  *
2298
  *
2299
  * @todo Create a true Shortcode equivalent function.
2300
  */
2301
+ if (!function_exists ("s2member_value_for_pp_inv"))
2302
  {
2303
+ function s2member_value_for_pp_inv ()
2304
  {
2305
  return uniqid () . "~" . $_SERVER["REMOTE_ADDR"];
2306
  }
2307
  }
2308
+ /**
2309
+ * Shortens a long URL, based on s2Member configuration.
2310
+ *
2311
+ * ———— PHP Code Samples ————
2312
+ * ```
2313
+ * <!php echo s2member_shorten_url("http://www.example.com/a-long-url/"); !>
2314
+ * <!php echo s2member_shorten_url("http://www.example.com/a-long-url/", "tiny_url"); !>
2315
+ * <!php echo s2member_shorten_url("http://www.example.com/a-long-url/", "goo_gl"); !>
2316
+ * ```
2317
+ * ———— Shortcode Equivalent ————
2318
+ * ```
2319
+ * There is NO Shortcode equivalent for this ( yet ).
2320
+ * ```
2321
+ *
2322
+ * @package s2Member\API_Functions
2323
+ * @since 111004
2324
+ *
2325
+ * @param str $url A full/long URL to be shortened.
2326
+ * @param str $api_sp Optional. A specific URL shortening API to use. Defaults to that which is configured in the s2Member Dashboard. Normally `tiny_url` by default.
2327
+ * @param bool $try_backups Defaults to true. If a failure occurs with the first API, we'll try others until we have success.
2328
+ * @return str|bool The shortened URL on success, else false on failure.
2329
+ *
2330
+ * @todo Create a Shortcode equivalent for this function.
2331
+ */
2332
+ if (!function_exists ("s2member_shorten_url"))
2333
+ {
2334
+ function s2member_shorten_url ($url = FALSE, $api_sp = FALSE, $try_backups = TRUE)
2335
+ {
2336
+ return c_ws_plugin__s2member_utils_urls::shorten ($url, $api_sp, $try_backups);
2337
+ }
2338
+ }
2339
  ?>
includes/hooks.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.0
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /*
20
  Add the plugin Actions/Filters here.
21
  */
15
  * @since 3.0
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /*
20
  Add the plugin Actions/Filters here.
21
  */
includes/menu-pages/api-ops.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.0
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
21
  {
@@ -182,12 +182,12 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
182
  echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID generated during registration.</li>' . "\n";
183
  echo '</ul>' . "\n";
184
  /**/
185
- echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
186
  echo '<ul>' . "\n";
187
- echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration Field with the ID <code>date_of_birth</code>.</li>' . "\n";
188
- echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration Field with the ID <code>street_address</code>.</li>' . "\n";
189
- echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
190
- echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
191
  echo '</ul>' . "\n";
192
  /**/
193
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
@@ -287,12 +287,12 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
287
  echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
288
  echo '</ul>' . "\n";
289
  /**/
290
- echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
291
  echo '<ul>' . "\n";
292
- echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration Field with the ID <code>date_of_birth</code>.</li>' . "\n";
293
- echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration Field with the ID <code>street_address</code>.</li>' . "\n";
294
- echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
295
- echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
296
  echo '</ul>' . "\n";
297
  /**/
298
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
@@ -395,12 +395,12 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
395
  echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
396
  echo '</ul>' . "\n";
397
  /**/
398
- echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
399
  echo '<ul>' . "\n";
400
- echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration Field with the ID <code>date_of_birth</code>.</li>' . "\n";
401
- echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration Field with the ID <code>street_address</code>.</li>' . "\n";
402
- echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
403
- echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
404
  echo '</ul>' . "\n";
405
  /**/
406
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
@@ -493,12 +493,12 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
493
  echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
494
  echo '</ul>' . "\n";
495
  /**/
496
- echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
497
  echo '<ul>' . "\n";
498
- echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration Field with the ID <code>date_of_birth</code>.</li>' . "\n";
499
- echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration Field with the ID <code>street_address</code>.</li>' . "\n";
500
- echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
501
- echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
502
  echo '</ul>' . "\n";
503
  /**/
504
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
@@ -593,12 +593,12 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
593
  echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
594
  echo '</ul>' . "\n";
595
  /**/
596
- echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
597
  echo '<ul>' . "\n";
598
- echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration Field with the ID <code>date_of_birth</code>.</li>' . "\n";
599
- echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration Field with the ID <code>street_address</code>.</li>' . "\n";
600
- echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
601
- echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
602
  echo '</ul>' . "\n";
603
  /**/
604
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
@@ -694,12 +694,12 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
694
  echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
695
  echo '</ul>' . "\n";
696
  /**/
697
- echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
698
  echo '<ul>' . "\n";
699
- echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration Field with the ID <code>date_of_birth</code>.</li>' . "\n";
700
- echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration Field with the ID <code>street_address</code>.</li>' . "\n";
701
- echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
702
- echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
703
  echo '</ul>' . "\n";
704
  /**/
705
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
15
  * @since 3.0
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
21
  {
182
  echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID generated during registration.</li>' . "\n";
183
  echo '</ul>' . "\n";
184
  /**/
185
+ echo '<strong>Custom Registration/Profile Fields are also supported in this Notification:</strong>' . "\n";
186
  echo '<ul>' . "\n";
187
+ echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
188
+ echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
189
+ echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
190
+ echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Registration/Profile Fields</em>.</li>' . "\n";
191
  echo '</ul>' . "\n";
192
  /**/
193
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
287
  echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
288
  echo '</ul>' . "\n";
289
  /**/
290
+ echo '<strong>Custom Registration/Profile Fields are also supported in this Notification:</strong>' . "\n";
291
  echo '<ul>' . "\n";
292
+ echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
293
+ echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
294
+ echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
295
+ echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Registration/Profile Fields</em>.</li>' . "\n";
296
  echo '</ul>' . "\n";
297
  /**/
298
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
395
  echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
396
  echo '</ul>' . "\n";
397
  /**/
398
+ echo '<strong>Custom Registration/Profile Fields are also supported in this Notification:</strong>' . "\n";
399
  echo '<ul>' . "\n";
400
+ echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
401
+ echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
402
+ echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
403
+ echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Registration/Profile Fields</em>.</li>' . "\n";
404
  echo '</ul>' . "\n";
405
  /**/
406
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
493
  echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
494
  echo '</ul>' . "\n";
495
  /**/
496
+ echo '<strong>Custom Registration/Profile Fields are also supported in this Notification:</strong>' . "\n";
497
  echo '<ul>' . "\n";
498
+ echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
499
+ echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
500
+ echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
501
+ echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Registration/Profile Fields</em>.</li>' . "\n";
502
  echo '</ul>' . "\n";
503
  /**/
504
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
593
  echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
594
  echo '</ul>' . "\n";
595
  /**/
596
+ echo '<strong>Custom Registration/Profile Fields are also supported in this Notification:</strong>' . "\n";
597
  echo '<ul>' . "\n";
598
+ echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
599
+ echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
600
+ echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
601
+ echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Registration/Profile Fields</em>.</li>' . "\n";
602
  echo '</ul>' . "\n";
603
  /**/
604
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
694
  echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
695
  echo '</ul>' . "\n";
696
  /**/
697
+ echo '<strong>Custom Registration/Profile Fields are also supported in this Notification:</strong>' . "\n";
698
  echo '<ul>' . "\n";
699
+ echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
700
+ echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
701
+ echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
702
+ echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Registration/Profile Fields</em>.</li>' . "\n";
703
  echo '</ul>' . "\n";
704
  /**/
705
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
includes/menu-pages/down-ops.inc.php CHANGED
@@ -89,12 +89,13 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
89
  /**/
90
  echo '<td>' . "\n";
91
  echo '<input type="text" name="ws_plugin__s2member_level' . $n . '_file_downloads_allowed" id="ws-plugin--s2member-level' . $n . '-file-downloads-allowed" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed"]) . '" style="width:200px;" maxlength="9" /> every <input type="text" name="ws_plugin__s2member_level' . $n . '_file_downloads_allowed_days" id="ws-plugin--s2member-level' . $n . '-file-downloads-allowed-days" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed_days"]) . '" style="width:200px;" maxlength="3" onkeyup="if(this.value > 365){ alert(\'( 365 days is the maximum ).\\nThis keeps the logs optimized.\'); this.value = 365; }" /> day(s).<br />' . "\n";
92
- echo 'Only this many unique downloads ( <code><em>999999999 = unlimited</em></code> ) will be permitted every X day(s).' . "\n";
 
93
  echo '</td>' . "\n";
94
  /**/
95
  echo '</tr>' . "\n";
96
  /**/
97
- echo ($n < $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]) ? '<tr><td><div class="ws-menu-page-hr"></div></td></tr>' : '';
98
  }
99
  /**/
100
  echo '</tbody>' . "\n";
@@ -110,7 +111,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
110
  {
111
  do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_before_limit_exceeded_page", get_defined_vars ());
112
  /**/
113
- echo '<div class="ws-menu-page-group" title="Download Limit Exceeded">' . "\n";
114
  /**/
115
  echo '<div class="ws-menu-page-section ws-plugin--s2member-limit-exceeded-page-section">' . "\n";
116
  echo '<h3>Download Limit Exceeded Page ( required, if providing access to protected files )</h3>' . "\n";
89
  /**/
90
  echo '<td>' . "\n";
91
  echo '<input type="text" name="ws_plugin__s2member_level' . $n . '_file_downloads_allowed" id="ws-plugin--s2member-level' . $n . '-file-downloads-allowed" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed"]) . '" style="width:200px;" maxlength="9" /> every <input type="text" name="ws_plugin__s2member_level' . $n . '_file_downloads_allowed_days" id="ws-plugin--s2member-level' . $n . '-file-downloads-allowed-days" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed_days"]) . '" style="width:200px;" maxlength="3" onkeyup="if(this.value > 365){ alert(\'( 365 days is the maximum ).\\nThis keeps the logs optimized.\'); this.value = 365; }" /> day(s).<br />' . "\n";
92
+ echo 'Only this many unique downloads will be permitted every X day(s), at ' . (($n === $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]) ? 'highest Level #' . $n : 'Level #' . $n . ' or higher') . '.<br />' . "\n";
93
+ echo '<em>* To allow UNLIMITED downloads, use: <code>999999999</code> ( i.e. <code>999999999</code> = unlimited ).</em>' . "\n";
94
  echo '</td>' . "\n";
95
  /**/
96
  echo '</tr>' . "\n";
97
  /**/
98
+ echo ($n < $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]) ? '<tr><td><div class="ws-menu-page-hr" style="margin:10px 0 10px 0;"></div></td></tr>' : '';
99
  }
100
  /**/
101
  echo '</tbody>' . "\n";
111
  {
112
  do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_before_limit_exceeded_page", get_defined_vars ());
113
  /**/
114
+ echo '<div class="ws-menu-page-group" title="Download Limit Exceeded Page">' . "\n";
115
  /**/
116
  echo '<div class="ws-menu-page-section ws-plugin--s2member-limit-exceeded-page-section">' . "\n";
117
  echo '<h3>Download Limit Exceeded Page ( required, if providing access to protected files )</h3>' . "\n";
includes/menu-pages/els-ops.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.0
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_menu_page_els_ops"))
21
  {
@@ -48,7 +48,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_els_ops"))
48
  {
49
  do_action ("ws_plugin__s2member_during_els_ops_page_during_left_sections_before_mailchimp", get_defined_vars ());
50
  /**/
51
- echo '<div class="ws-menu-page-group" title="MailChimp® List Server Integration">' . "\n";
52
  /**/
53
  echo '<div class="ws-menu-page-section ws-plugin--s2member-mailchimp-section">' . "\n";
54
  echo '<a href="http://www.mailchimp.com/signup/?aid=8f347da54d66b5298d13237d9&afl=1" target="_blank"><img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/mailchimp-stamp.png" class="ws-menu-page-right" style="width:125px; height:125px; border:0;" alt="." /></a>' . "\n";
@@ -113,13 +113,14 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_els_ops"))
113
  {
114
  do_action ("ws_plugin__s2member_during_els_ops_page_during_left_sections_before_aweber", get_defined_vars ());
115
  /**/
116
- echo '<div class="ws-menu-page-group" title="AWeber® List Server Integration">' . "\n";
117
  /**/
118
  echo '<div class="ws-menu-page-section ws-plugin--s2member-aweber-section">' . "\n";
119
  echo '<a href="http://aweber.com/?348037" target="_blank"><img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/aweber-logo.png" class="ws-menu-page-right" style="width:125px; height:125px; border:0;" alt="." /></a>' . "\n";
120
  echo '<h3>AWeber® List Server Integration ( optional )</h3>' . "\n";
121
  echo '<p>s2Member can be integrated with AWeber®. AWeber® is an email marketing service. Whether you\'re looking to get your first email campaign off the ground, or you\'re a seasoned veteran who wants to dig into advanced tools like detailed email web analytics, activity based segmentation, geo-targeting and broadcast split-testing, AWeber\'s got just what you need to make email marketing work for you.</p>' . "\n";
122
- echo '<p>You can have your Members automatically subscribed to your AWeber® marketing lists ( e.g. newsletters / auto-responders ). You\'ll need an <a href="http://aweber.com/?348037" target="_blank" rel="external">AWeber® account</a> and your <a href="#" onclick="alert(\'To obtain your AWeber® List ID(s), log into your AWeber® account. Click on the Lists tab. On that page you\\\'ll find a Unique List ID associated with each of your lists. AWeber® sometimes refers to this as a List Name instead of a List ID.\'); return false;">AWeber® List IDs</a>. You will ALSO need to configure a Custom Email Parser inside your AWeber® account. Log into AWeber®, and go to <em>My Lists -> Email Parser</em>. Choose the PayPal® Parser ( even if you\'re not using PayPal® as your Payment Gateway ). You can safely ignore the additional instructions they provide. s2Member just needs the PayPal® box checked, and that\'s all. At some point, we\'ll get in contact with AWeber® about integrating a Custom Parser that is specifically designed for s2Member. Until then, you can just use the PayPal® Parser that is already available in your AWeber® account.</p>' . "\n";
 
123
  do_action ("ws_plugin__s2member_during_els_ops_page_during_left_sections_during_aweber", get_defined_vars ());
124
  /**/
125
  echo '<table class="form-table">' . "\n";
@@ -224,8 +225,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_els_ops"))
224
  /**/
225
  echo '<div class="ws-menu-page-section ws-plugin--s2member-opt-out-section">' . "\n";
226
  echo '<h3>Automate Un-Subscribe/Opt-Out Removals ( optional )</h3>' . "\n";
227
- echo '<p>s2Member can automatically ( and silently ) remove Users from the List Servers you\'ve configured above. s2Member is also capable of automating this, based on your own personal configuration preferences. Below, you can choose which Events you consider grounds for List Removal. It is also important to point out that s2Member will ONLY remove Users from the Lists you\'ve configured at the Level the Member is/was at during the time of the Event. For example, if a Level #1 Member is deleted, they will ONLY be removed from the List(s) you\'ve configured at Level #1. If an account is upgraded from Level #1 to Level #2, they will ONLY be removed from the List(s) you\'ve configured at Level #1. Of course, all of this is based on the configuration below.</p>' . "\n";
228
- echo '<p><em><strong>*Regarding AWeber®*</strong> these will NOT work for AWeber® until you <a href="http://www.aweber.com/faq/questions/62/Can+I+Unsubscribe+People+Via+Email%3F" target="_blank" rel="external">add a Notification Email</a> to your AWeber® account matching the "EMail From Address" configured in <code>s2Member -> General Options -> EMail Configuration</code>. Which is currently set to: <code>' . esc_html ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"]) . '</code>. This is a required step if you want s2Member to be authenticated properly when it automatically emails List Removal requests to AWeber®.</em></p>' . "\n";
229
  do_action ("ws_plugin__s2member_during_els_ops_page_during_left_sections_during_opt_out", get_defined_vars ());
230
  /**/
231
  echo '<table class="form-table">' . "\n";
@@ -263,11 +264,13 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_els_ops"))
263
  /**/
264
  echo '<td>' . "\n";
265
  echo '<select name="ws_plugin__s2member_custom_reg_auto_opt_out_transitions" id="ws-plugin--s2member-custom-reg-auto-opt-out-transitions">' . "\n";
266
- echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_out_transitions"]) ? ' selected="selected"' : '') . '>No ( do NOT transition mailing list Subscribers automatically )</option>' . "\n";
267
- echo '<option value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_out_transitions"]) ? ' selected="selected"' : '') . '>Yes ( automatically transition mailing list Subscribers )</option>' . "\n";
 
268
  echo '</select><br />' . "\n";
269
  echo '<em><strong>*Transitions*</strong> When/if s2Member automatically removes a Member from Lists at their current Level# ( based on your configuration in the previous section ), this setting tells s2Member that it should <strong>also</strong> transition the Member to any Lists you\'ve configured at the new Access Level# ( i.e. Role ) they are being changed to. For example, if a Member is demoted from Level #1 to Level #0, do you want s2Member to add them to the Level #0 List(s) after it removes them from the Level #1 List(s)?</em><br /><br />' . "\n";
270
- echo '<em><strong>*Seamless with MailChimp®*</strong> If enabled, Automatic List Transitions work seamlessly with MailChimp®. Automatic List Transitions also work with AWeber®, but AWeber® will send the Member a new confirmation email, asking them to confirm changes to their mailing list subscription with you. Work is underway to improve this aspect of s2Member\'s integration with AWeber® in a future release. Ideally, a Customer would be transitioned silently behind the scene with AWeber® too.</em>' . "\n";
 
271
  echo '</td>' . "\n";
272
  /**/
273
  echo '</tr>' . "\n";
15
  * @since 3.0
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_menu_page_els_ops"))
21
  {
48
  {
49
  do_action ("ws_plugin__s2member_during_els_ops_page_during_left_sections_before_mailchimp", get_defined_vars ());
50
  /**/
51
+ echo '<div class="ws-menu-page-group" title="MailChimp® Integration">' . "\n";
52
  /**/
53
  echo '<div class="ws-menu-page-section ws-plugin--s2member-mailchimp-section">' . "\n";
54
  echo '<a href="http://www.mailchimp.com/signup/?aid=8f347da54d66b5298d13237d9&afl=1" target="_blank"><img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/mailchimp-stamp.png" class="ws-menu-page-right" style="width:125px; height:125px; border:0;" alt="." /></a>' . "\n";
113
  {
114
  do_action ("ws_plugin__s2member_during_els_ops_page_during_left_sections_before_aweber", get_defined_vars ());
115
  /**/
116
+ echo '<div class="ws-menu-page-group" title="AWeber® Integration">' . "\n";
117
  /**/
118
  echo '<div class="ws-menu-page-section ws-plugin--s2member-aweber-section">' . "\n";
119
  echo '<a href="http://aweber.com/?348037" target="_blank"><img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/aweber-logo.png" class="ws-menu-page-right" style="width:125px; height:125px; border:0;" alt="." /></a>' . "\n";
120
  echo '<h3>AWeber® List Server Integration ( optional )</h3>' . "\n";
121
  echo '<p>s2Member can be integrated with AWeber®. AWeber® is an email marketing service. Whether you\'re looking to get your first email campaign off the ground, or you\'re a seasoned veteran who wants to dig into advanced tools like detailed email web analytics, activity based segmentation, geo-targeting and broadcast split-testing, AWeber\'s got just what you need to make email marketing work for you.</p>' . "\n";
122
+ echo '<p>You can have your Members automatically subscribed to your AWeber® marketing lists <em>( e.g. newsletters / auto-responders )</em>. You\'ll need an <a href="http://aweber.com/?348037" target="_blank" rel="external">AWeber® account</a> and your <a href="#" onclick="alert(\'To obtain your AWeber® List ID(s), log into your AWeber® account. Click on the Lists tab. On that page you\\\'ll find a Unique List ID associated with each of your lists. AWeber® sometimes refers to this as a List Name instead of a List ID.\'); return false;">AWeber® List IDs</a>. You will ALSO need to configure a <a href="http://www.primothemes.com/forums/viewtopic.php?f=36&t=15496" target="_blank" rel="external">Custom Email Parser</a> inside your AWeber® account.</p>' . "\n";
123
+ echo '<p>Log into AWeber®, and go to <em>My Lists -> Email Parser</em>. If you like, choose the PayPal® Parser <em>( even if you\'re not using PayPal® as your Payment Gateway )</em>. You can safely ignore the additional instructions they provide. s2Member just needs the PayPal® box checked, and that\'s all. Or, even better, integrate <a href="http://www.primothemes.com/forums/viewtopic.php?f=36&t=15496" target="_blank" rel="external">s2Member\'s Custom Email Parser</a> for AWeber, which <strong>will improve reliability</strong> and flexibility.</p>' . "\n";
124
  do_action ("ws_plugin__s2member_during_els_ops_page_during_left_sections_during_aweber", get_defined_vars ());
125
  /**/
126
  echo '<table class="form-table">' . "\n";
225
  /**/
226
  echo '<div class="ws-menu-page-section ws-plugin--s2member-opt-out-section">' . "\n";
227
  echo '<h3>Automate Un-Subscribe/Opt-Out Removals ( optional )</h3>' . "\n";
228
+ echo '<p>s2Member can automatically <em>( and silently )</em> remove Users/Members from the List Servers you\'ve configured above. s2Member is also capable of automating this, based on your own personal configuration preferences. Below, you can choose which Events you consider grounds for List Removal. It is also important to point out that s2Member will ONLY remove Users/Members from the Lists you\'ve configured at the Level the User/Member is or was at during the time of the Event. For example, if a Level #1 Member is deleted, they will ONLY be removed from the List(s) you\'ve configured at Level #1. If an account is upgraded from Level #1 to Level #2, they will ONLY be removed from the List(s) you\'ve configured at Level #1. Of course, all of this is based on the configuration below.</p>' . "\n";
229
+ echo '<p><em><strong>*Regarding AWeber®*</strong> these will NOT work for AWeber® until you <a href="http://www.aweber.com/faq/questions/62/Can+I+Unsubscribe+People+Via+Email%3F" target="_blank" rel="external">add a Notification Email</a> to your AWeber® account matching the "EMail From Address" configured in <code>s2Member -> General Options -> EMail Configuration</code>. Which is currently set to: <code>' . esc_html ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"]) . '</code>. This is a required step if you want s2Member to be authenticated when it emails List Removal requests to AWeber®.</em></p>' . "\n";
230
  do_action ("ws_plugin__s2member_during_els_ops_page_during_left_sections_during_opt_out", get_defined_vars ());
231
  /**/
232
  echo '<table class="form-table">' . "\n";
264
  /**/
265
  echo '<td>' . "\n";
266
  echo '<select name="ws_plugin__s2member_custom_reg_auto_opt_out_transitions" id="ws-plugin--s2member-custom-reg-auto-opt-out-transitions">' . "\n";
267
+ echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_out_transitions"]) ? ' selected="selected"' : '') . '>No ( do NOT transition mailing list subscribers automatically )</option>' . "\n";
268
+ echo '<option value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_out_transitions"] === "1") ? ' selected="selected"' : '') . '>Yes ( automatically transition, if able to remove from a previous list )</option>' . "\n";
269
+ echo '<option value="2"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_out_transitions"] === "2") ? ' selected="selected"' : '') . '>Yes ( always automatically transition, even if NOT removed from a previous list )</option>' . "\n";
270
  echo '</select><br />' . "\n";
271
  echo '<em><strong>*Transitions*</strong> When/if s2Member automatically removes a Member from Lists at their current Level# ( based on your configuration in the previous section ), this setting tells s2Member that it should <strong>also</strong> transition the Member to any Lists you\'ve configured at the new Access Level# ( i.e. Role ) they are being changed to. For example, if a Member is demoted from Level #1 to Level #0, do you want s2Member to add them to the Level #0 List(s) after it removes them from the Level #1 List(s)?</em><br /><br />' . "\n";
272
+ echo '<em><strong>*If removed from a previous list, or NOT?*</strong> You can choose your preference above. When/if s2Member automatically transitions a mailing list subscriber, it will first try to remove the subscriber from a previous mailing list. If s2Member is able to remove the subscriber from a previous list before the transition takes place, s2Member will then make an attempt ( based on your configuration ) to transition the subscriber to a new/different list silently ( e.g. without a new confirmation email being sent out ). If s2Member is NOT able to remove a subscriber from a previous list, it can - ( if configured to do so ), still transition a subscriber to a new list, by sending the subscriber a new email confirmation letter ( e.g. this is NOT silent, because you absolutely NEED the subscriber\'s permission in this case ).</em><br /><br />' . "\n";
273
+ echo '<em><strong>*Seamless with MailChimp®*</strong> If enabled, Automatic List Transitions work seamlessly with MailChimp®. Automatic List Transitions also work with AWeber®, but AWeber® will ALWAYS send the User/Member a new confirmation email, asking them to confirm changes to their mailing list subscription with you. Work is underway to improve this aspect of s2Member\'s integration with AWeber® in a future release. Ideally, a Customer would be transitioned silently behind the scene with AWeber® too, when appropriate.</em>' . "\n";
274
  echo '</td>' . "\n";
275
  /**/
276
  echo '</tr>' . "\n";
includes/menu-pages/gen-ops.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.0
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
21
  {
@@ -97,7 +97,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
97
  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";
98
  echo '<h3>Security Encryption Key ( optional, for tighter security )</h3>' . "\n";
99
  echo '<p>Just like WordPress®, s2Member is open-source software. Which is wonderful. However, this also makes it possible for anyone to grab a copy of the software, and try to learn their way around its security measures. In order to keep your installation of s2Member unique/secure, you should configure a Security Encryption Key. s2Member will use your Security Encryption Key to protect itself against hackers. It does this by encrypting all sensitive information with your Key. A Security Encryption Key is unique to your installation.</p>' . "\n";
100
- echo '<p>Once you configure this, you do NOT want to change it; not ever. In fact, it is a VERY good idea to keep this backed up in a safe place, just in case you need to move your site, or re-install s2Member in the future. Some of the sensitive data that s2Member stores, will be encrypted with this Key. If you change it, that data can no longer be read, even by s2Member itself. In other words, don\'t use s2Member for six months, then decide to change your Key. That would break your installation. You configure this once, for each installation of s2Member; and you NEVER change it.</p>' . "\n";
101
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_security", get_defined_vars ());
102
  /**/
103
  echo '<table class="form-table">' . "\n";
@@ -157,8 +157,9 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
157
  echo '<div class="ws-menu-page-section ws-plugin--s2member-s-badge-wp-footer-code-section">' . "\n";
158
  echo '<h3>Security Badge &amp; Footer Configuration ( optional )</h3>' . "\n";
159
  echo '<div class="ws-menu-page-right">' . c_ws_plugin__s2member_utilities::s_badge_gen ("1", true, true) . '</div>' . "\n";
160
- echo '<p>An s2Member® Security Badge <em>( optional )</em>, can be used to express your site\'s concern for security; demonstrating to all Users/Members that your site <em>( and the s2Member software )</em>, takes security seriously. However, in order to qualify your site, you MUST generate a Security Encryption Key <em>( previous section )</em>, and then click "Save All Changes". Only then, will s2Member officially verify your installation <em>( verification occurs automatically )</em>. Once you\'ve properly configured all aspects of s2Member, your s2Member® Security Badge will be verified. *Note: to see the "verified" version of your Security Badge, you might need to refresh your browser after saving all changes <em>( i.e. after you create a Security Encryption Key )</em>. Also, s2Member will NOT "verify" your site if you turn off Unique IP Restrictions, Brute Force Login Protection, or if your <code>/wp-config.php</code> file lacks <a href="http://codex.wordpress.org/Editing_wp-config.php#Security_Keys" target="_blank" rel="external">Security Keys</a> <em>( at least 60 chars in length, each )</em>.</p>' . "\n";
161
- echo '<p><strong>How does s2Member know when my site is secure?</strong><br />If enabled below, an API call for "Security Badge Status", will allow web service connections to determine your status. Clicking <a href="' . esc_attr (site_url ("/?s2member_s_badge_status=1")) . '" target="_blank" rel="external">this link</a> will report <code>1</code> <em>( secure )</em>, <code>0</code> <em>( at risk )</em>, or <code>-</code> <em>( API disabled )</em>. Once all security considerations are satisfied, s2Member will report <code>1</code> <em>( secure )</em> for your installation. *Note, this simple API will NOT, and should not, report any other information. It will ONLY report the current status of your Security Badge, as determined by your installation of s2Member. When/if you install the s2Member Security Badge, s2Member will make a connection to your site "once per day", to test the status of your Security Badge.</p>' . "\n";
 
162
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_s_badge_wp_footer_code", get_defined_vars ());
163
  /**/
164
  echo '<table class="form-table">' . "\n";
@@ -188,7 +189,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
188
  echo '<th>' . "\n";
189
  echo '<label for="ws-plugin--s2member-wp-footer-code">' . "\n";
190
  echo 'Customize WordPress® Footer:<br />' . "\n";
191
- echo '<small>[ <a href="#" onclick="this.$code = jQuery(\'textarea#ws-plugin--s2member-wp-footer-code\'); this.$code.val(jQuery.trim(unescape(\'' . rawurlencode ('[s2Member-Security-Badge v="1" /]') . '\')+\'\n\'+this.$code.val())); return false;">Click HERE to insert your Security Badge</a> ],<br />or use Shortcode <code>[s2Member-Security-Badge v="1" /]</code> in a Post/Page/Widget.</small>' . "\n";
192
  echo '</label>' . "\n";
193
  echo '</th>' . "\n";
194
  /**/
@@ -253,7 +254,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
253
  /**/
254
  echo '<td>' . "\n";
255
  echo '<input type="text" name="ws_plugin__s2member_reg_email_from_email" id="ws-plugin--s2member-reg-email-from-email" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"]) . '" /><br />' . "\n";
256
- echo 'We recommend something like: support@your-domain.com.' . "\n";
257
  echo '</td>' . "\n";
258
  /**/
259
  echo '</tr>' . "\n";
@@ -309,6 +310,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
309
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_new_user_email", get_defined_vars ());
310
  /**/
311
  echo '<div id="ws-plugin--s2member-new-user-email-details" style="display:none;">' . "\n";
 
312
  echo '<table class="form-table">' . "\n";
313
  echo '<tbody>' . "\n";
314
  echo '<tr>' . "\n";
@@ -355,12 +357,12 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
355
  echo '<li><code>%%wp_login_url%%</code> = The full URL where Users can get logged into your site.</li>' . "\n";
356
  echo '</ul>' . "\n";
357
  /**/
358
- echo '<strong>Custom Registration Fields are also supported in this email:</strong>' . "\n";
359
  echo '<ul>' . "\n";
360
- echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration Field with the ID <code>date_of_birth</code>.</li>' . "\n";
361
- echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration Field with the ID <code>street_address</code>.</li>' . "\n";
362
- echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
363
- echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
364
  echo '</ul>' . "\n";
365
  /**/
366
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
@@ -450,12 +452,12 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
450
  echo '<li><code>%%wp_login_url%%</code> = The full URL where Users can get logged into your site.</li>' . "\n";
451
  echo '</ul>' . "\n";
452
  /**/
453
- echo '<strong>Custom Registration Fields are also supported in this email:</strong>' . "\n";
454
  echo '<ul>' . "\n";
455
- echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration Field with the ID <code>date_of_birth</code>.</li>' . "\n";
456
- echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration Field with the ID <code>street_address</code>.</li>' . "\n";
457
- echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
458
- echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
459
  echo '</ul>' . "\n";
460
  /**/
461
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
@@ -525,7 +527,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
525
  echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["allow_subscribers_in"]) ? ' selected="selected"' : '') . '>No ( do NOT allow Open Registration )</option>' . "\n";
526
  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";
527
  echo '</select><br />' . "\n";
528
- 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">wp-login.php?action=register</a>. 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";
 
529
  echo '</td>' . "\n";
530
  /**/
531
  echo '</tr>' . "\n";
@@ -547,7 +550,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
547
  /**/
548
  echo '<div class="ws-menu-page-section ws-plugin--s2member-membership-levels-section">' . "\n";
549
  echo '<h3>Membership Levels ( required, please customize these )</h3>' . "\n";
550
- echo '<p>The default Membership Levels are labeled generically; feel free to modify them as needed. s2Member supports Free Subscribers <em>( at Level #0 )</em>, along with several Primary Roles for paid Membership <em>( i.e. Levels 1-4 )</em>, created by the s2Member plugin.' . ((!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? ' s2Member also supports unlimited Custom Capability Packages <em>( see <code>s2Member -> API Scripting -> Custom Capabilities</code> )</em>' : '') . '. That being said, you don\'t have to use all of the Membership Levels if you don\'t want to. To use only 1 or 2 of these Levels, just create and/or modify your Membership Options Page, so that it only includes payment Buttons for the Levels you wish to use.</p>' . "\n";
551
  echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? '<p><em><strong>TIP:</strong> <strong>Unlimited Membership Levels</strong> are only possible with <a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Pro Module / Prices")) . '" target="_blank" rel="external">s2Member Pro</a>. However, Custom Capabilities are possible in all versions of s2Member, including the free version. Custom Capabilities are a great way to extend s2Member in creative ways. If you\'re an advanced site owner, a theme designer, or a web developer integrating s2Member for a client, please check your Dashboard, under: <code>s2Member -> API Scripting -> Custom Capabilities</code>. We also recommend the <a href="http://www.primothemes.com/forums/viewforum.php?f=40" target="_blank" rel="external">s2Member Codex</a>.</em></p>' . "\n" : '';
552
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_membership_levels", get_defined_vars ());
553
  /**/
@@ -595,12 +598,18 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
595
  /**/
596
  echo '<td>' . "\n";
597
  echo '<input type="radio" name="ws_plugin__s2member_apply_label_translations" id="ws-plugin--s2member-apply-label-translations-0" value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["apply_label_translations"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-apply-label-translations-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__s2member_apply_label_translations" id="ws-plugin--s2member-apply-label-translations-1" value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["apply_label_translations"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-apply-label-translations-1">Yes, force WordPress® to use my Labels.</label><br />' . "\n";
598
- echo 'This particular option affects your administrative Dashboard only <em>( i.e. your list of Users )</em>. s2Member can force WordPress® to use your Labels instead of referencing Roles by `s2Member Level #`. If this is your first installation of s2Member, we suggest leaving this set to <code>no</code> until you\'ve had a chance to get acclimated with s2Member\'s functionality. In fact, many site owners choose to leave this off, because they find it less confusing when Roles are referred to by their s2Member Level #.' . "\n";
599
  echo '</td>' . "\n";
600
  /**/
601
  echo '</tr>' . "\n";
602
  echo '</tbody>' . "\n";
603
  echo '</table>' . "\n";
 
 
 
 
 
 
604
  echo '</div>' . "\n";
605
  /**/
606
  echo '</div>' . "\n";
@@ -616,8 +625,9 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
616
  /**/
617
  echo '<div class="ws-menu-page-section ws-plugin--s2member-login-registration-section">' . "\n";
618
  echo '<h3>Login/Registration Page Customization ( required )</h3>' . "\n";
619
- echo '<p>These settings allow you to customize the user interface for your Login / Registration Pages:<br />( <a href="' . esc_attr (c_ws_plugin__s2member_utils_urls::wp_register_url ()) . '" target="_blank" rel="external">' . esc_html (c_ws_plugin__s2member_utils_urls::wp_register_url ()) . '</a> )</p>' . "\n";
620
- echo (is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && is_main_site ()) ? '<p><em>A Multisite Blog Farm uses this Form instead, powered by your theme.<br />( <a href="' . esc_attr (c_ws_plugin__s2member_utils_urls::wp_signup_url ()) . '" target="_blank" rel="external">' . esc_html (c_ws_plugin__s2member_utils_urls::wp_signup_url ()) . '</a> )</em></p>' . "\n" : '';
 
621
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_login_registration", get_defined_vars ());
622
  /**/
623
  echo '<table class="form-table">' . "\n";
@@ -952,17 +962,15 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
952
  {
953
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_custom_reg_fields", get_defined_vars ());
954
  /**/
955
- echo '<div class="ws-menu-page-group" title="Custom Registration Fields/Options">' . "\n";
956
  /**/
957
  echo '<div class="ws-menu-page-section ws-plugin--s2member-custom-reg-fields-section">' . "\n";
958
- echo '<h3>Custom Registration Fields ( optional, for further customization )</h3>' . "\n";
959
  echo '<p>Some fields are already built-in by default. The defaults are: <code>*Username*, *Email*, *First Name*, *Last Name*</code>.</p>' . "\n";
960
  /**/
961
- echo '<p>Custom Fields will appear in your Standard Registration Form:<br />( <a href="' . esc_attr (c_ws_plugin__s2member_utils_urls::wp_register_url ()) . '" target="_blank" rel="external">' . esc_html (c_ws_plugin__s2member_utils_urls::wp_register_url ()) . '</a> )</p>' . "\n";
962
- echo (is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && is_main_site ()) ? '<p><em>A Multisite Blog Farm uses this Form instead. It supports Custom Fields too.<br />( <a href="' . esc_attr (c_ws_plugin__s2member_utils_urls::wp_signup_url ()) . '" target="_blank" rel="external">' . esc_html (c_ws_plugin__s2member_utils_urls::wp_signup_url ()) . '</a> )</em></p>' . "\n" : '';
963
- /**/
964
- if (is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && is_main_site ())
965
- echo '<p><em>* For security purposes, Custom Passwords are NOT possible on the Main Site of a Blog Farm. A User MUST wait for the activation/confirmation email; where a randomly generated Password will be assigned. Please note... this limitation only affects your Main Site, via <code>/wp-signup.php</code>. In other words, your Customers ( i.e. other Blog Owners ) will still have the ability to allow Custom Passwords with s2Member. YOU are affected by this limitation, NOT them. * NOTE: s2Member (Pro) removes this limitation. If you install the s2Member Pro Module, you WILL be able to allow Custom Passwords through s2Member Pro Forms; even on a Multisite Blog Farm.</em></p>' . "\n";
966
  /**/
967
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_custom_reg_fields", get_defined_vars ());
968
  /**/
@@ -972,7 +980,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
972
  /**/
973
  echo '<th>' . "\n";
974
  echo '<label>' . "\n";
975
- echo 'Custom Registration Fields:' . "\n";
976
  echo '</label>' . "\n";
977
  echo '</th>' . "\n";
978
  /**/
@@ -1002,7 +1010,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
1002
  echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"]) ? ' selected="selected"' : '') . '>No ( do NOT collect First/Last Names during registration )</option>' . "\n";
1003
  echo '</select><br />' . "\n";
1004
  echo 'Recommended setting ( <code>Yes</code> ). It\'s usually a good idea to leave this on.' . "\n";
1005
- echo (c_ws_plugin__s2member_utils_conds::pro_is_installed ()) ? '<br /><em>* s2Member Pro (Checkout) Forms always require a First/Last Name.</em>' . "\n" : '';
 
1006
  echo '</td>' . "\n";
1007
  /**/
1008
  echo '</tr>' . "\n";
@@ -1025,6 +1034,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
1025
  echo '<option value="login"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"] === "login") ? ' selected="selected"' : '') . '>Yes ( set Display Name to User\'s Username )</option>' . "\n";
1026
  echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"]) ? ' selected="selected"' : '') . '>No ( leave Display Name at default WordPress® value )</option>' . "\n";
1027
  echo '</select>' . "\n";
 
1028
  echo '</td>' . "\n";
1029
  /**/
1030
  echo '</tr>' . "\n";
@@ -1045,6 +1055,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
1045
  echo '<option value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"]) ? ' selected="selected"' : '') . '>Yes ( allow members to create their own password during registration )</option>' . "\n";
1046
  echo '</select><br />' . "\n";
1047
  echo 'Auto-generated Passwords are recommended for best security; because, this also serves as a form of email confirmation.' . "\n";
 
 
1048
  echo '</td>' . "\n";
1049
  /**/
1050
  echo '</tr>' . "\n";
@@ -1064,6 +1076,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
1064
  echo 'To force personal email addresses, provide a comma-delimited list of email users to reject. <a href="#" onclick="alert(\'s2Member will reject [user]@ ( based on your configuration here ). A JavaScript alert message will be issued, asking the User to, `please use a personal email address`.\'); return false;" tabindex="-1">[?]</a><br />' . "\n";
1065
  echo 'Ex: <code>info,help,admin,webmaster,hostmaster,sales,support,spam</code><br />' . "\n";
1066
  echo 'See: <a href="http://kb.mailchimp.com/article/what-role-addresses-does-mailchimp-specifically-block-from-bulk-importing/" target="_blank" rel="external">this article</a> for a more complete list.' . "\n";
 
1067
  echo '</td>' . "\n";
1068
  /**/
1069
  echo '</tr>' . "\n";
@@ -1071,7 +1084,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
1071
  /**/
1072
  echo '<th>' . "\n";
1073
  echo '<label for="ws-plugin--s2member-custom-reg-fields-4bp">' . "\n";
1074
- echo 'Integrate Custom Registration Fields with BuddyPress too?' . "\n";
1075
  echo '</label>' . "\n";
1076
  echo '</th>' . "\n";
1077
  /**/
@@ -1084,8 +1097,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
1084
  foreach (array ("profile-view" => "Yes, integrate with BuddyPress Public Profiles.", "registration" => "Yes, integrate with BuddyPress Registration Form.", "profile" => "Yes, integrate with BuddyPress Profile Editing Panel.") as $ws_plugin__s2member_temp_s_value => $ws_plugin__s2member_temp_s_label)
1085
  echo '<input type="checkbox" name="ws_plugin__s2member_custom_reg_fields_4bp[]" id="ws-plugin--s2member-custom-reg-fields-4bp-' . esc_attr (preg_replace ("/[^a-z0-9_\-]/", "-", $ws_plugin__s2member_temp_s_value)) . '" value="' . esc_attr ($ws_plugin__s2member_temp_s_value) . '"' . ((in_array ($ws_plugin__s2member_temp_s_value, $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields_4bp"])) ? ' checked="checked"' : '') . ((!c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? ' disabled="disabled"' : '') . ' /> <label for="ws-plugin--s2member-custom-reg-fields-4bp-' . esc_attr (preg_replace ("/[^a-z0-9_\-]/", "-", $ws_plugin__s2member_temp_s_value)) . '">' . $ws_plugin__s2member_temp_s_label . '</label><br />' . "\n";
1086
  echo '</div>' . "\n";
1087
- echo (!c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? 'BuddyPress is NOT installed; which is perfectly OK. BuddyPress is NOT a requirement.<br />' . "\n" : '';
1088
- echo 'Also, see below: <code>Member Profile Modifications</code>.' . "\n";
1089
  echo '</td>' . "\n";
1090
  /**/
1091
  echo '</tr>' . "\n";
@@ -1107,6 +1119,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
1107
  echo '<div class="ws-menu-page-section ws-plugin--s2member-login-welcome-page-section">' . "\n";
1108
  echo '<h3>Login Welcome Page ( required, please customize this )</h3>' . "\n";
1109
  echo '<p>Please create and/or choose an existing Page to use as the first page Members will see after logging in.</p>' . "\n";
 
1110
  echo '<p><em><strong>*Tip*</strong> This special Page will be protected from public access ( automatically ) by s2Member.</em></p>' . "\n";
1111
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_login_welcome_page", get_defined_vars ());
1112
  /**/
@@ -1152,7 +1165,10 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
1152
  /**/
1153
  echo '<div class="ws-menu-page-section ws-plugin--s2member-membership-options-page-section">' . "\n";
1154
  echo '<h3>Membership Options Page ( required, please customize this )</h3>' . "\n";
1155
- echo '<p>Please create and/or choose an existing Page that showcases your Membership subscription options. This special Page is where you will insert the PayPal® Subscription Buttons generated for you by s2Member. This Page serves as your signup page. It should detail all of the features that come with Membership to your site, and provide a PayPal® Subscription Button for each Level of access you plan to offer. This is also the page that Users will be redirected to, should they attempt to access an area of your site that requires Membership.</p>' . "\n";
 
 
 
1156
  echo '<p><em><strong>*Tip*</strong> s2Member will NEVER allow this Page to be protected from public access.</em></p>' . "\n";
1157
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_membership_options_page", get_defined_vars ());
1158
  /**/
@@ -1175,7 +1191,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
1175
  foreach (($ws_plugin__s2member_temp_a = array_merge ((array)get_pages ())) as $ws_plugin__s2member_temp_o)
1176
  echo '<option value="' . esc_attr ($ws_plugin__s2member_temp_o->ID) . '"' . (($ws_plugin__s2member_temp_o->ID == $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"]) ? ' selected="selected"' : '') . '>' . esc_html ($ws_plugin__s2member_temp_o->post_title) . '</option>' . "\n";
1177
  echo '</select><br />' . "\n";
1178
- echo 'Please choose a Page that provides Users a way to signup for Membership. This Page should also contain your PayPal&reg Subscription button(s). We recommend the following title: <code>Membership Signup</code>.' . "\n";
1179
  echo '</td>' . "\n";
1180
  /**/
1181
  echo '</tr>' . "\n";
@@ -1197,8 +1213,9 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
1197
  echo '<div class="ws-menu-page-section ws-plugin--s2member-profile-modifications-section">' . "\n";
1198
  echo '<h3>Giving Members The Ability To Modify Their Profile</h3>' . "\n";
1199
  echo '<p>s2Member can be configured to redirect Members away from the <a href="' . esc_attr (admin_url ("/profile.php")) . '" target="_blank" rel="external">default Profile Editing Panel</a> that is built into WordPress®. When/if a Member attempts to access the default Profile Editing Panel, they\'ll instead, be redirected to the Login Welcome Page that you\'ve configured through s2Member. <strong>Why would I redirect?</strong> Unless you\'ve made some drastic modifications to your WordPress® installation, the default Profile Editing Panel that ships with WordPress®, is NOT really suited for public access, even by a Member.</p>' . "\n";
1200
- echo '<p>So instead of using this default Profile Editing Panel; s2Member creates an added layer of functionality, on top of WordPress®. It does this by providing you ( as the site owner ), with a special Shortcode: <code>[s2Member-Profile /]</code> that you can place into your Login Welcome Page, or any Post/Page for that matter ( even into a Text Widget ). This Shortcode produces an Inline Profile Editing Form that supports all aspects of s2Member, including Password changes; and any Custom Registration/Profile Fields that you\'ve configured with s2Member.</p>' . "\n";
1201
- echo '<p>Alternatively, s2Member also gives you the ability to send your Members to a <a href="' . esc_attr (site_url ("/?s2member_profile=1")) . '" target="_blank" rel="external">special Stand-Alone version</a>. This Stand-Alone version has been designed ( with a bare-bones format ), intentionally. This makes it possible for you to <a href="#" onclick="if(!window.open(\'' . site_url ("/?s2member_profile=1") . '\', \'_popup\', \'width=600,height=400,left=100,screenX=100,top=100,screenY=100,location=0,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1\')) alert(\'Please disable popup blockers and try again!\'); return false;" rel="external">open it up in a popup window</a>, or embed it into your Login Welcome Page using an IFRAME. Code samples are provided below.</p>' . "\n";
 
1202
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_profile_modifications", get_defined_vars ());
1203
  /**/
1204
  echo '<table class="form-table">' . "\n";
@@ -1244,7 +1261,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
1244
  {
1245
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_url_shortening", get_defined_vars ());
1246
  /**/
1247
- echo '<div class="ws-menu-page-group" title="URL Shortening API ( Preference )">' . "\n";
1248
  /**/
1249
  echo '<div class="ws-menu-page-section ws-plugin--s2member-url-shortening-section">' . "\n";
1250
  echo '<h3>URL Shortening Service API ( Preference )</h3>' . "\n";
15
  * @since 3.0
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
21
  {
97
  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";
98
  echo '<h3>Security Encryption Key ( optional, for tighter security )</h3>' . "\n";
99
  echo '<p>Just like WordPress®, s2Member is open-source software. Which is wonderful. However, this also makes it possible for anyone to grab a copy of the software, and try to learn their way around its security measures. In order to keep your installation of s2Member unique/secure, you should configure a Security Encryption Key. s2Member will use your Security Encryption Key to protect itself against hackers. It does this by encrypting all sensitive information with your Key. A Security Encryption Key is unique to your installation.</p>' . "\n";
100
+ echo '<p>Once you configure this, you do NOT want to change it; not ever. In fact, it is a VERY good idea to keep this backed up in a safe place, just in case you need to move your site, or re-install s2Member in the future. Some of the sensitive data that s2Member stores, will be encrypted with this Key. If you change it, that data can no longer be read, even by s2Member itself. In other words, don\'t use s2Member for six months, then decide to change your Key. That would break your installation.</p>' . "\n";
101
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_security", get_defined_vars ());
102
  /**/
103
  echo '<table class="form-table">' . "\n";
157
  echo '<div class="ws-menu-page-section ws-plugin--s2member-s-badge-wp-footer-code-section">' . "\n";
158
  echo '<h3>Security Badge &amp; Footer Configuration ( optional )</h3>' . "\n";
159
  echo '<div class="ws-menu-page-right">' . c_ws_plugin__s2member_utilities::s_badge_gen ("1", true, true) . '</div>' . "\n";
160
+ echo '<p>An s2Member® Security Badge <em>( optional )</em>, can be used to express your site\'s concern for security; demonstrating to all Users/Members that your site <em>( and the s2Member software )</em>, takes security seriously. However, in order to qualify your site, you MUST generate a Security Encryption Key <em>( previous section )</em>, and then click "Save All Changes". Only then, will s2Member officially verify your installation <em>( verification occurs automatically )</em>.</p>' . "\n";
161
+ echo '<p>Once you\'ve properly configured all aspects of s2Member, your s2Member® Security Badge will be verified. To see the "verified" version of your Security Badge, you might need to refresh your browser after saving all changes <em>( i.e. after you create a Security Encryption Key )</em>. Also, s2Member will NOT "verify" your site if you turn off Unique IP Restrictions, Brute Force Login Protection, or if your <code>/wp-config.php</code> file lacks <a href="http://codex.wordpress.org/Editing_wp-config.php#Security_Keys" target="_blank" rel="external">Security Keys</a> <em>( each at least 60 chars in length )</em>. In addition, it\'s NOT possible for s2Member to verify your Security Badge, if your site is in a <code>localhost</code> environment; i.e. not connected to the web.</p>' . "\n";
162
+ echo '<p><strong>How does s2Member know when my site is secure?</strong><br />If enabled below, an API call for "Security Badge Status", will allow web service connections to determine your status. Clicking <a href="' . esc_attr (site_url ("/?s2member_s_badge_status=1")) . '" target="_blank" rel="external">this link</a> will report <code>1</code> <em>( secure )</em>, <code>0</code> <em>( at risk )</em>, or <code>-</code> <em>( API disabled )</em>. Once all security considerations are satisfied, s2Member will report <code>1</code> <em>( secure )</em> for your installation. *Note, this simple API will NOT, and should not, report any other information. It will ONLY report the current status of your Security Badge, as determined by your installation of s2Member. When/if you install the s2Member Security Badge, s2Member will make a connection to your site "once per day", to test your status.</p>' . "\n";
163
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_s_badge_wp_footer_code", get_defined_vars ());
164
  /**/
165
  echo '<table class="form-table">' . "\n";
189
  echo '<th>' . "\n";
190
  echo '<label for="ws-plugin--s2member-wp-footer-code">' . "\n";
191
  echo 'Customize WordPress® Footer:<br />' . "\n";
192
+ echo '<small>[ <a href="#" onclick="this.$code = jQuery(\'textarea#ws-plugin--s2member-wp-footer-code\'); this.$code.val(jQuery.trim(unescape(\'' . rawurlencode ('[s2Member-Security-Badge v="1" /]') . '\')+\'\n\'+this.$code.val())); return false;">Click HERE to insert your Security Badge</a> ],<br />or use Shortcode <code>[s2Member-Security-Badge v="1" /]</code> in a Post/Page/Widget.<br />The <code>v="1"</code> attribute is a Security Badge style/variation. Try variations <code>1|2|3</code>.</small>' . "\n";
193
  echo '</label>' . "\n";
194
  echo '</th>' . "\n";
195
  /**/
254
  /**/
255
  echo '<td>' . "\n";
256
  echo '<input type="text" name="ws_plugin__s2member_reg_email_from_email" id="ws-plugin--s2member-reg-email-from-email" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"]) . '" /><br />' . "\n";
257
+ echo 'Example: support@your-domain.com. <em class="ws-menu-page-hilite">Please read <a href="#" onclick="alert(\'Running WordPress® with an SMTP mail plugin?\\n\\nPlease be advised. If you run an SMTP mail plugin with WordPress®, be sure to configure s2Member with a valid `From:` address ( i.e. one matching your SMTP configuration perhaps ). Most free SMTP servers, such as Gmail® and Yahoo®, require that your `From:` header match the email address associated with your account. Please check with your SMTP service provider before attempting to configure plugins like s2Member to use a different `From:` address when sending email messages.\'); return false;">this IMPORTANT note</a></em>.' . "\n";
258
  echo '</td>' . "\n";
259
  /**/
260
  echo '</tr>' . "\n";
310
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_new_user_email", get_defined_vars ());
311
  /**/
312
  echo '<div id="ws-plugin--s2member-new-user-email-details" style="display:none;">' . "\n";
313
+ echo (c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '<p><em><strong>BuddyPress:</strong> please note that BuddyPress does NOT send this email to Users that register through the BuddyPress registration system. This is because BuddyPress sends each User an activation link; eliminating the need for this email all together. However, you CAN still customize s2Member\'s separate email to paying Members. See: <code>s2Member -> PayPal® Options -> Signup Confirmation Email</code>.</em></p>' . "\n" : '';
314
  echo '<table class="form-table">' . "\n";
315
  echo '<tbody>' . "\n";
316
  echo '<tr>' . "\n";
357
  echo '<li><code>%%wp_login_url%%</code> = The full URL where Users can get logged into your site.</li>' . "\n";
358
  echo '</ul>' . "\n";
359
  /**/
360
+ echo '<strong>Custom Registration/Profile Fields are also supported in this email:</strong>' . "\n";
361
  echo '<ul>' . "\n";
362
+ echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
363
+ echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
364
+ echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
365
+ echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Registration/Profile Fields</em>.</li>' . "\n";
366
  echo '</ul>' . "\n";
367
  /**/
368
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
452
  echo '<li><code>%%wp_login_url%%</code> = The full URL where Users can get logged into your site.</li>' . "\n";
453
  echo '</ul>' . "\n";
454
  /**/
455
+ echo '<strong>Custom Registration/Profile Fields are also supported in this email:</strong>' . "\n";
456
  echo '<ul>' . "\n";
457
+ echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
458
+ echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
459
+ echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
460
+ echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Registration/Profile Fields</em>.</li>' . "\n";
461
  echo '</ul>' . "\n";
462
  /**/
463
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
527
  echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["allow_subscribers_in"]) ? ' selected="selected"' : '') . '>No ( do NOT allow Open Registration )</option>' . "\n";
528
  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";
529
  echo '</select><br />' . "\n";
530
+ 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>. 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";
531
+ echo (c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '<br /><br /><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form <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.\');">here</a>.<br />s2Member integrates with BuddyPress, and the above setting will control Open Regisration for BuddyPress too.</em>' . "\n" : '';
532
  echo '</td>' . "\n";
533
  /**/
534
  echo '</tr>' . "\n";
550
  /**/
551
  echo '<div class="ws-menu-page-section ws-plugin--s2member-membership-levels-section">' . "\n";
552
  echo '<h3>Membership Levels ( required, please customize these )</h3>' . "\n";
553
+ echo '<p>The default Membership Levels are labeled generically; feel free to modify them as needed. s2Member supports Free Subscribers <em>( at Level #0 )</em>, along with several Primary Roles for paid Membership <em>( i.e. Levels 1-4 )</em>, created by the s2Member plugin.' . ((!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? ' s2Member also supports unlimited Custom Capability Packages <em>( see <code>s2Member -> API Scripting -> Custom Capabilities</code> )</em>' : '') . '. That being said, you don\'t have to use all of the Membership Levels if you don\'t want to. To use only 1 or 2 of these Levels, just design your Membership Options Page, so it only includes Payment Buttons for the Levels being used.</p>' . "\n";
554
  echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? '<p><em><strong>TIP:</strong> <strong>Unlimited Membership Levels</strong> are only possible with <a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Pro Module / Prices")) . '" target="_blank" rel="external">s2Member Pro</a>. However, Custom Capabilities are possible in all versions of s2Member, including the free version. Custom Capabilities are a great way to extend s2Member in creative ways. If you\'re an advanced site owner, a theme designer, or a web developer integrating s2Member for a client, please check your Dashboard, under: <code>s2Member -> API Scripting -> Custom Capabilities</code>. We also recommend the <a href="http://www.primothemes.com/forums/viewforum.php?f=40" target="_blank" rel="external">s2Member Codex</a>.</em></p>' . "\n" : '';
555
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_membership_levels", get_defined_vars ());
556
  /**/
598
  /**/
599
  echo '<td>' . "\n";
600
  echo '<input type="radio" name="ws_plugin__s2member_apply_label_translations" id="ws-plugin--s2member-apply-label-translations-0" value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["apply_label_translations"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-apply-label-translations-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__s2member_apply_label_translations" id="ws-plugin--s2member-apply-label-translations-1" value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["apply_label_translations"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-apply-label-translations-1">Yes, force WordPress® to use my Labels.</label><br />' . "\n";
601
+ echo 'This affects your administrative Dashboard only <em>( i.e. your list of Users )</em>.<br />s2Member can force WordPress® to use your Labels instead of referencing Roles by `s2Member Level #`. If this is your first installation of s2Member, we suggest leaving this set to <code>no</code> until you\'ve had a chance to get acclimated with s2Member\'s functionality. In fact, many site owners choose to leave this off, because they find it less confusing when Roles are referred to by their s2Member Level #.' . "\n";
602
  echo '</td>' . "\n";
603
  /**/
604
  echo '</tr>' . "\n";
605
  echo '</tbody>' . "\n";
606
  echo '</table>' . "\n";
607
+ /**/
608
+ echo '<div class="ws-menu-page-hr"></div>' . "\n";
609
+ /**/
610
+ echo '<input type="button" value="Reset Roles/Capabilities" class="ws-menu-page-right ws-plugin--s2member-reset-roles-button" style="min-width:175px;" />' . "\n";
611
+ echo '<p>The button to the right, is a nifty tool, which allows you to reset s2Member\'s internal Roles and Capabilities that integrate with WordPress®. If you, or a developer working with you, has made attempts to alter the default <em>internal</em> Role/Capability sets that come with s2Member, and you need to reset them back to the way s2Member expects them to be, please use this tool. <em>Attn Developers: it is also possible lock-in your modified Roles/Capabilities with an s2Member Filter. Please see <a href="http://www.primothemes.com/forums/viewtopic.php?f=36&t=15420&p=45162#p45162" target="_blank" rel="external">this thread for details</a>.</em></p>' . "\n";
612
+ /**/
613
  echo '</div>' . "\n";
614
  /**/
615
  echo '</div>' . "\n";
625
  /**/
626
  echo '<div class="ws-menu-page-section ws-plugin--s2member-login-registration-section">' . "\n";
627
  echo '<h3>Login/Registration Page Customization ( required )</h3>' . "\n";
628
+ echo '<p>These settings customize your Standard Login/Registration Pages:<br />( <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.' : '') . '\');">' . esc_html (c_ws_plugin__s2member_utils_urls::wp_register_url ()) . '</a> )</p>' . "\n";
629
+ echo (is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && is_main_site ()) ? '<p><em>The Main Site of a Multisite Blog Farm uses this Form instead, powered by your theme.<br />( <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.' : '') . '\');">' . esc_html (c_ws_plugin__s2member_utils_urls::wp_signup_url ()) . '</a> )</em></p>' . "\n" : '';
630
+ 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 />( <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" : '';
631
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_login_registration", get_defined_vars ());
632
  /**/
633
  echo '<table class="form-table">' . "\n";
962
  {
963
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_custom_reg_fields", get_defined_vars ());
964
  /**/
965
+ echo '<div class="ws-menu-page-group" title="Registration/Profile Fields &amp; Options">' . "\n";
966
  /**/
967
  echo '<div class="ws-menu-page-section ws-plugin--s2member-custom-reg-fields-section">' . "\n";
968
+ echo '<h3>Custom Registration/Profile Fields ( optional, for further customization )</h3>' . "\n";
969
  echo '<p>Some fields are already built-in by default. The defaults are: <code>*Username*, *Email*, *First Name*, *Last Name*</code>.</p>' . "\n";
970
  /**/
971
+ echo '<p>Custom Fields will appear in your Standard Registration Form, and in User/Member Profiles:<br />( <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.' : '') . '\');">' . esc_html (c_ws_plugin__s2member_utils_urls::wp_register_url ()) . '</a> )</p>' . "\n";
972
+ echo (is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && is_main_site ()) ? '<p><em>The Main Site of a Multisite Blog Farm uses this Form. s2Member supports Custom Fields here too.<br />( <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.' : '') . '\');">' . esc_html (c_ws_plugin__s2member_utils_urls::wp_signup_url ()) . '</a> )</em></p>' . "\n" : '';
973
+ echo (c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '<p><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form <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.\');">here</a>.<br />s2Member can integrate your Custom Fields with BuddyPress too, please see options below.</em></p>' . "\n" : '';
 
 
974
  /**/
975
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_custom_reg_fields", get_defined_vars ());
976
  /**/
980
  /**/
981
  echo '<th>' . "\n";
982
  echo '<label>' . "\n";
983
+ echo 'Custom Registration/Profile Fields:' . "\n";
984
  echo '</label>' . "\n";
985
  echo '</th>' . "\n";
986
  /**/
1010
  echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"]) ? ' selected="selected"' : '') . '>No ( do NOT collect First/Last Names during registration )</option>' . "\n";
1011
  echo '</select><br />' . "\n";
1012
  echo 'Recommended setting ( <code>Yes</code> ). It\'s usually a good idea to leave this on.' . "\n";
1013
+ echo (c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '<br /><em>* Has NO affect on BuddyPress registration form (BuddyPress always collects a full <code>Name</code> field).</em>' . "\n" : '';
1014
+ echo (c_ws_plugin__s2member_utils_conds::pro_is_installed ()) ? '<br /><em>* s2Member Pro (Checkout) Forms always require a First/Last Name for billing.</em>' . "\n" : '';
1015
  echo '</td>' . "\n";
1016
  /**/
1017
  echo '</tr>' . "\n";
1034
  echo '<option value="login"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"] === "login") ? ' selected="selected"' : '') . '>Yes ( set Display Name to User\'s Username )</option>' . "\n";
1035
  echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"]) ? ' selected="selected"' : '') . '>No ( leave Display Name at default WordPress® value )</option>' . "\n";
1036
  echo '</select>' . "\n";
1037
+ echo (c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '<br /><em>* Has NO affect on BuddyPress registration form (BuddyPress always uses its full <code>Name</code> field).</em>' . "\n" : '';
1038
  echo '</td>' . "\n";
1039
  /**/
1040
  echo '</tr>' . "\n";
1055
  echo '<option value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"]) ? ' selected="selected"' : '') . '>Yes ( allow members to create their own password during registration )</option>' . "\n";
1056
  echo '</select><br />' . "\n";
1057
  echo 'Auto-generated Passwords are recommended for best security; because, this also serves as a form of email confirmation.' . "\n";
1058
+ echo (is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && is_main_site ()) ? '<br /><em>* For security purposes, Custom Passwords are NOT possible on the Main Site of a Blog Farm. <a href="#" onclick="alert(\'For security purposes, Custom Passwords are NOT possible on the Main Site of a Blog Farm. A User MUST wait for the activation/confirmation email; where a randomly generated Password will be assigned. Please note, this limitation only affects your Main Site, via `/wp-signup.php`. In other words, your Customers ( i.e. other Blog Owners ) will still have the ability to allow Custom Passwords with s2Member. YOU are affected by this limitation, NOT them.\\n\\n* NOTE: s2Member (Pro) removes this limitation.\\nIf you install the s2Member Pro Module, you WILL be able to allow Custom Passwords through s2Member Pro Forms; even on a Multisite Blog Farm.\'); return false;" tabindex="-1">[?]</a></em>' . "\n" : '';
1059
+ echo (c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '<br /><em>* Does NOT affect BuddyPress registration form (always <code>yes</code> with BuddyPress registration).</em>' . "\n" : '';
1060
  echo '</td>' . "\n";
1061
  /**/
1062
  echo '</tr>' . "\n";
1076
  echo 'To force personal email addresses, provide a comma-delimited list of email users to reject. <a href="#" onclick="alert(\'s2Member will reject [user]@ ( based on your configuration here ). A JavaScript alert message will be issued, asking the User to, `please use a personal email address`.\'); return false;" tabindex="-1">[?]</a><br />' . "\n";
1077
  echo 'Ex: <code>info,help,admin,webmaster,hostmaster,sales,support,spam</code><br />' . "\n";
1078
  echo 'See: <a href="http://kb.mailchimp.com/article/what-role-addresses-does-mailchimp-specifically-block-from-bulk-importing/" target="_blank" rel="external">this article</a> for a more complete list.' . "\n";
1079
+ echo (c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '<br /><em>* Affects BuddyPress registration form too.</em>' . "\n" : '';
1080
  echo '</td>' . "\n";
1081
  /**/
1082
  echo '</tr>' . "\n";
1084
  /**/
1085
  echo '<th>' . "\n";
1086
  echo '<label for="ws-plugin--s2member-custom-reg-fields-4bp">' . "\n";
1087
+ echo 'Integrate Custom Registration/Profile Fields with BuddyPress?' . "\n";
1088
  echo '</label>' . "\n";
1089
  echo '</th>' . "\n";
1090
  /**/
1097
  foreach (array ("profile-view" => "Yes, integrate with BuddyPress Public Profiles.", "registration" => "Yes, integrate with BuddyPress Registration Form.", "profile" => "Yes, integrate with BuddyPress Profile Editing Panel.") as $ws_plugin__s2member_temp_s_value => $ws_plugin__s2member_temp_s_label)
1098
  echo '<input type="checkbox" name="ws_plugin__s2member_custom_reg_fields_4bp[]" id="ws-plugin--s2member-custom-reg-fields-4bp-' . esc_attr (preg_replace ("/[^a-z0-9_\-]/", "-", $ws_plugin__s2member_temp_s_value)) . '" value="' . esc_attr ($ws_plugin__s2member_temp_s_value) . '"' . ((in_array ($ws_plugin__s2member_temp_s_value, $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields_4bp"])) ? ' checked="checked"' : '') . ((!c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? ' disabled="disabled"' : '') . ' /> <label for="ws-plugin--s2member-custom-reg-fields-4bp-' . esc_attr (preg_replace ("/[^a-z0-9_\-]/", "-", $ws_plugin__s2member_temp_s_value)) . '">' . $ws_plugin__s2member_temp_s_label . '</label><br />' . "\n";
1099
  echo '</div>' . "\n";
1100
+ echo (!c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '<em>* BuddyPress is NOT installed; which is perfectly OK. BuddyPress is NOT a requirement.</em>' . "\n" : '<em>* The options above, make it possible to integrate Custom Registration/Profile Fields ( i.e. those configured with s2Member ) into BuddyPress as well. However, if you configure Profile Fields with BuddyPress, those will NOT be integrated with s2Member. Therefore, if you need Custom Registration/Profile Fields to work with both s2Member and with BuddyPress, please configure them with s2Member.</em>';
 
1101
  echo '</td>' . "\n";
1102
  /**/
1103
  echo '</tr>' . "\n";
1119
  echo '<div class="ws-menu-page-section ws-plugin--s2member-login-welcome-page-section">' . "\n";
1120
  echo '<h3>Login Welcome Page ( required, please customize this )</h3>' . "\n";
1121
  echo '<p>Please create and/or choose an existing Page to use as the first page Members will see after logging in.</p>' . "\n";
1122
+ echo (c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '<p><em><strong>BuddyPress:</strong> s2Member integrates with BuddyPress. Your Login Welcome Page affects BuddyPress too.</em></p>' . "\n" : '';
1123
  echo '<p><em><strong>*Tip*</strong> This special Page will be protected from public access ( automatically ) by s2Member.</em></p>' . "\n";
1124
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_login_welcome_page", get_defined_vars ());
1125
  /**/
1165
  /**/
1166
  echo '<div class="ws-menu-page-section ws-plugin--s2member-membership-options-page-section">' . "\n";
1167
  echo '<h3>Membership Options Page ( required, please customize this )</h3>' . "\n";
1168
+ echo '<p>Please create and/or choose an existing Page that showcases your Membership subscription options. This special Page is where you will insert the Payment Button(s) generated for you by s2Member. This Page serves as your lead-in signup page <em>( i.e. you\'ll give visitors one or more registration options here, and they\'ll be redirected to your Payment Gateway, to pay for the option they choose )</em>.</p>' . "\n";
1169
+ echo '<p>Your Membership Options Page should detail all of the features that come with Membership to your site, and provide a Payment Button for each Level of access you plan to offer. This is also the Page that anyone could be redirected to <em>( by s2Member )</em>, should they attempt to access an area of your site, which may require access to something they\'re NOT currenty allowed to view.' . ((!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? ' For more on this advanced topic, please check your Dashboard here: <code>s2Member -> API Scripting -> Membership Options Page / Variables</code>.' : '') . '</p>' . "\n";
1170
+ echo '<p><em><strong>*Tip*</strong> If you allow Open Registration ( i.e. Free Subscribers ), you might want to place a link on your Membership Options Page, which points directly to your Registration Form, instead of routing a Customer through your Payment Gateway first. For further details, please check the section above: <code>s2Member -> General Options -> Open Registration</code>.</em></p>' . "\n";
1171
+ echo (c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '<p><em><strong>BuddyPress:</strong> Even with BuddyPress, s2Member still needs a Membership Options Page. This is where your Payment Button(s) will go, giving people the ability to pay you. And again, this is also the Page that anyone could be redirected to <em>( by s2Member )</em>, should they attempt to access an area of your site, which may require access to something they are currenty NOT allowed to view.' . ((!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? ' For more on this advanced topic, please check your Dashboard here: <code>s2Member -> API Scripting -> Membership Options Page / Variables</code>.' : '') . '</em></p>' . "\n" : '';
1172
  echo '<p><em><strong>*Tip*</strong> s2Member will NEVER allow this Page to be protected from public access.</em></p>' . "\n";
1173
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_membership_options_page", get_defined_vars ());
1174
  /**/
1191
  foreach (($ws_plugin__s2member_temp_a = array_merge ((array)get_pages ())) as $ws_plugin__s2member_temp_o)
1192
  echo '<option value="' . esc_attr ($ws_plugin__s2member_temp_o->ID) . '"' . (($ws_plugin__s2member_temp_o->ID == $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"]) ? ' selected="selected"' : '') . '>' . esc_html ($ws_plugin__s2member_temp_o->post_title) . '</option>' . "\n";
1193
  echo '</select><br />' . "\n";
1194
+ echo 'Please choose a Page that provides Users a way to signup for Membership. This Page should also contain your Payment Button(s). We recommend the following title: <code>Membership Signup</code>.' . "\n";
1195
  echo '</td>' . "\n";
1196
  /**/
1197
  echo '</tr>' . "\n";
1213
  echo '<div class="ws-menu-page-section ws-plugin--s2member-profile-modifications-section">' . "\n";
1214
  echo '<h3>Giving Members The Ability To Modify Their Profile</h3>' . "\n";
1215
  echo '<p>s2Member can be configured to redirect Members away from the <a href="' . esc_attr (admin_url ("/profile.php")) . '" target="_blank" rel="external">default Profile Editing Panel</a> that is built into WordPress®. When/if a Member attempts to access the default Profile Editing Panel, they\'ll instead, be redirected to the Login Welcome Page that you\'ve configured through s2Member. <strong>Why would I redirect?</strong> Unless you\'ve made some drastic modifications to your WordPress® installation, the default Profile Editing Panel that ships with WordPress®, is NOT really suited for public access, even by a Member.</p>' . "\n";
1216
+ echo '<p>So instead of using this default Profile Editing Panel; s2Member creates an added layer of functionality, on top of WordPress®. It does this by providing you <em>( as the site owner )</em>, with a special Shortcode: <code>[s2Member-Profile /]</code> that you can place into your Login Welcome Page, or any Post/Page for that matter <em>( even into a Text Widget )</em>. This Shortcode produces an Inline Profile Editing Form that supports all aspects of s2Member, including Password changes; and any Custom Registration/Profile Fields that you\'ve configured with s2Member.</p>' . "\n";
1217
+ echo '<p>Alternatively, s2Member also gives you the ability to send your Members to a <a href="' . esc_attr (site_url ("/?s2member_profile=1")) . '" target="_blank" rel="external">special Stand-Alone version</a>. This Stand-Alone version has been designed <em>( with a bare-bones format )</em>, intentionally. This makes it possible for you to <a href="#" onclick="if(!window.open(\'' . site_url ("/?s2member_profile=1") . '\', \'_popup\', \'width=600,height=400,left=100,screenX=100,top=100,screenY=100,location=0,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1\')) alert(\'Please disable popup blockers and try again!\'); return false;" rel="external">open it up in a popup window</a>, or embed it into your Login Welcome Page using an IFRAME. Code samples are provided below.</p>' . "\n";
1218
+ echo (c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '<p><em><strong>BuddyPress:</strong> BuddyPress already provides Users/Members with a Profile Editing Panel, powered by your theme. If you\'ve configured Custom Registration/Profile Fields with s2Member, you can also enable s2Member\'s Profile Field integration with BuddyPress ( recommended ). For further details, see: <code>s2Member -> General Options -> Registration/Profile Fields</code>.</em></p>' . "\n" : '';
1219
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_profile_modifications", get_defined_vars ());
1220
  /**/
1221
  echo '<table class="form-table">' . "\n";
1261
  {
1262
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_url_shortening", get_defined_vars ());
1263
  /**/
1264
+ echo '<div class="ws-menu-page-group" title="URL Shortening Service Preference">' . "\n";
1265
  /**/
1266
  echo '<div class="ws-menu-page-section ws-plugin--s2member-url-shortening-section">' . "\n";
1267
  echo '<h3>URL Shortening Service API ( Preference )</h3>' . "\n";
includes/menu-pages/integrations.inc.php CHANGED
@@ -49,14 +49,15 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_integrations"))
49
  /**/
50
  echo '<div class="ws-menu-page-section ws-plugin--s2member-bbpress-section">' . "\n";
51
  echo '<h3>bbPress® Plugin Integration ( easy peasy )</h3>' . "\n";
52
- echo '<input type="button" id="ws-plugin--s2member-update-roles-for-bbp-button" value="Update Roles/Capabilities" class="ws-menu-page-right ws-plugin--s2member-update-roles-button" style="min-width:175px;" />' . "\n";
53
  echo '<p>The plugin version of <a href="http://bbpress.org/" target="_blank" rel="external">bbPress® 2.0+</a> integrates seamlessly with WordPress®. If bbPress® was already installed when you activated s2Member, your s2Member Roles/Capabilities are already configured to work in harmony with bbPress®. If you didn\'t, you can simply click the "Update Roles/Capabilities" button here. That\'s all it takes. Once your Roles/Capbilities are updated, s2Member and bbPress® are fully integrated with each other.</p>' . "\n";
54
  echo '<h3>bbPress® Forums and s2Member Roles/Capabilities</h3>' . "\n";
55
  echo '<p>s2Member configures your Membership Roles ( by default, these include: <em>s2Member Level 1</em>, <em>s2Member Level 2</em>, <em>s2Member Level 3</em>, <em>s2Member Level 4</em> ), with a default set of permissions that allow all Members to access and particpate in your forums, just as if they were a WordPress® Subscriber Role. This is how bbPress® expects s2Member to behave. bbPress® also adds a new Role to your WordPress® installation: <em>Forum Moderator</em>. s2Member allows Forum Moderators full access to all content protected by s2Member, just like <em>Administrators</em>, <em>Editors</em>, <em>Authors</em>, and <em>Contributors</em>.</p>' . "\n";
56
  echo '<p><strong>Membership Levels provide incremental access:</strong></p>' . "\n";
57
  echo '<p>* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 &amp; 3.<br />* A Member with Level 3 access, will also be able to access Levels 0, 1 &amp; 2.<br />* A Member with Level 2 access, will also be able to access Levels 0 &amp; 1.<br />* A Member with Level 1 access, will also be able to access Level 0.<br />* A Subscriber with Level 0 access, will ONLY be able to access Level 0.<br />* A public Visitor will have NO access to protected content.</p>' . "\n";
58
  echo '<p><em>* WordPress® Subscribers are at Membership Level 0. If you\'re allowing Open Registration, Subscribers will be at Level 0 ( a Free Subscriber ). WordPress® Administrators, Editors, Authors, Contributors, <strong class="ws-menu-page-hilite">and bbPress® Forum Moderators</strong> have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched.</em></p>' . "\n";
59
- echo '<p>Now, you can protect individual Forum Topics/Posts/Replies at different Levels with s2Member, or even with Custom Capabilities. Forum Topics/Posts/Replies are integrated by bbPress® internally as "Custom Post Types", which can be protected by s2Member either through Post Level Access Restrictions, or through URI Level Access Restrictions. s2Member will provide you with drop-down menus whenever you add or edit Forum Topics/Posts/Replies. You can also take a look at: <code>s2Member -> Restriction Options</code>. * Note, it is currently NOT possible to protect a Forum, and have all Topics inside that Forum protected automatically. In order to accomplish that, you\'ll need to use s2Member\'s URI Access Restrictions. We\'re working to improve this functionality in the mean time. Also, s2Member is currently NOT capable of protecting Topic Tags; but you can use URI Restrictions for these in the mean time.</p>' . "\n";
 
60
  do_action ("ws_plugin__s2member_during_integrations_page_during_left_sections_during_api_easy_way", get_defined_vars ());
61
  echo '</div>' . "\n";
62
  /**/
49
  /**/
50
  echo '<div class="ws-menu-page-section ws-plugin--s2member-bbpress-section">' . "\n";
51
  echo '<h3>bbPress® Plugin Integration ( easy peasy )</h3>' . "\n";
52
+ echo '<input type="button" value="Update Roles/Capabilities" class="ws-menu-page-right ws-plugin--s2member-update-roles-button" style="min-width:175px;" />' . "\n";
53
  echo '<p>The plugin version of <a href="http://bbpress.org/" target="_blank" rel="external">bbPress® 2.0+</a> integrates seamlessly with WordPress®. If bbPress® was already installed when you activated s2Member, your s2Member Roles/Capabilities are already configured to work in harmony with bbPress®. If you didn\'t, you can simply click the "Update Roles/Capabilities" button here. That\'s all it takes. Once your Roles/Capbilities are updated, s2Member and bbPress® are fully integrated with each other.</p>' . "\n";
54
  echo '<h3>bbPress® Forums and s2Member Roles/Capabilities</h3>' . "\n";
55
  echo '<p>s2Member configures your Membership Roles ( by default, these include: <em>s2Member Level 1</em>, <em>s2Member Level 2</em>, <em>s2Member Level 3</em>, <em>s2Member Level 4</em> ), with a default set of permissions that allow all Members to access and particpate in your forums, just as if they were a WordPress® Subscriber Role. This is how bbPress® expects s2Member to behave. bbPress® also adds a new Role to your WordPress® installation: <em>Forum Moderator</em>. s2Member allows Forum Moderators full access to all content protected by s2Member, just like <em>Administrators</em>, <em>Editors</em>, <em>Authors</em>, and <em>Contributors</em>.</p>' . "\n";
56
  echo '<p><strong>Membership Levels provide incremental access:</strong></p>' . "\n";
57
  echo '<p>* A Member with Level 4 access, will also be able to access Levels 0, 1, 2 &amp; 3.<br />* A Member with Level 3 access, will also be able to access Levels 0, 1 &amp; 2.<br />* A Member with Level 2 access, will also be able to access Levels 0 &amp; 1.<br />* A Member with Level 1 access, will also be able to access Level 0.<br />* A Subscriber with Level 0 access, will ONLY be able to access Level 0.<br />* A public Visitor will have NO access to protected content.</p>' . "\n";
58
  echo '<p><em>* WordPress® Subscribers are at Membership Level 0. If you\'re allowing Open Registration, Subscribers will be at Level 0 ( a Free Subscriber ). WordPress® Administrators, Editors, Authors, Contributors, <strong class="ws-menu-page-hilite">and bbPress® Forum Moderators</strong> have Level 4 access, with respect to s2Member. All of their other Roles/Capabilities are left untouched.</em></p>' . "\n";
59
+ echo '<p>You can protect individual Forum Topics/Posts/Replies at different Levels with s2Member, or even with Custom Capabilities. Forum Topics/Posts/Replies are integrated by bbPress® internally as "Custom Post Types", which can be protected by s2Member either through Post Level Access Restrictions, or through URI Level Access Restrictions. s2Member will provide you with drop-down menus whenever you add or edit Forum Topics/Posts/Replies.</p>' . "\n";
60
+ echo '<p>You can also take a look at: <code>s2Member -> Restriction Options</code>. * Note, it is currently NOT possible to protect a Forum, and have all Topics inside that Forum protected automatically. In order to accomplish that, you\'ll need to use s2Member\'s URI Access Restrictions. We\'re working to improve this functionality in the mean time. Also, s2Member is currently NOT capable of protecting Topic Tags; but you can use URI Restrictions for these in the mean time.</p>' . "\n";
61
  do_action ("ws_plugin__s2member_during_integrations_page_during_left_sections_during_api_easy_way", get_defined_vars ());
62
  echo '</div>' . "\n";
63
  /**/
includes/menu-pages/menu-pages-s-min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function($){var esc_attr=esc_html=function(str){return String(str).replace(/"/g,"&quot;").replace(/\</g,"&lt;").replace(/\>/g,"&gt;")};if(location.href.match(/page\=ws-plugin--s2member/)){$("input.ws-plugin--s2member-update-roles-button").click(function(){var $this=$(this);$this.val("one moment please ...");$.post(ajaxurl,{action:"ws_plugin__s2member_update_roles_via_ajax",ws_plugin__s2member_update_roles_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-update-roles-via-ajax")); ?>'},function(response){if(response==="0"){alert("Sorry, your request failed.\ns2Member's Roles/Capabilities are locked by Filter:\nws_plugin__s2member_lock_roles_caps"),$this.val("Update Roles/Capabilities")}else{if(response==="1"){alert("s2Member's Roles/Capabilities updated successfully."),$this.val("Update Roles/Capabilities")}}});return false})}if(location.href.match(/page\=ws-plugin--s2member-mms-ops/)){$("select#ws-plugin--s2member-mms-registration-file").change(function(){if($(this).val()==="wp-signup"){var gv=$("select#ws-plugin--s2member-mms-registration-grants").val(),l0v=$("input#ws-plugin--s2member-mms-registration-blogs-level0").val();$("div#ws-plugin--s2member-mms-registration-support-package-details-wrapper").show(),$("div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login").hide(),$("div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup").show();$("div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0")[((gv==="all")?"show":"hide")]();$("input#ws-plugin--s2member-mms-registration-blogs-level0").val(((gv==="all")?((l0v>0)?l0v:"1"):"0"))}else{if($(this).val()==="wp-login"){var gv=$("select#ws-plugin--s2member-mms-registration-grants").val(),l0v=$("input#ws-plugin--s2member-mms-registration-blogs-level0").val();$("div#ws-plugin--s2member-mms-registration-support-package-details-wrapper").hide(),$("div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login").show(),$("div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup").hide();$("div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0").hide();$("input#ws-plugin--s2member-mms-registration-blogs-level0").val("0")}}}).trigger("change");$("select#ws-plugin--s2member-mms-registration-grants").change(function(){$("select#ws-plugin--s2member-mms-registration-file").trigger("change")})}if(location.href.match(/page\=ws-plugin--s2member-gen-ops/)){ws_plugin__s2member_generateSecurityKey=function(){var mt_rand=function(min,max){min=(arguments.length<1)?0:min;max=(arguments.length<2)?2147483647:max;return Math.floor(Math.random()*(max-min+1))+min};var chars="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()";for(var i=0,key="";i<64;i++){key+=chars.substr(mt_rand(0,chars.length-1),1)}$("input#ws-plugin--s2member-sec-encryption-key").val(key);return false};ws_plugin__s2member_enableSecurityKey=function(){if(confirm("Edit Key? Are you sure?\nThis could break your installation!\n\n*Note* If you've been testing s2Member, feel free to change this Key before you go live. Just don't go live, and then change it. You'll have unhappy Customers. Data corruption WILL occur! For your safety, s2Member keeps a history of the last 10 Keys that you've used. If you get yourself into a real situation, s2Member will let you revert back to a previous Key.")){$("input#ws-plugin--s2member-sec-encryption-key").removeAttr("disabled")}return false};ws_plugin__s2member_securityKeyHistory=function(){$("div#ws-plugin--s2member-sec-encryption-key-history").toggle();return false};$("select#ws-plugin--s2member-new-user-emails-enabled").change(function(){var $pluggable=$("input#ws-plugin--s2member-pluggables-wp-new-user-notification"),$this=$(this),$newUserEmails=$("div#ws-plugin--s2member-new-user-emails");if($pluggable.val()==="0"||$this.val()==="0"){($pluggable.val()==="0")?$this.attr("disabled","disabled"):$this.removeAttr("disabled");$(":input",$newUserEmails).attr("disabled","disabled"),$newUserEmails.css("opacity","0.5")}else{$this.removeAttr("disabled"),$(":input",$newUserEmails).removeAttr("disabled"),$newUserEmails.css("opacity","")}}).trigger("change");if($("input#ws-plugin--s2member-custom-reg-fields").length&&$("div#ws-plugin--s2member-custom-reg-field-configuration").length){(function(){var i,fieldDefaults,tools,table,$tools,$table;var $fields=$("input#ws-plugin--s2member-custom-reg-fields");var $configuration=$("div#ws-plugin--s2member-custom-reg-field-configuration");var fields=($fields.val())?$.JSON.parse($fields.val()):[];fields=(fields instanceof Array)?fields:[];fieldDefaults={section:"no",sectitle:"",id:"",label:"",type:"text",deflt:"",options:"",expected:"",required:"yes",levels:"all",editable:"yes",classes:"",styles:"",attrs:""};for(i=0;i<fields.length;i++){fields[i]=$.extend(true,{},fieldDefaults,fields[i])}tools='<div id="ws-plugin--s2member-custom-reg-field-configuration-tools"></div>',table='<table id="ws-plugin--s2member-custom-reg-field-configuration-table"></table>';$configuration.html(tools+table);$tools=$("div#ws-plugin--s2member-custom-reg-field-configuration-tools"),$table=$("table#ws-plugin--s2member-custom-reg-field-configuration-table");ws_plugin__s2member_customRegFieldSectionChange=function(select){var section=$(select).val();var sectitle_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle";(section==="yes")?$(sectitle_trs).css("display",""):$(sectitle_trs).css("display","none")};ws_plugin__s2member_customRegFieldTypeChange=function(select){var type=$(select).val();var deflt_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt",options_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-options",expected_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected";(type.match(/^(text|textarea)$/))?$(deflt_trs).css("display",""):$(deflt_trs).css("display","none");(type.match(/^(select|selects|checkboxes|radios)$/))?$(options_trs).css("display",""):$(options_trs).css("display","none");(type.match(/^(text|textarea)$/))?$(expected_trs).css("display",""):$(expected_trs).css("display","none")};ws_plugin__s2member_customRegFieldDelete=function(index){var newFields=new Array();for(var i=0;i<fields.length;i++){if(i!==index){newFields.push(fields[i])}}fields=newFields,updateFields(),buildTable()};ws_plugin__s2member_customRegFieldMoveUp=function(index){if(typeof fields[index]==="object"&&typeof fields[index-1]==="object"){var prevFieldObj=fields[index-1],thisFieldObj=fields[index];fields[index-1]=thisFieldObj,fields[index]=prevFieldObj;updateFields(),buildTable()}};ws_plugin__s2member_customRegFieldMoveDown=function(index){if(typeof fields[index]==="object"&&typeof fields[index+1]==="object"){var nextFieldObj=fields[index+1],thisFieldObj=fields[index];fields[index+1]=thisFieldObj,fields[index]=nextFieldObj;updateFields(),buildTable()}};ws_plugin__s2member_customRegFieldCreate=function(){var $table=$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form"),field={};$(":input[property]",$table).each(function(){var $this=$(this),property=$this.attr("property"),val=$.trim($this.val());field[property]=val});if((field=validateField(field))){fields.push(field),updateFields(),buildTools(),buildTable(),scrollReset();setTimeout(function(){var row="tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-"+(fields.length-1);alert('Field created successfully.\n* Remember to "Save All Changes".');$(row).effect("highlight",1500)},500)}};ws_plugin__s2member_customRegFieldUpdate=function(index){var $table=$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form"),field={};$(":input[property]",$table).each(function(){var $this=$(this),property=$this.attr("property"),val=$.trim($this.val());field[property]=val});if((field=validateField(field,index))){fields[index]=field,updateFields(),buildTools(),buildTable(),scrollReset();setTimeout(function(){var row="tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-"+index;alert('Field updated successfully.\n* Remember to "Save All Changes".');$(row).effect("highlight",1500)},500)}};ws_plugin__s2member_customRegFieldAdd=function(){buildTools(true)};ws_plugin__s2member_customRegFieldEdit=function(index){buildTools(false,index),scrollReset()};ws_plugin__s2member_customRegFieldCancel=function(){buildTools(),scrollReset()};var validateField=function(field,index){var editing=(typeof index==="number"&&typeof fields[index]==="object")?true:false,errors=[],options,i;if(typeof field!=="object"||typeof(field=$.extend(true,{},fieldDefaults,field))!=="object"){alert("Invalid field object. Please try again.");return false}field.sectitle=(field.section==="yes")?field.sectitle:"";field.deflt=(field.type.match(/^(text|textarea)$/))?field.deflt:"";field.deflt=(field.type.match(/^(text)$/))?field.deflt.replace(/[\r\n\t ]+/g," "):field.deflt;field.options=(field.type.match(/^(select|selects|checkboxes|radios)$/))?field.options:"";field.expected=(field.type.match(/^(text|textarea)$/))?field.expected:"";if(!field.id){errors.push("Unique Field ID:\nThis is required. Please try again.")}else{if(fieldIdExists(field.id)&&(!editing||field.id!==fields[index].id)){errors.push("Unique Field ID:\nThat Field ID already exists. Please try again.")}}if(!field.label){errors.push("Field Label/Description:\nThis is required. Please try again.")}if(field.type.match(/^(select|selects|checkboxes|radios)$/)&&!field.options){errors.push("Option Configuration File:\nThis is required. Please try again.")}else{if(field.type.match(/^(select|selects|checkboxes|radios)$/)){for(i=0;i<(options=field.options.split(/[\r\n]+/)).length;i++){if(!(options[i]=$.trim(options[i])).match(/^([^\|]*)(\|)([^\|]*)(\|default)?$/)){errors.push("Option Configuration File:\nInvalid configuration at line #"+(i+1)+".");break}}field.options=$.trim(options.join("\n"))}}if(!(field.levels=field.levels.replace(/ /g,""))){errors.push("Applicable Levels:\nThis is required. Please try again.")}else{if(!field.levels.match(/^(all|[0-9,]+)$/)){errors.push("Applicable Levels:\nShould be comma-delimited Levels, or just type: all.\n( examples: 0,1,2,3,4 or type the word: all )")}}if(field.classes&&field.classes.match(/[^a-z 0-9 _ \-]/i)){errors.push("CSS Classes:\nContains invalid characters. Please try again.\n( only: alphanumerics, underscores, hyphens, spaces )")}if(field.styles&&field.styles.match(/["\=\>\<]/)){errors.push('CSS Styles:\nContains invalid characters. Please try again.\n( do NOT use these characters: = " < > )')}if(field.attrs&&field.attrs.match(/[\>\<]/)){errors.push("Other Attributes:\nContains invalid characters. Please try again.\n( do NOT use these characters: < > )")}if(errors.length>0){alert(errors.join("\n\n"));return false}else{return field}};var updateFields=function(){$fields.val(((fields.length>0)?$.JSON.stringify(fields):""))};var fieldId2Var=function(fieldId){return(typeof fieldId==="string")?$.trim(fieldId).toLowerCase().replace(/[^a-z0-9]/g,"_"):""};var fieldTypeDesc=function(type){var types={text:"Text ( single line )",textarea:"Textarea ( multi-line )",select:"Select Menu ( drop-down )",selects:"Select Menu ( multi-option )",checkbox:"Checkbox ( single )",pre_checkbox:"Checkbox ( pre-checked )",checkboxes:"Checkboxes ( multi-option )",radios:"Radio Buttons ( multi-option )"};if(typeof types[type]==="string"){return types[type]}return""};var fieldIdExists=function(fieldId){for(var i=0;i<fields.length;i++){if(fields[i].id===fieldId){return true}}};var scrollReset=function(){scrollTo(0,$("div.ws-plugin--s2member-custom-reg-fields-section").offset()["top"]-100)};var buildTools=function(adding,index){var i=0,html="",form="",w=0,h=0,editing=(typeof index==="number"&&typeof fields[index]==="object")?true:false,displayForm=(adding||editing)?true:false,field=(editing)?$.extend(true,{},fieldDefaults,fields[index]):fieldDefaults;html+='<a href="#" onclick="ws_plugin__s2member_customRegFieldAdd(); return false;">Add New Field</a>';tb_remove(),$("div#ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form").remove();if(displayForm){form+='<div id="ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form">';form+='<table id="ws-plugin--s2member-custom-reg-field-configuration-tools-form">';form+="<tbody>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">Starts A New Section?</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<td colspan="2">';form+='<select property="section" onchange="ws_plugin__s2member_customRegFieldSectionChange(this);" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<option value="no"'+((field.section==="no")?' selected="selected"':"")+'">No ( this Field flows normally )</option>';form+='<option value="yes"'+((field.section==="yes")?' selected="selected"':"")+'">Yes ( this Field begins a new section )</option>';form+="</select><br />";form+="<small>Optional. Allows Fields to be grouped into sections.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"'+((field.section==="yes")?"":' style="display:none;"')+'><td colspan="2"><hr /></td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"'+((field.section==="yes")?"":' style="display:none;"')+">";form+='<td colspan="2">';form+="Title for this new section? ( optional )<br />";form+='<input type="text" property="sectitle" value="'+esc_attr(field.sectitle)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle" /><br />';form+="<small>If empty, a simple divider will be used by default.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-type"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">Form Field Type: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<td colspan="2">';form+='<select property="type" onchange="ws_plugin__s2member_customRegFieldTypeChange(this);" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<option value="text"'+((field.type==="text")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("text"))+"</option>";form+='<option value="textarea"'+((field.type==="textarea")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("textarea"))+"</option>";form+='<option value="select"'+((field.type==="select")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("select"))+"</option>";form+='<option value="selects"'+((field.type==="selects")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("selects"))+"</option>";form+='<option value="checkbox"'+((field.type==="checkbox")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("checkbox"))+"</option>";form+='<option value="pre_checkbox"'+((field.type==="pre_checkbox")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("pre_checkbox"))+"</option>";form+='<option value="checkboxes"'+((field.type==="checkboxes")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("checkboxes"))+"</option>";form+='<option value="radios"'+((field.type==="radios")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("radios"))+"</option>";form+="</select><br />";form+="<small>The options below may change, based on the Field Type you choose here.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-label"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">Field Label/Desc: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">';form+='<td colspan="2">';form+='<input type="text" property="label" value="'+esc_attr(field.label)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label" /><br />';form+="<small>Examples: <code>Choose Country</code>, <code>Street Address</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-id"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">Unique Field ID: *</label></label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">';form+='<td colspan="2">';form+='<input type="text" property="id" value="'+esc_attr(field.id)+'" maxlength="25" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id" /><br />';form+="<small>Examples: <code>country_code</code>, <code>street_address</code></small><br />";form+='<small>e.g. <code>[s2Get user_field="country_code" /]</code></small>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-required"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">Field Required: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<td colspan="2">';form+='<select property="required" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<option value="yes"'+((field.required==="yes")?' selected="selected"':"")+'">Yes ( required )</option>';form+='<option value="no"'+((field.required==="no")?' selected="selected"':"")+'">No ( optional )</option>';form+="</select><br />";form+='<small>If <code>yes</code>, only Users/Members will be "required" to enter this field.</small><br />';form+="<small>* Administrators are exempt from this requirement.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt">Default Text Value: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<textarea property="deflt" rows="1" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt">'+esc_html(field.deflt)+"</textarea><br />";form+="<small>Default value before user input is received.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options">Option Configuration File: * ( one option per line )</label><br />';form+="<small>Use a pipe <code>|</code> delimited format: <code>option value|option label</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<textarea property="options" rows="3" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options">'+esc_html(field.options)+"</textarea><br />";form+="Here is a quick example:<br />";form+="<small>You can also specify a <em>default</em> option:</small><br />";form+="<code>US|United States|default</code><br />";form+="<code>CA|Canada</code><br />";form+="<code>VI|Virgin Islands (U.S.)</code>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected">Expected Format: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<select property="expected" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected">';form+='<option value=""'+((field.expected==="")?' selected="selected"':"")+'">Anything Goes</option>';form+='<option disabled="disabled"></option>';form+='<optgroup label="Specific Input Types">';form+='<option value="numeric-wp-commas"'+((field.expected==="numeric-wp-commas")?' selected="selected"':"")+'">Numeric ( with or without decimals, commas allowed )</option>';form+='<option value="numeric"'+((field.expected==="numeric")?' selected="selected"':"")+'">Numeric ( with or without decimals, no commas )</option>';form+='<option value="integer"'+((field.expected==="integer")?' selected="selected"':"")+'">Integer ( whole number, without any decimals )</option>';form+='<option value="integer-gt-0"'+((field.expected==="integer-gt-0")?' selected="selected"':"")+'">Integer > 0 ( whole number, no decimals, greater than 0 )</option>';form+='<option value="float"'+((field.expected==="float")?' selected="selected"':"")+'">Float ( floating point number, decimals required )</option>';form+='<option value="float-gt-0"'+((field.expected==="float-gt-0")?' selected="selected"':"")+'">Float > 0 ( floating point number, decimals required, greater than 0 )</option>';form+='<option value="date"'+((field.expected==="date")?' selected="selected"':"")+'">Date ( required date format: dd/mm/yyyy )</option>';form+='<option value="email"'+((field.expected==="email")?' selected="selected"':"")+'">Email ( require valid email )</option>';form+='<option value="url"'+((field.expected==="url")?' selected="selected"':"")+'">Full URL ( starting with http or https )</option>';form+='<option value="domain"'+((field.expected==="domain")?' selected="selected"':"")+'">Domain Name ( domain name only, without http )</option>';form+='<option value="phone"'+((field.expected==="phone")?' selected="selected"':"")+'">Phone # ( 10 digits w/possible hyphens,spaces,brackets )</option>';form+='<option value="uszip"'+((field.expected==="uszip")?' selected="selected"':"")+'">US Zipcode ( 5-9 digits w/possible hyphen )</option>';form+='<option value="cazip"'+((field.expected==="cazip")?' selected="selected"':"")+'">Canadian Zipcode ( 6 alpha-numerics w/possible space )</option>';form+='<option value="uczip"'+((field.expected==="uczip")?' selected="selected"':"")+'">US/Canadian Zipcode ( either a US or Canadian zipcode )</option>';form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Any Character Combination">';for(i=1;i<=25;i++){form+='<option value="any-'+i+'"'+((field.expected==="any-"+i)?' selected="selected"':"")+'">Any Character Combination ( '+i+" character minimum )</option>";form+='<option value="any-'+i+'-e"'+((field.expected==="any-"+i+"-e")?' selected="selected"':"")+'">Any Character Combination ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics, Spaces &amp; Punctuation Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-spaces-punctuation-'+i+'"'+((field.expected==="alphanumerics-spaces-punctuation-"+i)?' selected="selected"':"")+'">Alphanumerics, Spaces &amp; Punctuation ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-spaces-punctuation-'+i+'-e"'+((field.expected==="alphanumerics-spaces-punctuation-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics, Spaces &amp; Punctuation ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics &amp; Spaces Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-spaces-'+i+'"'+((field.expected==="alphanumerics-spaces-"+i)?' selected="selected"':"")+'">Alphanumerics &amp; Spaces ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-spaces-'+i+'-e"'+((field.expected==="alphanumerics-spaces-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics &amp; Spaces ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics &amp; Punctuation Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-punctuation-'+i+'"'+((field.expected==="alphanumerics-punctuation-"+i)?' selected="selected"':"")+'">Alphanumerics &amp; Punctuation ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-punctuation-'+i+'-e"'+((field.expected==="alphanumerics-punctuation-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics &amp; Punctuation ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-'+i+'"'+((field.expected==="alphanumerics-"+i)?' selected="selected"':"")+'">Alphanumerics ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-'+i+'-e"'+((field.expected==="alphanumerics-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphabetics Only">';for(i=1;i<=25;i++){form+='<option value="alphabetics-'+i+'"'+((field.expected==="alphabetics-"+i)?' selected="selected"':"")+'">Alphabetics ( '+i+" character minimum )</option>";form+='<option value="alphabetics-'+i+'-e"'+((field.expected==="alphabetics-"+i+"-e")?' selected="selected"':"")+'">Alphabetics ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Numeric Digits Only">';for(i=1;i<=25;i++){form+='<option value="numerics-'+i+'"'+((field.expected==="numerics-"+i)?' selected="selected"':"")+'">Numeric Digits ( '+i+" digit minimum )</option>";form+='<option value="numerics-'+i+'-e"'+((field.expected==="numerics-"+i+"-e")?' selected="selected"':"")+'">Numeric Digits ( exactly '+i+" digit"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+="</select><br />";form+="<small>Only Users/Members will be required to meet this criteria.</small><br />";form+="<small>* Administrators are exempt from this.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">Applicable Membership Levels: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">';form+='<td colspan="2">';form+='<input type="text" property="levels" value="'+esc_attr(field.levels)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels" /><br />';form+="<small>Please use comma-delimited Level #'s: <code>0,1,2,3,4</code> or type: <code>all</code>.</small><br />";form+="<small>This allows you to enable this field - only at specific Membership Levels.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">Allow Profile Edits: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<td colspan="2">';form+='<select property="editable" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<option value="yes"'+((field.editable==="yes")?' selected="selected"':"")+'">Yes ( editable )</option>';form+='<option value="no"'+((field.editable==="no")?' selected="selected"':"")+'">No ( uneditable after registration )</option>';form+='<option value="no-invisible"'+((field.editable==="no-invisible")?' selected="selected"':"")+'">No ( uneditable &amp; totally invisible after registration )</option>';form+='<option value="yes-invisible"'+((field.editable==="yes-invisible")?' selected="selected"':"")+'">Yes ( editable after registration / invisible during registration )</option>';form+="</select><br />";form+="<small>If <code>No</code>, this field will be un-editable after registration.</small><br />";form+="<small>* Administrators are exempt from this.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">CSS Classes: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">';form+='<td colspan="2">';form+='<input type="text" property="classes" value="'+esc_attr(field.classes)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes" /><br />';form+="<small>Example: <code>my-style-1 my-style-2</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">CSS Styles: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">';form+='<td colspan="2">';form+='<input type="text" property="styles" value="'+esc_attr(field.styles)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles" /><br />';form+="<small>Example: <code>color:#000000; background:#FFFFFF;</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">Other Attributes: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">';form+='<td colspan="2">';form+='<input type="text" property="attrs" value="'+esc_attr(field.attrs)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs" /><br />';form+='<small>Example: <code>onkeyup="" onblur=""</code></small>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-buttons"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-buttons">';form+='<td align="left">';form+='<input type="button" value="Cancel" onclick="ws_plugin__s2member_customRegFieldCancel();" />';form+="</td>";form+='<td align="right">';form+='<input type="button" value="'+((editing)?"Update This Field":"Create Registration Field")+'" onclick="'+((editing)?"ws_plugin__s2member_customRegFieldUpdate("+index+");":"ws_plugin__s2member_customRegFieldCreate();")+'" />';form+="</td>";form+="</tr>";form+="</tbody>";form+="</table>";form+="<div>";$("body").append(form);tb_show(((editing)?"Editing Registration Field":"New Custom Registration Field"),"#TB_inline?inlineId=ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form"),$(window).trigger("resize");$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form").show()}$tools.html(html)};var attachTBResizer=function(){$(window).resize(function(){var w,h;w=$(window).width(),h=$(window).height(),w=(w>720)?720:w;$("#TB_ajaxContent").css({width:w-50,height:h-75,margin:0,padding:0})})};var buildTable=function(){var l=fields.length,i=0,html="",eo="o";html+="<tbody>";html+="<tr>";html+="<th>Order</th>";html+="<th>Field Type</th>";html+="<th>Unique ID</th>";html+="<th>Required</th>";html+="<th>Levels</th>";html+="<th>- Tools -</th>";html+="</tr>";if(fields.length>0){for(i=0;i<fields.length;i++){html+='<tr class="'+esc_attr((eo=(eo==="o")?"e":"o"))+((fields[i].section==="yes")?" s":"")+" ws-plugin--s2member-custom-reg-field-configuration-table-row-"+i+'">';html+='<td nowrap="nowrap"><a class="ws-plugin--s2member-custom-reg-field-configuration-move-up" href="#" onclick="ws_plugin__s2member_customRegFieldMoveUp('+i+'); return false;"></a><a class="ws-plugin--s2member-custom-reg-field-configuration-move-down" href="#" onclick="ws_plugin__s2member_customRegFieldMoveDown('+i+'); return false;"></a></td>';html+='<td nowrap="nowrap">'+esc_html(fieldTypeDesc(fields[i].type))+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].id)+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].required)+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].levels)+"</td>";html+='<td nowrap="nowrap"><a class="ws-plugin--s2member-custom-reg-field-configuration-edit" href="#" onclick="ws_plugin__s2member_customRegFieldEdit('+i+'); return false;"></a><a class="ws-plugin--s2member-custom-reg-field-configuration-delete" href="#" onclick="ws_plugin__s2member_customRegFieldDelete('+i+'); return false;"></a></td>';html+="</tr>"}}else{html+="<tr>";html+='<td colspan="6">No Custom Fields are configured.</td>';html+="</tr>"}html+="</tbody>";$table.html(html)};buildTools(),attachTBResizer(),buildTable()})()}}if(location.href.match(/page\=ws-plugin--s2member-res-ops/)){$("input#ws-plugin--s2member-brute-force-restrictions-reset-button").click(function(){var $this=$(this);$this.val("one moment please ...");$.post(ajaxurl,{action:"ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax",ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'},function(response){alert("s2Member's Brute Force Restriction Logs have all been reset."),$this.val("Reset Brute Force Logs")});return false});$("input#ws-plugin--s2member-ip-restrictions-reset-button").click(function(){var $this=$(this);$this.val("one moment please ...");$.post(ajaxurl,{action:"ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax",ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'},function(response){alert("s2Member's IP Restriction Logs have all been reset."),$this.val("Reset IP Restriction Logs")});return false});$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query[]"]').change(function(){var thisChange=$(this).val();$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query[]"]').each(function(){var $this=$(this),val=$this.val(),checkboxes='input[type="checkbox"]';if(val==="all"&&this.checked){$this.nextAll(checkboxes).attr({checked:"checked",disabled:"disabled"})}else{if(val==="all"&&!this.checked){$this.nextAll(checkboxes).removeAttr("disabled");(thisChange==="all")?$this.nextAll(checkboxes).removeAttr("checked"):null}}})}).last().trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-down-ops/)){var updateCloudFrontPrivateKey=function(){var $hiddenPrivateKey=$("input#ws-plugin--s2member-amazon-cf-files-private-key");var $visiblePrivateKeyEntry=$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry");var hiddenPrivateKeyValue=$.trim($hiddenPrivateKey.val()),visiblePrivateKeyEntryValue=$.trim($visiblePrivateKeyEntry.val());if((hiddenPrivateKeyValue&&!visiblePrivateKeyEntryValue)||visiblePrivateKeyEntryValue.match(/[^\r\n\u25CF]/)){$hiddenPrivateKey.val(visiblePrivateKeyEntryValue),$visiblePrivateKeyEntry.val(visiblePrivateKeyEntryValue.replace(/[^\r\n]/g,String.fromCharCode(9679)))}};$("form#ws-plugin--s2member-options-form").submit(updateCloudFrontPrivateKey);$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry").change(updateCloudFrontPrivateKey).trigger("change");var updateCloudFrontDistroCfgs=function(){var $hiddenPrivateKey=$("input#ws-plugin--s2member-amazon-cf-files-private-key");var $visiblePrivateKeyId=$("input#ws-plugin--s2member-amazon-cf-files-private-key-id");var $autoConfigDistros=$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros");var $autoConfigDistrosStatus=$("input#ws-plugin--s2member-amazon-cf-files-distros-auto-config-status");var autoConfigDistrosStatusValue=$.trim($autoConfigDistrosStatus.val());var hiddenPrivateKeyValue=$.trim($hiddenPrivateKey.val()),visiblePrivateKeyIdValue=$.trim($visiblePrivateKeyId.val());var hiddenPrivateKeyPrevConfigValue=$.trim($hiddenPrivateKey.attr("data-s-prev-config-value")),visiblePrivateKeyIdPrevConfigValue=$.trim($visiblePrivateKeyId.attr("data-s-prev-config-value"));if(autoConfigDistrosStatusValue==="configured"&&((visiblePrivateKeyIdPrevConfigValue&&visiblePrivateKeyIdValue!==visiblePrivateKeyIdPrevConfigValue)||(hiddenPrivateKeyPrevConfigValue&&hiddenPrivateKeyValue!==hiddenPrivateKeyPrevConfigValue))){alert("s2Member will need to delete and re-configure your Amazon® CloudFront distributions if you change this. When you're done editing, click (Save All Changes) below.");$autoConfigDistros.attr("checked","checked")}else{if(autoConfigDistrosStatusValue!=="configured"&&visiblePrivateKeyIdValue&&hiddenPrivateKeyValue){alert("s2Member will need to auto-configure your Amazon® CloudFront distributions for you. When you're done editing, click (Save All Changes) below.");$autoConfigDistros.attr("checked","checked")}}};$("input#ws-plugin--s2member-amazon-cf-files-private-key-id").change(updateCloudFrontDistroCfgs);$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry").change(updateCloudFrontDistroCfgs);$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros-w-cnames").change(function(){var $this=$(this),thisChecked=(this.checked)?true:false;var $autoConfigDistros=$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros");var $autoConfigDistroCnames=$("div#ws-plugin--s2member-amazon-cf-files-auto-configure-distro-cnames");(thisChecked)?$autoConfigDistroCnames.show():$autoConfigDistroCnames.hide();(thisChecked)?$autoConfigDistros.attr("checked","checked"):null}).trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-paypal-ops/)){$("select#ws-plugin--s2member-auto-eot-system-enabled").change(function(){var $this=$(this),val=$this.val();var $viaCron=$("p#ws-plugin--s2member-auto-eot-system-enabled-via-cron");if(val==2){$viaCron.show()}else{$viaCron.hide()}})}if(location.href.match(/page\=ws-plugin--s2member-paypal-buttons/)){$("div.ws-menu-page select[id]").filter(function(){return this.id.match(/^ws-plugin--s2member-(level[1-9][0-9]*|modification)-term$/)}).change(function(){var button=this.id.replace(/^ws-plugin--s2member-(.+?)-term$/g,"$1");var trialDisabled=($(this).val().split("-")[2].replace(/[^0-1BN]/g,"")==="BN")?1:0;$("p#ws-plugin--s2member-"+button+"-trial-line").css("display",(trialDisabled?"none":""));$("span#ws-plugin--s2member-"+button+"-trial-then").css("display",(trialDisabled?"none":""));$("span#ws-plugin--s2member-"+button+"-20p-rule").css("display",(trialDisabled?"none":""));(trialDisabled)?$("input#ws-plugin--s2member-"+button+"-trial-period").val(0):null;(trialDisabled)?$("input#ws-plugin--s2member-"+button+"-trial-amount").val("0.00"):null});$("div.ws-menu-page input[id]").filter(function(){return this.id.match(/^ws-plugin--s2member-(level[1-9][0-9]*|modification|ccap)-ccaps$/)}).keyup(function(){var value=this.value.replace(/^(-all|-al|-a|-)[;,]*/gi,""),_all=(this.value.match(/^(-all|-al|-a|-)[;,]*/i))?"-all,":"";if(value.match(/[^a-z_0-9,]/)){this.value=_all+$.trim($.trim(value).replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase())}});ws_plugin__s2member_paypalButtonGenerate=function(button){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="",labels={};eval("<?php echo c_ws_plugin__s2member_utils_strings::esc_dq($labels); ?>");var shortCode=$("input#ws-plugin--s2member-"+button+"-shortcode");var code=$("textarea#ws-plugin--s2member-"+button+"-button");var modLevel=$("select#ws-plugin--s2member-modification-level");var level=(button==="modification")?modLevel.val().split(":",2)[1]:button.replace(/^level/,"");var label=labels["level"+level].replace(/"/g,"");var desc=$.trim($("input#ws-plugin--s2member-"+button+"-desc").val().replace(/"/g,""));var trialAmount=$("input#ws-plugin--s2member-"+button+"-trial-amount").val().replace(/[^0-9\.]/g,"");var trialPeriod=$("input#ws-plugin--s2member-"+button+"-trial-period").val().replace(/[^0-9]/g,"");var trialTerm=$("select#ws-plugin--s2member-"+button+"-trial-term").val().replace(/[^A-Z]/g,"");var regAmount=$("input#ws-plugin--s2member-"+button+"-amount").val().replace(/[^0-9\.]/g,"");var regPeriod=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[0].replace(/[^0-9]/g,"");var regTerm=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[1].replace(/[^A-Z]/g,"");var regRecur=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[2].replace(/[^0-1BN]/g,"");var regRecurTimes="",regRecurRetry="1";var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-"+button+"-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-"+button+"-currency").val().replace(/[^A-Z]/g,"");var cCaps=$.trim($.trim($("input#ws-plugin--s2member-"+button+"-ccaps").val()).replace(/^(-all|-al|-a|-)[;,]*/gi,"").replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());cCaps=($.trim($("input#ws-plugin--s2member-"+button+"-ccaps").val()).match(/^(-all|-al|-a|-)[;,]*/i))?((cCaps)?"-all,":"-all")+cCaps.toLowerCase():cCaps.toLowerCase();trialPeriod=(regRecur==="BN")?"0":trialPeriod;trialAmount=(!trialAmount||isNaN(trialAmount)||trialAmount<0.01||trialPeriod<=0)?"0":trialAmount;var levelCcapsPer=(regRecur==="BN"&&regTerm!=="L")?level+":"+cCaps+":"+regPeriod+" "+regTerm:level+":"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(trialAmount!=="0"&&(isNaN(trialAmount)||trialAmount<0)){alert("— Oops, a slight problem: —\n\nWhen provided, Trial Amount must be >= 0.00");return false}else{if(trialAmount!=="0"&&trialAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Trial Amount is: 10000.00");return false}else{if(trialTerm==="D"&&trialPeriod>7){alert("— Oops, a slight problem: —\n\nMaximum Trial Days is: 7.\nIf you want to offer more than 7 days, please choose Weeks or Months from the drop-down.");return false}else{if(trialTerm==="W"&&trialPeriod>52){alert("— Oops, a slight problem: —\n\nMaximum Trial Weeks is: 52.\nIf you want to offer more than 52 weeks, please choose Months from the drop-down.");return false}else{if(trialTerm==="M"&&trialPeriod>12){alert("— Oops, a slight problem: —\n\nMaximum Trial Months is: 12.\nIf you want to offer more than 12 months, please choose Years from the drop-down.");return false}else{if(trialTerm==="Y"&&trialPeriod>1){alert("— Oops, a slight problem: —\n\nMax Trial Period Years is: 1.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}}}}}}code.html(code.val().replace(/ \<\!--(\<input type\="hidden" name\="(amount|src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\>)--\>/g," $1"));(parseInt(trialPeriod)<=0)?code.html(code.val().replace(/ (\<input type\="hidden" name\="(a1|p1|t1)" value\="(.*?)" \/\>)/g," <!--$1-->")):null;(regRecur==="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g," $1_xclick$3")):null;(regRecur==="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="(src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\>)/g," <!--$1-->")):null;(regRecur!=="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g," $1_xclick-subscriptions$3")):null;(regRecur!=="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="amount" value\="(.*?)" \/\>)/g," <!--$1-->")):null;shortCodeTemplateAttrs+=(button==="modification")?'modify="1" ':"";shortCodeTemplateAttrs+='level="'+esc_attr(level)+'" ccaps="'+esc_attr(cCaps)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'" custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"';shortCodeTemplateAttrs+=' ta="'+esc_attr(trialAmount)+'" tp="'+esc_attr(trialPeriod)+'" tt="'+esc_attr(trialTerm)+'" ra="'+esc_attr(regAmount)+'" rp="'+esc_attr(regPeriod)+'" rt="'+esc_attr(regTerm)+'" rr="'+esc_attr(regRecur)+'" rrt="'+esc_attr(regRecurTimes)+'" rra="'+esc_attr(regRecurRetry)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(levelCcapsPer)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="modify" value\="(.*?)"/,' name="modify" value="'+((button==="modification")?"1":"0")+'"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));code.html(code.val().replace(/ name\="src" value\="(.*?)"/,' name="src" value="'+esc_attr(regRecur)+'"'));code.html(code.val().replace(/ name\="srt" value\="(.*?)"/,' name="srt" value="'+esc_attr(regRecurTimes)+'"'));code.html(code.val().replace(/ name\="sra" value\="(.*?)"/,' name="sra" value="'+esc_attr(regRecurRetry)+'"'));code.html(code.val().replace(/ name\="a1" value\="(.*?)"/,' name="a1" value="'+esc_attr(trialAmount)+'"'));code.html(code.val().replace(/ name\="p1" value\="(.*?)"/,' name="p1" value="'+esc_attr(trialPeriod)+'"'));code.html(code.val().replace(/ name\="t1" value\="(.*?)"/,' name="t1" value="'+esc_attr(trialTerm)+'"'));code.html(code.val().replace(/ name\="a3" value\="(.*?)"/,' name="a3" value="'+esc_attr(regAmount)+'"'));code.html(code.val().replace(/ name\="p3" value\="(.*?)"/,' name="p3" value="'+esc_attr(regPeriod)+'"'));code.html(code.val().replace(/ name\="t3" value\="(.*?)"/,' name="t3" value="'+esc_attr(regTerm)+'"'));$("div#ws-plugin--s2member-"+button+"-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));(button==="modification")?alert("Your Modification Button has been generated.\nPlease copy/paste the Shortcode Format into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Modification Buttons should be displayed to existing Users/Members, and they should be logged-in, BEFORE clicking this Button."):alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Membership Options Page.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalCcapButtonGenerate=function(){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="";var shortCode=$("input#ws-plugin--s2member-ccap-shortcode");var code=$("textarea#ws-plugin--s2member-ccap-button");var desc=$.trim($("input#ws-plugin--s2member-ccap-desc").val().replace(/"/g,""));var regAmount=$("input#ws-plugin--s2member-ccap-amount").val().replace(/[^0-9\.]/g,"");var regPeriod=$("select#ws-plugin--s2member-ccap-term").val().split("-")[0].replace(/[^0-9]/g,"");var regTerm=$("select#ws-plugin--s2member-ccap-term").val().split("-")[1].replace(/[^A-Z]/g,"");var regRecur=$("select#ws-plugin--s2member-ccap-term").val().split("-")[2].replace(/[^0-1BN]/g,"");var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-ccap-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-ccap-currency").val().replace(/[^A-Z]/g,"");var cCaps=$.trim($.trim($("input#ws-plugin--s2member-ccap-ccaps").val()).replace(/^(-all|-al|-a|-)[;,]*/gi,"").replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());cCaps=($.trim($("input#ws-plugin--s2member-ccap-ccaps").val()).match(/^(-all|-al|-a|-)[;,]*/i))?((cCaps)?"-all,":"-all")+cCaps.toLowerCase():cCaps.toLowerCase();var levelCcapsPer=(regRecur==="BN"&&regTerm!=="L")?"*:"+cCaps+":"+regPeriod+" "+regTerm:"*:"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(!cCaps||cCaps==="-all"){alert("— Oops, a slight problem: —\n\nPlease provide at least one Custom Capability.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}shortCodeTemplateAttrs+='level="*" ccaps="'+esc_attr(cCaps)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'"';shortCodeTemplateAttrs+=' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="'+esc_attr(regAmount)+'" rp="'+esc_attr(regPeriod)+'" rt="'+esc_attr(regTerm)+'" rr="'+esc_attr(regRecur)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(levelCcapsPer)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));$("div#ws-plugin--s2member-ccap-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Independent Custom Capability Buttons should ONLY be displayed to existing Users/Members, and they MUST be logged-in, BEFORE clicking this Button.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalSpButtonGenerate=function(){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="";var shortCode=$("input#ws-plugin--s2member-sp-shortcode");var code=$("textarea#ws-plugin--s2member-sp-button");var leading=$("select#ws-plugin--s2member-sp-leading-id").val().replace(/[^0-9]/g,"");var additionals=$("select#ws-plugin--s2member-sp-additional-ids").val()||[];var hours=$("select#ws-plugin--s2member-sp-hours").val().replace(/[^0-9]/g,"");var regAmount=$("input#ws-plugin--s2member-sp-amount").val().replace(/[^0-9\.]/g,"");var desc=$.trim($("input#ws-plugin--s2member-sp-desc").val().replace(/"/g,""));var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-sp-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-sp-currency").val().replace(/[^A-Z]/g,"");if(!leading){alert("— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it's because you've not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}for(var i=0,ids=leading;i<additionals.length;i++){if(additionals[i]&&additionals[i]!==leading){ids+=","+additionals[i]}}var spIdsHours="sp:"+ids+":"+hours;shortCodeTemplateAttrs+='sp="1" ids="'+esc_attr(ids)+'" exp="'+esc_attr(hours)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'"';shortCodeTemplateAttrs+=' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="'+esc_attr(regAmount)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(spIdsHours)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));$("div#ws-plugin--s2member-sp-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your WordPress® Editor.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalRegLinkGenerate=function(){var level=$("select#ws-plugin--s2member-reg-link-level").val().replace(/[^0-9]/g,"");var subscrID=$.trim($("input#ws-plugin--s2member-reg-link-subscr-id").val());var custom=$.trim($("input#ws-plugin--s2member-reg-link-custom").val());var cCaps=$.trim($.trim($("input#ws-plugin--s2member-reg-link-ccaps").val()).replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());var fixedTerm=$.trim($("input#ws-plugin--s2member-reg-link-fixed-term").val().replace(/[^A-Z 0-9]/gi,"").toUpperCase());var $link=$("p#ws-plugin--s2member-reg-link"),$loading=$("img#ws-plugin--s2member-reg-link-loading");var levelCcapsPer=(fixedTerm&&!fixedTerm.match(/L$/))?level+":"+cCaps+":"+fixedTerm:level+":"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(!subscrID){alert("— Oops, a slight problem: —\n\nPaid Subscr. ID is a required value.");return false}else{if(!custom||custom.indexOf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq ($_SERVER["HTTP_HOST"]); ?>')!==0){alert("— Oops, a slight problem: —\n\nThe Custom Value MUST start with your domain name.");return false}else{if(fixedTerm&&!fixedTerm.match(/^[1-9]+ (D|W|M|Y|L)$/)){alert("— Oops, a slight problem: —\n\nThe Fixed Term Length is not formatted properly.");return false}}}$link.hide(),$loading.show(),$.post(ajaxurl,{action:"ws_plugin__s2member_reg_access_link_via_ajax",ws_plugin__s2member_reg_access_link_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-reg-access-link-via-ajax")); ?>',s2member_reg_access_link_subscr_gateway:"paypal",s2member_reg_access_link_subscr_id:subscrID,s2member_reg_access_link_custom:custom,s2member_reg_access_link_item_number:levelCcapsPer},function(response){$link.show().html('<a href="'+esc_attr(response)+'" target="_blank" rel="external">'+esc_html(response)+"</a>"),$loading.hide()});return false};ws_plugin__s2member_paypalSpLinkGenerate=function(){var leading=$("select#ws-plugin--s2member-sp-link-leading-id").val().replace(/[^0-9]/g,"");var additionals=$("select#ws-plugin--s2member-sp-link-additional-ids").val()||[];var hours=$("select#ws-plugin--s2member-sp-link-hours").val().replace(/[^0-9]/g,"");var $link=$("p#ws-plugin--s2member-sp-link"),$loading=$("img#ws-plugin--s2member-sp-link-loading");if(!leading){alert("— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it's because you've not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.");return false}for(var i=0,ids=leading;i<additionals.length;i++){if(additionals[i]&&additionals[i]!==leading){ids+=","+additionals[i]}}$link.hide(),$loading.show(),$.post(ajaxurl,{action:"ws_plugin__s2member_sp_access_link_via_ajax",ws_plugin__s2member_sp_access_link_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-sp-access-link-via-ajax")); ?>',s2member_sp_access_link_ids:ids,s2member_sp_access_link_hours:hours},function(response){$link.show().html('<a href="'+esc_attr(response)+'" target="_blank" rel="external">'+esc_html(response)+"</a>"),$loading.hide()});return false}}if(location.href.match(/page\=ws-plugin--s2member-els-ops/)){$("select#ws-plugin--s2member-custom-reg-opt-in").change(function(){var $this=$(this),val=$this.val();var $rows=$("tr.ws-plugin--s2member-custom-reg-opt-in-label-row");var $prevImg=$("img.ws-plugin--s2member-custom-reg-opt-in-label-prev-img");if(val<=0){$rows.css("display","none"),$prevImg.attr("src",$prevImg.attr("src").replace(/\/checked\.png$/,"/unchecked.png"))}else{if(val==1){$rows.css("display",""),$prevImg.attr("src",$prevImg.attr("src").replace(/\/unchecked\.png$/,"/checked.png"))}else{if(val==2){$rows.css("display",""),$prevImg.attr("src",$prevImg.attr("src").replace(/\/checked\.png$/,"/unchecked.png"))}}}});$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs[]"]').change(function(){var thisChange=$(this).val(),checkedIndexes=[];$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs[]"]').each(function(){var $this=$(this),val=$this.val(),checkboxes='input[type="checkbox"]';if(val==="removal-deletion"&&this.checked){$this.nextAll(checkboxes).slice(0,2).attr({checked:"checked",disabled:"disabled"})}else{if(val==="removal-deletion"&&!this.checked){$this.nextAll(checkboxes).slice(0,2).removeAttr("disabled");(thisChange==="removal-deletion")?$this.nextAll(checkboxes).slice(0,2).removeAttr("checked"):null}else{if(val==="modification"&&this.checked){$this.nextAll(checkboxes).slice(0,3).attr({checked:"checked",disabled:"disabled"})}else{if(val==="modification"&&!this.checked){(thisChange==="modification")?$this.nextAll(checkboxes).slice(0,3).removeAttr("checked"):null;$this.nextAll(checkboxes).slice(0,3).removeAttr("disabled")}}}}}).each(function(index){(this.checked)?checkedIndexes.push(index):null});$("select#ws-plugin--s2member-custom-reg-auto-opt-out-transitions").removeAttr("disabled");if($.inArray(3,checkedIndexes)===-1&&$.inArray(4,checkedIndexes)===-1&&$.inArray(5,checkedIndexes)===-1&&$.inArray(6,checkedIndexes)===-1){$("select#ws-plugin--s2member-custom-reg-auto-opt-out-transitions").attr("disabled","disabled")}}).last().trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-integrations/)){$("select#ws-plugin--s2member-bbpress-ovg").change(function(){if($(this).val()==="0"){$("span#ws-plugin--s2member-bbpress-ovg-off-note").css("display","inline");var l='form#ws-plugin--s2member-bridge-bbpress-form label[for="ws_plugin--s2member-bridge-bbpress-min-level"]';$(l).text($(l).text().replace(/to (read\/)?participate/i,"to read/participate")),$("select#ws-plugin--s2member-bbpress-min-level option").each(function(){$(this).text($(this).text().replace(/\( to( read and)? participate \)/i,"( to read and participate )"))})}else{if($(this).val()==="1"){$("span#ws-plugin--s2member-bbpress-ovg-off-note").css("display","none");var l='form#ws-plugin--s2member-bridge-bbpress-form label[for="ws_plugin--s2member-bridge-bbpress-min-level"]';$(l).text($(l).text().replace(/to (read\/)?participate/i,"to participate")),$("select#ws-plugin--s2member-bbpress-min-level option").each(function(){$(this).text($(this).text().replace(/\( to( read and)? participate \)/i,"( to participate )"))})}}}).trigger("change")}});
1
+ jQuery(document).ready(function($){var esc_attr=esc_html=function(str){return String(str).replace(/"/g,"&quot;").replace(/\</g,"&lt;").replace(/\>/g,"&gt;")};if(location.href.match(/page\=ws-plugin--s2member/)){$("input.ws-plugin--s2member-update-roles-button, input.ws-plugin--s2member-reset-roles-button").click(function(){var $this=$(this);$this.val("one moment please ...");var levels='<?php echo (int)$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; ?>';var resetUpdate=($this.hasClass("ws-plugin--s2member-reset-roles-button"))?"Reset":"Update";$.post(ajaxurl,{action:"ws_plugin__s2member_update_roles_via_ajax",ws_plugin__s2member_update_roles_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-update-roles-via-ajax")); ?>'},function(response){if(response==="1"){alert("s2Member's Roles/Capabilities "+((resetUpdate.toLowerCase()==="reset")?"have been successfully reset":"updated successfully")+".\nYour installation of s2Member has Membership Levels 0-"+levels+"."),$this.val(resetUpdate+" Roles/Capabilities")}else{if(response==="l"){alert("Sorry, your request failed.\ns2Member's Roles/Capabilities are locked by Filter:\nws_plugin__s2member_lock_roles_caps"),$this.val(resetUpdate+" Roles/Capabilities")}else{alert("Sorry, your request failed.\nAccess denied. Do you have the ability to `create_users`?"),$this.val(resetUpdate+" Roles/Capabilities")}}});return false})}if(location.href.match(/page\=ws-plugin--s2member-mms-ops/)){$("select#ws-plugin--s2member-mms-registration-file").change(function(){if($(this).val()==="wp-signup"){var gv=$("select#ws-plugin--s2member-mms-registration-grants").val(),l0v=$("input#ws-plugin--s2member-mms-registration-blogs-level0").val();$("div#ws-plugin--s2member-mms-registration-support-package-details-wrapper").show(),$("div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login").hide(),$("div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup").show();$("div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0")[((gv==="all")?"show":"hide")]();$("input#ws-plugin--s2member-mms-registration-blogs-level0").val(((gv==="all")?((l0v>0)?l0v:"1"):"0"))}else{if($(this).val()==="wp-login"){var gv=$("select#ws-plugin--s2member-mms-registration-grants").val(),l0v=$("input#ws-plugin--s2member-mms-registration-blogs-level0").val();$("div#ws-plugin--s2member-mms-registration-support-package-details-wrapper").hide(),$("div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login").show(),$("div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup").hide();$("div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0").hide();$("input#ws-plugin--s2member-mms-registration-blogs-level0").val("0")}}}).trigger("change");$("select#ws-plugin--s2member-mms-registration-grants").change(function(){$("select#ws-plugin--s2member-mms-registration-file").trigger("change")})}if(location.href.match(/page\=ws-plugin--s2member-gen-ops/)){ws_plugin__s2member_generateSecurityKey=function(){var mt_rand=function(min,max){min=(arguments.length<1)?0:min;max=(arguments.length<2)?2147483647:max;return Math.floor(Math.random()*(max-min+1))+min};var chars="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()";for(var i=0,key="";i<64;i++){key+=chars.substr(mt_rand(0,chars.length-1),1)}$("input#ws-plugin--s2member-sec-encryption-key").val(key);return false};ws_plugin__s2member_enableSecurityKey=function(){if(confirm("Edit Key? Are you sure?\nThis could break your installation!\n\n*Note* If you've been testing s2Member, feel free to change this Key before you go live. Just don't go live, and then change it. You'll have unhappy Customers. Data corruption WILL occur! For your safety, s2Member keeps a history of the last 10 Keys that you've used. If you get yourself into a real situation, s2Member will let you revert back to a previous Key.")){$("input#ws-plugin--s2member-sec-encryption-key").removeAttr("disabled")}return false};ws_plugin__s2member_securityKeyHistory=function(){$("div#ws-plugin--s2member-sec-encryption-key-history").toggle();return false};$("select#ws-plugin--s2member-new-user-emails-enabled").change(function(){var $pluggable=$("input#ws-plugin--s2member-pluggables-wp-new-user-notification"),$this=$(this),$newUserEmails=$("div#ws-plugin--s2member-new-user-emails");if($pluggable.val()==="0"||$this.val()==="0"){($pluggable.val()==="0")?$this.attr("disabled","disabled"):$this.removeAttr("disabled");$(":input",$newUserEmails).attr("disabled","disabled"),$newUserEmails.css("opacity","0.5")}else{$this.removeAttr("disabled"),$(":input",$newUserEmails).removeAttr("disabled"),$newUserEmails.css("opacity","")}}).trigger("change");if($("input#ws-plugin--s2member-custom-reg-fields").length&&$("div#ws-plugin--s2member-custom-reg-field-configuration").length){(function(){var i,fieldDefaults,tools,table,$tools,$table;var $fields=$("input#ws-plugin--s2member-custom-reg-fields");var $configuration=$("div#ws-plugin--s2member-custom-reg-field-configuration");var fields=($fields.val())?$.JSON.parse($fields.val()):[];fields=(fields instanceof Array)?fields:[];fieldDefaults={section:"no",sectitle:"",id:"",label:"",type:"text",deflt:"",options:"",expected:"",required:"yes",levels:"all",editable:"yes",classes:"",styles:"",attrs:""};for(i=0;i<fields.length;i++){fields[i]=$.extend(true,{},fieldDefaults,fields[i])}tools='<div id="ws-plugin--s2member-custom-reg-field-configuration-tools"></div>',table='<table id="ws-plugin--s2member-custom-reg-field-configuration-table"></table>';$configuration.html(tools+table);$tools=$("div#ws-plugin--s2member-custom-reg-field-configuration-tools"),$table=$("table#ws-plugin--s2member-custom-reg-field-configuration-table");ws_plugin__s2member_customRegFieldSectionChange=function(select){var section=$(select).val();var sectitle_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle";(section==="yes")?$(sectitle_trs).css("display",""):$(sectitle_trs).css("display","none")};ws_plugin__s2member_customRegFieldTypeChange=function(select){var type=$(select).val();var deflt_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt",options_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-options",expected_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected";(type.match(/^(text|textarea)$/))?$(deflt_trs).css("display",""):$(deflt_trs).css("display","none");(type.match(/^(select|selects|checkboxes|radios)$/))?$(options_trs).css("display",""):$(options_trs).css("display","none");(type.match(/^(text|textarea)$/))?$(expected_trs).css("display",""):$(expected_trs).css("display","none")};ws_plugin__s2member_customRegFieldDelete=function(index){var newFields=new Array();for(var i=0;i<fields.length;i++){if(i!==index){newFields.push(fields[i])}}fields=newFields,updateFields(),buildTable()};ws_plugin__s2member_customRegFieldMoveUp=function(index){if(typeof fields[index]==="object"&&typeof fields[index-1]==="object"){var prevFieldObj=fields[index-1],thisFieldObj=fields[index];fields[index-1]=thisFieldObj,fields[index]=prevFieldObj;updateFields(),buildTable()}};ws_plugin__s2member_customRegFieldMoveDown=function(index){if(typeof fields[index]==="object"&&typeof fields[index+1]==="object"){var nextFieldObj=fields[index+1],thisFieldObj=fields[index];fields[index+1]=thisFieldObj,fields[index]=nextFieldObj;updateFields(),buildTable()}};ws_plugin__s2member_customRegFieldCreate=function(){var $table=$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form"),field={};$(":input[property]",$table).each(function(){var $this=$(this),property=$this.attr("property"),val=$.trim($this.val());field[property]=val});if((field=validateField(field))){fields.push(field),updateFields(),buildTools(),buildTable(),scrollReset();setTimeout(function(){var row="tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-"+(fields.length-1);alert('Field created successfully.\n* Remember to "Save All Changes".');$(row).effect("highlight",1500)},500)}};ws_plugin__s2member_customRegFieldUpdate=function(index){var $table=$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form"),field={};$(":input[property]",$table).each(function(){var $this=$(this),property=$this.attr("property"),val=$.trim($this.val());field[property]=val});if((field=validateField(field,index))){fields[index]=field,updateFields(),buildTools(),buildTable(),scrollReset();setTimeout(function(){var row="tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-"+index;alert('Field updated successfully.\n* Remember to "Save All Changes".');$(row).effect("highlight",1500)},500)}};ws_plugin__s2member_customRegFieldAdd=function(){buildTools(true)};ws_plugin__s2member_customRegFieldEdit=function(index){buildTools(false,index),scrollReset()};ws_plugin__s2member_customRegFieldCancel=function(){buildTools(),scrollReset()};var validateField=function(field,index){var editing=(typeof index==="number"&&typeof fields[index]==="object")?true:false,errors=[],options,i;if(typeof field!=="object"||typeof(field=$.extend(true,{},fieldDefaults,field))!=="object"){alert("Invalid field object. Please try again.");return false}field.sectitle=(field.section==="yes")?field.sectitle:"";field.deflt=(field.type.match(/^(text|textarea)$/))?field.deflt:"";field.deflt=(field.type.match(/^(text)$/))?field.deflt.replace(/[\r\n\t ]+/g," "):field.deflt;field.options=(field.type.match(/^(select|selects|checkboxes|radios)$/))?field.options:"";field.expected=(field.type.match(/^(text|textarea)$/))?field.expected:"";if(!field.id){errors.push("Unique Field ID:\nThis is required. Please try again.")}else{if(fieldIdExists(field.id)&&(!editing||field.id!==fields[index].id)){errors.push("Unique Field ID:\nThat Field ID already exists. Please try again.")}}if(!field.label){errors.push("Field Label/Description:\nThis is required. Please try again.")}if(field.type.match(/^(select|selects|checkboxes|radios)$/)&&!field.options){errors.push("Option Configuration File:\nThis is required. Please try again.")}else{if(field.type.match(/^(select|selects|checkboxes|radios)$/)){for(i=0;i<(options=field.options.split(/[\r\n]+/)).length;i++){if(!(options[i]=$.trim(options[i])).match(/^([^\|]*)(\|)([^\|]*)(\|default)?$/)){errors.push("Option Configuration File:\nInvalid configuration at line #"+(i+1)+".");break}}field.options=$.trim(options.join("\n"))}}if(!(field.levels=field.levels.replace(/ /g,""))){errors.push("Applicable Levels:\nThis is required. Please try again.")}else{if(!field.levels.match(/^(all|[0-9,]+)$/)){errors.push("Applicable Levels:\nShould be comma-delimited Levels, or just type: all.\n( examples: 0,1,2,3,4 or type the word: all )")}}if(field.classes&&field.classes.match(/[^a-z 0-9 _ \-]/i)){errors.push("CSS Classes:\nContains invalid characters. Please try again.\n( only: alphanumerics, underscores, hyphens, spaces )")}if(field.styles&&field.styles.match(/["\=\>\<]/)){errors.push('CSS Styles:\nContains invalid characters. Please try again.\n( do NOT use these characters: = " < > )')}if(field.attrs&&field.attrs.match(/[\>\<]/)){errors.push("Other Attributes:\nContains invalid characters. Please try again.\n( do NOT use these characters: < > )")}if(errors.length>0){alert(errors.join("\n\n"));return false}else{return field}};var updateFields=function(){$fields.val(((fields.length>0)?$.JSON.stringify(fields):""))};var fieldId2Var=function(fieldId){return(typeof fieldId==="string")?$.trim(fieldId).toLowerCase().replace(/[^a-z0-9]/g,"_"):""};var fieldTypeDesc=function(type){var types={text:"Text ( single line )",textarea:"Textarea ( multi-line )",select:"Select Menu ( drop-down )",selects:"Select Menu ( multi-option )",checkbox:"Checkbox ( single )",pre_checkbox:"Checkbox ( pre-checked )",checkboxes:"Checkboxes ( multi-option )",radios:"Radio Buttons ( multi-option )"};if(typeof types[type]==="string"){return types[type]}return""};var fieldIdExists=function(fieldId){for(var i=0;i<fields.length;i++){if(fields[i].id===fieldId){return true}}};var scrollReset=function(){scrollTo(0,$("div.ws-plugin--s2member-custom-reg-fields-section").offset()["top"]-100)};var buildTools=function(adding,index){var i=0,html="",form="",w=0,h=0,editing=(typeof index==="number"&&typeof fields[index]==="object")?true:false,displayForm=(adding||editing)?true:false,field=(editing)?$.extend(true,{},fieldDefaults,fields[index]):fieldDefaults;html+='<a href="#" onclick="ws_plugin__s2member_customRegFieldAdd(); return false;">Add New Field</a>';tb_remove(),$("div#ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form").remove();if(displayForm){form+='<div id="ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form">';form+='<table id="ws-plugin--s2member-custom-reg-field-configuration-tools-form">';form+="<tbody>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">Starts A New Section?</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<td colspan="2">';form+='<select property="section" onchange="ws_plugin__s2member_customRegFieldSectionChange(this);" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<option value="no"'+((field.section==="no")?' selected="selected"':"")+'">No ( this Field flows normally )</option>';form+='<option value="yes"'+((field.section==="yes")?' selected="selected"':"")+'">Yes ( this Field begins a new section )</option>';form+="</select><br />";form+="<small>Optional. Allows Fields to be grouped into sections.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"'+((field.section==="yes")?"":' style="display:none;"')+'><td colspan="2"><hr /></td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"'+((field.section==="yes")?"":' style="display:none;"')+">";form+='<td colspan="2">';form+="Title for this new section? ( optional )<br />";form+='<input type="text" property="sectitle" value="'+esc_attr(field.sectitle)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle" /><br />';form+="<small>If empty, a simple divider will be used by default.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-type"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">Form Field Type: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<td colspan="2">';form+='<select property="type" onchange="ws_plugin__s2member_customRegFieldTypeChange(this);" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<option value="text"'+((field.type==="text")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("text"))+"</option>";form+='<option value="textarea"'+((field.type==="textarea")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("textarea"))+"</option>";form+='<option value="select"'+((field.type==="select")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("select"))+"</option>";form+='<option value="selects"'+((field.type==="selects")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("selects"))+"</option>";form+='<option value="checkbox"'+((field.type==="checkbox")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("checkbox"))+"</option>";form+='<option value="pre_checkbox"'+((field.type==="pre_checkbox")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("pre_checkbox"))+"</option>";form+='<option value="checkboxes"'+((field.type==="checkboxes")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("checkboxes"))+"</option>";form+='<option value="radios"'+((field.type==="radios")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("radios"))+"</option>";form+="</select><br />";form+="<small>The options below may change, based on the Field Type you choose here.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-label"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">Field Label/Desc: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">';form+='<td colspan="2">';form+='<input type="text" property="label" value="'+esc_attr(field.label)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label" /><br />';form+="<small>Examples: <code>Choose Country</code>, <code>Street Address</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-id"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">Unique Field ID: *</label></label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">';form+='<td colspan="2">';form+='<input type="text" property="id" value="'+esc_attr(field.id)+'" maxlength="25" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id" /><br />';form+="<small>Examples: <code>country_code</code>, <code>street_address</code></small><br />";form+='<small>e.g. <code>[s2Get user_field="country_code" /]</code></small>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-required"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">Field Required: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<td colspan="2">';form+='<select property="required" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<option value="yes"'+((field.required==="yes")?' selected="selected"':"")+'">Yes ( required )</option>';form+='<option value="no"'+((field.required==="no")?' selected="selected"':"")+'">No ( optional )</option>';form+="</select><br />";form+='<small>If <code>yes</code>, only Users/Members will be "required" to enter this field.</small><br />';form+="<small>* Administrators are exempt from this requirement.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt">Default Text Value: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<textarea property="deflt" rows="1" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt">'+esc_html(field.deflt)+"</textarea><br />";form+="<small>Default value before user input is received.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options">Option Configuration File: * ( one option per line )</label><br />';form+="<small>Use a pipe <code>|</code> delimited format: <code>option value|option label</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<textarea property="options" rows="3" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options">'+esc_html(field.options)+"</textarea><br />";form+="Here is a quick example:<br />";form+="<small>You can also specify a <em>default</em> option:</small><br />";form+="<code>US|United States|default</code><br />";form+="<code>CA|Canada</code><br />";form+="<code>VI|Virgin Islands (U.S.)</code>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected">Expected Format: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<select property="expected" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected">';form+='<option value=""'+((field.expected==="")?' selected="selected"':"")+'">Anything Goes</option>';form+='<option disabled="disabled"></option>';form+='<optgroup label="Specific Input Types">';form+='<option value="numeric-wp-commas"'+((field.expected==="numeric-wp-commas")?' selected="selected"':"")+'">Numeric ( with or without decimals, commas allowed )</option>';form+='<option value="numeric"'+((field.expected==="numeric")?' selected="selected"':"")+'">Numeric ( with or without decimals, no commas )</option>';form+='<option value="integer"'+((field.expected==="integer")?' selected="selected"':"")+'">Integer ( whole number, without any decimals )</option>';form+='<option value="integer-gt-0"'+((field.expected==="integer-gt-0")?' selected="selected"':"")+'">Integer > 0 ( whole number, no decimals, greater than 0 )</option>';form+='<option value="float"'+((field.expected==="float")?' selected="selected"':"")+'">Float ( floating point number, decimals required )</option>';form+='<option value="float-gt-0"'+((field.expected==="float-gt-0")?' selected="selected"':"")+'">Float > 0 ( floating point number, decimals required, greater than 0 )</option>';form+='<option value="date"'+((field.expected==="date")?' selected="selected"':"")+'">Date ( required date format: dd/mm/yyyy )</option>';form+='<option value="email"'+((field.expected==="email")?' selected="selected"':"")+'">Email ( require valid email )</option>';form+='<option value="url"'+((field.expected==="url")?' selected="selected"':"")+'">Full URL ( starting with http or https )</option>';form+='<option value="domain"'+((field.expected==="domain")?' selected="selected"':"")+'">Domain Name ( domain name only, without http )</option>';form+='<option value="phone"'+((field.expected==="phone")?' selected="selected"':"")+'">Phone # ( 10 digits w/possible hyphens,spaces,brackets )</option>';form+='<option value="uszip"'+((field.expected==="uszip")?' selected="selected"':"")+'">US Zipcode ( 5-9 digits w/possible hyphen )</option>';form+='<option value="cazip"'+((field.expected==="cazip")?' selected="selected"':"")+'">Canadian Zipcode ( 6 alpha-numerics w/possible space )</option>';form+='<option value="uczip"'+((field.expected==="uczip")?' selected="selected"':"")+'">US/Canadian Zipcode ( either a US or Canadian zipcode )</option>';form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Any Character Combination">';for(i=1;i<=25;i++){form+='<option value="any-'+i+'"'+((field.expected==="any-"+i)?' selected="selected"':"")+'">Any Character Combination ( '+i+" character minimum )</option>";form+='<option value="any-'+i+'-e"'+((field.expected==="any-"+i+"-e")?' selected="selected"':"")+'">Any Character Combination ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics, Spaces &amp; Punctuation Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-spaces-punctuation-'+i+'"'+((field.expected==="alphanumerics-spaces-punctuation-"+i)?' selected="selected"':"")+'">Alphanumerics, Spaces &amp; Punctuation ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-spaces-punctuation-'+i+'-e"'+((field.expected==="alphanumerics-spaces-punctuation-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics, Spaces &amp; Punctuation ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics &amp; Spaces Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-spaces-'+i+'"'+((field.expected==="alphanumerics-spaces-"+i)?' selected="selected"':"")+'">Alphanumerics &amp; Spaces ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-spaces-'+i+'-e"'+((field.expected==="alphanumerics-spaces-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics &amp; Spaces ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics &amp; Punctuation Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-punctuation-'+i+'"'+((field.expected==="alphanumerics-punctuation-"+i)?' selected="selected"':"")+'">Alphanumerics &amp; Punctuation ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-punctuation-'+i+'-e"'+((field.expected==="alphanumerics-punctuation-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics &amp; Punctuation ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-'+i+'"'+((field.expected==="alphanumerics-"+i)?' selected="selected"':"")+'">Alphanumerics ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-'+i+'-e"'+((field.expected==="alphanumerics-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphabetics Only">';for(i=1;i<=25;i++){form+='<option value="alphabetics-'+i+'"'+((field.expected==="alphabetics-"+i)?' selected="selected"':"")+'">Alphabetics ( '+i+" character minimum )</option>";form+='<option value="alphabetics-'+i+'-e"'+((field.expected==="alphabetics-"+i+"-e")?' selected="selected"':"")+'">Alphabetics ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Numeric Digits Only">';for(i=1;i<=25;i++){form+='<option value="numerics-'+i+'"'+((field.expected==="numerics-"+i)?' selected="selected"':"")+'">Numeric Digits ( '+i+" digit minimum )</option>";form+='<option value="numerics-'+i+'-e"'+((field.expected==="numerics-"+i+"-e")?' selected="selected"':"")+'">Numeric Digits ( exactly '+i+" digit"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+="</select><br />";form+="<small>Only Users/Members will be required to meet this criteria.</small><br />";form+="<small>* Administrators are exempt from this.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">Applicable Membership Levels: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">';form+='<td colspan="2">';form+='<input type="text" property="levels" value="'+esc_attr(field.levels)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels" /><br />';form+="<small>Please use comma-delimited Level #'s: <code>0,1,2,3,4</code> or type: <code>all</code>.</small><br />";form+="<small>This allows you to enable this field - only at specific Membership Levels.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">Allow Profile Edits: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<td colspan="2">';form+='<select property="editable" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<option value="yes"'+((field.editable==="yes")?' selected="selected"':"")+'">Yes ( editable )</option>';form+='<option value="no"'+((field.editable==="no")?' selected="selected"':"")+'">No ( uneditable after registration )</option>';form+='<option value="no-invisible"'+((field.editable==="no-invisible")?' selected="selected"':"")+'">No ( uneditable &amp; totally invisible after registration )</option>';form+='<option value="yes-invisible"'+((field.editable==="yes-invisible")?' selected="selected"':"")+'">Yes ( editable after registration / invisible during registration )</option>';form+="</select><br />";form+="<small>If <code>No</code>, this field will be un-editable after registration.</small><br />";form+="<small>* Administrators are exempt from this.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">CSS Classes: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">';form+='<td colspan="2">';form+='<input type="text" property="classes" value="'+esc_attr(field.classes)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes" /><br />';form+="<small>Example: <code>my-style-1 my-style-2</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">CSS Styles: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">';form+='<td colspan="2">';form+='<input type="text" property="styles" value="'+esc_attr(field.styles)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles" /><br />';form+="<small>Example: <code>color:#000000; background:#FFFFFF;</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">Other Attributes: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">';form+='<td colspan="2">';form+='<input type="text" property="attrs" value="'+esc_attr(field.attrs)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs" /><br />';form+='<small>Example: <code>onkeyup="" onblur=""</code></small>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-buttons"><td colspan="2">&nbsp;</td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-buttons">';form+='<td align="left">';form+='<input type="button" value="Cancel" onclick="ws_plugin__s2member_customRegFieldCancel();" />';form+="</td>";form+='<td align="right">';form+='<input type="button" value="'+((editing)?"Update This Field":"Create Registration Field")+'" onclick="'+((editing)?"ws_plugin__s2member_customRegFieldUpdate("+index+");":"ws_plugin__s2member_customRegFieldCreate();")+'" />';form+="</td>";form+="</tr>";form+="</tbody>";form+="</table>";form+="<div>";$("body").append(form);tb_show(((editing)?"Editing Registration/Profile Field":"New Custom Registration/Profile Field"),"#TB_inline?inlineId=ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form"),$(window).trigger("resize");$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form").show()}$tools.html(html)};var attachTBResizer=function(){$(window).resize(function(){var w,h;w=$(window).width(),h=$(window).height(),w=(w>720)?720:w;$("#TB_ajaxContent").css({width:w-50,height:h-75,margin:0,padding:0})})};var buildTable=function(){var l=fields.length,i=0,html="",eo="o";html+="<tbody>";html+="<tr>";html+="<th>Order</th>";html+="<th>Field Type</th>";html+="<th>Unique ID</th>";html+="<th>Required</th>";html+="<th>Levels</th>";html+="<th>- Tools -</th>";html+="</tr>";if(fields.length>0){for(i=0;i<fields.length;i++){html+='<tr class="'+esc_attr((eo=(eo==="o")?"e":"o"))+((fields[i].section==="yes")?" s":"")+" ws-plugin--s2member-custom-reg-field-configuration-table-row-"+i+'">';html+='<td nowrap="nowrap"><a class="ws-plugin--s2member-custom-reg-field-configuration-move-up" href="#" onclick="ws_plugin__s2member_customRegFieldMoveUp('+i+'); return false;"></a><a class="ws-plugin--s2member-custom-reg-field-configuration-move-down" href="#" onclick="ws_plugin__s2member_customRegFieldMoveDown('+i+'); return false;"></a></td>';html+='<td nowrap="nowrap">'+esc_html(fieldTypeDesc(fields[i].type))+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].id)+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].required)+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].levels)+"</td>";html+='<td nowrap="nowrap"><a class="ws-plugin--s2member-custom-reg-field-configuration-edit" href="#" onclick="ws_plugin__s2member_customRegFieldEdit('+i+'); return false;"></a><a class="ws-plugin--s2member-custom-reg-field-configuration-delete" href="#" onclick="ws_plugin__s2member_customRegFieldDelete('+i+'); return false;"></a></td>';html+="</tr>"}}else{html+="<tr>";html+='<td colspan="6">No Custom Fields are configured.</td>';html+="</tr>"}html+="</tbody>";$table.html(html)};buildTools(),attachTBResizer(),buildTable()})()}}if(location.href.match(/page\=ws-plugin--s2member-res-ops/)){$("input#ws-plugin--s2member-brute-force-restrictions-reset-button").click(function(){var $this=$(this);$this.val("one moment please ...");$.post(ajaxurl,{action:"ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax",ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'},function(response){alert("s2Member's Brute Force Restriction Logs have all been reset."),$this.val("Reset Brute Force Logs")});return false});$("input#ws-plugin--s2member-ip-restrictions-reset-button").click(function(){var $this=$(this);$this.val("one moment please ...");$.post(ajaxurl,{action:"ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax",ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'},function(response){alert("s2Member's IP Restriction Logs have all been reset."),$this.val("Reset IP Restriction Logs")});return false});$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query[]"]').change(function(){var thisChange=$(this).val();$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query[]"]').each(function(){var $this=$(this),val=$this.val(),checkboxes='input[type="checkbox"]';if(val==="all"&&this.checked){$this.nextAll(checkboxes).attr({checked:"checked",disabled:"disabled"})}else{if(val==="all"&&!this.checked){$this.nextAll(checkboxes).removeAttr("disabled");(thisChange==="all")?$this.nextAll(checkboxes).removeAttr("checked"):null}}})}).last().trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-down-ops/)){var updateCloudFrontPrivateKey=function(){var $hiddenPrivateKey=$("input#ws-plugin--s2member-amazon-cf-files-private-key");var $visiblePrivateKeyEntry=$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry");var hiddenPrivateKeyValue=$.trim($hiddenPrivateKey.val()),visiblePrivateKeyEntryValue=$.trim($visiblePrivateKeyEntry.val());if((hiddenPrivateKeyValue&&!visiblePrivateKeyEntryValue)||visiblePrivateKeyEntryValue.match(/[^\r\n\u25CF]/)){$hiddenPrivateKey.val(visiblePrivateKeyEntryValue),$visiblePrivateKeyEntry.val(visiblePrivateKeyEntryValue.replace(/[^\r\n]/g,String.fromCharCode(9679)))}};$("form#ws-plugin--s2member-options-form").submit(updateCloudFrontPrivateKey);$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry").change(updateCloudFrontPrivateKey).trigger("change");var updateCloudFrontDistroCfgs=function(){var $hiddenPrivateKey=$("input#ws-plugin--s2member-amazon-cf-files-private-key");var $visiblePrivateKeyId=$("input#ws-plugin--s2member-amazon-cf-files-private-key-id");var $autoConfigDistros=$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros");var $autoConfigDistrosStatus=$("input#ws-plugin--s2member-amazon-cf-files-distros-auto-config-status");var autoConfigDistrosStatusValue=$.trim($autoConfigDistrosStatus.val());var hiddenPrivateKeyValue=$.trim($hiddenPrivateKey.val()),visiblePrivateKeyIdValue=$.trim($visiblePrivateKeyId.val());var hiddenPrivateKeyPrevConfigValue=$.trim($hiddenPrivateKey.attr("data-s-prev-config-value")),visiblePrivateKeyIdPrevConfigValue=$.trim($visiblePrivateKeyId.attr("data-s-prev-config-value"));if(autoConfigDistrosStatusValue==="configured"&&((visiblePrivateKeyIdPrevConfigValue&&visiblePrivateKeyIdValue!==visiblePrivateKeyIdPrevConfigValue)||(hiddenPrivateKeyPrevConfigValue&&hiddenPrivateKeyValue!==hiddenPrivateKeyPrevConfigValue))){alert("s2Member will need to delete and re-configure your Amazon® CloudFront distributions if you change this. When you're done editing, click (Save All Changes) below.");$autoConfigDistros.attr("checked","checked")}else{if(autoConfigDistrosStatusValue!=="configured"&&visiblePrivateKeyIdValue&&hiddenPrivateKeyValue){alert("s2Member will need to auto-configure your Amazon® CloudFront distributions for you. When you're done editing, click (Save All Changes) below.");$autoConfigDistros.attr("checked","checked")}}};$("input#ws-plugin--s2member-amazon-cf-files-private-key-id").change(updateCloudFrontDistroCfgs);$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry").change(updateCloudFrontDistroCfgs);$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros-w-cnames").change(function(){var $this=$(this),thisChecked=(this.checked)?true:false;var $autoConfigDistros=$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros");var $autoConfigDistroCnames=$("div#ws-plugin--s2member-amazon-cf-files-auto-configure-distro-cnames");(thisChecked)?$autoConfigDistroCnames.show():$autoConfigDistroCnames.hide();(thisChecked)?$autoConfigDistros.attr("checked","checked"):null}).trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-paypal-ops/)){$("select#ws-plugin--s2member-auto-eot-system-enabled").change(function(){var $this=$(this),val=$this.val();var $viaCron=$("p#ws-plugin--s2member-auto-eot-system-enabled-via-cron");if(val==2){$viaCron.show()}else{$viaCron.hide()}})}if(location.href.match(/page\=ws-plugin--s2member-paypal-buttons/)){$("div.ws-menu-page select[id]").filter(function(){return this.id.match(/^ws-plugin--s2member-(level[1-9][0-9]*|modification)-term$/)}).change(function(){var button=this.id.replace(/^ws-plugin--s2member-(.+?)-term$/g,"$1");var trialDisabled=($(this).val().split("-")[2].replace(/[^0-1BN]/g,"")==="BN")?1:0;$("p#ws-plugin--s2member-"+button+"-trial-line").css("display",(trialDisabled?"none":""));$("span#ws-plugin--s2member-"+button+"-trial-then").css("display",(trialDisabled?"none":""));$("span#ws-plugin--s2member-"+button+"-20p-rule").css("display",(trialDisabled?"none":""));(trialDisabled)?$("input#ws-plugin--s2member-"+button+"-trial-period").val(0):null;(trialDisabled)?$("input#ws-plugin--s2member-"+button+"-trial-amount").val("0.00"):null});$("div.ws-menu-page input[id]").filter(function(){return this.id.match(/^ws-plugin--s2member-(level[1-9][0-9]*|modification|ccap)-ccaps$/)}).keyup(function(){var value=this.value.replace(/^(-all|-al|-a|-)[;,]*/gi,""),_all=(this.value.match(/^(-all|-al|-a|-)[;,]*/i))?"-all,":"";if(value.match(/[^a-z_0-9,]/)){this.value=_all+$.trim($.trim(value).replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase())}});ws_plugin__s2member_paypalButtonGenerate=function(button){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="",labels={};eval("<?php echo c_ws_plugin__s2member_utils_strings::esc_dq($labels); ?>");var shortCode=$("input#ws-plugin--s2member-"+button+"-shortcode");var code=$("textarea#ws-plugin--s2member-"+button+"-button");var modLevel=$("select#ws-plugin--s2member-modification-level");var level=(button==="modification")?modLevel.val().split(":",2)[1]:button.replace(/^level/,"");var label=labels["level"+level].replace(/"/g,"");var desc=$.trim($("input#ws-plugin--s2member-"+button+"-desc").val().replace(/"/g,""));var trialAmount=$("input#ws-plugin--s2member-"+button+"-trial-amount").val().replace(/[^0-9\.]/g,"");var trialPeriod=$("input#ws-plugin--s2member-"+button+"-trial-period").val().replace(/[^0-9]/g,"");var trialTerm=$("select#ws-plugin--s2member-"+button+"-trial-term").val().replace(/[^A-Z]/g,"");var regAmount=$("input#ws-plugin--s2member-"+button+"-amount").val().replace(/[^0-9\.]/g,"");var regPeriod=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[0].replace(/[^0-9]/g,"");var regTerm=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[1].replace(/[^A-Z]/g,"");var regRecur=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[2].replace(/[^0-1BN]/g,"");var regRecurTimes="",regRecurRetry="1";var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-"+button+"-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-"+button+"-currency").val().replace(/[^A-Z]/g,"");var cCaps=$.trim($.trim($("input#ws-plugin--s2member-"+button+"-ccaps").val()).replace(/^(-all|-al|-a|-)[;,]*/gi,"").replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());cCaps=($.trim($("input#ws-plugin--s2member-"+button+"-ccaps").val()).match(/^(-all|-al|-a|-)[;,]*/i))?((cCaps)?"-all,":"-all")+cCaps.toLowerCase():cCaps.toLowerCase();trialPeriod=(regRecur==="BN")?"0":trialPeriod;trialAmount=(!trialAmount||isNaN(trialAmount)||trialAmount<0.01||trialPeriod<=0)?"0":trialAmount;var levelCcapsPer=(regRecur==="BN"&&regTerm!=="L")?level+":"+cCaps+":"+regPeriod+" "+regTerm:level+":"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(trialAmount!=="0"&&(isNaN(trialAmount)||trialAmount<0)){alert("— Oops, a slight problem: —\n\nWhen provided, Trial Amount must be >= 0.00");return false}else{if(trialAmount!=="0"&&trialAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Trial Amount is: 10000.00");return false}else{if(trialTerm==="D"&&trialPeriod>7){alert("— Oops, a slight problem: —\n\nMaximum Trial Days is: 7.\nIf you want to offer more than 7 days, please choose Weeks or Months from the drop-down.");return false}else{if(trialTerm==="W"&&trialPeriod>52){alert("— Oops, a slight problem: —\n\nMaximum Trial Weeks is: 52.\nIf you want to offer more than 52 weeks, please choose Months from the drop-down.");return false}else{if(trialTerm==="M"&&trialPeriod>12){alert("— Oops, a slight problem: —\n\nMaximum Trial Months is: 12.\nIf you want to offer more than 12 months, please choose Years from the drop-down.");return false}else{if(trialTerm==="Y"&&trialPeriod>1){alert("— Oops, a slight problem: —\n\nMax Trial Period Years is: 1.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}}}}}}code.html(code.val().replace(/ \<\!--(\<input type\="hidden" name\="(amount|src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\>)--\>/g," $1"));(parseInt(trialPeriod)<=0)?code.html(code.val().replace(/ (\<input type\="hidden" name\="(a1|p1|t1)" value\="(.*?)" \/\>)/g," <!--$1-->")):null;(regRecur==="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g," $1_xclick$3")):null;(regRecur==="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="(src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\>)/g," <!--$1-->")):null;(regRecur!=="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g," $1_xclick-subscriptions$3")):null;(regRecur!=="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="amount" value\="(.*?)" \/\>)/g," <!--$1-->")):null;shortCodeTemplateAttrs+=(button==="modification")?'modify="1" ':"";shortCodeTemplateAttrs+='level="'+esc_attr(level)+'" ccaps="'+esc_attr(cCaps)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'" custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"';shortCodeTemplateAttrs+=' ta="'+esc_attr(trialAmount)+'" tp="'+esc_attr(trialPeriod)+'" tt="'+esc_attr(trialTerm)+'" ra="'+esc_attr(regAmount)+'" rp="'+esc_attr(regPeriod)+'" rt="'+esc_attr(regTerm)+'" rr="'+esc_attr(regRecur)+'" rrt="'+esc_attr(regRecurTimes)+'" rra="'+esc_attr(regRecurRetry)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(levelCcapsPer)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="modify" value\="(.*?)"/,' name="modify" value="'+((button==="modification")?"1":"0")+'"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));code.html(code.val().replace(/ name\="src" value\="(.*?)"/,' name="src" value="'+esc_attr(regRecur)+'"'));code.html(code.val().replace(/ name\="srt" value\="(.*?)"/,' name="srt" value="'+esc_attr(regRecurTimes)+'"'));code.html(code.val().replace(/ name\="sra" value\="(.*?)"/,' name="sra" value="'+esc_attr(regRecurRetry)+'"'));code.html(code.val().replace(/ name\="a1" value\="(.*?)"/,' name="a1" value="'+esc_attr(trialAmount)+'"'));code.html(code.val().replace(/ name\="p1" value\="(.*?)"/,' name="p1" value="'+esc_attr(trialPeriod)+'"'));code.html(code.val().replace(/ name\="t1" value\="(.*?)"/,' name="t1" value="'+esc_attr(trialTerm)+'"'));code.html(code.val().replace(/ name\="a3" value\="(.*?)"/,' name="a3" value="'+esc_attr(regAmount)+'"'));code.html(code.val().replace(/ name\="p3" value\="(.*?)"/,' name="p3" value="'+esc_attr(regPeriod)+'"'));code.html(code.val().replace(/ name\="t3" value\="(.*?)"/,' name="t3" value="'+esc_attr(regTerm)+'"'));$("div#ws-plugin--s2member-"+button+"-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));(button==="modification")?alert("Your Modification Button has been generated.\nPlease copy/paste the Shortcode Format into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Modification Buttons should be displayed to existing Users/Members, and they should be logged-in, BEFORE clicking this Button."):alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Membership Options Page.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalCcapButtonGenerate=function(){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="";var shortCode=$("input#ws-plugin--s2member-ccap-shortcode");var code=$("textarea#ws-plugin--s2member-ccap-button");var desc=$.trim($("input#ws-plugin--s2member-ccap-desc").val().replace(/"/g,""));var regAmount=$("input#ws-plugin--s2member-ccap-amount").val().replace(/[^0-9\.]/g,"");var regPeriod=$("select#ws-plugin--s2member-ccap-term").val().split("-")[0].replace(/[^0-9]/g,"");var regTerm=$("select#ws-plugin--s2member-ccap-term").val().split("-")[1].replace(/[^A-Z]/g,"");var regRecur=$("select#ws-plugin--s2member-ccap-term").val().split("-")[2].replace(/[^0-1BN]/g,"");var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-ccap-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-ccap-currency").val().replace(/[^A-Z]/g,"");var cCaps=$.trim($.trim($("input#ws-plugin--s2member-ccap-ccaps").val()).replace(/^(-all|-al|-a|-)[;,]*/gi,"").replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());cCaps=($.trim($("input#ws-plugin--s2member-ccap-ccaps").val()).match(/^(-all|-al|-a|-)[;,]*/i))?((cCaps)?"-all,":"-all")+cCaps.toLowerCase():cCaps.toLowerCase();var levelCcapsPer=(regRecur==="BN"&&regTerm!=="L")?"*:"+cCaps+":"+regPeriod+" "+regTerm:"*:"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(!cCaps||cCaps==="-all"){alert("— Oops, a slight problem: —\n\nPlease provide at least one Custom Capability.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}shortCodeTemplateAttrs+='level="*" ccaps="'+esc_attr(cCaps)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'"';shortCodeTemplateAttrs+=' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="'+esc_attr(regAmount)+'" rp="'+esc_attr(regPeriod)+'" rt="'+esc_attr(regTerm)+'" rr="'+esc_attr(regRecur)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(levelCcapsPer)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));$("div#ws-plugin--s2member-ccap-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Independent Custom Capability Buttons should ONLY be displayed to existing Users/Members, and they MUST be logged-in, BEFORE clicking this Button.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalSpButtonGenerate=function(){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="";var shortCode=$("input#ws-plugin--s2member-sp-shortcode");var code=$("textarea#ws-plugin--s2member-sp-button");var leading=$("select#ws-plugin--s2member-sp-leading-id").val().replace(/[^0-9]/g,"");var additionals=$("select#ws-plugin--s2member-sp-additional-ids").val()||[];var hours=$("select#ws-plugin--s2member-sp-hours").val().replace(/[^0-9]/g,"");var regAmount=$("input#ws-plugin--s2member-sp-amount").val().replace(/[^0-9\.]/g,"");var desc=$.trim($("input#ws-plugin--s2member-sp-desc").val().replace(/"/g,""));var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-sp-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-sp-currency").val().replace(/[^A-Z]/g,"");if(!leading){alert("— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it's because you've not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}for(var i=0,ids=leading;i<additionals.length;i++){if(additionals[i]&&additionals[i]!==leading){ids+=","+additionals[i]}}var spIdsHours="sp:"+ids+":"+hours;shortCodeTemplateAttrs+='sp="1" ids="'+esc_attr(ids)+'" exp="'+esc_attr(hours)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'"';shortCodeTemplateAttrs+=' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="'+esc_attr(regAmount)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(spIdsHours)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));$("div#ws-plugin--s2member-sp-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your WordPress® Editor.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalRegLinkGenerate=function(){var level=$("select#ws-plugin--s2member-reg-link-level").val().replace(/[^0-9]/g,"");var subscrID=$.trim($("input#ws-plugin--s2member-reg-link-subscr-id").val());var custom=$.trim($("input#ws-plugin--s2member-reg-link-custom").val());var cCaps=$.trim($.trim($("input#ws-plugin--s2member-reg-link-ccaps").val()).replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());var fixedTerm=$.trim($("input#ws-plugin--s2member-reg-link-fixed-term").val().replace(/[^A-Z 0-9]/gi,"").toUpperCase());var $link=$("p#ws-plugin--s2member-reg-link"),$loading=$("img#ws-plugin--s2member-reg-link-loading");var levelCcapsPer=(fixedTerm&&!fixedTerm.match(/L$/))?level+":"+cCaps+":"+fixedTerm:level+":"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(!subscrID){alert("— Oops, a slight problem: —\n\nPaid Subscr. ID is a required value.");return false}else{if(!custom||custom.indexOf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq ($_SERVER["HTTP_HOST"]); ?>')!==0){alert("— Oops, a slight problem: —\n\nThe Custom Value MUST start with your domain name.");return false}else{if(fixedTerm&&!fixedTerm.match(/^[1-9]+ (D|W|M|Y|L)$/)){alert("— Oops, a slight problem: —\n\nThe Fixed Term Length is not formatted properly.");return false}}}$link.hide(),$loading.show(),$.post(ajaxurl,{action:"ws_plugin__s2member_reg_access_link_via_ajax",ws_plugin__s2member_reg_access_link_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-reg-access-link-via-ajax")); ?>',s2member_reg_access_link_subscr_gateway:"paypal",s2member_reg_access_link_subscr_id:subscrID,s2member_reg_access_link_custom:custom,s2member_reg_access_link_item_number:levelCcapsPer},function(response){$link.show().html('<a href="'+esc_attr(response)+'" target="_blank" rel="external">'+esc_html(response)+"</a>"),$loading.hide()});return false};ws_plugin__s2member_paypalSpLinkGenerate=function(){var leading=$("select#ws-plugin--s2member-sp-link-leading-id").val().replace(/[^0-9]/g,"");var additionals=$("select#ws-plugin--s2member-sp-link-additional-ids").val()||[];var hours=$("select#ws-plugin--s2member-sp-link-hours").val().replace(/[^0-9]/g,"");var $link=$("p#ws-plugin--s2member-sp-link"),$loading=$("img#ws-plugin--s2member-sp-link-loading");if(!leading){alert("— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it's because you've not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.");return false}for(var i=0,ids=leading;i<additionals.length;i++){if(additionals[i]&&additionals[i]!==leading){ids+=","+additionals[i]}}$link.hide(),$loading.show(),$.post(ajaxurl,{action:"ws_plugin__s2member_sp_access_link_via_ajax",ws_plugin__s2member_sp_access_link_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-sp-access-link-via-ajax")); ?>',s2member_sp_access_link_ids:ids,s2member_sp_access_link_hours:hours},function(response){$link.show().html('<a href="'+esc_attr(response)+'" target="_blank" rel="external">'+esc_html(response)+"</a>"),$loading.hide()});return false}}if(location.href.match(/page\=ws-plugin--s2member-els-ops/)){$("select#ws-plugin--s2member-custom-reg-opt-in").change(function(){var $this=$(this),val=$this.val();var $rows=$("tr.ws-plugin--s2member-custom-reg-opt-in-label-row");var $prevImg=$("img.ws-plugin--s2member-custom-reg-opt-in-label-prev-img");if(val<=0){$rows.css("display","none"),$prevImg.attr("src",$prevImg.attr("src").replace(/\/checked\.png$/,"/unchecked.png"))}else{if(val==1){$rows.css("display",""),$prevImg.attr("src",$prevImg.attr("src").replace(/\/unchecked\.png$/,"/checked.png"))}else{if(val==2){$rows.css("display",""),$prevImg.attr("src",$prevImg.attr("src").replace(/\/checked\.png$/,"/unchecked.png"))}}}});$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs[]"]').change(function(){var thisChange=$(this).val(),checkedIndexes=[];$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs[]"]').each(function(){var $this=$(this),val=$this.val(),checkboxes='input[type="checkbox"]';if(val==="removal-deletion"&&this.checked){$this.nextAll(checkboxes).slice(0,2).attr({checked:"checked",disabled:"disabled"})}else{if(val==="removal-deletion"&&!this.checked){$this.nextAll(checkboxes).slice(0,2).removeAttr("disabled");(thisChange==="removal-deletion")?$this.nextAll(checkboxes).slice(0,2).removeAttr("checked"):null}else{if(val==="modification"&&this.checked){$this.nextAll(checkboxes).slice(0,3).attr({checked:"checked",disabled:"disabled"})}else{if(val==="modification"&&!this.checked){(thisChange==="modification")?$this.nextAll(checkboxes).slice(0,3).removeAttr("checked"):null;$this.nextAll(checkboxes).slice(0,3).removeAttr("disabled")}}}}}).each(function(index){(this.checked)?checkedIndexes.push(index):null});$("select#ws-plugin--s2member-custom-reg-auto-opt-out-transitions").removeAttr("disabled");if($.inArray(3,checkedIndexes)===-1&&$.inArray(4,checkedIndexes)===-1&&$.inArray(5,checkedIndexes)===-1&&$.inArray(6,checkedIndexes)===-1){$("select#ws-plugin--s2member-custom-reg-auto-opt-out-transitions").attr("disabled","disabled")}}).last().trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-integrations/)){$("select#ws-plugin--s2member-bbpress-ovg").change(function(){if($(this).val()==="0"){$("span#ws-plugin--s2member-bbpress-ovg-off-note").css("display","inline");var l='form#ws-plugin--s2member-bridge-bbpress-form label[for="ws_plugin--s2member-bridge-bbpress-min-level"]';$(l).text($(l).text().replace(/to (read\/)?participate/i,"to read/participate")),$("select#ws-plugin--s2member-bbpress-min-level option").each(function(){$(this).text($(this).text().replace(/\( to( read and)? participate \)/i,"( to read and participate )"))})}else{if($(this).val()==="1"){$("span#ws-plugin--s2member-bbpress-ovg-off-note").css("display","none");var l='form#ws-plugin--s2member-bridge-bbpress-form label[for="ws_plugin--s2member-bridge-bbpress-min-level"]';$(l).text($(l).text().replace(/to (read\/)?participate/i,"to participate")),$("select#ws-plugin--s2member-bbpress-min-level option").each(function(){$(this).text($(this).text().replace(/\( to( read and)? participate \)/i,"( to participate )"))})}}}).trigger("change")}});
includes/menu-pages/menu-pages-s.js CHANGED
@@ -25,17 +25,24 @@ jQuery(document).ready (function($)
25
  /**/
26
  if (location.href.match (/page\=ws-plugin--s2member/)) /* Always on. */
27
  {
28
- $('input.ws-plugin--s2member-update-roles-button').click (function()
29
  {
30
  var $this = $(this); /* Save $(this) into $this. */
31
  $this.val ('one moment please ...'); /* Indicate loading status ( please wait ). */
32
  /**/
 
 
 
33
  $.post (ajaxurl, {action: 'ws_plugin__s2member_update_roles_via_ajax', ws_plugin__s2member_update_roles_via_ajax: '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-update-roles-via-ajax")); ?>'}, function(response)
34
  {
35
- if (response === '0')
36
- alert('Sorry, your request failed.\ns2Member\'s Roles/Capabilities are locked by Filter:\nws_plugin__s2member_lock_roles_caps'), $this.val ('Update Roles/Capabilities');
37
- else if (response === '1')
38
- alert('s2Member\'s Roles/Capabilities updated successfully.'), $this.val ('Update Roles/Capabilities');
 
 
 
 
39
  });
40
  /**/
41
  return false;
@@ -345,7 +352,7 @@ jQuery(document).ready (function($)
345
  /**/
346
  var fieldId2Var = function(fieldId) /* Convert ids to variables. */
347
  {
348
- return ( typeof fieldId === 'string') ? $.trim (fieldId).toLowerCase ().replace (/[^a-z0-9]/g, '_') : '';
349
  };
350
  /**/
351
  var fieldTypeDesc = function(type)
@@ -374,7 +381,7 @@ jQuery(document).ready (function($)
374
  {
375
  var i = 0, html = '', form = '', w = 0, h = 0, editing = ( typeof index === 'number' && typeof fields[index] === 'object') ? true : false, displayForm = (adding || editing) ? true : false, field = (editing) ? $.extend (true, {}, fieldDefaults, fields[index]) : fieldDefaults;
376
  /**/
377
- html += '<a href="#" onclick="ws_plugin__s2member_customRegFieldAdd(); return false;">Add New Field</a>'; /* Click to add a new Custom Registration Field. */
378
  /**/
379
  tb_remove (), $('div#ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form').remove (); /* Remove an existing thickbox. */
380
  /**/
@@ -729,7 +736,7 @@ jQuery(document).ready (function($)
729
  /**/
730
  $('body').append (form);
731
  /**/
732
- tb_show(((editing) ? 'Editing Registration Field' : 'New Custom Registration Field'), '#TB_inline?inlineId=ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form'), $(window).trigger ('resize');
733
  /**/
734
  $('table#ws-plugin--s2member-custom-reg-field-configuration-tools-form').show ();
735
  }
25
  /**/
26
  if (location.href.match (/page\=ws-plugin--s2member/)) /* Always on. */
27
  {
28
+ $('input.ws-plugin--s2member-update-roles-button, input.ws-plugin--s2member-reset-roles-button').click (function()
29
  {
30
  var $this = $(this); /* Save $(this) into $this. */
31
  $this.val ('one moment please ...'); /* Indicate loading status ( please wait ). */
32
  /**/
33
+ var levels = '<?php echo (int)$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; ?>';
34
+ var resetUpdate = ($this.hasClass ('ws-plugin--s2member-reset-roles-button')) ? 'Reset' : 'Update';
35
+ /**/
36
  $.post (ajaxurl, {action: 'ws_plugin__s2member_update_roles_via_ajax', ws_plugin__s2member_update_roles_via_ajax: '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-update-roles-via-ajax")); ?>'}, function(response)
37
  {
38
+ if (response === '1')
39
+ alert('s2Member\'s Roles/Capabilities ' + ((resetUpdate.toLowerCase () === 'reset') ? 'have been successfully reset' : 'updated successfully') + '.\nYour installation of s2Member has Membership Levels 0-' + levels + '.'), $this.val (resetUpdate + ' Roles/Capabilities');
40
+ /**/
41
+ else if (response === 'l' /* Locked? */)
42
+ alert('Sorry, your request failed.\ns2Member\'s Roles/Capabilities are locked by Filter:\nws_plugin__s2member_lock_roles_caps'), $this.val (resetUpdate + ' Roles/Capabilities');
43
+ /**/
44
+ else /* Default response message here. */
45
+ alert('Sorry, your request failed.\nAccess denied. Do you have the ability to `create_users`?'), $this.val (resetUpdate + ' Roles/Capabilities');
46
  });
47
  /**/
48
  return false;
352
  /**/
353
  var fieldId2Var = function(fieldId) /* Convert ids to variables. */
354
  {
355
+ return( typeof fieldId === 'string') ? $.trim (fieldId).toLowerCase ().replace (/[^a-z0-9]/g, '_') : '';
356
  };
357
  /**/
358
  var fieldTypeDesc = function(type)
381
  {
382
  var i = 0, html = '', form = '', w = 0, h = 0, editing = ( typeof index === 'number' && typeof fields[index] === 'object') ? true : false, displayForm = (adding || editing) ? true : false, field = (editing) ? $.extend (true, {}, fieldDefaults, fields[index]) : fieldDefaults;
383
  /**/
384
+ html += '<a href="#" onclick="ws_plugin__s2member_customRegFieldAdd(); return false;">Add New Field</a>'; /* Click to add a new Custom Registration/Profile Field. */
385
  /**/
386
  tb_remove (), $('div#ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form').remove (); /* Remove an existing thickbox. */
387
  /**/
736
  /**/
737
  $('body').append (form);
738
  /**/
739
+ tb_show(((editing) ? 'Editing Registration/Profile Field' : 'New Custom Registration/Profile Field'), '#TB_inline?inlineId=ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form'), $(window).trigger ('resize');
740
  /**/
741
  $('table#ws-plugin--s2member-custom-reg-field-configuration-tools-form').show ();
742
  }
includes/menu-pages/mms-ops.inc.php CHANGED
@@ -56,7 +56,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_mms_ops"))
56
  echo '<div class="ws-menu-page-section ws-plugin--s2member-mms-patches-section">' . "\n";
57
  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";
58
  echo '<h3>Multisite WordPress® Patches ( required for compatiblity )</h3>' . "\n";
59
- echo '<p>In order for s2Member to function properly in a Multisite environment, you MUST implement four patches. One goes into your /wp-login.php file, one into /wp-includes/load.php, one into /wp-includes/ms-functions.php, and another into /wp-admin/user-new.php. We have TRAC tickets into WordPress® for these changes. However, until the official release of WordPress® includes these updates, you will need to use the automatic patcher below. All you do is check the box &amp; click Save. s2Member will handle everything automatically for you.</p>' . "\n";
60
  do_action ("ws_plugin__s2member_during_mms_ops_page_during_left_sections_during_mms_patches", get_defined_vars ());
61
  /**/
62
  echo '<table class="form-table">' . "\n";
@@ -79,7 +79,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_mms_ops"))
79
  echo '<select name="ws_plugin__s2member_mms_auto_patch" id="ws-plugin--s2member-mms-auto-patch" disabled="disabled">' . "\n";
80
  echo '<option value="0" selected="selected">No ( I\'ll patch WordPress® myself )</option>' . "\n";
81
  echo '</select><br />' . "\n";
82
- echo '<em class="ws-menu-page-hilite">This is now locked. Your /wp-config.php file says: <code>DISALLOW_FILE_MODS = true</code></em>.' . "\n";
83
  }
84
  else /* Otherwise we can display these options. */
85
  {
@@ -87,7 +87,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_mms_ops"))
87
  echo '<option value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_auto_patch"]) ? ' selected="selected"' : '') . '>Yes ( automatically patch WordPress® )</option>' . "\n";
88
  echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_auto_patch"]) ? ' selected="selected"' : '') . '>No ( I\'ll patch WordPress® myself )</option>' . "\n";
89
  echo '</select><br />' . "\n";
90
- echo '<em class="ws-menu-page-hilite">Don\'t forget to patch these files again, each time you upgrade the WordPress® core.</em>' . "\n";
91
  }
92
  /**/
93
  echo '</td>' . "\n";
@@ -129,9 +129,10 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_mms_ops"))
129
  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";
130
  echo '<h3>Multisite Registration ( Main Site Configuration )</h3>' . "\n";
131
  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";
132
- 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. If your Network is making it possible for Members to create and/or manage Blogs, s2Member will consider your installation to be a Multisite Blog Farm.</p>' . "\n";
133
- 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">/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: <code>/wp-login.php?action=register</code>. 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">Standard Login/Registration Form</a>, which is easily customized through <code>s2Member -> General Options -> Login/Registration Design</code>, on your Main Site.</p>' . "\n";
134
- 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, based on your configuration below.</p>' . "\n";
 
135
  do_action ("ws_plugin__s2member_during_mms_ops_page_during_left_sections_during_mms_registration", get_defined_vars ());
136
  /**/
137
  echo '<div id="ws-plugin--s2member-mms-registration-support-package-details-wrapper">' . "\n";
@@ -139,6 +140,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_mms_ops"))
139
  echo '<div id="ws-plugin--s2member-mms-registration-support-package-details" style="display:none;">' . "\n";
140
  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 Module / 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 Module / Prices")) . '" target="_blank" rel="external">Network Support Package</a> when you need assistance in this regard.</p>' . "\n";
141
  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 Module / 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";
 
 
142
  echo '</div>' . "\n";
143
  echo '</div>' . "\n";
144
  /**/
@@ -164,7 +167,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_mms_ops"))
164
  echo '<select name="ws_plugin__s2member_mms_registration_file" id="ws-plugin--s2member-mms-registration-file" disabled="disabled">' . "\n";
165
  echo '<option value="wp-signup" selected="selected">Blog Farm ( I plan to offer both Membership &amp; Blog creation )</option>' . "\n";
166
  echo '</select><br />' . "\n";
167
- echo '<em class="ws-menu-page-hilite">This is now locked. Your /wp-config.php file says: <code>MULTISITE_FARM = true</code></em>.' . "\n";
168
  }
169
  else /* Otherwise we can display these options normally. */
170
  {
@@ -201,7 +204,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_mms_ops"))
201
  echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["allow_subscribers_in"]) ? ' selected="selected"' : '') . '>No ( do NOT allow Open Registration )</option>' . "\n";
202
  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";
203
  echo '</select><br />' . "\n";
204
- 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">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";
205
  echo '</td>' . "\n";
206
  /**/
207
  echo '</tr>' . "\n";
@@ -227,7 +230,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_mms_ops"))
227
  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";
228
  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";
229
  echo '</select><br />' . "\n";
230
- 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">wp-signup.php</a> ( on your Main Site ).' . "\n";
231
  echo '</td>' . "\n";
232
  /**/
233
  echo '</tr>' . "\n";
56
  echo '<div class="ws-menu-page-section ws-plugin--s2member-mms-patches-section">' . "\n";
57
  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";
58
  echo '<h3>Multisite WordPress® Patches ( required for compatiblity )</h3>' . "\n";
59
+ 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>. We have TRAC tickets into WordPress® for these changes. However, until the official release of WordPress® includes these updates, you will need to use the automatic patcher below. All you do is check the box &amp; click Save.</p>' . "\n";
60
  do_action ("ws_plugin__s2member_during_mms_ops_page_during_left_sections_during_mms_patches", get_defined_vars ());
61
  /**/
62
  echo '<table class="form-table">' . "\n";
79
  echo '<select name="ws_plugin__s2member_mms_auto_patch" id="ws-plugin--s2member-mms-auto-patch" disabled="disabled">' . "\n";
80
  echo '<option value="0" selected="selected">No ( I\'ll patch WordPress® myself )</option>' . "\n";
81
  echo '</select><br />' . "\n";
82
+ 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";
83
  }
84
  else /* Otherwise we can display these options. */
85
  {
87
  echo '<option value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_auto_patch"]) ? ' selected="selected"' : '') . '>Yes ( automatically patch WordPress® )</option>' . "\n";
88
  echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_auto_patch"]) ? ' selected="selected"' : '') . '>No ( I\'ll patch WordPress® myself )</option>' . "\n";
89
  echo '</select><br />' . "\n";
90
+ 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";
91
  }
92
  /**/
93
  echo '</td>' . "\n";
129
  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";
130
  echo '<h3>Multisite Registration ( Main Site Configuration )</h3>' . "\n";
131
  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";
132
+ 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";
133
+ 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 <code>s2Member -> General Options -> Login/Registration Design</code>.</p>' . "\n";
134
+ 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";
135
+ 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" : '';
136
  do_action ("ws_plugin__s2member_during_mms_ops_page_during_left_sections_during_mms_registration", get_defined_vars ());
137
  /**/
138
  echo '<div id="ws-plugin--s2member-mms-registration-support-package-details-wrapper">' . "\n";
140
  echo '<div id="ws-plugin--s2member-mms-registration-support-package-details" style="display:none;">' . "\n";
141
  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 Module / 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 Module / Prices")) . '" target="_blank" rel="external">Network Support Package</a> when you need assistance in this regard.</p>' . "\n";
142
  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 Module / 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";
143
+ 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 ( e.g. if you offer both Membership and Blog creation, as configured below ).</em></p>' . "\n";
144
+ 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";
145
  echo '</div>' . "\n";
146
  echo '</div>' . "\n";
147
  /**/
167
  echo '<select name="ws_plugin__s2member_mms_registration_file" id="ws-plugin--s2member-mms-registration-file" disabled="disabled">' . "\n";
168
  echo '<option value="wp-signup" selected="selected">Blog Farm ( I plan to offer both Membership &amp; Blog creation )</option>' . "\n";
169
  echo '</select><br />' . "\n";
170
+ 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";
171
  }
172
  else /* Otherwise we can display these options normally. */
173
  {
204
  echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["allow_subscribers_in"]) ? ' selected="selected"' : '') . '>No ( do NOT allow Open Registration )</option>' . "\n";
205
  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";
206
  echo '</select><br />' . "\n";
207
+ 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";
208
  echo '</td>' . "\n";
209
  /**/
210
  echo '</tr>' . "\n";
230
  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";
231
  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";
232
  echo '</select><br />' . "\n";
233
+ 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";
234
  echo '</td>' . "\n";
235
  /**/
236
  echo '</tr>' . "\n";
includes/menu-pages/res-ops.inc.php CHANGED
@@ -54,7 +54,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_res_ops"))
54
  echo '<div class="ws-menu-page-section ws-plugin--s2member-post-level-access-section">' . "\n";
55
  echo '<h3>Post Level Access Restrictions ( optional )</h3>' . "\n";
56
  echo '<p>Here you can specify Posts that are restricted to certain Membership Access Levels. s2Member also supports Custom Post Types here, which were first introduced in WordPress® 3.0. If you have a theme or plugin installed, that has enabled Custom Post Types ( i.e. Music/Videos or something else ), you can put the IDs for those Posts here.</p>' . "\n";
57
- echo '<p><em><strong>*Note*</strong> Protecting individual Posts, ONLY protects the Permalinks for those Posts. It is still possible for excerpts of protected content to be seen in search results generated by WordPress®, feeds, and Archive views; such as your Home Page, inside a Category listing, or through other queries formulated by your theme. This is the intended functionality. Excerpts are a great way to "tease" public visitors. In other words, public visitors may have access to excerpts introduced by your theme, but any attempt to view the full Post ( i.e. the Permalink ) will result in an automatic redirect to your Membership Options Page; requiring registration. All of that being said, if you would like to protect many Posts at once ( including Archive views ), you can use Category Level Restrictions, Tag Level Restrictions, or have a look down below at s2Member\'s options for "Alternative View Protection", which deals with search results, as well as feeds.</em></p>' . "\n";
 
58
  echo ((!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) && !$GLOBALS["WS_PLUGIN__"]["wp_show_ids"]) ? '<p><em><strong>*Tip*</strong> Can\'t find your Post IDs? Get <a href="http://www.primothemes.com/post/product/wp-show-ids-plugin/" target="_blank" rel="external">WP Show IDs</a>.</em></p>' . "\n" : '';
59
  do_action ("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_post_level_access", get_defined_vars ());
60
  /**/
@@ -144,7 +145,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_res_ops"))
144
  /**/
145
  echo '<div class="ws-menu-page-section ws-plugin--s2member-tag-level-access-section">' . "\n";
146
  echo '<h3>Tag Level Access Restrictions ( optional )</h3>' . "\n";
147
- echo '<p>Here you can specify Tags that are restricted to certain Membership Access Levels. This is very similar to Category Level Access. When you restrict access to a Tag Archive, it also restricts access to any Post having that Tag; even if a Post has other Tags. <em>*Tip*</em> ... Tags can be applied to any Post, without affecting your Category structure at all. If you\'d like to use Tags with Pages, get <a href="http://wordpress.org/extend/plugins/page-tagger/" target="_blank" rel="external">Page Tagger</a> <em>( compatible with s2Member )</em>.</p>' . "\n";
148
  echo '<p>Tags are caSe sensitive. The Tag <code>members only</code> is NOT the same as <code>Members Only</code>.</p>' . "\n";
149
  do_action ("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_tag_level_access", get_defined_vars ());
150
  /**/
@@ -189,7 +190,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_res_ops"))
189
  /**/
190
  echo '<div class="ws-menu-page-section ws-plugin--s2member-category-level-access-section">' . "\n";
191
  echo '<h3>Category Level Access Restrictions ( optional )</h3>' . "\n";
192
- echo '<p>Here you can specify Categories that are restricted to certain Membership Access Levels. Category restrictions are a bit more complex. When you restrict access to a Category, it also restricts access to any child Categories it may have ( aka: sub-Categories ). In other words, restricting a Category protects a Category Archive, all of its child Category Archives, and any Posts contained within the Category, or its child Categories.</p>' . "\n";
193
  echo ((!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) && !$GLOBALS["WS_PLUGIN__"]["wp_show_ids"]) ? '<p><em><strong>*Tip*</strong> Can\'t find your Category IDs? Get <a href="http://www.primothemes.com/post/product/wp-show-ids-plugin/" target="_blank" rel="external">WP Show IDs</a>.</em></p>' . "\n" : '';
194
  do_action ("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_category_level_access", get_defined_vars ());
195
  /**/
@@ -236,7 +237,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_res_ops"))
236
  /**/
237
  echo '<div class="ws-menu-page-section ws-plugin--s2member-uri-level-access-section">' . "\n";
238
  echo '<h3>URI Level Access Restrictions ( optional )</h3>' . "\n";
239
- echo '<p>Here you can specify URIs ( or word fragments found in URIs ) that are restricted to certain Membership Access Levels. Control over URIs is a little more complex. This section is intended for advanced webmasters only. That being said, here are the basics... A <code>REQUEST_URI</code>, is the portion of a <code>URL</code> that comes immediately after the domain. This is a URL <code>http://www.example.com/path/to/file.php</code>, and this is the URI: <code>/path/to/file.php</code>.</p>' . "\n";
240
  echo '<p>In the fields below, you can provide a list <em>( one per line )</em> of URIs on your site that should be off-limits based on Membership Level. You can also use word fragments instead of a full URI. If a word fragment is found anywhere in the URI, it will be protected. Wildcards and other regex patterns are NOT supported here, and therefore you don\'t need to escape special characters or anything. Please note, these ARE caSe sensitive. You must be specific with respect to case sensitivity. The word fragment <code>some-path/</code> would NOT match a URI that contains <code>some-Path/</code>. <em>A few <a href="#" onclick="alert(\'URI Replacement Codes:\\n\\n%%current_user_login%% = The current User\\\'s Username, lowercase.\\n%%current_user_id%% = The current User\\\'s ID.\\n%%current_user_level%% = The current User\\\'s s2Member Level.\\n%%current_user_role%% = The current User\\\'s WordPress® Role.' . ((!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? '\\n%%current_user_ccaps%% = The current User\\\'s Custom Capabilities.' : '') . '\\n%%current_user_logins%% = Number of times the current User has logged in.\\n\\nFor example, if you\\\'re using BuddyPress, and want to protect BuddyPress Groups, you could add URI protection, like this: /members/%%current_user_login%%/groups/\'); return false;">Replacement Codes</a> are also supported here.</em></p>' . "\n";
241
  echo '<p><em><strong>*BuddyPress ( and similar )*</strong> URI Restrictions work great with plugins like BuddyPress that add new areas to your site ( where those new areas are NOT necessarily a Post/Page/Tag/Category ). In other words, anytime you\'d like to protect a specific feature offered by BuddyPress ( or other plugins ), you\'ll need to nail down specific word fragments found in the URIs associated with those areas. For instance, with BuddyPress you might have: [ <a href="#" onclick="alert(\'/members/\\n/groups/\\n/blogs/\\n/activity/\\n/messages/\\n/profile/\\n/friends/\\n/settings/\'); return false;">click for example</a> ].</em></p>' . "\n";
242
  do_action ("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_uri_level_access", get_defined_vars ());
@@ -302,7 +303,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_res_ops"))
302
  echo '<td>' . "\n";
303
  echo '<div class="ws-menu-page-scrollbox" style="height:105px;">' . "\n";
304
  echo '<input type="hidden" name="ws_plugin__s2member_filter_wp_query[]" value="update-signal" />' . "\n";
305
- foreach (array ("all" => "<strong>Filter ALL WordPress® queries</strong>; protecting all Alternative Views.", "searches" => "&#9492;&#9472; Searches ( hide protected content in search results )", "feeds" => "&#9492;&#9472; Feeds ( hide protected content in standard XML/RSS/ATOM feeds )", "comment-feeds" => "&#9492;&#9472; Comment Feeds ( hide comments associated with protected content )", "nav-menus" => "&#9492;&#9472; Nav Menus ( hide protected content in <em>WordPress® -> Appearance -> Menus</em> )") as $ws_plugin__s2member_temp_s_value => $ws_plugin__s2member_temp_s_label)
306
  echo '<input type="checkbox" name="ws_plugin__s2member_filter_wp_query[]" id="ws-plugin--s2member-filter-wp-query-' . esc_attr (preg_replace ("/[^a-z0-9_\-]/", "-", $ws_plugin__s2member_temp_s_value)) . '" value="' . esc_attr ($ws_plugin__s2member_temp_s_value) . '"' . ((in_array ($ws_plugin__s2member_temp_s_value, $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["filter_wp_query"])) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-filter-wp-query-' . esc_attr (preg_replace ("/[^a-z0-9_\-]/", "-", $ws_plugin__s2member_temp_s_value)) . '">' . $ws_plugin__s2member_temp_s_label . '</label><br />' . "\n";
307
  echo '</div>' . "\n";
308
  echo '<strong>Attn Developers:</strong> Filters can be suppressed dynamically, using this technique:<br />' . "\n";
@@ -329,7 +330,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_res_ops"))
329
  /**/
330
  echo '<div class="ws-menu-page-section ws-plugin--s2member-sp-access-section">' . "\n";
331
  echo '<h3>Specific Post/Page Access Restrictions ( optional )</h3>' . "\n";
332
- echo '<p>s2Member now supports an additional layer of functionality ( very powerful ), which allows you to sell access to specific Posts/Pages that you\'ve created in WordPress®. Specific Post/Page Access works independently from Member Level Access. That is, you can sell an unlimited number of Posts/Pages using "Buy Now" Buttons, and your Customers will NOT be required to have a Membership Account with your site in order to receive access. If they are already a Member, that\'s fine, but they won\'t need to be.</p>' . "\n";
333
  echo '<p>In other words, Customers will NOT need to login, just to receive access to the Specific Post/Page they purchased access to. s2Member will immediately redirect the Customer to the Specific Post/Page after checkout is completed successfully. An email is also sent to the Customer with a link ( see: <code>s2Member -> PayPal® Options -> Specific Post/Page Email</code> ). Authentication is handled automatically through self-expiring links, good for 72 hours by default.</p>' . "\n";
334
  echo '<p>Specific Post/Page Access, is sort of like selling a product. Only, instead of shipping anything to the Customer, you just give them access to a specific Post/Page on your site; one that you created in WordPress®. A Specific Post/Page that is protected by s2Member, might contain a download link for your eBook, access to file &amp; music downloads, access to additional support services, and the list goes on and on. The possibilities with this are endless; as long as your digital product can be delivered through access to a WordPress® Post/Page that you\'ve created.</p>' . "\n";
335
  echo '<p>Very simple. All you do is protect the Specific Post/Page IDs that are being sold on your site. Then, you can go to <code>s2Member -> PayPal® Buttons -> Specific Post/Page</code> to generate "Buy Now" Buttons that you can insert into your WordPress® Editor, and make available on your site. The Button Generator for s2Member, will even let you Package Additional Posts/Pages together into one transaction.</p>' . "\n";
@@ -351,7 +352,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_res_ops"))
351
  /**/
352
  echo '<td>' . "\n";
353
  echo '<input type="text" name="ws_plugin__s2member_specific_ids" id="ws-plugin--s2member-specific-ids" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["specific_ids"]) . '" /><br />' . "\n";
354
- echo 'Post/Page IDs in comma-delimited format. Example: <code>1,2,3,34,8,21</code> * Note... the word <code>all</code> does NOT work here. Also, please be careful not to create a conflict with other Access Restrictions. If you are going to sell Specific Post/Page Access, you should enter specific Post/Page IDs here; and <strong>make SURE that you\'ve NOT already protected any of these Posts/Pages with Member Level Access Restrictions</strong>. In other words, if you configure s2Member, in such as a way, that a Post/Page requires Membership Level Access, you cannot sell that same Post/Page through Specific Post/Page Access. Doing so, would create a conflict. Customers that purchased Specific Post/Page Access, would be unable to access the Post/Page - without also having a Membership. Not good. So be careful with this.' . "\n";
355
  echo '</td>' . "\n";
356
  /**/
357
  echo '</tr>' . "\n";
@@ -373,7 +374,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_res_ops"))
373
  echo '<div class="ws-menu-page-section ws-plugin--s2member-brute-force-restrictions-section">' . "\n";
374
  echo '<h3>Brute Force IP/Login Restrictions ( prevents username/password guessing )</h3>' . "\n";
375
  echo '<input type="button" id="ws-plugin--s2member-brute-force-restrictions-reset-button" value="Reset Brute Force Logs" class="ws-menu-page-right" style="min-width:175px;" />' . "\n";
376
- echo '<p>As with any Membership system, it is possible for someone to try and guess Username/Password combinations by attempting a <a href="http://en.wikipedia.org/wiki/Brute-force_attack" target="_blank" rel="external">Brute Force Attack</a>; whereby multiple/repeated logins are strategically attempted with various Username/Password combinations until a correct guess is made. It is NOT likely that you\'ll be attacked in this way, but it\'s still a good idea to protect your system; just in case somebody tries this. s2Member thwarts this behavior by monitoring failed login attempts that occur within a short period of time. Whenever s2Member detects an IP address ( i.e. a remote user ) that is consistently failing to enter a valid Username/Password, a temporary ban is created; preventing additional attempts from taking place for 30 minutes. This temporary ban, will ONLY affect the offending IP address.</p>' . "\n";
377
  echo '<p><em>*Note* an empty IP address ( associated with someone browsing anonymously ), is also considered a unique IP address, so it cannot circumvent s2Member\'s security.</em></p>' . "\n";
378
  do_action ("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_ip_restrictions", get_defined_vars ());
379
  /**/
@@ -430,7 +431,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_res_ops"))
430
  echo '<div class="ws-menu-page-section ws-plugin--s2member-ip-restrictions-section">' . "\n";
431
  echo '<h3>Unique IP Access Restrictions ( prevents username/link sharing )</h3>' . "\n";
432
  echo '<input type="button" id="ws-plugin--s2member-ip-restrictions-reset-button" value="Reset IP Restriction Logs" class="ws-menu-page-right" style="min-width:175px;" />' . "\n";
433
- echo '<p>As with any Membership system, it is possible for one Member to signup, and then share their Username with someone else; or even post it online for the whole world to see. This is known as Link Sharing ( aka: Username Sharing ). It is NOT likely that you\'ll be attacked in this way, but it\'s still a good idea to protect your system; just in case somebody tries this. s2Member\'s IP Restrictions work for Membership Level Access ( account logins ), Specific Post/Page Access, Registration Links, and other secure Entry Points. In all cases, the rules are simple. A single Username, Access Link, and/or Entry Point ... is only valid for a certain number of unique IP addresses. Once that limit is reached, s2Member assumes there has been a security breach. At that time, s2Member will place a temporary ban ( preventing access ) to a Specific Post/Page, or to an account associated with a particular Username. This temporary ban, will ONLY affect the offending Link and/or Username associated with the security breach. You can fine-tune this behavior, using the options below.</p>' . "\n";
434
  echo '<p><em>*Note* an empty IP address ( associated with someone browsing anonymously ), is also considered a unique IP address, so it cannot circumvent s2Member\'s security.</em></p>' . "\n";
435
  do_action ("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_ip_restrictions", get_defined_vars ());
436
  /**/
54
  echo '<div class="ws-menu-page-section ws-plugin--s2member-post-level-access-section">' . "\n";
55
  echo '<h3>Post Level Access Restrictions ( optional )</h3>' . "\n";
56
  echo '<p>Here you can specify Posts that are restricted to certain Membership Access Levels. s2Member also supports Custom Post Types here, which were first introduced in WordPress® 3.0. If you have a theme or plugin installed, that has enabled Custom Post Types ( i.e. Music/Videos or something else ), you can put the IDs for those Posts here.</p>' . "\n";
57
+ echo '<p><em><strong>*Note*</strong> Protecting individual Posts, ONLY protects the Permalinks for those Posts. It is still possible for excerpts of protected content to be seen in search results generated by WordPress®, feeds, and Archive views; such as your Home Page, inside a Category listing, or through other queries formulated by your theme. This is the intended functionality. Excerpts are a great way to "tease" public visitors. In other words, public visitors may have access to excerpts introduced by your theme, but any attempt to view the full Post ( i.e. the Permalink ) will result in an automatic redirect to your Membership Options Page; requiring registration.</em></p>' . "\n";
58
+ echo '<p><em><strong>*Note*</strong> If you would like to protect many Posts at once ( including Archive views ), you can use Category Level Restrictions, Tag Level Restrictions, or have a look down below at s2Member\'s options for "Alternative View Protection", which deals with search results, as well as feeds.</em></p>' . "\n";
59
  echo ((!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) && !$GLOBALS["WS_PLUGIN__"]["wp_show_ids"]) ? '<p><em><strong>*Tip*</strong> Can\'t find your Post IDs? Get <a href="http://www.primothemes.com/post/product/wp-show-ids-plugin/" target="_blank" rel="external">WP Show IDs</a>.</em></p>' . "\n" : '';
60
  do_action ("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_post_level_access", get_defined_vars ());
61
  /**/
145
  /**/
146
  echo '<div class="ws-menu-page-section ws-plugin--s2member-tag-level-access-section">' . "\n";
147
  echo '<h3>Tag Level Access Restrictions ( optional )</h3>' . "\n";
148
+ echo '<p>Here you can specify Tags that are restricted to certain Membership Access Levels. This is very similar to Category Level Access. When you restrict access to a Tag Archive, it also restricts access to any Post having that Tag; even if a Post has other Tags. <em>*Tip*</em> ... Tags can be applied to any Post, without affecting your Category structure at all. If you\'d like to use Tags with Pages, get <a href="http://wordpress.org/extend/plugins/page-tagger/" target="_blank" rel="external">Page Tagger</a>.</p>' . "\n";
149
  echo '<p>Tags are caSe sensitive. The Tag <code>members only</code> is NOT the same as <code>Members Only</code>.</p>' . "\n";
150
  do_action ("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_tag_level_access", get_defined_vars ());
151
  /**/
190
  /**/
191
  echo '<div class="ws-menu-page-section ws-plugin--s2member-category-level-access-section">' . "\n";
192
  echo '<h3>Category Level Access Restrictions ( optional )</h3>' . "\n";
193
+ echo '<p>Here you can specify Categories that are restricted to certain Membership Access Levels. Category restrictions are a bit more complex. When you restrict access to a Category, it also restricts access to any child Categories it may have <em>( aka: sub-Categories )</em>. In other words, restricting a Category, protects a Category Archive, all of its child Category Archives, and any Posts contained within the Category, or its child Categories. This is a VERY powerful form of protection, so please be careful. It\'s very easy to protect too much content by accident.</p>' . "\n";
194
  echo ((!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) && !$GLOBALS["WS_PLUGIN__"]["wp_show_ids"]) ? '<p><em><strong>*Tip*</strong> Can\'t find your Category IDs? Get <a href="http://www.primothemes.com/post/product/wp-show-ids-plugin/" target="_blank" rel="external">WP Show IDs</a>.</em></p>' . "\n" : '';
195
  do_action ("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_category_level_access", get_defined_vars ());
196
  /**/
237
  /**/
238
  echo '<div class="ws-menu-page-section ws-plugin--s2member-uri-level-access-section">' . "\n";
239
  echo '<h3>URI Level Access Restrictions ( optional )</h3>' . "\n";
240
+ echo '<p>Here you can specify URIs <em>( or word fragments found in URIs )</em> that are restricted to certain Membership Access Levels. Control over URIs is a little more complex. This section is intended for advanced webmasters only. That being said, here are the basics... A <code>REQUEST_URI</code>, is the portion of a <code>URL</code> that comes immediately after the domain. This is a URL <code>http://www.example.com/path/to/file.php</code>, and this is the URI: <code>/path/to/file.php</code>. In other words, a <code>REQUEST_URI</code> is the full path to a real <em>( or virtual )</em> directory and/or file on your domain.</p>' . "\n";
241
  echo '<p>In the fields below, you can provide a list <em>( one per line )</em> of URIs on your site that should be off-limits based on Membership Level. You can also use word fragments instead of a full URI. If a word fragment is found anywhere in the URI, it will be protected. Wildcards and other regex patterns are NOT supported here, and therefore you don\'t need to escape special characters or anything. Please note, these ARE caSe sensitive. You must be specific with respect to case sensitivity. The word fragment <code>some-path/</code> would NOT match a URI that contains <code>some-Path/</code>. <em>A few <a href="#" onclick="alert(\'URI Replacement Codes:\\n\\n%%current_user_login%% = The current User\\\'s Username, lowercase.\\n%%current_user_id%% = The current User\\\'s ID.\\n%%current_user_level%% = The current User\\\'s s2Member Level.\\n%%current_user_role%% = The current User\\\'s WordPress® Role.' . ((!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? '\\n%%current_user_ccaps%% = The current User\\\'s Custom Capabilities.' : '') . '\\n%%current_user_logins%% = Number of times the current User has logged in.\\n\\nFor example, if you\\\'re using BuddyPress, and want to protect BuddyPress Groups, you could add URI protection, like this: /members/%%current_user_login%%/groups/\'); return false;">Replacement Codes</a> are also supported here.</em></p>' . "\n";
242
  echo '<p><em><strong>*BuddyPress ( and similar )*</strong> URI Restrictions work great with plugins like BuddyPress that add new areas to your site ( where those new areas are NOT necessarily a Post/Page/Tag/Category ). In other words, anytime you\'d like to protect a specific feature offered by BuddyPress ( or other plugins ), you\'ll need to nail down specific word fragments found in the URIs associated with those areas. For instance, with BuddyPress you might have: [ <a href="#" onclick="alert(\'/members/\\n/groups/\\n/blogs/\\n/activity/\\n/messages/\\n/profile/\\n/friends/\\n/settings/\'); return false;">click for example</a> ].</em></p>' . "\n";
243
  do_action ("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_uri_level_access", get_defined_vars ());
303
  echo '<td>' . "\n";
304
  echo '<div class="ws-menu-page-scrollbox" style="height:105px;">' . "\n";
305
  echo '<input type="hidden" name="ws_plugin__s2member_filter_wp_query[]" value="update-signal" />' . "\n";
306
+ foreach (array ("all" => "<strong>Filter ALL WordPress® queries</strong>; protecting all Alternative Views.", "searches" => "&#9492;&#9472; Searches ( hide protected content in search results )", "feeds" => "&#9492;&#9472; Feeds ( hide protected content in standard XML/RSS/ATOM feeds )", "comment-feeds" => "&#9492;&#9472; Comment Feeds ( hide comments associated with protected content, in comment feeds )", "nav-menus" => "&#9492;&#9472; Nav Menus ( hide protected content in menus generated with <em>WordPress® -> Appearance -> Menus</em> )") as $ws_plugin__s2member_temp_s_value => $ws_plugin__s2member_temp_s_label)
307
  echo '<input type="checkbox" name="ws_plugin__s2member_filter_wp_query[]" id="ws-plugin--s2member-filter-wp-query-' . esc_attr (preg_replace ("/[^a-z0-9_\-]/", "-", $ws_plugin__s2member_temp_s_value)) . '" value="' . esc_attr ($ws_plugin__s2member_temp_s_value) . '"' . ((in_array ($ws_plugin__s2member_temp_s_value, $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["filter_wp_query"])) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-filter-wp-query-' . esc_attr (preg_replace ("/[^a-z0-9_\-]/", "-", $ws_plugin__s2member_temp_s_value)) . '">' . $ws_plugin__s2member_temp_s_label . '</label><br />' . "\n";
308
  echo '</div>' . "\n";
309
  echo '<strong>Attn Developers:</strong> Filters can be suppressed dynamically, using this technique:<br />' . "\n";
330
  /**/
331
  echo '<div class="ws-menu-page-section ws-plugin--s2member-sp-access-section">' . "\n";
332
  echo '<h3>Specific Post/Page Access Restrictions ( optional )</h3>' . "\n";
333
+ echo '<p>s2Member now supports an additional layer of functionality <em>( very powerful )</em>, which allows you to sell access to specific Posts/Pages that you\'ve created in WordPress®. Specific Post/Page Access works independently from Member Level Access. That is, you can sell an unlimited number of Posts/Pages using "Buy Now" Buttons, and your Customers will NOT be required to have a Membership Account with your site in order to receive access. If they are already a Member, that\'s fine, but they won\'t need to be.</p>' . "\n";
334
  echo '<p>In other words, Customers will NOT need to login, just to receive access to the Specific Post/Page they purchased access to. s2Member will immediately redirect the Customer to the Specific Post/Page after checkout is completed successfully. An email is also sent to the Customer with a link ( see: <code>s2Member -> PayPal® Options -> Specific Post/Page Email</code> ). Authentication is handled automatically through self-expiring links, good for 72 hours by default.</p>' . "\n";
335
  echo '<p>Specific Post/Page Access, is sort of like selling a product. Only, instead of shipping anything to the Customer, you just give them access to a specific Post/Page on your site; one that you created in WordPress®. A Specific Post/Page that is protected by s2Member, might contain a download link for your eBook, access to file &amp; music downloads, access to additional support services, and the list goes on and on. The possibilities with this are endless; as long as your digital product can be delivered through access to a WordPress® Post/Page that you\'ve created.</p>' . "\n";
336
  echo '<p>Very simple. All you do is protect the Specific Post/Page IDs that are being sold on your site. Then, you can go to <code>s2Member -> PayPal® Buttons -> Specific Post/Page</code> to generate "Buy Now" Buttons that you can insert into your WordPress® Editor, and make available on your site. The Button Generator for s2Member, will even let you Package Additional Posts/Pages together into one transaction.</p>' . "\n";
352
  /**/
353
  echo '<td>' . "\n";
354
  echo '<input type="text" name="ws_plugin__s2member_specific_ids" id="ws-plugin--s2member-specific-ids" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["specific_ids"]) . '" /><br />' . "\n";
355
+ echo 'Post/Page IDs in comma-delimited format. Example: <code>1,2,3,34,8,21</code> * Note... the word <code>all</code> does NOT work here. Also, please be careful not to create a conflict with other Access Restrictions. If you are going to sell Specific Post/Page Access, you should enter specific Post/Page IDs here; and <strong>make SURE that you\'ve NOT already protected any of these Posts/Pages with Member Level Access Restrictions</strong>. In other words, if you configure s2Member, in such as a way, that a Post/Page requires Membership Level Access, you cannot sell that same Post/Page through Specific Post/Page Access. Doing so, would create a conflict. Customers that purchased Specific Post/Page Access, would be unable to access the Post/Page - without also having a Membership. Not good. So please be careful.' . "\n";
356
  echo '</td>' . "\n";
357
  /**/
358
  echo '</tr>' . "\n";
374
  echo '<div class="ws-menu-page-section ws-plugin--s2member-brute-force-restrictions-section">' . "\n";
375
  echo '<h3>Brute Force IP/Login Restrictions ( prevents username/password guessing )</h3>' . "\n";
376
  echo '<input type="button" id="ws-plugin--s2member-brute-force-restrictions-reset-button" value="Reset Brute Force Logs" class="ws-menu-page-right" style="min-width:175px;" />' . "\n";
377
+ echo '<p>As with any Membership system, it is possible for someone to try and guess Username/Password combinations by attempting a <a href="http://en.wikipedia.org/wiki/Brute-force_attack" target="_blank" rel="external">Brute Force Attack</a>; whereby multiple/repeated logins are strategically attempted with various Username/Password combinations until a correct guess is made. It is NOT likely that you\'ll be attacked in this way, but it\'s still a good idea to protect your system; just in case somebody tries this. s2Member thwarts this behavior by monitoring failed login attempts that occur within a short period of time. Whenever s2Member detects an IP address <em>( i.e. a remote user )</em> that is consistently failing to enter a valid Username/Password, a temporary ban is created; preventing additional attempts from taking place for 30 minutes. This temporary ban, will ONLY affect the offending IP address.</p>' . "\n";
378
  echo '<p><em>*Note* an empty IP address ( associated with someone browsing anonymously ), is also considered a unique IP address, so it cannot circumvent s2Member\'s security.</em></p>' . "\n";
379
  do_action ("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_ip_restrictions", get_defined_vars ());
380
  /**/
431
  echo '<div class="ws-menu-page-section ws-plugin--s2member-ip-restrictions-section">' . "\n";
432
  echo '<h3>Unique IP Access Restrictions ( prevents username/link sharing )</h3>' . "\n";
433
  echo '<input type="button" id="ws-plugin--s2member-ip-restrictions-reset-button" value="Reset IP Restriction Logs" class="ws-menu-page-right" style="min-width:175px;" />' . "\n";
434
+ echo '<p>As with any Membership system, it is possible for one Member to signup, and then share their Username with someone else; or even post it online for the whole world to see. This is known as Link Sharing <em>( aka: Username Sharing )</em>. It is NOT likely that you\'ll be attacked in this way, but it\'s still a good idea to protect your system; just in case somebody tries this. s2Member\'s IP Restrictions work for Membership Level Access <em>( account logins )</em>, Specific Post/Page Access, Registration Links, and other secure Entry Points. In all cases, the rules are simple. A single Username, Access Link, and/or Entry Point ... is only valid for a certain number of unique IP addresses. Once that limit is reached, s2Member assumes there has been a security breach. At that time, s2Member will place a temporary ban <em>( preventing access )</em> to a Specific Post/Page, or to an account associated with a particular Username. This temporary ban, will ONLY affect the offending Link and/or Username associated with the security breach. You can fine-tune this behavior, using the options below.</p>' . "\n";
435
  echo '<p><em>*Note* an empty IP address ( associated with someone browsing anonymously ), is also considered a unique IP address, so it cannot circumvent s2Member\'s security.</em></p>' . "\n";
436
  do_action ("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_ip_restrictions", get_defined_vars ());
437
  /**/
includes/menu-pages/scripting.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.0
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_menu_page_scripting"))
21
  {
15
  * @since 3.0
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_menu_page_scripting"))
21
  {
includes/menu-pages/start.inc.php CHANGED
@@ -65,11 +65,11 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_start"))
65
  /**/
66
  echo '<div class="ws-menu-page-section ws-plugin--s2member-registration-process-section">' . "\n";
67
  echo '<h3>The Subscription Signup/Registration Process</h3>' . "\n";
68
- echo '<p>1. Internet Users will go to your Membership Options Page ( which you\'ll need to configure on the s2Member General Options panel ). On this Membership Options Page, that YOU will create in WordPress®, you\'ll insert the PayPal® Subscription Buttons that were generated for you by s2Member.</p>' . "\n";
69
  echo '<p>2. An Internet User will click on a PayPal® Subscription Button from your Membership Options Page. They will be transferred over to PayPal® in order to agree to your Membership terms and pricing. You can customize the Checkout Page Style, Pricing, Payment Periods, and more - whenever you generate your PayPal® Buttons through s2Member.</p>' . "\n";
70
- echo '<p>3. Once a User has completed the Subscription Signup Process at PayPal®, they\'ll be returned to your site, where they\'ll be activated by s2Member instantly, and given the opportunity to register a Username &amp; Password for their Membership. ( Note: they\'ll be allowed to register a Username &amp; Password, even if you\'ve set \'Anyone Can Register\' to `Off` in your General WordPress® options; because s2Member identifies the User as having paid for Membership access through PayPal® ).</p>' . "\n";
71
  echo '<p>s2Member will also send the User an email with instructions on how to register their Username &amp; Password, just in case they missed the instructions after checkout. That email will be sent to their PayPal® email address. Much of this is handled through the PayPal® IPN service behind-the-scene, where PayPal® and s2Member communicate with each other.</p>' . "\n";
72
- echo '<p>4. Once a User has completed checkout and registered a Username &amp; Password, they\'ll be able to login. The first page they\'ll see after logging in, will be your Login Welcome Page ( which you\'ll need to configure on the s2Member General Options panel ). Your Login Welcome Page can contain whatever you like. You\'ll need to design this Page in WordPress®, and be creative!</p>' . "\n";
73
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_during_registration_process", get_defined_vars ());
74
  echo '</div>' . "\n";
75
  /**/
@@ -86,8 +86,11 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_start"))
86
  /**/
87
  echo '<div class="ws-menu-page-section ws-plugin--s2member-login-reg-form-section">' . "\n";
88
  echo '<h3>Your Login/Registration Form ( already built-in )</h3>' . "\n";
89
- echo '<p>s2Member uses the existing WordPress® Login/Registration system. This is the same Login/Registration Form that you use to access your WP® Dashboard. However, with s2Member installed, your Login/Registration Forms can be customized <em>( re-branded )</em>. <em>See: <code>s2Member -> General Options -> Login/Registration Design</code>.</em> You can make the default Login/Registration Forms match your WordPress® theme design; by changing the background color/image, your logo image, add Custom Fields, and more<em>!</em></p>' . "\n";
90
- echo '<p>Since s2Member uses the default Login/Registration system for WordPress®, s2Member is also compatible with themes, and other plugins <em>( such as BuddyPress )</em>. If your theme has a login form built-in already, chances are, it\'s perfectly compatible with s2Member. There are also many plugins available that are designed to place login forms into your Sidebar; and many of those are also compatible with s2Member\'s integration.</p>' . "\n";
 
 
 
91
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_during_log_reg_form", get_defined_vars ());
92
  echo '</div>' . "\n";
93
  /**/
@@ -104,7 +107,9 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_start"))
104
  /**/
105
  echo '<div class="ws-menu-page-section ws-plugin--s2member-login-welcome-page-section">' . "\n";
106
  echo '<h3>Your Login Welcome Page ( you create this in WordPress® )</h3>' . "\n";
107
- echo '<p>YOU, will create this special Page in WordPress®. This is a "Page", not a Post. This is the first page Members will see after logging into your site. You should go ahead and create an empty Page now, before you start configuring everything. Title it: <code>My Login Welcome Page</code>, and then click Publish. Once you have your s2Member -> General Options configured, and you\'ve got a good understanding for how things work, go back and customize the title and content for this Page. You\'ll want to be creative with your Login Welcome Page. However, you should configure your General Options first, and test things out. That way you\'ll understand why this Page is important.</p>' . "\n";
 
 
108
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_during_login_welcome_page", get_defined_vars ());
109
  echo '</div>' . "\n";
110
  /**/
@@ -121,8 +126,9 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_start"))
121
  /**/
122
  echo '<div class="ws-menu-page-section ws-plugin--s2member-membership-options-page-section">' . "\n";
123
  echo '<h3>Your Membership Options Page ( you create this in WordPress® )</h3>' . "\n";
124
- echo '<p>YOU, will create this special Page in WordPress®. This is a "Page", not a Post. s2Member comes with a PayPal® Button Generator. You will generate PayPal® Buttons with s2Member, for each Membership Level that you plan to offer. Those buttons will be inserted into your Membership Options Page. If a User in the general public, attempts to access an area of your site that is being protected by s2Member ( based on your configuration ), s2Member will redirect the User to your Membership Options Page, where they can signup through PayPal® and become a Member.</p>' . "\n";
125
- echo '<p>You should go ahead and create an empty Page now, before you start configuring everything. Title it: <code>My Membership Options Page</code>, and then click Publish. Once you have your s2Member -> General Options configured, and you\'ve got a good understanding for how things work, go back and customize the title and content for this Page. You\'ll want to be creative with your Membership Options Page. However, you should configure your General Options first, and test things out. That way you\'ll understand why this Page is important.</p>' . "\n";
 
126
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_during_membership_options_page", get_defined_vars ());
127
  echo '</div>' . "\n";
128
  /**/
@@ -140,7 +146,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_start"))
140
  echo '<div class="ws-menu-page-section ws-plugin--s2member-general-options-section">' . "\n";
141
  echo '<h3>Your s2Member -> General Options ( basic configuration )</h3>' . "\n";
142
  echo '<p>Once you have a Login Welcome Page, and a Membership Options Page. Go to: <code>s2Member -> General Options</code>.</p>' . "\n";
143
- echo '<p>From your s2Member General Options Panel, you can setup the basics of your Membership offering. Including the design of your Login/Registration Form, any Custom Registration Fields you\'d like to create, Labels for each Membership Level, Open Registration (on/off), a Profile Editing Panel for Members, and more.</p>' . "\n";
144
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_during_general_options", get_defined_vars ());
145
  echo '</div>' . "\n";
146
  /**/
@@ -158,7 +164,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_start"))
158
  echo '<div class="ws-menu-page-section ws-plugin--s2member-restriction-options-section">' . "\n";
159
  echo '<h3>Your s2Member -> Restriction Options ( basic configuration )</h3>' . "\n";
160
  echo '<p>Once you have a Login Welcome Page, and a Membership Options Page. Go to: <code>s2Member -> Restriction Options</code>.</p>' . "\n";
161
- echo '<p>From your s2Member Restriction Options Panel, you may restrict access to certain Posts, Pages, Tags, Categories, and/or URIs based on a Member\'s Level. The s2Member Options Panel makes it easy for you. All you do is type in the basics of what you want to restrict access to, and those sections of your site will be off limits to non-Members.' . ((!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? ' That being said, there are times when you might need to have greater control over which portions of your site can be viewed by non-Members, or Members at different Levels. This is where API Scripting with Conditionals comes in. <em>For more information, see: <code>s2Member -> API Scripting</code></em>.' : '') . '</p>' . "\n";
 
162
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_during_restriction_options", get_defined_vars ());
163
  echo '</div>' . "\n";
164
  /**/
@@ -171,12 +178,12 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_start"))
171
  {
172
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_before_automation_process", get_defined_vars ());
173
  /**/
174
- echo '<div class="ws-menu-page-group" title="Subscription Cancellations">' . "\n";
175
  /**/
176
  echo '<div class="ws-menu-page-section ws-plugin--s2member-automation-process-section">' . "\n";
177
  echo '<h3>Subscription Cancellations / Expirations / Terminations</h3>' . "\n";
178
- echo '<p>You\'ll be happy to know that s2Member handles cancellations, expirations, failed payments, terminations ( e.g. refunds &amp; chargebacks ) for you automatically. If you log into your PayPal® account and cancel a Member\'s Subscription, or, if the Member logs into their PayPal® account and cancels their own Subscription, s2Member will be notified of these important changes and react accordingly through the PayPal® IPN service that runs silently behind-the-scene.</p>' . "\n";
179
- echo '<p>The PayPal® IPN service will notify s2Member whenever a Member\'s payments have been failing, and/or whenever a Member\'s Subscription has expired for any reason. Even refunds &amp; chargeback reversals are supported through the IPN service. If you issue a refund to an unhappy Customer through PayPal®, s2Member will be notified, and the account for that Customer will either be demoted to a Free Subscriber, or deleted automatically ( based on your configuration ). The communication from PayPal® -> s2Member is seamless.</p>' . "\n";
180
  echo '<p><em><strong>*Some Hairy Details*</strong> There might be times whenever you notice that a Member\'s Subscription has been cancelled through PayPal®... but, s2Member continues allowing the User access to your site as a paid Member. Please don\'t be confused by this... in 99.9% of these cases, the reason for this is legitimate. s2Member will only remove the User\'s Membership privileges when an EOT ( End Of Term ) is processed, a refund occurs, a chargeback occurs, or when a cancellation occurs - which would later result in a delayed Auto-EOT by s2Member.</em></p>' . "\n";
181
  echo '<p><em>s2Member will not process an EOT until the User has completely used up the time they paid for. In other words, if a User signs up for a monthly Subscription on Jan 1st, and then cancels their Subscription on Jan 15th; technically, they should still be allowed to access the site for another 15 days, and then on Feb 1st, the time they paid for has completely elapsed. At that time, s2Member will remove their Membership privileges; by either demoting them to a Free Subscriber, or deleting their account from the system ( based on your configuration ). s2Member also calculates one extra day ( 24 hours ) into its equation, just to make sure access is not removed sooner than a Customer might expect.</em></p>' . "\n";
182
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_during_automation_process", get_defined_vars ());
@@ -205,7 +212,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_start"))
205
  /**/
206
  echo '<div class="ws-menu-page-section ws-plugin--s2member-subscription-modification-section">' . "\n";
207
  echo '<h3>Giving Members The Ability To Modify Their Own Subscription</h3>' . "\n";
208
- echo '<p>If you\'d like to give your Members ( and/or your Free Subscribers ) the ability to modify their billing plan, by switching to a more expensive option, or a less expensive option; generate a new PayPal® Modification Button, using the s2Member PayPal® Button Generator. Configure the updated Level, pricing, terms, etc. Then, make that new Modification Button available to Members who are logged into their existing account with you. For example, you might want to insert a "Level #2" Upgrade Button into your Login Welcome Page, which would up-sell existing Level #1 Members to a more expensive plan that you offer.</p>' . "\n";
209
  echo '<p><em><strong>*Modification Process*</strong> When you send a Member to PayPal® using a Subscription Modification Button, PayPal® will ask them to login. Once they\'re logged in, instead of being able to signup for a new Membership, PayPal® will provide them with the ability to upgrade and/or downgrade their existing Membership with you, by allowing them to switch to the Membership Plan that was specified in the Subscription Modification Button. PayPal® handles this nicely, and you\'ll be happy to know that s2Member has been pre-configured to deal with this scenario as well, so that everything remains automated. Their Membership Access Level will either be promoted, or demoted, based on the actions they took at PayPal® during the modification process. Once an existing Member completes their Subscription Modification at PayPal®, they\'ll be brought back to their Login Welcome Page, instead of sending them to a registration screen.</em></p>' . "\n";
210
  echo '<p><em><strong>*Also Works For Free Subscribers*</strong> Although a Free Subscriber does not have an existing PayPal® Subscription, s2Member is capable of adapting to this scenario gracefully. Just make sure that your existing Free Subscribers ( the ones who wish to upgrade ) pay for their Membership through a Modification Button generated by s2Member. That will allow them to continue using their existing account with you. In other words, they can keep their existing Username ( and anything already associated with that Username ), rather than being forced to re-register after checkout.</em></p>' . "\n";
211
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_before_upgrading_downgrading_modifications", get_defined_vars ());
@@ -225,7 +232,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_start"))
225
  echo '<div class="ws-menu-page-section ws-plugin--s2member-reg-before-checkout-section">' . "\n";
226
  echo '<h3>Registration Before Checkout? ( reversing the process )</h3>' . "\n";
227
  echo '<p>By default, s2Member will send a Customer directly to PayPal®, and only after checkout is completed does the Customer have the ability to register a Username/Password for access to your site. This process works very well in most cases, and it has the benefit of increasing conversion rates; because there are fewer obstacles for the Customer on their way to the actual checkout process at PayPal®.</p>' . "\n";
228
- echo '<p>That being said, we believe the "ideal" approach is a combined Checkout/Registration process; in just one simple step ( available with s2Member Pro via PayPal® Pro integration ). But even with PayPal® Standard integration, there is a way to accomplish (registration before checkout), thereby reversing the process — if you prefer it that way. This is accomplished by turning Open Registration <code>(on)</code>, and then making a PayPal® Button available to Free Subscribers at Level #0. In other words, you can let visitors register for free at Level #0, then charge them for access to higher Member Levels [1-4]. For further details, please check your WordPress® Dashboard under: <code>s2Member -> General Options -> Open Registration</code>. If you\'re running a Multisite Network, see: <code>s2Member -> Multisite (Config) -> Registration Configuration</code>.</p>' . "\n";
 
229
  echo '<p><em>s2Member\'s Simple Conditionals can help you further integrate this process, by allowing you to integrate a special PayPal® Button on your Login Welcome Page; one that will be seen only by Free Subscribers at Level #0. Please check your WordPress® Dashboard under: <code>s2Member -> API Scripting -> Simple Conditionals</code>. We also suggest reading over the documentation on PayPal® Modification Buttons. See: <code>s2Member -> PayPal® Buttons -> Subscription Modifications</code>.</em></p>' . "\n";
230
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_during_reg_before_checkout", get_defined_vars ());
231
  echo '</div>' . "\n";
65
  /**/
66
  echo '<div class="ws-menu-page-section ws-plugin--s2member-registration-process-section">' . "\n";
67
  echo '<h3>The Subscription Signup/Registration Process</h3>' . "\n";
68
+ echo '<p>1. Internet Users will go to your Membership Options Page <em>( which you\'ll need to configure on the s2Member General Options panel )</em>. On this Membership Options Page, that YOU will create in WordPress®, you\'ll insert the PayPal® Subscription Buttons that were generated for you by s2Member.</p>' . "\n";
69
  echo '<p>2. An Internet User will click on a PayPal® Subscription Button from your Membership Options Page. They will be transferred over to PayPal® in order to agree to your Membership terms and pricing. You can customize the Checkout Page Style, Pricing, Payment Periods, and more - whenever you generate your PayPal® Buttons through s2Member.</p>' . "\n";
70
+ echo '<p>3. Once a User has completed the Subscription Signup Process at PayPal®, they\'ll be returned to your site, where they\'ll be activated by s2Member instantly, and given the opportunity to register a Username &amp; Password for their Membership. <em>( Note: they\'ll be allowed to register a Username &amp; Password, even if you\'ve set \'Anyone Can Register\' to `Off` in your General WordPress® options; because s2Member identifies the User as having paid for Membership access through PayPal® )</em>.</p>' . "\n";
71
  echo '<p>s2Member will also send the User an email with instructions on how to register their Username &amp; Password, just in case they missed the instructions after checkout. That email will be sent to their PayPal® email address. Much of this is handled through the PayPal® IPN service behind-the-scene, where PayPal® and s2Member communicate with each other.</p>' . "\n";
72
+ echo '<p>4. Once a User has completed checkout and registered a Username &amp; Password, they\'ll be able to log in. The first page they\'ll see after logging in, will be your Login Welcome Page <em>( which you\'ll need to configure on the s2Member General Options panel )</em>. Your Login Welcome Page can contain whatever you like. You\'ll need to design this Page in WordPress®, and be creative!</p>' . "\n";
73
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_during_registration_process", get_defined_vars ());
74
  echo '</div>' . "\n";
75
  /**/
86
  /**/
87
  echo '<div class="ws-menu-page-section ws-plugin--s2member-login-reg-form-section">' . "\n";
88
  echo '<h3>Your Login/Registration Form ( already built-in )</h3>' . "\n";
89
+ echo '<p>s2Member uses the existing WordPress® Login/Registration system. This is the same Login/Registration Form that you use to access your WP® Dashboard. However, with s2Member installed, your Login/Registration Forms can be customized <em>( i.e. re-branded )</em>. <em>See: <code>s2Member -> General Options -> Login/Registration Design</code>.</em> You can make the default Login/Registration Forms match your WordPress® theme design; by changing the background color/image, your logo image, add Custom Fields, and more<em>!</em></p>' . "\n";
90
+ echo '<p>Since s2Member uses the default Login/Registration system for WordPress®, s2Member is also compatible with themes, and other plugins <em>( such as BuddyPress )</em>. If your theme has a login form built-in already, chances are, it\'s perfectly compatible with s2Member. There are also many plugins available that are designed to place login forms into your Sidebar; and many of those are also compatible with s2Member\'s integration. If you have any trouble, please check the <a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Forum URI")) . '" target="_blank" rel="external">s2Member Forums</a> for assistance.</p>' . "\n";
91
+ echo ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && is_main_site ()) || c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '<div class="ws-menu-page-hr"></div>' . "\n" : '';
92
+ echo (is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && is_main_site ()) ? '<p><em>The Main Site of a Multisite Blog Farm uses a different Registration Form. See: <code>s2Member -> General Options -> Registration/Profile Fields</code>.</em></p>' . "\n" : '';
93
+ echo (c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '<p><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form. See: <code>s2Member -> General Options -> Registration/Profile Fields</code>.</em></p>' . "\n" : '';
94
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_during_log_reg_form", get_defined_vars ());
95
  echo '</div>' . "\n";
96
  /**/
107
  /**/
108
  echo '<div class="ws-menu-page-section ws-plugin--s2member-login-welcome-page-section">' . "\n";
109
  echo '<h3>Your Login Welcome Page ( you create this in WordPress® )</h3>' . "\n";
110
+ echo '<p>YOU, will create this special Page in WordPress®. This is a "Page", not a Post. This is the first page Members will see after logging into your site.</p>' . "\n";
111
+ echo '<p>You should go ahead and create an empty Page now, before you start configuring everything. Title it: <code>My Login Welcome Page</code>, and click Publish.</p>' . "\n";
112
+ echo '<p>Once you have all of your <code>s2Member -> General Options</code> configured, and once you have a basic understanding of how s2Member works, go back and customize the title and content for this Page. You\'ll want to be creative with your Login Welcome Page. However, you should configure your <code>s2Member -> General Options</code> first, and test things out. That way you\'ll understand why this Page is important.</p>' . "\n";
113
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_during_login_welcome_page", get_defined_vars ());
114
  echo '</div>' . "\n";
115
  /**/
126
  /**/
127
  echo '<div class="ws-menu-page-section ws-plugin--s2member-membership-options-page-section">' . "\n";
128
  echo '<h3>Your Membership Options Page ( you create this in WordPress® )</h3>' . "\n";
129
+ echo '<p>YOU, will create this special Page in WordPress®. This is a "Page", not a Post. s2Member comes with a PayPal® Button Generator. You will generate PayPal® Buttons with s2Member, for each Membership Level that you plan to offer. Those buttons will be inserted into your Membership Options Page. If a User in the general public, attempts to access an area of your site that is being protected by s2Member <em>( based on your configuration )</em>, s2Member will redirect the User to your Membership Options Page, where they can signup through PayPal® and become a Member.</p>' . "\n";
130
+ echo '<p>You should go ahead and create an empty Page now, before you start configuring everything. Title it: <code>My Membership Options Page</code>, and click Publish.</p>' . "\n";
131
+ echo '<p>Once you have all of your <code>s2Member -> General Options</code> configured, and once you have a basic understanding of how s2Member works, go back and customize the title and content for this Page. You\'ll want to be creative with your Membership Options Page. However, you should configure your <code>s2Member -> General Options</code> first, and test things out. That way you\'ll understand why this Page is important.</p>' . "\n";
132
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_during_membership_options_page", get_defined_vars ());
133
  echo '</div>' . "\n";
134
  /**/
146
  echo '<div class="ws-menu-page-section ws-plugin--s2member-general-options-section">' . "\n";
147
  echo '<h3>Your s2Member -> General Options ( basic configuration )</h3>' . "\n";
148
  echo '<p>Once you have a Login Welcome Page, and a Membership Options Page. Go to: <code>s2Member -> General Options</code>.</p>' . "\n";
149
+ echo '<p>From your s2Member General Options Panel, you can setup the basics of your Membership offering. Including the design of your Login/Registration Form, any Custom Registration/Profile Fields you\'d like to create, Labels for each Membership Level, Open Registration (on/off), a Profile Editing Panel for Members, and more.</p>' . "\n";
150
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_during_general_options", get_defined_vars ());
151
  echo '</div>' . "\n";
152
  /**/
164
  echo '<div class="ws-menu-page-section ws-plugin--s2member-restriction-options-section">' . "\n";
165
  echo '<h3>Your s2Member -> Restriction Options ( basic configuration )</h3>' . "\n";
166
  echo '<p>Once you have a Login Welcome Page, and a Membership Options Page. Go to: <code>s2Member -> Restriction Options</code>.</p>' . "\n";
167
+ echo '<p>From your s2Member Restriction Options Panel, you may restrict access to certain Posts, Pages, Tags, Categories, and/or URIs based on a Member\'s Level. The s2Member Options Panel makes it easy for you. All you do is type in the basics of what you want to restrict access to, and those sections of your site will be off limits to non-Members.</p>' . "\n";
168
+ echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? '<p>That being said, there are times when you might need to have greater control over which portions of your site can be viewed by non-Members, or Members at different Levels. This is where API Scripting with Conditionals comes in. <em>For more information, please check your Dashboard here: <code>s2Member -> API Scripting</code></em>.</p>' . "\n" : '';
169
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_during_restriction_options", get_defined_vars ());
170
  echo '</div>' . "\n";
171
  /**/
178
  {
179
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_before_automation_process", get_defined_vars ());
180
  /**/
181
+ echo '<div class="ws-menu-page-group" title="Cancellations / Expirations / Terminations">' . "\n";
182
  /**/
183
  echo '<div class="ws-menu-page-section ws-plugin--s2member-automation-process-section">' . "\n";
184
  echo '<h3>Subscription Cancellations / Expirations / Terminations</h3>' . "\n";
185
+ echo '<p>You\'ll be happy to know that s2Member handles cancellations, expirations, failed payments, terminations <em>( e.g. refunds &amp; chargebacks )</em> for you automatically. If you log into your PayPal® account and cancel a Member\'s Subscription, or, if the Member logs into their PayPal® account and cancels their own Subscription, s2Member will be notified of these important changes and react accordingly through the PayPal® IPN service that runs silently behind-the-scene.</p>' . "\n";
186
+ echo '<p>The PayPal® IPN service will notify s2Member whenever a Member\'s payments have been failing, and/or whenever a Member\'s Subscription has expired for any reason. Even refunds &amp; chargeback reversals are supported through the IPN service. If you issue a refund to an unhappy Customer through PayPal®, s2Member will be notified, and the account for that Customer will either be demoted to a Free Subscriber, or deleted automatically <em>( based on your configuration )</em>. The communication from PayPal® -> s2Member is seamless.</p>' . "\n";
187
  echo '<p><em><strong>*Some Hairy Details*</strong> There might be times whenever you notice that a Member\'s Subscription has been cancelled through PayPal®... but, s2Member continues allowing the User access to your site as a paid Member. Please don\'t be confused by this... in 99.9% of these cases, the reason for this is legitimate. s2Member will only remove the User\'s Membership privileges when an EOT ( End Of Term ) is processed, a refund occurs, a chargeback occurs, or when a cancellation occurs - which would later result in a delayed Auto-EOT by s2Member.</em></p>' . "\n";
188
  echo '<p><em>s2Member will not process an EOT until the User has completely used up the time they paid for. In other words, if a User signs up for a monthly Subscription on Jan 1st, and then cancels their Subscription on Jan 15th; technically, they should still be allowed to access the site for another 15 days, and then on Feb 1st, the time they paid for has completely elapsed. At that time, s2Member will remove their Membership privileges; by either demoting them to a Free Subscriber, or deleting their account from the system ( based on your configuration ). s2Member also calculates one extra day ( 24 hours ) into its equation, just to make sure access is not removed sooner than a Customer might expect.</em></p>' . "\n";
189
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_during_automation_process", get_defined_vars ());
212
  /**/
213
  echo '<div class="ws-menu-page-section ws-plugin--s2member-subscription-modification-section">' . "\n";
214
  echo '<h3>Giving Members The Ability To Modify Their Own Subscription</h3>' . "\n";
215
+ echo '<p>If you\'d like to give your Members <em>( and/or your Free Subscribers )</em> the ability to modify their billing plan, by switching to a more expensive option, or a less expensive option; generate a new PayPal® Modification Button, using the s2Member PayPal® Button Generator. Configure the updated Level, pricing, terms, etc. Then, make that new Modification Button available to Members who are logged into their existing account with you. For example, you might want to insert a "Level #2" Upgrade Button into your Login Welcome Page, which would up-sell existing Level #1 Members to a more expensive plan that you offer.</p>' . "\n";
216
  echo '<p><em><strong>*Modification Process*</strong> When you send a Member to PayPal® using a Subscription Modification Button, PayPal® will ask them to login. Once they\'re logged in, instead of being able to signup for a new Membership, PayPal® will provide them with the ability to upgrade and/or downgrade their existing Membership with you, by allowing them to switch to the Membership Plan that was specified in the Subscription Modification Button. PayPal® handles this nicely, and you\'ll be happy to know that s2Member has been pre-configured to deal with this scenario as well, so that everything remains automated. Their Membership Access Level will either be promoted, or demoted, based on the actions they took at PayPal® during the modification process. Once an existing Member completes their Subscription Modification at PayPal®, they\'ll be brought back to their Login Welcome Page, instead of sending them to a registration screen.</em></p>' . "\n";
217
  echo '<p><em><strong>*Also Works For Free Subscribers*</strong> Although a Free Subscriber does not have an existing PayPal® Subscription, s2Member is capable of adapting to this scenario gracefully. Just make sure that your existing Free Subscribers ( the ones who wish to upgrade ) pay for their Membership through a Modification Button generated by s2Member. That will allow them to continue using their existing account with you. In other words, they can keep their existing Username ( and anything already associated with that Username ), rather than being forced to re-register after checkout.</em></p>' . "\n";
218
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_before_upgrading_downgrading_modifications", get_defined_vars ());
232
  echo '<div class="ws-menu-page-section ws-plugin--s2member-reg-before-checkout-section">' . "\n";
233
  echo '<h3>Registration Before Checkout? ( reversing the process )</h3>' . "\n";
234
  echo '<p>By default, s2Member will send a Customer directly to PayPal®, and only after checkout is completed does the Customer have the ability to register a Username/Password for access to your site. This process works very well in most cases, and it has the benefit of increasing conversion rates; because there are fewer obstacles for the Customer on their way to the actual checkout process at PayPal®.</p>' . "\n";
235
+ echo '<p>That being said, we believe the <strong>ideal</strong> approach is a <strong>combined Checkout/Registration process</strong>; in just one simple step <em>( available with <a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Pro Module / Prices")) . '" target="_blank" rel="external">s2Member Pro</a> via PayPal® Pro integration )</em>.</p>' . "\n";
236
+ echo '<p>However, even with PayPal® Standard integration, there is a way to accomplish Registration Before Checkout, thereby reversing the process — if you prefer it that way. This is accomplished by turning Open Registration <code>(on)</code>, and then making a PayPal® Button available to Free Subscribers at Level #0. In other words, you can let Visitors register for free at Level #0 <em>( where they have access to very little perhaps )</em>, and then charge them for access to higher Member Levels [1-4]. For further details, please check your WordPress® Dashboard here: <code>s2Member -> General Options -> Open Registration</code>.</p>' . "\n";
237
  echo '<p><em>s2Member\'s Simple Conditionals can help you further integrate this process, by allowing you to integrate a special PayPal® Button on your Login Welcome Page; one that will be seen only by Free Subscribers at Level #0. Please check your WordPress® Dashboard under: <code>s2Member -> API Scripting -> Simple Conditionals</code>. We also suggest reading over the documentation on PayPal® Modification Buttons. See: <code>s2Member -> PayPal® Buttons -> Subscription Modifications</code>.</em></p>' . "\n";
238
  do_action ("ws_plugin__s2member_during_start_page_during_left_sections_during_reg_before_checkout", get_defined_vars ());
239
  echo '</div>' . "\n";
includes/menu-pages/trk-ops.inc.php CHANGED
@@ -168,12 +168,12 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_trk_ops"))
168
  echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
169
  echo '</ul>' . "\n";
170
  /**/
171
- echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
172
  echo '<ul>' . "\n";
173
- echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration Field with the ID <code>date_of_birth</code>.</li>' . "\n";
174
- echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration Field with the ID <code>street_address</code>.</li>' . "\n";
175
- echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
176
- echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
177
  echo '</ul>' . "\n";
178
  /**/
179
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
@@ -244,12 +244,12 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_trk_ops"))
244
  echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
245
  echo '</ul>' . "\n";
246
  /**/
247
- echo '<strong>Custom Registration Fields are also supported in this Notification:</strong>' . "\n";
248
  echo '<ul>' . "\n";
249
- echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration Field with the ID <code>date_of_birth</code>.</li>' . "\n";
250
- echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration Field with the ID <code>street_address</code>.</li>' . "\n";
251
- echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration Field with the ID <code>country</code>.</li>' . "\n";
252
- echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Custom Registration Fields</em>.</li>' . "\n";
253
  echo '</ul>' . "\n";
254
  /**/
255
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
168
  echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
169
  echo '</ul>' . "\n";
170
  /**/
171
+ echo '<strong>Custom Registration/Profile Fields are also supported in this Notification:</strong>' . "\n";
172
  echo '<ul>' . "\n";
173
+ echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
174
+ echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
175
+ echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
176
+ echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Registration/Profile Fields</em>.</li>' . "\n";
177
  echo '</ul>' . "\n";
178
  /**/
179
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
244
  echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID that references this account in the WordPress® database.</li>' . "\n";
245
  echo '</ul>' . "\n";
246
  /**/
247
+ echo '<strong>Custom Registration/Profile Fields are also supported in this Notification:</strong>' . "\n";
248
  echo '<ul>' . "\n";
249
+ echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
250
+ echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
251
+ echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
252
+ echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -> General Options -> Registration/Profile Fields</em>.</li>' . "\n";
253
  echo '</ul>' . "\n";
254
  /**/
255
  echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
includes/translations/s2member.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the s2Member package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: s2Member 110926\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/.__s2member\n"
7
- "POT-Creation-Date: 2011-09-27 01:19:21+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -71,52 +71,52 @@ msgctxt "s2member-front"
71
  msgid "password strength indicator"
72
  msgstr ""
73
 
74
- #: s2member/includes/classes/email-configs.inc.php:170
75
  msgctxt "s2member-front"
76
  msgid "as a Member"
77
  msgstr ""
78
 
79
- #: s2member/includes/classes/files-in.inc.php:93
80
- #: s2member/includes/classes/files-in.inc.php:239
81
  msgctxt "s2member-front"
82
- msgid "404: Sorry, file not found. Please contact Support for assistance."
83
  msgstr ""
84
 
85
- #: s2member/includes/classes/files-in.inc.php:102
86
  msgctxt "s2member-front"
87
- msgid "503 ( Invalid Key ): Sorry, your access to this file has expired. Please contact Support for assistance."
88
  msgstr ""
89
 
90
  #: s2member/includes/classes/files-in.inc.php:121
91
  msgctxt "s2member-front"
92
- msgid "503: Sorry, File Downloads are NOT enabled yet. Please contact Support for assistance. If you are the site owner, please configure: `s2Member -> Download Options -> Basic Download Restrictions`."
93
  msgstr ""
94
 
95
- #: s2member/includes/classes/files-in.inc.php:368
96
  msgctxt "s2member-front"
97
- msgid "503: Access denied. Invalid File Download specs."
98
  msgstr ""
99
 
100
- #: s2member/includes/classes/files-in.inc.php:453
101
  msgctxt "s2member-front"
102
  msgid "Members Only"
103
  msgstr ""
104
 
105
- #: s2member/includes/classes/files-in.inc.php:455
106
  msgctxt "s2member-front"
107
- msgid "Access Denied"
108
  msgstr ""
109
 
110
  #. translators: In this translation, `%s` may be filled with an English
111
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
112
  #. `%s` if you like.
113
 
114
- #: s2member/includes/classes/files-in.inc.php:593
115
  msgctxt "s2member-admin"
116
  msgid "Unable to update existing Amazon® S3 Cross-Domain Policy. %s"
117
  msgstr ""
118
 
119
- #: s2member/includes/classes/files-in.inc.php:596
120
  msgctxt "s2member-admin"
121
  msgid "Unable to update existing Amazon® S3 Cross-Domain Policy. Connection failed."
122
  msgstr ""
@@ -125,12 +125,12 @@ msgstr ""
125
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
126
  #. `%s` if you like.
127
 
128
- #: s2member/includes/classes/files-in.inc.php:600
129
  msgctxt "s2member-admin"
130
  msgid "Unable to update existing Amazon® S3 Bucket Policy. %s"
131
  msgstr ""
132
 
133
- #: s2member/includes/classes/files-in.inc.php:603
134
  msgctxt "s2member-admin"
135
  msgid "Unable to update existing Amazon® S3 Bucket Policy. Connection failed."
136
  msgstr ""
@@ -139,17 +139,17 @@ msgstr ""
139
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
140
  #. `%s` if you like.
141
 
142
- #: s2member/includes/classes/files-in.inc.php:607
143
  msgctxt "s2member-admin"
144
  msgid "Unable to update existing Amazon® S3 Bucket ACLs. %s"
145
  msgstr ""
146
 
147
- #: s2member/includes/classes/files-in.inc.php:610
148
  msgctxt "s2member-admin"
149
  msgid "Unable to update existing Amazon® S3 Bucket ACLs. Connection failed."
150
  msgstr ""
151
 
152
- #: s2member/includes/classes/files-in.inc.php:613
153
  msgctxt "s2member-admin"
154
  msgid "Unable to acquire/read existing Amazon® S3 Bucket ACLs. Unexpected response."
155
  msgstr ""
@@ -158,22 +158,22 @@ msgstr ""
158
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
159
  #. `%s` if you like.
160
 
161
- #: s2member/includes/classes/files-in.inc.php:617
162
  msgctxt "s2member-admin"
163
  msgid "Unable to acquire existing Amazon® S3 Bucket ACLs. %s"
164
  msgstr ""
165
 
166
- #: s2member/includes/classes/files-in.inc.php:620
167
  msgctxt "s2member-admin"
168
  msgid "Unable to acquire existing Amazon® S3 Bucket ACLs. Connection failed."
169
  msgstr ""
170
 
171
- #: s2member/includes/classes/files-in.inc.php:623
172
  msgctxt "s2member-admin"
173
  msgid "Unable to auto-configure existing Amazon® S3 Bucket ACLs. Incomplete Amazon® S3 configuration options. Missing one of: Amazon® S3 Bucket, Access Key, or Secret Key."
174
  msgstr ""
175
 
176
- #: s2member/includes/classes/files-in.inc.php:762
177
  msgctxt "s2member-admin"
178
  msgid "Unable to delete existing Amazon® CloudFront Downloads Distro. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
179
  msgstr ""
@@ -182,12 +182,12 @@ msgstr ""
182
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
183
  #. exclude `%s` if you like.
184
 
185
- #: s2member/includes/classes/files-in.inc.php:769
186
  msgctxt "s2member-admin"
187
  msgid "Unable to delete existing Amazon® CloudFront Downloads Distro. %s"
188
  msgstr ""
189
 
190
- #: s2member/includes/classes/files-in.inc.php:781
191
  msgctxt "s2member-admin"
192
  msgid "Unable to delete existing Amazon® CloudFront Streaming Distro. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
193
  msgstr ""
@@ -196,7 +196,7 @@ msgstr ""
196
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
197
  #. exclude `%s` if you like.
198
 
199
- #: s2member/includes/classes/files-in.inc.php:788
200
  msgctxt "s2member-admin"
201
  msgid "Unable to delete existing Amazon® CloudFront Streaming Distro. %s"
202
  msgstr ""
@@ -205,8 +205,8 @@ msgstr ""
205
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
206
  #. exclude `%s` if you like.
207
 
208
- #: s2member/includes/classes/files-in.inc.php:804
209
- #: s2member/includes/classes/files-in.inc.php:986
210
  msgctxt "s2member-admin"
211
  msgid "Unable to delete existing Amazon® CloudFront Origin Access Identity. %s"
212
  msgstr ""
@@ -215,12 +215,12 @@ msgstr ""
215
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
216
  #. `%s` if you like.
217
 
218
- #: s2member/includes/classes/files-in.inc.php:843
219
  msgctxt "s2member-admin"
220
  msgid "Unable to update existing Amazon® S3 ACLs. %s"
221
  msgstr ""
222
 
223
- #: s2member/includes/classes/files-in.inc.php:846
224
  msgctxt "s2member-admin"
225
  msgid "Unable to update existing Amazon® S3 ACLs. Connection failed."
226
  msgstr ""
@@ -229,14 +229,14 @@ msgstr ""
229
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
230
  #. exclude `%s` if you like.
231
 
232
- #: s2member/includes/classes/files-in.inc.php:850
233
- #: s2member/includes/classes/files-in.inc.php:1274
234
  msgctxt "s2member-admin"
235
  msgid "Unable to create Amazon® CloudFront Streaming Distro. %s"
236
  msgstr ""
237
 
238
- #: s2member/includes/classes/files-in.inc.php:853
239
- #: s2member/includes/classes/files-in.inc.php:1276
240
  msgctxt "s2member-admin"
241
  msgid "Unable to create Amazon® CloudFront Streaming Distro. Connection failed."
242
  msgstr ""
@@ -245,14 +245,14 @@ msgstr ""
245
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
246
  #. exclude `%s` if you like.
247
 
248
- #: s2member/includes/classes/files-in.inc.php:857
249
- #: s2member/includes/classes/files-in.inc.php:1253
250
  msgctxt "s2member-admin"
251
  msgid "Unable to create Amazon® CloudFront Downloads Distro. %s"
252
  msgstr ""
253
 
254
- #: s2member/includes/classes/files-in.inc.php:860
255
- #: s2member/includes/classes/files-in.inc.php:1255
256
  msgctxt "s2member-admin"
257
  msgid "Unable to create Amazon® CloudFront Downloads Distro. Connection failed."
258
  msgstr ""
@@ -261,19 +261,19 @@ msgstr ""
261
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
262
  #. exclude `%s` if you like.
263
 
264
- #: s2member/includes/classes/files-in.inc.php:864
265
- #: s2member/includes/classes/files-in.inc.php:1031
266
  msgctxt "s2member-admin"
267
  msgid "Unable to create Amazon® CloudFront Origin Access Identity. %s"
268
  msgstr ""
269
 
270
- #: s2member/includes/classes/files-in.inc.php:867
271
- #: s2member/includes/classes/files-in.inc.php:1034
272
  msgctxt "s2member-admin"
273
  msgid "Unable to create Amazon® CloudFront Origin Access Identity. Connection failed."
274
  msgstr ""
275
 
276
- #: s2member/includes/classes/files-in.inc.php:870
277
  msgctxt "s2member-admin"
278
  msgid "Unable to clear existing Amazon® CloudFront Origin Access Identity."
279
  msgstr ""
@@ -282,19 +282,19 @@ msgstr ""
282
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
283
  #. exclude `%s` if you like.
284
 
285
- #: s2member/includes/classes/files-in.inc.php:874
286
- #: s2member/includes/classes/files-in.inc.php:943
287
  msgctxt "s2member-admin"
288
  msgid "Unable to acquire existing Amazon® CloudFront Origin Access Identity. %s"
289
  msgstr ""
290
 
291
- #: s2member/includes/classes/files-in.inc.php:877
292
- #: s2member/includes/classes/files-in.inc.php:946
293
  msgctxt "s2member-admin"
294
  msgid "Unable to acquire existing Amazon® CloudFront Origin Access Identity. Connection failed."
295
  msgstr ""
296
 
297
- #: s2member/includes/classes/files-in.inc.php:880
298
  msgctxt "s2member-admin"
299
  msgid "Unable to clear existing Amazon® CloudFront Streaming Distro."
300
  msgstr ""
@@ -303,17 +303,17 @@ msgstr ""
303
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
304
  #. exclude `%s` if you like.
305
 
306
- #: s2member/includes/classes/files-in.inc.php:884
307
  msgctxt "s2member-admin"
308
  msgid "Unable to acquire existing Amazon® CloudFront Streaming Distro. %s"
309
  msgstr ""
310
 
311
- #: s2member/includes/classes/files-in.inc.php:887
312
  msgctxt "s2member-admin"
313
  msgid "Unable to acquire existing Amazon® CloudFront Streaming Distro. Connection failed."
314
  msgstr ""
315
 
316
- #: s2member/includes/classes/files-in.inc.php:890
317
  msgctxt "s2member-admin"
318
  msgid "Unable to clear existing Amazon® CloudFront Downloads Distro."
319
  msgstr ""
@@ -322,22 +322,22 @@ msgstr ""
322
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
323
  #. exclude `%s` if you like.
324
 
325
- #: s2member/includes/classes/files-in.inc.php:894
326
  msgctxt "s2member-admin"
327
  msgid "Unable to acquire existing Amazon® CloudFront Downloads Distro. %s"
328
  msgstr ""
329
 
330
- #: s2member/includes/classes/files-in.inc.php:897
331
  msgctxt "s2member-admin"
332
  msgid "Unable to acquire existing Amazon® CloudFront Downloads Distro. Connection failed."
333
  msgstr ""
334
 
335
- #: s2member/includes/classes/files-in.inc.php:900
336
  msgctxt "s2member-admin"
337
  msgid "Unable to auto-configure Amazon® CloudFront Distros. Incomplete Amazon® CloudFront configuration options. Missing of one: Amazon® CloudFront Private Key-Pair-ID, or Private Key file contents."
338
  msgstr ""
339
 
340
- #: s2member/includes/classes/files-in.inc.php:903
341
  msgctxt "s2member-admin"
342
  msgid "Unable to auto-configure Amazon® S3/CloudFront Distros. Incomplete Amazon® S3 configuration options. Missing one of: Amazon® S3 Bucket, Access Key, or Secret Key. You must provide s2Member with an Amazon® S3 configuration before enabling CloudFront."
343
  msgstr ""
@@ -346,34 +346,34 @@ msgstr ""
346
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
347
  #. exclude `%s` if you like.
348
 
349
- #: s2member/includes/classes/files-in.inc.php:939
350
  msgctxt "s2member-admin"
351
  msgid "Existing Amazon® CloudFront Origin Access Identity NOT found. %s"
352
  msgstr ""
353
 
354
- #: s2member/includes/classes/files-in.inc.php:949
355
  msgctxt "s2member-admin"
356
  msgid "Unable to acquire existing Amazon® CloudFront Origin Access Identity. Invalid Access ID."
357
  msgstr ""
358
 
359
- #: s2member/includes/classes/files-in.inc.php:989
360
  msgctxt "s2member-admin"
361
  msgid "Unable to delete existing Amazon® CloudFront Origin Access Identity. Connection failed."
362
  msgstr ""
363
 
364
- #: s2member/includes/classes/files-in.inc.php:992
365
  msgctxt "s2member-admin"
366
  msgid "Unable to delete existing Amazon® CloudFront Origin Access Identity. Invalid Access ID, ETag, or XML config."
367
  msgstr ""
368
 
369
- #: s2member/includes/classes/files-in.inc.php:1018
370
- #: s2member/includes/classes/files-in.inc.php:1241
371
- #: s2member/includes/classes/files-in.inc.php:1262
372
  msgctxt "s2member-admin"
373
  msgid "Created by s2Member, for S3 Bucket: %s."
374
  msgstr ""
375
 
376
- #: s2member/includes/classes/files-in.inc.php:1027
377
  msgctxt "s2member-admin"
378
  msgid "Unable to create/read Amazon® CloudFront Origin Access Identity. Unexpected response."
379
  msgstr ""
@@ -382,7 +382,7 @@ msgstr ""
382
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
383
  #. exclude `%s` if you like.
384
 
385
- #: s2member/includes/classes/files-in.inc.php:1071
386
  msgctxt "s2member-admin"
387
  msgid "Existing Amazon® CloudFront Distro NOT found. %s"
388
  msgstr ""
@@ -391,17 +391,17 @@ msgstr ""
391
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
392
  #. exclude `%s` if you like.
393
 
394
- #: s2member/includes/classes/files-in.inc.php:1075
395
  msgctxt "s2member-admin"
396
  msgid "Unable to acquire existing Amazon® CloudFront Distro. %s"
397
  msgstr ""
398
 
399
- #: s2member/includes/classes/files-in.inc.php:1078
400
  msgctxt "s2member-admin"
401
  msgid "Unable to acquire existing Amazon® CloudFront Distro. Connection failed."
402
  msgstr ""
403
 
404
- #: s2member/includes/classes/files-in.inc.php:1081
405
  msgctxt "s2member-admin"
406
  msgid "Unable to acquire existing Amazon® CloudFront Distro. Invalid Distro ID and/or Distro type."
407
  msgstr ""
@@ -410,24 +410,24 @@ msgstr ""
410
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
411
  #. exclude `%s` if you like.
412
 
413
- #: s2member/includes/classes/files-in.inc.php:1125
414
- #: s2member/includes/classes/files-in.inc.php:1200
415
  msgctxt "s2member-admin"
416
  msgid "Unable to disable existing Amazon® CloudFront Distro. %s"
417
  msgstr ""
418
 
419
- #: s2member/includes/classes/files-in.inc.php:1128
420
- #: s2member/includes/classes/files-in.inc.php:1203
421
  msgctxt "s2member-admin"
422
  msgid "Unable to disable existing Amazon® CloudFront Distro. Connection failed."
423
  msgstr ""
424
 
425
- #: s2member/includes/classes/files-in.inc.php:1131
426
  msgctxt "s2member-admin"
427
  msgid "Existing Amazon® CloudFront Distro cannot be disabled at this time. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
428
  msgstr ""
429
 
430
- #: s2member/includes/classes/files-in.inc.php:1137
431
  msgctxt "s2member-admin"
432
  msgid "Unable to disable existing Amazon® CloudFront Distro. Invalid Distro ID, ETag, or XML config."
433
  msgstr ""
@@ -436,12 +436,12 @@ msgstr ""
436
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
437
  #. exclude `%s` if you like.
438
 
439
- #: s2member/includes/classes/files-in.inc.php:1182
440
  msgctxt "s2member-admin"
441
  msgid "Unable to delete existing Amazon® CloudFront Distro. %s"
442
  msgstr ""
443
 
444
- #: s2member/includes/classes/files-in.inc.php:1185
445
  msgctxt "s2member-admin"
446
  msgid "Unable to delete existing Amazon® CloudFront Distro. Connection failed."
447
  msgstr ""
@@ -450,7 +450,7 @@ msgstr ""
450
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
451
  #. exclude `%s` if you like.
452
 
453
- #: s2member/includes/classes/files-in.inc.php:1189
454
  msgctxt "s2member-admin"
455
  msgid "Existing Amazon® CloudFront Distro cannot be deleted at this time. Still in a `pending` state after having been disabled by s2Member. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
456
  msgstr ""
@@ -459,43 +459,42 @@ msgstr ""
459
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
460
  #. exclude `%s` if you like.
461
 
462
- #: s2member/includes/classes/files-in.inc.php:1193
463
  msgctxt "s2member-admin"
464
  msgid "Unable to check status of existing Amazon® CloudFront Distro. %s"
465
  msgstr ""
466
 
467
- #: s2member/includes/classes/files-in.inc.php:1196
468
  msgctxt "s2member-admin"
469
  msgid "Unable to check status of existing Amazon® CloudFront Distro. Connection failed."
470
  msgstr ""
471
 
472
- #: s2member/includes/classes/files-in.inc.php:1206
473
  msgctxt "s2member-admin"
474
  msgid "Existing Amazon® CloudFront Distro cannot be deleted at this time. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
475
  msgstr ""
476
 
477
- #: s2member/includes/classes/files-in.inc.php:1209
478
  msgctxt "s2member-admin"
479
  msgid "Unable to delete existing Amazon® CloudFront Distro. Invalid Distro ID or ETag."
480
  msgstr ""
481
 
482
- #: s2member/includes/classes/files-in.inc.php:1249
483
  msgctxt "s2member-admin"
484
  msgid "Unable to create/read Amazon® CloudFront Downloads Distro. Unexpected response."
485
  msgstr ""
486
 
487
- #: s2member/includes/classes/files-in.inc.php:1270
488
  msgctxt "s2member-admin"
489
  msgid "Unable to create/read Amazon® CloudFront Streaming Distro. Unexpected response."
490
  msgstr ""
491
 
492
- #: s2member/includes/classes/files-in.inc.php:1280
493
  msgctxt "s2member-admin"
494
  msgid "Unable to create Amazon® CloudFront Distro. Invalid Distro type."
495
  msgstr ""
496
 
497
- #: s2member/includes/classes/ip-restrictions.inc.php:76
498
- #: s2member/includes/classes/ip-restrictions.inc.php:90
499
  msgctxt "s2member-front"
500
  msgid "<strong>503: Service Temporarily Unavailable</strong><br />Too many IP addresses accessing one secure area<em>!</em><br />Please contact Support if you need assistance."
501
  msgstr ""
@@ -747,11 +746,8 @@ msgctxt "s2member-front"
747
  msgid "Profile updated successfully."
748
  msgstr ""
749
 
750
- #: s2member/includes/classes/register-in.inc.php:83
751
- #: s2member/includes/classes/register-in.inc.php:86
752
- #: s2member/includes/classes/register-in.inc.php:89
753
- #: s2member/includes/classes/register-in.inc.php:92
754
- #: s2member/includes/classes/sp-access.inc.php:131
755
  msgctxt "s2member-front"
756
  msgid "<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance."
757
  msgstr ""
@@ -1414,22 +1410,22 @@ msgctxt "s2member-front"
1414
  msgid "Processing"
1415
  msgstr ""
1416
 
1417
- #: s2member/includes/syscon.inc.php:77
1418
  msgctxt "s2member-front recaptcha-lang-code"
1419
  msgid "en"
1420
  msgstr ""
1421
 
1422
- #: s2member/includes/syscon.inc.php:140
1423
  msgctxt "s2member-front"
1424
  msgid "Yes, I want to receive updates via email."
1425
  msgstr ""
1426
 
1427
- #: s2member/includes/syscon.inc.php:188
1428
  msgctxt "s2member-front"
1429
  msgid "[%s] Username/Password"
1430
  msgstr ""
1431
 
1432
- #: s2member/includes/syscon.inc.php:189
1433
  msgctxt "s2member-front"
1434
  msgid ""
1435
  "Your Username/Password for:\n"
@@ -1440,12 +1436,12 @@ msgid ""
1440
  "%%%%wp_login_url%%%%"
1441
  msgstr ""
1442
 
1443
- #: s2member/includes/syscon.inc.php:192
1444
  msgctxt "s2member-front"
1445
  msgid "[%s] New User Registration"
1446
  msgstr ""
1447
 
1448
- #: s2member/includes/syscon.inc.php:193
1449
  msgctxt "s2member-front"
1450
  msgid ""
1451
  "New User Registration on your site:\n"
@@ -1457,12 +1453,12 @@ msgid ""
1457
  "IP Address: %%%%user_ip%%%%"
1458
  msgstr ""
1459
 
1460
- #: s2member/includes/syscon.inc.php:209 s2member-pro/includes/syscon.inc.php:90
1461
  msgctxt "s2member-front"
1462
  msgid "Congratulations! ( your membership has been approved )"
1463
  msgstr ""
1464
 
1465
- #: s2member/includes/syscon.inc.php:210
1466
  msgctxt "s2member-front"
1467
  msgid ""
1468
  "Thanks %%%%first_name%%%%! Your membership has been approved.\n"
@@ -1478,12 +1474,12 @@ msgid ""
1478
  "%s"
1479
  msgstr ""
1480
 
1481
- #: s2member/includes/syscon.inc.php:213 s2member-pro/includes/syscon.inc.php:94
1482
  msgctxt "s2member-front"
1483
  msgid "Thank You! ( instructions for access )"
1484
  msgstr ""
1485
 
1486
- #: s2member/includes/syscon.inc.php:214
1487
  msgctxt "s2member-front"
1488
  msgid ""
1489
  "Thanks %%%%first_name%%%%!\n"
@@ -1500,32 +1496,32 @@ msgid ""
1500
  "%s"
1501
  msgstr ""
1502
 
1503
- #: s2member/includes/syscon.inc.php:244
1504
  msgctxt "s2member-front"
1505
  msgid "Free Subscriber"
1506
  msgstr ""
1507
 
1508
- #: s2member/includes/syscon.inc.php:244
1509
  msgctxt "s2member-front"
1510
  msgid "Bronze Member"
1511
  msgstr ""
1512
 
1513
- #: s2member/includes/syscon.inc.php:244
1514
  msgctxt "s2member-front"
1515
  msgid "Silver Member"
1516
  msgstr ""
1517
 
1518
- #: s2member/includes/syscon.inc.php:244
1519
  msgctxt "s2member-front"
1520
  msgid "Gold Member"
1521
  msgstr ""
1522
 
1523
- #: s2member/includes/syscon.inc.php:244
1524
  msgctxt "s2member-front"
1525
  msgid "Platinum Member"
1526
  msgstr ""
1527
 
1528
- #: s2member/includes/syscon.inc.php:245
1529
  msgctxt "s2member-front"
1530
  msgid "Level %s Member"
1531
  msgstr ""
@@ -3270,100 +3266,100 @@ msgctxt "s2member-front"
3270
  msgid "Error #%1$s. %2$s."
3271
  msgstr ""
3272
 
3273
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:702
3274
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:843
3275
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:272
3276
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:413
3277
  msgctxt "s2member-front percentage-symbol"
3278
  msgid "%"
3279
  msgstr ""
3280
 
3281
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:842
3282
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:412
3283
  msgctxt "s2member-front"
3284
  msgid " + tax"
3285
  msgstr ""
3286
 
3287
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:869
3288
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:913
3289
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:924
3290
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:944
3291
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:996
3292
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1009
3293
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:439
3294
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:483
3295
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:494
3296
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:514
3297
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:566
3298
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:579
3299
  msgctxt "s2member-front"
3300
  msgid "COUPON %s off. ( Now: %s )"
3301
  msgstr ""
3302
 
3303
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:870
3304
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:914
3305
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:925
3306
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:945
3307
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:997
3308
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1010
3309
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:440
3310
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:484
3311
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:495
3312
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:515
3313
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:567
3314
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:580
3315
  msgctxt "s2member-front"
3316
  msgid "<div>Coupon: <strong>%s off</strong>. ( Now: <strong>%s</strong> )</div>"
3317
  msgstr ""
3318
 
3319
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:880
3320
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:891
3321
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:902
3322
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:957
3323
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:970
3324
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:983
3325
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:450
3326
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:461
3327
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:472
3328
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:527
3329
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:540
3330
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:553
3331
  msgctxt "s2member-front"
3332
  msgid "COUPON %s off. ( Now: %s, then %s )"
3333
  msgstr ""
3334
 
3335
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:881
3336
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:892
3337
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:903
3338
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:958
3339
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:971
3340
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:984
3341
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:451
3342
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:462
3343
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:473
3344
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:528
3345
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:541
3346
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:554
3347
  msgctxt "s2member-front"
3348
  msgid "<div>Coupon: <strong>%s off</strong>. ( Now: <strong>%s, then %s</strong> )</div>"
3349
  msgstr ""
3350
 
3351
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:929
3352
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1014
3353
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:499
3354
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:584
3355
  msgctxt "s2member-front"
3356
  msgid "<div>Sorry, your Coupon is not applicable.</div>"
3357
  msgstr ""
3358
 
3359
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1018
3360
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:588
3361
  msgctxt "s2member-front"
3362
  msgid "<div>Coupon: <strong>%s0.00 off</strong>.</div>"
3363
  msgstr ""
3364
 
3365
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1022
3366
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:592
3367
  msgctxt "s2member-front"
3368
  msgid "<div>Sorry, your Coupon <strong>expired</strong>: <em>%s</em>.</div>"
3369
  msgstr ""
@@ -3371,16 +3367,16 @@ msgstr ""
3371
  #. translators: `%1$s` is the new price/description, after coupon is applied.
3372
  #. `%2$s` was the original description.
3373
 
3374
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1030
3375
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:600
3376
  msgctxt "s2member-front"
3377
  msgid "%1$s ~ ORIGINALLY: %2$s"
3378
  msgstr ""
3379
 
3380
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1033
3381
- #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1037
3382
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:603
3383
- #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:607
3384
  msgctxt "s2member-front"
3385
  msgid "<div>Sorry, your Coupon is N/A, invalid or expired.</div>"
3386
  msgstr ""
@@ -3781,7 +3777,7 @@ msgctxt "s2member-front"
3781
  msgid "Submit Form"
3782
  msgstr ""
3783
 
3784
- #: s2member-pro/includes/syscon.inc.php:91
3785
  msgctxt "s2member-front"
3786
  msgid ""
3787
  "Thanks %%%%first_name%%%%! Your membership has been approved.\n"
@@ -3798,7 +3794,7 @@ msgid ""
3798
  "%s"
3799
  msgstr ""
3800
 
3801
- #: s2member-pro/includes/syscon.inc.php:95
3802
  msgctxt "s2member-front"
3803
  msgid ""
3804
  "Thanks %%%%first_name%%%%!\n"
@@ -4400,7 +4396,4 @@ msgstr ""
4400
  #: s2member-pro/includes/templates/shortcodes/paypal-update-form-shortcode.php:6
4401
  msgctxt "s2member-front"
4402
  msgid "Update your billing information."
4403
- msgstr ""
4404
- #. Author URI of the plugin/theme
4405
- msgid "http://www.primothemes.com/"
4406
- msgstr ""
2
  # This file is distributed under the same license as the s2Member package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: s2Member 111011\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/.__s2member\n"
7
+ "POT-Creation-Date: 2011-10-11 18:55: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"
71
  msgid "password strength indicator"
72
  msgstr ""
73
 
74
+ #: s2member/includes/classes/email-configs.inc.php:149
75
  msgctxt "s2member-front"
76
  msgid "as a Member"
77
  msgstr ""
78
 
79
+ #: s2member/includes/classes/files-in.inc.php:91
80
+ #: s2member/includes/classes/files-in.inc.php:230
81
  msgctxt "s2member-front"
82
+ msgid "<strong>404: Sorry, file not found.</strong> Please contact Support for assistance."
83
  msgstr ""
84
 
85
+ #: s2member/includes/classes/files-in.inc.php:101
86
  msgctxt "s2member-front"
87
+ msgid "<strong>503 ( Invalid Key ):</strong> Sorry, your access to this file has expired. Please contact Support for assistance."
88
  msgstr ""
89
 
90
  #: s2member/includes/classes/files-in.inc.php:121
91
  msgctxt "s2member-front"
92
+ msgid "<strong>503: Basic File Downloads are NOT enabled yet.</strong> Please contact Support for assistance. If you are the site owner, please configure: <code>s2Member -> Download Options -> Basic Download Restrictions</code>."
93
  msgstr ""
94
 
95
+ #: s2member/includes/classes/files-in.inc.php:364
96
  msgctxt "s2member-front"
97
+ msgid "<strong>503: Access denied.</strong> Invalid File Download specs."
98
  msgstr ""
99
 
100
+ #: s2member/includes/classes/files-in.inc.php:450
101
  msgctxt "s2member-front"
102
  msgid "Members Only"
103
  msgstr ""
104
 
105
+ #: s2member/includes/classes/files-in.inc.php:456
106
  msgctxt "s2member-front"
107
+ msgid "<strong>401:</strong> Sorry, access denied."
108
  msgstr ""
109
 
110
  #. translators: In this translation, `%s` may be filled with an English
111
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
112
  #. `%s` if you like.
113
 
114
+ #: s2member/includes/classes/files-in.inc.php:594
115
  msgctxt "s2member-admin"
116
  msgid "Unable to update existing Amazon® S3 Cross-Domain Policy. %s"
117
  msgstr ""
118
 
119
+ #: s2member/includes/classes/files-in.inc.php:597
120
  msgctxt "s2member-admin"
121
  msgid "Unable to update existing Amazon® S3 Cross-Domain Policy. Connection failed."
122
  msgstr ""
125
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
126
  #. `%s` if you like.
127
 
128
+ #: s2member/includes/classes/files-in.inc.php:601
129
  msgctxt "s2member-admin"
130
  msgid "Unable to update existing Amazon® S3 Bucket Policy. %s"
131
  msgstr ""
132
 
133
+ #: s2member/includes/classes/files-in.inc.php:604
134
  msgctxt "s2member-admin"
135
  msgid "Unable to update existing Amazon® S3 Bucket Policy. Connection failed."
136
  msgstr ""
139
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
140
  #. `%s` if you like.
141
 
142
+ #: s2member/includes/classes/files-in.inc.php:608
143
  msgctxt "s2member-admin"
144
  msgid "Unable to update existing Amazon® S3 Bucket ACLs. %s"
145
  msgstr ""
146
 
147
+ #: s2member/includes/classes/files-in.inc.php:611
148
  msgctxt "s2member-admin"
149
  msgid "Unable to update existing Amazon® S3 Bucket ACLs. Connection failed."
150
  msgstr ""
151
 
152
+ #: s2member/includes/classes/files-in.inc.php:614
153
  msgctxt "s2member-admin"
154
  msgid "Unable to acquire/read existing Amazon® S3 Bucket ACLs. Unexpected response."
155
  msgstr ""
158
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
159
  #. `%s` if you like.
160
 
161
+ #: s2member/includes/classes/files-in.inc.php:618
162
  msgctxt "s2member-admin"
163
  msgid "Unable to acquire existing Amazon® S3 Bucket ACLs. %s"
164
  msgstr ""
165
 
166
+ #: s2member/includes/classes/files-in.inc.php:621
167
  msgctxt "s2member-admin"
168
  msgid "Unable to acquire existing Amazon® S3 Bucket ACLs. Connection failed."
169
  msgstr ""
170
 
171
+ #: s2member/includes/classes/files-in.inc.php:624
172
  msgctxt "s2member-admin"
173
  msgid "Unable to auto-configure existing Amazon® S3 Bucket ACLs. Incomplete Amazon® S3 configuration options. Missing one of: Amazon® S3 Bucket, Access Key, or Secret Key."
174
  msgstr ""
175
 
176
+ #: s2member/includes/classes/files-in.inc.php:763
177
  msgctxt "s2member-admin"
178
  msgid "Unable to delete existing Amazon® CloudFront Downloads Distro. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
179
  msgstr ""
182
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
183
  #. exclude `%s` if you like.
184
 
185
+ #: s2member/includes/classes/files-in.inc.php:770
186
  msgctxt "s2member-admin"
187
  msgid "Unable to delete existing Amazon® CloudFront Downloads Distro. %s"
188
  msgstr ""
189
 
190
+ #: s2member/includes/classes/files-in.inc.php:782
191
  msgctxt "s2member-admin"
192
  msgid "Unable to delete existing Amazon® CloudFront Streaming Distro. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
193
  msgstr ""
196
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
197
  #. exclude `%s` if you like.
198
 
199
+ #: s2member/includes/classes/files-in.inc.php:789
200
  msgctxt "s2member-admin"
201
  msgid "Unable to delete existing Amazon® CloudFront Streaming Distro. %s"
202
  msgstr ""
205
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
206
  #. exclude `%s` if you like.
207
 
208
+ #: s2member/includes/classes/files-in.inc.php:805
209
+ #: s2member/includes/classes/files-in.inc.php:987
210
  msgctxt "s2member-admin"
211
  msgid "Unable to delete existing Amazon® CloudFront Origin Access Identity. %s"
212
  msgstr ""
215
  #. message, which comes from the Amazon® S3 API call. Feel free to exclude
216
  #. `%s` if you like.
217
 
218
+ #: s2member/includes/classes/files-in.inc.php:844
219
  msgctxt "s2member-admin"
220
  msgid "Unable to update existing Amazon® S3 ACLs. %s"
221
  msgstr ""
222
 
223
+ #: s2member/includes/classes/files-in.inc.php:847
224
  msgctxt "s2member-admin"
225
  msgid "Unable to update existing Amazon® S3 ACLs. Connection failed."
226
  msgstr ""
229
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
230
  #. exclude `%s` if you like.
231
 
232
+ #: s2member/includes/classes/files-in.inc.php:851
233
+ #: s2member/includes/classes/files-in.inc.php:1275
234
  msgctxt "s2member-admin"
235
  msgid "Unable to create Amazon® CloudFront Streaming Distro. %s"
236
  msgstr ""
237
 
238
+ #: s2member/includes/classes/files-in.inc.php:854
239
+ #: s2member/includes/classes/files-in.inc.php:1277
240
  msgctxt "s2member-admin"
241
  msgid "Unable to create Amazon® CloudFront Streaming Distro. Connection failed."
242
  msgstr ""
245
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
246
  #. exclude `%s` if you like.
247
 
248
+ #: s2member/includes/classes/files-in.inc.php:858
249
+ #: s2member/includes/classes/files-in.inc.php:1254
250
  msgctxt "s2member-admin"
251
  msgid "Unable to create Amazon® CloudFront Downloads Distro. %s"
252
  msgstr ""
253
 
254
+ #: s2member/includes/classes/files-in.inc.php:861
255
+ #: s2member/includes/classes/files-in.inc.php:1256
256
  msgctxt "s2member-admin"
257
  msgid "Unable to create Amazon® CloudFront Downloads Distro. Connection failed."
258
  msgstr ""
261
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
262
  #. exclude `%s` if you like.
263
 
264
+ #: s2member/includes/classes/files-in.inc.php:865
265
+ #: s2member/includes/classes/files-in.inc.php:1032
266
  msgctxt "s2member-admin"
267
  msgid "Unable to create Amazon® CloudFront Origin Access Identity. %s"
268
  msgstr ""
269
 
270
+ #: s2member/includes/classes/files-in.inc.php:868
271
+ #: s2member/includes/classes/files-in.inc.php:1035
272
  msgctxt "s2member-admin"
273
  msgid "Unable to create Amazon® CloudFront Origin Access Identity. Connection failed."
274
  msgstr ""
275
 
276
+ #: s2member/includes/classes/files-in.inc.php:871
277
  msgctxt "s2member-admin"
278
  msgid "Unable to clear existing Amazon® CloudFront Origin Access Identity."
279
  msgstr ""
282
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
283
  #. exclude `%s` if you like.
284
 
285
+ #: s2member/includes/classes/files-in.inc.php:875
286
+ #: s2member/includes/classes/files-in.inc.php:944
287
  msgctxt "s2member-admin"
288
  msgid "Unable to acquire existing Amazon® CloudFront Origin Access Identity. %s"
289
  msgstr ""
290
 
291
+ #: s2member/includes/classes/files-in.inc.php:878
292
+ #: s2member/includes/classes/files-in.inc.php:947
293
  msgctxt "s2member-admin"
294
  msgid "Unable to acquire existing Amazon® CloudFront Origin Access Identity. Connection failed."
295
  msgstr ""
296
 
297
+ #: s2member/includes/classes/files-in.inc.php:881
298
  msgctxt "s2member-admin"
299
  msgid "Unable to clear existing Amazon® CloudFront Streaming Distro."
300
  msgstr ""
303
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
304
  #. exclude `%s` if you like.
305
 
306
+ #: s2member/includes/classes/files-in.inc.php:885
307
  msgctxt "s2member-admin"
308
  msgid "Unable to acquire existing Amazon® CloudFront Streaming Distro. %s"
309
  msgstr ""
310
 
311
+ #: s2member/includes/classes/files-in.inc.php:888
312
  msgctxt "s2member-admin"
313
  msgid "Unable to acquire existing Amazon® CloudFront Streaming Distro. Connection failed."
314
  msgstr ""
315
 
316
+ #: s2member/includes/classes/files-in.inc.php:891
317
  msgctxt "s2member-admin"
318
  msgid "Unable to clear existing Amazon® CloudFront Downloads Distro."
319
  msgstr ""
322
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
323
  #. exclude `%s` if you like.
324
 
325
+ #: s2member/includes/classes/files-in.inc.php:895
326
  msgctxt "s2member-admin"
327
  msgid "Unable to acquire existing Amazon® CloudFront Downloads Distro. %s"
328
  msgstr ""
329
 
330
+ #: s2member/includes/classes/files-in.inc.php:898
331
  msgctxt "s2member-admin"
332
  msgid "Unable to acquire existing Amazon® CloudFront Downloads Distro. Connection failed."
333
  msgstr ""
334
 
335
+ #: s2member/includes/classes/files-in.inc.php:901
336
  msgctxt "s2member-admin"
337
  msgid "Unable to auto-configure Amazon® CloudFront Distros. Incomplete Amazon® CloudFront configuration options. Missing of one: Amazon® CloudFront Private Key-Pair-ID, or Private Key file contents."
338
  msgstr ""
339
 
340
+ #: s2member/includes/classes/files-in.inc.php:904
341
  msgctxt "s2member-admin"
342
  msgid "Unable to auto-configure Amazon® S3/CloudFront Distros. Incomplete Amazon® S3 configuration options. Missing one of: Amazon® S3 Bucket, Access Key, or Secret Key. You must provide s2Member with an Amazon® S3 configuration before enabling CloudFront."
343
  msgstr ""
346
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
347
  #. exclude `%s` if you like.
348
 
349
+ #: s2member/includes/classes/files-in.inc.php:940
350
  msgctxt "s2member-admin"
351
  msgid "Existing Amazon® CloudFront Origin Access Identity NOT found. %s"
352
  msgstr ""
353
 
354
+ #: s2member/includes/classes/files-in.inc.php:950
355
  msgctxt "s2member-admin"
356
  msgid "Unable to acquire existing Amazon® CloudFront Origin Access Identity. Invalid Access ID."
357
  msgstr ""
358
 
359
+ #: s2member/includes/classes/files-in.inc.php:990
360
  msgctxt "s2member-admin"
361
  msgid "Unable to delete existing Amazon® CloudFront Origin Access Identity. Connection failed."
362
  msgstr ""
363
 
364
+ #: s2member/includes/classes/files-in.inc.php:993
365
  msgctxt "s2member-admin"
366
  msgid "Unable to delete existing Amazon® CloudFront Origin Access Identity. Invalid Access ID, ETag, or XML config."
367
  msgstr ""
368
 
369
+ #: s2member/includes/classes/files-in.inc.php:1019
370
+ #: s2member/includes/classes/files-in.inc.php:1242
371
+ #: s2member/includes/classes/files-in.inc.php:1263
372
  msgctxt "s2member-admin"
373
  msgid "Created by s2Member, for S3 Bucket: %s."
374
  msgstr ""
375
 
376
+ #: s2member/includes/classes/files-in.inc.php:1028
377
  msgctxt "s2member-admin"
378
  msgid "Unable to create/read Amazon® CloudFront Origin Access Identity. Unexpected response."
379
  msgstr ""
382
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
383
  #. exclude `%s` if you like.
384
 
385
+ #: s2member/includes/classes/files-in.inc.php:1072
386
  msgctxt "s2member-admin"
387
  msgid "Existing Amazon® CloudFront Distro NOT found. %s"
388
  msgstr ""
391
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
392
  #. exclude `%s` if you like.
393
 
394
+ #: s2member/includes/classes/files-in.inc.php:1076
395
  msgctxt "s2member-admin"
396
  msgid "Unable to acquire existing Amazon® CloudFront Distro. %s"
397
  msgstr ""
398
 
399
+ #: s2member/includes/classes/files-in.inc.php:1079
400
  msgctxt "s2member-admin"
401
  msgid "Unable to acquire existing Amazon® CloudFront Distro. Connection failed."
402
  msgstr ""
403
 
404
+ #: s2member/includes/classes/files-in.inc.php:1082
405
  msgctxt "s2member-admin"
406
  msgid "Unable to acquire existing Amazon® CloudFront Distro. Invalid Distro ID and/or Distro type."
407
  msgstr ""
410
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
411
  #. exclude `%s` if you like.
412
 
413
+ #: s2member/includes/classes/files-in.inc.php:1126
414
+ #: s2member/includes/classes/files-in.inc.php:1201
415
  msgctxt "s2member-admin"
416
  msgid "Unable to disable existing Amazon® CloudFront Distro. %s"
417
  msgstr ""
418
 
419
+ #: s2member/includes/classes/files-in.inc.php:1129
420
+ #: s2member/includes/classes/files-in.inc.php:1204
421
  msgctxt "s2member-admin"
422
  msgid "Unable to disable existing Amazon® CloudFront Distro. Connection failed."
423
  msgstr ""
424
 
425
+ #: s2member/includes/classes/files-in.inc.php:1132
426
  msgctxt "s2member-admin"
427
  msgid "Existing Amazon® CloudFront Distro cannot be disabled at this time. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
428
  msgstr ""
429
 
430
+ #: s2member/includes/classes/files-in.inc.php:1138
431
  msgctxt "s2member-admin"
432
  msgid "Unable to disable existing Amazon® CloudFront Distro. Invalid Distro ID, ETag, or XML config."
433
  msgstr ""
436
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
437
  #. exclude `%s` if you like.
438
 
439
+ #: s2member/includes/classes/files-in.inc.php:1183
440
  msgctxt "s2member-admin"
441
  msgid "Unable to delete existing Amazon® CloudFront Distro. %s"
442
  msgstr ""
443
 
444
+ #: s2member/includes/classes/files-in.inc.php:1186
445
  msgctxt "s2member-admin"
446
  msgid "Unable to delete existing Amazon® CloudFront Distro. Connection failed."
447
  msgstr ""
450
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
451
  #. exclude `%s` if you like.
452
 
453
+ #: s2member/includes/classes/files-in.inc.php:1190
454
  msgctxt "s2member-admin"
455
  msgid "Existing Amazon® CloudFront Distro cannot be deleted at this time. Still in a `pending` state after having been disabled by s2Member. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
456
  msgstr ""
459
  #. message, which comes from the Amazon® CloudFront API call. Feel free to
460
  #. exclude `%s` if you like.
461
 
462
+ #: s2member/includes/classes/files-in.inc.php:1194
463
  msgctxt "s2member-admin"
464
  msgid "Unable to check status of existing Amazon® CloudFront Distro. %s"
465
  msgstr ""
466
 
467
+ #: s2member/includes/classes/files-in.inc.php:1197
468
  msgctxt "s2member-admin"
469
  msgid "Unable to check status of existing Amazon® CloudFront Distro. Connection failed."
470
  msgstr ""
471
 
472
+ #: s2member/includes/classes/files-in.inc.php:1207
473
  msgctxt "s2member-admin"
474
  msgid "Existing Amazon® CloudFront Distro cannot be deleted at this time. Still in a `pending` state. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member's auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again."
475
  msgstr ""
476
 
477
+ #: s2member/includes/classes/files-in.inc.php:1210
478
  msgctxt "s2member-admin"
479
  msgid "Unable to delete existing Amazon® CloudFront Distro. Invalid Distro ID or ETag."
480
  msgstr ""
481
 
482
+ #: s2member/includes/classes/files-in.inc.php:1250
483
  msgctxt "s2member-admin"
484
  msgid "Unable to create/read Amazon® CloudFront Downloads Distro. Unexpected response."
485
  msgstr ""
486
 
487
+ #: s2member/includes/classes/files-in.inc.php:1271
488
  msgctxt "s2member-admin"
489
  msgid "Unable to create/read Amazon® CloudFront Streaming Distro. Unexpected response."
490
  msgstr ""
491
 
492
+ #: s2member/includes/classes/files-in.inc.php:1281
493
  msgctxt "s2member-admin"
494
  msgid "Unable to create Amazon® CloudFront Distro. Invalid Distro type."
495
  msgstr ""
496
 
497
+ #: s2member/includes/classes/ip-restrictions.inc.php:53
 
498
  msgctxt "s2member-front"
499
  msgid "<strong>503: Service Temporarily Unavailable</strong><br />Too many IP addresses accessing one secure area<em>!</em><br />Please contact Support if you need assistance."
500
  msgstr ""
746
  msgid "Profile updated successfully."
747
  msgstr ""
748
 
749
+ #: s2member/includes/classes/register-in.inc.php:48
750
+ #: s2member/includes/classes/sp-access.inc.php:132
 
 
 
751
  msgctxt "s2member-front"
752
  msgid "<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance."
753
  msgstr ""
1410
  msgid "Processing"
1411
  msgstr ""
1412
 
1413
+ #: s2member/includes/syscon.inc.php:81
1414
  msgctxt "s2member-front recaptcha-lang-code"
1415
  msgid "en"
1416
  msgstr ""
1417
 
1418
+ #: s2member/includes/syscon.inc.php:144
1419
  msgctxt "s2member-front"
1420
  msgid "Yes, I want to receive updates via email."
1421
  msgstr ""
1422
 
1423
+ #: s2member/includes/syscon.inc.php:195
1424
  msgctxt "s2member-front"
1425
  msgid "[%s] Username/Password"
1426
  msgstr ""
1427
 
1428
+ #: s2member/includes/syscon.inc.php:196
1429
  msgctxt "s2member-front"
1430
  msgid ""
1431
  "Your Username/Password for:\n"
1436
  "%%%%wp_login_url%%%%"
1437
  msgstr ""
1438
 
1439
+ #: s2member/includes/syscon.inc.php:199
1440
  msgctxt "s2member-front"
1441
  msgid "[%s] New User Registration"
1442
  msgstr ""
1443
 
1444
+ #: s2member/includes/syscon.inc.php:200
1445
  msgctxt "s2member-front"
1446
  msgid ""
1447
  "New User Registration on your site:\n"
1453
  "IP Address: %%%%user_ip%%%%"
1454
  msgstr ""
1455
 
1456
+ #: s2member/includes/syscon.inc.php:216 s2member-pro/includes/syscon.inc.php:94
1457
  msgctxt "s2member-front"
1458
  msgid "Congratulations! ( your membership has been approved )"
1459
  msgstr ""
1460
 
1461
+ #: s2member/includes/syscon.inc.php:217
1462
  msgctxt "s2member-front"
1463
  msgid ""
1464
  "Thanks %%%%first_name%%%%! Your membership has been approved.\n"
1474
  "%s"
1475
  msgstr ""
1476
 
1477
+ #: s2member/includes/syscon.inc.php:220 s2member-pro/includes/syscon.inc.php:98
1478
  msgctxt "s2member-front"
1479
  msgid "Thank You! ( instructions for access )"
1480
  msgstr ""
1481
 
1482
+ #: s2member/includes/syscon.inc.php:221
1483
  msgctxt "s2member-front"
1484
  msgid ""
1485
  "Thanks %%%%first_name%%%%!\n"
1496
  "%s"
1497
  msgstr ""
1498
 
1499
+ #: s2member/includes/syscon.inc.php:251
1500
  msgctxt "s2member-front"
1501
  msgid "Free Subscriber"
1502
  msgstr ""
1503
 
1504
+ #: s2member/includes/syscon.inc.php:251
1505
  msgctxt "s2member-front"
1506
  msgid "Bronze Member"
1507
  msgstr ""
1508
 
1509
+ #: s2member/includes/syscon.inc.php:251
1510
  msgctxt "s2member-front"
1511
  msgid "Silver Member"
1512
  msgstr ""
1513
 
1514
+ #: s2member/includes/syscon.inc.php:251
1515
  msgctxt "s2member-front"
1516
  msgid "Gold Member"
1517
  msgstr ""
1518
 
1519
+ #: s2member/includes/syscon.inc.php:251
1520
  msgctxt "s2member-front"
1521
  msgid "Platinum Member"
1522
  msgstr ""
1523
 
1524
+ #: s2member/includes/syscon.inc.php:252
1525
  msgctxt "s2member-front"
1526
  msgid "Level %s Member"
1527
  msgstr ""
3266
  msgid "Error #%1$s. %2$s."
3267
  msgstr ""
3268
 
3269
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:700
3270
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:841
3271
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:270
3272
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:411
3273
  msgctxt "s2member-front percentage-symbol"
3274
  msgid "%"
3275
  msgstr ""
3276
 
3277
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:840
3278
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:410
3279
  msgctxt "s2member-front"
3280
  msgid " + tax"
3281
  msgstr ""
3282
 
3283
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:867
3284
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:911
3285
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:922
3286
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:942
3287
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:994
3288
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1007
3289
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:437
3290
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:481
3291
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:492
3292
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:512
3293
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:564
3294
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:577
3295
  msgctxt "s2member-front"
3296
  msgid "COUPON %s off. ( Now: %s )"
3297
  msgstr ""
3298
 
3299
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:868
3300
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:912
3301
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:923
3302
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:943
3303
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:995
3304
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1008
3305
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:438
3306
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:482
3307
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:493
3308
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:513
3309
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:565
3310
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:578
3311
  msgctxt "s2member-front"
3312
  msgid "<div>Coupon: <strong>%s off</strong>. ( Now: <strong>%s</strong> )</div>"
3313
  msgstr ""
3314
 
3315
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:878
3316
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:889
3317
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:900
3318
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:955
3319
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:968
3320
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:981
3321
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:448
3322
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:459
3323
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:470
3324
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:525
3325
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:538
3326
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:551
3327
  msgctxt "s2member-front"
3328
  msgid "COUPON %s off. ( Now: %s, then %s )"
3329
  msgstr ""
3330
 
3331
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:879
3332
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:890
3333
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:901
3334
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:956
3335
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:969
3336
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:982
3337
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:449
3338
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:460
3339
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:471
3340
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:526
3341
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:539
3342
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:552
3343
  msgctxt "s2member-front"
3344
  msgid "<div>Coupon: <strong>%s off</strong>. ( Now: <strong>%s, then %s</strong> )</div>"
3345
  msgstr ""
3346
 
3347
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:927
3348
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1012
3349
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:497
3350
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:582
3351
  msgctxt "s2member-front"
3352
  msgid "<div>Sorry, your Coupon is not applicable.</div>"
3353
  msgstr ""
3354
 
3355
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1016
3356
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:586
3357
  msgctxt "s2member-front"
3358
  msgid "<div>Coupon: <strong>%s0.00 off</strong>.</div>"
3359
  msgstr ""
3360
 
3361
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1020
3362
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:590
3363
  msgctxt "s2member-front"
3364
  msgid "<div>Sorry, your Coupon <strong>expired</strong>: <em>%s</em>.</div>"
3365
  msgstr ""
3367
  #. translators: `%1$s` is the new price/description, after coupon is applied.
3368
  #. `%2$s` was the original description.
3369
 
3370
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1028
3371
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:598
3372
  msgctxt "s2member-front"
3373
  msgid "%1$s ~ ORIGINALLY: %2$s"
3374
  msgstr ""
3375
 
3376
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1031
3377
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1035
3378
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:601
3379
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:605
3380
  msgctxt "s2member-front"
3381
  msgid "<div>Sorry, your Coupon is N/A, invalid or expired.</div>"
3382
  msgstr ""
3777
  msgid "Submit Form"
3778
  msgstr ""
3779
 
3780
+ #: s2member-pro/includes/syscon.inc.php:95
3781
  msgctxt "s2member-front"
3782
  msgid ""
3783
  "Thanks %%%%first_name%%%%! Your membership has been approved.\n"
3794
  "%s"
3795
  msgstr ""
3796
 
3797
+ #: s2member-pro/includes/syscon.inc.php:99
3798
  msgctxt "s2member-front"
3799
  msgid ""
3800
  "Thanks %%%%first_name%%%%!\n"
4396
  #: s2member-pro/includes/templates/shortcodes/paypal-update-form-shortcode.php:6
4397
  msgctxt "s2member-front"
4398
  msgid "Update your billing information."
4399
+ msgstr ""
 
 
 
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === s2Member® ( Membership w/ PayPal® ) ===
2
 
3
- Version: 111003
4
- Stable tag: 111003
5
  Framework: WS-P-110523
6
 
7
  SSL Compatible: yes
@@ -63,7 +63,7 @@ Yes. s2Member, and also s2Member Pro, are BOTH compatible with Multisite Network
63
 
64
  [youtube http://www.youtube.com/watch?v=FyA8Qmm2DHY /]
65
 
66
- s2Member® (Membership w/ PayPal®). Powerful (free) membership capabilities. Protect members only content. The s2Member Framework (free) integrates w/ PayPal® (very easy), and fully supports recurring billing. s2Member supports custom Pages for registration (including Custom Registration Fields), account access, and a lot more. s2Member is now compatible with Multisite Networking too, and even with BuddyPress and bbPress. In addition, with the s2Member Pro Module (an optional paid upgrade), you can add support for unlimited Membership Levels, PayPal® Pro (w/ Pro Forms), Authorize.Net® (w/ Pro Forms), ccBill®, Google® Checkout, ClickBank®, AliPay®, advanced User Import/Export tools, the ability to use Coupon Codes, and more. Videos available at: [s2Member.com / Videos](http://www.s2member.com/videos/).
67
 
68
  s2Member supports Free Subscribers (at Level #0), and four primary Membership Levels [1-4] (unlimited with s2Member Pro). You can label your Membership Levels anything you like. The defaults are Free, Bronze, Silver, Gold, and Platinum. s2Member also supports an unlimited number of Custom Capability Packages. Custom Capabilities are an easy way to extend s2Member in creative ways. Custom Capabilities allow you to create an unlimited number of Membership Packages, all with different Capabilities and prices.
69
 
@@ -178,6 +178,18 @@ Please visit s2Member.com for [video tutorials](http://www.s2member.com/videos/)
178
 
179
  == Changelog ==
180
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  = v111003 =
182
  * (s2Member) **Bug fix**. Fatal `eval()` error inside: `/includes/classes/no-cache.inc.php`. Fixed in this release.
183
 
@@ -195,7 +207,7 @@ Please visit s2Member.com for [video tutorials](http://www.s2member.com/videos/)
195
  = v110926 =
196
  * (s2Member/s2Member Pro) **BuddyPress v1.5**. Updated for compatibility with BuddyPress v1.5.
197
  * (s2Member Pro) **Bug fix**. A bug first introduced in s2Member Pro v110912 was causing problems for Pro Forms integrated on a Child Blog of Multisite Blog Farm. Fixed in this release.
198
- * (s2Member/s2Member Pro) **Bug fix**. Custom Registration Fields configured to require an EXACT number of characters and/or digits was NOT being handled properly by s2Member in all cases. Fixed in this release.
199
  * (s2Member/s2Member Pro) **Bug fix**. A bug first introduced in s2Member v110912 was causing problems with s2Member's default email customization templates. Double percent signs `%%` for Replacement Codes were being reduced by s2Member's internationalization routines, to just single percent signs `%`, thereby nullifying them as valid Replacement Codes. Fixed in this release. If you installed s2Member and/or s2Member Pro v110912 - v110915 on a clean installation of WordPress®, it would be a good idea to have a quick look at your email customizations with s2Member, just to make sure your Replacement Codes have double percent signs around them *( for example, this is valid: `%%registration_url%%`, and this is NOT valid: `%registration_url%` )*.
200
  * (s2Member) **Amazon® S3/CloudFront**. s2Member is now fully integrated with Amazon® CloudFront, in addition to its existing support for Amazon® S3. Please note, one of the greatest things about Amazon® CloudFront, is its ability to `stream/seek` media files in the truest sense of the word over the RTMP protocol. For sites delivering protected `FLV/MP4/OGG/WEBM` and other streaming audio/video file types over the RTMP protocol, Amazon® CloudFront is our recommendation. Once you've successfully configured s2Member to use both Amazon® S3 and Amazon® CloudFront together, please review this section in your Dashboard: `s2Member -> Download Options -> JW Player® & RTMP Protocol Examples`. s2Member will automatically serve your protected files over the RTMP protocol, using an Amazon® CloudFront Streaming Distribution. In fact, s2Member can even configure all of your Amazon® S3/CloudFront Distros, ACLs, and Policies automatically; making it possible for just about anyone to stream media s2Member-protected files in real-time.
201
  * (s2Member) **s2File Shortcode**. s2Member now provides a new Shortcode: `[s2File /]`. For further details, please check your Dashboard, under: `s2Member -> Download Options -> Basic Download Restrictions`.
@@ -227,7 +239,7 @@ Please visit s2Member.com for [video tutorials](http://www.s2member.com/videos/)
227
  * (s2Member/s2Member Pro) **Bug fix**. New Filter added to s2Member's source code, allowing s2Member Pro site owners to enable/disable tab indexing of reCAPTCHA box controllers *( e.g. the three mundane buttons )* that are skipped over 99.9% of the time anyway. If you'd like to enable tab indexing on these buttons, use: `add_filter("c_ws_plugin__s2member_utils_tabindex_recaptcha_icons", "__return_true");` inside a `/wp-content/mu-plugins/s2-hacks.php` file.
228
  * (s2Member Pro) **Bug fix**. Some site owners running s2Member Pro, on server configurations with PHP-based output compression enabled, experienced problems with the `success=""` Shortcode Attribute for s2Member Pro Forms. s2Member Pro has been improved in this regard *( i.e. s2Member Pro now makes better attempts to clear output buffers before returning plain text data with it's handlers )*. In addition, calls to `trim()` have also been implemented as an additional line of defense against errors reported in the previous release; which were related to URLs with leading white space, returned by s2Member's core PayPal® IPN processor.
229
  * (s2Member/s2Member Pro) **Conformity**. s2Member and s2Member Pro now make use of a core WordPress® function for all HTTP status headers ( i.e. `status_header(xxx)` ).
230
- * (s2Member Pro) **Pro Forms / Tabindex ( Bug fix )**. s2Member Pro Forms suffered from a bug related to `tabindex` conflicts whenever MANY Custom Registration Fields were configured together. Corrected in this release.
231
  * (s2Member Pro) **Google® Checkout ( Bug fix )**. s2Member Pro's integration with Google Checkout has been updated in this release to use `display-disposition: PESSIMISTIC` instead of `OPTIMISTIC`. This change prevents possible card declines from slipping through, and thereby granting a Customer access inadvertently. With the former `OPTIMISTIC` behavior, in rare cases when payment authorizaton at Google® Checkout took longer than 20 seconds, s2Member was giving a Customer access to the site, instead of waiting pessimistically for Google® Checkout to complete processing. The updated behavior, now set to `PESSIMISTIC`, prevents this from occurring. For technical details, see [this article](http://code.google.com/apis/checkout/developer/Google_Checkout_Digital_Delivery.html).
232
  * (s2Member Pro) **ClickBank® ( Bug fix )**. s2Member Pro's integration with ClickBank® has been updated in this release. A bug was found by WebSharks, Inc. Support Rep: Cristián Lávaque, related to the verification of POST vars. Whenever UTF-8 characters appeared in any part of a ClickBank® IPN response received by s2Member, s2Member was failing to verify the checksum, and thus, returning the error: `POST vars could not be verified`. This issue has been corrected in the latest release of s2Member Pro. In addition, a known bug with ClickBank® cutting off first/last names whenever special characters were part of either name, has now been side-stepped by s2Member Pro's integration with ClickBank®.
233
  * (s2Member Pro) **PayPal® ( Bug fix )**. s2Member Pro's integration with the PayPal® Pro API has been updated in this release. A bug was found by the s2Member community which affected a rare scenario during heavy testing. When/if a site owner was heavily testing s2Member Pro Forms repeatedly, whereby PayPal® Pro Recurring Profiles were created over and over again; one of these Recurring Profiles could still be in a `Pending` state during a Subscription Modification soon thereafter. This is rare, because Recurring Profiles are usually in a `Pending` state on the PayPal® side of things, for just a few seconds. However, in this test case, it was possible for s2Member to create a second Recurring Profile through the PayPal® Pro API, and the old one would NOT be terminated properly, because it was still in a `Pending` state, and unable to be terminated. This release of s2Member Pro resolves this issue and prevents this from occuring under any scenario. Customers and/or site owners testing s2Member Pro Forms will now see an error message related to pending changes, and the Customer would be asked to wait 15 minutes in this rare scenario.
@@ -243,7 +255,7 @@ Please visit s2Member.com for [video tutorials](http://www.s2member.com/videos/)
243
  * (s2Member) **PayPal® ( Bug fix )**. s2Member was incorrectly handling delayed EOT Times under a specific scenario, as [reported here](http://www.primothemes.com/forums/viewtopic.php?f=4&t=14876&p=34414#p34414). Corrected in this release.
244
  * (s2Member) **JavaScript/CSS Optimization**. s2Member now loads its dynamic JavaScript/CSS libraries through a new optimized file called `/s2member-o.php`, designed to increase the speed at which your installation of WordPress® can load these resources. The new optimized `/s2member-o.php` file loads only the core WordPress® framework and the s2Member JavaScript and/or CSS file, depending on which is being requested. This new file will eliminate a potential bottleneck on some WordPress® installations, which may have MANY other plugins running in concert with s2Member. It also works to further reduce CPU and memory consumption for all site owners. For further details about why this optimization is beneficial, please see [this article](http://www.primothemes.com/forums/viewtopic.php?f=4&t=14359&p=33441#p33441).
245
  * (s2Member Pro) **PayPal® Express Checkout / Pre-Population**. s2Member now pre-populates everything it can through PayPal® Express Checkout integration. If a Customer does NOT already have a PayPal® account when they arrive at Express Checkout, the Account Creation Form at PayPal® will be pre-populated with a minimum of their Name and Email Address. Street address information will ONLY be pre-populated, when/if s2Member collects it for tax purposes. Otherwise, the address information will NOT be pre-populated, because only PayPal® will ask for those details anyway *( i.e. s2Member doesn't ask for address details when Express Checkout is used; not unless you're collecting taxes: `s2Member -> PayPal® Options -> Tax Calculations` ).
246
- * (s2Member) **New API Function**. This version of s2Member includes a new API Function `get_s2member_custom_fields()`, designed to provide more information about Custom Registration Field configuration and values for a specific User. The API function `get_user_field()` remains available as well. For further details, please see [this article](http://www.primothemes.com/forums/viewtopic.php?f=40&t=12455) in the s2Member Codex.
247
  * (s2Member Pro) **Pro Login Widget**. This version of s2Member improves the `%%automatic%%` setting for the Signup URL in Pro Login Widgets. When/if a Customer has already paid for their Membership, the Signup URL presented in the Pro Login Widget will change dynamically, pointing a Customer to the Registration Form, instead of to your Membership Options Page. Of course, this behavior could be overridden by changing the Signup URL to something other than `%%automatic%%`, if you prefer.
248
 
249
  = v110815 =
@@ -298,7 +310,7 @@ Please visit s2Member.com for [video tutorials](http://www.s2member.com/videos/)
298
  * **(s2Member Pro) Unlimited Membership Levels.** With s2Member Pro installed, you may now configure an unlimited number of Membership Levels. You can set the number of Membership Levels by adding this line to your /wp-config.php file: `define("MEMBERSHIP_LEVELS", 4);`. Feel free to change the default value of 4 to whatever you need. The minimum allowed value is 1. The recommended maximum is 100. For further details, please check your Dashboard, under: `s2Member -> General Options -> Membership Levels/Labels`.
299
  * **(s2Member/s2Member Pro) Email Configuration.** Some new options are now available that allow site owners to customize the email that contains the Username/Password for new Users/Members. For further details, please check your Dashboard, under: `s2Member -> General Options -> Email Configuration`.
300
  * **(s2Member/s2Member Pro) Bug fix.** A problem with certain email addresses routed through the `wp_mail()` function, containing special characters in the "Name" portion. The issue was related to the way in which `wp_mail()` handles recipient addresses in the format `"Name" <address>`. s2Member now strips double quotes dynamically ( i.e. internally ), so that `wp_mail()` and the PHPMailer class can deal with this format on their own. This bug fix should also prevent seemingly random `500 Internal Server Error` messages during checkout. One symptom of this bug was to find "Premature end of script headers" inside your Apache error log, followed by an error code of `500` reported in the browser. These issues have been corrected in this release of s2Member.
301
- * **(s2Member) Bug fix.** A bug first introduced in v110604 was preventing s2Member from setting a User's "Display Name" during Registration properly. This bug has been corrected in the latest release. In addition, a new configurable option for this behavior has been added to the s2Member General Options panel. For further details, please check your Dashboard under: `s2Member -> General Options -> Custom Registration Fields -> Display Name`.
302
  * **(s2Member) Bug fix.** A bug first introduced in v110604 was preventing s2Member from handling password strenth meters in the Stand-Alone Profile Editing Panel ( i.e. the popup version ).
303
  * **(s2Member) Documentation.** s2Member's `API Scripting` sections inside your Dashboard have been updated in various places, in support of some new API Functions/Constants introduced in the latest versions of s2Member; and also to reference relevant articles in the [s2Member Codex](http://www.primothemes.com/forums/viewforum.php?f=40).
304
 
@@ -321,7 +333,7 @@ Please visit s2Member.com for [video tutorials](http://www.s2member.com/videos/)
321
  = v110604 ( instead of s2Member v3.6 ) =
322
  * **(s2Member/s2Member Pro). Versioning.** Starting with this release, s2Member and s2Member Pro will be released with dated versions following this format: `yymmdd`. The version for this release is: `110604`.
323
  * **(s2Member/s2Member Pro). s2Member Security Badge.** An s2Member® Security Badge ( optional ), can be used to express your site's concern for security; demonstrating to all Users/Members that your site ( and the s2Member software ), takes security seriously. However, in order to qualify your site, you MUST generate a Security Encryption Key and pass other security standards. For more information, please check your Dashboard under: `s2Member -> General Options -> Security Badge`.
324
- * **(s2Member/s2Member Pro). Custom Fields For BuddyPress.** s2Member can now integrate your Custom Fields into BuddyPress. Please check your Dashboard for all configuration options. You'll find BuddyPress integration available here: `DashBoard -> s2Member -> General Options -> Custom Registration Fields`.
325
  * **(s2Member Pro). PayPal® Pro API Updates (First Payment / Recurring Profile Behavior).** s2Member's integration with the PayPal® Pro API has been updated to API v71.0. There is also a new option available to PayPal® Pro Merchants. s2Member now provides site owners the abililty to control the way the first payment in a Recurring Profile is billed. (1)Consolidate w/ Recurring Profile or (2)— Real-Time / Direct Pay ( mission critical ) —. For further details, please check your Dashboard under: `s2Member -> PayPal Options -> Account Details`. We recommend: `Consolidate w/ Recurring Profile`, because this keeps all charges associated with a particular Customer organized in your PayPal® account. No matter which option you choose, a first Initial Payment ( when applicable ), will always be charged immediately ( improved in this release ). In cases where it is absolutely critical that a Customer NOT gain access until their first payment has been fully captured, choose: `Real-Time / Direct Pay`, which tells s2Member to authorize/capture the first payment in real-time during checkout, instead of consolidating it into the Recurring Profile.
326
  * **(s2Member). bbPress® 2.0+.** s2Member has been integrated with preliminary support for bbPress® 2.0+ ( i.e. the new plugin variation for WordPress® ). Please check your Dashboard, under: `s2Member -> Other Integrations` for further details and a list of current limitations.
327
  * **(s2Member/s2Member Pro). Field Labels.** Some additional `for=""` attributes in all Pro Form templates. This improves the reliability of s2Member's JavaScript validation routines. Existing s2Member Pro Customers with modified Pro Form templates MUST update their `for=""` attributes in order for s2Member's JavaScript API to properly validate Customer data entry in this new release. If you're running custom Pro Form templates, check this directory for the updated default templates, so you can merge any changes you've made yourself: `/s2member-pro/includes/templates/forms/`.
@@ -349,9 +361,9 @@ Please visit s2Member.com for [video tutorials](http://www.s2member.com/videos/)
349
  * **(s2Member/s2Member Pro). Custom Field Default Values.** It's now possible to set default text values for single-line and multi-line input/textarea fields too. This only affects Custom Fields you configure with s2Member.
350
  * **(s2Member/s2Member Pro). Custom Fields By Section.** Custom Fields by section ( i.e. dividers ). It's now possible to configure certain Custom Fields, so that they start a new section. Your sections can be simple dividing lines, or you can give them a title that will appear on your Registration and Profile Editing forms.
351
  * **(s2Member). Bug fix.** s2Member was creating window focus/blur issues on Profile updates through its Stand-Alone version of the Profile Editing Panel ( i.e. when it was popped open in a new window ). This was causing odd behavior Firefox® 4.
352
- * **(s2Member/s2Member Pro). Remove First/Last Name.** It is now possible to turn off First/Last/Display Name, on Registration and Profile Editing forms. For configuration options, please check your Dashboard, under: `s2Member -> Custom Registration Fields`.
353
  * **(s2Member Pro). Data Prefill.** s2Member Pro is now capable of prepopulating some Pro Form fields when/if existing Users buy a Specific Post/Page.
354
- * **(s2Member/s2Member Pro). Bug fix.** Fixed nested Custom Registration Field labels for multi option check boxes/radios. Firefox 4+ had issues with this.
355
  * **(s2Member/s2Member Pro). Registration Link Expiration.** The default is built-in, it's (2) days. We don't recommend changing this unless you know what you're doing. Some developers requested the ability to change this dynamically. s2Member now makes this Filter available: `ws_plugin__s2member_register_link_exp_time`.
356
  * **(s2Member Pro). Automatic Upgrade Routine.** s2Member Pro now places your site into maintenance mode ( temporarily ) during an s2Member Pro Upgrade routine.
357
  * **(s2Member). New API Notification.** New "Modification" Notification now available under: `s2Member -> API Notifications`. Say that three times fast!
@@ -367,122 +379,6 @@ Please visit s2Member.com for [video tutorials](http://www.s2member.com/videos/)
367
  * **(s2Member/s2Member Pro). Documentation.** Built-in documentation updated throughout.
368
  * **(s2Member/s2Member Pro). UI Panels.** Some minor UI improvements.
369
 
370
- = 3.5.8 =
371
- * **(s2Member). Bug fix.** The Shortcode version of s2Member's Profile Editing Panel ( i.e. `[s2Member-Profile /]` ) was not validating input fields properly. This bug was has been resolved in v3.5.8+.
372
- * **(s2Member). Compatibility.** s2Member now requires PHP v5.2.3+ instead of just PHP v5.2+. This is because `call_user_func_array()` in early versions of PHP 5.2 did not support static class methods with a scope resolution operator. If you've had trouble getting s2Member v3.5+ to run on your server, this is likely the cause. Please make sure you're running PHP v5.2.3+.
373
- * **(s2Member). Bug fix.** PayPal® Button Encryption was failing under some circumstances, because the PayPal® API Method `BMCreateButton` requires two decimal places at all times. The bug fix in this release does NOT require any changes to your Shortcode attributes. Rather, the encryption routine will now automatically convert numeric dollar amounts during encryption.
374
- * **(s2Member Pro). Compatibility.** Starting with s2Member Pro v3.5.8+, Pro Cancellation Forms will automatically detect Customers that may have signed up with a Standard PayPal® Button, and provide the Customer with a link & instructions about how to cancel their "Subscription" via PayPal®. This makes it possible for site owners upgrading to s2Member Pro, to provide their Customers with just ONE Cancellation Form, which has the ability to consider both PayPal® Standard "Subscriptions", and also "Recurring Profiles"; which are used by s2Member Pro Forms.
375
-
376
- = 3.5.7 =
377
- * **(s2Member/s2Member Pro). Bug fix.** A bug was found in the `c_ws_plugin__s2member_systematics_sp` class file. This bug was affecting s2Member's Security Gate for WordPress® `Pages` under certain unique circumstances. One symptom of this bug ( seen with s2Member Pro installed ), was to experience a strange disappearance of (s2) Lock Icons in your list of Pages, whenever the first Page in your list was the Login Welcome Page that you configured for s2Member.
378
- * **(s2Member Pro). Bug fix.** On a Multisite Network, s2Member Pro Forms were generating an erroneous error `Please enter a username` during a Billing Modification under certain circumstances. This has been resolved in s2Member Pro v1.5.7+.
379
- * **(s2Member Pro). Bug fix.** s2Member Pro Export Files ( i.e. CSV export of Users/Members ) sometimes contained Custom Registration Fields ( e.g. at the end of each CSV line ) in a different order for each User/Member. This was NOT causing any negative effects with s2Member Pro during import/export. However, it was causing some confusion and extra work for site owners that use s2Member's export files for other operations. This has been corrected in the release of s2Member Pro v1.5.7. For more information, please see [this thread](http://www.primothemes.com/forums/viewtopic.php?f=4&t=2783&p=8267#p8232).
380
-
381
- = 3.5.6 =
382
- * **(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+.
383
- * **(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).
384
- * **(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+.
385
-
386
- = 3.5.5 =
387
- * **(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 )`.
388
- * **(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 ).
389
- * **(s2Member Pro). Compatibility / Bug fix.** This is related to some bug reports regarding `500 Internal Server Errors`. s2Member is now compatible ( i.e. capable of running in concert with ) other plugins that attempt actions dealing with `$current_user` on the `plugins_loaded` Hook for WordPress®. In an ideal world, other plugins should NOT be doing this, because the WordPress® core framework does not initialize `$current_user` until just before the `init` Hook is fired, which comes after the `plugins_loaded` Hook. However, in an effort to maximize s2Member's compatibility, s2Member has been modified to work around this potential bug, by delaying the initialization of its Filter against `user_has_cap` just a bit. If you were experiencing `500 Internal Server Errors` in previous releases of s2Member, you will want to upgrade to this version for improved compatibility with other plugin combinations.
390
- * **(s2Member Pro). Bug fix.** s2Member Pro Forms for Free Registration were not picking up Custom Registration Fields configured at specific Membership Levels; other than Level #0. This has been resolved in s2Member Pro v1.5.5+.
391
- * **(s2Member Pro). Feature Improvement.** This change is related to the basic ( default ) CSS rules applied to Pro Forms generated by s2Member Pro. In this release, Pro Forms now utilize the CSS3 `box-sizing` specification to correct slight imperfections in the width of forms fields ( i.e. the difference between `select` and `input` ). This specification is supported by all modern browsers, including IE8. s2Member also degrades with a "best guess" workaround for IE 7 browsers. Reference article [here](http://css-tricks.com/box-sizing/).
392
- * **(s2Member/s2Member Pro). Roadmap.** Barring any serious bug reports, this will be the last release in the 3.5.x series of s2Member and the 1.5.x series of s2Member Pro. The next releases will include substantial changes ( internally ) related to the handling of variables; further optimizing the entire codebase. In addition, there are plans to integrate some new functionality for Content Dripping in the next release. The next releases should be ready around the end of April 2011.
393
-
394
- = 3.5.4 =
395
- * **(s2Member). Bug fix.** When `s2member_force_ssl = yes`, the s2Member SSL/non-SSL Filters applied to `content_url` and `plugins_url` are now off by default. These two specific areas prevent clashes with some themes.
396
-
397
- = 3.5.3 =
398
- * **(s2Member). Feature improvement.** s2Member's Bridge integration with bbPress®. It is now possible to allow bbPress® forums to be available to the public ( with read-only access ), and to restrict participation access by Level # instead of locking everything down entirely. You now have the choice whenever you install and/or re-install the bbPress® Bridge/plugin for s2Member. In addition, s2Member makes a new API function available for bbPress® `current_wp_user_is()`. This will be useful to developers integrating bbPress® with s2Member in creative ways. For further details, please check your Dashboard under: `s2Member -> API Bridges -> bbPress®`.
399
- * **(s2Member Pro). Feature improvement.** s2Member Pro Forms for Free Registration access are now more versatile. It is now possible to configure your Pro Form Shortcode so that Free Registrants come into your site with something other than the default Level #0 Access Level. For example, if you need to, you can change the Form Attribute `level="0"`, to `level="1"`, attach Custom Capabilities with the `ccaps=""` Attribute, and even limit this access to a certain timeframe with `tp="30" tt="D"` ( i.e. 30 Days ). So this Form is very flexible now. It can be used to allow free access to just about any aspect of your service. For more information on this topic, please check your Dashboard under: `s2Member -> PayPal® Pro Forms -> Free Registration Forms`. Also works with Pro Forms for Authorize.Net®.
400
- * **(s2Member). New Filters.** s2Member v3.5.3 adds two new WordPress® Filters that allow developers to further customize the inner workings of s2Member ( among 300+ other existing Filters already established for s2Member ). You will find these two new Filters in the source code of the free version: `wp_register_location` and `ws_plugin__s2member_redirection_url_after_modification`. For Multisite Networks, there is also this Filter available: `wp_signup_location`. If you're a novice site owner, please keep tabs on our [forums](http://www.primothemes.com/forums/viewforum.php?f=4) for examples on how to utilize these new Filters. We're sure this topic will come up.
401
- * **(s2Member). New Filters.** s2Member v3.5.3 adds two new WordPress® Filters that allow developers to further customize tinyURLs generated for email confirmations. You will find these two new Filters in the source code of the free version: `ws_plugin__s2member_register_link_gen_alternative` and `ws_plugin__s2member_sp_access_link_gen_alternative`. I've posted [an example](http://www.primothemes.com/forums/viewtopic.php?f=4&t=1636&p=7677#p7677) of how to use these in the forums. So these new Filters make it possible to use a shortening service that you prefer over tinyURL ( but you will have to integrate it yourself ). In a later release, we'll try to add some pre-integrated alternatives into the Dashboard for s2Member.
402
- * **(s2Member). New Replacement Code.** s2Member's EOT/Deletion Notification now provides additional detail about the actual event that triggers this API Notification through a new Replacement Code: `%%eot_del_type%%`. For further details on this new Replacement Code, and a list of possible values, please check your Dashboard under: `s2Member -> API Notifications -> EOT/Deletion Notifications`.
403
- * **(s2Member). Bug fix.** A common error that site owners see in s2Member's log file is `unable to verify POST vars`. This is due to issues with various hosting companies not being configured with either cURL and/or `allow_url_fopen` -> `on`. However, we recently discovered that WordPress® ( i.e. via the `WP_Http` class ) will attempt to officially verify the SSL certificate issued through remote connections to Payment Gateways integrated with s2Member. This can cause an additional roadblock on some servers, because often they are not capable of officially verifying SSL certificates. They lack the extended configuration necessary to do so. In other words, this default behavior in the `WP_Http` class file can ultimately lead to `unable to verify POST vars` in s2Member. To workaround this compatibility issue, s2Member now specifies `sslverify = false` in communications to Payment Gateways. This should work to further eliminate sightings of this error in your log files. Also important to note; this does NOT pose a security issue, because all communications with Payment Gateways have authentication mechanisms already in place. Either through explicit API Key validation or through server-to-server checksum verifications related to IPN data received by s2Member silently behind-the-scene.
404
- * **(s2Member). Bug fix.** s2Member's Auto-Return/PDT handler was sometimes triggering the error `unable to verify POST vars` under special circumstances that are applicable with PayPal's Enchanced Recurring Billing service, and sometimes with Subscriptions that are paid for by credit card, instead of through a PayPal account; again related to PayPal's ERP add-on service. This has been resolved in s2Member v3.5.3+. In some special cases, PayPal® does not provide any data through PDT ( Payment Data Transfer ) and so s2Member must recover gracefully by asking the Customer to check their email. This does not affect s2Member's ability to process a Customer's transaction, but it does require s2Member's processing to take place entirely behind-the-scene via the IPN service, instead of immediately after checkout ( in a very few special cases ). This bug fix may or may not affect you, depending on what you're selling, and depending on whether you're using PayPal's ERP service or not.
405
- * **(s2Member/s2Member Pro).** Bug fix. Supression of PHP errors triggered by web hosts that disable `set_time_limit()` via `@set_time_limit()`. Also applied to `@ignore_user_abort()` within s2Member's IPN handlers that need to finish processing even when Payment Gateways break the connection early. Resolved in s2Member v3.5.3+.
406
- * **(s2Member). Bug fix.** Custom Registration Fields that are configured for s2Member as being `uneditable`; which are subsequently disabled for Users attempting to edit their Profile ( e.g. with `disabled="disabled"` ), are now excluded from s2Member's JavaScript validation routines; as they should be. Resolved in s2Member v3.5.3+.
407
- * **(s2Member). Bug fix.** On some web hosts s2Member was generating the error: `Cannot modify header information, headers already sent` during activation on a Multisite Blog Farm. Resolved in s2Member v3.5.3+.
408
- * **(s2Member Pro). Bug fix.** Invalid link corrected in PayPal® Options panel for download of `/s2m-pro-extras.zip`. Note, this file is NOT to be installed, it just contains some additional code samples and API documentation for payment gateways that is sometimes useful to developers integrating s2Member for their clients.
409
- * **(s2Member Pro). Bug fix.** Under certain scenarios, s2Member's "Force SSL" functionality was incorrectly parsing content in its output buffer; ( i.e. an issue with regex in `preg_replace_callback()` ). A symptom of this bug was to experience SSL-enabled links in navigation menus for some themes; and possibly in other areas, such as login links after a Pro Form checkout was completed successfully. s2Member's intention is only to satisfy browser requirements for SSL media and other embedded content; and NOT to convert all navigation links over to SSL. This issue has been resolved in the latest release of s2Member Pro v1.5.3+.
410
- * **(s2Member Pro). Bug fix.** s2Member Pro Forms integrated with PayPal® Pro and Authorize.Net® were not allowing flexible timeframes whenever `rr="BN"`. This was preventing advanced site owners and developers from selling fixed-term access for non-standardized term lengths. For instance, it is now possible to sell a 13 month ( fixed-term ) "Buy Now" Membership by adjusting your Pro Form Shortcode in the following way: `tp="0" tt="D" ta="0" rp="13" rt="M" ra="100.00" rr="BN"` ( BN = Buy Now ). For further details, please check your Dashboard under: `s2Member -> PayPal® Pro Forms -> Shortcode Attributes Explained`.
411
- * **(s2Member). BuddyPress Multisite Bug fix.** When s2Member was running together with BuddyPress on a Multisite Network, if s2Member's Multisite (Config) was NOT offering Blogs, it was inadvertently disabling Open Registration for BuddyPress all together; regardless of the configuration value for Open Registration. In other words, in previous versions of s2Member, the only way to run BuddyPress effectively on a Multisite Network was to choose the Blog Farm option and set Blog counts to `0`. Starting with s2Member v3.5.3, it is now possible to run s2Member/BuddyPress without choosing to allow Blog creation, and without needing to use the `0` Blog hack. This bug should be resolved in s2Member v3.5.3+.
412
- * **(s2Member). Bug fix.** Strange behavior ( i.e. 500 internal server errors ) were reported in PHP v5.2.17 / reproducible on GoDaddy servers. This quirkiness was related to the `map_meta_cap` Filter in WordPress®, where s2Member deals with permissions on a Multisite Network for Blog Farm Administrators. However, due to the nature of this quirkiness, it could also have affected standard WordPress® installations running PHP v5.2.17. This bug has been resolved by modifying s2Member's Filter against this troublesome `map_meta_cap` Filter. Instead of mapping meta capabilities, s2Member now Filters against `user_has_cap`. This technique not only avoids the troublesome behavior in PHP v5.2.17, but also optimizes s2Member on a Multisite Network just a bit further.
413
- * **(s2Member). Bug fix.** Bug related to output buffering. This was preventing large file downloads protected by s2Member on some installations; depending on other plugins running in concert with s2Member. s2Member now implements `while(@ob_end_clean())` to be sure any/ALL output buffers are cleaned before chunked file delivery begins.
414
-
415
- = 3.5.2 =
416
- * Framework updated; general cleanup.
417
- * **(s2Member/s2Member Pro). Optimizations.** Further internal optimizations applied through configuration checksums that allow s2Member and s2Member Pro to load with even less overhead now.
418
- * **(s2Member/s2Member Pro). Optimizations.** Further internal optimizations applied with Hook priorities that allow s2Member and s2Member Pro to load dynamic CSS/JS files with even less overhead now.
419
- * **(s2Member). Bug fix.** Due to changes in WordPress® 3.1+, s2Member was including it's JavaScript routines twice on the `/wp-login.php` page. This has been resolved in s2Member v3.5.2+.
420
- * **(s2Member). Hook change.** Attn WP developers: s2Member's Hook `_ws_plugin__s2member_force_ssl_buffer_tags` is now `_ws_plugin__s2member_force_ssl_buffer_tags_array`.
421
- * **(s2Member). API Constant change.** Attn WP developers: s2Member's API Constant `S2MEMBER_CURRENT_USER_SUBSCR_ID` is now accompanied with a new API Constant `S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID`. The values returned by these API Constants have changed (slightly). For further details, check your Dashboard under: `s2Member -> API Scripting -> API Constants`.
422
- * **(s2Member Pro). Bug fix.** s2Member's ccBill® DataLink routines were sometimes generating the error `Too Many Connections` due to an invalid data storage routine under a delayed scenario. This has been resolved in s2Member v3.5.2+.
423
-
424
- = 3.5.1 =
425
- * **(s2Member). Bug fix.** Errors regarding `class-autoloader.inc.php / glob()`, which were associated with installation servers running NFS ( network file systems ) have been corrected in this release.
426
- * **(s2Member). Bug fix.** Errors regarding `ws_plugin__s2member_trim_deep()` during an upgrade from previous versions of s2Member have been corrected in this release.
427
-
428
- = 3.5 =
429
- * **(s2Member/s2Member Pro). WordPress® 3.1.** Updated for full compatibility with WordPress® 3.1 ( s2Member also remains compatible with the WordPress® 3.0.x series ).
430
- * **(s2Member/s2Member Pro). Speed Optimizations.** s2Member's entire codebase has been re-organized into PHP classes containing s2Member's static functions ( dev note: all of s2Member's Hooks/Filters remain as they were ). This new infrastructure allows s2Member to take full advantage of PHP's built-in [SPL Autoload](http://php.net/manual/en/language.oop5.autoload.php) extension. This means s2Member's source code is loaded ( only on-demand ) as function calls are made within core routines. So instead of loading s2Member's entire codebase into WordPress®; only the objects/methods needed during the processing of particular page will be included. Long story short, this release of s2Member is much faster than previous versions. For advanced site owners, this will make it more feasible to run s2Member in concert many other plugins; even on shared hosting.
431
- * **(s2Member). New feature.** You can now force WordPress® to use your Membership Labels instead of referencing them by s2Member Level #. For further details on this topic, check your Dashboard under `s2Member -> General Options -> Membership Levels/Labels`.
432
- * **(s2Member). Profile Shortcode.** s2Member now provides a built-in Shortcode ( `[s2Member-Profile /]` ) that generates an inline Profile Modification Form; which can be inserted into any Post/Page ( such as your Login Welcome Page ) or even into a Text Widget if you like. This feature is ( in addition to ) the existing `/?s2member_profile=1` stand-alone version that has always been available with s2Member.
433
- * **(s2Member). New feature.** s2Member now supports Remote Header Authorization on File Downloads ( optional ). Remote Header Authorization allows access to file downloads through an entirely different approach ( again, using this is 100% optional ). Instead of asking the Member to log into your site through a browser, a Member can be prompted automatically, to log in through HTTP Header Authorization prompts; which is the same technique used in more traditional security systems via .htaccess files. In other words, Remote Header Authorization makes it possible for your Members to access files through remote applications that may NOT use a browser. This is often the case when a Member needs to access protected files through a software client like iTunes®; typical with podcasts. For further details, please check your Dashboard under `s2Member -> Download Options -> Remote Auth / Podcasting`.
434
- * **(s2Member). New feature.** s2Member now supports a new option in its Login/Registration Design panel. If you have WordPress® 3.1+ installed, you can add your own raw HTML/PHP code to the very bottom of your default Login/Registration Forms with s2Member. Please check your Dashboard under: `s2Member -> General Options -> Login/Registration Design`.
435
- * **(s2Member). New feature.** You can now tell s2Member to *encrypt* your PayPal® Buttons automatically for added security. When this feature is enabled, all of your PayPal® Button Shortcodes will produce *encrypted* PayPal® Buttons. This improves security against fraudulent transactions. To turn this feature on, please log into your Dashboard and navigate to `s2Member -> PayPal® Options -> Account Details`. You'll need to provide s2Member with your PayPal® API Username/Password/Signature; and then enable `Button Encryption`. Additional instructions are provided in your WordPress® Dashboard. NOTE: This feature does NOT require you to have a PayPal® Pro account. If you do, that's fine, but it's not a requirement. Also, this particular feature is ONLY applicable to PayPal® Buttons ( it does NOT work with Pro Forms, nor does it need to ).
436
- * **(s2Member Pro). CSV Exportation.** s2Member now provides two different export formats. 1. Default CSV ( for easy re-importation ). 2. Easy-Read CSV ( improved readability; CANNOT be re-imported ). In addition to these new options, ALL CSV export formats now include column headers too. This makes CSV files easier to read inside applications like MS Excel or OpenOffice/Calc.
437
- * **(s2Member Pro). Authorize.Net®.** s2Member Pro now provides support for Authorize.Net® integrations. Authorize.Net® is a leading provider of payment gateway services, managing the submission of billions of transactions to processing networks on behalf of merchant customers. Authorize.Net is a solution offered by the CyberSource Corporation, a wholly owned subsidiary of Visa (NYSE: V).
438
- * **(s2Member Pro). ccBill®.** s2Member Pro now provides support for ccBill® integration. ccBill® is a great choice when you need to process transactions discreetly on an adult-oriented site. Drawing on its years of experience and proven payment processing platform, ccBill® has a solution that will not only meet the requirements of your consumers, it will also help address the specific needs of your business.
439
- * **(s2Member Pro). New feature.** s2Member now allows for the inclusion of the Pro Login Widget directly into a theme/plugin file ( optional ). Example usage: `<?php echo s2member_pro_login_widget(); ?>`. It is also possible to configure widget options dynamically. For further details, please check the documentation inside this file: `/s2member-pro/includes/functions/api-functions.inc.php`.
440
- * **(s2Member/s2Member Pro). Optimization.** If/when s2Member's logging/debugging mechanisms are enabled through the Dashboard, s2Member is now capable of archiving its own log files. Oversize log files ( i.e. larger than 2MB ) are automatically renamed with `...-ARCHIVED-{time}.log` to prevent s2Member from creating ridiculously large log files that may have otherwise built up over a longer period of time.
441
- * **(s2Member/s2Member Pro). New Profile field.** A new drop-down menu has been added to the administration editing panel for User/Member Profiles. This new drop-down menu allows a site owner to specify which Payment Gateway a Member's payments are associated with. s2Member will automatically configure this field for you, but it is editable none the less. NOTE: If you are upgrading from a previous version of s2Member, you may notice that s2Member will NOT have this information on file for any existing Members that you obtained prior to installing s2Member v3.5+. You may want to go through and update the value of this field for each Member after upgrading. That being said, this new field is only provided for clarity; and for future compatibility. In other words, there is no functionality lost if the Payment Gateway field is left blank for previously existing Members.
442
- * **(s2Member). New feature.** s2Member now supports a new Replacement Code for Login Redirection URLs, and also for URI Restrictions ( `%%current_user_ccaps%%` ). This is the current User's set of Custom Capabilities. If the current User has multiple Custom Capabilities, they will be separated by hyphens; allowing this string to be used in the formulation of slugs for a Special Login Redirection URL; which could be configured differently for each Custom Capability Package that you offer.
443
- * **(s2Member). New feature.** s2Member can now automate un-subscribe/opt-out removals for any List Servers that you've integrated ( i.e. MailChimp®, AWeber® ). s2Member is also capable of handling everything based on your own personal configuration preferences. You can choose which Events you consider grounds for List Removal. For further details, please check your Dashboard under: `s2Member -> API / List Servers -> Automate Un-Subscribes`. During a paid Subscription Modification, it also possible to have Members un-subscribed from Lists at their existing Membership Level#, while at the same time; subscribing them to Lists you've configured at the Membership Level they are upgrading/downgrading to.
444
- * **(s2Member). New feature.** Brute Force IP/Login Restrictions. As with any Membership system, it is possible for someone to try and guess Username/Password combinations by attempting a Brute Force Attack; whereby multiple/repeated logins are strategically attempted with various Username/Password combinations until a correct guess is made. It is NOT likely that you'll be attacked in this way, but it's still a good idea to protect your system; just in case somebody tries this. s2Member thwarts this behavior by monitoring failed login attempts that occur within a short period of time. Whenever s2Member detects an IP address ( i.e. a remote user ) that is consistently failing to enter a valid Username/Password, a temporary ban is created; preventing additional attempts from taking place for 30 minutes. This temporary ban, will ONLY affect the offending IP address. For further details and configuration of this new feature, please check your Dashboard under: `s2Member -> General Options -> Brute Force IP/Login Restrictions`.
445
- * **(s2Member Pro). New feature.** The s2Member (Pro) Login Widget now includes Login/Logout Redirection options. For further details, please check your Dashboard under: `Appearance -> Widgets -> s2Member (Pro) Login Widget`.
446
- * **(s2Member/s2Member Pro). Compatibility.** s2Member now precedes all of its calls to these two functions with an @ sign ( `@ini_get` and `@ini_set` ). This suppresses errors generated by PHP whenever these functions are disabled on the installation server. This is a very minor issue, as most hosting companies DO allow these functions to be called through PHP. At any rate, the preceding @ sign now puts s2Member inline with WordPress® standards in this regard.
447
- * **(s2Member). WP 3.1 Compatibility.** When "Redirect Members away from the Default Profile Panel?" is set to ( <code>Yes</code> ), s2Member will take an initiative to further safeguard ALL <code>/wp-admin/</code> areas of your installation; not just the Default Profile Panel. Also, starting with WordPress® 3.1+, setting this to ( <code>Yes</code> ) tells s2Member to dynamically modify links/titles in the new Admin Bar that can be enabled on WordPress® 3.1+. s2Member will force links to your Login Welcome Page instead of the Default Profile Panel; and Dashboard links are removed for non-Admin accounts ( as they should be ).
448
- * **(s2Member). New feature.** It is now possible to delete/reset IP Restrictions ( i.e. temporary bans ) caused by a security breach in your configuration of s2Member's IP Restrictions. Some site owners have reported complaints from their Customers about the error `503 / Too Many IP Addresses`. This is not a bug; it is the result of a temporary ban that s2Member imposes automatically; based on your IP Restriction configuration in the General Options panel for s2Member. Improving upon this functionality in s2Member v3.5+, you can now pull up a Users account in your Dashboard and delete/reset temporary bans on a per-User basis; as needed for customer service. For further details, or to delete/reset ALL IP Restrictions at once, please check your Dashboard under: `s2Member -> General Options -> IP Restrictions`.
449
- * **(s2Member). Multisite auto-patcher.** When running on a Multisite Network with `Automatically Patch WordPress® = yes`, s2Member is now capable of hooking into the automatic upgrade routines for WordPress® so that future updates to the WordPress® core framework will remain synchronized with core patches required by s2Member ( and a notice regarding patches automatically synchronized will be displayed during the core upgrade routine in your Dashboard ). This is ONLY applicable if you're running s2Member on a Multisite Network. For further details, check your Dashboard under: `s2Member -> Multisite (Config)`.
450
- * **(s2Member Pro). Multisite Blog Farms.** On a Multisite Blog Farm, it is now possible for child Blog Administrators running s2Member Pro to utilize the advanced Import/Export routines provided by the s2Member Pro module.
451
- * **(s2Member/s2Member Pro). New feature.** It is now possible to (ADD) Custom Capabilities through a Subscription Modification Button/Form. By default, a Checkout Button or Form generated by s2Member is designed to set and/or reset a Member's Custom Capabilities to the ones you specify in the Button/Form Code. However, starting with s2Member v3.5+, you can tell s2Member to (ADD) additional Custom Capabilities to any that already exist for a particular Member. This is accomplished on a per Form/Button basis by preceding your comma-delimited list of Custom Capabilities with a (+) sign. For further details on this topic, click the [?] icon next to the Custom Capabilities field in any Button/Form Generator supplied by s2Member.
452
- * **(s2Member). Compatibility.** s2Member's data encryption routines have always used a URL-safe version of Base64 Encoding to transfer data; whereby the Base64 padding character `=` is replaced with a URL-safe `.`. This routine has been modified to replace `=` with `~` instead of `.`; making s2Member more compatible with internal WordPress® functions like `site_url()` which refuse to generate URLs containing double `..` occurrences. Backward compatibility for existing data remains intact though; so this change only serves to improve s2Member's compatibility with WordPress®.
453
- * **(s2Member). New cookie.** s2Member has always used three temporary/encrypted cookies to authenticate a newly paid Customer. Starting with s2Member v3.5, there are now four cookies all together ( `s2member_subscr_gateway`, `s2member_subscr_id`, `s2member_custom`, `s2member_level` ). The new addition is `s2member_subscr_gateway`. The value of this cookie is also stored internally; it's associated with a Customer's Paid Subscr. ID. You can edit the Paid Subscr. Gateway/ID if you'd like. You'll find a drop-down menu on the [Edit] page for each Member.
454
- * **(s2Member/s2Member Pro). New feature.** s2Member's Button and Form Generators now provide a customer service tool that allows a site owner to generate Membership Registration Access Links on their own ( if/when needed ). This tool accompanies the Specific Post/Page Link Generation tool that has been a part of previous versions of s2Member. So these tools working together, now make it possible to create Access Links for both types of functionality. Again, these tools are provided for convenience. They are only intended to help site owners with customer service issues; they are NOT a required aspect of s2Member's integration with WordPress®.
455
- * **(s2Member Pro). New feature.** If you're using Pro Forms with s2Member Pro; particularly if you run a Multisite Blog Farm, you can now set this Constant in your `/wp-config.php` file: `define('S2MEMBER_PRO_AUTO_FORCE_SSL', true);`. This tells s2Member Pro to auto-force SSL on any Post/Page that contains a Pro Form Shortcode. This is useful if you're running a Blog Farm and SSL is already provided/configured for all Site Owners on your Network. Otherwise, the method of using a WordPress® Custom Field `s2member_force_ssl = yes` on a per-Post/Page basis works fine.
456
- * **(s2Member Pro). Desc attribute change.** The maximum characters allowed in the `desc=""` attribute for Pro Form Shortcodes ( and only for Pro Forms ) is now `100` characters. In previous versions the max length was `127`. This has been lowered to `100` so that s2Member has plenty of room for dynamically generated annotations regarding discounts via coupon codes. FYI: most Payment Gateways impose an upper limit ( e.g. PayPal® 127 max total ). In other words, s2Member must reduce max characters allowed in the `desc=""` attribute so it has plenty of room for its own annotations.
457
- * **(s2Member). Compatibility.** s2Member's handling of protected file delivery through `chunks` has been updated to support the full valid protocol of `Transfer-Encoding: chunked`. This should eliminate any remaining file delivery issues on GoDaddy shared hosting accounts and the like.
458
- * **(s2Member). Compatibility.** s2Member's directory locations for `/s2member-files/` and `/s2member-logs/` are now nested into a sub-directory of `/app_data/` ONLY on Windows® servers. This way all files in these directories will be secured from public access in a Windows® environment. On a Windows® server, the `/app_data/` directory name is special. Files within a directory with this special name are automatically protected from public access, without needing to create an `.htaccess` workaround, or use a `web.config` file. In addition, s2Member now makes two WordPress® Filters available ( `ws_plugin__s2member_files_dir` and `ws_plugin__s2member_logs_dir` ) giving developers the ability to move their protected files and/or logs to a custom directory of their choosing; if/when this is needed in special cases.
459
- * **(s2Member/s2Member Pro). New Hook for Multisite Blog Farm developers.** s2Member now makes a new Hook available; allowing Multisite Blog Farms to prevent the s2Member Pro module from loading on certain child Blogs, or under other special circumstances. You'll find this Hook inside `/s2member/s2member.php` ( `ws_plugin__s2member_load_pro` ).
460
- * **(s2Member/s2Member Pro). Multisite Blog Farms.** The dynamic mutation of s2Member's built-in documentation has been updated to provide better ( i.e. more appropriate ) information to Administrators of child Blogs on a Multisite Blog Farm.
461
- * **(s2Member Pro). Instruction.** Additional instructions have been added to the s2Member Pro panel for PayPal® Pro Forms. This new information includes details regarding workarounds when you do NOT have access to a PayPal® *Pro* account. FYI: It is no longer an *absolute requirement* that a site owner have a PayPal® Pro account; you can still use Pro Forms; as long as you have PayPal® Express Checkout ( which is free ).
462
- * **(s2Member). Conflict prevention.** s2Member now provides warnings in the Dashboard whenever novice site owners attempt to configure their Login Welcome Page or Membership Options Page as their Home Page ( i.e. static page ) for WordPress®; or as the static Posts Page. These conflict warnings will appear under: `WordPress® -> Reading Options` when/if a configuration conflict arises.
463
- * **(s2Member/s2Member Pro). Documentation.** Documentation updated/improved throughout several areas of s2Member and s2Member Pro.
464
-
465
- = And these bugs were corrected in v3.5 ( Changelog cont. ) =
466
-
467
- * **(s2Member). Multisite bug fix.** When s2Member is installed on a Multisite Network, it is now capable of dealing with centralized Users accounts that are being shared across multiple sites in the Network. In other words, s2Member v3.5+ prevents WordPress® from generating `username/email exists` errors through front-end forms whenever a User that exists on one site attempts to register on another. In order to accomplish this, s2Member v3.5 introduces one additional Multisite patch for your `/wp-includes/ms-functions.php` file, making it possible for WordPress® to add/remove existing User accounts from one site to another (gracefully); just like that which is supported natively in the WordPress® Dashboard already. NOTE: after updating to s2Member v3.5+, please be sure to re-run your Multisite (Config) patches. You will find these patches in your Dashboard under: `s2Member -> Multisite (Config)`. And yes, this is also compatible with WordPress® v3.1.
468
- * **(s2Member). Bug fix.** The built-in Profile Editing panel for s2Member that resides at `/?s2member_profile=1` contained an extra ( i.e. double ) closing tag for the `form` element. This has been corrected in s2Member v3.5+.
469
- * **(s2Member Pro). Bug fix.** A Pro Form configuration error, `Invalid "rp, rt" attributes.`, was being triggered whenever the Pro Form Attribute `rp` was greater than 1 year; even for Buy Now (BN) transactions. This was NOT the intended behavior, as the 1 year recurring limitation applies only to PayPal® Recurring Profiles, and should NOT have been limiting Buy Now transactions under 5 years. This bug/limitation has been resolved in the latest release. Maximum Subscription length for PayPal® Pro Recurring Profiles is 1 year, and maximum Subscription length for Buy Now transactions is 5 years; or 1 Lifetime also being possible.
470
- * **(s2Member Pro). Bug fix.** A Pro Form configuration error, `attribute is "D", and "tp" ( Trial Period ) > 7` was corrected. This should have been testing for 365 days instead of 7.
471
- * **(s2Member Pro). Bug fix.** The AliPay® integration file `alipay-notify.inc.php` was updated to correct an incompatibility issue with AliPay® custom variables. A symptom of this bug was ( no email being received after AliPay® checkout ). This bug has been resolved in s2Member Pro v1.5.
472
- * **(s2Member Pro). Bug fix.** The AliPay® integration file `alipay-notify.inc.php` was not exiting with the proper `success` status in its communication with AliPay®. A symptom of this bug was repeated notifications for a single transaction; thereby causing multiple emails to each Customer under the right circumstance. This bug has been resolved in s2Member Pro v1.5.
473
- * **(s2Member Pro). Bug fix.** s2Member Pro was sometimes processing API Payment Notifications in duplicate for AliPay®, ClickBank®, ccBill®, and Google® Checkout integrations. This has been resolved in s2Member Pro v1.5+.
474
- * **(s2Member Pro). Bug fix.** s2Member Pro was sometimes delivering ClickBank® Customers to a Return-Page with a default POST vars error because of an invalid `proxy_use / ty-email` specification. This has been resolved in s2Member Pro v1.5+.
475
- * **(s2Member Pro). Bug fix.** s2Member Pro Form integration with PayPal's Pro API, was suffering from a minor glitch caused by date/time conflicts between the s2Member installation server ( i.e. your server ) and PayPal's API server. In some rare cases, s2Member was attempting to start new Recurring Profiles in the past ( at least in the eyes of the PayPal® API server ); which could be in a different time zone. s2Member Pro now avoids this potential conflict by padding start dates with 12 hour offsets; making s2Member more reliable in this regard.
476
- * **(s2Member). Bug fix.** When s2Member was running together with BuddyPress, `wp-login.php?redirect_to=` logic implemented by BuddyPress was conflicting with s2Member's handling of `wp-login.php?redirect_to=`, including Login Welcome Page redirection. s2Member v3.5 resolves this BuddyPress conflict by removing all Filters applied by BuddyPress to `login_redirect`; thereby eliminating the conflict all together. This conflict was resolved in favor of s2Member, because s2Member provides a very comprehensive option configuration for this behavior in it's General Options panel.
477
- * **(s2Member). Bug fix.** s2Member's Alternative View Protection was not working properly when the `All` setting was applied to child/sub Category restrictions. At least, not in the same way that s2Member handles all of its other child Category restrictions. This bug has been corrected in v3.5 so that all child/sub Categories of a protected parent Category are filtered by s2Member's Alternative View Protection when this option is set to `All`.
478
- * **(s2Member Pro). Bug fix.** s2Member's integration with AliPay® was attempting to process duplicate IPN responses from the AliPay® server. Apparently AliPay® finds it necessary to continue prodding the IPN handler multiple times. In order to prevent duplicate processing, s2Member now employs a Transient array of already-processed Notification IDs; allowing it to silently ignore duplicate IPNs ( they will still be logged though, as they should be ).
479
- * **(s2Member). tinyURLs.** s2Member's limited use of the tinyURL service for shrinking links inserted into email messages has been improved upon in this release. As of s2Member v3.5+, all tinyURLs are now appended with your domain name; making them easier for Customers to read, and improving their overall appearance.
480
- * **(s2Member). Bug fix.** Under certain circumstances, s2Member was generating administrative URLs with `/wp-admin/?page=...` instead of `/wp-admin/admin.php?page=...`. A common symptom of this bug was to see an error in your Dashboard, something like: `You do not have permission to access this page`. This has been resolved in s2Member v3.5+.
481
- * **(s2Member). Bug fix.** Corrected layout issue on s2Member's Multisite (Config) panel. The field for `Level #0 Blogs Allowed` was not being hidden properly under certain circumstances; depending on the Multisite configuration being applied. This has been corrected in s2Member v3.5.
482
- * **(s2Member Pro). Bug fix.** Some of the new Button Generators for ClickBank®, AliPay®, Google® Checkout were using the JavaScript `escape()` function instead of `encodeURIComponent()`; leaving the possibility for certain characters ( such as `+` signs ) to be misinterpreted when passed through a URL/query string. This bug has been resolved in s2Memeber v3.5+ and s2Member Pro v1.5+.
483
- * **(s2Member Pro). Upgrader/bug fix.** The automatic upgrader for the s2Member Pro module was inadvertently deleting itself ( sometimes ) whenever an upgrade failed through WordPress® with script memory/timeout errors. This routine has been modified to better handle it's "point of no return" by unzipping the latest distribution into a separate temporary directory. In addition to this change, the update routine now analyzes your server configuration to ensure enough memory is available before the update routine begins. In the event that your installation lacks the memory required ( at least 256M ) to unzip the s2Member Pro module, a warning to that affect will be displayed and you will need to upload the `/s2member-pro/` directory via FTP instead; following instructions in the `/readme.txt` file.
484
- IMPORTANT: Since previous versions of the automatic updater did NOT include these important enhancements, you may not be able to use the automatic updater in your current version of s2Member Pro. Long story short, we believe the issues HAVE been corrected for "future" releases, but in order to upgrade to this release, you may need to download a copy at s2Member.com and upload it manually via FTP. Full instructions are provided in the `/readme.txt` file, and on the site at s2Member.com.
485
-
486
- = v3.3.2 - 1.0 =
487
- * ... trimmed away at v3.3.2.
488
  * Initial release, v1.0.
1
  === s2Member® ( Membership w/ PayPal® ) ===
2
 
3
+ Version: 111011
4
+ Stable tag: 111011
5
  Framework: WS-P-110523
6
 
7
  SSL Compatible: yes
63
 
64
  [youtube http://www.youtube.com/watch?v=FyA8Qmm2DHY /]
65
 
66
+ s2Member® (Membership w/ PayPal®). Powerful (free) membership capabilities. Protect members only content. The s2Member Framework (free) integrates w/ PayPal® (very easy), and fully supports recurring billing. s2Member supports custom Pages for registration (including Custom Registration/Profile Fields), account access, and a lot more. s2Member is now compatible with Multisite Networking too, and even with BuddyPress and bbPress. In addition, with the s2Member Pro Module (an optional paid upgrade), you can add support for unlimited Membership Levels, PayPal® Pro (w/ Pro Forms), Authorize.Net® (w/ Pro Forms), ccBill®, Google® Checkout, ClickBank®, AliPay®, advanced User Import/Export tools, the ability to use Coupon Codes, and more. Videos available at: [s2Member.com / Videos](http://www.s2member.com/videos/).
67
 
68
  s2Member supports Free Subscribers (at Level #0), and four primary Membership Levels [1-4] (unlimited with s2Member Pro). You can label your Membership Levels anything you like. The defaults are Free, Bronze, Silver, Gold, and Platinum. s2Member also supports an unlimited number of Custom Capability Packages. Custom Capabilities are an easy way to extend s2Member in creative ways. Custom Capabilities allow you to create an unlimited number of Membership Packages, all with different Capabilities and prices.
69
 
178
 
179
  == Changelog ==
180
 
181
+ = v111011 =
182
+ * (s2Member/s2Member Pro) **Bug fix**. An array to string conversion error was found in Profile editing panels whenever a multi-option Select Menu was created as a Custom Registration/Profile Field with s2Member. Fixed in this release. For further details, please see [this thread](http://www.primothemes.com/forums/viewtopic.php?f=4&t=15416&p=44801#p45169).
183
+ * (s2Member/s2Member Pro) **Email recipients / compatibility fix**. A bug found by an s2Member Pro customer, related to PHP's `mail()` function in PHP 5.2 < 5.2.11 was preventing some email messages from being processed properly. Fixed in this release. For further details, see [this thread](http://www.primothemes.com/forums/viewtopic.php?f=4&t=14957#p45222) and/or [this PHP bug report](https://bugs.php.net/bug.php?id=28038) please.
184
+ * (s2Member/s2Member Pro) **Bug fix**. s2Member was redirecting logged-in Users/Members to the Download Limit Exceeded Page whenever an attempt to download a file was made by a User/Member with access at a Level that was NOT allowed to access files period. s2Member should have been redirecting these specific requests to the Membership Options Page instead, with MOP Vars included. Fixed in this release. For further details, please see [this thread](http://www.primothemes.com/forums/viewtopic.php?f=4&t=15367#p45122).
185
+ * (s2Member/s2Member Pro) **Documentation updates**. s2Member's built-in Dashboard documentation has been updated in several places. This should work to further help site owners that are new to s2Member. In addition, s2Member's inline documentation now includes tips for integrating BuddyPress, when/if BuddyPress is installed and activated in your WordPress® installation.
186
+ * (s2Member/s2Member Pro) **Logging**. s2Member now adds the currently installed version of PHP to its log entries, if logging is enabled by the site owner.
187
+ * (s2Member/s2Member Pro) **AWeber**. A bug was found in s2Member's AWeber integration. When/if you configured s2Member NOT to collect First/Last Names, the email subscription request was not being parsed properly on the AWeber side of things, due to a regex issue in their built-in PayPal Email Parser. Fixed in this release. In addition, s2Member has built a Custom Email Parser for AWeber, which is optional, but definitely recommended. Please see [this thread](http://www.primothemes.com/forums/viewtopic.php?f=36&t=15496) for further details.
188
+ * (s2Member/s2Member Pro) **Bug fix**. A bug was found in s2Member's email configuration routine, which made it possible *( based on other plugin combinations running in concert with s2Member )*, for s2Member to drop existing `mail_from` values configured by other plugins, which may have resulted in delivery failures, particularly when/if a site was configured to use an external SMTP server, which MAY require that your `From:` header reference a specific address, one that is directly associated with your external SMTP account. Fixed in this release. In addition, please be advised that if you run an SMTP mail plugin with WordPress®, you should be sure to configure your `s2Member -> General Options -> Email Configuration` with a valid `From:` address *( i.e. one matching your SMTP configuration perhaps )*. Most free SMTP servers, such as Gmail/Yahoo, require that your `From:` header match the email address associated with your account. Please check with your SMTP service provider before attempting to configure plugins like s2Member to use a different `From:` address when sending email messages. For further details, please check your Dashboad, under: `s2Member -> General Options -> Email Configuration`.
189
+ * (s2Member/s2Member Pro) **MailChimp®/AWeber® list transitioning**. s2Member's list transitioning routine ( an optional feature ) has been further optimized and improved. In addition, it is now possible to force the transition of Users/Members from one set of lists to another, even when s2Member is unable to remove them from an existing list. For further details, please check your Dashboard under: `s2Member -> API List Servers -> Automate Unsubscribe / Opt-Outs`.
190
+ * (s2Member/s2Member Pro) **Reset or lock-in Roles/Capabilities**. A new development tool is available in your Dashboard, which makes it possible for developers to reset and/or lock-in the Roles/Capabilities associated with s2Member. For further details, please check your Dashboard, under: `s2Member -> General Options -> Membership Levels/Labels`.
191
+ * (s2Member/s2Member Pro) **Routine maintenance**. Some code optimization, some cleanup, and some organizational improvements in preparation for new features in a coming release.
192
+
193
  = v111003 =
194
  * (s2Member) **Bug fix**. Fatal `eval()` error inside: `/includes/classes/no-cache.inc.php`. Fixed in this release.
195
 
207
  = v110926 =
208
  * (s2Member/s2Member Pro) **BuddyPress v1.5**. Updated for compatibility with BuddyPress v1.5.
209
  * (s2Member Pro) **Bug fix**. A bug first introduced in s2Member Pro v110912 was causing problems for Pro Forms integrated on a Child Blog of Multisite Blog Farm. Fixed in this release.
210
+ * (s2Member/s2Member Pro) **Bug fix**. Custom Registration/Profile Fields configured to require an EXACT number of characters and/or digits was NOT being handled properly by s2Member in all cases. Fixed in this release.
211
  * (s2Member/s2Member Pro) **Bug fix**. A bug first introduced in s2Member v110912 was causing problems with s2Member's default email customization templates. Double percent signs `%%` for Replacement Codes were being reduced by s2Member's internationalization routines, to just single percent signs `%`, thereby nullifying them as valid Replacement Codes. Fixed in this release. If you installed s2Member and/or s2Member Pro v110912 - v110915 on a clean installation of WordPress®, it would be a good idea to have a quick look at your email customizations with s2Member, just to make sure your Replacement Codes have double percent signs around them *( for example, this is valid: `%%registration_url%%`, and this is NOT valid: `%registration_url%` )*.
212
  * (s2Member) **Amazon® S3/CloudFront**. s2Member is now fully integrated with Amazon® CloudFront, in addition to its existing support for Amazon® S3. Please note, one of the greatest things about Amazon® CloudFront, is its ability to `stream/seek` media files in the truest sense of the word over the RTMP protocol. For sites delivering protected `FLV/MP4/OGG/WEBM` and other streaming audio/video file types over the RTMP protocol, Amazon® CloudFront is our recommendation. Once you've successfully configured s2Member to use both Amazon® S3 and Amazon® CloudFront together, please review this section in your Dashboard: `s2Member -> Download Options -> JW Player® & RTMP Protocol Examples`. s2Member will automatically serve your protected files over the RTMP protocol, using an Amazon® CloudFront Streaming Distribution. In fact, s2Member can even configure all of your Amazon® S3/CloudFront Distros, ACLs, and Policies automatically; making it possible for just about anyone to stream media s2Member-protected files in real-time.
213
  * (s2Member) **s2File Shortcode**. s2Member now provides a new Shortcode: `[s2File /]`. For further details, please check your Dashboard, under: `s2Member -> Download Options -> Basic Download Restrictions`.
239
  * (s2Member/s2Member Pro) **Bug fix**. New Filter added to s2Member's source code, allowing s2Member Pro site owners to enable/disable tab indexing of reCAPTCHA box controllers *( e.g. the three mundane buttons )* that are skipped over 99.9% of the time anyway. If you'd like to enable tab indexing on these buttons, use: `add_filter("c_ws_plugin__s2member_utils_tabindex_recaptcha_icons", "__return_true");` inside a `/wp-content/mu-plugins/s2-hacks.php` file.
240
  * (s2Member Pro) **Bug fix**. Some site owners running s2Member Pro, on server configurations with PHP-based output compression enabled, experienced problems with the `success=""` Shortcode Attribute for s2Member Pro Forms. s2Member Pro has been improved in this regard *( i.e. s2Member Pro now makes better attempts to clear output buffers before returning plain text data with it's handlers )*. In addition, calls to `trim()` have also been implemented as an additional line of defense against errors reported in the previous release; which were related to URLs with leading white space, returned by s2Member's core PayPal® IPN processor.
241
  * (s2Member/s2Member Pro) **Conformity**. s2Member and s2Member Pro now make use of a core WordPress® function for all HTTP status headers ( i.e. `status_header(xxx)` ).
242
+ * (s2Member Pro) **Pro Forms / Tabindex ( Bug fix )**. s2Member Pro Forms suffered from a bug related to `tabindex` conflicts whenever MANY Custom Registration/Profile Fields were configured together. Corrected in this release.
243
  * (s2Member Pro) **Google® Checkout ( Bug fix )**. s2Member Pro's integration with Google Checkout has been updated in this release to use `display-disposition: PESSIMISTIC` instead of `OPTIMISTIC`. This change prevents possible card declines from slipping through, and thereby granting a Customer access inadvertently. With the former `OPTIMISTIC` behavior, in rare cases when payment authorizaton at Google® Checkout took longer than 20 seconds, s2Member was giving a Customer access to the site, instead of waiting pessimistically for Google® Checkout to complete processing. The updated behavior, now set to `PESSIMISTIC`, prevents this from occurring. For technical details, see [this article](http://code.google.com/apis/checkout/developer/Google_Checkout_Digital_Delivery.html).
244
  * (s2Member Pro) **ClickBank® ( Bug fix )**. s2Member Pro's integration with ClickBank® has been updated in this release. A bug was found by WebSharks, Inc. Support Rep: Cristián Lávaque, related to the verification of POST vars. Whenever UTF-8 characters appeared in any part of a ClickBank® IPN response received by s2Member, s2Member was failing to verify the checksum, and thus, returning the error: `POST vars could not be verified`. This issue has been corrected in the latest release of s2Member Pro. In addition, a known bug with ClickBank® cutting off first/last names whenever special characters were part of either name, has now been side-stepped by s2Member Pro's integration with ClickBank®.
245
  * (s2Member Pro) **PayPal® ( Bug fix )**. s2Member Pro's integration with the PayPal® Pro API has been updated in this release. A bug was found by the s2Member community which affected a rare scenario during heavy testing. When/if a site owner was heavily testing s2Member Pro Forms repeatedly, whereby PayPal® Pro Recurring Profiles were created over and over again; one of these Recurring Profiles could still be in a `Pending` state during a Subscription Modification soon thereafter. This is rare, because Recurring Profiles are usually in a `Pending` state on the PayPal® side of things, for just a few seconds. However, in this test case, it was possible for s2Member to create a second Recurring Profile through the PayPal® Pro API, and the old one would NOT be terminated properly, because it was still in a `Pending` state, and unable to be terminated. This release of s2Member Pro resolves this issue and prevents this from occuring under any scenario. Customers and/or site owners testing s2Member Pro Forms will now see an error message related to pending changes, and the Customer would be asked to wait 15 minutes in this rare scenario.
255
  * (s2Member) **PayPal® ( Bug fix )**. s2Member was incorrectly handling delayed EOT Times under a specific scenario, as [reported here](http://www.primothemes.com/forums/viewtopic.php?f=4&t=14876&p=34414#p34414). Corrected in this release.
256
  * (s2Member) **JavaScript/CSS Optimization**. s2Member now loads its dynamic JavaScript/CSS libraries through a new optimized file called `/s2member-o.php`, designed to increase the speed at which your installation of WordPress® can load these resources. The new optimized `/s2member-o.php` file loads only the core WordPress® framework and the s2Member JavaScript and/or CSS file, depending on which is being requested. This new file will eliminate a potential bottleneck on some WordPress® installations, which may have MANY other plugins running in concert with s2Member. It also works to further reduce CPU and memory consumption for all site owners. For further details about why this optimization is beneficial, please see [this article](http://www.primothemes.com/forums/viewtopic.php?f=4&t=14359&p=33441#p33441).
257
  * (s2Member Pro) **PayPal® Express Checkout / Pre-Population**. s2Member now pre-populates everything it can through PayPal® Express Checkout integration. If a Customer does NOT already have a PayPal® account when they arrive at Express Checkout, the Account Creation Form at PayPal® will be pre-populated with a minimum of their Name and Email Address. Street address information will ONLY be pre-populated, when/if s2Member collects it for tax purposes. Otherwise, the address information will NOT be pre-populated, because only PayPal® will ask for those details anyway *( i.e. s2Member doesn't ask for address details when Express Checkout is used; not unless you're collecting taxes: `s2Member -> PayPal® Options -> Tax Calculations` ).
258
+ * (s2Member) **New API Function**. This version of s2Member includes a new API Function `get_s2member_custom_fields()`, designed to provide more information about Custom Registration/Profile Field configuration and values for a specific User. The API function `get_user_field()` remains available as well. For further details, please see [this article](http://www.primothemes.com/forums/viewtopic.php?f=40&t=12455) in the s2Member Codex.
259
  * (s2Member Pro) **Pro Login Widget**. This version of s2Member improves the `%%automatic%%` setting for the Signup URL in Pro Login Widgets. When/if a Customer has already paid for their Membership, the Signup URL presented in the Pro Login Widget will change dynamically, pointing a Customer to the Registration Form, instead of to your Membership Options Page. Of course, this behavior could be overridden by changing the Signup URL to something other than `%%automatic%%`, if you prefer.
260
 
261
  = v110815 =
310
  * **(s2Member Pro) Unlimited Membership Levels.** With s2Member Pro installed, you may now configure an unlimited number of Membership Levels. You can set the number of Membership Levels by adding this line to your /wp-config.php file: `define("MEMBERSHIP_LEVELS", 4);`. Feel free to change the default value of 4 to whatever you need. The minimum allowed value is 1. The recommended maximum is 100. For further details, please check your Dashboard, under: `s2Member -> General Options -> Membership Levels/Labels`.
311
  * **(s2Member/s2Member Pro) Email Configuration.** Some new options are now available that allow site owners to customize the email that contains the Username/Password for new Users/Members. For further details, please check your Dashboard, under: `s2Member -> General Options -> Email Configuration`.
312
  * **(s2Member/s2Member Pro) Bug fix.** A problem with certain email addresses routed through the `wp_mail()` function, containing special characters in the "Name" portion. The issue was related to the way in which `wp_mail()` handles recipient addresses in the format `"Name" <address>`. s2Member now strips double quotes dynamically ( i.e. internally ), so that `wp_mail()` and the PHPMailer class can deal with this format on their own. This bug fix should also prevent seemingly random `500 Internal Server Error` messages during checkout. One symptom of this bug was to find "Premature end of script headers" inside your Apache error log, followed by an error code of `500` reported in the browser. These issues have been corrected in this release of s2Member.
313
+ * **(s2Member) Bug fix.** A bug first introduced in v110604 was preventing s2Member from setting a User's "Display Name" during Registration properly. This bug has been corrected in the latest release. In addition, a new configurable option for this behavior has been added to the s2Member General Options panel. For further details, please check your Dashboard under: `s2Member -> General Options -> Registration/Profile Fields -> Display Name`.
314
  * **(s2Member) Bug fix.** A bug first introduced in v110604 was preventing s2Member from handling password strenth meters in the Stand-Alone Profile Editing Panel ( i.e. the popup version ).
315
  * **(s2Member) Documentation.** s2Member's `API Scripting` sections inside your Dashboard have been updated in various places, in support of some new API Functions/Constants introduced in the latest versions of s2Member; and also to reference relevant articles in the [s2Member Codex](http://www.primothemes.com/forums/viewforum.php?f=40).
316
 
333
  = v110604 ( instead of s2Member v3.6 ) =
334
  * **(s2Member/s2Member Pro). Versioning.** Starting with this release, s2Member and s2Member Pro will be released with dated versions following this format: `yymmdd`. The version for this release is: `110604`.
335
  * **(s2Member/s2Member Pro). s2Member Security Badge.** An s2Member® Security Badge ( optional ), can be used to express your site's concern for security; demonstrating to all Users/Members that your site ( and the s2Member software ), takes security seriously. However, in order to qualify your site, you MUST generate a Security Encryption Key and pass other security standards. For more information, please check your Dashboard under: `s2Member -> General Options -> Security Badge`.
336
+ * **(s2Member/s2Member Pro). Custom Fields For BuddyPress.** s2Member can now integrate your Custom Fields into BuddyPress. Please check your Dashboard for all configuration options. You'll find BuddyPress integration available here: `DashBoard -> s2Member -> General Options -> Registration/Profile Fields`.
337
  * **(s2Member Pro). PayPal® Pro API Updates (First Payment / Recurring Profile Behavior).** s2Member's integration with the PayPal® Pro API has been updated to API v71.0. There is also a new option available to PayPal® Pro Merchants. s2Member now provides site owners the abililty to control the way the first payment in a Recurring Profile is billed. (1)Consolidate w/ Recurring Profile or (2)— Real-Time / Direct Pay ( mission critical ) —. For further details, please check your Dashboard under: `s2Member -> PayPal Options -> Account Details`. We recommend: `Consolidate w/ Recurring Profile`, because this keeps all charges associated with a particular Customer organized in your PayPal® account. No matter which option you choose, a first Initial Payment ( when applicable ), will always be charged immediately ( improved in this release ). In cases where it is absolutely critical that a Customer NOT gain access until their first payment has been fully captured, choose: `Real-Time / Direct Pay`, which tells s2Member to authorize/capture the first payment in real-time during checkout, instead of consolidating it into the Recurring Profile.
338
  * **(s2Member). bbPress® 2.0+.** s2Member has been integrated with preliminary support for bbPress® 2.0+ ( i.e. the new plugin variation for WordPress® ). Please check your Dashboard, under: `s2Member -> Other Integrations` for further details and a list of current limitations.
339
  * **(s2Member/s2Member Pro). Field Labels.** Some additional `for=""` attributes in all Pro Form templates. This improves the reliability of s2Member's JavaScript validation routines. Existing s2Member Pro Customers with modified Pro Form templates MUST update their `for=""` attributes in order for s2Member's JavaScript API to properly validate Customer data entry in this new release. If you're running custom Pro Form templates, check this directory for the updated default templates, so you can merge any changes you've made yourself: `/s2member-pro/includes/templates/forms/`.
361
  * **(s2Member/s2Member Pro). Custom Field Default Values.** It's now possible to set default text values for single-line and multi-line input/textarea fields too. This only affects Custom Fields you configure with s2Member.
362
  * **(s2Member/s2Member Pro). Custom Fields By Section.** Custom Fields by section ( i.e. dividers ). It's now possible to configure certain Custom Fields, so that they start a new section. Your sections can be simple dividing lines, or you can give them a title that will appear on your Registration and Profile Editing forms.
363
  * **(s2Member). Bug fix.** s2Member was creating window focus/blur issues on Profile updates through its Stand-Alone version of the Profile Editing Panel ( i.e. when it was popped open in a new window ). This was causing odd behavior Firefox® 4.
364
+ * **(s2Member/s2Member Pro). Remove First/Last Name.** It is now possible to turn off First/Last/Display Name, on Registration and Profile Editing forms. For configuration options, please check your Dashboard, under: `s2Member -> Registration/Profile Fields`.
365
  * **(s2Member Pro). Data Prefill.** s2Member Pro is now capable of prepopulating some Pro Form fields when/if existing Users buy a Specific Post/Page.
366
+ * **(s2Member/s2Member Pro). Bug fix.** Fixed nested Custom Registration/Profile Field labels for multi option check boxes/radios. Firefox 4+ had issues with this.
367
  * **(s2Member/s2Member Pro). Registration Link Expiration.** The default is built-in, it's (2) days. We don't recommend changing this unless you know what you're doing. Some developers requested the ability to change this dynamically. s2Member now makes this Filter available: `ws_plugin__s2member_register_link_exp_time`.
368
  * **(s2Member Pro). Automatic Upgrade Routine.** s2Member Pro now places your site into maintenance mode ( temporarily ) during an s2Member Pro Upgrade routine.
369
  * **(s2Member). New API Notification.** New "Modification" Notification now available under: `s2Member -> API Notifications`. Say that three times fast!
379
  * **(s2Member/s2Member Pro). Documentation.** Built-in documentation updated throughout.
380
  * **(s2Member/s2Member Pro). UI Panels.** Some minor UI improvements.
381
 
382
+ = v3.5.8 - 1.0 =
383
+ * ... trimmed away at v3.5.8.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
384
  * Initial release, v1.0.
s2member.php CHANGED
@@ -19,8 +19,8 @@
19
  */
20
  /* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
21
 
22
- Version: 111003
23
- Stable tag: 111003
24
  Framework: WS-P-110523
25
 
26
  SSL Compatible: yes
@@ -65,7 +65,7 @@ Tags: membership, members, member, register, signup, paypal, paypal pro, pay pal
65
 
66
  -- end section for WordPress® parsing. ------------------------------------------------------------------------------- */
67
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
68
- exit ("Do not access this file directly.");
69
  /**
70
  * The installed version of s2Member.
71
  *
@@ -75,7 +75,7 @@ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
75
  * @var str
76
  */
77
  if (!defined ("WS_PLUGIN__S2MEMBER_VERSION"))
78
- define ("WS_PLUGIN__S2MEMBER_VERSION", "111003");
79
  /**
80
  * Minimum PHP version required to run s2Member.
81
  *
@@ -105,7 +105,7 @@ if (!defined ("WS_PLUGIN__S2MEMBER_MIN_WP_VERSION"))
105
  * @var str
106
  */
107
  if (!defined ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION"))
108
- define ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "111003");
109
  /*
110
  Several compatibility checks.
111
  If all pass, load the s2Member plugin.
@@ -116,7 +116,7 @@ if (version_compare (PHP_VERSION, WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION, ">=") &&
116
  /*
117
  Hook before loaded.
118
  */
119
- do_action ("ws_plugin__s2member_before_loaded");
120
  /*
121
  System configuraton.
122
  */
@@ -128,7 +128,7 @@ if (version_compare (PHP_VERSION, WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION, ">=") &&
128
  /*
129
  Hook after system config & Hooks are loaded.
130
  */
131
- do_action ("ws_plugin__s2member_config_hooks_loaded");
132
  /*
133
  Load a possible Pro module, if/when available.
134
  */
@@ -149,7 +149,7 @@ if (version_compare (PHP_VERSION, WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION, ">=") &&
149
  /*
150
  Hook after loaded.
151
  */
152
- do_action ("ws_plugin__s2member_after_loaded");
153
  }
154
  /*
155
  Else NOT compatible. Do we need admin compatibility errors now?
19
  */
20
  /* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
21
 
22
+ Version: 111011
23
+ Stable tag: 111011
24
  Framework: WS-P-110523
25
 
26
  SSL Compatible: yes
65
 
66
  -- end section for WordPress® parsing. ------------------------------------------------------------------------------- */
67
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
68
+ exit("Do not access this file directly.");
69
  /**
70
  * The installed version of s2Member.
71
  *
75
  * @var str
76
  */
77
  if (!defined ("WS_PLUGIN__S2MEMBER_VERSION"))
78
+ define ("WS_PLUGIN__S2MEMBER_VERSION", "111011");
79
  /**
80
  * Minimum PHP version required to run s2Member.
81
  *
105
  * @var str
106
  */
107
  if (!defined ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION"))
108
+ define ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "111011");
109
  /*
110
  Several compatibility checks.
111
  If all pass, load the s2Member plugin.
116
  /*
117
  Hook before loaded.
118
  */
119
+ do_action("ws_plugin__s2member_before_loaded");
120
  /*
121
  System configuraton.
122
  */
128
  /*
129
  Hook after system config & Hooks are loaded.
130
  */
131
+ do_action("ws_plugin__s2member_config_hooks_loaded");
132
  /*
133
  Load a possible Pro module, if/when available.
134
  */
149
  /*
150
  Hook after loaded.
151
  */
152
+ do_action("ws_plugin__s2member_after_loaded");
153
  }
154
  /*
155
  Else NOT compatible. Do we need admin compatibility errors now?