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

Version Description

Download this release

Release Info

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

Code changes from version 110815 to 110912

Files changed (123) hide show
  1. includes/classes/admin-css-js-in.inc.php +24 -14
  2. includes/classes/admin-lockouts.inc.php +45 -57
  3. includes/classes/brute-force.inc.php +1 -1
  4. includes/classes/css-js-in.inc.php +49 -33
  5. includes/classes/css-js-themes.inc.php +8 -4
  6. includes/classes/custom-reg-fields.inc.php +70 -66
  7. includes/classes/email-configs.inc.php +5 -5
  8. includes/classes/files-in.inc.php +155 -164
  9. includes/classes/installation.inc.php +22 -28
  10. includes/classes/ip-restrictions.inc.php +8 -12
  11. includes/classes/labels.inc.php +3 -3
  12. includes/classes/login-customizations.inc.php +0 -3
  13. includes/classes/login-redirects.inc.php +12 -12
  14. includes/classes/menu-pages-rs.inc.php +8 -0
  15. includes/classes/menu-pages.inc.php +27 -27
  16. includes/classes/option-forces.inc.php +27 -28
  17. includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php +9 -9
  18. includes/classes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php +7 -7
  19. includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php +1 -1
  20. includes/classes/paypal-notify-in-wa-ccaps-wo-level.inc.php +1 -1
  21. includes/classes/paypal-notify-in.inc.php +12 -8
  22. includes/classes/paypal-return-in-no-tx-data.inc.php +7 -7
  23. includes/classes/paypal-return-in-proxy-ty-email.inc.php +2 -2
  24. includes/classes/paypal-return-in-proxy-x-preview.inc.php +2 -2
  25. includes/classes/paypal-return-in-subscr-modify-w-level.inc.php +15 -15
  26. includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php +28 -28
  27. includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php +17 -17
  28. includes/classes/paypal-return-in-web-accept-sp.inc.php +13 -13
  29. includes/classes/paypal-return-in.inc.php +6 -6
  30. includes/classes/paypal-utilities.inc.php +35 -31
  31. includes/classes/profile-in.inc.php +36 -34
  32. includes/classes/profile-mods-in.inc.php +13 -10
  33. includes/classes/querys.inc.php +197 -81
  34. includes/classes/readmes.inc.php +5 -5
  35. includes/classes/register-in.inc.php +9 -9
  36. includes/classes/registrations.inc.php +40 -40
  37. includes/classes/return-templates.inc.php +15 -13
  38. includes/classes/sc-keys-in.inc.php +64 -0
  39. includes/classes/sc-keys.inc.php +49 -0
  40. includes/classes/sc-paypal-button-e.inc.php +1 -1
  41. includes/classes/sc-paypal-button-in.inc.php +15 -15
  42. includes/classes/sc-profile-in.inc.php +39 -37
  43. includes/classes/sp-access.inc.php +5 -5
  44. includes/classes/ssl-in.inc.php +4 -5
  45. includes/classes/tracking-cookies-in.inc.php +13 -5
  46. includes/classes/translations.inc.php +65 -18
  47. includes/classes/user-new-in.inc.php +31 -31
  48. includes/classes/users-list-in.inc.php +51 -51
  49. includes/classes/utilities.inc.php +33 -2
  50. includes/classes/utils-captchas.inc.php +3 -2
  51. includes/classes/utils-dirs.inc.php +55 -3
  52. includes/classes/utils-gets.inc.php +48 -32
  53. includes/classes/utils-html.inc.php +8 -3
  54. includes/classes/utils-s2o.inc.php +116 -0
  55. includes/classes/utils-strings.inc.php +31 -10
  56. includes/classes/utils-time.inc.php +34 -30
  57. includes/classes/utils-urls.inc.php +2 -2
  58. includes/classes/utils-users.inc.php +29 -4
  59. includes/codes.inc.php +2 -1
  60. includes/dropins/mu-plugins/index.php +0 -0
  61. includes/dropins/mu-plugins/s2member-o.php +73 -0
  62. includes/functions/api-functions.inc.php +59 -3
  63. includes/hooks.inc.php +24 -24
  64. includes/jquery/index.php +0 -0
  65. includes/jquery/jquery.json-ps/index.php +0 -0
  66. includes/{menu-pages/jquery-json-ps-min.js → jquery/jquery.json-ps/jquery.json-ps-min.js} +0 -0
  67. includes/{menu-pages/jquery-json-ps.js → jquery/jquery.json-ps/jquery.json-ps.js} +4 -4
  68. includes/jquery/jquery.sprintf/index.php +0 -0
  69. includes/jquery/jquery.sprintf/jquery.sprintf-min.js +1 -0
  70. includes/jquery/jquery.sprintf/jquery.sprintf.js +210 -0
  71. includes/jquery/jquery.ui-effects/index.php +0 -0
  72. includes/jquery/jquery.ui-effects/jquery.ui-effects-min.js +81 -0
  73. includes/{menu-pages/jquery-ui-effects.js → jquery/jquery.ui-effects/jquery.ui-effects.js} +11 -3
  74. includes/menu-pages/down-ops.inc.php +45 -14
  75. includes/menu-pages/els-ops.inc.php +3 -12
  76. includes/menu-pages/gen-ops.inc.php +20 -1
  77. includes/menu-pages/integrations.inc.php +2 -2
  78. includes/menu-pages/js-c-warning.inc.php +40 -0
  79. includes/menu-pages/menu-pages-min.js +1 -1
  80. includes/menu-pages/menu-pages-s-min.js +1 -1
  81. includes/menu-pages/menu-pages-s.js +36 -17
  82. includes/menu-pages/menu-pages.css +13 -1
  83. includes/menu-pages/menu-pages.js +3 -1
  84. includes/menu-pages/mms-ops.inc.php +7 -5
  85. includes/menu-pages/paypal-buttons.inc.php +25 -25
  86. includes/menu-pages/paypal-ops.inc.php +5 -5
  87. includes/menu-pages/res-ops.inc.php +12 -12
  88. includes/menu-pages/scripting.inc.php +6 -6
  89. includes/s2member-min.js +1 -1
  90. includes/s2member.js +45 -45
  91. includes/syscon.inc.php +52 -27
  92. includes/templates/badges/{s-badge.html → s-badge.php} +6 -1
  93. includes/templates/buttons/paypal-cancellation-button.html +0 -3
  94. includes/templates/buttons/paypal-cancellation-button.php +8 -0
  95. includes/templates/buttons/paypal-ccaps-checkout-button.html +0 -30
  96. includes/templates/buttons/paypal-ccaps-checkout-button.php +35 -0
  97. includes/templates/buttons/paypal-checkout-button.html +0 -42
  98. includes/templates/buttons/paypal-checkout-button.php +47 -0
  99. includes/templates/buttons/paypal-sp-checkout-button.html +0 -30
  100. includes/templates/buttons/paypal-sp-checkout-button.php +35 -0
  101. includes/templates/cfg-files/index.php +0 -0
  102. includes/templates/cfg-files/s2member-files.php +46 -0
  103. includes/templates/cfg-files/s2member-logs.php +6 -0
  104. includes/templates/options/{paypal-currencies.html → paypal-currencies.php} +6 -1
  105. includes/templates/options/paypal-membership-ccap-terms.html +0 -3
  106. includes/templates/options/paypal-membership-ccap-terms.php +8 -0
  107. includes/templates/options/paypal-membership-regular-terms.html +0 -63
  108. includes/templates/options/paypal-membership-regular-terms.php +68 -0
  109. includes/templates/options/paypal-membership-trial-terms.html +0 -4
  110. includes/templates/options/paypal-membership-trial-terms.php +9 -0
  111. includes/templates/options/paypal-sp-hours.html +0 -46
  112. includes/templates/options/paypal-sp-hours.php +51 -0
  113. includes/templates/returns/{default-return.html → default-return.php} +5 -0
  114. includes/templates/shortcodes/paypal-cancellation-button-shortcode.html +0 -1
  115. includes/templates/shortcodes/paypal-cancellation-button-shortcode.php +6 -0
  116. includes/templates/shortcodes/paypal-ccaps-checkout-button-shortcode.html +0 -1
  117. includes/templates/shortcodes/paypal-ccaps-checkout-button-shortcode.php +6 -0
  118. includes/templates/shortcodes/paypal-checkout-button-shortcode.html +0 -1
  119. includes/templates/shortcodes/paypal-checkout-button-shortcode.php +6 -0
  120. includes/templates/shortcodes/paypal-sp-checkout-button-shortcode.html +0 -1
  121. includes/templates/shortcodes/paypal-sp-checkout-button-shortcode.php +6 -0
  122. includes/translations/index.php +0 -0
  123. includes/translations/s2member.pot +2894 -0
includes/classes/admin-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_admin_css_js_in"))
21
  {
@@ -43,16 +43,21 @@ 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
- header("Content-Type: text/css; charset=utf-8");
47
- header("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("-1 week")) . " GMT");
48
- header("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
49
- header("Cache-Control: no-cache, must-revalidate, max-age=0");
50
- header("Pragma: no-cache");
 
 
 
 
 
51
  /**/
52
  $u = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"];
53
  $i = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images";
54
  /**/
55
- ob_start("c_ws_plugin__s2member_utils_css::compress_css"); /* Compress. */
56
  /**/
57
  include_once dirname (dirname (__FILE__)) . "/menu-pages/menu-pages.css";
58
  /**/
@@ -83,18 +88,23 @@ if (!class_exists ("c_ws_plugin__s2member_admin_css_js_in"))
83
  /**/
84
  if (!empty ($_GET["ws_plugin__s2member_menu_pages_js"]) && is_user_logged_in () && current_user_can ("create_users"))
85
  {
86
- header("Content-Type: text/javascript; charset=utf-8");
87
- header("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("-1 week")) . " GMT");
88
- header("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
89
- header("Cache-Control: no-cache, must-revalidate, max-age=0");
90
- header("Pragma: no-cache");
 
 
 
 
 
91
  /**/
92
  $u = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"];
93
  $i = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images";
94
  /**/
95
  for ($n = 0, $labels = ""; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
96
- $labels .= "labels['level" . $n . "'] = '" . ((!empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"])) ? c_ws_plugin__s2member_utils_strings::esc_sq (preg_replace ('/"/', "", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"])) : "") . "';";
97
- unset($n);
98
  /**/
99
  include_once dirname (dirname (__FILE__)) . "/menu-pages/menu-pages-min.js";
100
  /**/
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_admin_css_js_in"))
21
  {
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");
52
+ header ("Cache-Control: no-cache, must-revalidate, max-age=0");
53
+ header ("Pragma: no-cache");
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__)) . "/menu-pages/menu-pages.css";
63
  /**/
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");
97
+ header ("Cache-Control: no-cache, must-revalidate, max-age=0");
98
+ header ("Pragma: no-cache");
99
+ /**/
100
+ eval ('while (@ob_end_clean ());'); /* Clean buffers. */
101
  /**/
102
  $u = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"];
103
  $i = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images";
104
  /**/
105
  for ($n = 0, $labels = ""; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
106
+ $labels .= "labels['level" . $n . "'] = '" . ((!empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"])) ? str_replace ('"', "", c_ws_plugin__s2member_utils_strings::esc_js_sq ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"], 3)) : "") . "';";
107
+ unset ($n);
108
  /**/
109
  include_once dirname (dirname (__FILE__)) . "/menu-pages/menu-pages-min.js";
110
  /**/
includes/classes/admin-lockouts.inc.php CHANGED
@@ -41,19 +41,16 @@ if (!class_exists ("c_ws_plugin__s2member_admin_lockouts"))
41
  {
42
  do_action ("ws_plugin__s2member_before_admin_lockouts", get_defined_vars ());
43
  /**/
44
- if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["force_admin_lockouts"] /* Now check for these WordPress® functionality Constants too. */
45
- && (!defined ("XMLRPC_REQUEST") || !XMLRPC_REQUEST) && (!defined ("APP_REQUEST") || !APP_REQUEST) && (!defined ("DOING_AJAX") || !DOING_AJAX)/**/
46
- && !current_user_can ("edit_posts")) /* And only if the current User is unable to edit Posts; otherwise we allow them in. */
47
- if (apply_filters ("ws_plugin__s2member_admin_lockout", true, get_defined_vars ())) /* Give Filters a chance too. */
48
- {
49
- if ($special_redirection_url = c_ws_plugin__s2member_login_redirects::login_redirection_url ())
50
- wp_redirect($special_redirection_url); /* Special Redirection. */
51
- /**/
52
- else /* Else we use the Login Welcome Page configured for s2Member. */
53
- wp_redirect(get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"]));
54
- /**/
55
- exit (); /* Clean exit. */
56
- }
57
  /**/
58
  do_action ("ws_plugin__s2member_after_admin_lockouts", get_defined_vars ());
59
  /**/
@@ -72,52 +69,43 @@ if (!class_exists ("c_ws_plugin__s2member_admin_lockouts"))
72
  */
73
  public static function filter_admin_menu_bar (&$wp_admin_bar = FALSE)
74
  {
 
 
75
  do_action ("ws_plugin__s2member_before_filter_admin_menu_bar", get_defined_vars ());
76
  /**/
77
- if (is_object ($wp_admin_bar) && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["force_admin_lockouts"] /* Now check functionality Constants too. */
78
- && (!defined ("XMLRPC_REQUEST") || !XMLRPC_REQUEST) && (!defined ("APP_REQUEST") || !APP_REQUEST) && (!defined ("DOING_AJAX") || !DOING_AJAX)/**/
79
- && !current_user_can ("edit_posts")) /* And only if the current User is unable to edit Posts; otherwise we allow them in. */
80
- if (apply_filters ("ws_plugin__s2member_admin_lockout", true, get_defined_vars ())) /* Give Filters a chance too. */
81
- {
82
- if ($special_redirection_url = c_ws_plugin__s2member_login_redirects::login_redirection_url ())
83
- $lwp = $special_redirection_url;
84
- /**/
85
- else /* Else we use the Login Welcome Page configured for s2Member. */
86
- $lwp = get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"]);
87
- /**/
88
- if (isset ($wp_admin_bar->menu->{"my-account-with-avatar"})) /* Profile. */
89
- {
90
- if (isset ($wp_admin_bar->menu->{"my-account-with-avatar"}["href"]))
91
- $wp_admin_bar->menu->{"my-account-with-avatar"}["href"] = $lwp;
92
- /**/
93
- if (isset ($wp_admin_bar->menu->{"my-account-with-avatar"}["children"]->{"edit-profile"}["href"]))
94
- $wp_admin_bar->menu->{"my-account-with-avatar"}["children"]->{"edit-profile"}["href"] = $lwp;
95
- /*
96
- Backward compatibility ( {"edit-my-profile"} ), prior to WordPress® 3.2. */
97
- if (isset ($wp_admin_bar->menu->{"my-account-with-avatar"}["children"]->{"edit-my-profile"}["href"]))
98
- $wp_admin_bar->menu->{"my-account-with-avatar"}["children"]->{"edit-my-profile"}["href"] = $lwp;
99
- /*
100
- Backward compatibility ( ["children"]->{"dashboard"} ), prior to WordPress® 3.2. */
101
- if (isset ($wp_admin_bar->menu->{"my-account-with-avatar"}["children"]->{"dashboard"}))
102
- unset($wp_admin_bar->menu->{"my-account-with-avatar"}["children"]->{"dashboard"});
103
- }
104
- /**/
105
- if (isset ($wp_admin_bar->menu->{"dashboard"})) /* Dashboard menu, we don't need this. */
106
- unset($wp_admin_bar->menu->{"dashboard"}); /* Removes this entire menu from the bar. */
107
- /**/
108
- if (isset ($wp_admin_bar->menu->{"my-blogs"}["href"])) /* Deals with multiple Blog drop-down. */
109
- {
110
- $wp_admin_bar->menu->{"my-blogs"}["href"] = "#"; /* Void this link out by converting to `#`. */
111
- /**/
112
- if (isset ($wp_admin_bar->menu->{"my-blogs"}["children"]) && is_object ($wp_admin_bar->menu->{"my-blogs"}["children"]))
113
- foreach ($wp_admin_bar->menu->{"my-blogs"}["children"] as &$blog) /* Modify other Blog links in drop-down. */
114
- if (is_array ($blog) && isset ($blog["href"], $blog["children"]) && is_object ($blog["children"]))
115
- {
116
- $blog["href"] = preg_replace ("/\/wp-admin/", "", $blog["href"]);
117
- unset($blog["children"]); /* Cause all we need is the link. */
118
- }
119
- }
120
- }
121
  /**/
122
  do_action ("ws_plugin__s2member_after_filter_admin_menu_bar", get_defined_vars ());
123
  /**/
41
  {
42
  do_action ("ws_plugin__s2member_before_admin_lockouts", get_defined_vars ());
43
  /**/
44
+ if (!current_user_can ("edit_posts") && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["force_admin_lockouts"] && apply_filters ("ws_plugin__s2member_admin_lockout", true, get_defined_vars ()))
45
+ {
46
+ if ($redirection_url = c_ws_plugin__s2member_login_redirects::login_redirection_url ())
47
+ wp_redirect($redirection_url); /* Special Redirection. */
48
+ /**/
49
+ else /* Else we use the Login Welcome Page configured for s2Member. */
50
+ wp_redirect(get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"]));
51
+ /**/
52
+ exit (); /* Clean exit. */
53
+ }
 
 
 
54
  /**/
55
  do_action ("ws_plugin__s2member_after_admin_lockouts", get_defined_vars ());
56
  /**/
69
  */
70
  public static function filter_admin_menu_bar (&$wp_admin_bar = FALSE)
71
  {
72
+ global $current_site, $current_blog; /* In support of Multisite Networking. */
73
+ /**/
74
  do_action ("ws_plugin__s2member_before_filter_admin_menu_bar", get_defined_vars ());
75
  /**/
76
+ if (is_object ($wp_admin_bar) && !current_user_can ("edit_posts"))
77
+ {
78
+ if (isset ($wp_admin_bar->menu->{"dashboard"})) /* We don't need this. */
79
+ unset($wp_admin_bar->menu->{"dashboard"}); /* Remove this entire menu. */
80
+ /**/
81
+ if (is_multisite () && !c_ws_plugin__s2member_utils_conds::is_multisite_farm () && isset ($wp_admin_bar->menu->{"my-blogs"}))
82
+ {
83
+ $wp_admin_bar->menu->{"my-blogs"}["href"] = "#"; /* Void this link out by converting to `#`. */
84
+ /**/
85
+ if (isset ($wp_admin_bar->menu->{"my-blogs"}["children"]) && is_object ($wp_admin_bar->menu->{"my-blogs"}["children"]))
86
+ foreach ($wp_admin_bar->menu->{"my-blogs"}["children"] as &$blog) /* Modify other Blog links in drop-down. */
87
+ if (is_array ($blog) && isset ($blog["href"], $blog["children"]) && is_object ($blog["children"]))
88
+ {
89
+ $blog["href"] = preg_replace ("/\/wp-admin/", "", $blog["href"]);
90
+ unset($blog["children"]); /* Cause all we need is the link. */
91
+ }
92
+ }
93
+ /**/
94
+ if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["force_admin_lockouts"] && apply_filters ("ws_plugin__s2member_admin_lockout", true, get_defined_vars ()))
95
+ {
96
+ $lwp = c_ws_plugin__s2member_login_redirects::login_redirection_url ($user);
97
+ $lwp = (!$lwp) ? get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"]) : $lwp;
98
+ /**/
99
+ if (isset ($wp_admin_bar->menu->{"my-account-with-avatar"})) /* Profile. */
100
+ {
101
+ if (isset ($wp_admin_bar->menu->{"my-account-with-avatar"}["href"]))
102
+ $wp_admin_bar->menu->{"my-account-with-avatar"}["href"] = $lwp;
103
+ /**/
104
+ if (isset ($wp_admin_bar->menu->{"my-account-with-avatar"}["children"]->{"edit-profile"}["href"]))
105
+ $wp_admin_bar->menu->{"my-account-with-avatar"}["children"]->{"edit-profile"}["href"] = $lwp;
106
+ }
107
+ }
108
+ }
 
 
 
 
 
 
 
 
 
 
 
109
  /**/
110
  do_action ("ws_plugin__s2member_after_filter_admin_menu_bar", get_defined_vars ());
111
  /**/
includes/classes/brute-force.inc.php CHANGED
@@ -90,7 +90,7 @@ if (!class_exists ("c_ws_plugin__s2member_brute_force"))
90
  /**/
91
  if ((int)get_transient ("s2m_ipr_" . md5 ("s2member_transient_failed_login_attempts_" . $_SERVER["REMOTE_ADDR"])) > $max)
92
  {
93
- $errors = new WP_Error ("incorrect_password", "Max failed logins. Please wait " . $about . " and try again.");
94
  /**/
95
  eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
96
  do_action ("ws_plugin__s2member_during_stop_brute_force_logins", get_defined_vars ());
90
  /**/
91
  if ((int)get_transient ("s2m_ipr_" . md5 ("s2member_transient_failed_login_attempts_" . $_SERVER["REMOTE_ADDR"])) > $max)
92
  {
93
+ $errors = new WP_Error ("incorrect_password", sprintf (_x ("Max failed logins. Please wait %s and try again.", "s2member-front", "s2member"), $about));
94
  /**/
95
  eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
96
  do_action ("ws_plugin__s2member_during_stop_brute_force_logins", get_defined_vars ());
includes/classes/css-js-in.inc.php CHANGED
@@ -43,12 +43,17 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
43
  /**/
44
  if (!empty ($_GET["ws_plugin__s2member_css"]))
45
  {
 
 
 
46
  header("Content-Type: text/css; charset=utf-8");
47
  header("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("+1 week")) . " GMT");
48
  header("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
49
  header("Cache-Control: max-age=604800");
50
  header("Pragma: public");
51
  /**/
 
 
52
  $u = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"];
53
  $i = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images";
54
  /**/
@@ -81,13 +86,22 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
81
  /**/
82
  if (!empty ($_GET["ws_plugin__s2member_js_w_globals"]))
83
  {
 
 
 
84
  header("Content-Type: text/javascript; charset=utf-8");
85
  header("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("+1 week")) . " GMT");
86
  header("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
87
  header("Cache-Control: max-age=604800");
88
  header("Pragma: public");
89
  /**/
90
- echo "var S2MEMBER_VERSION = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_VERSION) . "',";
 
 
 
 
 
 
91
  /**/
92
  echo "S2MEMBER_CURRENT_USER_LOGIN_COUNTER = " . S2MEMBER_CURRENT_USER_LOGIN_COUNTER . ",";
93
  /**/
@@ -95,12 +109,12 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
95
  echo "S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER = " . ((S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER) ? "true" : "false") . ",";
96
  /**/
97
  echo "S2MEMBER_CURRENT_USER_ACCESS_LEVEL = " . S2MEMBER_CURRENT_USER_ACCESS_LEVEL . ",";
98
- echo "S2MEMBER_CURRENT_USER_ACCESS_LABEL = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_ACCESS_LABEL) . "',";
99
  /**/
100
- echo "S2MEMBER_CURRENT_USER_SUBSCR_ID = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_SUBSCR_ID) . "',";
101
- echo "S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID) . "',";
102
- echo "S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY) . "',";
103
- echo "S2MEMBER_CURRENT_USER_CUSTOM = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_CUSTOM) . "',";
104
  /**/
105
  echo "S2MEMBER_CURRENT_USER_REGISTRATION_TIME = " . S2MEMBER_CURRENT_USER_REGISTRATION_TIME . ",";
106
  echo "S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME = " . S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME . ",";
@@ -108,14 +122,14 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
108
  echo "S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS = " . S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS . ",";
109
  echo "S2MEMBER_CURRENT_USER_REGISTRATION_DAYS = " . S2MEMBER_CURRENT_USER_REGISTRATION_DAYS . ",";
110
  /**/
111
- echo "S2MEMBER_CURRENT_USER_DISPLAY_NAME = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_DISPLAY_NAME) . "',";
112
- echo "S2MEMBER_CURRENT_USER_FIRST_NAME = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_FIRST_NAME) . "',";
113
- echo "S2MEMBER_CURRENT_USER_LAST_NAME = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_LAST_NAME) . "',";
114
  /**/
115
- echo "S2MEMBER_CURRENT_USER_LOGIN = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_LOGIN) . "',";
116
- echo "S2MEMBER_CURRENT_USER_EMAIL = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_EMAIL) . "',";
117
- echo "S2MEMBER_CURRENT_USER_IP = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_IP) . "',";
118
- echo "S2MEMBER_CURRENT_USER_REGISTRATION_IP = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_REGISTRATION_IP) . "',";
119
  /**/
120
  echo "S2MEMBER_CURRENT_USER_ID = " . S2MEMBER_CURRENT_USER_ID . ",";
121
  echo "S2MEMBER_CURRENT_USER_FIELDS = " . S2MEMBER_CURRENT_USER_FIELDS . ",";
@@ -129,17 +143,17 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
129
  echo "S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID = " . S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID . ",";
130
  echo "S2MEMBER_LOGIN_WELCOME_PAGE_ID = " . S2MEMBER_LOGIN_WELCOME_PAGE_ID . ",";
131
  /**/
132
- echo "S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL) . "',";
133
- echo "S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL) . "',";
134
- echo "S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL) . "',";
135
- echo "S2MEMBER_LOGIN_WELCOME_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_LOGIN_WELCOME_PAGE_URL) . "',";
136
- echo "S2MEMBER_LOGOUT_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_LOGOUT_PAGE_URL) . "',";
137
- echo "S2MEMBER_LOGIN_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_LOGIN_PAGE_URL) . "',";
138
  /**/
139
  for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
140
  {
141
  if (defined (($S2MEMBER_LEVELn_LABEL = "S2MEMBER_LEVEL" . $n . "_LABEL")))
142
- echo $S2MEMBER_LEVELn_LABEL . " = '" . c_ws_plugin__s2member_utils_strings::esc_sq (constant ($S2MEMBER_LEVELn_LABEL)) . "',";
143
  }
144
  /**/
145
  for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
@@ -154,30 +168,32 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
154
  echo $S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS . " = " . constant ($S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS) . ",";
155
  }
156
  /**/
157
- echo "S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS) . "',";
158
  /**/
159
- echo "S2MEMBER_REG_EMAIL_FROM_NAME = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_REG_EMAIL_FROM_NAME) . "',";
160
- echo "S2MEMBER_REG_EMAIL_FROM_EMAIL = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_REG_EMAIL_FROM_EMAIL) . "',";
161
  /**/
162
- echo "S2MEMBER_PAYPAL_NOTIFY_URL = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_PAYPAL_NOTIFY_URL) . "',";
163
- echo "S2MEMBER_PAYPAL_RETURN_URL = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_PAYPAL_RETURN_URL) . "',";
164
  /**/
165
- echo "S2MEMBER_PAYPAL_BUSINESS = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_PAYPAL_BUSINESS) . "',";
166
- echo "S2MEMBER_PAYPAL_ENDPOINT = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_PAYPAL_ENDPOINT) . "',";
167
- echo "S2MEMBER_PAYPAL_API_ENDPOINT = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_PAYPAL_API_ENDPOINT) . "',";
168
  /**/
169
- echo "S2MEMBER_VALUE_FOR_PP_INV = Math.round (new Date ().getTime ()) + '~" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_IP) . "',";
170
  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; },";
171
  /**/
172
- echo "S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0 = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0) . "',";
173
- echo "S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0 = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0) . "',";
174
  /**/
175
- echo "S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1 = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1) . "',";
176
- echo "S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1 = '" . c_ws_plugin__s2member_utils_strings::esc_sq (S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1) . "';";
177
  /**/
178
  $u = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"];
179
  $i = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images";
180
  /**/
 
 
181
  include_once dirname (dirname (__FILE__)) . "/s2member-min.js";
182
  /**/
183
  do_action ("ws_plugin__s2member_during_js_w_globals", get_defined_vars ());
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
  /**/
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
+ /**/
102
+ echo "\n"; /* Add a line break before writing JavaScript Globals to file. */
103
+ /**/
104
+ echo "var S2MEMBER_VERSION = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_VERSION) . "',";
105
  /**/
106
  echo "S2MEMBER_CURRENT_USER_LOGIN_COUNTER = " . S2MEMBER_CURRENT_USER_LOGIN_COUNTER . ",";
107
  /**/
109
  echo "S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER = " . ((S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER) ? "true" : "false") . ",";
110
  /**/
111
  echo "S2MEMBER_CURRENT_USER_ACCESS_LEVEL = " . S2MEMBER_CURRENT_USER_ACCESS_LEVEL . ",";
112
+ echo "S2MEMBER_CURRENT_USER_ACCESS_LABEL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_ACCESS_LABEL) . "',";
113
  /**/
114
+ echo "S2MEMBER_CURRENT_USER_SUBSCR_ID = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_SUBSCR_ID) . "',";
115
+ echo "S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_SUBSCR_OR_WP_ID) . "',";
116
+ echo "S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_SUBSCR_GATEWAY) . "',";
117
+ echo "S2MEMBER_CURRENT_USER_CUSTOM = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_CUSTOM) . "',";
118
  /**/
119
  echo "S2MEMBER_CURRENT_USER_REGISTRATION_TIME = " . S2MEMBER_CURRENT_USER_REGISTRATION_TIME . ",";
120
  echo "S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME = " . S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME . ",";
122
  echo "S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS = " . S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS . ",";
123
  echo "S2MEMBER_CURRENT_USER_REGISTRATION_DAYS = " . S2MEMBER_CURRENT_USER_REGISTRATION_DAYS . ",";
124
  /**/
125
+ echo "S2MEMBER_CURRENT_USER_DISPLAY_NAME = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_DISPLAY_NAME) . "',";
126
+ echo "S2MEMBER_CURRENT_USER_FIRST_NAME = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_FIRST_NAME) . "',";
127
+ echo "S2MEMBER_CURRENT_USER_LAST_NAME = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_LAST_NAME) . "',";
128
  /**/
129
+ echo "S2MEMBER_CURRENT_USER_LOGIN = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_LOGIN) . "',";
130
+ echo "S2MEMBER_CURRENT_USER_EMAIL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_EMAIL) . "',";
131
+ echo "S2MEMBER_CURRENT_USER_IP = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_IP) . "',";
132
+ echo "S2MEMBER_CURRENT_USER_REGISTRATION_IP = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_REGISTRATION_IP) . "',";
133
  /**/
134
  echo "S2MEMBER_CURRENT_USER_ID = " . S2MEMBER_CURRENT_USER_ID . ",";
135
  echo "S2MEMBER_CURRENT_USER_FIELDS = " . S2MEMBER_CURRENT_USER_FIELDS . ",";
143
  echo "S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID = " . S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_ID . ",";
144
  echo "S2MEMBER_LOGIN_WELCOME_PAGE_ID = " . S2MEMBER_LOGIN_WELCOME_PAGE_ID . ",";
145
  /**/
146
+ echo "S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL) . "',";
147
+ echo "S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_FILE_DOWNLOAD_LIMIT_EXCEEDED_PAGE_URL) . "',";
148
+ echo "S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL) . "',";
149
+ echo "S2MEMBER_LOGIN_WELCOME_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_LOGIN_WELCOME_PAGE_URL) . "',";
150
+ echo "S2MEMBER_LOGOUT_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_LOGOUT_PAGE_URL) . "',";
151
+ echo "S2MEMBER_LOGIN_PAGE_URL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_LOGIN_PAGE_URL) . "',";
152
  /**/
153
  for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
154
  {
155
  if (defined (($S2MEMBER_LEVELn_LABEL = "S2MEMBER_LEVEL" . $n . "_LABEL")))
156
+ echo $S2MEMBER_LEVELn_LABEL . " = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (constant ($S2MEMBER_LEVELn_LABEL)) . "',";
157
  }
158
  /**/
159
  for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
168
  echo $S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS . " = " . constant ($S2MEMBER_LEVELn_FILE_DOWNLOADS_ALLOWED_DAYS) . ",";
169
  }
170
  /**/
171
+ echo "S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_FILE_DOWNLOAD_INLINE_EXTENSIONS) . "',";
172
  /**/
173
+ echo "S2MEMBER_REG_EMAIL_FROM_NAME = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_REG_EMAIL_FROM_NAME) . "',";
174
+ echo "S2MEMBER_REG_EMAIL_FROM_EMAIL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_REG_EMAIL_FROM_EMAIL) . "',";
175
  /**/
176
+ echo "S2MEMBER_PAYPAL_NOTIFY_URL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_PAYPAL_NOTIFY_URL) . "',";
177
+ echo "S2MEMBER_PAYPAL_RETURN_URL = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_PAYPAL_RETURN_URL) . "',";
178
  /**/
179
+ echo "S2MEMBER_PAYPAL_BUSINESS = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_PAYPAL_BUSINESS) . "',";
180
+ echo "S2MEMBER_PAYPAL_ENDPOINT = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_PAYPAL_ENDPOINT) . "',";
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) . "',";
188
  /**/
189
+ echo "S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1 = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1) . "',";
190
+ echo "S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1 = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1) . "';";
191
  /**/
192
  $u = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"];
193
  $i = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images";
194
  /**/
195
+ echo "\n"; /* Add a line break before inclusion. */
196
+ /**/
197
  include_once dirname (dirname (__FILE__)) . "/s2member-min.js";
198
  /**/
199
  do_action ("ws_plugin__s2member_during_js_w_globals", get_defined_vars ());
includes/classes/css-js-themes.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_themes"))
21
  {
@@ -43,7 +43,9 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_themes"))
43
  /**/
44
  if (!is_admin ()) /* Not in the admin. */
45
  {
46
- wp_enqueue_style ("ws-plugin--s2member", site_url ("/?ws_plugin__s2member_css=1&qcABC=1"), array (), c_ws_plugin__s2member_utilities::ver_checksum (), "all");
 
 
47
  /**/
48
  do_action ("ws_plugin__s2member_during_add_css", get_defined_vars ());
49
  }
@@ -72,16 +74,18 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_themes"))
72
  /**/
73
  if (!is_admin () || (is_user_admin () && $pagenow === "profile.php" && !current_user_can ("edit_users")))
74
  {
 
 
75
  if (is_user_logged_in ()) /* Separate version for logged-in Users/Members. */
76
  {
77
  $md5 = WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5; /* An MD5 hash based on global key => values. */
78
  /* The MD5 hash allows the script to be cached in the browser until the globals happen to change. */
79
  /* For instance, the global variables may change when a User who is logged-in changes their Profile. */
80
- wp_enqueue_script ("ws-plugin--s2member", site_url ("/?ws_plugin__s2member_js_w_globals=" . urlencode ($md5) . "&qcABC=1"), array ("jquery", "password-strength-meter"), c_ws_plugin__s2member_utilities::ver_checksum ());
81
  }
82
  else /* Else if they are not logged in, we distinguish the JavaScript file by NOT including $md5. */
83
  { /* This essentially creates 2 versions of the script. One while logged in & another when not. */
84
- wp_enqueue_script ("ws-plugin--s2member", site_url ("/?ws_plugin__s2member_js_w_globals=1&qcABC=1"), array ("jquery", "password-strength-meter"), c_ws_plugin__s2member_utilities::ver_checksum ());
85
  }
86
  /**/
87
  do_action ("ws_plugin__s2member_during_add_js_w_globals", 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_css_js_themes"))
21
  {
43
  /**/
44
  if (!is_admin ()) /* Not in the admin. */
45
  {
46
+ $s2o = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["s2o_url"]; /* Loads s2Member only. */
47
+ /**/
48
+ wp_enqueue_style ("ws-plugin--s2member", $s2o . "/?ws_plugin__s2member_css=1&qcABC=1", array (), c_ws_plugin__s2member_utilities::ver_checksum (), "all");
49
  /**/
50
  do_action ("ws_plugin__s2member_during_add_css", get_defined_vars ());
51
  }
74
  /**/
75
  if (!is_admin () || (is_user_admin () && $pagenow === "profile.php" && !current_user_can ("edit_users")))
76
  {
77
+ $s2o = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["s2o_url"]; /* Loads s2Member only. */
78
+ /**/
79
  if (is_user_logged_in ()) /* Separate version for logged-in Users/Members. */
80
  {
81
  $md5 = WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5; /* An MD5 hash based on global key => values. */
82
  /* The MD5 hash allows the script to be cached in the browser until the globals happen to change. */
83
  /* For instance, the global variables may change when a User who is logged-in changes their Profile. */
84
+ wp_enqueue_script ("ws-plugin--s2member", $s2o . "/?ws_plugin__s2member_js_w_globals=" . urlencode ($md5) . "&qcABC=1", array ("jquery", "password-strength-meter"), c_ws_plugin__s2member_utilities::ver_checksum ());
85
  }
86
  else /* Else if they are not logged in, we distinguish the JavaScript file by NOT including $md5. */
87
  { /* This essentially creates 2 versions of the script. One while logged in & another when not. */
88
+ wp_enqueue_script ("ws-plugin--s2member", $s2o . "/?ws_plugin__s2member_js_w_globals=1&qcABC=1", array ("jquery", "password-strength-meter"), c_ws_plugin__s2member_utilities::ver_checksum ());
89
  }
90
  /**/
91
  do_action ("ws_plugin__s2member_during_add_js_w_globals", get_defined_vars ());
includes/classes/custom-reg-fields.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_custom_reg_fields"))
21
  {
@@ -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
  /**/
@@ -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,27 +330,27 @@ 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
  /**/
337
- echo '<label for="ws-plugin--s2member-custom-reg-field-first-name">First Name *</label>' . "\n";
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
  /**/
349
- echo '<label for="ws-plugin--s2member-custom-reg-field-last-name">Last Name *</label>' . "\n";
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,32 +436,32 @@ 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
  /**/
449
  echo '<p>' . "\n";
450
  /**/
451
- echo '<label for="ws-plugin--s2member-custom-reg-field-user-pass1" title="Please type your Password twice to confirm.">' . "\n";
452
- echo '<span>Password ( please type it twice ) *</span><br />' . "\n";
453
  echo '<input aria-required="true" type="password" maxlength="100" autocomplete="off" name="ws_plugin__s2member_custom_reg_field_user_pass1" id="ws-plugin--s2member-custom-reg-field-user-pass1" class="ws-plugin--s2member-custom-reg-field" value="' . format_to_edit ($_p["ws_plugin__s2member_custom_reg_field_user_pass1"]) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
454
  echo '</label>' . "\n";
455
  /**/
456
- echo '<label for="ws-plugin--s2member-custom-reg-field-user-pass2" title="Please type your Password twice to confirm.">' . "\n";
457
  echo '<input type="password" maxlength="100" autocomplete="off" name="ws_plugin__s2member_custom_reg_field_user_pass2" id="ws-plugin--s2member-custom-reg-field-user-pass2" class="ws-plugin--s2member-custom-reg-field" value="' . format_to_edit ($_p["ws_plugin__s2member_custom_reg_field_user_pass2"]) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
458
  echo '</label>' . "\n";
459
  /**/
460
- echo '<div id="ws-plugin--s2member-custom-reg-field-user-pass-strength" class="ws-plugin--s2member-password-strength"><em>password strength indicator</em></div>' . "\n";
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,73 +470,77 @@ 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
  /**/
477
  echo '<p>' . "\n";
478
  echo '<label for="ws-plugin--s2member-custom-reg-field-first-name">' . "\n";
479
- echo '<span>First Name *</span><br />' . "\n";
480
  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"]) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
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
  /**/
492
  echo '<p>' . "\n";
493
  echo '<label for="ws-plugin--s2member-custom-reg-field-last-name">' . "\n";
494
- echo '<span>Last Name *</span><br />' . "\n";
495
  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"]) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
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
  }
503
  /**/
504
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"])
505
  if ($fields_applicable = c_ws_plugin__s2member_custom_reg_fields::custom_fields_configured_at_level ("auto-detection", "registration"))
506
- foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
507
- {
508
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
509
- do_action ("ws_plugin__s2member_during_custom_registration_fields_before_custom_fields", get_defined_vars ());
510
- unset ($__refs, $__v); /* Unset defined __refs, __v. */
511
- /**/
512
- if (in_array ($field["id"], $fields_applicable)) /* Field applicable? */
513
- {
514
- $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
515
- $field_id_class = preg_replace ("/_/", "-", $field_var);
516
- /**/
517
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
518
- if (apply_filters ("ws_plugin__s2member_during_custom_registration_fields_during_custom_fields_display", true, get_defined_vars ()))
519
- {
520
- if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
521
- echo '<div class="ws-plugin--s2member-custom-reg-field-divider-section' . ((!empty ($field["sectitle"])) ? '-title' : '') . '">' . ((!empty ($field["sectitle"])) ? $field["sectitle"] : '') . '</div>';
522
- /**/
523
- echo '<p>' . "\n";
524
- echo '<label for="ws-plugin--s2member-custom-reg-field-' . esc_attr ($field_id_class) . '">' . "\n";
525
- echo '<span' . ((preg_match ("/^(checkbox|pre_checkbox)$/", $field["type"])) ? ' style="display:none;"' : '') . '>' . $field["label"] . (($field["required"] === "yes") ? ' *' : '') . '</span></label>' . ((preg_match ("/^(checkbox|pre_checkbox)$/", $field["type"])) ? '' : '<br />') . "\n";
526
- echo c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (__FUNCTION__, $field, "ws_plugin__s2member_custom_reg_field_", "ws-plugin--s2member-custom-reg-field-", "ws-plugin--s2member-custom-reg-field", "", ($tabindex = $tabindex + 10), "", $_p, $_p["ws_plugin__s2member_custom_reg_field_" . $field_var], "registration");
527
- echo '</p>' . "\n";
528
- }
529
- unset ($__refs, $__v); /* Unset defined __refs, __v. */
530
- }
531
- /**/
532
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
533
- do_action ("ws_plugin__s2member_during_custom_registration_fields_after_custom_fields", get_defined_vars ());
534
- unset ($__refs, $__v); /* Unset defined __refs, __v. */
535
- }
 
 
 
 
536
  /**/
537
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"] && c_ws_plugin__s2member_list_servers::list_servers_integrated ())
538
  {
539
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
540
  do_action ("ws_plugin__s2member_during_custom_registration_fields_before_opt_in", get_defined_vars ());
541
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
542
  /**/
@@ -547,16 +551,16 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
547
  echo '</label>' . "\n";
548
  echo '</p>' . "\n";
549
  /**/
550
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
551
  do_action ("ws_plugin__s2member_during_custom_registration_fields_after_opt_in", get_defined_vars ());
552
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
553
  }
554
  /**/
555
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
556
  do_action ("ws_plugin__s2member_during_custom_registration_fields_after", get_defined_vars ());
557
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
558
  /**/
559
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
560
  do_action ("ws_plugin__s2member_after_custom_registration_fields", get_defined_vars ());
561
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
562
  /**/
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
  {
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
  /**/
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
  /**/
337
+ echo '<label for="ws-plugin--s2member-custom-reg-field-first-name">' . _x ("First Name", "s2member-front", "s2member") . ' *</label>' . "\n";
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
  /**/
349
+ echo '<label for="ws-plugin--s2member-custom-reg-field-last-name">' . _x ("Last Name", "s2member-front", "s2member") . ' *</label>' . "\n";
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
  /**/
449
  echo '<p>' . "\n";
450
  /**/
451
+ echo '<label for="ws-plugin--s2member-custom-reg-field-user-pass1" title="' . esc_attr (_x ("Please type your Password twice to confirm.", "s2member-front", "s2member")) . '">' . "\n";
452
+ echo '<span>' . _x ("Password ( please type it twice )", "s2member-front", "s2member") . ' *</span><br />' . "\n";
453
  echo '<input aria-required="true" type="password" maxlength="100" autocomplete="off" name="ws_plugin__s2member_custom_reg_field_user_pass1" id="ws-plugin--s2member-custom-reg-field-user-pass1" class="ws-plugin--s2member-custom-reg-field" value="' . format_to_edit ($_p["ws_plugin__s2member_custom_reg_field_user_pass1"]) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
454
  echo '</label>' . "\n";
455
  /**/
456
+ echo '<label for="ws-plugin--s2member-custom-reg-field-user-pass2" title="' . esc_attr (_x ("Please type your Password twice to confirm.", "s2member-front", "s2member")) . '">' . "\n";
457
  echo '<input type="password" maxlength="100" autocomplete="off" name="ws_plugin__s2member_custom_reg_field_user_pass2" id="ws-plugin--s2member-custom-reg-field-user-pass2" class="ws-plugin--s2member-custom-reg-field" value="' . format_to_edit ($_p["ws_plugin__s2member_custom_reg_field_user_pass2"]) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
458
  echo '</label>' . "\n";
459
  /**/
460
+ echo '<div id="ws-plugin--s2member-custom-reg-field-user-pass-strength" class="ws-plugin--s2member-password-strength"><em>' . _x ("password strength indicator", "s2member-front", "s2member") . '</em></div>' . "\n";
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
  /**/
477
  echo '<p>' . "\n";
478
  echo '<label for="ws-plugin--s2member-custom-reg-field-first-name">' . "\n";
479
+ echo '<span>' . _x ("First Name", "s2member-front", "s2member") . ' *</span><br />' . "\n";
480
  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"]) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
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
  /**/
492
  echo '<p>' . "\n";
493
  echo '<label for="ws-plugin--s2member-custom-reg-field-last-name">' . "\n";
494
+ echo '<span>' . _x ("Last Name", "s2member-front", "s2member") . ' *</span><br />' . "\n";
495
  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"]) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
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
  }
503
  /**/
504
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"])
505
  if ($fields_applicable = c_ws_plugin__s2member_custom_reg_fields::custom_fields_configured_at_level ("auto-detection", "registration"))
506
+ {
507
+ $tabindex = $tabindex + 9; /* Start tabindex at +9 ( +1 below ). */
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
+ /**/
515
+ if (in_array ($field["id"], $fields_applicable)) /* Field applicable? */
516
+ {
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? */
524
+ echo '<div class="ws-plugin--s2member-custom-reg-field-divider-section' . ((!empty ($field["sectitle"])) ? '-title' : '') . '">' . ((!empty ($field["sectitle"])) ? $field["sectitle"] : '') . '</div>';
525
+ /**/
526
+ echo '<p>' . "\n";
527
+ echo '<label for="ws-plugin--s2member-custom-reg-field-' . esc_attr ($field_id_class) . '">' . "\n";
528
+ echo '<span' . ((preg_match ("/^(checkbox|pre_checkbox)$/", $field["type"])) ? ' style="display:none;"' : '') . '>' . $field["label"] . (($field["required"] === "yes") ? ' *' : '') . '</span></label>' . ((preg_match ("/^(checkbox|pre_checkbox)$/", $field["type"])) ? '' : '<br />') . "\n";
529
+ echo c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (__FUNCTION__, $field, "ws_plugin__s2member_custom_reg_field_", "ws-plugin--s2member-custom-reg-field-", "ws-plugin--s2member-custom-reg-field", "", ($tabindex = $tabindex + 1), "", $_p, $_p["ws_plugin__s2member_custom_reg_field_" . $field_var], "registration");
530
+ echo '</p>' . "\n";
531
+ }
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
+ }
539
+ }
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
@@ -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_email_configs"))
21
  {
@@ -143,7 +143,7 @@ if (!class_exists ("c_ws_plugin__s2member_email_configs"))
143
  remove_filter ("wp_mail_from_name", "c_ws_plugin__s2member_email_configs::_email_config_name");
144
  /**/
145
  if ($all) /* If $all is true, then we remove all attached WordPress® Filters. */
146
- remove_all_filters ("wp_mail_from") . remove_all_filters ("wp_mail_from_name");
147
  /**/
148
  do_action ("ws_plugin__s2member_after_email_config_release", get_defined_vars ());
149
  /**/
@@ -164,11 +164,11 @@ if (!class_exists ("c_ws_plugin__s2member_email_configs"))
164
  */
165
  public static function ms_nice_email_roles ($message = FALSE)
166
  {
167
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
168
  do_action ("ws_plugin__s2member_before_ms_nice_email_roles", get_defined_vars ());
169
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
170
  /**/
171
- $message = preg_replace ("/ as a (subscriber|s2member_level[0-9]+)/i", " as a Member", $message);
172
  /**/
173
  return apply_filters ("ws_plugin__s2member_ms_nice_email_roles", $message, get_defined_vars ());
174
  }
@@ -186,7 +186,7 @@ if (!class_exists ("c_ws_plugin__s2member_email_configs"))
186
  */
187
  public static function new_user_notification ($user_id = FALSE, $user_pass = FALSE, $notify = array ("user", "admin"))
188
  {
189
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
190
  do_action ("ws_plugin__s2member_before_new_user_notification", get_defined_vars ());
191
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
192
  /**/
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_email_configs"))
21
  {
143
  remove_filter ("wp_mail_from_name", "c_ws_plugin__s2member_email_configs::_email_config_name");
144
  /**/
145
  if ($all) /* If $all is true, then we remove all attached WordPress® Filters. */
146
+ remove_all_filters("wp_mail_from") . remove_all_filters ("wp_mail_from_name");
147
  /**/
148
  do_action ("ws_plugin__s2member_after_email_config_release", get_defined_vars ());
149
  /**/
164
  */
165
  public static function ms_nice_email_roles ($message = FALSE)
166
  {
167
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
168
  do_action ("ws_plugin__s2member_before_ms_nice_email_roles", get_defined_vars ());
169
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
170
  /**/
171
+ $message = preg_replace ("/ as a (subscriber|s2member_level[0-9]+)/i", " " . _x ("as a Member", "s2member-front", "s2member"), $message);
172
  /**/
173
  return apply_filters ("ws_plugin__s2member_ms_nice_email_roles", $message, get_defined_vars ());
174
  }
186
  */
187
  public static function new_user_notification ($user_id = FALSE, $user_pass = FALSE, $notify = array ("user", "admin"))
188
  {
189
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
190
  do_action ("ws_plugin__s2member_before_new_user_notification", get_defined_vars ());
191
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
192
  /**/
includes/classes/files-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_files_in"))
21
  {
@@ -41,205 +41,196 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
41
  {
42
  do_action ("ws_plugin__s2member_before_file_download_access", get_defined_vars ());
43
  /**/
44
- if (!empty ($_GET["s2member_file_download"]) && strpos ($_GET["s2member_file_download"], "..") === false)
45
- {
46
- $excluded = apply_filters ("ws_plugin__s2member_check_file_download_access_excluded", false, get_defined_vars ());
47
- /**/
48
- if (!($using_amazon_s3_storage = 0) && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_access_key"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_secret_key"])
49
- $using_amazon_s3_storage = true; /* Amazon® S3 storage has been configured! */
50
- /**/
51
- if (!$excluded && (empty ($_GET["s2member_file_download_key"]) || (!empty ($_GET["s2member_file_download_key"]) && !($file_download_key_is_valid = ($_GET["s2member_file_download_key"] === c_ws_plugin__s2member_files::file_download_key ($_GET["s2member_file_download"]) || $_GET["s2member_file_download_key"] === c_ws_plugin__s2member_files::file_download_key ($_GET["s2member_file_download"], "ip-forever") || $_GET["s2member_file_download_key"] === c_ws_plugin__s2member_files::file_download_key ($_GET["s2member_file_download"], "universal"))))))
52
  {
53
- $_GET["s2member_file_download"] = trim ($_GET["s2member_file_download"], "/"); /* Trim slashes after Key comparison. */
54
  /**/
55
- if (!$using_amazon_s3_storage && !file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $_GET["s2member_file_download"]))
56
- {
57
- header ("HTTP/1.0 404 Not Found"); /* The file does NOT even exist. */
58
- exit ("404: Sorry, file not found. Please contact Support for assistance.");
59
- }
60
  /**/
61
- else if (!empty ($_GET["s2member_file_download_key"]) && !$file_download_key_is_valid) /* Invalid Key? */
62
- {
63
- header ("HTTP/1.0 503 Service Temporarily Unavailable"); /* Invalid Download Keys are handled separately. */
64
- exit ("503 ( Invalid Key ): Sorry, your access to this file has expired. Please contact Support for assistance.");
65
- }
66
  /**/
67
- else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"]) /* Is a Membership Options Page configured? */
68
- /* This file will be processed WITHOUT a Download Key, using Membership Level Access ( w/ possible Custom Capabilities ). */
69
  {
70
- if (!has_filter ("ws_plugin__s2member_check_file_download_access_user", "c_ws_plugin__s2member_files_in::_file_remote_authorization"))
71
- add_filter ("ws_plugin__s2member_check_file_download_access_user", "c_ws_plugin__s2member_files_in::_file_remote_authorization", 10, 2);
72
  /**/
73
- if (($file_download_access_is_allowed = $min_level_4_downloads = c_ws_plugin__s2member_files::min_level_4_downloads ()) === false)
74
  {
75
- header ("HTTP/1.0 503 Service Temporarily Unavailable"); /* File downloads are NOT yet configured? */
76
- exit ("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`.");
77
  }
78
  /**/
79
- 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 ())) || !($user_id = $user->ID))
80
  {
81
- if (preg_match ("/^access[_\-]s2member[_\-]level([0-9]+)\//", $_GET["s2member_file_download"], $m))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  {
83
  $level_req = $m[1]; /* Which Level does this require? */
84
- if (wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $_GET["s2member_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 ())) !== "nill")
 
85
  exit ();
86
  }
 
87
  else if (preg_match ("/^access[_\-]s2member[_\-]ccap[_\-](.+?)\//", $_GET["s2member_file_download"], $m))
88
  {
89
  $ccap_req = preg_replace ("/-/", "_", $m[1]); /* Which Capability does this require? */
90
- if (wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $_GET["s2member_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 ())) !== "nill")
 
91
  exit ();
92
  }
93
- else if (wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $_GET["s2member_file_download"], "s2member_level_req" => (string)$min_level_4_downloads)), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"])), apply_filters ("ws_plugin__s2member_content_redirect_status", 301, get_defined_vars ())) !== "nill")
94
- exit ();
95
- }
96
- /**/
97
- else if ((!is_array ($file_downloads = c_ws_plugin__s2member_files::user_downloads ($user)) || !$file_downloads["allowed"] || !$file_downloads["allowed_days"])/**/
98
- && wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $_GET["s2member_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 ())) !== "nill")
99
- exit ();
100
- /**/
101
- else if (preg_match ("/^access[_\-]s2member[_\-]level([0-9]+)\//", $_GET["s2member_file_download"], $m))
102
- {
103
- $level_req = $m[1]; /* Which Level does this require? */
104
- if (!$user->has_cap ("access_s2member_level" . $level_req) /* Does the User have access to this Level? */
105
- && wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $_GET["s2member_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 ())) !== "nill")
106
- exit ();
107
- }
108
- /**/
109
- else if (preg_match ("/^access[_\-]s2member[_\-]ccap[_\-](.+?)\//", $_GET["s2member_file_download"], $m))
110
- {
111
- $ccap_req = preg_replace ("/-/", "_", $m[1]); /* Which Capability does this require? */
112
- if (!$user->has_cap ("access_s2member_ccap_" . $ccap_req) /* Does the User have access to this Custom Capability? */
113
- && wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $_GET["s2member_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 ())) !== "nill")
114
- exit ();
115
- }
116
- /**/
117
- $already_downloaded = false; /* Initialize this to a false value. */
118
- $previous_file_downloads = 0; /* Here we're going to count how many downloads they've performed. */
119
- $max_days_logged = c_ws_plugin__s2member_files::max_download_period (); /* Longest period/days. */
120
- $file_download_access_log = (array)get_user_option ("s2member_file_download_access_log", $user_id);
121
- $file_download_access_arc = (array)get_user_option ("s2member_file_download_access_arc", $user_id);
122
- /**/
123
- foreach ($file_download_access_log as $file_download_access_log_entry_key => $file_download_access_log_entry)
124
- {
125
- if (strtotime ($file_download_access_log_entry["date"]) < strtotime ("-" . $max_days_logged . " days"))
126
- {
127
- unset ($file_download_access_log[$file_download_access_log_entry_key]);
128
- $file_download_access_arc[] = $file_download_access_log_entry;
129
- }
130
- else if (strtotime ($file_download_access_log_entry["date"]) >= strtotime ("-" . $file_downloads["allowed_days"] . " days"))
131
  {
132
- $previous_file_downloads++;
133
- if ($file_download_access_log_entry["file"] === $_GET["s2member_file_download"])
134
- $already_downloaded = true;
 
 
 
 
 
 
 
 
135
  }
 
 
 
 
 
 
 
 
 
 
136
  }
137
- /**/
138
- if (!$already_downloaded && $previous_file_downloads >= $file_downloads["allowed"] /* They have NOT already downloaded this file, and they're over their limit. */
139
- && wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $_GET["s2member_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 ())) !== "nill")
140
- exit ();
141
- /**/
142
- if (!$already_downloaded) /* Only add this file to the log if they have not already downloaded it. */
143
- $file_download_access_log[] = array ("date" => date ("Y-m-d"), "file" => $_GET["s2member_file_download"]);
144
- /**/
145
- update_user_option ($user_id, "s2member_file_download_access_arc", c_ws_plugin__s2member_utils_arrays::array_unique ($file_download_access_arc));
146
- update_user_option ($user_id, "s2member_file_download_access_log", c_ws_plugin__s2member_utils_arrays::array_unique ($file_download_access_log));
147
  }
148
- }
149
- else /* Otherwise... it's either $excluded; or permission was granted with a valid Download Key. */
150
- {
151
- $_GET["s2member_file_download"] = trim ($_GET["s2member_file_download"], "/");
152
- /**/
153
- if (!$using_amazon_s3_storage && !file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $_GET["s2member_file_download"]))
154
  {
155
- header ("HTTP/1.0 404 Not Found"); /* The file does NOT even exist. */
156
- exit ("404: Sorry, file not found. Please contact Support for assistance.");
 
 
 
 
157
  }
158
- }
159
- /*
160
- Here we are going to put together all of the File Download information.
161
- */
162
- $extension = strtolower (substr ($_GET["s2member_file_download"], strrpos ($_GET["s2member_file_download"], ".") + 1)); /* To lowercase. */
163
- /**/
164
- $mimetypes = parse_ini_file (dirname (dirname (dirname (__FILE__))) . "/includes/mime-types.ini"); /* Types provided by: `mime-types.ini`. */
165
- $mimetype = ($mimetypes[$extension]) ? $mimetypes[$extension] : "application/octet-stream"; /* Lookup the MIME type for this file extension. */
166
- /**/
167
- $inline = (!empty ($_GET["s2member_file_inline"]) || in_array ($extension, preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_inline_extensions"]))) ? true : false;
168
- /**/
169
- $basename = basename ($_GET["s2member_file_download"]); /* The actual name of this File Download ( i.e. the basename ); including its file extension too. */
170
- /**/
171
- $pathinfo = (!$using_amazon_s3_storage) ? pathinfo (($file = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $_GET["s2member_file_download"])) : array ();
172
- $length = (!$using_amazon_s3_storage && $file) ? filesize ($file) : -1; /* The overall file size, in bytes. */
173
- /**/
174
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
175
- do_action ("ws_plugin__s2member_during_file_download_access", get_defined_vars ());
176
- unset ($__refs, $__v); /* Unset defined __refs, __v. */
177
- /**/
178
- if ($using_amazon_s3_storage) /* Using Amazon® S3 storage? In this case, we use an authenticated redirection to S3 storage. */
179
- {
180
- $amazon_s3_file_expires = strtotime ("+" . apply_filters ("ws_plugin__s2member_amazon_s3_file_expires_time", "30 seconds", get_defined_vars ()));
181
- /**/
182
- $amazon_s3_file = "/" . $_GET["s2member_file_download"] . "?response-cache-control=" . urlencode (($amazon_s3_cache_control = "no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0")) . "&response-content-disposition=" . urlencode (($amazon_s3_content_disposition = (($inline) ? "inline" : "attachment") . '; filename="' . $basename . '"')) . "&response-content-type=" . urlencode (($amazon_s3_content_type = $mimetype)) . "&response-expires=" . urlencode (($amazon_s3_expires = gmdate ("D, d M Y H:i:s", strtotime ("-1 week")) . " GMT"));
183
- $amazon_s3_raw_file = "/" . $_GET["s2member_file_download"] . "?response-cache-control=" . $amazon_s3_cache_control . "&response-content-disposition=" . $amazon_s3_content_disposition . "&response-content-type=" . $amazon_s3_content_type . "&response-expires=" . $amazon_s3_expires;
184
- $amazon_s3_signature = base64_encode (c_ws_plugin__s2member_files_in::amazon_s3_sign ("GET\n\n\n" . $amazon_s3_file_expires . "\n" . "/" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"] . $amazon_s3_raw_file));
185
  /**/
186
- $amazon_s3_redirection_url = "http://" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"] . ".s3.amazonaws.com" . $amazon_s3_file;
187
- if (strtolower ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"]) !== $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"])
188
- $amazon_s3_redirection_url = "http://s3.amazonaws.com/" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"] . $amazon_s3_file;
189
  /**/
190
- $amazon_s3_redirection_url .= "&AWSAccessKeyId=" . urlencode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_access_key"]);
191
- $amazon_s3_redirection_url .= "&Expires=" . urlencode ($amazon_s3_file_expires);
192
- $amazon_s3_redirection_url .= "&Signature=" . urlencode ($amazon_s3_signature);
193
  /**/
194
- wp_redirect ($amazon_s3_redirection_url); /* 302 redirection. */
195
- /**/
196
- exit (); /* Clean exit. */
197
- }
198
- /**/
199
- else /* Else, using localized storage ( default ). */
200
- {
201
- @set_time_limit (0); /* Unlimited. */
202
- @ini_set ("zlib.output_compression", 0);
203
  /**/
204
- header ("Accept-Ranges: none");
205
- header ("Content-Encoding: none");
206
- header ("Content-Type: " . $mimetype);
207
- header ("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("-1 week")) . " GMT");
208
- header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
209
- header ("Cache-Control: no-cache, must-revalidate, max-age=0");
210
- header ("Cache-Control: post-check=0, pre-check=0", false);
211
- header ("Pragma: no-cache");
212
  /**/
213
- header ('Content-Disposition: ' . (($inline) ? "inline" : "attachment") . '; filename="' . $basename . '"');
 
 
214
  /**/
215
- if ($length && apply_filters ("ws_plugin__s2member_stream_file_downloads", true, get_defined_vars ()) && ($stream = fopen ($file, "rb")))
216
  {
217
- $_stream_w_content_length = (preg_match ("/^win/i", PHP_OS)) ? false : true; /* Windows® IIS does not jive here. */
218
- /* Windows® IIS doesn't seem to like it when both `Content-Length` and `Transfer-Encoding: chunked` are sent together. */
219
- if (apply_filters ("ws_plugin__s2member_stream_file_downloads_w_content_length", $_stream_w_content_length, get_defined_vars ()))
220
- header ("Content-Length: " . $length);
221
  /**/
222
- header ("Transfer-Encoding: chunked"); /* Uses `Transfer-Encoding: chunked` for simulated streaming. */
 
 
223
  /**/
224
- eval ('while (@ob_end_clean ());'); /* End/clean all output buffers that may or may not exist. */
 
 
225
  /**/
226
- while (!feof ($stream) && ($chunk_size = strlen ($data = fread ($stream, 2097152))))
227
- eval ('echo dechex ($chunk_size) . "\r\n". $data . "\r\n"; @flush ();');
 
228
  /**/
229
- fclose ($stream);
230
- /**/
231
- exit ("0\r\n\r\n");
232
  }
233
- else if ($length) /* Else `file_get_contents()`. */
 
234
  {
235
- header ("Content-Length: " . $length);
 
 
 
 
 
 
 
 
236
  /**/
237
- exit (file_get_contents ($file));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  }
239
- else
240
- exit (); /* Empty file. */
241
  }
242
- }
243
  /**/
244
  do_action ("ws_plugin__s2member_after_file_download_access", get_defined_vars ());
245
  }
@@ -271,19 +262,19 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
271
  */
272
  public static function _file_remote_authorization ($user = FALSE)
273
  {
274
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
275
  do_action ("_ws_plugin__s2member_before_file_remote_authorization", get_defined_vars ());
276
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
277
  /**/
278
- if (!is_object ($user) && !empty ($_GET["s2member_file_remote"])) /* Use Header Authorization? */
279
  {
280
  do_action ("_ws_plugin__s2member_during_file_remote_authorization_before", get_defined_vars ());
281
  /**/
282
  if (empty ($_SERVER["PHP_AUTH_USER"]) || empty ($_SERVER["PHP_AUTH_PW"]) || !user_pass_ok ($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"]))
283
  {
284
- header ('WWW-Authenticate: Basic realm="Members Only"');
285
- header ("HTTP/1.0 401 Unauthorized");
286
- exit ("Access Denied");
287
  }
288
  else if (is_object ($_user = new WP_User ($_SERVER["PHP_AUTH_USER"])) && $_user->ID)
289
  {
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_files_in"))
21
  {
41
  {
42
  do_action ("ws_plugin__s2member_before_file_download_access", get_defined_vars ());
43
  /**/
44
+ if (!empty ($_GET["s2member_file_download"])) /* Ignore `..`, and `^.` files like `.htaccess`. */
45
+ if (strpos ($_GET["s2member_file_download"], "..") === false) /* Ignore `..` if it appears anywhere. */
46
+ if (strpos (basename ($_GET["s2member_file_download"]), ".") !== 0) /* Ignore any/all hidden files. */
 
 
 
 
 
47
  {
48
+ @set_time_limit(0) . @ini_set ("zlib.output_compression", 0) . eval ('while (@ob_end_clean ());');
49
  /**/
50
+ $excluded = apply_filters ("ws_plugin__s2member_check_file_download_access_excluded", false, get_defined_vars ());
 
 
 
 
51
  /**/
52
+ if (!($using_amazon_s3_storage = 0) && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_access_key"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_secret_key"])
53
+ $using_amazon_s3_storage = true; /* Amazon® S3 storage has been configured! */
 
 
 
54
  /**/
55
+ if (!$excluded && (empty ($_GET["s2member_file_download_key"]) || (!empty ($_GET["s2member_file_download_key"]) && !($file_download_key_is_valid = ($_GET["s2member_file_download_key"] === c_ws_plugin__s2member_files::file_download_key ($_GET["s2member_file_download"]) || $_GET["s2member_file_download_key"] === c_ws_plugin__s2member_files::file_download_key ($_GET["s2member_file_download"], "ip-forever") || $_GET["s2member_file_download_key"] === c_ws_plugin__s2member_files::file_download_key ($_GET["s2member_file_download"], "universal"))))))
 
56
  {
57
+ $_GET["s2member_file_download"] = trim ($_GET["s2member_file_download"], "/"); /* Trim slashes after Key comparison. */
 
58
  /**/
59
+ if (!$using_amazon_s3_storage && !file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $_GET["s2member_file_download"]))
60
  {
61
+ status_header(404) . exit (_x ("404: Sorry, file not found. Please contact Support for assistance.", "s2member-front", "s2member"));
 
62
  }
63
  /**/
64
+ else if (!empty ($_GET["s2member_file_download_key"]) && !$file_download_key_is_valid)
65
  {
66
+ status_header(503) . exit (_x ("503 ( Invalid Key ): Sorry, your access to this file has expired. Please contact Support for assistance.", "s2member-front", "s2member"));
67
+ }
68
+ /**/
69
+ else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"] || ($file_download_access_is_allowed = $min_level_4_downloads = c_ws_plugin__s2member_files::min_level_4_downloads ()) === false)
70
+ {
71
+ if (!has_filter ("ws_plugin__s2member_check_file_download_access_user", "c_ws_plugin__s2member_files_in::_file_remote_authorization"))
72
+ add_filter ("ws_plugin__s2member_check_file_download_access_user", "c_ws_plugin__s2member_files_in::_file_remote_authorization", 10, 2);
73
+ /**/
74
+ if ((isset ($file_download_access_is_allowed, $min_level_4_downloads) && $file_download_access_is_allowed === false) || ($file_download_access_is_allowed = $min_level_4_downloads = c_ws_plugin__s2member_files::min_level_4_downloads ()) === false)
75
+ {
76
+ 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"));
77
+ }
78
+ /**/
79
+ 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 ())) || !($user_id = $user->ID))
80
+ {
81
+ if (preg_match ("/^access[_\-]s2member[_\-]level([0-9]+)\//", $_GET["s2member_file_download"], $m))
82
+ {
83
+ $level_req = $m[1]; /* Which Level does this require? */
84
+ if (wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $_GET["s2member_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 ())) !== "nill")
85
+ exit ();
86
+ }
87
+ else if (preg_match ("/^access[_\-]s2member[_\-]ccap[_\-](.+?)\//", $_GET["s2member_file_download"], $m))
88
+ {
89
+ $ccap_req = preg_replace ("/-/", "_", $m[1]); /* Which Capability does this require? */
90
+ if (wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $_GET["s2member_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 ())) !== "nill")
91
+ exit ();
92
+ }
93
+ else if (wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $_GET["s2member_file_download"], "s2member_level_req" => (string)$min_level_4_downloads)), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"])), apply_filters ("ws_plugin__s2member_content_redirect_status", 301, get_defined_vars ())) !== "nill")
94
+ exit ();
95
+ }
96
+ /**/
97
+ else if ((!is_array ($file_downloads = c_ws_plugin__s2member_files::user_downloads ($user)) || !$file_downloads["allowed"] || !$file_downloads["allowed_days"])/**/
98
+ && wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $_GET["s2member_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 ())) !== "nill")
99
+ exit ();
100
+ /**/
101
+ else if (preg_match ("/^access[_\-]s2member[_\-]level([0-9]+)\//", $_GET["s2member_file_download"], $m))
102
  {
103
  $level_req = $m[1]; /* Which Level does this require? */
104
+ if (!$user->has_cap ("access_s2member_level" . $level_req) /* Does the User have access to this Level? */
105
+ && wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $_GET["s2member_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 ())) !== "nill")
106
  exit ();
107
  }
108
+ /**/
109
  else if (preg_match ("/^access[_\-]s2member[_\-]ccap[_\-](.+?)\//", $_GET["s2member_file_download"], $m))
110
  {
111
  $ccap_req = preg_replace ("/-/", "_", $m[1]); /* Which Capability does this require? */
112
+ if (!$user->has_cap ("access_s2member_ccap_" . $ccap_req) /* Does the User have access to this Custom Capability? */
113
+ && wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $_GET["s2member_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 ())) !== "nill")
114
  exit ();
115
  }
116
+ /**/
117
+ $already_downloaded = false; /* Initialize this to a false value. */
118
+ $previous_file_downloads = 0; /* Here we're going to count how many downloads they've performed. */
119
+ $max_days_logged = c_ws_plugin__s2member_files::max_download_period (); /* Longest period/days. */
120
+ $file_download_access_log = (array)get_user_option ("s2member_file_download_access_log", $user_id);
121
+ $file_download_access_arc = (array)get_user_option ("s2member_file_download_access_arc", $user_id);
122
+ /**/
123
+ foreach ($file_download_access_log as $file_download_access_log_entry_key => $file_download_access_log_entry)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  {
125
+ if (strtotime ($file_download_access_log_entry["date"]) < strtotime ("-" . $max_days_logged . " days"))
126
+ {
127
+ unset($file_download_access_log[$file_download_access_log_entry_key]);
128
+ $file_download_access_arc[] = $file_download_access_log_entry;
129
+ }
130
+ else if (strtotime ($file_download_access_log_entry["date"]) >= strtotime ("-" . $file_downloads["allowed_days"] . " days"))
131
+ {
132
+ $previous_file_downloads++;
133
+ if ($file_download_access_log_entry["file"] === $_GET["s2member_file_download"])
134
+ $already_downloaded = true;
135
+ }
136
  }
137
+ /**/
138
+ if (!$already_downloaded && $previous_file_downloads >= $file_downloads["allowed"] /* They have NOT already downloaded this file, and they're over their limit. */
139
+ && wp_redirect (add_query_arg (urlencode_deep (array ("s2member_seeking" => "file-" . $_GET["s2member_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 ())) !== "nill")
140
+ exit ();
141
+ /**/
142
+ if (!$already_downloaded) /* Only add this file to the log if they have not already downloaded it. */
143
+ $file_download_access_log[] = array ("date" => date ("Y-m-d"), "file" => $_GET["s2member_file_download"]);
144
+ /**/
145
+ update_user_option ($user_id, "s2member_file_download_access_arc", c_ws_plugin__s2member_utils_arrays::array_unique ($file_download_access_arc));
146
+ update_user_option ($user_id, "s2member_file_download_access_log", c_ws_plugin__s2member_utils_arrays::array_unique ($file_download_access_log));
147
  }
 
 
 
 
 
 
 
 
 
 
148
  }
149
+ else /* Otherwise... it's either $excluded; or permission was granted with a valid Download Key. */
 
 
 
 
 
150
  {
151
+ $_GET["s2member_file_download"] = trim ($_GET["s2member_file_download"], "/");
152
+ /**/
153
+ if (!$using_amazon_s3_storage && !file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $_GET["s2member_file_download"]))
154
+ {
155
+ status_header(404) . exit (_x ("404: Sorry, file not found. Please contact Support for assistance.", "s2member-front", "s2member"));
156
+ }
157
  }
158
+ /*
159
+ Here we are going to put together all of the File Download information.
160
+ */
161
+ $extension = strtolower (substr ($_GET["s2member_file_download"], strrpos ($_GET["s2member_file_download"], ".") + 1)); /* To lowercase. */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  /**/
163
+ $mimetypes = parse_ini_file (dirname (dirname (dirname (__FILE__))) . "/includes/mime-types.ini"); /* Types provided by: `mime-types.ini`. */
164
+ $mimetype = ($mimetypes[$extension]) ? $mimetypes[$extension] : "application/octet-stream"; /* Lookup the MIME type for this file extension. */
 
165
  /**/
166
+ $inline = (isset ($_GET["s2member_file_inline"])) ? filter_var ($_GET["s2member_file_inline"], FILTER_VALIDATE_BOOLEAN) : ((in_array ($extension, preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_inline_extensions"]))) ? true : false);
 
 
167
  /**/
168
+ $basename = basename ($_GET["s2member_file_download"]); /* The actual name of this File Download ( i.e. the basename ); including its file extension too. */
 
 
 
 
 
 
 
 
169
  /**/
170
+ $pathinfo = (!$using_amazon_s3_storage) ? pathinfo (($file = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $_GET["s2member_file_download"])) : array ();
171
+ $length = (!$using_amazon_s3_storage && $file) ? filesize ($file) : -1; /* The overall file size, in bytes. */
 
 
 
 
 
 
172
  /**/
173
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
174
+ do_action ("ws_plugin__s2member_during_file_download_access", get_defined_vars ());
175
+ unset ($__refs, $__v); /* Unset defined __refs, __v. */
176
  /**/
177
+ if ($using_amazon_s3_storage) /* Using Amazon® S3 storage? In this case, we use an authenticated redirection to S3 storage. */
178
  {
179
+ $amazon_s3_file_expires = strtotime ("+" . apply_filters ("ws_plugin__s2member_amazon_s3_file_expires_time", "30 seconds", get_defined_vars ()));
 
 
 
180
  /**/
181
+ $amazon_s3_file = "/" . $_GET["s2member_file_download"] . "?response-cache-control=" . urlencode (($amazon_s3_cache_control = "no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0")) . "&response-content-disposition=" . urlencode (($amazon_s3_content_disposition = (($inline) ? "inline" : "attachment") . '; filename="' . $basename . '"')) . "&response-content-type=" . urlencode (($amazon_s3_content_type = $mimetype)) . "&response-expires=" . urlencode (($amazon_s3_expires = gmdate ("D, d M Y H:i:s", strtotime ("-1 week")) . " GMT"));
182
+ $amazon_s3_raw_file = "/" . $_GET["s2member_file_download"] . "?response-cache-control=" . $amazon_s3_cache_control . "&response-content-disposition=" . $amazon_s3_content_disposition . "&response-content-type=" . $amazon_s3_content_type . "&response-expires=" . $amazon_s3_expires;
183
+ $amazon_s3_signature = base64_encode (c_ws_plugin__s2member_files_in::amazon_s3_sign ("GET\n\n\n" . $amazon_s3_file_expires . "\n" . "/" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"] . $amazon_s3_raw_file));
184
  /**/
185
+ $amazon_s3_redirection_url = "http://" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"] . ".s3.amazonaws.com" . $amazon_s3_file;
186
+ if (strtolower ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"]) !== $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"])
187
+ $amazon_s3_redirection_url = "http://s3.amazonaws.com/" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"] . $amazon_s3_file;
188
  /**/
189
+ $amazon_s3_redirection_url .= "&AWSAccessKeyId=" . urlencode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_access_key"]);
190
+ $amazon_s3_redirection_url .= "&Expires=" . urlencode ($amazon_s3_file_expires);
191
+ $amazon_s3_redirection_url .= "&Signature=" . urlencode ($amazon_s3_signature);
192
  /**/
193
+ wp_redirect($amazon_s3_redirection_url) . exit ();
 
 
194
  }
195
+ /**/
196
+ else /* Else, using localized storage ( default ). */
197
  {
198
+ status_header(200);
199
+ header("Accept-Ranges: none");
200
+ header("Content-Encoding: none");
201
+ header("Content-Type: " . $mimetype);
202
+ header("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("-1 week")) . " GMT");
203
+ header("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
204
+ header("Cache-Control: no-cache, must-revalidate, max-age=0");
205
+ header ("Cache-Control: post-check=0, pre-check=0", false);
206
+ header("Pragma: no-cache");
207
  /**/
208
+ header('Content-Disposition: ' . (($inline) ? "inline" : "attachment") . '; filename="' . $basename . '"');
209
+ /**/
210
+ if ($length && apply_filters ("ws_plugin__s2member_stream_file_downloads", true, get_defined_vars ()) && ($stream = fopen ($file, "rb")))
211
+ {
212
+ $_stream_w_content_length = (stripos (PHP_OS, "win") === 0 && (!function_exists ("apache_get_version") || apache_get_version () === false)) ? false : true;
213
+ /* Windows® IIS doesn't seem to like it when both `Content-Length` and `Transfer-Encoding: chunked` are sent together. */
214
+ if (apply_filters ("ws_plugin__s2member_stream_file_downloads_w_content_length", $_stream_w_content_length, get_defined_vars ()))
215
+ header("Content-Length: " . $length);
216
+ /**/
217
+ header("Transfer-Encoding: chunked"); /* Uses `Transfer-Encoding: chunked` for simulated streaming. */
218
+ /**/
219
+ while (!feof ($stream) && ($chunk_size = strlen ($data = fread ($stream, 2097152))))
220
+ eval('echo dechex ($chunk_size) . "\r\n". $data . "\r\n"; @flush ();');
221
+ /**/
222
+ fclose($stream) . exit ("0\r\n\r\n");
223
+ }
224
+ else if ($length) /* Else `file_get_contents()`. */
225
+ {
226
+ header("Content-Length: " . $length) . exit (file_get_contents ($file));
227
+ }
228
+ else /* Else, we have an empty file. */
229
+ {
230
+ header("Content-Length: 0") . exit (); /* Empty file. */
231
+ }
232
  }
 
 
233
  }
 
234
  /**/
235
  do_action ("ws_plugin__s2member_after_file_download_access", get_defined_vars ());
236
  }
262
  */
263
  public static function _file_remote_authorization ($user = FALSE)
264
  {
265
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
266
  do_action ("_ws_plugin__s2member_before_file_remote_authorization", get_defined_vars ());
267
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
268
  /**/
269
+ if (!is_object ($user) && isset ($_GET["s2member_file_remote"]) && filter_var ($_GET["s2member_file_remote"], FILTER_VALIDATE_BOOLEAN))
270
  {
271
  do_action ("_ws_plugin__s2member_during_file_remote_authorization_before", get_defined_vars ());
272
  /**/
273
  if (empty ($_SERVER["PHP_AUTH_USER"]) || empty ($_SERVER["PHP_AUTH_PW"]) || !user_pass_ok ($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"]))
274
  {
275
+ header('WWW-Authenticate: Basic realm="' . _x ("Members Only", "s2member-front", "s2member") . '"');
276
+ status_header(401); /* Unauthorized status header. */
277
+ exit(_x ("Access Denied", "s2member-front", "s2member"));
278
  }
279
  else if (is_object ($_user = new WP_User ($_SERVER["PHP_AUTH_USER"])) && $_user->ID)
280
  {
includes/classes/installation.inc.php CHANGED
@@ -43,7 +43,6 @@ if (!class_exists ("c_ws_plugin__s2member_installation"))
43
  do_action ("ws_plugin__s2member_before_activation", get_defined_vars ());
44
  /**/
45
  c_ws_plugin__s2member_roles_caps::config_roles (); /* Config Roles/Caps. */
46
- /**/
47
  update_option ("ws_plugin__s2member_activated_levels", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]);
48
  /**/
49
  if (!is_dir ($files_dir = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"]))
@@ -51,25 +50,25 @@ if (!class_exists ("c_ws_plugin__s2member_installation"))
51
  mkdir ($files_dir, 0777, true);
52
  /**/
53
  if (is_dir ($files_dir) && is_writable ($files_dir))
54
- if (!file_exists ($htaccess = $files_dir . "/.htaccess"))
55
- file_put_contents ($htaccess, "deny from all");
56
  /**/
57
  if (!is_dir ($logs_dir = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"]))
58
  if (is_writable (dirname (c_ws_plugin__s2member_utils_dirs::strip_dir_app_data ($logs_dir))))
59
  mkdir ($logs_dir, 0777, true);
60
  /**/
61
  if (is_dir ($logs_dir) && is_writable ($logs_dir))
62
- if (!file_exists ($htaccess = $logs_dir . "/.htaccess"))
63
- file_put_contents ($htaccess, "deny from all");
64
  /**/
65
  (!is_array (get_option ("ws_plugin__s2member_cache"))) ? update_option ("ws_plugin__s2member_cache", array ()) : null;
66
  (!is_array (get_option ("ws_plugin__s2member_notices"))) ? update_option ("ws_plugin__s2member_notices", array ()) : null;
67
  (!is_array (get_option ("ws_plugin__s2member_options"))) ? update_option ("ws_plugin__s2member_options", array ()) : null;
68
  (!is_numeric (get_option ("ws_plugin__s2member_configured"))) ? update_option ("ws_plugin__s2member_configured", "0") : null;
69
  /**/
70
- if ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["configured"]) /* If already configured, we are re-activating. */
71
  {
72
- $v = get_option ("ws_plugin__s2member_activated_version");
73
  /**/
74
  if (!$v || !version_compare ($v, "3.2", ">=")) /* Needs to be upgraded? */
75
  /* Version 3.2 is where `meta_key` names were changed. They're prefixed now. */
@@ -90,28 +89,22 @@ if (!class_exists ("c_ws_plugin__s2member_installation"))
90
  $wpdb->query ("DELETE FROM `" . $wpdb->postmeta . "` WHERE `meta_key` = 's2member_ccaps_req' AND `meta_value` IN('','a:0:{}','a:1:{i:0;s:0:\"\";}')");
91
  }
92
  /**/
93
- if (!$v || !version_compare ($v, "3.5", ">=")) /* Needs to be notified about Screen Options? */
94
- /* Version 3.5 introduced a dismissal message regarding Screen Options in the list of Users/Members. */
95
  {
96
- $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.';
97
- c_ws_plugin__s2member_admin_notices::enqueue_admin_notice ($notice, "blog:users.php", false, false, true);
98
  }
99
  /**/
100
  $notice = '<strong>s2Member</strong> has been <strong>reactivated</strong>, with ' . (($reactivation_reason === "levels") ? '<code>' . esc_html ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]) . '</code> Membership Levels' : 'the latest version') . '.<br />';
101
  $notice .= 'You now have version ' . esc_html (WS_PLUGIN__S2MEMBER_VERSION) . '. Your existing configuration remains.';
102
  /**/
103
- if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) /* No Changelog on a Multisite Farm. */
104
  $notice .= '<br />Have fun, <a href="' . esc_attr (admin_url ("/admin.php?page=ws-plugin--s2member-info#rm-changelog")) . '">read the Changelog</a>, and make some money! :-)';
105
  /**/
106
  c_ws_plugin__s2member_admin_notices::enqueue_admin_notice ($notice, array ("blog|network:plugins.php", "blog|network:ws-plugin--s2member-start", "blog|network:ws-plugin--s2member-mms-ops", "blog|network:ws-plugin--s2member-gen-ops", "blog|network:ws-plugin--s2member-res-ops"));
107
- /**/
108
- if (preg_match ("/^win/i", PHP_OS) && is_dir (c_ws_plugin__s2member_utils_dirs::strip_dir_app_data ($files_dir)) && count (scandir (c_ws_plugin__s2member_utils_dirs::strip_dir_app_data ($files_dir))) > 4)
109
- {
110
- $notice = '<strong>Windows® Server ( NOTICE ):</strong> Your protected files MUST be moved to the <code>/app_data</code> sub-directory. For further details, see: <code>s2Member -> Download Options -> Basic</code>.';
111
- c_ws_plugin__s2member_admin_notices::enqueue_admin_notice ($notice, array ("blog|network:plugins.php", "blog|network:ws-plugin--s2member-start", "blog|network:ws-plugin--s2member-mms-ops", "blog|network:ws-plugin--s2member-gen-ops", "blog|network:ws-plugin--s2member-res-ops"), true);
112
- }
113
  }
114
- else /* Otherwise, (initial activation); we'll help the Site Owner out by giving them a link to the Quick Start Guide. */
115
  {
116
  $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.';
117
  /**/
@@ -123,17 +116,11 @@ if (!class_exists ("c_ws_plugin__s2member_installation"))
123
  c_ws_plugin__s2member_admin_notices::enqueue_admin_notice ($notice, array ("blog|network:plugins.php", "blog|network:ws-plugin--s2member-start", "blog|network:ws-plugin--s2member-mms-ops", "blog|network:ws-plugin--s2member-gen-ops", "blog|network:ws-plugin--s2member-res-ops"));
124
  }
125
  /**/
126
- update_option ("ws_plugin__s2member_activated_version", WS_PLUGIN__S2MEMBER_VERSION); /* Mark version. */
127
- /**/
128
- if (is_multisite () && is_main_site ()) /* Network activation routines. A few quick adjustments. */
129
  {
130
  foreach ((array)($users = $wpdb->get_results ("SELECT `ID` FROM `" . $wpdb->users . "`")) as $user)
131
- {
132
- /* Here we convert everyone already in the system; without a point of origin.
133
- This will set their point of origin to the Main Site. */
134
- if (!($originating_blog = get_user_meta ($user->ID, "s2member_originating_blog", true)))
135
- update_user_meta ($user->ID, "s2member_originating_blog", $current_site->blog_id);
136
- }
137
  /**/
138
  $notice = '<strong>Multisite Network</strong> updated automatically by <strong>s2Member</strong> v' . esc_html (WS_PLUGIN__S2MEMBER_VERSION) . '.<br />';
139
  $notice .= 'You\'ll want to configure s2Member\'s Multisite options now.<br />';
@@ -142,9 +129,13 @@ if (!class_exists ("c_ws_plugin__s2member_installation"))
142
  /**/
143
  c_ws_plugin__s2member_admin_notices::enqueue_admin_notice ($notice, array ("blog|network:plugins.php", "blog|network:ws-plugin--s2member-start", "blog|network:ws-plugin--s2member-mms-ops", "blog|network:ws-plugin--s2member-gen-ops", "blog|network:ws-plugin--s2member-res-ops"));
144
  /**/
 
 
145
  update_option ("ws_plugin__s2member_activated_mms_version", WS_PLUGIN__S2MEMBER_VERSION);
146
  }
147
  /**/
 
 
148
  do_action ("ws_plugin__s2member_after_activation", get_defined_vars ());
149
  /**/
150
  return; /* Return for uniformity. */
@@ -195,6 +186,9 @@ if (!class_exists ("c_ws_plugin__s2member_installation"))
195
  delete_option("ws_plugin__s2member_activated_version");
196
  delete_option("ws_plugin__s2member_activated_mms_version");
197
  /**/
 
 
 
198
  $wpdb->query ("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '%" . esc_sql (like_escape ("s2member_")) . "%'");
199
  $wpdb->query ("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '" . esc_sql (like_escape ("_transient_s2m_")) . "%'");
200
  $wpdb->query ("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '" . esc_sql (like_escape ("_transient_timeout_s2m_")) . "%'");
43
  do_action ("ws_plugin__s2member_before_activation", get_defined_vars ());
44
  /**/
45
  c_ws_plugin__s2member_roles_caps::config_roles (); /* Config Roles/Caps. */
 
46
  update_option ("ws_plugin__s2member_activated_levels", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]);
47
  /**/
48
  if (!is_dir ($files_dir = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"]))
50
  mkdir ($files_dir, 0777, true);
51
  /**/
52
  if (is_dir ($files_dir) && is_writable ($files_dir))
53
+ if (!file_exists ($htaccess = $files_dir . "/.htaccess") || !apply_filters ("ws_plugin__s2member_preserve_files_dir_htaccess", false, get_defined_vars ()))
54
+ file_put_contents ($htaccess, trim (c_ws_plugin__s2member_utilities::evl (file_get_contents ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir_htaccess"]))));
55
  /**/
56
  if (!is_dir ($logs_dir = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"]))
57
  if (is_writable (dirname (c_ws_plugin__s2member_utils_dirs::strip_dir_app_data ($logs_dir))))
58
  mkdir ($logs_dir, 0777, true);
59
  /**/
60
  if (is_dir ($logs_dir) && is_writable ($logs_dir))
61
+ if (!file_exists ($htaccess = $logs_dir . "/.htaccess") || !apply_filters ("ws_plugin__s2member_preserve_logs_dir_htaccess", false, get_defined_vars ()))
62
+ file_put_contents ($htaccess, trim (c_ws_plugin__s2member_utilities::evl (file_get_contents ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir_htaccess"]))));
63
  /**/
64
  (!is_array (get_option ("ws_plugin__s2member_cache"))) ? update_option ("ws_plugin__s2member_cache", array ()) : null;
65
  (!is_array (get_option ("ws_plugin__s2member_notices"))) ? update_option ("ws_plugin__s2member_notices", array ()) : null;
66
  (!is_array (get_option ("ws_plugin__s2member_options"))) ? update_option ("ws_plugin__s2member_options", array ()) : null;
67
  (!is_numeric (get_option ("ws_plugin__s2member_configured"))) ? update_option ("ws_plugin__s2member_configured", "0") : null;
68
  /**/
69
+ if ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["configured"]) /* If we are re-activating. */
70
  {
71
+ $v = get_option ("ws_plugin__s2member_activated_version"); /* Currently. */
72
  /**/
73
  if (!$v || !version_compare ($v, "3.2", ">=")) /* Needs to be upgraded? */
74
  /* Version 3.2 is where `meta_key` names were changed. They're prefixed now. */
89
  $wpdb->query ("DELETE FROM `" . $wpdb->postmeta . "` WHERE `meta_key` = 's2member_ccaps_req' AND `meta_value` IN('','a:0:{}','a:1:{i:0;s:0:\"\";}')");
90
  }
91
  /**/
92
+ if (!$v || !version_compare ($v, "110912", ">=") && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["filter_wp_query"] === array ("all"))
93
+ /* s2Member v110912 changed the way the "all" option for Alternative Views was handled. */
94
  {
95
+ $notice = '<strong>IMPORTANT:</strong> This version of s2Member® changes the way your <code>Alternative View Protections</code> work. Please review your options under: <code>s2Member -> Restriction Options -> Alternative View Protections</code>.<br />';
96
+ c_ws_plugin__s2member_admin_notices::enqueue_admin_notice ($notice, array ("blog|network:plugins.php", "blog|network:ws-plugin--s2member-start", "blog|network:ws-plugin--s2member-mms-ops", "blog|network:ws-plugin--s2member-gen-ops", "blog|network:ws-plugin--s2member-res-ops"));
97
  }
98
  /**/
99
  $notice = '<strong>s2Member</strong> has been <strong>reactivated</strong>, with ' . (($reactivation_reason === "levels") ? '<code>' . esc_html ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]) . '</code> Membership Levels' : 'the latest version') . '.<br />';
100
  $notice .= 'You now have version ' . esc_html (WS_PLUGIN__S2MEMBER_VERSION) . '. Your existing configuration remains.';
101
  /**/
102
+ if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) /* No Changelog on a Multisite Blog Farm. */
103
  $notice .= '<br />Have fun, <a href="' . esc_attr (admin_url ("/admin.php?page=ws-plugin--s2member-info#rm-changelog")) . '">read the Changelog</a>, and make some money! :-)';
104
  /**/
105
  c_ws_plugin__s2member_admin_notices::enqueue_admin_notice ($notice, array ("blog|network:plugins.php", "blog|network:ws-plugin--s2member-start", "blog|network:ws-plugin--s2member-mms-ops", "blog|network:ws-plugin--s2member-gen-ops", "blog|network:ws-plugin--s2member-res-ops"));
 
 
 
 
 
 
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
  /**/
116
  c_ws_plugin__s2member_admin_notices::enqueue_admin_notice ($notice, array ("blog|network:plugins.php", "blog|network:ws-plugin--s2member-start", "blog|network:ws-plugin--s2member-mms-ops", "blog|network:ws-plugin--s2member-gen-ops", "blog|network:ws-plugin--s2member-res-ops"));
117
  }
118
  /**/
119
+ if (is_multisite () && is_main_site ()) /* Network activation routines. */
 
 
120
  {
121
  foreach ((array)($users = $wpdb->get_results ("SELECT `ID` FROM `" . $wpdb->users . "`")) as $user)
122
+ if (!($originating_blog = get_user_meta ($user->ID, "s2member_originating_blog", true)))
123
+ update_user_meta ($user->ID, "s2member_originating_blog", $current_site->blog_id);
 
 
 
 
124
  /**/
125
  $notice = '<strong>Multisite Network</strong> updated automatically by <strong>s2Member</strong> v' . esc_html (WS_PLUGIN__S2MEMBER_VERSION) . '.<br />';
126
  $notice .= 'You\'ll want to configure s2Member\'s Multisite options now.<br />';
129
  /**/
130
  c_ws_plugin__s2member_admin_notices::enqueue_admin_notice ($notice, array ("blog|network:plugins.php", "blog|network:ws-plugin--s2member-start", "blog|network:ws-plugin--s2member-mms-ops", "blog|network:ws-plugin--s2member-gen-ops", "blog|network:ws-plugin--s2member-res-ops"));
131
  /**/
132
+ update_site_option ("ws_plugin__s2member_options", (array)get_option ("ws_plugin__s2member_options"));
133
+ /**/
134
  update_option ("ws_plugin__s2member_activated_mms_version", WS_PLUGIN__S2MEMBER_VERSION);
135
  }
136
  /**/
137
+ update_option ("ws_plugin__s2member_activated_version", WS_PLUGIN__S2MEMBER_VERSION);
138
+ /**/
139
  do_action ("ws_plugin__s2member_after_activation", get_defined_vars ());
140
  /**/
141
  return; /* Return for uniformity. */
186
  delete_option("ws_plugin__s2member_activated_version");
187
  delete_option("ws_plugin__s2member_activated_mms_version");
188
  /**/
189
+ if (is_multisite () && is_main_site ()) /* Site options? */
190
+ delete_site_option("ws_plugin__s2member_options");
191
+ /**/
192
  $wpdb->query ("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '%" . esc_sql (like_escape ("s2member_")) . "%'");
193
  $wpdb->query ("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '" . esc_sql (like_escape ("_transient_s2m_")) . "%'");
194
  $wpdb->query ("DELETE FROM `" . $wpdb->options . "` WHERE `option_name` LIKE '" . esc_sql (like_escape ("_transient_timeout_s2m_")) . "%'");
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
  {
@@ -41,7 +41,7 @@ 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
  /**/
@@ -59,7 +59,7 @@ if (!class_exists ("c_ws_plugin__s2member_ip_restrictions"))
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. */
@@ -71,11 +71,9 @@ if (!class_exists ("c_ws_plugin__s2member_ip_restrictions"))
71
  /**/
72
  do_action ("ws_plugin__s2member_during_ip_restrictions_ok_no", get_defined_vars ());
73
  /**/
74
- header("HTTP/1.0 503 Service Temporarily Unavailable"); /* Sends a status header. */
75
  /**/
76
- echo '<strong>503: Service Temporarily Unavailable</strong><br />' . "\n";
77
- echo 'Too many IP addresses accessing one secure area<em>!</em><br />' . "\n";
78
- echo 'Please contact Support if you require assistance.';
79
  /**/
80
  exit (); /* Clean exit. */
81
  }
@@ -87,17 +85,15 @@ if (!class_exists ("c_ws_plugin__s2member_ip_restrictions"))
87
  /**/
88
  do_action ("ws_plugin__s2member_during_ip_restrictions_ok_no", get_defined_vars ());
89
  /**/
90
- header("HTTP/1.0 503 Service Temporarily Unavailable"); /* Sends a status header. */
91
  /**/
92
- echo '<strong>503: Service Temporarily Unavailable</strong><br />' . "\n";
93
- echo 'Too many IP addresses accessing one secure area<em>!</em><br />' . "\n";
94
- echo 'Please contact Support if you require assistance.';
95
  /**/
96
  exit (); /* Clean exit. */
97
  }
98
  else /* OK, this looks legitimate. Apply Filters here and return true. */
99
  {
100
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
101
  do_action ("ws_plugin__s2member_during_ip_restrictions_ok_yes", get_defined_vars ());
102
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
103
  /**/
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
  {
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
  /**/
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. */
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
  }
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
  /**/
includes/classes/labels.inc.php CHANGED
@@ -57,13 +57,13 @@ if (!class_exists ("c_ws_plugin__s2member_labels"))
57
  * @attaches-to: ``add_filter("gettext_with_context");``
58
  *
59
  * @param str $translation Expects a string; already translated.
60
- * @param str $text The original text, passed in by the calling Filter.
61
  * @param str $context Contextual specification for this translation.
62
  * @return str The ``$translation``, after translations applied by this routine.
63
  */
64
- public static function _label_translations ($translation = FALSE, $text = FALSE, $context = FALSE)
65
  {
66
- if ($text && $context && stripos ($context, "User role") === 0 && ($role = $text))
67
  {
68
  if (preg_match ("/^(Free )?Subscriber$/i", $role) && !empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level0_label"]))
69
  $translation = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level0_label"];
57
  * @attaches-to: ``add_filter("gettext_with_context");``
58
  *
59
  * @param str $translation Expects a string; already translated.
60
+ * @param str $original The original text, passed in by the Filter.
61
  * @param str $context Contextual specification for this translation.
62
  * @return str The ``$translation``, after translations applied by this routine.
63
  */
64
+ public static function _label_translations ($translation = FALSE, $original = FALSE, $context = FALSE)
65
  {
66
+ if ($original && $context && stripos ($context, "User role") === 0 && ($role = $original))
67
  {
68
  if (preg_match ("/^(Free )?Subscriber$/i", $role) && !empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level0_label"]))
69
  $translation = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level0_label"];
includes/classes/login-customizations.inc.php CHANGED
@@ -96,9 +96,6 @@ if (!class_exists ("c_ws_plugin__s2member_login_customizations"))
96
  $a[] = 'body, body * { font-size:' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_size"] . $i . '; }';
97
  $a[] = 'body, body * { font-family:' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_family"] . $i . '; }';
98
  /**/
99
- if (!version_compare (get_bloginfo ("version"), "3.2-RC4", ">=")) /* Backward compatibility. */
100
- $a[] = 'p#backtoblog a, p#backtoblog a:hover, p#backtoblog a:active, p#backtoblog a:focus { color:#' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_text_color"] . $i . '; text-shadow:1px 1px 3px #' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_text_shadow_color"] . $i . '; top:15px' . $i . '; left:15px' . $i . '; padding:10px' . $i . '; border:1px solid #' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_box_shadow_color"] . $i . '; background-color:#' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_color"] . $i . '; -moz-border-radius:3px' . $i . '; -webkit-border-radius:3px' . $i . '; border-radius:3px' . $i . '; }';
101
- /**/
102
  $a[] = 'div#login { width:' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src_width"] . 'px' . $i . '; }';
103
  $a[] = 'div#login h1 a { background:url(' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src"] . ') no-repeat top center' . $i . '; }';
104
  $a[] = 'div#login h1 a { display:block' . $i . '; width:100%' . $i . '; height:' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src_height"] . 'px' . $i . '; }';
96
  $a[] = 'body, body * { font-size:' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_size"] . $i . '; }';
97
  $a[] = 'body, body * { font-family:' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_family"] . $i . '; }';
98
  /**/
 
 
 
99
  $a[] = 'div#login { width:' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src_width"] . 'px' . $i . '; }';
100
  $a[] = 'div#login h1 a { background:url(' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src"] . ') no-repeat top center' . $i . '; }';
101
  $a[] = 'div#login h1 a { display:block' . $i . '; width:100%' . $i . '; height:' . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src_height"] . 'px' . $i . '; }';
includes/classes/login-redirects.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_login_redirects"))
21
  {
@@ -40,7 +40,7 @@ if (!class_exists ("c_ws_plugin__s2member_login_redirects"))
40
  */
41
  public static function login_redirect ($username = FALSE)
42
  {
43
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
44
  do_action ("ws_plugin__s2member_before_login_redirect", get_defined_vars ());
45
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
46
  /**/
@@ -55,7 +55,7 @@ if (!class_exists ("c_ws_plugin__s2member_login_redirects"))
55
  update_user_option ($user_id, "s2member_login_counter", $logins);
56
  /**/
57
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"]) /* Nag em? */
58
- delete_user_setting ("default_password_nag") . update_user_option ($user_id, "default_password_nag", false, true);
59
  /**/
60
  $disable_login_ip_restrictions = apply_filters ("ws_plugin__s2member_disable_login_ip_restrictions", false, get_defined_vars ());
61
  /**/
@@ -68,25 +68,25 @@ if (!class_exists ("c_ws_plugin__s2member_login_redirects"))
68
  /**/
69
  if (!$obey_redirect_to || empty ($_REQUEST["redirect_to"]) || $_REQUEST["redirect_to"] === "wp-admin/" || $_REQUEST["redirect_to"] === admin_url ())
70
  {
71
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
72
  do_action ("ws_plugin__s2member_during_login_redirect", get_defined_vars ());
73
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
74
  /**/
75
  if ($redirect && is_string ($redirect)) /* Is this a string? */
76
- wp_redirect ($redirect); /* Dynamic URL introduced by a Filter. */
77
  /**/
78
- else if ($special_redirection_url = c_ws_plugin__s2member_login_redirects::login_redirection_url ($user))
79
- wp_redirect ($special_redirection_url); /* Special Redirection URL configured with s2Member. */
80
  /**/
81
  else /* Else we use the Login Welcome Page configured for s2Member. */
82
- wp_redirect (get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"]));
83
  /**/
84
  exit (); /* Clean exit. */
85
  }
86
  }
87
  }
88
  /**/
89
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
90
  do_action ("ws_plugin__s2member_after_login_redirect", get_defined_vars ());
91
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
92
  /**/
@@ -104,7 +104,7 @@ if (!class_exists ("c_ws_plugin__s2member_login_redirects"))
104
  */
105
  public static function login_redirection_url ($user = FALSE, $root_returns_false = FALSE)
106
  {
107
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
108
  do_action ("ws_plugin__s2member_before_login_redirection_url", get_defined_vars ());
109
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
110
  /**/
@@ -125,7 +125,7 @@ if (!class_exists ("c_ws_plugin__s2member_login_redirects"))
125
  */
126
  public static function login_redirection_uri ($user = FALSE, $root_returns_false = FALSE)
127
  {
128
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
129
  do_action ("ws_plugin__s2member_before_login_redirection_uri", get_defined_vars ());
130
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
131
  /**/
@@ -147,7 +147,7 @@ if (!class_exists ("c_ws_plugin__s2member_login_redirects"))
147
  */
148
  public static function fill_login_redirect_rc_vars ($url = FALSE, $user = FALSE, $root_returns_false = FALSE)
149
  {
150
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
151
  do_action ("ws_plugin__s2member_before_fill_login_redirect_rc_vars", get_defined_vars ());
152
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
153
  /**/
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_login_redirects"))
21
  {
40
  */
41
  public static function login_redirect ($username = FALSE)
42
  {
43
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
44
  do_action ("ws_plugin__s2member_before_login_redirect", get_defined_vars ());
45
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
46
  /**/
55
  update_user_option ($user_id, "s2member_login_counter", $logins);
56
  /**/
57
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"]) /* Nag em? */
58
+ delete_user_setting("default_password_nag") . update_user_option ($user_id, "default_password_nag", false, true);
59
  /**/
60
  $disable_login_ip_restrictions = apply_filters ("ws_plugin__s2member_disable_login_ip_restrictions", false, get_defined_vars ());
61
  /**/
68
  /**/
69
  if (!$obey_redirect_to || empty ($_REQUEST["redirect_to"]) || $_REQUEST["redirect_to"] === "wp-admin/" || $_REQUEST["redirect_to"] === admin_url ())
70
  {
71
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
72
  do_action ("ws_plugin__s2member_during_login_redirect", get_defined_vars ());
73
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
74
  /**/
75
  if ($redirect && is_string ($redirect)) /* Is this a string? */
76
+ wp_redirect($redirect); /* Dynamic URL introduced by a Filter. */
77
  /**/
78
+ else if ($redirection_url = c_ws_plugin__s2member_login_redirects::login_redirection_url ($user))
79
+ wp_redirect($redirection_url); /* Special Redirection URL configured with s2Member. */
80
  /**/
81
  else /* Else we use the Login Welcome Page configured for s2Member. */
82
+ wp_redirect(get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"]));
83
  /**/
84
  exit (); /* Clean exit. */
85
  }
86
  }
87
  }
88
  /**/
89
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
90
  do_action ("ws_plugin__s2member_after_login_redirect", get_defined_vars ());
91
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
92
  /**/
104
  */
105
  public static function login_redirection_url ($user = FALSE, $root_returns_false = FALSE)
106
  {
107
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
108
  do_action ("ws_plugin__s2member_before_login_redirection_url", get_defined_vars ());
109
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
110
  /**/
125
  */
126
  public static function login_redirection_uri ($user = FALSE, $root_returns_false = FALSE)
127
  {
128
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
129
  do_action ("ws_plugin__s2member_before_login_redirection_uri", get_defined_vars ());
130
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
131
  /**/
147
  */
148
  public static function fill_login_redirect_rc_vars ($url = FALSE, $user = FALSE, $root_returns_false = FALSE)
149
  {
150
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
151
  do_action ("ws_plugin__s2member_before_fill_login_redirect_rc_vars", get_defined_vars ());
152
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
153
  /**/
includes/classes/menu-pages-rs.inc.php CHANGED
@@ -39,6 +39,14 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages_rs"))
39
  {
40
  do_action ("ws_plugin__s2member_during_menu_pages_before_right_sections", get_defined_vars ());
41
  /**/
 
 
 
 
 
 
 
 
42
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["menu_pages"]["mlist"])
43
  {
44
  echo '<div class="ws-menu-page-mlist">' . "\n";
39
  {
40
  do_action ("ws_plugin__s2member_during_menu_pages_before_right_sections", get_defined_vars ());
41
  /**/
42
+ echo '<div id="ws-menu-page-js-c-w" class="ws-menu-page-js-c-w">' . "\n";
43
+ include_once dirname (dirname (__FILE__)) . "/menu-pages/js-c-warning.inc.php";
44
+ echo '</div>' . "\n";
45
+ /**/
46
+ echo '<script type="text/javascript">' . "\n";
47
+ echo "jQuery('div#ws-menu-page-js-c-w').hide();" . "\n"; /* Hide! */
48
+ echo '</script>' . "\n";
49
+ /**/
50
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["menu_pages"]["mlist"])
51
  {
52
  echo '<div class="ws-menu-page-mlist">' . "\n";
includes/classes/menu-pages.inc.php CHANGED
@@ -75,7 +75,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
75
  do_action ("ws_plugin__s2member_during_update_all_options", get_defined_vars ());
76
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
77
  /**/
78
- update_option ("ws_plugin__s2member_options", $options) . update_option ("ws_plugin__s2member_cache", array ());
79
  /**/
80
  if ($update_other === true || in_array ("auto_eot_system", (array)$update_other)) /* Handle the Auto-EOT System now ( enable/disable ). */
81
  ($options["auto_eot_system_enabled"] == 1) ? c_ws_plugin__s2member_auto_eots::add_auto_eot_system () : c_ws_plugin__s2member_auto_eots::delete_auto_eot_system ();
@@ -263,7 +263,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
263
  do_action ("_ws_plugin__s2member_before_add_settings_link", get_defined_vars ());
264
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
265
  /**/
266
- if (preg_match ("/" . preg_quote ($file, "/") . "$/", $GLOBALS["WS_PLUGIN__"]["s2member"]["l"]) && is_array ($links))
267
  {
268
  $settings = '<a href="' . esc_attr (admin_url ("/admin.php?page=ws-plugin--s2member-gen-ops")) . '">Settings</a>';
269
  array_unshift ($links, apply_filters ("ws_plugin__s2member_add_settings_link", $settings, get_defined_vars ()));
@@ -295,9 +295,10 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
295
  wp_enqueue_script ("thickbox");
296
  wp_enqueue_script ("media-upload");
297
  wp_enqueue_script ("jquery-ui-core");
298
- wp_enqueue_script ("jquery-json-ps", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/includes/menu-pages/jquery-json-ps-min.js", array ("jquery"), c_ws_plugin__s2member_utilities::ver_checksum ());
299
- wp_enqueue_script ("jquery-ui-effects", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/includes/menu-pages/jquery-ui-effects.js", array ("jquery", "jquery-ui-core"), c_ws_plugin__s2member_utilities::ver_checksum ());
300
- wp_enqueue_script ("ws-plugin--s2member-menu-pages", site_url ("/?ws_plugin__s2member_menu_pages_js=" . urlencode (mt_rand ())), array ("jquery", "thickbox", "media-upload", "jquery-json-ps", "jquery-ui-core", "jquery-ui-effects", "password-strength-meter"), c_ws_plugin__s2member_utilities::ver_checksum ());
 
301
  /**/
302
  do_action ("ws_plugin__s2member_during_add_admin_scripts", get_defined_vars ());
303
  }
@@ -431,23 +432,24 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
431
  mkdir ($logs_dir, 0777, true) . clearstatcache ();
432
  /**/
433
  $htaccess = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"] . "/.htaccess";
 
434
  /**/
435
  if (is_dir ($logs_dir) && is_writable ($logs_dir) && !file_exists ($htaccess))
436
- file_put_contents ($htaccess, "deny from all") . clearstatcache ();
437
  /**/
438
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"]) /* Logging enabled? */
439
  {
440
  if (!is_dir ($logs_dir)) /* If the security-enabled logs directory does not exist yet. */
441
- c_ws_plugin__s2member_admin_notices::display_admin_notice ("The security-enabled logs directory ( <code>" . esc_html (preg_replace ("/^" . preg_quote ($_SERVER["DOCUMENT_ROOT"], "/") . "/", "", $logs_dir)) . "</code> ) does not exist. Please create this directory manually &amp; make it writable ( chmod 777 ).", true);
442
  /**/
443
  else if (!is_writable ($logs_dir)) /* If the logs directory is not writable yet. */
444
- c_ws_plugin__s2member_admin_notices::display_admin_notice ("Permissions error. The security-enabled logs directory ( <code>" . esc_html (preg_replace ("/^" . preg_quote ($_SERVER["DOCUMENT_ROOT"], "/") . "/", "", $logs_dir)) . "</code> ) is not writable. Please make this directory writable ( chmod 777 ).", true);
445
  /**/
446
  if (!file_exists ($htaccess)) /* If the .htaccess file has not been created yet. */
447
- c_ws_plugin__s2member_admin_notices::display_admin_notice ("The .htaccess protection file ( <code>" . esc_html (preg_replace ("/^" . preg_quote ($_SERVER["DOCUMENT_ROOT"], "/") . "/", "", $htaccess)) . "</code> ) does not exist. Please create this file manually. Inside your .htaccess file, add this one line: <code>deny from all</code>.", true);
448
  /**/
449
  else if (!preg_match ("/deny from all/i", file_get_contents ($htaccess))) /* Else if the .htaccess file does not offer the required protection. */
450
- c_ws_plugin__s2member_admin_notices::display_admin_notice ("Unprotected. The .htaccess protection file ( <code>" . esc_html (preg_replace ("/^" . preg_quote ($_SERVER["DOCUMENT_ROOT"], "/") . "/", "", $htaccess)) . "</code> ) does not contain <code>deny from all</code>. Inside your .htaccess file, add this one line: <code>deny from all</code>.", true);
451
  }
452
  /**/
453
  include_once dirname (dirname (__FILE__)) . "/menu-pages/paypal-ops.inc.php";
@@ -470,27 +472,25 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
470
  /**/
471
  c_ws_plugin__s2member_menu_pages::update_all_options ();
472
  /**/
473
- if (!($using_amazon_s3_storage = 0) && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_access_key"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_secret_key"])
474
- $using_amazon_s3_storage = true; /* Amazon® S3 storage has been configured! */
475
- /**/
476
  $files_dir = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"];
477
  /**/
478
  if (!is_dir ($files_dir) && is_writable (dirname (c_ws_plugin__s2member_utils_dirs::strip_dir_app_data ($files_dir))))
479
  mkdir ($files_dir, 0777, true) . clearstatcache ();
480
  /**/
481
  $htaccess = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/.htaccess";
 
482
  /**/
483
  if (is_dir ($files_dir) && is_writable ($files_dir) && !file_exists ($htaccess))
484
- file_put_contents ($htaccess, "deny from all") . clearstatcache ();
485
  /**/
486
- if (!$using_amazon_s3_storage && !is_dir ($files_dir)) /* If the security-enabled files directory does not exist yet. */
487
- c_ws_plugin__s2member_admin_notices::display_admin_notice ("The security-enabled files directory ( <code>" . esc_html (preg_replace ("/^" . preg_quote ($_SERVER["DOCUMENT_ROOT"], "/") . "/", "", $files_dir)) . "</code> ) does not exist. Please create this directory manually.", true);
488
  /**/
489
- if (!$using_amazon_s3_storage && !file_exists ($htaccess)) /* If the .htaccess file has not been created yet. */
490
- c_ws_plugin__s2member_admin_notices::display_admin_notice ("The .htaccess protection file ( <code>" . esc_html (preg_replace ("/^" . preg_quote ($_SERVER["DOCUMENT_ROOT"], "/") . "/", "", $htaccess)) . "</code> ) does not exist. Please create this file manually. Inside your .htaccess file, add this one line: <code>deny from all</code>.", true);
491
  /**/
492
- else if (!$using_amazon_s3_storage && !preg_match ("/deny from all/i", file_get_contents ($htaccess))) /* Else if the .htaccess file does not offer the required protection. */
493
- c_ws_plugin__s2member_admin_notices::display_admin_notice ("Unprotected. The .htaccess protection file ( <code>" . esc_html (preg_replace ("/^" . preg_quote ($_SERVER["DOCUMENT_ROOT"], "/") . "/", "", $htaccess)) . "</code> ) does not contain <code>deny from all</code>. Inside your .htaccess file, add this one line: <code>deny from all</code>.", true);
494
  /**/
495
  include_once dirname (dirname (__FILE__)) . "/menu-pages/down-ops.inc.php";
496
  /**/
@@ -621,10 +621,10 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
621
  $ovg = (string)$_p["ws_plugin__s2member_bridge_bbpress_ovg"];
622
  /**/
623
  if (($file = file_get_contents (dirname (dirname (__FILE__)) . "/dropins/bridges/_s2member-bbpress-bridge.php")) && ($file = preg_replace ("/%%min%%/i", c_ws_plugin__s2member_utils_strings::esc_dq ($min), preg_replace ("/%%ovg%%/i", c_ws_plugin__s2member_utils_strings::esc_dq ($ovg), $file))) && file_put_contents ($plugins_dir . "/_s2member-bbpress-bridge.php", $file))
624
- c_ws_plugin__s2member_admin_notices::display_admin_notice ("The bbPress® Bridge/plugin has been <strong>installed successfully</strong>.");
625
  /**/
626
  else /* Otherwise, something unexpected. The site owner will need to install the bbPress® plugin manually. */
627
- c_ws_plugin__s2member_admin_notices::display_admin_notice ("Unknown error. Please try again, or install manually.", true);
628
  }
629
  /**/
630
  else if (preg_match ("/^Un-Install/i", $_p["ws_plugin__s2member_bridge_bbpress_action"]))
@@ -632,20 +632,20 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
632
  if (file_exists ($plugins_dir . "/_s2member-bbpress-bridge.php"))
633
  {
634
  if (!unlink ($plugins_dir . "/_s2member-bbpress-bridge.php")) /* Test return value of unlink. */
635
- c_ws_plugin__s2member_admin_notices::display_admin_notice ("Unknown error. Please try again, or un-install manually.", true);
636
  /**/
637
  else /* Otherwise, everything looks good. The plugin file has been removed successfully. */
638
- c_ws_plugin__s2member_admin_notices::display_admin_notice ("The bbPress® Bridge/plugin has been successfully <strong>uninstalled</strong>.");
639
  }
640
  else
641
- c_ws_plugin__s2member_admin_notices::display_admin_notice ("The bbPress® Bridge/plugin is already un-installed.", true);
642
  }
643
  }
644
  else
645
- c_ws_plugin__s2member_admin_notices::display_admin_notice ("The directory you specified is NOT writable. Please try again, or install manually.", true);
646
  }
647
  else
648
- c_ws_plugin__s2member_admin_notices::display_admin_notice ("The directory you specified does NOT exist. Please try again, or install manually.", true);
649
  }
650
  /**/
651
  include_once dirname (dirname (__FILE__)) . "/menu-pages/integrations.inc.php";
75
  do_action ("ws_plugin__s2member_during_update_all_options", get_defined_vars ());
76
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
77
  /**/
78
+ update_option ("ws_plugin__s2member_options", $options) . ((is_multisite () && is_main_site ()) ? update_site_option ("ws_plugin__s2member_options", $options) : null) . update_option ("ws_plugin__s2member_cache", array ());
79
  /**/
80
  if ($update_other === true || in_array ("auto_eot_system", (array)$update_other)) /* Handle the Auto-EOT System now ( enable/disable ). */
81
  ($options["auto_eot_system_enabled"] == 1) ? c_ws_plugin__s2member_auto_eots::add_auto_eot_system () : c_ws_plugin__s2member_auto_eots::delete_auto_eot_system ();
263
  do_action ("_ws_plugin__s2member_before_add_settings_link", get_defined_vars ());
264
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
265
  /**/
266
+ if ($file === plugin_basename ($GLOBALS["WS_PLUGIN__"]["s2member"]["l"]) && is_array ($links))
267
  {
268
  $settings = '<a href="' . esc_attr (admin_url ("/admin.php?page=ws-plugin--s2member-gen-ops")) . '">Settings</a>';
269
  array_unshift ($links, apply_filters ("ws_plugin__s2member_add_settings_link", $settings, get_defined_vars ()));
295
  wp_enqueue_script ("thickbox");
296
  wp_enqueue_script ("media-upload");
297
  wp_enqueue_script ("jquery-ui-core");
298
+ wp_enqueue_script ("jquery-sprintf", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/includes/jquery/jquery.sprintf/jquery.sprintf-min.js", array ("jquery"), c_ws_plugin__s2member_utilities::ver_checksum ());
299
+ wp_enqueue_script ("jquery-json-ps", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/includes/jquery/jquery.json-ps/jquery.json-ps-min.js", array ("jquery"), c_ws_plugin__s2member_utilities::ver_checksum ());
300
+ wp_enqueue_script ("jquery-ui-effects", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/includes/jquery/jquery.ui-effects/jquery.ui-effects-min.js", array ("jquery", "jquery-ui-core"), c_ws_plugin__s2member_utilities::ver_checksum ());
301
+ wp_enqueue_script ("ws-plugin--s2member-menu-pages", site_url ("/?ws_plugin__s2member_menu_pages_js=" . urlencode (mt_rand ())), array ("jquery", "thickbox", "media-upload", "jquery-sprintf", "jquery-json-ps", "jquery-ui-core", "jquery-ui-effects", "password-strength-meter"), c_ws_plugin__s2member_utilities::ver_checksum ());
302
  /**/
303
  do_action ("ws_plugin__s2member_during_add_admin_scripts", get_defined_vars ());
304
  }
432
  mkdir ($logs_dir, 0777, true) . clearstatcache ();
433
  /**/
434
  $htaccess = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"] . "/.htaccess";
435
+ $htaccess_contents = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir_htaccess"])));
436
  /**/
437
  if (is_dir ($logs_dir) && is_writable ($logs_dir) && !file_exists ($htaccess))
438
+ file_put_contents ($htaccess, $htaccess_contents) . clearstatcache ();
439
  /**/
440
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"]) /* Logging enabled? */
441
  {
442
  if (!is_dir ($logs_dir)) /* If the security-enabled logs directory does not exist yet. */
443
+ c_ws_plugin__s2member_admin_notices::display_admin_notice ('The security-enabled logs directory ( <code>' . esc_html (c_ws_plugin__s2member_utils_dirs::doc_root_path ($logs_dir)) . '</code> ) does not exist. Please create this directory manually &amp; make it writable ( chmod 777 ).', true);
444
  /**/
445
  else if (!is_writable ($logs_dir)) /* If the logs directory is not writable yet. */
446
+ c_ws_plugin__s2member_admin_notices::display_admin_notice ('Permissions error. The security-enabled logs directory ( <code>' . esc_html (c_ws_plugin__s2member_utils_dirs::doc_root_path ($logs_dir)) . '</code> ) is not writable. Please make this directory writable ( chmod 777 ).', true);
447
  /**/
448
  if (!file_exists ($htaccess)) /* If the .htaccess file has not been created yet. */
449
+ c_ws_plugin__s2member_admin_notices::display_admin_notice ('The .htaccess protection file ( <code>' . esc_html (c_ws_plugin__s2member_utils_dirs::doc_root_path ($htaccess)) . '</code> ) does not exist. Please create this file manually. Inside your .htaccess file, add this:<br /><pre>' . esc_html ($htaccess_contents) . '</pre>', true);
450
  /**/
451
  else if (!preg_match ("/deny from all/i", file_get_contents ($htaccess))) /* Else if the .htaccess file does not offer the required protection. */
452
+ c_ws_plugin__s2member_admin_notices::display_admin_notice ('Unprotected. The .htaccess protection file ( <code>' . esc_html (c_ws_plugin__s2member_utils_dirs::doc_root_path ($htaccess)) . '</code> ) does not contain <code>deny from all</code>. Inside your .htaccess file, add this:<br /><pre>' . esc_html ($htaccess_contents) . '</pre>', true);
453
  }
454
  /**/
455
  include_once dirname (dirname (__FILE__)) . "/menu-pages/paypal-ops.inc.php";
472
  /**/
473
  c_ws_plugin__s2member_menu_pages::update_all_options ();
474
  /**/
 
 
 
475
  $files_dir = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"];
476
  /**/
477
  if (!is_dir ($files_dir) && is_writable (dirname (c_ws_plugin__s2member_utils_dirs::strip_dir_app_data ($files_dir))))
478
  mkdir ($files_dir, 0777, true) . clearstatcache ();
479
  /**/
480
  $htaccess = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/.htaccess";
481
+ $htaccess_contents = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir_htaccess"])));
482
  /**/
483
  if (is_dir ($files_dir) && is_writable ($files_dir) && !file_exists ($htaccess))
484
+ file_put_contents ($htaccess, $htaccess_contents) . clearstatcache ();
485
  /**/
486
+ if (!is_dir ($files_dir)) /* If the security-enabled files directory does not exist yet. */
487
+ c_ws_plugin__s2member_admin_notices::display_admin_notice ('The security-enabled files directory ( <code>' . esc_html (c_ws_plugin__s2member_utils_dirs::doc_root_path ($files_dir)) . '</code> ) does not exist. Please create this directory manually.', true);
488
  /**/
489
+ if (!file_exists ($htaccess)) /* If the .htaccess file has not been created yet. */
490
+ c_ws_plugin__s2member_admin_notices::display_admin_notice ('The .htaccess protection file ( <code>' . esc_html (c_ws_plugin__s2member_utils_dirs::doc_root_path ($htaccess)) . '</code> ) does not exist. Please create this file manually. Inside your .htaccess file, add this:<br /><pre>' . esc_html ($htaccess_contents) . '</pre>', true);
491
  /**/
492
+ else if (!preg_match ("/deny from all/i", file_get_contents ($htaccess))) /* Else if the .htaccess file does not offer the required protection. */
493
+ c_ws_plugin__s2member_admin_notices::display_admin_notice ('Unprotected. The .htaccess protection file ( <code>' . esc_html (c_ws_plugin__s2member_utils_dirs::doc_root_path ($htaccess)) . '</code> ) does not contain <code>deny from all</code>. Inside your .htaccess file, add this:<br /><pre>' . esc_html ($htaccess_contents) . '</pre>', true);
494
  /**/
495
  include_once dirname (dirname (__FILE__)) . "/menu-pages/down-ops.inc.php";
496
  /**/
621
  $ovg = (string)$_p["ws_plugin__s2member_bridge_bbpress_ovg"];
622
  /**/
623
  if (($file = file_get_contents (dirname (dirname (__FILE__)) . "/dropins/bridges/_s2member-bbpress-bridge.php")) && ($file = preg_replace ("/%%min%%/i", c_ws_plugin__s2member_utils_strings::esc_dq ($min), preg_replace ("/%%ovg%%/i", c_ws_plugin__s2member_utils_strings::esc_dq ($ovg), $file))) && file_put_contents ($plugins_dir . "/_s2member-bbpress-bridge.php", $file))
624
+ c_ws_plugin__s2member_admin_notices::display_admin_notice ('The bbPress® Bridge/plugin has been <strong>installed successfully</strong>.');
625
  /**/
626
  else /* Otherwise, something unexpected. The site owner will need to install the bbPress® plugin manually. */
627
+ c_ws_plugin__s2member_admin_notices::display_admin_notice ('Unknown error. Please try again, or install manually.', true);
628
  }
629
  /**/
630
  else if (preg_match ("/^Un-Install/i", $_p["ws_plugin__s2member_bridge_bbpress_action"]))
632
  if (file_exists ($plugins_dir . "/_s2member-bbpress-bridge.php"))
633
  {
634
  if (!unlink ($plugins_dir . "/_s2member-bbpress-bridge.php")) /* Test return value of unlink. */
635
+ c_ws_plugin__s2member_admin_notices::display_admin_notice ('Unknown error. Please try again, or un-install manually.', true);
636
  /**/
637
  else /* Otherwise, everything looks good. The plugin file has been removed successfully. */
638
+ c_ws_plugin__s2member_admin_notices::display_admin_notice ('The bbPress® Bridge/plugin has been successfully <strong>uninstalled</strong>.');
639
  }
640
  else
641
+ c_ws_plugin__s2member_admin_notices::display_admin_notice ('The bbPress® Bridge/plugin is already un-installed.', true);
642
  }
643
  }
644
  else
645
+ c_ws_plugin__s2member_admin_notices::display_admin_notice ('The directory you specified is NOT writable. Please try again, or install manually.', true);
646
  }
647
  else
648
+ c_ws_plugin__s2member_admin_notices::display_admin_notice ('The directory you specified does NOT exist. Please try again, or install manually.', true);
649
  }
650
  /**/
651
  include_once dirname (dirname (__FILE__)) . "/menu-pages/integrations.inc.php";
includes/classes/option-forces.inc.php CHANGED
@@ -140,10 +140,10 @@ if (!class_exists ("c_ws_plugin__s2member_option_forces"))
140
  if (is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && is_main_site ())
141
  return apply_filters ("ws_plugin__s2member_check_register_access", ($users_can_register = "0"), get_defined_vars ());
142
  /**/
143
- else if (!is_admin () && !$users_can_register) /* Do NOT run these security checks on option pages; it's confusing to a site owner. */
144
- if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || !is_main_site () || is_super_admin () || current_user_can ("create_users"))
145
  {
146
- if ((is_multisite () && is_super_admin ()) || current_user_can ("create_users") || c_ws_plugin__s2member_register_access::reg_cookies_ok ())
147
  {
148
  return apply_filters ("ws_plugin__s2member_check_register_access", ($users_can_register = "1"), get_defined_vars ());
149
  }
@@ -159,7 +159,7 @@ if (!class_exists ("c_ws_plugin__s2member_option_forces"))
159
  *
160
  * @attaches-to: ``add_filter("pre_site_option_registration");``
161
  *
162
- * @param str $users_can_register Expects *( `none`, `all`, or `user` )*, passed through by the Filter.
163
  * @return str One of `none|all|user`; depending on several factors.
164
  */
165
  public static function check_mms_register_access ($users_can_register = FALSE)
@@ -176,33 +176,20 @@ if (!class_exists ("c_ws_plugin__s2member_option_forces"))
176
  if (c_ws_plugin__s2member_utils_conds::bp_is_installed () && is_multisite () && /* BP Multisite / but NOT offering Blogs? */ !c_ws_plugin__s2member_utils_conds::is_multisite_farm ())
177
  return apply_filters ("ws_plugin__s2member_check_mms_register_access", ($users_can_register = ((c_ws_plugin__s2member_option_forces::check_register_access ()) ? "user" : "none")), get_defined_vars ());
178
  /**/
179
- else if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || !is_main_site ()) /* Blog Farm? */
180
  return apply_filters ("ws_plugin__s2member_check_mms_register_access", ($users_can_register = "none"), get_defined_vars ());
181
  /**/
182
- else if (!is_admin () && $users_can_register !== "all") /* Do NOT run these checks on option pages; it's confusing to a site owner. */
183
  {
184
- if (is_super_admin () || current_user_can ("create_users") || (($reg_cookies = c_ws_plugin__s2member_register_access::reg_cookies_ok ()) && extract ($reg_cookies)))
185
  {
186
- if (is_super_admin () || current_user_can ("create_users")) /* Either a Super Administrator, or an Administrator that can create. */
187
- {
188
- return apply_filters ("ws_plugin__s2member_check_mms_register_access", ($users_can_register = "all"), get_defined_vars ());
189
- }
190
- else if (!empty ($reg_cookies) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $item_number, $m) && !empty ($m[1]) && is_numeric ($level = $m[1]))
191
- {
192
- if (!empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_blogs_level" . $level])) /* Blog(s)? */
193
- {
194
- return apply_filters ("ws_plugin__s2member_check_mms_register_access", ($users_can_register = "all"), get_defined_vars ());
195
- }
196
- else /* Otherwise, we MUST allow them to at least create an account; they paid for it! Defaults to `user`. */
197
- {
198
- return apply_filters ("ws_plugin__s2member_check_mms_register_access", ($users_can_register = "user"), get_defined_vars ());
199
- }
200
- }
201
  }
202
- /* --------------------> $users_can_register !== "all", so exclude Level #0. */
203
- else if (is_user_logged_in () && current_user_can ("access_s2member_level1") && is_object ($user = wp_get_current_user ()) && $user->ID)
204
  {
205
- $blogs_allowed = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_blogs_level" . c_ws_plugin__s2member_user_access::user_access_level ($user)];
 
206
  $user_blogs = (is_array ($blogs = get_blogs_of_user ($user->ID))) ? count ($blogs) - 1 : 0;
207
  /**/
208
  $user_blogs = ($user_blogs >= 0) ? $user_blogs : 0; /* NOT less than zero. */
@@ -213,13 +200,25 @@ if (!class_exists ("c_ws_plugin__s2member_option_forces"))
213
  return apply_filters ("ws_plugin__s2member_check_mms_register_access", ($users_can_register = "all"), get_defined_vars ());
214
  }
215
  }
 
 
 
 
 
 
 
 
 
 
 
216
  }
217
  /**/
218
- else if (!is_admin () && $users_can_register === "all") /* Do NOT run these security checks on option pages; it's confusing to a site owner. */
219
  {
220
- if (is_user_logged_in () && is_object ($user = wp_get_current_user ()) && $user->ID)
221
  {
222
- $blogs_allowed = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_blogs_level" . c_ws_plugin__s2member_user_access::user_access_level ()];
 
223
  $user_blogs = (is_array ($blogs = get_blogs_of_user ($user->ID))) ? count ($blogs) - 1 : 0;
224
  /**/
225
  $user_blogs = ($user_blogs >= 0) ? $user_blogs : 0; /* NOT less than zero. */
140
  if (is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && is_main_site ())
141
  return apply_filters ("ws_plugin__s2member_check_register_access", ($users_can_register = "0"), get_defined_vars ());
142
  /**/
143
+ else if (!is_admin () && !$users_can_register) /* Do NOT run these security checks on option pages; it's confusing. */
144
+ if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || !is_main_site () || current_user_can ("create_users") || is_super_admin ())
145
  {
146
+ if (current_user_can ("create_users") || (is_multisite () && is_super_admin ()) || c_ws_plugin__s2member_register_access::reg_cookies_ok ())
147
  {
148
  return apply_filters ("ws_plugin__s2member_check_register_access", ($users_can_register = "1"), get_defined_vars ());
149
  }
159
  *
160
  * @attaches-to: ``add_filter("pre_site_option_registration");``
161
  *
162
+ * @param str $users_can_register Expects *( `none`, `all`, `blog`, `user` )*, passed through by the Filter.
163
  * @return str One of `none|all|user`; depending on several factors.
164
  */
165
  public static function check_mms_register_access ($users_can_register = FALSE)
176
  if (c_ws_plugin__s2member_utils_conds::bp_is_installed () && is_multisite () && /* BP Multisite / but NOT offering Blogs? */ !c_ws_plugin__s2member_utils_conds::is_multisite_farm ())
177
  return apply_filters ("ws_plugin__s2member_check_mms_register_access", ($users_can_register = ((c_ws_plugin__s2member_option_forces::check_register_access ()) ? "user" : "none")), get_defined_vars ());
178
  /**/
179
+ else if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm ()) /* Blog Farm? */
180
  return apply_filters ("ws_plugin__s2member_check_mms_register_access", ($users_can_register = "none"), get_defined_vars ());
181
  /**/
182
+ else if (!is_network_admin () && $users_can_register !== "all") /* Do NOT run these checks on Network option pages; it's confusing. */
183
  {
184
+ if ((is_main_site () && current_user_can ("create_users")) || is_super_admin ()) /* Creates Users on the Main Site? */
185
  {
186
+ return apply_filters ("ws_plugin__s2member_check_mms_register_access", ($users_can_register = "all"), get_defined_vars ());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  }
188
+ /**/
189
+ else if (is_user_logged_in () && is_object ($user = wp_get_current_user ()) && $user->ID && is_object ($user = new WP_User ($user->ID, $current_site->blog_id)) && $user->ID && $user->has_cap ("access_s2member_level1"))
190
  {
191
+ $mms_options = c_ws_plugin__s2member_utilities::mms_options ();
192
+ $blogs_allowed = (int)@$mms_options["mms_registration_blogs_level" . c_ws_plugin__s2member_user_access::user_access_level ($user)];
193
  $user_blogs = (is_array ($blogs = get_blogs_of_user ($user->ID))) ? count ($blogs) - 1 : 0;
194
  /**/
195
  $user_blogs = ($user_blogs >= 0) ? $user_blogs : 0; /* NOT less than zero. */
200
  return apply_filters ("ws_plugin__s2member_check_mms_register_access", ($users_can_register = "all"), get_defined_vars ());
201
  }
202
  }
203
+ else if (!is_user_logged_in () && is_main_site () && ($reg_cookies = c_ws_plugin__s2member_register_access::reg_cookies_ok ()) && extract ($reg_cookies))
204
+ {
205
+ if (preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $item_number, $m) && !empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_blogs_level" . $m[1]]))
206
+ {
207
+ return apply_filters ("ws_plugin__s2member_check_mms_register_access", ($users_can_register = "all"), get_defined_vars ());
208
+ }
209
+ else /* Otherwise, we MUST allow them to at least create an account; they paid for it! Defaults to `user`. */
210
+ {
211
+ return apply_filters ("ws_plugin__s2member_check_mms_register_access", ($users_can_register = "user"), get_defined_vars ());
212
+ }
213
+ }
214
  }
215
  /**/
216
+ else if (!is_network_admin () && $users_can_register === "all") /* Do NOT run these security checks on option pages; it's confusing to a site owner. */
217
  {
218
+ if (is_user_logged_in () && !(is_main_site () && current_user_can ("create_users")) && !is_super_admin () && is_object ($user = wp_get_current_user ()) && $user->ID && is_object ($user = new WP_User ($user->ID, $current_site->blog_id)) && $user->ID)
219
  {
220
+ $mms_options = c_ws_plugin__s2member_utilities::mms_options ();
221
+ $blogs_allowed = (int)@$mms_options["mms_registration_blogs_level" . c_ws_plugin__s2member_user_access::user_access_level ($user)];
222
  $user_blogs = (is_array ($blogs = get_blogs_of_user ($user->ID))) ? count ($blogs) - 1 : 0;
223
  /**/
224
  $user_blogs = ($user_blogs >= 0) ? $user_blogs : 0; /* NOT less than zero. */
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
  /**/
@@ -129,7 +129,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_modify_w_level
129
  /**/
130
  $paypal["s2member_log"][] = "s2Member Level/Capabilities updated on Subscription modification.";
131
  /**/
132
- wp_mail ($paypal["payer_email"], apply_filters ("ws_plugin__s2member_modification_email_sbj", "Thank you! Your account has been updated.", get_defined_vars ()), apply_filters ("ws_plugin__s2member_modification_email_msg", "Thank you! You've been updated to:\n" . $paypal["item_name"] . "\n\nPlease log back in now.\n" . wp_login_url (), get_defined_vars ()), "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");
133
  /**/
134
  $paypal["s2member_log"][] = "Modification Confirmation Email sent to Customer, with a URL that provides them with a way to log back in.";
135
  /**/
@@ -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
  /**/
129
  /**/
130
  $paypal["s2member_log"][] = "s2Member Level/Capabilities updated on Subscription modification.";
131
  /**/
132
+ wp_mail ($paypal["payer_email"], apply_filters ("ws_plugin__s2member_modification_email_sbj", _x ("Thank you! Your account has been updated.", "s2member-front", "s2member"), get_defined_vars ()), apply_filters ("ws_plugin__s2member_modification_email_msg", _x ("Thank you! You've been updated to:", "s2member-front", "s2member") . "\n" . $paypal["item_name"] . "\n\n" . _x ("Please log back in now.", "s2member-front", "s2member") . "\n" . wp_login_url (), get_defined_vars ()), "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");
133
  /**/
134
  $paypal["s2member_log"][] = "Modification Confirmation Email sent to Customer, with a URL that provides them with a way to log back in.";
135
  /**/
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-eots-w-level.inc.php CHANGED
@@ -42,14 +42,14 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_l
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_eot|recurring_payment_expired|recurring_payment_suspended_due_to_max_failed_payment)$/i", $paypal["txn_type"]) && ($recurring = 1))/**/
46
- || (!empty ($paypal["txn_type"]) && preg_match ("/^recurring_payment_profile_cancel$/i", $paypal["txn_type"]) && !empty ($paypal["initial_payment_status"]) && preg_match ("/^failed$/i", $paypal["initial_payment_status"]) && ($recurring = 1))/**/
47
- || (!empty ($paypal["txn_type"]) && preg_match ("/^new_case$/i", $paypal["txn_type"]) && !empty ($paypal["case_type"]) && preg_match ("/^chargeback$/i", $paypal["case_type"]) && !($recurring = 0)) /* ONLY for future compatibility. */
48
- || (!empty ($paypal["payment_status"]) && preg_match ("/^(refunded|reversed|reversal)$/i", $paypal["payment_status"]) && !($recurring = 0)) /* The "txn_type" is irrelevant in all of these cases: refunded|reversed|reversal. */)/**/
49
- && (!empty ($paypal["period1"]) || ($paypal["period1"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_period1 ($paypal)) || empty ($recurring) || ($paypal["period1"] = "0 D"))/**/
50
- && (!empty ($paypal["period3"]) || ($paypal["period3"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_period3 ($paypal)) || empty ($recurring)) /* Was it even recurring? */
 
51
  && ((!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"]))/**/
52
- && (!empty ($paypal["subscr_id"]) || ($paypal["subscr_id"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_subscr_id ($paypal)) || (!empty ($paypal["parent_txn_id"]) && ($paypal["subscr_id"] = $paypal["parent_txn_id"])))/**/
53
  && (!empty ($paypal["item_name"]) || ($paypal["item_name"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_item_name ($paypal)) || ($paypal["item_name"] = $_SERVER["HTTP_HOST"]))/**/
54
  && (!empty ($paypal["payer_email"]) || ($paypal["payer_email"] = c_ws_plugin__s2member_utils_users::get_user_email_with ($paypal["subscr_id"])))/**/)
55
  {
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_eot|recurring_payment_expired|recurring_payment_suspended_due_to_max_failed_payment)$/i", $paypal["txn_type"]) && ($recurring = true))/**/
46
+ || (!empty ($paypal["txn_type"]) && preg_match ("/^recurring_payment_profile_cancel$/i", $paypal["txn_type"]) && !empty ($paypal["initial_payment_status"]) && preg_match ("/^failed$/i", $paypal["initial_payment_status"]) && ($recurring = true))/**/
47
+ || (!empty ($paypal["txn_type"]) && preg_match ("/^new_case$/i", $paypal["txn_type"]) && !empty ($paypal["case_type"]) && preg_match ("/^chargeback$/i", $paypal["case_type"]) && !($recurring = false)) /* Seek this for future compatibility. */
48
+ || (!empty ($paypal["payment_status"]) && preg_match ("/^(refunded|reversed|reversal)$/i", $paypal["payment_status"]) && !($recurring = false))/**/) /* The "txn_type" is irrelevant in all of these payment statuses: refunded|reversed|reversal. */
49
+ && (!empty ($paypal["subscr_id"]) || ($paypal["subscr_id"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_subscr_id ($paypal)) || (!empty ($paypal["parent_txn_id"]) && ($paypal["subscr_id"] = $paypal["parent_txn_id"]))) /* Or `parent_txn_id`? */
50
+ && (!empty ($paypal["period1"]) || ($paypal["period1"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_period1 ($paypal, false)) || empty ($recurring) || ($paypal["period1"] = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_var ("period1", false, $paypal["subscr_id"])) || ($paypal["period1"] = "0 D"))/**/
51
+ && (!empty ($paypal["period3"]) || ($paypal["period3"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_period3 ($paypal, false)) || empty ($recurring) || ($paypal["period3"] = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_var ("period3", false, $paypal["subscr_id"])) || ($paypal["period3"] = "1 D"))/**/
52
  && ((!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"]))/**/
 
53
  && (!empty ($paypal["item_name"]) || ($paypal["item_name"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_item_name ($paypal)) || ($paypal["item_name"] = $_SERVER["HTTP_HOST"]))/**/
54
  && (!empty ($paypal["payer_email"]) || ($paypal["payer_email"] = c_ws_plugin__s2member_utils_users::get_user_email_with ($paypal["subscr_id"])))/**/)
55
  {
includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php CHANGED
@@ -157,7 +157,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level"
157
  /**/
158
  $paypal["s2member_log"][] = "s2Member Level/Capabilities updated w/ advanced update routines.";
159
  /**/
160
- wp_mail ($paypal["payer_email"], apply_filters ("ws_plugin__s2member_modification_email_sbj", "Thank you! Your account has been updated.", get_defined_vars ()), apply_filters ("ws_plugin__s2member_modification_email_msg", "Thank you! You've been updated to:\n" . $paypal["item_name"] . "\n\nPlease log back in now.\n" . wp_login_url (), get_defined_vars ()), "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");
161
  /**/
162
  $paypal["s2member_log"][] = "Modification Confirmation Email sent to Customer, with a URL that provides them with a way to log back in.";
163
  /**/
157
  /**/
158
  $paypal["s2member_log"][] = "s2Member Level/Capabilities updated w/ advanced update routines.";
159
  /**/
160
+ wp_mail ($paypal["payer_email"], apply_filters ("ws_plugin__s2member_modification_email_sbj", _x ("Thank you! Your account has been updated.", "s2member-front", "s2member"), get_defined_vars ()), apply_filters ("ws_plugin__s2member_modification_email_msg", _x ("Thank you! You've been updated to:", "s2member-front", "s2member") . "\n" . $paypal["item_name"] . "\n\n" . _x ("Please log back in now.", "s2member-front", "s2member") . "\n" . wp_login_url (), get_defined_vars ()), "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");
161
  /**/
162
  $paypal["s2member_log"][] = "Modification Confirmation Email sent to Customer, with a URL that provides them with a way to log back in.";
163
  /**/
includes/classes/paypal-notify-in-wa-ccaps-wo-level.inc.php CHANGED
@@ -97,7 +97,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_wa_ccaps_wo_level"))
97
  /**/
98
  $paypal["s2member_log"][] = "s2Member Custom Capabilities updated w/ advanced update routines.";
99
  /**/
100
- wp_mail ($paypal["payer_email"], apply_filters ("ws_plugin__s2member_capabilities_email_sbj", "Thank you! Your account has been updated.", get_defined_vars ()), apply_filters ("ws_plugin__s2member_capabilities_email_msg", "Thank you! You now have access to:\n" . $paypal["item_name"] . "\n\nPlease log back in now.\n" . wp_login_url (), get_defined_vars ()), "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");
101
  /**/
102
  $paypal["s2member_log"][] = "Capability Confirmation Email sent to Customer, with a URL that provides them with a way to log back in.";
103
  /**/
97
  /**/
98
  $paypal["s2member_log"][] = "s2Member Custom Capabilities updated w/ advanced update routines.";
99
  /**/
100
+ wp_mail ($paypal["payer_email"], apply_filters ("ws_plugin__s2member_capabilities_email_sbj", _x ("Thank you! Your account has been updated.", "s2member-front", "s2member"), get_defined_vars ()), apply_filters ("ws_plugin__s2member_capabilities_email_msg", _x ("Thank you! You now have access to:", "s2member-front", "s2member") . "\n" . $paypal["item_name"] . "\n\n" . _x ("Please log back in now.", "s2member-front", "s2member") . "\n" . wp_login_url (), get_defined_vars ()), "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");
101
  /**/
102
  $paypal["s2member_log"][] = "Capability Confirmation Email sent to Customer, with a URL that provides them with a way to log back in.";
103
  /**/
includes/classes/paypal-notify-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_paypal_notify_in"))
21
  {
@@ -55,7 +55,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in"))
55
  /**/
56
  if (!empty ($_GET["s2member_paypal_notify"]) && ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"] || !empty ($_GET["s2member_paypal_proxy"])))
57
  {
58
- @ignore_user_abort (true); /* Important. Continue processing even if/when the connection is broken by the sending party. */
59
  /**/
60
  include_once ABSPATH . "wp-admin/includes/admin.php"; /* Get administrative functions. Needed for `wp_delete_user()`. */
61
  /**/
@@ -77,7 +77,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in"))
77
  {
78
  $paypal["s2member_log"][] = "s2Member originating domain ( `\$_SERVER[\"HTTP_HOST\"]` ) validated.";
79
  /**/
80
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
81
  if (!apply_filters ("ws_plugin__s2member_during_paypal_notify_conditionals", false, get_defined_vars ()))
82
  {
83
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
@@ -182,16 +182,20 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in"))
182
  if (is_writable ($logs_dir) && c_ws_plugin__s2member_utils_logs::archive_oversize_log_files ())
183
  file_put_contents ($logs_dir . "/" . $log2, $logv . "\n" . $logm . "\n" . $log4 . "\n" . var_export ($paypal, true) . "\n\n", FILE_APPEND);
184
  /**/
185
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
186
  do_action ("ws_plugin__s2member_during_paypal_notify", get_defined_vars ());
187
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
188
  /**/
189
- header ("HTTP/1.0 200 OK"); /* Send a 200 OK status header. */
190
- header ("Content-Type: text/plain; charset=utf-8"); /* With text/plain ( supporting a possible return URL ). */
191
- exit (((!empty ($paypal["s2member_paypal_proxy_return_url"])) ? $paypal["s2member_paypal_proxy_return_url"] : ""));
 
 
 
 
192
  }
193
  /**/
194
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
195
  do_action ("ws_plugin__s2member_after_paypal_notify", get_defined_vars ());
196
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
197
  }
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_paypal_notify_in"))
21
  {
55
  /**/
56
  if (!empty ($_GET["s2member_paypal_notify"]) && ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"] || !empty ($_GET["s2member_paypal_proxy"])))
57
  {
58
+ @ignore_user_abort(true); /* Important. Continue processing even if/when the connection is broken by the sending party. */
59
  /**/
60
  include_once ABSPATH . "wp-admin/includes/admin.php"; /* Get administrative functions. Needed for `wp_delete_user()`. */
61
  /**/
77
  {
78
  $paypal["s2member_log"][] = "s2Member originating domain ( `\$_SERVER[\"HTTP_HOST\"]` ) validated.";
79
  /**/
80
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
81
  if (!apply_filters ("ws_plugin__s2member_during_paypal_notify_conditionals", false, get_defined_vars ()))
82
  {
83
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
182
  if (is_writable ($logs_dir) && c_ws_plugin__s2member_utils_logs::archive_oversize_log_files ())
183
  file_put_contents ($logs_dir . "/" . $log2, $logv . "\n" . $logm . "\n" . $log4 . "\n" . var_export ($paypal, true) . "\n\n", FILE_APPEND);
184
  /**/
185
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
186
  do_action ("ws_plugin__s2member_during_paypal_notify", get_defined_vars ());
187
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
188
  /**/
189
+ @ini_set ("zlib.output_compression", 0); /* Turn off. */
190
+ /**/
191
+ status_header(200); /* Send a 200 OK status header. */
192
+ header("Content-Type: text/plain; charset=utf-8"); /* With text/plain. */
193
+ eval('while (@ob_end_clean ());'); /* End/clean all output buffers that may or may not exist. */
194
+ /**/
195
+ exit(((!empty ($paypal["s2member_paypal_proxy_return_url"])) ? $paypal["s2member_paypal_proxy_return_url"] : ""));
196
  }
197
  /**/
198
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
199
  do_action ("ws_plugin__s2member_after_paypal_notify", get_defined_vars ());
200
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
201
  }
includes/classes/paypal-return-in-no-tx-data.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_no_tx_data"))
21
  {
@@ -38,15 +38,15 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_no_tx_data"))
38
  */
39
  public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
40
  {
41
- extract($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
42
  /**/
43
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
44
  do_action ("ws_plugin__s2member_during_paypal_return_before_no_return_data", get_defined_vars ());
45
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
46
  /**/
47
  $paypal["s2member_log"][] = "No Return-Data. Customer must wait for Email Confirmation.";
48
  /**/
49
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
50
  do_action ("ws_plugin__s2member_during_paypal_return_during_no_return_data", get_defined_vars ());
51
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
52
  /**/
@@ -58,10 +58,10 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_no_tx_data"))
58
  $paypal["s2member_log"][] = "Note. This can sometimes happen when/if you are offering a free Trial Period. There are times when a Payment Gateway will NOT supply s2Member with any data immediately after checkout. When/if this happens, s2Member must process the transaction via IPN only ( i.e. behind-the-scene ), and the Customer must wait for Email Confirmation in these cases.";
59
  /**/
60
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
61
- '<strong>Thank you! ( you MUST check your email before proceeding ).</strong><br /><br />* Note: It can take <em>( up to 15 minutes )</em> for Email Confirmation with important details. If you don\'t receive email confirmation in the next 15 minutes, please contact Support.' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"] || (c_ws_plugin__s2member_utils_conds::pro_is_installed () && !empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_" . $paypal["subscr_gateway"] . "_sandbox"]))) ? '<br /><br /><strong>** Sandbox Mode **</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).' : ''),/**/
62
- (($custom_success_redirection) ? "Check Your Email ( Then Click Here )" : "Back To Home Page"), (($custom_success_redirection) ? $custom_success_redirection : home_url ("/")));
63
  /**/
64
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
65
  do_action ("ws_plugin__s2member_during_paypal_return_after_no_return_data", get_defined_vars ());
66
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
67
  /**/
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_no_tx_data"))
21
  {
38
  */
39
  public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
40
  {
41
+ extract ($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
42
  /**/
43
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
44
  do_action ("ws_plugin__s2member_during_paypal_return_before_no_return_data", get_defined_vars ());
45
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
46
  /**/
47
  $paypal["s2member_log"][] = "No Return-Data. Customer must wait for Email Confirmation.";
48
  /**/
49
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
50
  do_action ("ws_plugin__s2member_during_paypal_return_during_no_return_data", get_defined_vars ());
51
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
52
  /**/
58
  $paypal["s2member_log"][] = "Note. This can sometimes happen when/if you are offering a free Trial Period. There are times when a Payment Gateway will NOT supply s2Member with any data immediately after checkout. When/if this happens, s2Member must process the transaction via IPN only ( i.e. behind-the-scene ), and the Customer must wait for Email Confirmation in these cases.";
59
  /**/
60
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
61
+ _x ('<strong>Thank you! ( you MUST check your email before proceeding ).</strong><br /><br />* Note: It can take <em>( up to 15 minutes )</em> for Email Confirmation with important details. If you don\'t receive email confirmation in the next 15 minutes, please contact Support.', "s2member-front", "s2member") . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"] || (c_ws_plugin__s2member_utils_conds::pro_is_installed () && !empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_" . $paypal["subscr_gateway"] . "_sandbox"]))) ? '<br /><br />' . _x ('<strong>** Sandbox Mode **</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).', "s2member-front", "s2member") : ''),/**/
62
+ (($custom_success_redirection) ? _x ("Check Your Email ( Then Click Here )", "s2member-front", "s2member") : _x ("Back To Home Page", "s2member-front", "s2member")), (($custom_success_redirection) ? $custom_success_redirection : home_url ("/")));
63
  /**/
64
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
65
  do_action ("ws_plugin__s2member_during_paypal_return_after_no_return_data", get_defined_vars ());
66
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
67
  /**/
includes/classes/paypal-return-in-proxy-ty-email.inc.php CHANGED
@@ -56,8 +56,8 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_proxy_ty_email"))
56
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page. Customer must wait for Email Confirmation `proxy_use`: ( `ty-email` ).";
57
  /**/
58
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
59
- '<strong>Thank you! ( you MUST check your email before proceeding ).</strong><br /><br />* Note: It can take <em>( up to 15 minutes )</em> for Email Confirmation with important details. If you don\'t receive email confirmation in the next 15 minutes, please contact Support.' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"] || (c_ws_plugin__s2member_utils_conds::pro_is_installed () && !empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_" . $paypal["subscr_gateway"] . "_sandbox"]))) ? '<br /><br /><strong>** Sandbox Mode **</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).' : ''),/**/
60
- (($custom_success_redirection) ? "Check Your Email ( Then Click Here )" : "Back To Home Page"), (($custom_success_redirection) ? $custom_success_redirection : home_url ("/")));
61
  /**/
62
  eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
63
  do_action ("ws_plugin__s2member_during_paypal_return_after_explicit_ty_email", get_defined_vars ());
56
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page. Customer must wait for Email Confirmation `proxy_use`: ( `ty-email` ).";
57
  /**/
58
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
59
+ _x ('<strong>Thank you! ( you MUST check your email before proceeding ).</strong><br /><br />* Note: It can take <em>( up to 15 minutes )</em> for Email Confirmation with important details. If you don\'t receive email confirmation in the next 15 minutes, please contact Support.', "s2member-front", "s2member") . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"] || (c_ws_plugin__s2member_utils_conds::pro_is_installed () && !empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_" . $paypal["subscr_gateway"] . "_sandbox"]))) ? '<br /><br />' . _x ('<strong>** Sandbox Mode **</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing).', "s2member-front", "s2member") : ''),/**/
60
+ (($custom_success_redirection) ? _x ("Check Your Email ( Then Click Here )", "s2member-front", "s2member") : esc_html ("Back To Home Page", "s2member")), (($custom_success_redirection) ? $custom_success_redirection : home_url ("/")));
61
  /**/
62
  eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
63
  do_action ("ws_plugin__s2member_during_paypal_return_after_explicit_ty_email", get_defined_vars ());
includes/classes/paypal-return-in-proxy-x-preview.inc.php CHANGED
@@ -56,8 +56,8 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_proxy_x_preview"))
56
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page. Test preview of Return Page `proxy_use`: ( `x_preview` ).";
57
  /**/
58
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
59
- '<strong>Thank you! ( this is a preview, no action necessary ).</strong><br /><br />* Note: each of your Customers are returned back to your site immediately after they complete checkout. This Return Page displays a message and instructions for the Customer. s2Member may change the message and instructions dynamically, based on what the Customer is actually doing <em>( i.e. based on the type of transaction that is taking place )</em>.<br /><br /><em>* With <a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Pro Module / Prices")) . '" target="_blank">s2Member Pro</a> installed, it is possible to customize this Return Page in various ways.</em>',/**/
60
- "Continue ( Click Here )", (($custom_success_redirection) ? $custom_success_redirection : home_url ("/")));
61
  /**/
62
  eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
63
  do_action ("ws_plugin__s2member_during_paypal_return_after_explicit_x_preview", get_defined_vars ());
56
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page. Test preview of Return Page `proxy_use`: ( `x_preview` ).";
57
  /**/
58
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
59
+ sprintf (_x ('<strong>Thank you! ( this is a preview, no action necessary ).</strong><br /><br />* Note: each of your Customers are returned back to your site immediately after they complete checkout. This Return Page displays a message and instructions for the Customer. s2Member may change the message and instructions dynamically, based on what the Customer is actually doing <em>( i.e. based on the type of transaction that is taking place )</em>.<br /><br /><em>* With <a href="%s" target="_blank">s2Member Pro</a> installed, it is possible to customize this Return Page in various ways.</em>', "s2member-front", "s2member"), esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Pro Module / Prices"))),/**/
60
+ _x ("Continue ( Click Here )", "s2member-front", "s2member"), (($custom_success_redirection) ? $custom_success_redirection : home_url ("/")));
61
  /**/
62
  eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
63
  do_action ("ws_plugin__s2member_during_paypal_return_after_explicit_x_preview", get_defined_vars ());
includes/classes/paypal-return-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_return_in_subscr_modify_w_level"))
21
  {
@@ -40,13 +40,13 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_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"]))/**/)
48
  {
49
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
50
  do_action ("ws_plugin__s2member_during_paypal_return_before_subscr_modify", get_defined_vars ());
51
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
52
  /**/
@@ -87,7 +87,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_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); /* Now update the $user object we're using. */
92
  }
93
  /**/
@@ -162,7 +162,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_modify_w_level
162
  }
163
  }
164
  /**/
165
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
166
  do_action ("ws_plugin__s2member_during_paypal_return_during_subscr_modify", get_defined_vars ());
167
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
168
  /**/
@@ -170,15 +170,15 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_modify_w_level
170
  {
171
  $paypal["s2member_log"][] = "Redirecting this Member to a custom URL after modification: " . $redirection_url_after_modification;
172
  /**/
173
- wp_redirect($redirection_url_after_modification);
174
  }
175
  else /* Else, use standard/default handling in this scenario. Have the Customer log in again. */
176
  {
177
  $paypal["s2member_log"][] = "Redirecting Customer to the Login Page. They need to log back in.";
178
  /**/
179
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
180
- '<strong>Thank you! You\'ve been updated to:<br /><em>' . esc_html ($paypal["item_name"]) . '</em></strong>',/**/
181
- "Please Log Back In ( Click Here )", wp_login_url ());
182
  }
183
  }
184
  else /* Else, unable to modify Subscription. The existing User ID is associated with an Administrator. Stopping here. */
@@ -188,8 +188,8 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_modify_w_level
188
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
189
  /**/
190
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
191
- '<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access. Please make sure that you are NOT logged in as an Administrator while testing.',/**/
192
- "Back To Home Page", home_url ("/"));
193
  }
194
  }
195
  else /* Unable to modify Subscription. Could not get the existing User ID from the DB. */
@@ -199,8 +199,8 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_modify_w_level
199
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
200
  /**/
201
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
202
- '<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />Could not get the existing User ID from the DB.',/**/
203
- "Back To Home Page", home_url ("/"));
204
  }
205
  }
206
  else /* Page Expired. Duplicate Return-Data. */
@@ -210,11 +210,11 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_modify_w_level
210
  $paypal["s2member_log"][] = "Page Expired. Redirecting Customer to the Home Page.";
211
  /**/
212
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
213
- '<strong>Page Expired:</strong> Duplicate Return-Data.<br />Please contact Support if you need any assistance.',/**/
214
- "Back To Home Page", home_url ("/"));
215
  }
216
  /**/
217
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
218
  do_action ("ws_plugin__s2member_during_paypal_return_after_subscr_modify", get_defined_vars ());
219
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
220
  /**/
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_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"]))/**/)
48
  {
49
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
50
  do_action ("ws_plugin__s2member_during_paypal_return_before_subscr_modify", get_defined_vars ());
51
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
52
  /**/
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); /* Now update the $user object we're using. */
92
  }
93
  /**/
162
  }
163
  }
164
  /**/
165
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
166
  do_action ("ws_plugin__s2member_during_paypal_return_during_subscr_modify", get_defined_vars ());
167
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
168
  /**/
170
  {
171
  $paypal["s2member_log"][] = "Redirecting this Member to a custom URL after modification: " . $redirection_url_after_modification;
172
  /**/
173
+ wp_redirect ($redirection_url_after_modification);
174
  }
175
  else /* Else, use standard/default handling in this scenario. Have the Customer log in again. */
176
  {
177
  $paypal["s2member_log"][] = "Redirecting Customer to the Login Page. They need to log back in.";
178
  /**/
179
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
180
+ '<strong>' . _x ("Thank you! You've been updated to:", "s2member-front", "s2member") . '<br /><em>' . esc_html ($paypal["item_name"]) . '</em></strong>',/**/
181
+ _x ("Please Log Back In ( Click Here )", "s2member-front", "s2member"), wp_login_url ());
182
  }
183
  }
184
  else /* Else, unable to modify Subscription. The existing User ID is associated with an Administrator. Stopping here. */
188
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
189
  /**/
190
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
191
+ _x ('<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access. Please make sure that you are NOT logged in as an Administrator while testing.', "s2member-front", "s2member"),/**/
192
+ _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
193
  }
194
  }
195
  else /* Unable to modify Subscription. Could not get the existing User ID from the DB. */
199
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
200
  /**/
201
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
202
+ _x ('<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />Could not get the existing User ID from the DB.', "s2member-front", "s2member"),/**/
203
+ _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
204
  }
205
  }
206
  else /* Page Expired. Duplicate Return-Data. */
210
  $paypal["s2member_log"][] = "Page Expired. Redirecting Customer to the Home Page.";
211
  /**/
212
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
213
+ _x ('<strong>Page Expired:</strong> Duplicate Return-Data.<br />Please contact Support if you need any assistance.', "s2member-front", "s2member"),/**/
214
+ _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
215
  }
216
  /**/
217
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
218
  do_action ("ws_plugin__s2member_during_paypal_return_after_subscr_modify", get_defined_vars ());
219
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
220
  /**/
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
  /**/
@@ -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,15 +216,15 @@ 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
  {
223
  $paypal["s2member_log"][] = "Redirecting Customer to the Login Page. They need to log back in.";
224
  /**/
225
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
226
- '<strong>Thank you! You\'ve been updated to:<br /><em>' . esc_html ($paypal["item_name"]) . '</em></strong>',/**/
227
- "Please Log Back In ( Click Here )", wp_login_url ());
228
  }
229
  }
230
  else /* Unable to modify Subscription. The existing User ID is associated with an Administrator. Stopping here. */
@@ -234,8 +234,8 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
234
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
235
  /**/
236
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
237
- '<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access. Please make sure that you are NOT logged in as an Administrator while testing.',/**/
238
- "Back To Home Page", home_url ("/"));
239
  }
240
  }
241
  else /* Unable to modify Subscription. Could not get the existing User ID from the DB. */
@@ -245,11 +245,11 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
245
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
246
  /**/
247
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
248
- '<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />Could not get the existing User ID from the DB.',/**/
249
- "Back To Home Page", 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,21 +305,21 @@ 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
  {
318
  $paypal["s2member_log"][] = "Redirecting Customer to Signup Page. They need to Signup/Register now.";
319
  /**/
320
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
321
- '<strong>Thank you! Your account has been approved.<br />The next step is to Register a Username for immediate access.</strong>',/**/
322
- "Please Register Now ( Click Here )", c_ws_plugin__s2member_utils_urls::wp_signup_url ());
323
  }
324
  }
325
  else /* Otherwise, this is NOT a Multisite install. Or it is, but the Super Administrator is NOT selling Blog creation. */
@@ -328,25 +328,25 @@ 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
  {
341
  $paypal["s2member_log"][] = "Redirecting Customer to Registration Page. They need to Register now.";
342
  /**/
343
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
344
- '<strong>Thank you! Your account has been approved.<br />The next step is to Register a Username for immediate access.</strong>',/**/
345
- "Please Register Now ( Click Here )", c_ws_plugin__s2member_utils_urls::wp_register_url ());
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
  }
@@ -358,11 +358,11 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
358
  $paypal["s2member_log"][] = "Page Expired. Redirecting Customer to the Home Page.";
359
  /**/
360
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
361
- '<strong>Page Expired:</strong> Duplicate Return-Data.<br />Please contact Support if you need any assistance.',/**/
362
- "Back To Home Page", 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
  /**/
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
  {
223
  $paypal["s2member_log"][] = "Redirecting Customer to the Login Page. They need to log back in.";
224
  /**/
225
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
226
+ '<strong>' . _x ("Thank you! You've been updated to:", "s2member-front", "s2member") . '<br /><em>' . esc_html ($paypal["item_name"]) . '</em></strong>',/**/
227
+ _x ("Please Log Back In ( Click Here )", "s2member-front", "s2member"), wp_login_url ());
228
  }
229
  }
230
  else /* Unable to modify Subscription. The existing User ID is associated with an Administrator. Stopping here. */
234
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
235
  /**/
236
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
237
+ _x ('<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access. Please make sure that you are NOT logged in as an Administrator while testing.', "s2member-front", "s2member"),/**/
238
+ _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
239
  }
240
  }
241
  else /* Unable to modify Subscription. Could not get the existing User ID from the DB. */
245
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
246
  /**/
247
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
248
+ _x ('<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />Could not get the existing User ID from the DB.', "s2member-front", "s2member"),/**/
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
  {
318
  $paypal["s2member_log"][] = "Redirecting Customer to Signup Page. They need to Signup/Register now.";
319
  /**/
320
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
321
+ _x ('<strong>Thank you! Your account has been approved.<br />The next step is to Register a Username for immediate access.</strong>', "s2member-front", "s2member"),/**/
322
+ _x ("Please Register Now ( Click Here )", "s2member-front", "s2member"), c_ws_plugin__s2member_utils_urls::wp_signup_url ());
323
  }
324
  }
325
  else /* Otherwise, this is NOT a Multisite install. Or it is, but the Super Administrator is NOT selling Blog creation. */
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
  {
341
  $paypal["s2member_log"][] = "Redirecting Customer to Registration Page. They need to Register now.";
342
  /**/
343
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
344
+ _x ('<strong>Thank you! Your account has been approved.<br />The next step is to Register a Username for immediate access.</strong>', "s2member-front", "s2member"),/**/
345
+ _x ("Please Register Now ( Click Here )", "s2member-front", "s2member"), c_ws_plugin__s2member_utils_urls::wp_register_url ());
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
  }
358
  $paypal["s2member_log"][] = "Page Expired. Redirecting Customer to the Home Page.";
359
  /**/
360
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
361
+ _x ('<strong>Page Expired:</strong> Duplicate Return-Data.<br />Please contact Support if you need any assistance.', "s2member-front", "s2member"),/**/
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
  /**/
@@ -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,15 +136,15 @@ 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
  {
143
  $paypal["s2member_log"][] = "Redirecting Customer to the Login Page. They need to log back in.";
144
  /**/
145
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
146
- '<strong>Thank you! You now have access to:<br /><em>' . esc_html ($paypal["item_name"]) . '</em></strong>',/**/
147
- "Please Log Back In ( Click Here )", wp_login_url ());
148
  }
149
  }
150
  else /* Unable to add new Capabilities. The existing User ID is associated with an Administrator. Stopping here. */
@@ -154,8 +154,8 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_wa_ccaps_wo_level"))
154
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
155
  /**/
156
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
157
- '<strong>ERROR:</strong> Unable to add new Capabilities.<br />Please contact Support for assistance.<br /><br />The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access. Please make sure that you are NOT logged in as an Administrator while testing.',/**/
158
- "Back To Home Page", home_url ("/"));
159
  }
160
  }
161
  else /* Unable to add new Capabilities. Could not get the existing User ID from the DB. */
@@ -165,8 +165,8 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_wa_ccaps_wo_level"))
165
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
166
  /**/
167
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
168
- '<strong>ERROR:</strong> Unable to add new Capabilities.<br />Please contact Support for assistance.<br /><br />Could not get the existing User ID from the DB.',/**/
169
- "Back To Home Page", home_url ("/"));
170
  }
171
  }
172
  else /* Unable to add new Capabilities. Missing User/Member details. */
@@ -176,8 +176,8 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_wa_ccaps_wo_level"))
176
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
177
  /**/
178
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
179
- '<strong>ERROR:</strong> Unable to add new Capabilities.<br />Please contact Support for assistance.<br /><br />Missing User/Member details.',/**/
180
- "Back To Home Page", home_url ("/"));
181
  }
182
  }
183
  else /* Page Expired. Duplicate Return-Data. */
@@ -187,11 +187,11 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_wa_ccaps_wo_level"))
187
  $paypal["s2member_log"][] = "Page Expired. Redirecting Customer to the Home Page.";
188
  /**/
189
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
190
- '<strong>Page Expired:</strong> Duplicate Return-Data.<br />Please contact Support if you need any assistance.',/**/
191
- "Back To Home Page", 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
  /**/
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
  {
143
  $paypal["s2member_log"][] = "Redirecting Customer to the Login Page. They need to log back in.";
144
  /**/
145
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
146
+ '<strong>' . _x ("Thank you! You now have access to:", "s2member-front", "s2member") . '<br /><em>' . esc_html ($paypal["item_name"]) . '</em></strong>',/**/
147
+ _x ("Please Log Back In ( Click Here )", "s2member-front", "s2member"), wp_login_url ());
148
  }
149
  }
150
  else /* Unable to add new Capabilities. The existing User ID is associated with an Administrator. Stopping here. */
154
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
155
  /**/
156
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
157
+ _x ('<strong>ERROR:</strong> Unable to add new Capabilities.<br />Please contact Support for assistance.<br /><br />The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access. Please make sure that you are NOT logged in as an Administrator while testing.', "s2member-front", "s2member"),/**/
158
+ _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
159
  }
160
  }
161
  else /* Unable to add new Capabilities. Could not get the existing User ID from the DB. */
165
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
166
  /**/
167
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
168
+ _x ('<strong>ERROR:</strong> Unable to add new Capabilities.<br />Please contact Support for assistance.<br /><br />Could not get the existing User ID from the DB.', "s2member-front", "s2member"),/**/
169
+ _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
170
  }
171
  }
172
  else /* Unable to add new Capabilities. Missing User/Member details. */
176
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
177
  /**/
178
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
179
+ _x ('<strong>ERROR:</strong> Unable to add new Capabilities.<br />Please contact Support for assistance.<br /><br />Missing User/Member details.', "s2member-front", "s2member"),/**/
180
+ _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
181
  }
182
  }
183
  else /* Page Expired. Duplicate Return-Data. */
187
  $paypal["s2member_log"][] = "Page Expired. Redirecting Customer to the Home Page.";
188
  /**/
189
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
190
+ _x ('<strong>Page Expired:</strong> Duplicate Return-Data.<br />Please contact Support if you need any assistance.', "s2member-front", "s2member"),/**/
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/paypal-return-in-web-accept-sp.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_web_accept_sp"))
21
  {
@@ -40,14 +40,14 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_web_accept_sp"))
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"]["sp_access_item_number_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"]))/**/)
49
  {
50
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
51
  do_action ("ws_plugin__s2member_during_paypal_return_before_sp_access", get_defined_vars ());
52
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
53
  /**/
@@ -85,7 +85,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_web_accept_sp"))
85
  }
86
  }
87
  /**/
88
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
89
  do_action ("ws_plugin__s2member_during_paypal_return_during_sp_access", get_defined_vars ());
90
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
91
  /**/
@@ -93,21 +93,21 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_web_accept_sp"))
93
  {
94
  $paypal["s2member_log"][] = "Redirecting Customer immediately to the Specific Post/Page.";
95
  /**/
96
- wp_redirect ($sp_access_url); /* Immediate redirection to Specific Post/Page. */
97
  }
98
  else if ($custom_success_redirection) /* Using a custom success redirection URL? */
99
  {
100
  $paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection;
101
  /**/
102
- wp_redirect ($custom_success_redirection);
103
  }
104
  else /* Else use the default return URL in this scenario, which is the Specific Post/Page. */
105
  {
106
  $paypal["s2member_log"][] = "Redirecting Customer to the Specific Post/Page.";
107
  /**/
108
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
109
- '<strong>Thank You! Your transaction has been approved.</strong>',/**/
110
- "Continue ( Click Here )", $sp_access_url);
111
  }
112
  }
113
  else /* Otherwise, the ID must have been invalid. Or the Post/Page was deleted. */
@@ -117,8 +117,8 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_web_accept_sp"))
117
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
118
  /**/
119
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
120
- '<strong>ERROR:</strong> Unable to generate Access Link.<br />Please contact Support for assistance.',/**/
121
- "Back To Home Page", home_url ("/"));
122
  }
123
  }
124
  else /* Page Expired. Duplicate Return-Data. */
@@ -128,11 +128,11 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_web_accept_sp"))
128
  $paypal["s2member_log"][] = "Page Expired. Redirecting Customer to the Home Page.";
129
  /**/
130
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
131
- '<strong>Page Expired:</strong> Duplicate Return-Data.<br />Please contact Support if you need any assistance.',/**/
132
- "Back To Home Page", home_url ("/"));
133
  }
134
  /**/
135
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
136
  do_action ("ws_plugin__s2member_during_paypal_return_after_sp_access", get_defined_vars ());
137
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
138
  /**/
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_web_accept_sp"))
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"]["sp_access_item_number_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"]))/**/)
49
  {
50
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
51
  do_action ("ws_plugin__s2member_during_paypal_return_before_sp_access", get_defined_vars ());
52
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
53
  /**/
85
  }
86
  }
87
  /**/
88
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
89
  do_action ("ws_plugin__s2member_during_paypal_return_during_sp_access", get_defined_vars ());
90
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
91
  /**/
93
  {
94
  $paypal["s2member_log"][] = "Redirecting Customer immediately to the Specific Post/Page.";
95
  /**/
96
+ wp_redirect($sp_access_url); /* Immediate redirection to Specific Post/Page. */
97
  }
98
  else if ($custom_success_redirection) /* Using a custom success redirection URL? */
99
  {
100
  $paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection;
101
  /**/
102
+ wp_redirect($custom_success_redirection);
103
  }
104
  else /* Else use the default return URL in this scenario, which is the Specific Post/Page. */
105
  {
106
  $paypal["s2member_log"][] = "Redirecting Customer to the Specific Post/Page.";
107
  /**/
108
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
109
+ _x ('<strong>Thank You! Your transaction has been approved.</strong>', "s2member-front", "s2member"),/**/
110
+ _x ("Continue ( Click Here )", "s2member-front", "s2member"), $sp_access_url);
111
  }
112
  }
113
  else /* Otherwise, the ID must have been invalid. Or the Post/Page was deleted. */
117
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
118
  /**/
119
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
120
+ _x ('<strong>ERROR:</strong> Unable to generate Access Link.<br />Please contact Support for assistance.', "s2member-front", "s2member"),/**/
121
+ _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
122
  }
123
  }
124
  else /* Page Expired. Duplicate Return-Data. */
128
  $paypal["s2member_log"][] = "Page Expired. Redirecting Customer to the Home Page.";
129
  /**/
130
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
131
+ _x ('<strong>Page Expired:</strong> Duplicate Return-Data.<br />Please contact Support if you need any assistance.', "s2member-front", "s2member"),/**/
132
+ _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
133
  }
134
  /**/
135
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
136
  do_action ("ws_plugin__s2member_during_paypal_return_after_sp_access", get_defined_vars ());
137
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
138
  /**/
includes/classes/paypal-return-in.inc.php CHANGED
@@ -87,8 +87,8 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in"))
87
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
88
  /**/
89
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
90
- '<strong>ERROR:</strong> Unexpected <code>txn_type/status</code>.<br />The <code>txn_type/status</code> did not meet requirements.<br />Please contact Support for assistance.',/**/
91
- "Back To Home Page", home_url ("/"));
92
  }
93
  }
94
  else /* Else a custom conditional has been applied by filters. */
@@ -101,8 +101,8 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in"))
101
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
102
  /**/
103
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
104
- '<strong>ERROR:</strong> Unable to verify <code>$_SERVER["HTTP_HOST"]</code>.<br />Please contact Support for assistance.<br /><br />If you are the site owner, please check the <code>custom</code> value in your Button Code. It MUST start with your domain name.',/**/
105
- "Back To Home Page", home_url ("/"));
106
  }
107
  }
108
  else /* In this case ... a Proxy has explicitly requested `ty-email` processing. */
@@ -129,8 +129,8 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in"))
129
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
130
  /**/
131
  echo c_ws_plugin__s2member_return_templates::return_template ("default",/**/
132
- '<strong>ERROR:</strong> Unable to verify <code>$_POST</code> vars.<br />Please contact Support for assistance.<br /><br />This is most likely related to an invalid configuration of s2Member, or a problem with server compatibility. If you are the site owner, and you\'re absolutely SURE that your configuration is valid, you may want to run some tests on your server, just to be sure <code>$_POST</code> variables are populated, and that your server is able to connect/communicate with your Payment Gateway over an HTTPS connection.<br /><br />s2Member uses the <code>WP_Http</code> class for remote connections; which will try to use <code>cURL</code> first, and then fall back on the <code>FOPEN</code> method when <code>cURL</code> is not available. On a Windows® server, you may have to disable your <code>cURL</code> extension; and instead, set <code>allow_url_fopen = yes</code> in your php.ini file. The <code>cURL</code> extension (usually) does NOT support SSL connections on a Windows® server.<br /><br />Please see <a href="http://www.primothemes.com/forums/viewtopic.php?f=36&t=2636" target="_blank">this thread</a> for details regarding the ideal server configuration for s2Member.',/**/
133
- "Back To Home Page", home_url ("/"));
134
  }
135
  /*
136
  Add RTN proxy ( when available ) to the ``$paypal`` array.
87
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
88
  /**/
89
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
90
+ _x ('<strong>ERROR:</strong> Unexpected <code>txn_type/status</code>.<br />The <code>txn_type/status</code> did not meet requirements.<br />Please contact Support for assistance.', "s2member-front", "s2member"),/**/
91
+ _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
92
  }
93
  }
94
  else /* Else a custom conditional has been applied by filters. */
101
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
102
  /**/
103
  echo c_ws_plugin__s2member_return_templates::return_template ($paypal["subscr_gateway"],/**/
104
+ _x ('<strong>ERROR:</strong> Unable to verify <code>$_SERVER["HTTP_HOST"]</code>.<br />Please contact Support for assistance.<br /><br />If you are the site owner, please check the <code>custom</code> value in your Button Code. It MUST start with your domain name.', "s2member-front", "s2member"),/**/
105
+ _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
106
  }
107
  }
108
  else /* In this case ... a Proxy has explicitly requested `ty-email` processing. */
129
  $paypal["s2member_log"][] = "Redirecting Customer to the Home Page, due to an error that occurred.";
130
  /**/
131
  echo c_ws_plugin__s2member_return_templates::return_template ("default",/**/
132
+ _x ('<strong>ERROR:</strong> Unable to verify <code>$_POST</code> vars.<br />Please contact Support for assistance.<br /><br />This is most likely related to an invalid configuration of s2Member, or a problem with server compatibility. If you are the site owner, and you\'re absolutely SURE that your configuration is valid, you may want to run some tests on your server, just to be sure <code>$_POST</code> variables are populated, and that your server is able to connect/communicate with your Payment Gateway over an HTTPS connection.<br /><br />s2Member uses the <code>WP_Http</code> class for remote connections; which will try to use <code>cURL</code> first, and then fall back on the <code>FOPEN</code> method when <code>cURL</code> is not available. On a Windows® server, you may have to disable your <code>cURL</code> extension; and instead, set <code>allow_url_fopen = yes</code> in your php.ini file. The <code>cURL</code> extension (usually) does NOT support SSL connections on a Windows® server.<br /><br />Please see <a href="http://www.primothemes.com/forums/viewtopic.php?f=36&t=2636" target="_blank">this thread</a> for details regarding the ideal server configuration for s2Member.', "s2member-front", "s2member"),/**/
133
+ _x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
134
  }
135
  /*
136
  Add RTN proxy ( when available ) to the ``$paypal`` array.
includes/classes/paypal-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_paypal_utilities"))
21
  {
@@ -37,13 +37,13 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
37
  */
38
  public static function paypal_postvars ()
39
  {
40
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
41
  do_action ("ws_plugin__s2member_before_paypal_postvars", get_defined_vars ());
42
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
43
  /*
44
  Custom conditionals can be applied by filters.
45
  */
46
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
47
  if (!($postvars = apply_filters ("ws_plugin__s2member_during_paypal_postvars_conditionals", array (), get_defined_vars ())))
48
  {
49
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
@@ -74,7 +74,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
74
  {
75
  foreach ($postvars as $key => $value)
76
  if (preg_match ("/^s2member_/", $key))
77
- unset ($postvars[$key]);
78
  /**/
79
  $postback = $postvars; /* Copy. */
80
  $postback["cmd"] = "_notify-validate";
@@ -114,7 +114,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
114
  {
115
  global $current_site, $current_blog; /* Multisite Networking. */
116
  /**/
117
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
118
  do_action ("ws_plugin__s2member_before_paypal_proxy_key_gen", get_defined_vars ());
119
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
120
  /**/
@@ -136,12 +136,13 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
136
  * @return array An array of variables returned by the PayPal® API.
137
  *
138
  * @todo Optimize this routine with ``empty()`` and ``isset()``.
 
139
  */
140
  public static function paypal_api_response ($post_vars = FALSE)
141
  {
142
  global $current_site, $current_blog; /* For Multisite support. */
143
  /**/
144
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
145
  do_action ("ws_plugin__s2member_before_paypal_api_response", get_defined_vars ());
146
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
147
  /**/
@@ -166,11 +167,12 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
166
  /**/
167
  if (!$response["ACK"] || !preg_match ("/^(Success|SuccessWithWarning)$/i", $response["ACK"]))
168
  {
169
- if (strlen ($response["L_ERRORCODE0"]) || $response["L_SHORTMESSAGE0"] || $response["L_LONGMESSAGE0"]) /* Did we at least get an error msg? */
170
- $response["__error"] = "Error# " . $response["L_ERRORCODE0"] . ". " . rtrim ($response["L_SHORTMESSAGE0"], ".") . ". " . rtrim ($response["L_LONGMESSAGE0"], ".") . ".";
 
171
  /**/
172
  else /* Else, generate an error messsage - so something is reported back to the Customer. */
173
- $response["__error"] = "Error. Please contact Support for assistance.";
174
  }
175
  /*
176
  If debugging is enabled; we need to maintain a comprehensive log file.
@@ -207,20 +209,20 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
207
  */
208
  public static function _paypal_api_response_filters ($response = FALSE)
209
  {
210
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
211
  do_action ("_ws_plugin__s2member_before_paypal_api_response_filters", get_defined_vars ());
212
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
213
  /**/
214
  if (!empty ($response["__error"]) && !empty ($response["L_ERRORCODE0"]))
215
  {
216
- if ($response["L_ERRORCODE0"] == 10422)
217
- $response["__error"] = "Error# " . $response["L_ERRORCODE0"] . ". Transaction declined. Please use an alternate funding source.";
218
  /**/
219
- else if ($response["L_ERRORCODE0"] == 10435)
220
- $response["__error"] = "Error# " . $response["L_ERRORCODE0"] . ". Transaction declined. Express Checkout was NOT confirmed.";
221
  /**/
222
- else if ($response["L_ERRORCODE0"] == 10417)
223
- $response["__error"] = "Error# " . $response["L_ERRORCODE0"] . ". Transaction declined. Please use an alternate funding source.";
224
  }
225
  /**/
226
  return $response; /* Filters already applied with: ``ws_plugin__s2member_paypal_api_response``. */
@@ -236,7 +238,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
236
  */
237
  public static function paypal_pro_term ($term = FALSE)
238
  {
239
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
240
  do_action ("ws_plugin__s2member_before_paypal_pro_term", get_defined_vars ());
241
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
242
  /**/
@@ -257,7 +259,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
257
  */
258
  public static function paypal_std_term ($term = FALSE)
259
  {
260
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
261
  do_action ("ws_plugin__s2member_before_paypal_std_term", get_defined_vars ());
262
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
263
  /**/
@@ -278,7 +280,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
278
  */
279
  public static function paypal_pro_subscr_id ($array_or_string = FALSE)
280
  {
281
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
282
  do_action ("ws_plugin__s2member_before_paypal_pro_subscr_id", get_defined_vars ());
283
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
284
  /**/
@@ -305,7 +307,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
305
  */
306
  public static function paypal_pro_item_number ($array_or_string = FALSE)
307
  {
308
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
309
  do_action ("ws_plugin__s2member_before_paypal_pro_item_number", get_defined_vars ());
310
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
311
  /**/
@@ -340,7 +342,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
340
  */
341
  public static function paypal_pro_item_name ($array_or_string = FALSE)
342
  {
343
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
344
  do_action ("ws_plugin__s2member_before_paypal_pro_item_name", get_defined_vars ());
345
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
346
  /**/
@@ -369,11 +371,12 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
369
  *
370
  * @param str|array $array_or_string Either an array of PayPal® post vars, or a string.
371
  * If it's a string, we make sure it is a valid `period term` combination.
 
372
  * @return str A `period1` string if possible, or defaults to `0 D`.
373
  */
374
- public static function paypal_pro_period1 ($array_or_string = FALSE)
375
  {
376
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
377
  do_action ("ws_plugin__s2member_before_paypal_pro_period1", get_defined_vars ());
378
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
379
  /**/
@@ -394,7 +397,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
394
  /**/
395
  if (strtoupper ($span) === "SEMIMONTH")
396
  if (is_numeric ($num) && $num >= 1)
397
- eval ('$num = "2"; $span = "W";');
398
  /**/
399
  if (strlen ($span) !== 1) /* To Standard format. */
400
  $span = c_ws_plugin__s2member_paypal_utilities::paypal_std_term ($span);
@@ -402,12 +405,12 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
402
  $span = (preg_match ("/^[DWMY]$/i", $span)) ? $span : "";
403
  $num = ($span && is_numeric ($num) && $num >= 0) ? $num : "";
404
  /**/
405
- $period1 = ($num && $span) ? $num . " " . strtoupper ($span) : "0 D";
406
  /**/
407
  return apply_filters ("ws_plugin__s2member_paypal_pro_period1", $period1, get_defined_vars ());
408
  }
409
  else /* Default. */
410
- return apply_filters ("ws_plugin__s2member_paypal_pro_period1", "0 D", get_defined_vars ());
411
  }
412
  /**
413
  * Get `period3` from either an array with `PROFILEREFERENCE|rp_invoice_id|period3`, or use an existing string.
@@ -421,11 +424,12 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
421
  *
422
  * @param str|array $array_or_string Either an array of PayPal® post vars, or a string.
423
  * If it's a string, we make sure it is a valid `period term` combination.
 
424
  * @return str A `period3` string if possible, or defaults to `1 D`.
425
  */
426
- public static function paypal_pro_period3 ($array_or_string = FALSE)
427
  {
428
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
429
  do_action ("ws_plugin__s2member_before_paypal_pro_period3", get_defined_vars ());
430
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
431
  /**/
@@ -446,7 +450,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
446
  /**/
447
  if (strtoupper ($span) === "SEMIMONTH")
448
  if (is_numeric ($num) && $num >= 1)
449
- eval ('$num = "2"; $span = "W";');
450
  /**/
451
  if (strlen ($span) !== 1) /* To Standard format. */
452
  $span = c_ws_plugin__s2member_paypal_utilities::paypal_std_term ($span);
@@ -454,12 +458,12 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
454
  $span = (preg_match ("/^[DWMY]$/i", $span)) ? $span : "";
455
  $num = ($span && is_numeric ($num) && $num >= 0) ? $num : "";
456
  /**/
457
- $period3 = ($num && $span) ? $num . " " . strtoupper ($span) : "1 D";
458
  /**/
459
  return apply_filters ("ws_plugin__s2member_paypal_pro_period3", $period3, get_defined_vars ());
460
  }
461
  else /* Default. */
462
- return apply_filters ("ws_plugin__s2member_paypal_pro_period3", "1 D", get_defined_vars ());
463
  }
464
  }
465
  }
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_paypal_utilities"))
21
  {
37
  */
38
  public static function paypal_postvars ()
39
  {
40
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
41
  do_action ("ws_plugin__s2member_before_paypal_postvars", get_defined_vars ());
42
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
43
  /*
44
  Custom conditionals can be applied by filters.
45
  */
46
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
47
  if (!($postvars = apply_filters ("ws_plugin__s2member_during_paypal_postvars_conditionals", array (), get_defined_vars ())))
48
  {
49
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
74
  {
75
  foreach ($postvars as $key => $value)
76
  if (preg_match ("/^s2member_/", $key))
77
+ unset($postvars[$key]);
78
  /**/
79
  $postback = $postvars; /* Copy. */
80
  $postback["cmd"] = "_notify-validate";
114
  {
115
  global $current_site, $current_blog; /* Multisite Networking. */
116
  /**/
117
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
118
  do_action ("ws_plugin__s2member_before_paypal_proxy_key_gen", get_defined_vars ());
119
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
120
  /**/
136
  * @return array An array of variables returned by the PayPal® API.
137
  *
138
  * @todo Optimize this routine with ``empty()`` and ``isset()``.
139
+ * @todo Possibly integrate this API: {@link http://msdn.microsoft.com/en-us/library/ff512417.aspx}.
140
  */
141
  public static function paypal_api_response ($post_vars = FALSE)
142
  {
143
  global $current_site, $current_blog; /* For Multisite support. */
144
  /**/
145
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
146
  do_action ("ws_plugin__s2member_before_paypal_api_response", get_defined_vars ());
147
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
148
  /**/
167
  /**/
168
  if (!$response["ACK"] || !preg_match ("/^(Success|SuccessWithWarning)$/i", $response["ACK"]))
169
  {
170
+ if (strlen ($response["L_ERRORCODE0"]) || $response["L_SHORTMESSAGE0"] || $response["L_LONGMESSAGE0"])
171
+ /* translators: Exclude `%2$s` and `%3$s`. These are English details returned by PayPal®. Replace `%2$s` and `%3$s` with: `Unable to process, please try again`, or something to that affect. Or, if you prefer, you could Filter ``$response["__error"]`` with `ws_plugin__s2member_paypal_api_response`. */
172
+ $response["__error"] = sprintf (_x ('Error #%1$s. %2$s. %3$s.', "s2member-front", "s2member"), $response["L_ERRORCODE0"], rtrim ($response["L_SHORTMESSAGE0"], "."), rtrim ($response["L_LONGMESSAGE0"], "."));
173
  /**/
174
  else /* Else, generate an error messsage - so something is reported back to the Customer. */
175
+ $response["__error"] = _x ("Error. Please contact Support for assistance.", "s2member-front", "s2member");
176
  }
177
  /*
178
  If debugging is enabled; we need to maintain a comprehensive log file.
209
  */
210
  public static function _paypal_api_response_filters ($response = FALSE)
211
  {
212
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
213
  do_action ("_ws_plugin__s2member_before_paypal_api_response_filters", get_defined_vars ());
214
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
215
  /**/
216
  if (!empty ($response["__error"]) && !empty ($response["L_ERRORCODE0"]))
217
  {
218
+ if ((int)$response["L_ERRORCODE0"] === 10422)
219
+ $response["__error"] = sprintf (_x ("Error #%s. Transaction declined. Please use an alternate funding source.", "s2member-front", "s2member"), $response["L_ERRORCODE0"]);
220
  /**/
221
+ else if ((int)$response["L_ERRORCODE0"] === 10435)
222
+ $response["__error"] = sprintf (_x ("Error #%s. Transaction declined. Express Checkout was NOT confirmed.", "s2member-front", "s2member"), $response["L_ERRORCODE0"]);
223
  /**/
224
+ else if ((int)$response["L_ERRORCODE0"] === 10417)
225
+ $response["__error"] = sprintf (_x ("Error #%s. Transaction declined. Please use an alternate funding source.", "s2member-front", "s2member"), $response["L_ERRORCODE0"]);
226
  }
227
  /**/
228
  return $response; /* Filters already applied with: ``ws_plugin__s2member_paypal_api_response``. */
238
  */
239
  public static function paypal_pro_term ($term = FALSE)
240
  {
241
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
242
  do_action ("ws_plugin__s2member_before_paypal_pro_term", get_defined_vars ());
243
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
244
  /**/
259
  */
260
  public static function paypal_std_term ($term = FALSE)
261
  {
262
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
263
  do_action ("ws_plugin__s2member_before_paypal_std_term", get_defined_vars ());
264
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
265
  /**/
280
  */
281
  public static function paypal_pro_subscr_id ($array_or_string = FALSE)
282
  {
283
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
284
  do_action ("ws_plugin__s2member_before_paypal_pro_subscr_id", get_defined_vars ());
285
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
286
  /**/
307
  */
308
  public static function paypal_pro_item_number ($array_or_string = FALSE)
309
  {
310
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
311
  do_action ("ws_plugin__s2member_before_paypal_pro_item_number", get_defined_vars ());
312
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
313
  /**/
342
  */
343
  public static function paypal_pro_item_name ($array_or_string = FALSE)
344
  {
345
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
346
  do_action ("ws_plugin__s2member_before_paypal_pro_item_name", get_defined_vars ());
347
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
348
  /**/
371
  *
372
  * @param str|array $array_or_string Either an array of PayPal® post vars, or a string.
373
  * If it's a string, we make sure it is a valid `period term` combination.
374
+ * @param str $default Optional. Value if unavailable. Defaults to `0 D`.
375
  * @return str A `period1` string if possible, or defaults to `0 D`.
376
  */
377
+ public static function paypal_pro_period1 ($array_or_string = FALSE, $default = "0 D")
378
  {
379
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
380
  do_action ("ws_plugin__s2member_before_paypal_pro_period1", get_defined_vars ());
381
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
382
  /**/
397
  /**/
398
  if (strtoupper ($span) === "SEMIMONTH")
399
  if (is_numeric ($num) && $num >= 1)
400
+ eval('$num = "2"; $span = "W";');
401
  /**/
402
  if (strlen ($span) !== 1) /* To Standard format. */
403
  $span = c_ws_plugin__s2member_paypal_utilities::paypal_std_term ($span);
405
  $span = (preg_match ("/^[DWMY]$/i", $span)) ? $span : "";
406
  $num = ($span && is_numeric ($num) && $num >= 0) ? $num : "";
407
  /**/
408
+ $period1 = ($num && $span) ? $num . " " . strtoupper ($span) : $default;
409
  /**/
410
  return apply_filters ("ws_plugin__s2member_paypal_pro_period1", $period1, get_defined_vars ());
411
  }
412
  else /* Default. */
413
+ return apply_filters ("ws_plugin__s2member_paypal_pro_period1", $default, get_defined_vars ());
414
  }
415
  /**
416
  * Get `period3` from either an array with `PROFILEREFERENCE|rp_invoice_id|period3`, or use an existing string.
424
  *
425
  * @param str|array $array_or_string Either an array of PayPal® post vars, or a string.
426
  * If it's a string, we make sure it is a valid `period term` combination.
427
+ * @param str $default Optional. Value if unavailable. Defaults to `1 D`.
428
  * @return str A `period3` string if possible, or defaults to `1 D`.
429
  */
430
+ public static function paypal_pro_period3 ($array_or_string = FALSE, $default = "1 D")
431
  {
432
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
433
  do_action ("ws_plugin__s2member_before_paypal_pro_period3", get_defined_vars ());
434
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
435
  /**/
450
  /**/
451
  if (strtoupper ($span) === "SEMIMONTH")
452
  if (is_numeric ($num) && $num >= 1)
453
+ eval('$num = "2"; $span = "W";');
454
  /**/
455
  if (strlen ($span) !== 1) /* To Standard format. */
456
  $span = c_ws_plugin__s2member_paypal_utilities::paypal_std_term ($span);
458
  $span = (preg_match ("/^[DWMY]$/i", $span)) ? $span : "";
459
  $num = ($span && is_numeric ($num) && $num >= 0) ? $num : "";
460
  /**/
461
+ $period3 = ($num && $span) ? $num . " " . strtoupper ($span) : $default;
462
  /**/
463
  return apply_filters ("ws_plugin__s2member_paypal_pro_period3", $period3, get_defined_vars ());
464
  }
465
  else /* Default. */
466
+ return apply_filters ("ws_plugin__s2member_paypal_pro_period3", $default, get_defined_vars ());
467
  }
468
  }
469
  }
includes/classes/profile-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_in"))
21
  {
@@ -55,53 +55,53 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
55
  /**/
56
  echo '<form method="post" name="ws_plugin__s2member_profile" id="ws-plugin--s2member-profile" action="' . esc_attr (site_url ("/")) . '">' . "\n";
57
  /**/
58
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
59
  do_action ("ws_plugin__s2member_during_profile_before_table", get_defined_vars ());
60
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
61
  /**/
62
  echo '<table cellpadding="0" cellspacing="0">' . "\n";
63
  echo '<tbody>' . "\n";
64
  /**/
65
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
66
  do_action ("ws_plugin__s2member_during_profile_before_fields", get_defined_vars ());
67
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
68
  /**/
69
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_username", true, get_defined_vars ()))
70
  {
71
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
72
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_username", get_defined_vars ());
73
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
74
  /**/
75
  echo '<tr>' . "\n";
76
  echo '<td>' . "\n";
77
  echo '<label for="ws-plugin--s2member-profile-login">' . "\n";
78
- echo '<strong>Username *</strong> <small>( cannot be changed )</small><br />' . "\n";
79
  echo '<input aria-required="true" type="text" maxlength="60" name="ws_plugin__s2member_profile_login" id="ws-plugin--s2member-profile-login" class="ws-plugin--s2member-profile-field" value="' . format_to_edit ($user->user_login) . '" disabled="disabled" />' . "\n";
80
  echo '</label>' . "\n";
81
  echo '</td>' . "\n";
82
  echo '</tr>' . "\n";
83
  /**/
84
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
85
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_username", get_defined_vars ());
86
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
87
  }
88
  /**/
89
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_email", true, get_defined_vars ()))
90
  {
91
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
92
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_email", get_defined_vars ());
93
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
94
  /**/
95
  echo '<tr>' . "\n";
96
  echo '<td>' . "\n";
97
  echo '<label for="ws-plugin--s2member-profile-email">' . "\n";
98
- echo '<strong>Email Address *</strong><br />' . "\n";
99
  echo '<input aria-required="true" data-expected="email" type="text" maxlength="100" name="ws_plugin__s2member_profile_email" id="ws-plugin--s2member-profile-email" class="ws-plugin--s2member-profile-field" value="' . format_to_edit ($user->user_email) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
100
  echo '</label>' . "\n";
101
  echo '</td>' . "\n";
102
  echo '</tr>' . "\n";
103
  /**/
104
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
105
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_email", get_defined_vars ());
106
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
107
  }
@@ -110,60 +110,60 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
110
  {
111
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_first_name", true, get_defined_vars ()))
112
  {
113
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
114
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_first_name", get_defined_vars ());
115
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
116
  /**/
117
  echo '<tr>' . "\n";
118
  echo '<td>' . "\n";
119
  echo '<label for="ws-plugin--s2member-profile-first-name">' . "\n";
120
- echo '<strong>First Name *</strong><br />' . "\n";
121
  echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_profile_first_name" id="ws-plugin--s2member-profile-first-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->first_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
122
  echo '</label>' . "\n";
123
  echo '</td>' . "\n";
124
  echo '</tr>' . "\n";
125
  /**/
126
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
127
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_first_name", get_defined_vars ());
128
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
129
  }
130
  /**/
131
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_last_name", true, get_defined_vars ()))
132
  {
133
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
134
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_last_name", get_defined_vars ());
135
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
136
  /**/
137
  echo '<tr>' . "\n";
138
  echo '<td>' . "\n";
139
  echo '<label for="ws-plugin--s2member-profile-last-name">' . "\n";
140
- echo '<strong>Last Name *</strong><br />' . "\n";
141
  echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_profile_last_name" id="ws-plugin--s2member-profile-last-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->last_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
142
  echo '</label>' . "\n";
143
  echo '</td>' . "\n";
144
  echo '</tr>' . "\n";
145
  /**/
146
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
147
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_last_name", get_defined_vars ());
148
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
149
  }
150
  /**/
151
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_display_name", true, get_defined_vars ()))
152
  {
153
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
154
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_display_name", get_defined_vars ());
155
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
156
  /**/
157
  echo '<tr>' . "\n";
158
  echo '<td>' . "\n";
159
  echo '<label for="ws-plugin--s2member-profile-display-name">' . "\n";
160
- echo '<strong>Display Name *</strong><br />' . "\n";
161
  echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_profile_display_name" id="ws-plugin--s2member-profile-display-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->display_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
162
  echo '</label>' . "\n";
163
  echo '</td>' . "\n";
164
  echo '</tr>' . "\n";
165
  /**/
166
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
167
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_display_name", get_defined_vars ());
168
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
169
  }
@@ -176,13 +176,15 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
176
  {
177
  $fields = get_user_option ("s2member_custom_fields", $user_id);
178
  /**/
179
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
 
 
180
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_custom_fields", get_defined_vars ());
181
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
182
  /**/
183
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
184
  {
185
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
186
  do_action ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_before", get_defined_vars ());
187
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
188
  /**/
@@ -191,7 +193,7 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
191
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
192
  $field_id_class = preg_replace ("/_/", "-", $field_var);
193
  /**/
194
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
195
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_display", true, get_defined_vars ()))
196
  {
197
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
@@ -201,19 +203,19 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
201
  echo '<td>' . "\n";
202
  echo '<label for="ws-plugin--s2member-profile-' . esc_attr ($field_id_class) . '">' . "\n";
203
  echo '<strong' . ((preg_match ("/^(checkbox|pre_checkbox)$/", $field["type"])) ? ' style="display:none;"' : '') . '>' . $field["label"] . (($field["required"] === "yes") ? ' *' : '') . '</strong></label>' . ((preg_match ("/^(checkbox|pre_checkbox)$/", $field["type"])) ? '' : '<br />') . "\n";
204
- echo c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (__FUNCTION__, $field, "ws_plugin__s2member_profile_", "ws-plugin--s2member-profile-", "ws-plugin--s2member-profile-field", "", ($tabindex = $tabindex + 10), "", $fields, $fields[$field_var], "profile");
205
  echo '</td>' . "\n";
206
  echo '</tr>' . "\n";
207
  }
208
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
209
  }
210
  /**/
211
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
212
  do_action ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_after", get_defined_vars ());
213
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
214
  }
215
  /**/
216
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
217
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_custom_fields", get_defined_vars ());
218
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
219
  }
@@ -221,48 +223,48 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
221
  /**/
222
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_password", true, get_defined_vars ()))
223
  {
224
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
225
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_password", get_defined_vars ());
226
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
227
  /**/
228
  echo '<tr>' . "\n";
229
  echo '<td>' . "\n";
230
  /**/
231
- echo '<label for="ws-plugin--s2member-profile-password1" title="Please type your Password twice to confirm.">' . "\n";
232
- echo '<strong>New Password?</strong> <em>( please type it twice )</em><br />' . "\n";
233
- echo '<em>Only if changing password, otherwise leave blank.</em><br />' . "\n";
234
  echo '<input type="password" maxlength="100" autocomplete="off" name="ws_plugin__s2member_profile_password1" id="ws-plugin--s2member-profile-password1" class="ws-plugin--s2member-profile-field" value="" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '"' . (($user->user_login === "demo") ? ' disabled="disabled"' : '') . ' />' . "\n";
235
  echo '</label>' . "\n";
236
  /**/
237
- echo '<label for="ws-plugin--s2member-profile-password2" title="Please type your Password twice to confirm.">' . "\n";
238
  echo '<input type="password" maxlength="100" autocomplete="off" name="ws_plugin__s2member_profile_password2" id="ws-plugin--s2member-profile-password2" class="ws-plugin--s2member-profile-field" value="" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '"' . (($user->user_login === "demo") ? ' disabled="disabled"' : '') . ' />' . "\n";
239
  echo '</label>' . "\n";
240
  /**/
241
- echo '<div id="ws-plugin--s2member-profile-password-strength" class="ws-plugin--s2member-password-strength"><em>password strength indicator</em></div>' . "\n";
242
  /**/
243
  echo '</td>' . "\n";
244
  echo '</tr>' . "\n";
245
  /**/
246
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
247
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_password", get_defined_vars ());
248
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
249
  }
250
  /**/
251
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
252
  do_action ("ws_plugin__s2member_during_profile_after_fields", get_defined_vars ());
253
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
254
  /**/
255
  echo '<tr>' . "\n";
256
  echo '<td>' . "\n";
257
  echo '<input type="hidden" name="ws_plugin__s2member_profile_save" id="ws-plugin--s2member-profile-save" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-profile-save")) . '" />' . "\n";
258
- echo '<input id="ws-plugin--s2member-profile-submit" type="submit" value="Save All Changes" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
259
  echo '</td>' . "\n";
260
  echo '</tr>' . "\n";
261
  /**/
262
  echo '</tbody>' . "\n";
263
  echo '</table>' . "\n";
264
  /**/
265
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
266
  do_action ("ws_plugin__s2member_during_profile_after_table", get_defined_vars ());
267
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
268
  /**/
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_in"))
21
  {
55
  /**/
56
  echo '<form method="post" name="ws_plugin__s2member_profile" id="ws-plugin--s2member-profile" action="' . esc_attr (site_url ("/")) . '">' . "\n";
57
  /**/
58
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
59
  do_action ("ws_plugin__s2member_during_profile_before_table", get_defined_vars ());
60
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
61
  /**/
62
  echo '<table cellpadding="0" cellspacing="0">' . "\n";
63
  echo '<tbody>' . "\n";
64
  /**/
65
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
66
  do_action ("ws_plugin__s2member_during_profile_before_fields", get_defined_vars ());
67
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
68
  /**/
69
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_username", true, get_defined_vars ()))
70
  {
71
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
72
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_username", get_defined_vars ());
73
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
74
  /**/
75
  echo '<tr>' . "\n";
76
  echo '<td>' . "\n";
77
  echo '<label for="ws-plugin--s2member-profile-login">' . "\n";
78
+ echo '<strong>' . _x ("Username", "s2member-front", "s2member") . ' *</strong> <small>' . _x ("( cannot be changed )", "s2member-front", "s2member") . '</small><br />' . "\n";
79
  echo '<input aria-required="true" type="text" maxlength="60" name="ws_plugin__s2member_profile_login" id="ws-plugin--s2member-profile-login" class="ws-plugin--s2member-profile-field" value="' . format_to_edit ($user->user_login) . '" disabled="disabled" />' . "\n";
80
  echo '</label>' . "\n";
81
  echo '</td>' . "\n";
82
  echo '</tr>' . "\n";
83
  /**/
84
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
85
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_username", get_defined_vars ());
86
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
87
  }
88
  /**/
89
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_email", true, get_defined_vars ()))
90
  {
91
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
92
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_email", get_defined_vars ());
93
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
94
  /**/
95
  echo '<tr>' . "\n";
96
  echo '<td>' . "\n";
97
  echo '<label for="ws-plugin--s2member-profile-email">' . "\n";
98
+ echo '<strong>' . _x ("Email Address", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
99
  echo '<input aria-required="true" data-expected="email" type="text" maxlength="100" name="ws_plugin__s2member_profile_email" id="ws-plugin--s2member-profile-email" class="ws-plugin--s2member-profile-field" value="' . format_to_edit ($user->user_email) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
100
  echo '</label>' . "\n";
101
  echo '</td>' . "\n";
102
  echo '</tr>' . "\n";
103
  /**/
104
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
105
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_email", get_defined_vars ());
106
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
107
  }
110
  {
111
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_first_name", true, get_defined_vars ()))
112
  {
113
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
114
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_first_name", get_defined_vars ());
115
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
116
  /**/
117
  echo '<tr>' . "\n";
118
  echo '<td>' . "\n";
119
  echo '<label for="ws-plugin--s2member-profile-first-name">' . "\n";
120
+ echo '<strong>' . _x ("First Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
121
  echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_profile_first_name" id="ws-plugin--s2member-profile-first-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->first_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
122
  echo '</label>' . "\n";
123
  echo '</td>' . "\n";
124
  echo '</tr>' . "\n";
125
  /**/
126
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
127
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_first_name", get_defined_vars ());
128
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
129
  }
130
  /**/
131
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_last_name", true, get_defined_vars ()))
132
  {
133
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
134
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_last_name", get_defined_vars ());
135
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
136
  /**/
137
  echo '<tr>' . "\n";
138
  echo '<td>' . "\n";
139
  echo '<label for="ws-plugin--s2member-profile-last-name">' . "\n";
140
+ echo '<strong>' . _x ("Last Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
141
  echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_profile_last_name" id="ws-plugin--s2member-profile-last-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->last_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
142
  echo '</label>' . "\n";
143
  echo '</td>' . "\n";
144
  echo '</tr>' . "\n";
145
  /**/
146
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
147
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_last_name", get_defined_vars ());
148
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
149
  }
150
  /**/
151
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_display_name", true, get_defined_vars ()))
152
  {
153
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
154
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_display_name", get_defined_vars ());
155
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
156
  /**/
157
  echo '<tr>' . "\n";
158
  echo '<td>' . "\n";
159
  echo '<label for="ws-plugin--s2member-profile-display-name">' . "\n";
160
+ echo '<strong>' . _x ("Display Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
161
  echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_profile_display_name" id="ws-plugin--s2member-profile-display-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->display_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
162
  echo '</label>' . "\n";
163
  echo '</td>' . "\n";
164
  echo '</tr>' . "\n";
165
  /**/
166
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
167
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_display_name", get_defined_vars ());
168
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
169
  }
176
  {
177
  $fields = get_user_option ("s2member_custom_fields", $user_id);
178
  /**/
179
+ $tabindex = $tabindex + 9; /* Start tabindex at +9 ( +1 below ). */
180
+ /**/
181
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
182
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_custom_fields", get_defined_vars ());
183
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
184
  /**/
185
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
186
  {
187
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
188
  do_action ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_before", get_defined_vars ());
189
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
190
  /**/
193
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
194
  $field_id_class = preg_replace ("/_/", "-", $field_var);
195
  /**/
196
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
197
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_display", true, get_defined_vars ()))
198
  {
199
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
203
  echo '<td>' . "\n";
204
  echo '<label for="ws-plugin--s2member-profile-' . esc_attr ($field_id_class) . '">' . "\n";
205
  echo '<strong' . ((preg_match ("/^(checkbox|pre_checkbox)$/", $field["type"])) ? ' style="display:none;"' : '') . '>' . $field["label"] . (($field["required"] === "yes") ? ' *' : '') . '</strong></label>' . ((preg_match ("/^(checkbox|pre_checkbox)$/", $field["type"])) ? '' : '<br />') . "\n";
206
+ echo c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (__FUNCTION__, $field, "ws_plugin__s2member_profile_", "ws-plugin--s2member-profile-", "ws-plugin--s2member-profile-field", "", ($tabindex = $tabindex + 1), "", $fields, $fields[$field_var], "profile");
207
  echo '</td>' . "\n";
208
  echo '</tr>' . "\n";
209
  }
210
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
211
  }
212
  /**/
213
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
214
  do_action ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_after", get_defined_vars ());
215
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
216
  }
217
  /**/
218
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
219
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_custom_fields", get_defined_vars ());
220
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
221
  }
223
  /**/
224
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_password", true, get_defined_vars ()))
225
  {
226
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
227
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_password", get_defined_vars ());
228
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
229
  /**/
230
  echo '<tr>' . "\n";
231
  echo '<td>' . "\n";
232
  /**/
233
+ echo '<label for="ws-plugin--s2member-profile-password1" title="' . esc_attr (_x ("Please type your Password twice to confirm.", "s2member-front", "s2member")) . '">' . "\n";
234
+ echo '<strong>' . _x ("New Password?", "s2member-front", "s2member") . '</strong> <em>' . _x ("( please type it twice )", "s2member-front", "s2member") . '</em><br />' . "\n";
235
+ echo '<em>' . _x ("Only if changing password, otherwise leave blank.", "s2member-front", "s2member") . '</em><br />' . "\n";
236
  echo '<input type="password" maxlength="100" autocomplete="off" name="ws_plugin__s2member_profile_password1" id="ws-plugin--s2member-profile-password1" class="ws-plugin--s2member-profile-field" value="" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '"' . (($user->user_login === "demo") ? ' disabled="disabled"' : '') . ' />' . "\n";
237
  echo '</label>' . "\n";
238
  /**/
239
+ echo '<label for="ws-plugin--s2member-profile-password2" title="' . esc_attr (_x ("Please type your Password twice to confirm.", "s2member-front", "s2member")) . '">' . "\n";
240
  echo '<input type="password" maxlength="100" autocomplete="off" name="ws_plugin__s2member_profile_password2" id="ws-plugin--s2member-profile-password2" class="ws-plugin--s2member-profile-field" value="" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '"' . (($user->user_login === "demo") ? ' disabled="disabled"' : '') . ' />' . "\n";
241
  echo '</label>' . "\n";
242
  /**/
243
+ echo '<div id="ws-plugin--s2member-profile-password-strength" class="ws-plugin--s2member-password-strength"><em>' . _x ("password strength indicator", "s2member-front", "s2member") . '</em></div>' . "\n";
244
  /**/
245
  echo '</td>' . "\n";
246
  echo '</tr>' . "\n";
247
  /**/
248
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
249
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_password", get_defined_vars ());
250
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
251
  }
252
  /**/
253
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
254
  do_action ("ws_plugin__s2member_during_profile_after_fields", get_defined_vars ());
255
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
256
  /**/
257
  echo '<tr>' . "\n";
258
  echo '<td>' . "\n";
259
  echo '<input type="hidden" name="ws_plugin__s2member_profile_save" id="ws-plugin--s2member-profile-save" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-profile-save")) . '" />' . "\n";
260
+ echo '<input id="ws-plugin--s2member-profile-submit" type="submit" value="' . esc_attr (_x ("Save All Changes", "s2member-front", "s2member")) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
261
  echo '</td>' . "\n";
262
  echo '</tr>' . "\n";
263
  /**/
264
  echo '</tbody>' . "\n";
265
  echo '</table>' . "\n";
266
  /**/
267
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
268
  do_action ("ws_plugin__s2member_during_profile_after_table", get_defined_vars ());
269
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
270
  /**/
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
  {
@@ -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"))
@@ -91,24 +91,24 @@ if (!class_exists ("c_ws_plugin__s2member_profile_mods_in"))
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,19 +117,22 @@ 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
  /**/
124
  $user = new WP_User ($user_id); /* Update the WP_User object for the current User/Member. */
125
  (function_exists ("setup_userdata")) ? setup_userdata () : null; /* Update global vars. */
126
  /**/
 
 
 
127
  if (empty ($_p["ws_plugin__s2member_sc_profile_save"]))
128
  {
129
  echo '<script type="text/javascript">' . "\n";
130
- echo "if(window.parent && window.parent != window) { window.parent.alert('Profile updated successfully.'); window.parent.location = '" . esc_js (get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"])) . "'; }";
131
- echo "else if(window.opener) { window.alert('Profile updated successfully.'); window.opener.location = '" . esc_js (get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"])) . "'; window.close(); }";
132
- echo "else { alert('Profile updated successfully.'); window.location = '" . esc_js (get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"])) . "'; }";
133
  echo '</script>' . "\n";
134
  /**/
135
  exit (); /* Clean exit. */
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
  {
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"))
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
  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
  /**/
124
  $user = new WP_User ($user_id); /* Update the WP_User object for the current User/Member. */
125
  (function_exists ("setup_userdata")) ? setup_userdata () : null; /* Update global vars. */
126
  /**/
127
+ $lwp = c_ws_plugin__s2member_login_redirects::login_redirection_url ($user);
128
+ $lwp = (!$lwp) ? get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"]) : $lwp;
129
+ /**/
130
  if (empty ($_p["ws_plugin__s2member_sc_profile_save"]))
131
  {
132
  echo '<script type="text/javascript">' . "\n";
133
+ echo "if(window.parent && window.parent != window) { window.parent.alert('" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Profile updated successfully.", "s2member-front", "s2member")) . "'); window.parent.location = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq ($lwp) . "'; }";
134
+ echo "else if(window.opener) { window.alert('" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Profile updated successfully.", "s2member-front", "s2member")) . "'); window.opener.location = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq ($lwp) . "'; window.close(); }";
135
+ echo "else { alert('" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Profile updated successfully.", "s2member-front", "s2member")) . "'); window.location = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq ($lwp) . "'; }";
136
  echo '</script>' . "\n";
137
  /**/
138
  exit (); /* Clean exit. */
includes/classes/querys.inc.php CHANGED
@@ -28,124 +28,199 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
28
  class c_ws_plugin__s2member_querys
29
  {
30
  /**
31
- * Filter all WordPress® queries.
 
 
 
 
 
 
 
 
 
32
  *
33
  * s2Member respects the query var: `suppress_filters`.
34
  * If you need to make a query without it being Filtered, use ``$wp_query->set ("suppress_filters", true);``.
35
  *
36
- * WordPress® 3.0+ Menus set: `suppress_filters = true`.
37
- * So this will NOT affect WP Menus
38
- * ( intended behavior ).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  *
40
  * @package s2Member\Queries
41
  * @since 3.5
42
  *
 
 
43
  * @param obj $wp_query Expects ``$wp_query`` by reference, from the Filter.
44
  * @param bool $force Optional. Defaults to false. If true, we bypass all standard conditions.
45
- * However, will never bypass `supress_filters`.
46
  * @return null
47
  */
48
  public static function query_level_access (&$wp_query = FALSE, $force = FALSE)
49
  {
50
- static $initial_query = true; /* Tracks initial query Filtering. */
 
 
51
  /**/
52
  eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
53
  do_action ("ws_plugin__s2member_before_query_level_access", get_defined_vars ());
54
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
55
  /**/
56
- if (is_object ($wp_query) && !$wp_query->get ("suppress_filters")) /* s2Member will always respect the `suppress_filters` query arg. */
 
 
 
 
 
57
  {
58
- if (($o = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["filter_wp_query"]) !== "none" || $force) /* If `none`; only Filter with $force. */
59
  {
60
- if ($force /* Forcing this routine bypasses all of these other conditions. This works with the API function `attach_s2member_query_filters()`. */
61
- || ($initial_query && preg_match ("/^(all|searches,feeds|searches)$/", $o) && $wp_query->is_search ()) /* Initial query for search results? */
62
- || ($initial_query && preg_match ("/^(all|searches,feeds|feeds)$/", $o) && $wp_query->is_feed ()) /* Initital query for feed listings? */
63
- || ($o === "all" && !($initial_query && $wp_query->is_singular ())) /* << do NOT create 404's. Allow Security Gate to handle these. */)
 
 
 
64
  {
65
- if (!is_admin () /* The additional Ajax checks below, allow search plugins like Daves Live Search to be Filtered. Even when `is_admin() = true`.
66
- See: `http://wordpress.org/extend/plugins/daves-wordpress-live-search/`. Also see: `http://www.primothemes.com/forums/viewtopic.php?f=4&t=3087#p12786`. */
67
- || (is_admin () && defined ("DOING_AJAX") && DOING_AJAX && !empty ($_REQUEST["action"]) && (did_action ("wp_ajax_nopriv_" . $_REQUEST["action"]) || did_action ("wp_ajax_" . $_REQUEST["action"])) && $wp_query->is_search ()))
 
 
 
 
 
68
  {
69
- $user = (is_user_logged_in ()) ? wp_get_current_user () : false; /* Get the current User's object. */
70
- /*
71
- Filter all Posts/Pages requiring Custom Capabilities that the current User does NOT have access to.
72
- */
 
 
 
 
 
 
 
 
73
  if (is_array ($ccaps = c_ws_plugin__s2member_utils_gets::get_singular_ids_with_ccaps_req ($user)) && !empty ($ccaps))
74
- $wp_query->set ("post__not_in", array_unique (array_merge ((array)$wp_query->get ("post__not_in"), $ccaps)));
75
- /*
76
- Filter all Posts/Pages requiring Specific Post/Page Access that the current Visitor does NOT have access to.
77
- */
 
78
  if (is_array ($sps = c_ws_plugin__s2member_utils_gets::get_singular_ids_with_sp_req ()) && !empty ($sps))
79
- $wp_query->set ("post__not_in", array_unique (array_merge ((array)$wp_query->get ("post__not_in"), $sps)));
 
 
 
80
  /**/
81
- for ($n = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n >= 0; $n--) /* Category Level Restrictions. Go through each Level. */
82
  {
83
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_catgs"] === "all" && (!$user || !current_user_can ("access_s2member_level" . $n)))
84
  {
85
- $wp_query->set ("category__not_in", c_ws_plugin__s2member_utils_gets::get_all_category_ids ());
 
 
86
  break; /* All Categories will be locked down. */
87
  }
88
  else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_catgs"] && (!$user || !current_user_can ("access_s2member_level" . $n)))
89
  {
90
  foreach (preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_catgs"]) as $catg)
91
  $catgs = array_merge ((array)$catgs, array ($catg), c_ws_plugin__s2member_utils_gets::get_all_child_category_ids ($catg));
 
 
92
  $wp_query->set ("category__not_in", array_unique (array_merge ((array)$wp_query->get ("category__not_in"), $catgs)));
 
93
  }
94
  }
95
  /**/
96
- for ($n = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n >= 0; $n--) /* Tag Level Restrictions. Go through each Level. */
97
  {
98
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_ptags"] === "all" && (!$user || !current_user_can ("access_s2member_level" . $n)))
99
  {
100
- $wp_query->set ("tag__not_in", c_ws_plugin__s2member_utils_gets::get_all_tag_ids ());
 
 
101
  break; /* ALL Tags will be locked down. */
102
  }
103
  else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_ptags"] && (!$user || !current_user_can ("access_s2member_level" . $n)))
104
  {
105
  $tags = c_ws_plugin__s2member_utils_gets::convert_tags_2_ids ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_ptags"]);
 
 
106
  $wp_query->set ("tag__not_in", array_unique (array_merge ((array)$wp_query->get ("tag__not_in"), $tags)));
 
107
  }
108
  }
109
  /**/
110
- for ($n = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n >= 0; $n--) /* Post Level Restrictions. Go through each Level. */
111
  {
112
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"] === "all" && (!$user || !current_user_can ("access_s2member_level" . $n)))
113
  {
 
114
  $wp_query->set ("post__not_in", c_ws_plugin__s2member_utils_gets::get_all_post_ids ());
115
  break; /* ALL Posts will be locked down. */
116
  }
117
  else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"] && (!$user || !current_user_can ("access_s2member_level" . $n)))
118
  {
119
  $posts = preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"]);
 
 
120
  $wp_query->set ("post__not_in", array_unique (array_merge ((array)$wp_query->get ("post__not_in"), $posts)));
121
  }
122
  }
123
  /**/
124
- for ($n = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n >= 0; $n--) /* Page Level Restrictions. Go through each Level. */
125
  {
126
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"] === "all" && (!$user || !current_user_can ("access_s2member_level" . $n)))
127
  {
 
128
  $wp_query->set ("post__not_in", c_ws_plugin__s2member_utils_gets::get_all_page_ids ());
129
  break; /* ALL Pages will be locked down. */
130
  }
131
  else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"] && (!$user || !current_user_can ("access_s2member_level" . $n)))
132
  {
133
  $pages = preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"]);
 
 
134
  $wp_query->set ("post__not_in", array_unique (array_merge ((array)$wp_query->get ("post__not_in"), $pages)));
135
  }
136
  }
137
- /**/
138
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
139
- do_action ("ws_plugin__s2member_during_query_level_access", get_defined_vars ());
140
- unset ($__refs, $__v); /* Unset defined __refs, __v. */
141
  }
 
 
 
 
142
  }
143
  }
144
  }
145
  /**/
146
- if ($initial_query && is_object ($wp_query)) /* Systematics. */
147
- c_ws_plugin__s2member_querys::_query_level_access_sys ($wp_query);
148
- /**/
149
  eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
150
  do_action ("ws_plugin__s2member_after_query_level_access", get_defined_vars ());
151
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
@@ -155,15 +230,11 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
155
  return; /* For uniformity. */
156
  }
157
  /**
158
- * Filters Systematics in search results & feeds.
159
  *
160
  * s2Member respects the query var: `suppress_filters`.
161
  * If you need to make a query without it being Filtered, use ``$wp_query->set ("suppress_filters", true);``.
162
  *
163
- * WordPress® 3.0+ Menus set: `suppress_filters = true`.
164
- * So this will NOT affect WP Menus
165
- * ( intended behavior ).
166
- *
167
  * @package s2Member\Queries
168
  * @since 3.5
169
  *
@@ -172,68 +243,113 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
172
  */
173
  public static function _query_level_access_sys (&$wp_query = FALSE)
174
  {
175
- static $initial_query = true; /* Tracks initial query filtering. */
176
  /**/
177
  eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
178
  do_action ("_ws_plugin__s2member_before_query_level_access_sys", get_defined_vars ());
179
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
180
  /**/
181
- if ($initial_query && is_object ($wp_query) && !$wp_query->get ("suppress_filters")) /* Suppressing Filters? */
182
- {
183
- if ((!is_admin () && ($wp_query->is_search () || $wp_query->is_feed ())) /* Filter Systematics in searches and in feeds. */
184
- /* The additional Ajax checks below, allow search plugins like Daves Live Search to be Filtered. Even when `is_admin() = true`.
185
- See: `http://wordpress.org/extend/plugins/daves-wordpress-live-search/`. Also see: `http://www.primothemes.com/forums/viewtopic.php?f=4&t=3087#p12786`. */
186
- || (is_admin () && defined ("DOING_AJAX") && DOING_AJAX && !empty ($_REQUEST["action"]) && (did_action ("wp_ajax_nopriv_" . $_REQUEST["action"]) || did_action ("wp_ajax_" . $_REQUEST["action"])) && $wp_query->is_search ()))
187
- {
188
- $s[] = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"];
189
- $s[] = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"];
190
- $s[] = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"];
191
- /**/
192
- $wp_query->set ("post__not_in", array_unique (array_merge ((array)$wp_query->get ("post__not_in"), $s)));
193
- /**/
194
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
195
- do_action ("_ws_plugin__s2member_during_query_level_access_sys", 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_after_query_level_access_sys", get_defined_vars ());
202
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
203
  /**/
204
- $initial_query = false; /* No longer. */
205
- /**/
206
  return; /* For uniformity. */
207
  }
208
  /**
209
- * Forces query Filters *( on-demand )*.
210
  *
211
- * s2Member respects the query var: `suppress_filters`.
212
- * If you need to make a query without it being Filtered, use ``$wp_query->set ("suppress_filters", true);``.
213
  *
214
- * WordPress® 3.0+ Menus set: `suppress_filters = true`.
215
- * So this will NOT affect WP Menus
216
- * ( intended behavior ).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  *
218
  * @package s2Member\Queries
219
- * @since 3.5
220
  *
221
- * @param obj $wp_query Expects ``$wp_query`` by reference.
222
- * @return null
 
 
 
223
  */
224
- public static function force_query_level_access (&$wp_query = FALSE)
225
  {
226
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
227
- do_action ("ws_plugin__s2member_before_force_query_level_access", get_defined_vars ());
228
- unset ($__refs, $__v); /* Unset defined __refs, __v. */
229
  /**/
230
- c_ws_plugin__s2member_querys::query_level_access ($wp_query, "force-filters");
 
 
 
 
 
 
231
  /**/
232
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
233
- do_action ("ws_plugin__s2member_after_force_query_level_access", get_defined_vars ());
234
- unset ($__refs, $__v); /* Unset defined __refs, __v. */
 
 
 
 
 
 
 
 
 
 
 
 
235
  /**/
236
- return; /* For uniformity. */
 
 
 
 
237
  }
238
  }
239
  }
28
  class c_ws_plugin__s2member_querys
29
  {
30
  /**
31
+ * The current WordPress® query object reference.
32
+ *
33
+ * @package s2Member\Queries
34
+ * @since 110912
35
+ *
36
+ * @var null|obj
37
+ */
38
+ static $current_wp_query;
39
+ /**
40
+ * Forces query Filters *( on-demand )*.
41
  *
42
  * s2Member respects the query var: `suppress_filters`.
43
  * If you need to make a query without it being Filtered, use ``$wp_query->set ("suppress_filters", true);``.
44
  *
45
+ * @package s2Member\Queries
46
+ * @since 3.5
47
+ *
48
+ * @attaches-to ``add_action("pre_get_posts");``
49
+ *
50
+ * @param obj $wp_query Expects ``$wp_query`` by reference.
51
+ * @return null
52
+ */
53
+ public static function force_query_level_access (&$wp_query = FALSE)
54
+ {
55
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
56
+ do_action ("ws_plugin__s2member_before_force_query_level_access", get_defined_vars ());
57
+ unset ($__refs, $__v); /* Unset defined __refs, __v. */
58
+ /**/
59
+ c_ws_plugin__s2member_querys::query_level_access ($wp_query, true);
60
+ /**/
61
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
62
+ do_action ("ws_plugin__s2member_after_force_query_level_access", get_defined_vars ());
63
+ unset ($__refs, $__v); /* Unset defined __refs, __v. */
64
+ /**/
65
+ return; /* For uniformity. */
66
+ }
67
+ /**
68
+ * Filter all WordPress® queries.
69
+ *
70
+ * s2Member respects the query var: `suppress_filters`.
71
+ * If you need to make a query without it being Filtered, use ``$wp_query->set ("suppress_filters", true);``.
72
  *
73
  * @package s2Member\Queries
74
  * @since 3.5
75
  *
76
+ * @attaches-to ``add_action("pre_get_posts");``
77
+ *
78
  * @param obj $wp_query Expects ``$wp_query`` by reference, from the Filter.
79
  * @param bool $force Optional. Defaults to false. If true, we bypass all standard conditions.
80
+ * However, s2Member will NEVER bypass `supress_filters`.
81
  * @return null
82
  */
83
  public static function query_level_access (&$wp_query = FALSE, $force = FALSE)
84
  {
85
+ global $wpdb; /* Global database object reference. */
86
+ static $initial_query = true; /* Tracks initial query. */
87
+ c_ws_plugin__s2member_querys::$current_wp_query = &$wp_query;
88
  /**/
89
  eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
90
  do_action ("ws_plugin__s2member_before_query_level_access", get_defined_vars ());
91
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
92
  /**/
93
+ c_ws_plugin__s2member_querys::_query_level_access_sys ($wp_query); /* Systematics. */
94
+ /**/
95
+ remove_filter ("comment_feed_where", "c_ws_plugin__s2member_querys::_query_level_access_coms", 20, 2);
96
+ remove_filter ("wp_get_nav_menu_items", "c_ws_plugin__s2member_querys::_query_level_access_navs", 20);
97
+ /**/
98
+ if (is_object ($wpdb) && is_object ($wp_query) && (($o = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["filter_wp_query"]) || $force))
99
  {
100
+ if (!is_admin () || c_ws_plugin__s2member_querys::_is_admin_ajax_search ($wp_query))
101
  {
102
+ $suppressing_filters = $wp_query->get ("suppress_filters"); /* Filter suppression on? */
103
+ if (!$suppressing_filters && $force /* Forcing this routine bypasses all of these other conditionals. Works with API function ``attach_s2member_query_filters()``. */
104
+ || (!$suppressing_filters && in_array ("all", $o) && !($initial_query && $wp_query->is_singular ())) /* Don't create 404 errors. Allow Security Gate to handle these. */
105
+ || (!$suppressing_filters && (in_array ("all", $o) || in_array ("searches", $o)) && $wp_query->is_search ()) /* Or, is this a search results query, possibly via AJAX: `admin-ajax.php`? */
106
+ || (!$suppressing_filters && (in_array ("all", $o) || in_array ("feeds", $o)) && $wp_query->is_feed () && !$wp_query->is_comment_feed ()) /* Or, is this a feed; and it's NOT for comments? */
107
+ || (!$suppressing_filters && (in_array ("all", $o) || in_array ("comment-feeds", $o)) && $wp_query->is_feed () && $wp_query->is_comment_feed ()) /* Or, is this a feed; and it IS indeed for comments? */
108
+ || (($suppressing_filters !== "n/a") && (in_array ("all", $o) || in_array ("nav-menus", $o)) && in_array ("wp_get_nav_menu_items", ($callers = (isset ($callers) ? $callers : c_ws_plugin__s2member_utilities::callers ()))))/**/)
109
  {
110
+ if (!$suppressing_filters && (in_array ("all", $o) || in_array ("comment-feeds", $o)) && $wp_query->is_feed () && $wp_query->is_comment_feed ())
111
+ add_filter ("comment_feed_where", "c_ws_plugin__s2member_querys::_query_level_access_coms", 20, 2);
112
+ /**/
113
+ if ($suppressing_filters !== "n/a" && (in_array ("all", $o) || in_array ("nav-menus", $o))) /* Suppression irrelevant here. */
114
+ if (in_array ("wp_get_nav_menu_items", ($callers = (isset ($callers) ? $callers : c_ws_plugin__s2member_utilities::callers ()))))
115
+ add_filter ("wp_get_nav_menu_items", "c_ws_plugin__s2member_querys::_query_level_access_navs", 20);
116
+ /**/
117
+ if ((is_user_logged_in () && is_object ($user = wp_get_current_user ()) && ($user_id = $user->ID)) || !($user = false))
118
  {
119
+ if (!$user && ($lwp = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"]))
120
+ {
121
+ $wp_query->set ("post__in", array_unique (array_diff ((array)$wp_query->get ("post__in"), array ($lwp))));
122
+ $wp_query->set ("post__not_in", array_unique (array_merge ((array)$wp_query->get ("post__not_in"), array ($lwp))));
123
+ }
124
+ /**/
125
+ if (!$user && ($dep = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"]))
126
+ {
127
+ $wp_query->set ("post__in", array_unique (array_diff ((array)$wp_query->get ("post__in"), array ($dep))));
128
+ $wp_query->set ("post__not_in", array_unique (array_merge ((array)$wp_query->get ("post__not_in"), array ($dep))));
129
+ }
130
+ /**/
131
  if (is_array ($ccaps = c_ws_plugin__s2member_utils_gets::get_singular_ids_with_ccaps_req ($user)) && !empty ($ccaps))
132
+ {
133
+ $wp_query->set ("post__in", array_unique (array_diff ((array)$wp_query->get ("post__in"), $ccaps)));
134
+ $wp_query->set ("post__not_in", array_unique (array_merge ((array)$wp_query->get ("post__not_in"), $ccaps)));
135
+ }
136
+ /**/
137
  if (is_array ($sps = c_ws_plugin__s2member_utils_gets::get_singular_ids_with_sp_req ()) && !empty ($sps))
138
+ {
139
+ $wp_query->set ("post__in", array_unique (array_diff ((array)$wp_query->get ("post__in"), $sps)));
140
+ $wp_query->set ("post__not_in", array_unique (array_merge ((array)$wp_query->get ("post__not_in"), $sps)));
141
+ }
142
  /**/
143
+ for ($n = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n >= 0; $n--) /* Category Level Restrictions. */
144
  {
145
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_catgs"] === "all" && (!$user || !current_user_can ("access_s2member_level" . $n)))
146
  {
147
+ $wp_query->set ("category__in", array ()); /* Include no other Categories. */
148
+ $wp_query->set ("category__not_in", ($catgs = c_ws_plugin__s2member_utils_gets::get_all_category_ids ()));
149
+ $wp_query->set ("post__in", array_unique (array_diff ((array)$wp_query->get ("post__in"), c_ws_plugin__s2member_utils_gets::get_singular_ids_in_terms ($catgs))));
150
  break; /* All Categories will be locked down. */
151
  }
152
  else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_catgs"] && (!$user || !current_user_can ("access_s2member_level" . $n)))
153
  {
154
  foreach (preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_catgs"]) as $catg)
155
  $catgs = array_merge ((array)$catgs, array ($catg), c_ws_plugin__s2member_utils_gets::get_all_child_category_ids ($catg));
156
+ /**/
157
+ $wp_query->set ("category__in", array_unique (array_diff ((array)$wp_query->get ("category__in"), $catgs)));
158
  $wp_query->set ("category__not_in", array_unique (array_merge ((array)$wp_query->get ("category__not_in"), $catgs)));
159
+ $wp_query->set ("post__in", array_unique (array_diff ((array)$wp_query->get ("post__in"), c_ws_plugin__s2member_utils_gets::get_singular_ids_in_terms ($catgs))));
160
  }
161
  }
162
  /**/
163
+ for ($n = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n >= 0; $n--) /* Tag Level Restrictions. */
164
  {
165
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_ptags"] === "all" && (!$user || !current_user_can ("access_s2member_level" . $n)))
166
  {
167
+ $wp_query->set ("tag__in", array ()); /* Include no other Tags. */
168
+ $wp_query->set ("tag__not_in", ($tags = c_ws_plugin__s2member_utils_gets::get_all_tag_ids ()));
169
+ $wp_query->set ("post__in", array_unique (array_diff ((array)$wp_query->get ("post__in"), c_ws_plugin__s2member_utils_gets::get_singular_ids_in_terms ($tags))));
170
  break; /* ALL Tags will be locked down. */
171
  }
172
  else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_ptags"] && (!$user || !current_user_can ("access_s2member_level" . $n)))
173
  {
174
  $tags = c_ws_plugin__s2member_utils_gets::convert_tags_2_ids ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_ptags"]);
175
+ /**/
176
+ $wp_query->set ("tag__in", array_unique (array_diff ((array)$wp_query->get ("tag__in"), $tags)));
177
  $wp_query->set ("tag__not_in", array_unique (array_merge ((array)$wp_query->get ("tag__not_in"), $tags)));
178
+ $wp_query->set ("post__in", array_unique (array_diff ((array)$wp_query->get ("post__in"), c_ws_plugin__s2member_utils_gets::get_singular_ids_in_terms ($tags))));
179
  }
180
  }
181
  /**/
182
+ for ($n = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n >= 0; $n--) /* Post Level Restrictions. */
183
  {
184
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"] === "all" && (!$user || !current_user_can ("access_s2member_level" . $n)))
185
  {
186
+ $wp_query->set ("post__in", array ()); /* Include no other Posts. */
187
  $wp_query->set ("post__not_in", c_ws_plugin__s2member_utils_gets::get_all_post_ids ());
188
  break; /* ALL Posts will be locked down. */
189
  }
190
  else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"] && (!$user || !current_user_can ("access_s2member_level" . $n)))
191
  {
192
  $posts = preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"]);
193
+ /**/
194
+ $wp_query->set ("post__in", array_unique (array_diff ((array)$wp_query->get ("post__in"), $posts)));
195
  $wp_query->set ("post__not_in", array_unique (array_merge ((array)$wp_query->get ("post__not_in"), $posts)));
196
  }
197
  }
198
  /**/
199
+ for ($n = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n >= 0; $n--) /* Page Level Restrictions. */
200
  {
201
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"] === "all" && (!$user || !current_user_can ("access_s2member_level" . $n)))
202
  {
203
+ $wp_query->set ("post__in", array ()); /* Include no other Posts. */
204
  $wp_query->set ("post__not_in", c_ws_plugin__s2member_utils_gets::get_all_page_ids ());
205
  break; /* ALL Pages will be locked down. */
206
  }
207
  else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"] && (!$user || !current_user_can ("access_s2member_level" . $n)))
208
  {
209
  $pages = preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"]);
210
+ /**/
211
+ $wp_query->set ("post__in", array_unique (array_diff ((array)$wp_query->get ("post__in"), $pages)));
212
  $wp_query->set ("post__not_in", array_unique (array_merge ((array)$wp_query->get ("post__not_in"), $pages)));
213
  }
214
  }
 
 
 
 
215
  }
216
+ /**/
217
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
218
+ do_action ("ws_plugin__s2member_during_query_level_access", get_defined_vars ());
219
+ unset ($__refs, $__v); /* Unset defined __refs, __v. */
220
  }
221
  }
222
  }
223
  /**/
 
 
 
224
  eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
225
  do_action ("ws_plugin__s2member_after_query_level_access", get_defined_vars ());
226
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
230
  return; /* For uniformity. */
231
  }
232
  /**
233
+ * Always filters Systematics in search results & feeds.
234
  *
235
  * s2Member respects the query var: `suppress_filters`.
236
  * If you need to make a query without it being Filtered, use ``$wp_query->set ("suppress_filters", true);``.
237
  *
 
 
 
 
238
  * @package s2Member\Queries
239
  * @since 3.5
240
  *
243
  */
244
  public static function _query_level_access_sys (&$wp_query = FALSE)
245
  {
246
+ global $wpdb; /* Global database object reference. */
247
  /**/
248
  eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
249
  do_action ("_ws_plugin__s2member_before_query_level_access_sys", get_defined_vars ());
250
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
251
  /**/
252
+ if (is_object ($wpdb) && is_object ($wp_query) && !($suppressing_filters = $wp_query->get ("suppress_filters")))
253
+ if ((!is_admin () && ($wp_query->is_search () || $wp_query->is_feed ())) || c_ws_plugin__s2member_querys::_is_admin_ajax_search ($wp_query))
254
+ {
255
+ $s = array ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"], $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"], $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"]);
256
+ /**/
257
+ $wp_query->set ("post__in", array_unique (array_diff ((array)$wp_query->get ("post__in"), $s)));
258
+ $wp_query->set ("post__not_in", array_unique (array_merge ((array)$wp_query->get ("post__not_in"), $s)));
259
+ /**/
260
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
261
+ do_action ("_ws_plugin__s2member_during_query_level_access_sys", get_defined_vars ());
262
+ unset ($__refs, $__v); /* Unset defined __refs, __v. */
263
+ }
 
 
 
 
 
 
264
  /**/
265
  eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
266
  do_action ("_ws_plugin__s2member_after_query_level_access_sys", get_defined_vars ());
267
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
268
  /**/
 
 
269
  return; /* For uniformity. */
270
  }
271
  /**
272
+ * Filters WordPress® navigation menu items.
273
  *
274
+ * @package s2Member\Queries
275
+ * @since 110912
276
  *
277
+ * @attaches-to ``add_filter("wp_get_nav_menu_items");``
278
+ *
279
+ * @param array $items Expects an array of items to be passed through by the Filter.
280
+ * @return array The revised array of ``$items``.
281
+ */
282
+ public static function _query_level_access_navs ($items = FALSE)
283
+ {
284
+ global $wpdb; /* Global database object reference. */
285
+ $wp_query = &c_ws_plugin__s2member_querys::$current_wp_query;
286
+ /**/
287
+ if (is_array ($items) && is_object ($wpdb) && is_object ($wp_query) && $wp_query->get ("suppress_filters") !== "n/a")
288
+ {
289
+ $objs = array_merge ((array)$wp_query->get ("post__not_in"));
290
+ $objs = array_unique (array_merge ($objs, (array)$wp_query->get ("tag__not_in")));
291
+ $objs = array_unique (array_merge ($objs, (array)$wp_query->get ("category__not_in")));
292
+ /**/
293
+ foreach ($items as $item_key => $item) /* Filter through all nav menu items. */
294
+ if (isset ($item->ID, $item->object_id) && /* And NOT defaulted to the item `ID`. */ (int)$item->ID !== (int)$item->object_id)
295
+ if (in_array ($item->object_id, $objs)) /* If it is protected by query Filters, we need to remove it. */
296
+ {
297
+ foreach ($items as $child_item_key => $child_item)
298
+ if (!empty ($child_item->menu_item_parent) && (int)$child_item->menu_item_parent === (int)$item->ID)
299
+ unset($items[$child_item_key]);
300
+ /**/
301
+ unset($items[$item_key]);
302
+ }
303
+ }
304
+ /**/
305
+ remove_filter ("wp_get_nav_menu_items", "c_ws_plugin__s2member_querys::_query_level_access_navs", 20);
306
+ return apply_filters ("_ws_plugin__s2member_query_level_access_navs", $items, get_defined_vars ());
307
+ }
308
+ /**
309
+ * Filters ``$cwhere`` query portion.
310
  *
311
  * @package s2Member\Queries
312
+ * @since 110912
313
  *
314
+ * @attaches-to ``add_filter("comment_feed_where");``
315
+ *
316
+ * @param str $cwhere Expects the SQL `WHERE` portion to be passed through by the Filter.
317
+ * @param obj $wp_query Expects ``$wp_query`` by reference, from the Filter.
318
+ * @return str The revised ``$cwhere`` string.
319
  */
320
+ public static function _query_level_access_coms ($cwhere = FALSE, &$wp_query = FALSE)
321
  {
322
+ global $wpdb; /* Global database object reference. */
 
 
323
  /**/
324
+ if (is_string ($cwhere) && is_object ($wpdb) && is_object ($wp_query) && !$wp_query->get ("suppress_filters"))
325
+ {
326
+ $terms = array_unique (array_merge ((array)$wp_query->get ("category__not_in"), (array)$wp_query->get ("tag__not_in")));
327
+ /**/
328
+ $cwhere .= " AND `" . $wpdb->comments . "`.`comment_post_ID` NOT IN('" . implode ("','", (array)$wp_query->get ("post__not_in")) . "')";
329
+ $cwhere .= " AND `" . $wpdb->comments . "`.`comment_post_ID` NOT IN('" . implode ("','", c_ws_plugin__s2member_utils_gets::get_singular_ids_in_terms ($terms)) . "')";
330
+ }
331
  /**/
332
+ remove_filter ("comment_feed_where", "c_ws_plugin__s2member_querys::_query_level_access_coms", 20, 2);
333
+ return apply_filters ("_ws_plugin__s2member_query_level_access_coms", $cwhere, get_defined_vars ());
334
+ }
335
+ /**
336
+ * AJAX search via `admin-ajax.php`?
337
+ *
338
+ * @package s2Member\Queries
339
+ * @since 110912
340
+ *
341
+ * @param obj $wp_query Expects ``$wp_query`` by reference.
342
+ * @return bool True if it's an AJAX search via `admin-ajax.php`, else false.
343
+ */
344
+ public static function _is_admin_ajax_search (&$wp_query = FALSE)
345
+ {
346
+ global $wpdb; /* Global database object reference. */
347
  /**/
348
+ if (is_object ($wpdb) && is_object ($wp_query) && is_admin () && $wp_query->is_search ())
349
+ if (defined ("DOING_AJAX") && DOING_AJAX && !empty ($_REQUEST["action"]) && (did_action ("wp_ajax_nopriv_" . $_REQUEST["action"]) || did_action ("wp_ajax_" . $_REQUEST["action"])))
350
+ return apply_filters ("_ws_plugin__s2member_is_admin_ajax_search", true, get_defined_vars ());
351
+ /**/
352
+ return apply_filters ("_ws_plugin__s2member_is_admin_ajax_search", false, get_defined_vars ());
353
  }
354
  }
355
  }
includes/classes/readmes.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_readmes"))
21
  {
@@ -50,7 +50,7 @@ if (!class_exists ("c_ws_plugin__s2member_readmes"))
50
  $path = (file_exists ($dev_path)) ? $dev_path : $path;
51
  }
52
  /**/
53
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
54
  do_action ("ws_plugin__s2member_before_parse_readme", get_defined_vars ());
55
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
56
  /**/
@@ -63,7 +63,7 @@ if (!class_exists ("c_ws_plugin__s2member_readmes"))
63
  include_once dirname (dirname (__FILE__)) . "/_xtnls/markdown/nc-markdown.inc.php";
64
  /**/
65
  $rm = file_get_contents ($path); /* Get readme.txt file contents. */
66
- $mb = function_exists ("mb_convert_encoding") ? @mb_convert_encoding ($rm, "UTF-8",@mb_detect_encoding ($rm, "WINDOWS-1252, UTF-8")) : $rm;
67
  $rm = ($mb) ? $mb : $rm; /* Double check this, just in case conversion fails on an unpredicted charset. */
68
  /**/
69
  if ($specific_section) /* If we are ONLY parsing a specific section. This is a very useful way of pulling details out. */
@@ -211,7 +211,7 @@ if (!class_exists ("c_ws_plugin__s2member_readmes"))
211
  $path = (file_exists ($dev_path)) ? $dev_path : $path;
212
  }
213
  /**/
214
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
215
  do_action ("ws_plugin__s2member_before_parse_readme_value", get_defined_vars ());
216
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
217
  /**/
@@ -220,7 +220,7 @@ if (!class_exists ("c_ws_plugin__s2member_readmes"))
220
  if (empty ($readme[$path])) /* If not already opened. */
221
  {
222
  $readme[$path] = file_get_contents ($path); /* Get readme.txt file contents. */
223
- $mb = function_exists ("mb_convert_encoding") ? @mb_convert_encoding ($readme[$path], "UTF-8",@mb_detect_encoding ($readme[$path], "WINDOWS-1252, UTF-8")) : $readme[$path];
224
  $readme[$path] = ($mb) ? $mb : $readme[$path]; /* Double check this, just in case conversion fails on an unpredicted charset. */
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_readmes"))
21
  {
50
  $path = (file_exists ($dev_path)) ? $dev_path : $path;
51
  }
52
  /**/
53
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
54
  do_action ("ws_plugin__s2member_before_parse_readme", get_defined_vars ());
55
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
56
  /**/
63
  include_once dirname (dirname (__FILE__)) . "/_xtnls/markdown/nc-markdown.inc.php";
64
  /**/
65
  $rm = file_get_contents ($path); /* Get readme.txt file contents. */
66
+ $mb = function_exists ("mb_convert_encoding") ? @mb_convert_encoding ($rm, "UTF-8", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["mb_detection_order"]) : $rm;
67
  $rm = ($mb) ? $mb : $rm; /* Double check this, just in case conversion fails on an unpredicted charset. */
68
  /**/
69
  if ($specific_section) /* If we are ONLY parsing a specific section. This is a very useful way of pulling details out. */
211
  $path = (file_exists ($dev_path)) ? $dev_path : $path;
212
  }
213
  /**/
214
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
215
  do_action ("ws_plugin__s2member_before_parse_readme_value", get_defined_vars ());
216
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
217
  /**/
220
  if (empty ($readme[$path])) /* If not already opened. */
221
  {
222
  $readme[$path] = file_get_contents ($path); /* Get readme.txt file contents. */
223
+ $mb = function_exists ("mb_convert_encoding") ? @mb_convert_encoding ($readme[$path], "UTF-8", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["mb_detection_order"]) : $readme[$path];
224
  $readme[$path] = ($mb) ? $mb : $readme[$path]; /* Double check this, just in case conversion fails on an unpredicted charset. */
225
  }
226
  /**/
includes/classes/register-in.inc.php CHANGED
@@ -63,32 +63,32 @@ if (!class_exists ("c_ws_plugin__s2member_register_in"))
63
  /**/
64
  do_action ("ws_plugin__s2member_during_register", get_defined_vars ());
65
  /**/
66
- if (is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && is_main_site ())
67
  {
68
  echo '<script type="text/javascript">' . "\n";
69
- echo "window.location = '" . esc_js (c_ws_plugin__s2member_utils_urls::wp_signup_url ()) . "';";
70
  echo '</script>' . "\n";
71
  }
72
- else /* Otherwise, this is NOT a Multisite install. Or it is, but the Super Admin is NOT selling Blogs. */
73
  {
74
  echo '<script type="text/javascript">' . "\n";
75
- echo "window.location = '" . esc_js (c_ws_plugin__s2member_utils_urls::wp_register_url ()) . "';";
76
  echo '</script>' . "\n";
77
  }
78
  }
79
  else
80
- echo '<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.';
81
  }
82
  else
83
- echo '<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.';
84
  }
85
  else
86
- echo '<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.';
87
  }
88
  else
89
- echo '<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.';
90
  /**/
91
- exit (); /* Clean exit. This is always the case with `$_GET["s2member_register"]`. */
92
  }
93
  /**/
94
  do_action ("ws_plugin__s2member_after_register", get_defined_vars ());
63
  /**/
64
  do_action ("ws_plugin__s2member_during_register", get_defined_vars ());
65
  /**/
66
+ if (is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && is_main_site () && ($location = c_ws_plugin__s2member_utils_urls::wp_signup_url ()))
67
  {
68
  echo '<script type="text/javascript">' . "\n";
69
+ echo "window.location = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq ($location) . "';";
70
  echo '</script>' . "\n";
71
  }
72
+ else if (($location = c_ws_plugin__s2member_utils_urls::wp_register_url ()))
73
  {
74
  echo '<script type="text/javascript">' . "\n";
75
+ echo "window.location = '" . c_ws_plugin__s2member_utils_strings::esc_js_sq ($location) . "';";
76
  echo '</script>' . "\n";
77
  }
78
  }
79
  else
80
+ echo _x ('<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.', "s2member-front", "s2member");
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
+ exit (); /* Clean exit. This is always the case with ``$_GET["s2member_register"]``. */
92
  }
93
  /**/
94
  do_action ("ws_plugin__s2member_after_register", get_defined_vars ());
includes/classes/registrations.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_registrations"))
21
  {
@@ -43,7 +43,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
43
  */
44
  public static function generate_password ($password = FALSE)
45
  {
46
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
47
  do_action ("ws_plugin__s2member_before_generate_password", get_defined_vars ());
48
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
49
  /**/
@@ -81,7 +81,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
81
  */
82
  public static function ms_validate_user_signup ($result = FALSE)
83
  {
84
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
85
  do_action ("ws_plugin__s2member_before_ms_validate_user_signup", get_defined_vars ());
86
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
87
  /**/
@@ -91,7 +91,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
91
  if (c_ws_plugin__s2member_utils_users::ms_user_login_email_exists_but_not_on_blog ($result["user_name"], $result["user_email"]))
92
  $result["errors"] = new WP_Error ();
93
  /**/
94
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
95
  do_action ("ws_plugin__s2member_during_ms_validate_user_signup", get_defined_vars ());
96
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
97
  }
@@ -150,7 +150,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
150
  {
151
  global $pagenow; /* Need this to detect the current admin page. */
152
  /**/
153
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
154
  do_action ("ws_plugin__s2member_before_ms_process_signup_meta", get_defined_vars ());
155
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
156
  /**/
@@ -188,11 +188,11 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
188
  */
189
  public static function ms_activate_existing_user ($_error = FALSE, $vars = FALSE)
190
  {
191
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
192
  do_action ("ws_plugin__s2member_before_ms_activate_existing_user", get_defined_vars ());
193
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
194
  /**/
195
- extract ($vars); /* Extract all variables from ``wpmu_activate_signup()`` function. */
196
  /**/
197
  if (is_multisite ()) /* This event should ONLY be processed with Multisite Networking. */
198
  if (!is_admin () && ((preg_match ("/\/wp-activate\.php/", $_SERVER["REQUEST_URI"])) || (c_ws_plugin__s2member_utils_conds::bp_is_installed () && bp_is_activation_page ())))
@@ -201,7 +201,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
201
  if (!empty ($user_already_exists) && c_ws_plugin__s2member_utils_users::ms_user_login_email_exists_but_not_on_blog ($user_login, $user_email))
202
  {
203
  add_user_to_blog ($meta["add_to_blog"], $user_id, $meta["new_role"]); /* Add this User to the specified Blog. */
204
- wp_update_user (array ("ID" => $user_id, "user_pass" => $password)); /* Update Password so it's the same as in the following msg. */
205
  wpmu_welcome_user_notification ($user_id, $password, $meta); /* Send welcome letter via email just like ``wpmu_activate_signup()`` does. */
206
  /**/
207
  do_action ("wpmu_activate_user", $user_id, $password, $meta); /* Process Hook that would have been fired inside `wpmu_activate_signup()`. */
@@ -233,7 +233,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
233
  {
234
  global $pagenow; /* Need this to detect the current admin page. */
235
  /**/
236
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
237
  do_action ("ws_plugin__s2member_before_configure_user_on_ms_user_activation", get_defined_vars ());
238
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
239
  /**/
@@ -272,7 +272,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
272
  */
273
  public static function configure_user_on_ms_blog_activation ($blog_id = FALSE, $user_id = FALSE, $password = FALSE, $title = FALSE, $meta = FALSE)
274
  {
275
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
276
  do_action ("ws_plugin__s2member_before_configure_user_on_ms_blog_activation", get_defined_vars ());
277
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
278
  /**/
@@ -307,7 +307,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
307
  */
308
  public static function ms_register_existing_user ($errors = FALSE, $user_login = FALSE, $user_email = FALSE)
309
  {
310
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
311
  do_action ("ws_plugin__s2member_before_ms_register_existing_user", get_defined_vars ());
312
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
313
  /**/
@@ -333,7 +333,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
333
  /**/
334
  do_action ("ws_plugin__s2member_during_ms_register_existing_user", get_defined_vars ());
335
  /**/
336
- wp_safe_redirect ($redirect_to); /* Use safe redirect; like `register_new_user()`. */
337
  /**/
338
  exit (); /* Clean exit. */
339
  }
@@ -364,7 +364,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
364
  */
365
  public static function ms_create_existing_user ($user_login = FALSE, $user_email = FALSE, $user_pass = FALSE, $user_id = FALSE)
366
  {
367
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
368
  do_action ("ws_plugin__s2member_before_ms_create_existing_user", get_defined_vars ());
369
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
370
  /**/
@@ -373,8 +373,8 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
373
  if (($user_id || ($user_id = c_ws_plugin__s2member_utils_users::ms_user_login_email_exists_but_not_on_blog ($user_login, $user_email))) && $user_pass)
374
  {
375
  $role = get_option ("default_role"); /* Use default Role. */
376
- add_existing_user_to_blog (array ("user_id" => $user_id, "role" => $role)); /* Add existing User. */
377
- wp_update_user (array ("ID" => $user_id, "user_pass" => $user_pass)); /* Update Password to $user_pass. */
378
  /**/
379
  do_action ("ws_plugin__s2member_during_ms_create_existing_user", get_defined_vars ());
380
  do_action ("user_register", $user_id); /* So s2Member knows a User is registering. */
@@ -415,7 +415,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
415
  global $current_site, $current_blog; /* Multisite Networking. */
416
  static $email_config, $processed; /* No duplicate processing. */
417
  /**/
418
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
419
  do_action ("ws_plugin__s2member_before_configure_user_registration", get_defined_vars ());
420
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
421
  /**/
@@ -447,7 +447,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
447
  $meta = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($meta));
448
  /**/
449
  if (!is_admin () && (isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_subscr_gateway"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_subscr_id"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_custom"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_ccaps"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_auto_eot_time"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_notes"])))
450
- exit ("s2Member security violation. You attempted to POST administrative variables that will NOT be trusted in a NON-administrative zone!");
451
  /**/
452
  $_pmr = array_merge ($_p, $meta, $GLOBALS["ws_plugin__s2member_registration_vars"]); /* Merge these all together now. */
453
  unset ($_p, $meta, $GLOBALS["ws_plugin__s2member_registration_vars"]); /* These vars can all be unset now; we now have them all inside $_pmr. */
@@ -497,7 +497,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
497
  /**/
498
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] && !$fname)
499
  if ($login) /* Username and empty Last Name. */
500
- eval ('$fname = trim ($login); $lname = "";');
501
  /**/
502
  $name = trim ($fname . " " . $lname); /* Both names. */
503
  /**/
@@ -532,13 +532,13 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
532
  if (!$user->display_name || $user->display_name === $user->user_login)
533
  {
534
  if ($custom_reg_display_name === "full" && $name)
535
- wp_update_user (array ("ID" => $user_id, "display_name" => $name));
536
  else if ($custom_reg_display_name === "first" && $fname)
537
- wp_update_user (array ("ID" => $user_id, "display_name" => $fname));
538
  else if ($custom_reg_display_name === "last" && $lname)
539
- wp_update_user (array ("ID" => $user_id, "display_name" => $lname));
540
  else if ($custom_reg_display_name === "login" && $login)
541
- wp_update_user (array ("ID" => $user_id, "display_name" => $login));
542
  }
543
  /**/
544
  if (is_multisite ()) /* Should we handle Main Site permissions and Originating Blog ID#? */
@@ -586,25 +586,25 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
586
  if (($transient = "s2m_" . md5 ("s2member_transient_ipn_signup_vars_" . $subscr_id)) && is_array ($ipn_signup_vars = get_transient ($transient)))
587
  {
588
  update_user_option ($user_id, "s2member_ipn_signup_vars", $ipn_signup_vars); /* For future reference. */
589
- delete_transient ($transient); /* This can be deleted now. */
590
  }
591
  if (($transient = "s2m_" . md5 ("s2member_transient_ipn_subscr_payment_" . $subscr_id)) && is_array ($subscr_payment = get_transient ($transient)))
592
  {
593
  $proxy = array ("s2member_paypal_notify" => "1", "s2member_paypal_proxy" => stripslashes ($subscr_payment["subscr_gateway"]), "s2member_paypal_proxy_verification" => c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen ());
594
  c_ws_plugin__s2member_utils_urls::remote (add_query_arg (urlencode_deep ($proxy), site_url ("/")), stripslashes_deep ($subscr_payment), array ("timeout" => 20));
595
- delete_transient ($transient); /* This can be deleted now. */
596
  }
597
  if (($transient = "s2m_" . md5 ("s2member_transient_ipn_subscr_eot_" . $subscr_id)) && is_array ($subscr_eot = get_transient ($transient)))
598
  {
599
  $proxy = array ("s2member_paypal_notify" => "1", "s2member_paypal_proxy" => stripslashes ($subscr_eot["subscr_gateway"]), "s2member_paypal_proxy_verification" => c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen ());
600
  c_ws_plugin__s2member_utils_urls::remote (add_query_arg (urlencode_deep ($proxy), site_url ("/")), stripslashes_deep ($subscr_eot), array ("timeout" => 20));
601
- delete_transient ($transient); /* This can be deleted now. */
602
  }
603
  /**/
604
  if (!headers_sent ()) /* Only if headers are NOT yet sent. Here we establish both Signup and Payment Tracking Cookies. */
605
  @setcookie ("s2member_tracking", ($s2member_tracking = c_ws_plugin__s2member_utils_encryption::encrypt ($subscr_id)), time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie ("s2member_tracking", $s2member_tracking, time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["s2member_tracking"] = $s2member_tracking);
606
  /**/
607
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
608
  do_action ("ws_plugin__s2member_during_configure_user_registration_front_side_paid", get_defined_vars ());
609
  do_action ("ws_plugin__s2member_during_configure_user_registration_front_side", get_defined_vars ());
610
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
@@ -664,7 +664,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
664
  /**/
665
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] && !$fname)
666
  if ($login) /* Username and empty Last Name. */
667
- eval ('$fname = trim ($login); $lname = "";');
668
  /**/
669
  $name = trim ($fname . " " . $lname); /* Both names. */
670
  /**/
@@ -699,13 +699,13 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
699
  if (!$user->display_name || $user->display_name === $user->user_login)
700
  {
701
  if ($custom_reg_display_name === "full" && $name)
702
- wp_update_user (array ("ID" => $user_id, "display_name" => $name));
703
  else if ($custom_reg_display_name === "first" && $fname)
704
- wp_update_user (array ("ID" => $user_id, "display_name" => $fname));
705
  else if ($custom_reg_display_name === "last" && $lname)
706
- wp_update_user (array ("ID" => $user_id, "display_name" => $lname));
707
  else if ($custom_reg_display_name === "login" && $login)
708
- wp_update_user (array ("ID" => $user_id, "display_name" => $login));
709
  }
710
  /**/
711
  if (is_multisite ()) /* Should we handle Main Site permissions and Originating Blog ID#? */
@@ -750,7 +750,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
750
  update_user_option ($user_id, "s2member_paid_registration_times", $pr_times); /* Update now. */
751
  }
752
  /**/
753
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
754
  do_action ("ws_plugin__s2member_during_configure_user_registration_front_side_free", get_defined_vars ());
755
  do_action ("ws_plugin__s2member_during_configure_user_registration_front_side", get_defined_vars ());
756
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
@@ -798,7 +798,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
798
  /**/
799
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] && !$fname)
800
  if ($login) /* Username and empty Last Name. */
801
- eval ('$fname = trim ($login); $lname = "";');
802
  /**/
803
  $name = trim ($fname . " " . $lname); /* Both names. */
804
  /**/
@@ -833,13 +833,13 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
833
  if (!$user->display_name || $user->display_name === $user->user_login)
834
  {
835
  if ($custom_reg_display_name === "full" && $name)
836
- wp_update_user (array ("ID" => $user_id, "display_name" => $name));
837
  else if ($custom_reg_display_name === "first" && $fname)
838
- wp_update_user (array ("ID" => $user_id, "display_name" => $fname));
839
  else if ($custom_reg_display_name === "last" && $lname)
840
- wp_update_user (array ("ID" => $user_id, "display_name" => $lname));
841
  else if ($custom_reg_display_name === "login" && $login)
842
- wp_update_user (array ("ID" => $user_id, "display_name" => $login));
843
  }
844
  /**/
845
  if (is_multisite ()) /* Should we handle Main Site permissions and Originating Blog ID#? */
@@ -884,7 +884,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
884
  update_user_option ($user_id, "s2member_paid_registration_times", $pr_times); /* Update now. */
885
  }
886
  /**/
887
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
888
  do_action ("ws_plugin__s2member_during_configure_user_registration_admin_side", get_defined_vars ());
889
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
890
  }
@@ -1015,13 +1015,13 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
1015
  @setcookie ("s2member_item_number", "", time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie ("s2member_item_number", "", time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
1016
  }
1017
  /**/
1018
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
1019
  do_action ("ws_plugin__s2member_during_configure_user_registration", get_defined_vars ());
1020
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
1021
  }
1022
  }
1023
  /**/
1024
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
1025
  do_action ("ws_plugin__s2member_after_configure_user_registration", get_defined_vars ());
1026
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
1027
  /**/
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_registrations"))
21
  {
43
  */
44
  public static function generate_password ($password = FALSE)
45
  {
46
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
47
  do_action ("ws_plugin__s2member_before_generate_password", get_defined_vars ());
48
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
49
  /**/
81
  */
82
  public static function ms_validate_user_signup ($result = FALSE)
83
  {
84
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
85
  do_action ("ws_plugin__s2member_before_ms_validate_user_signup", get_defined_vars ());
86
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
87
  /**/
91
  if (c_ws_plugin__s2member_utils_users::ms_user_login_email_exists_but_not_on_blog ($result["user_name"], $result["user_email"]))
92
  $result["errors"] = new WP_Error ();
93
  /**/
94
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
95
  do_action ("ws_plugin__s2member_during_ms_validate_user_signup", get_defined_vars ());
96
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
97
  }
150
  {
151
  global $pagenow; /* Need this to detect the current admin page. */
152
  /**/
153
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
154
  do_action ("ws_plugin__s2member_before_ms_process_signup_meta", get_defined_vars ());
155
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
156
  /**/
188
  */
189
  public static function ms_activate_existing_user ($_error = FALSE, $vars = FALSE)
190
  {
191
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
192
  do_action ("ws_plugin__s2member_before_ms_activate_existing_user", get_defined_vars ());
193
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
194
  /**/
195
+ extract($vars); /* Extract all variables from ``wpmu_activate_signup()`` function. */
196
  /**/
197
  if (is_multisite ()) /* This event should ONLY be processed with Multisite Networking. */
198
  if (!is_admin () && ((preg_match ("/\/wp-activate\.php/", $_SERVER["REQUEST_URI"])) || (c_ws_plugin__s2member_utils_conds::bp_is_installed () && bp_is_activation_page ())))
201
  if (!empty ($user_already_exists) && c_ws_plugin__s2member_utils_users::ms_user_login_email_exists_but_not_on_blog ($user_login, $user_email))
202
  {
203
  add_user_to_blog ($meta["add_to_blog"], $user_id, $meta["new_role"]); /* Add this User to the specified Blog. */
204
+ wp_update_user(array ("ID" => $user_id, "user_pass" => $password)); /* Update Password so it's the same as in the following msg. */
205
  wpmu_welcome_user_notification ($user_id, $password, $meta); /* Send welcome letter via email just like ``wpmu_activate_signup()`` does. */
206
  /**/
207
  do_action ("wpmu_activate_user", $user_id, $password, $meta); /* Process Hook that would have been fired inside `wpmu_activate_signup()`. */
233
  {
234
  global $pagenow; /* Need this to detect the current admin page. */
235
  /**/
236
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
237
  do_action ("ws_plugin__s2member_before_configure_user_on_ms_user_activation", get_defined_vars ());
238
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
239
  /**/
272
  */
273
  public static function configure_user_on_ms_blog_activation ($blog_id = FALSE, $user_id = FALSE, $password = FALSE, $title = FALSE, $meta = FALSE)
274
  {
275
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
276
  do_action ("ws_plugin__s2member_before_configure_user_on_ms_blog_activation", get_defined_vars ());
277
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
278
  /**/
307
  */
308
  public static function ms_register_existing_user ($errors = FALSE, $user_login = FALSE, $user_email = FALSE)
309
  {
310
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
311
  do_action ("ws_plugin__s2member_before_ms_register_existing_user", get_defined_vars ());
312
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
313
  /**/
333
  /**/
334
  do_action ("ws_plugin__s2member_during_ms_register_existing_user", get_defined_vars ());
335
  /**/
336
+ wp_safe_redirect($redirect_to); /* Use safe redirect; like `register_new_user()`. */
337
  /**/
338
  exit (); /* Clean exit. */
339
  }
364
  */
365
  public static function ms_create_existing_user ($user_login = FALSE, $user_email = FALSE, $user_pass = FALSE, $user_id = FALSE)
366
  {
367
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
368
  do_action ("ws_plugin__s2member_before_ms_create_existing_user", get_defined_vars ());
369
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
370
  /**/
373
  if (($user_id || ($user_id = c_ws_plugin__s2member_utils_users::ms_user_login_email_exists_but_not_on_blog ($user_login, $user_email))) && $user_pass)
374
  {
375
  $role = get_option ("default_role"); /* Use default Role. */
376
+ add_existing_user_to_blog(array ("user_id" => $user_id, "role" => $role)); /* Add existing User. */
377
+ wp_update_user(array ("ID" => $user_id, "user_pass" => $user_pass)); /* Update Password to $user_pass. */
378
  /**/
379
  do_action ("ws_plugin__s2member_during_ms_create_existing_user", get_defined_vars ());
380
  do_action ("user_register", $user_id); /* So s2Member knows a User is registering. */
415
  global $current_site, $current_blog; /* Multisite Networking. */
416
  static $email_config, $processed; /* No duplicate processing. */
417
  /**/
418
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
419
  do_action ("ws_plugin__s2member_before_configure_user_registration", get_defined_vars ());
420
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
421
  /**/
447
  $meta = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($meta));
448
  /**/
449
  if (!is_admin () && (isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_subscr_gateway"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_subscr_id"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_custom"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_ccaps"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_auto_eot_time"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_notes"])))
450
+ exit(_x ("s2Member security violation. You attempted to POST administrative variables that will NOT be trusted in a NON-administrative zone!", "s2member-front", "s2member"));
451
  /**/
452
  $_pmr = array_merge ($_p, $meta, $GLOBALS["ws_plugin__s2member_registration_vars"]); /* Merge these all together now. */
453
  unset ($_p, $meta, $GLOBALS["ws_plugin__s2member_registration_vars"]); /* These vars can all be unset now; we now have them all inside $_pmr. */
497
  /**/
498
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] && !$fname)
499
  if ($login) /* Username and empty Last Name. */
500
+ eval('$fname = trim ($login); $lname = "";');
501
  /**/
502
  $name = trim ($fname . " " . $lname); /* Both names. */
503
  /**/
532
  if (!$user->display_name || $user->display_name === $user->user_login)
533
  {
534
  if ($custom_reg_display_name === "full" && $name)
535
+ wp_update_user(array ("ID" => $user_id, "display_name" => $name));
536
  else if ($custom_reg_display_name === "first" && $fname)
537
+ wp_update_user(array ("ID" => $user_id, "display_name" => $fname));
538
  else if ($custom_reg_display_name === "last" && $lname)
539
+ wp_update_user(array ("ID" => $user_id, "display_name" => $lname));
540
  else if ($custom_reg_display_name === "login" && $login)
541
+ wp_update_user(array ("ID" => $user_id, "display_name" => $login));
542
  }
543
  /**/
544
  if (is_multisite ()) /* Should we handle Main Site permissions and Originating Blog ID#? */
586
  if (($transient = "s2m_" . md5 ("s2member_transient_ipn_signup_vars_" . $subscr_id)) && is_array ($ipn_signup_vars = get_transient ($transient)))
587
  {
588
  update_user_option ($user_id, "s2member_ipn_signup_vars", $ipn_signup_vars); /* For future reference. */
589
+ delete_transient($transient); /* This can be deleted now. */
590
  }
591
  if (($transient = "s2m_" . md5 ("s2member_transient_ipn_subscr_payment_" . $subscr_id)) && is_array ($subscr_payment = get_transient ($transient)))
592
  {
593
  $proxy = array ("s2member_paypal_notify" => "1", "s2member_paypal_proxy" => stripslashes ($subscr_payment["subscr_gateway"]), "s2member_paypal_proxy_verification" => c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen ());
594
  c_ws_plugin__s2member_utils_urls::remote (add_query_arg (urlencode_deep ($proxy), site_url ("/")), stripslashes_deep ($subscr_payment), array ("timeout" => 20));
595
+ delete_transient($transient); /* This can be deleted now. */
596
  }
597
  if (($transient = "s2m_" . md5 ("s2member_transient_ipn_subscr_eot_" . $subscr_id)) && is_array ($subscr_eot = get_transient ($transient)))
598
  {
599
  $proxy = array ("s2member_paypal_notify" => "1", "s2member_paypal_proxy" => stripslashes ($subscr_eot["subscr_gateway"]), "s2member_paypal_proxy_verification" => c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen ());
600
  c_ws_plugin__s2member_utils_urls::remote (add_query_arg (urlencode_deep ($proxy), site_url ("/")), stripslashes_deep ($subscr_eot), array ("timeout" => 20));
601
+ delete_transient($transient); /* This can be deleted now. */
602
  }
603
  /**/
604
  if (!headers_sent ()) /* Only if headers are NOT yet sent. Here we establish both Signup and Payment Tracking Cookies. */
605
  @setcookie ("s2member_tracking", ($s2member_tracking = c_ws_plugin__s2member_utils_encryption::encrypt ($subscr_id)), time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie ("s2member_tracking", $s2member_tracking, time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["s2member_tracking"] = $s2member_tracking);
606
  /**/
607
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
608
  do_action ("ws_plugin__s2member_during_configure_user_registration_front_side_paid", get_defined_vars ());
609
  do_action ("ws_plugin__s2member_during_configure_user_registration_front_side", get_defined_vars ());
610
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
664
  /**/
665
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] && !$fname)
666
  if ($login) /* Username and empty Last Name. */
667
+ eval('$fname = trim ($login); $lname = "";');
668
  /**/
669
  $name = trim ($fname . " " . $lname); /* Both names. */
670
  /**/
699
  if (!$user->display_name || $user->display_name === $user->user_login)
700
  {
701
  if ($custom_reg_display_name === "full" && $name)
702
+ wp_update_user(array ("ID" => $user_id, "display_name" => $name));
703
  else if ($custom_reg_display_name === "first" && $fname)
704
+ wp_update_user(array ("ID" => $user_id, "display_name" => $fname));
705
  else if ($custom_reg_display_name === "last" && $lname)
706
+ wp_update_user(array ("ID" => $user_id, "display_name" => $lname));
707
  else if ($custom_reg_display_name === "login" && $login)
708
+ wp_update_user(array ("ID" => $user_id, "display_name" => $login));
709
  }
710
  /**/
711
  if (is_multisite ()) /* Should we handle Main Site permissions and Originating Blog ID#? */
750
  update_user_option ($user_id, "s2member_paid_registration_times", $pr_times); /* Update now. */
751
  }
752
  /**/
753
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
754
  do_action ("ws_plugin__s2member_during_configure_user_registration_front_side_free", get_defined_vars ());
755
  do_action ("ws_plugin__s2member_during_configure_user_registration_front_side", get_defined_vars ());
756
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
798
  /**/
799
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] && !$fname)
800
  if ($login) /* Username and empty Last Name. */
801
+ eval('$fname = trim ($login); $lname = "";');
802
  /**/
803
  $name = trim ($fname . " " . $lname); /* Both names. */
804
  /**/
833
  if (!$user->display_name || $user->display_name === $user->user_login)
834
  {
835
  if ($custom_reg_display_name === "full" && $name)
836
+ wp_update_user(array ("ID" => $user_id, "display_name" => $name));
837
  else if ($custom_reg_display_name === "first" && $fname)
838
+ wp_update_user(array ("ID" => $user_id, "display_name" => $fname));
839
  else if ($custom_reg_display_name === "last" && $lname)
840
+ wp_update_user(array ("ID" => $user_id, "display_name" => $lname));
841
  else if ($custom_reg_display_name === "login" && $login)
842
+ wp_update_user(array ("ID" => $user_id, "display_name" => $login));
843
  }
844
  /**/
845
  if (is_multisite ()) /* Should we handle Main Site permissions and Originating Blog ID#? */
884
  update_user_option ($user_id, "s2member_paid_registration_times", $pr_times); /* Update now. */
885
  }
886
  /**/
887
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
888
  do_action ("ws_plugin__s2member_during_configure_user_registration_admin_side", get_defined_vars ());
889
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
890
  }
1015
  @setcookie ("s2member_item_number", "", time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie ("s2member_item_number", "", time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
1016
  }
1017
  /**/
1018
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
1019
  do_action ("ws_plugin__s2member_during_configure_user_registration", get_defined_vars ());
1020
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
1021
  }
1022
  }
1023
  /**/
1024
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
1025
  do_action ("ws_plugin__s2member_after_configure_user_registration", get_defined_vars ());
1026
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
1027
  /**/
includes/classes/return-templates.inc.php CHANGED
@@ -46,33 +46,35 @@ if (!class_exists ("c_ws_plugin__s2member_return_templates"))
46
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
47
  /**/
48
  $template = ($template) ? $template : "default";
49
- $continue_html = ($continue_html) ? $continue_html : "Continue";
50
  $continue_link = ($continue_link) ? $continue_link : home_url ("/");
51
- $response = ($response) ? $response : "Thank you. Please click the link below.";
 
 
 
 
52
  /**/
53
- $custom_template = (file_exists (TEMPLATEPATH . "/" . $template . "-return.html")) ? TEMPLATEPATH . "/" . $template . "-return.html" : false;
54
- $custom_template = (file_exists (TEMPLATEPATH . "/" . $template . "-return.php")) ? TEMPLATEPATH . "/" . $template . "-return.php" : $custom_template;
55
- $custom_template = (file_exists (WP_CONTENT_DIR . "/" . $template . "-return.html")) ? WP_CONTENT_DIR . "/" . $template . "-return.html" : $custom_template;
56
  $custom_template = (file_exists (WP_CONTENT_DIR . "/" . $template . "-return.php")) ? WP_CONTENT_DIR . "/" . $template . "-return.php" : $custom_template;
 
57
  /**/
58
- $custom_template = (!$custom_template && file_exists (TEMPLATEPATH . "/default-return.html")) ? TEMPLATEPATH . "/default-return.html" : $custom_template;
59
  $custom_template = (!$custom_template && file_exists (TEMPLATEPATH . "/default-return.php")) ? TEMPLATEPATH . "/default-return.php" : $custom_template;
60
- $custom_template = (!$custom_template && file_exists (WP_CONTENT_DIR . "/default-return.html")) ? WP_CONTENT_DIR . "/default-return.html" : $custom_template;
 
61
  $custom_template = (!$custom_template && file_exists (WP_CONTENT_DIR . "/default-return.php")) ? WP_CONTENT_DIR . "/default-return.php" : $custom_template;
 
62
  /**/
63
- $specific_template = ($custom_template) ? $custom_template : ((file_exists ($specific_template = dirname (dirname (__FILE__)) . "/templates/returns/" . $template . "-return.html")) ? $specific_template : false);
64
  /**/
65
- $code = trim (file_get_contents ((($specific_template) ? $specific_template : dirname (dirname (__FILE__)) . "/templates/returns/default-return.html")));
66
- $code = (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? c_ws_plugin__s2member_utilities::evl ($code) : $code;
67
  /**/
68
- $doctype_html_head = c_ws_plugin__s2member_utils_html::doctype_html_head (get_bloginfo ("name"), "ws_plugin__s2member_during_return_template_head_" . (($specific_template) ? basename ($specific_template) : "default-return.html"));
69
  $code = preg_replace ("/%%doctype_html_head%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (apply_filters ("ws_plugin__s2member_return_template_doctype_html_head", $doctype_html_head, get_defined_vars ())), $code);
70
  /**/
71
- $code = preg_replace ("/%%header%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (apply_filters ("ws_plugin__s2member_return_template_header", '[ ' . esc_html ($_SERVER["HTTP_HOST"]) . ' ] <strong><em>says&hellip;</em></strong>', get_defined_vars ())), $code);
72
  /**/
73
  $code = preg_replace ("/%%response%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (apply_filters ("ws_plugin__s2member_return_template_response", $response, get_defined_vars ())), $code);
74
  $code = preg_replace ("/%%continue%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (apply_filters ("ws_plugin__s2member_return_template_continue", '<a href="' . esc_attr ($continue_link) . '">' . $continue_html . '</a>', get_defined_vars ())), $code);
75
- $code = preg_replace ("/%%support%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (apply_filters ("ws_plugin__s2member_return_template_support", 'If you need assistance, please <a href="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_support_link"]) . '" target="_blank">contact support</a>.', get_defined_vars ())), $code);
76
  $code = preg_replace ("/%%tracking%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (apply_filters ("ws_plugin__s2member_return_template_tracking", c_ws_plugin__s2member_tracking_codes::generate_all_tracking_codes (), get_defined_vars ())), $code);
77
  /**/
78
  return apply_filters ("ws_plugin__s2member_return_template", $code, get_defined_vars ());
46
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
47
  /**/
48
  $template = ($template) ? $template : "default";
 
49
  $continue_link = ($continue_link) ? $continue_link : home_url ("/");
50
+ $continue_html = ($continue_html) ? $continue_html : _x ("Continue", "s2member-front", "s2member");
51
+ $response = ($response) ? $response : _x ("Thank you. Please click the link below.", "s2member-front", "s2member");
52
+ /**/
53
+ $custom_template = (file_exists (TEMPLATEPATH . "/" . $template . "-return.php")) ? TEMPLATEPATH . "/" . $template . "-return.php" : false;
54
+ $custom_template = (file_exists (TEMPLATEPATH . "/" . $template . "-return.html")) ? TEMPLATEPATH . "/" . $template . "-return.html" : $custom_template;
55
  /**/
 
 
 
56
  $custom_template = (file_exists (WP_CONTENT_DIR . "/" . $template . "-return.php")) ? WP_CONTENT_DIR . "/" . $template . "-return.php" : $custom_template;
57
+ $custom_template = (file_exists (WP_CONTENT_DIR . "/" . $template . "-return.html")) ? WP_CONTENT_DIR . "/" . $template . "-return.html" : $custom_template;
58
  /**/
 
59
  $custom_template = (!$custom_template && file_exists (TEMPLATEPATH . "/default-return.php")) ? TEMPLATEPATH . "/default-return.php" : $custom_template;
60
+ $custom_template = (!$custom_template && file_exists (TEMPLATEPATH . "/default-return.html")) ? TEMPLATEPATH . "/default-return.html" : $custom_template;
61
+ /**/
62
  $custom_template = (!$custom_template && file_exists (WP_CONTENT_DIR . "/default-return.php")) ? WP_CONTENT_DIR . "/default-return.php" : $custom_template;
63
+ $custom_template = (!$custom_template && file_exists (WP_CONTENT_DIR . "/default-return.html")) ? WP_CONTENT_DIR . "/default-return.html" : $custom_template;
64
  /**/
65
+ $specific_template = ($custom_template) ? $custom_template : ((file_exists ($_default_specific_template = dirname (dirname (__FILE__)) . "/templates/returns/" . $template . "-return.php")) ? $_default_specific_template : false);
66
  /**/
67
+ $code = trim (file_get_contents ((($specific_template) ? $specific_template : ($_default_template = dirname (dirname (__FILE__)) . "/templates/returns/default-return.php"))));
68
+ $code = trim (((!$custom_template || !is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? c_ws_plugin__s2member_utilities::evl ($code) : $code));
69
  /**/
70
+ $doctype_html_head = c_ws_plugin__s2member_utils_html::doctype_html_head (get_bloginfo ("name"), "ws_plugin__s2member_during_return_template_head_" . (($specific_template) ? basename ($specific_template) : "default-return.php"));
71
  $code = preg_replace ("/%%doctype_html_head%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (apply_filters ("ws_plugin__s2member_return_template_doctype_html_head", $doctype_html_head, get_defined_vars ())), $code);
72
  /**/
73
+ $code = preg_replace ("/%%header%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (apply_filters ("ws_plugin__s2member_return_template_header", sprintf (_x ('[ %s ] <strong><em>says&hellip;</em></strong>', "s2member-front", "s2member"), esc_html ($_SERVER["HTTP_HOST"])), get_defined_vars ())), $code);
74
  /**/
75
  $code = preg_replace ("/%%response%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (apply_filters ("ws_plugin__s2member_return_template_response", $response, get_defined_vars ())), $code);
76
  $code = preg_replace ("/%%continue%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (apply_filters ("ws_plugin__s2member_return_template_continue", '<a href="' . esc_attr ($continue_link) . '">' . $continue_html . '</a>', get_defined_vars ())), $code);
77
+ $code = preg_replace ("/%%support%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (apply_filters ("ws_plugin__s2member_return_template_support", sprintf (_x ('If you need assistance, please <a href="%s" target="_blank">contact support</a>.', "s2member-front", "s2member"), esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_support_link"])), get_defined_vars ())), $code);
78
  $code = preg_replace ("/%%tracking%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (apply_filters ("ws_plugin__s2member_return_template_tracking", c_ws_plugin__s2member_tracking_codes::generate_all_tracking_codes (), get_defined_vars ())), $code);
79
  /**/
80
  return apply_filters ("ws_plugin__s2member_return_template", $code, get_defined_vars ());
includes/classes/sc-keys-in.inc.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Shortcode `[s2Key /]` ( inner processing routines ).
4
+ *
5
+ * Copyright: © 2009-2011
6
+ * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
+ * ( coded in the USA )
8
+ *
9
+ * Released under the terms of the GNU General Public License.
10
+ * You should have received a copy of the GNU General Public License,
11
+ * along with this software. In the main directory, see: /licensing/
12
+ * If not, see: {@link http://www.gnu.org/licenses/}.
13
+ *
14
+ * @package s2Member\s2Key
15
+ * @since 110912
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_keys_in"))
21
+ {
22
+ /**
23
+ * Shortcode `[s2Key /]` ( inner processing routines ).
24
+ *
25
+ * @package s2Member\s2Key
26
+ * @since 110912
27
+ */
28
+ class c_ws_plugin__s2member_sc_keys_in
29
+ {
30
+ /**
31
+ * Handles the Shortcode for: `[s2Key /]`.
32
+ *
33
+ * @package s2Member\s2Key
34
+ * @since 110912
35
+ *
36
+ * @attaches-to: ``add_shortcode("s2Key");``
37
+ *
38
+ * @param array $attr An array of Attributes.
39
+ * @param str $content Content inside the Shortcode.
40
+ * @param str $shortcode The actual Shortcode name itself.
41
+ * @return str Value of the requested key, or null on failure.
42
+ */
43
+ public static function sc_get_key ($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_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
+ /**/
53
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
54
+ do_action ("ws_plugin__s2member_before_sc_get_key_after_shortcode_atts", get_defined_vars ());
55
+ unset ($__refs, $__v); /* Unset defined __refs, __v. */
56
+ /**/
57
+ if ($attr["file_download"]) /* Requesting a File Download Key? */
58
+ $get = c_ws_plugin__s2member_files::file_download_key ($attr["file_download"], $attr["directive"]);
59
+ /**/
60
+ return apply_filters ("ws_plugin__s2member_sc_get_key", ((isset ($get)) ? $get : null), get_defined_vars ());
61
+ }
62
+ }
63
+ }
64
+ ?>
includes/classes/sc-keys.inc.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Shortcode `[s2Key /]`.
4
+ *
5
+ * Copyright: © 2009-2011
6
+ * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
+ * ( coded in the USA )
8
+ *
9
+ * Released under the terms of the GNU General Public License.
10
+ * You should have received a copy of the GNU General Public License,
11
+ * along with this software. In the main directory, see: /licensing/
12
+ * If not, see: {@link http://www.gnu.org/licenses/}.
13
+ *
14
+ * @package s2Member\s2Key
15
+ * @since 110912
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_keys"))
21
+ {
22
+ /**
23
+ * Shortcode `[s2Key /]`.
24
+ *
25
+ * @package s2Member\s2Key
26
+ * @since 110912
27
+ */
28
+ class c_ws_plugin__s2member_sc_keys
29
+ {
30
+ /**
31
+ * Handles the Shortcode for: `[s2Key /]`.
32
+ *
33
+ * @package s2Member\s2Key
34
+ * @since 110912
35
+ *
36
+ * @attaches-to: ``add_shortcode("s2Key");``
37
+ *
38
+ * @param array $attr An array of Attributes.
39
+ * @param str $content Content inside the Shortcode.
40
+ * @param str $shortcode The actual Shortcode name itself.
41
+ * @return inner Return-value of inner routine.
42
+ */
43
+ public static function sc_get_key ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
44
+ {
45
+ return c_ws_plugin__s2member_sc_keys_in::sc_get_key ($attr, $content, $shortcode);
46
+ }
47
+ }
48
+ }
49
+ ?>
includes/classes/sc-paypal-button-e.inc.php CHANGED
@@ -74,7 +74,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_e"))
74
  if (($paypal = c_ws_plugin__s2member_paypal_utilities::paypal_api_response ($paypal)) && empty ($paypal["__error"]) && !empty ($paypal["WEBSITECODE"]) && ($code = $paypal["WEBSITECODE"]))
75
  /* Only proceed if we DID get a valid response from the PayPal® API. This works as a nice fallback; just in case the API connection fails. */
76
  {
77
- $default_image = "https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif"; /* Default PayPal® image. */
78
  /**/
79
  $code = preg_replace ("/\<img[^\>]+\>/i", "", $code); /* Remove the 1x1 pixel tracking image that PayPal® sticks in there. */
80
  $code = preg_replace ("/(\<input)([^\>]+)(\>)/ie", "'\\1'.rtrim(stripslashes('\\2'),'/').' /\\3'", $code); /* Use XHTML! */
74
  if (($paypal = c_ws_plugin__s2member_paypal_utilities::paypal_api_response ($paypal)) && empty ($paypal["__error"]) && !empty ($paypal["WEBSITECODE"]) && ($code = $paypal["WEBSITECODE"]))
75
  /* Only proceed if we DID get a valid response from the PayPal® API. This works as a nice fallback; just in case the API connection fails. */
76
  {
77
+ $default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_xpressCheckout.gif";
78
  /**/
79
  $code = preg_replace ("/\<img[^\>]+\>/i", "", $code); /* Remove the 1x1 pixel tracking image that PayPal® sticks in there. */
80
  $code = preg_replace ("/(\<input)([^\>]+)(\>)/ie", "'\\1'.rtrim(stripslashes('\\2'),'/').' /\\3'", $code); /* Use XHTML! */
includes/classes/sc-paypal-button-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_paypal_button_in"))
21
  {
@@ -42,7 +42,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
42
  */
43
  public static function sc_paypal_button ($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_paypal_button", get_defined_vars ());
47
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
48
  /**/
@@ -64,15 +64,15 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
64
  $attr["rr"] = ($attr["level"] === "*") ? "BN" : $attr["rr"]; /* Independent Ccaps require Buy Now. Only after running shortcode_atts(). */
65
  $attr["ns"] = ($attr["dg"] === "1") ? "1" : $attr["ns"]; /* No shipping directive must be 1 for digital items. After shortcode_atts(). */
66
  /**/
67
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
68
  do_action ("ws_plugin__s2member_before_sc_paypal_button_after_shortcode_atts", get_defined_vars ());
69
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
70
  /**/
71
  if ($attr["cancel"]) /* This is a special routine for Cancellation Buttons. */
72
  {
73
- $default_image = "https://www.paypal.com/en_US/i/btn/btn_unsubscribe_LG.gif"; /* Default Image. */
74
  /**/
75
- $code = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-cancellation-button.html"));
76
  $code = preg_replace ("/%%images%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images")), $code);
77
  $code = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $code);
78
  /**/
@@ -84,14 +84,14 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
84
  $code = ($attr["output"] === "anchor") ? $code : $code; /* Cancellation Buttons are already in anchor format; Button format is not used in Cancellations. */
85
  $code = ($attr["output"] === "url") ? "https://" . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com") . "/cgi-bin/webscr?cmd=_subscr-find&alias=" . urlencode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"]) : $code;
86
  /**/
87
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
88
  do_action ("ws_plugin__s2member_during_sc_paypal_cancellation_button", get_defined_vars ());
89
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
90
  }
91
  /**/
92
  else if ($attr["sp"]) /* This is a special routine for Specific Post/Page Buttons. */
93
  {
94
- $default_image = "https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif"; /* Default Image. */
95
  /**/
96
  $paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
97
  $paypal_os0_input_value = ($referencing) ? $referencing : $_SERVER["HTTP_HOST"]; /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */
@@ -106,7 +106,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
106
  $success_return_url = site_url ("/?s2member_paypal_return=1"); /* s2Member handles this all by itself. However, it can be Filtered. */
107
  $success_return_url = apply_filters ("ws_plugin__s2member_during_sc_paypal_button_success_return_url", $success_return_url, get_defined_vars ());
108
  /**/
109
- $code = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-sp-checkout-button.html"));
110
  $code = preg_replace ("/%%images%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images")), $code);
111
  $code = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $code);
112
  /**/
@@ -139,13 +139,13 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
139
  $code = ($attr["output"] === "anchor") ? '<a href="' . esc_attr (c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code)) . '"><img src="' . esc_attr (($attr["image"] && $attr["image"] !== "default") ? $attr["image"] : $default_image) . '" style="width:auto; height:auto; border:0;" alt="PayPal®" /></a>' : $code;
140
  $code = ($attr["output"] === "url") ? c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code) : $code;
141
  /**/
142
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
143
  do_action ("ws_plugin__s2member_during_sc_paypal_sp_button", get_defined_vars ());
144
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
145
  }
146
  else if ($attr["level"] === "*") /* This is a special routine for Independent Custom Capabilities. */
147
  {
148
- $default_image = "https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif"; /* Default Image. */
149
  /**/
150
  $paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
151
  $paypal_os0_input_value = ($referencing) ? $referencing : $_SERVER["HTTP_HOST"]; /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */
@@ -161,7 +161,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
161
  $success_return_url = site_url ("/?s2member_paypal_return=1"); /* s2Member handles this all by itself. However, it can be Filtered. */
162
  $success_return_url = apply_filters ("ws_plugin__s2member_during_sc_paypal_button_success_return_url", $success_return_url, get_defined_vars ());
163
  /**/
164
- $code = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-ccaps-checkout-button.html"));
165
  $code = preg_replace ("/%%images%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images")), $code);
166
  $code = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $code);
167
  /**/
@@ -194,13 +194,13 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
194
  $code = ($attr["output"] === "anchor") ? '<a href="' . esc_attr (c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code)) . '"><img src="' . esc_attr (($attr["image"] && $attr["image"] !== "default") ? $attr["image"] : $default_image) . '" style="width:auto; height:auto; border:0;" alt="PayPal®" /></a>' : $code;
195
  $code = ($attr["output"] === "url") ? c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code) : $code;
196
  /**/
197
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
198
  do_action ("ws_plugin__s2member_during_sc_paypal_ccaps_button", get_defined_vars ());
199
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
200
  }
201
  else /* Otherwise, we'll process this Button normally, using the Membership routines. */
202
  {
203
- $default_image = "https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif"; /* Default PayPal® Image. */
204
  /**/
205
  $paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
206
  $paypal_os0_input_value = ($referencing) ? $referencing : $_SERVER["HTTP_HOST"]; /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */
@@ -221,7 +221,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
221
  $success_return_url = add_query_arg ("s2member_paypal_return_tra", urlencode (c_ws_plugin__s2member_utils_encryption::encrypt (serialize ($success_return_tra))), $success_return_url);
222
  $success_return_url = apply_filters ("ws_plugin__s2member_during_sc_paypal_button_success_return_url", $success_return_url, get_defined_vars ());
223
  /**/
224
- $code = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-checkout-button.html"));
225
  $code = preg_replace ("/%%images%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images")), $code);
226
  $code = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $code);
227
  /**/
@@ -276,7 +276,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
276
  $code = ($attr["output"] === "anchor") ? '<a href="' . esc_attr (c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code)) . '"><img src="' . esc_attr (($attr["image"] && $attr["image"] !== "default") ? $attr["image"] : $default_image) . '" style="width:auto; height:auto; border:0;" alt="PayPal®" /></a>' : $code;
277
  $code = ($attr["output"] === "url") ? c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code) : $code;
278
  /**/
279
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
280
  ($attr["modify"]) ? do_action ("ws_plugin__s2member_during_sc_paypal_modification_button", get_defined_vars ())/**/
281
  : do_action ("ws_plugin__s2member_during_sc_paypal_button", get_defined_vars ()); /* Else, we process normally. */
282
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
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_paypal_button_in"))
21
  {
42
  */
43
  public static function sc_paypal_button ($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_paypal_button", get_defined_vars ());
47
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
48
  /**/
64
  $attr["rr"] = ($attr["level"] === "*") ? "BN" : $attr["rr"]; /* Independent Ccaps require Buy Now. Only after running shortcode_atts(). */
65
  $attr["ns"] = ($attr["dg"] === "1") ? "1" : $attr["ns"]; /* No shipping directive must be 1 for digital items. After shortcode_atts(). */
66
  /**/
67
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
68
  do_action ("ws_plugin__s2member_before_sc_paypal_button_after_shortcode_atts", get_defined_vars ());
69
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
70
  /**/
71
  if ($attr["cancel"]) /* This is a special routine for Cancellation Buttons. */
72
  {
73
+ $default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_unsubscribe_LG.gif";
74
  /**/
75
+ $code = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-cancellation-button.php")));
76
  $code = preg_replace ("/%%images%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images")), $code);
77
  $code = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $code);
78
  /**/
84
  $code = ($attr["output"] === "anchor") ? $code : $code; /* Cancellation Buttons are already in anchor format; Button format is not used in Cancellations. */
85
  $code = ($attr["output"] === "url") ? "https://" . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com") . "/cgi-bin/webscr?cmd=_subscr-find&alias=" . urlencode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"]) : $code;
86
  /**/
87
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
88
  do_action ("ws_plugin__s2member_during_sc_paypal_cancellation_button", get_defined_vars ());
89
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
90
  }
91
  /**/
92
  else if ($attr["sp"]) /* This is a special routine for Specific Post/Page Buttons. */
93
  {
94
+ $default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_xpressCheckout.gif";
95
  /**/
96
  $paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
97
  $paypal_os0_input_value = ($referencing) ? $referencing : $_SERVER["HTTP_HOST"]; /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */
106
  $success_return_url = site_url ("/?s2member_paypal_return=1"); /* s2Member handles this all by itself. However, it can be Filtered. */
107
  $success_return_url = apply_filters ("ws_plugin__s2member_during_sc_paypal_button_success_return_url", $success_return_url, get_defined_vars ());
108
  /**/
109
+ $code = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-sp-checkout-button.php")));
110
  $code = preg_replace ("/%%images%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images")), $code);
111
  $code = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $code);
112
  /**/
139
  $code = ($attr["output"] === "anchor") ? '<a href="' . esc_attr (c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code)) . '"><img src="' . esc_attr (($attr["image"] && $attr["image"] !== "default") ? $attr["image"] : $default_image) . '" style="width:auto; height:auto; border:0;" alt="PayPal®" /></a>' : $code;
140
  $code = ($attr["output"] === "url") ? c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code) : $code;
141
  /**/
142
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
143
  do_action ("ws_plugin__s2member_during_sc_paypal_sp_button", get_defined_vars ());
144
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
145
  }
146
  else if ($attr["level"] === "*") /* This is a special routine for Independent Custom Capabilities. */
147
  {
148
+ $default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_xpressCheckout.gif";
149
  /**/
150
  $paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
151
  $paypal_os0_input_value = ($referencing) ? $referencing : $_SERVER["HTTP_HOST"]; /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */
161
  $success_return_url = site_url ("/?s2member_paypal_return=1"); /* s2Member handles this all by itself. However, it can be Filtered. */
162
  $success_return_url = apply_filters ("ws_plugin__s2member_during_sc_paypal_button_success_return_url", $success_return_url, get_defined_vars ());
163
  /**/
164
+ $code = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-ccaps-checkout-button.php")));
165
  $code = preg_replace ("/%%images%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images")), $code);
166
  $code = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $code);
167
  /**/
194
  $code = ($attr["output"] === "anchor") ? '<a href="' . esc_attr (c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code)) . '"><img src="' . esc_attr (($attr["image"] && $attr["image"] !== "default") ? $attr["image"] : $default_image) . '" style="width:auto; height:auto; border:0;" alt="PayPal®" /></a>' : $code;
195
  $code = ($attr["output"] === "url") ? c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code) : $code;
196
  /**/
197
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
198
  do_action ("ws_plugin__s2member_during_sc_paypal_ccaps_button", get_defined_vars ());
199
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
200
  }
201
  else /* Otherwise, we'll process this Button normally, using the Membership routines. */
202
  {
203
+ $default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_xpressCheckout.gif";
204
  /**/
205
  $paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
206
  $paypal_os0_input_value = ($referencing) ? $referencing : $_SERVER["HTTP_HOST"]; /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */
221
  $success_return_url = add_query_arg ("s2member_paypal_return_tra", urlencode (c_ws_plugin__s2member_utils_encryption::encrypt (serialize ($success_return_tra))), $success_return_url);
222
  $success_return_url = apply_filters ("ws_plugin__s2member_during_sc_paypal_button_success_return_url", $success_return_url, get_defined_vars ());
223
  /**/
224
+ $code = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-checkout-button.php")));
225
  $code = preg_replace ("/%%images%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images")), $code);
226
  $code = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $code);
227
  /**/
276
  $code = ($attr["output"] === "anchor") ? '<a href="' . esc_attr (c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code)) . '"><img src="' . esc_attr (($attr["image"] && $attr["image"] !== "default") ? $attr["image"] : $default_image) . '" style="width:auto; height:auto; border:0;" alt="PayPal®" /></a>' : $code;
277
  $code = ($attr["output"] === "url") ? c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code) : $code;
278
  /**/
279
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
280
  ($attr["modify"]) ? do_action ("ws_plugin__s2member_during_sc_paypal_modification_button", get_defined_vars ())/**/
281
  : do_action ("ws_plugin__s2member_during_sc_paypal_button", get_defined_vars ()); /* Else, we process normally. */
282
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
includes/classes/sc-profile-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_profile_in"))
21
  {
@@ -42,7 +42,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
42
  */
43
  public static function sc_profile ($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_profile", get_defined_vars ());
47
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
48
  /**/
@@ -56,7 +56,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
56
  /**/
57
  $attr = shortcode_atts (array (), $attr); /* Possible Attributes. None. */
58
  /**/
59
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
60
  do_action ("ws_plugin__s2member_before_sc_profile_after_shortcode_atts", get_defined_vars ());
61
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
62
  /**/
@@ -67,57 +67,57 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
67
  if ($GLOBALS["ws_plugin__s2member_profile_saved"]) /* Respond to successful updates. */
68
  {
69
  echo '<div id="ws-plugin--s2member-profile-saved">' . "\n";
70
- echo 'Profile updated successfully.' . "\n";
71
  echo '</div>' . "\n";
72
  }
73
  /**/
74
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
75
  do_action ("ws_plugin__s2member_during_profile_before_table", get_defined_vars ());
76
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
77
  /**/
78
  echo '<table cellpadding="0" cellspacing="0">' . "\n";
79
  echo '<tbody>' . "\n";
80
  /**/
81
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
82
  do_action ("ws_plugin__s2member_during_profile_before_fields", get_defined_vars ());
83
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
84
  /**/
85
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_username", true, get_defined_vars ()))
86
  {
87
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
88
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_username", get_defined_vars ());
89
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
90
  /**/
91
  echo '<tr>' . "\n";
92
  echo '<td>' . "\n";
93
  echo '<label for="ws-plugin--s2member-profile-login">' . "\n";
94
- echo '<strong>Username *</strong> <small>( cannot be changed )</small><br />' . "\n";
95
  echo '<input aria-required="true" type="text" maxlength="60" name="ws_plugin__s2member_profile_login" id="ws-plugin--s2member-profile-login" class="ws-plugin--s2member-profile-field" value="' . format_to_edit ($user->user_login) . '" disabled="disabled" />' . "\n";
96
  echo '</label>' . "\n";
97
  echo '</td>' . "\n";
98
  echo '</tr>' . "\n";
99
  /**/
100
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
101
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_username", get_defined_vars ());
102
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
103
  }
104
  /**/
105
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_email", true, get_defined_vars ()))
106
  {
107
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
108
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_email", get_defined_vars ());
109
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
110
  /**/
111
  echo '<tr>' . "\n";
112
  echo '<td>' . "\n";
113
  echo '<label for="ws-plugin--s2member-profile-email">' . "\n";
114
- echo '<strong>Email Address *</strong><br />' . "\n";
115
  echo '<input aria-required="true" data-expected="email" type="text" maxlength="100" name="ws_plugin__s2member_profile_email" id="ws-plugin--s2member-profile-email" class="ws-plugin--s2member-profile-field" value="' . format_to_edit ($user->user_email) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
116
  echo '</label>' . "\n";
117
  echo '</td>' . "\n";
118
  echo '</tr>' . "\n";
119
  /**/
120
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
121
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_email", get_defined_vars ());
122
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
123
  }
@@ -126,60 +126,60 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
126
  {
127
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_first_name", true, get_defined_vars ()))
128
  {
129
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
130
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_first_name", get_defined_vars ());
131
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
132
  /**/
133
  echo '<tr>' . "\n";
134
  echo '<td>' . "\n";
135
  echo '<label for="ws-plugin--s2member-profile-first-name">' . "\n";
136
- echo '<strong>First Name *</strong><br />' . "\n";
137
  echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_profile_first_name" id="ws-plugin--s2member-profile-first-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->first_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
138
  echo '</label>' . "\n";
139
  echo '</td>' . "\n";
140
  echo '</tr>' . "\n";
141
  /**/
142
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
143
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_first_name", get_defined_vars ());
144
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
145
  }
146
  /**/
147
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_last_name", true, get_defined_vars ()))
148
  {
149
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
150
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_last_name", get_defined_vars ());
151
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
152
  /**/
153
  echo '<tr>' . "\n";
154
  echo '<td>' . "\n";
155
  echo '<label for="ws-plugin--s2member-profile-last-name">' . "\n";
156
- echo '<strong>Last Name *</strong><br />' . "\n";
157
  echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_profile_last_name" id="ws-plugin--s2member-profile-last-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->last_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
158
  echo '</label>' . "\n";
159
  echo '</td>' . "\n";
160
  echo '</tr>' . "\n";
161
  /**/
162
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
163
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_last_name", get_defined_vars ());
164
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
165
  }
166
  /**/
167
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_display_name", true, get_defined_vars ()))
168
  {
169
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
170
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_display_name", get_defined_vars ());
171
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
172
  /**/
173
  echo '<tr>' . "\n";
174
  echo '<td>' . "\n";
175
  echo '<label for="ws-plugin--s2member-profile-display-name">' . "\n";
176
- echo '<strong>Display Name *</strong><br />' . "\n";
177
  echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_profile_display_name" id="ws-plugin--s2member-profile-display-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->display_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
178
  echo '</label>' . "\n";
179
  echo '</td>' . "\n";
180
  echo '</tr>' . "\n";
181
  /**/
182
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
183
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_display_name", get_defined_vars ());
184
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
185
  }
@@ -192,13 +192,15 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
192
  {
193
  $fields = get_user_option ("s2member_custom_fields", $user_id);
194
  /**/
195
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
 
 
196
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_custom_fields", get_defined_vars ());
197
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
198
  /**/
199
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
200
  {
201
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
202
  do_action ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_before", get_defined_vars ());
203
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
204
  /**/
@@ -207,7 +209,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
207
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
208
  $field_id_class = preg_replace ("/_/", "-", $field_var);
209
  /**/
210
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
211
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_display", true, get_defined_vars ()))
212
  {
213
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
@@ -217,19 +219,19 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
217
  echo '<td>' . "\n";
218
  echo '<label for="ws-plugin--s2member-profile-' . esc_attr ($field_id_class) . '">' . "\n";
219
  echo '<strong' . ((preg_match ("/^(checkbox|pre_checkbox)$/", $field["type"])) ? ' style="display:none;"' : '') . '>' . $field["label"] . (($field["required"] === "yes") ? ' *' : '') . '</strong></label>' . ((preg_match ("/^(checkbox|pre_checkbox)$/", $field["type"])) ? '' : '<br />') . "\n";
220
- echo c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (__FUNCTION__, $field, "ws_plugin__s2member_profile_", "ws-plugin--s2member-profile-", "ws-plugin--s2member-profile-field", "", ($tabindex = $tabindex + 10), "", $fields, $fields[$field_var], "profile");
221
  echo '</td>' . "\n";
222
  echo '</tr>' . "\n";
223
  }
224
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
225
  }
226
  /**/
227
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
228
  do_action ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_after", get_defined_vars ());
229
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
230
  }
231
  /**/
232
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
233
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_custom_fields", get_defined_vars ());
234
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
235
  }
@@ -237,34 +239,34 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
237
  /**/
238
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_password", true, get_defined_vars ()))
239
  {
240
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
241
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_password", get_defined_vars ());
242
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
243
  /**/
244
  echo '<tr>' . "\n";
245
  echo '<td>' . "\n";
246
  /**/
247
- echo '<label for="ws-plugin--s2member-profile-password1" title="Please type your Password twice to confirm.">' . "\n";
248
- echo '<strong>New Password?</strong> <em>( please type it twice )</em><br />' . "\n";
249
- echo '<em>Only if changing password, otherwise leave blank.</em><br />' . "\n";
250
  echo '<input type="password" maxlength="100" autocomplete="off" name="ws_plugin__s2member_profile_password1" id="ws-plugin--s2member-profile-password1" class="ws-plugin--s2member-profile-field" value="" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '"' . (($user->user_login === "demo") ? ' disabled="disabled"' : '') . ' />' . "\n";
251
  echo '</label>' . "\n";
252
  /**/
253
- echo '<label for="ws-plugin--s2member-profile-password2" title="Please type your Password twice to confirm.">' . "\n";
254
  echo '<input type="password" maxlength="100" autocomplete="off" name="ws_plugin__s2member_profile_password2" id="ws-plugin--s2member-profile-password2" class="ws-plugin--s2member-profile-field" value="" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '"' . (($user->user_login === "demo") ? ' disabled="disabled"' : '') . ' />' . "\n";
255
  echo '</label>' . "\n";
256
  /**/
257
- echo '<div id="ws-plugin--s2member-profile-password-strength" class="ws-plugin--s2member-password-strength"><em>password strength indicator</em></div>' . "\n";
258
  /**/
259
  echo '</td>' . "\n";
260
  echo '</tr>' . "\n";
261
  /**/
262
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
263
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_password", get_defined_vars ());
264
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
265
  }
266
  /**/
267
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
268
  do_action ("ws_plugin__s2member_during_profile_after_fields", get_defined_vars ());
269
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
270
  /**/
@@ -272,14 +274,14 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
272
  echo '<td>' . "\n";
273
  echo '<input type="hidden" name="ws_plugin__s2member_sc_profile_save" id="ws-plugin--s2member-sc-profile-save" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-sc-profile-save")) . '" />' . "\n";
274
  echo '<input type="hidden" name="ws_plugin__s2member_profile_save" id="ws-plugin--s2member-profile-save" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-profile-save")) . '" />' . "\n";
275
- echo '<input id="ws-plugin--s2member-profile-submit" type="submit" value="Save All Changes" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
276
  echo '</td>' . "\n";
277
  echo '</tr>' . "\n";
278
  /**/
279
  echo '</tbody>' . "\n";
280
  echo '</table>' . "\n";
281
  /**/
282
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
283
  do_action ("ws_plugin__s2member_during_profile_after_table", get_defined_vars ());
284
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
285
  /**/
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_profile_in"))
21
  {
42
  */
43
  public static function sc_profile ($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_profile", get_defined_vars ());
47
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
48
  /**/
56
  /**/
57
  $attr = shortcode_atts (array (), $attr); /* Possible Attributes. None. */
58
  /**/
59
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
60
  do_action ("ws_plugin__s2member_before_sc_profile_after_shortcode_atts", get_defined_vars ());
61
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
62
  /**/
67
  if ($GLOBALS["ws_plugin__s2member_profile_saved"]) /* Respond to successful updates. */
68
  {
69
  echo '<div id="ws-plugin--s2member-profile-saved">' . "\n";
70
+ echo _x ("Profile updated successfully.", "s2member-front", "s2member") . "\n";
71
  echo '</div>' . "\n";
72
  }
73
  /**/
74
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
75
  do_action ("ws_plugin__s2member_during_profile_before_table", get_defined_vars ());
76
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
77
  /**/
78
  echo '<table cellpadding="0" cellspacing="0">' . "\n";
79
  echo '<tbody>' . "\n";
80
  /**/
81
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
82
  do_action ("ws_plugin__s2member_during_profile_before_fields", get_defined_vars ());
83
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
84
  /**/
85
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_username", true, get_defined_vars ()))
86
  {
87
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
88
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_username", get_defined_vars ());
89
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
90
  /**/
91
  echo '<tr>' . "\n";
92
  echo '<td>' . "\n";
93
  echo '<label for="ws-plugin--s2member-profile-login">' . "\n";
94
+ echo '<strong>' . _x ("Username", "s2member-front", "s2member") . ' *</strong> <small>' . _x ("( cannot be changed )", "s2member-front", "s2member") . '</small><br />' . "\n";
95
  echo '<input aria-required="true" type="text" maxlength="60" name="ws_plugin__s2member_profile_login" id="ws-plugin--s2member-profile-login" class="ws-plugin--s2member-profile-field" value="' . format_to_edit ($user->user_login) . '" disabled="disabled" />' . "\n";
96
  echo '</label>' . "\n";
97
  echo '</td>' . "\n";
98
  echo '</tr>' . "\n";
99
  /**/
100
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
101
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_username", get_defined_vars ());
102
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
103
  }
104
  /**/
105
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_email", true, get_defined_vars ()))
106
  {
107
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
108
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_email", get_defined_vars ());
109
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
110
  /**/
111
  echo '<tr>' . "\n";
112
  echo '<td>' . "\n";
113
  echo '<label for="ws-plugin--s2member-profile-email">' . "\n";
114
+ echo '<strong>' . _x ("Email Address", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
115
  echo '<input aria-required="true" data-expected="email" type="text" maxlength="100" name="ws_plugin__s2member_profile_email" id="ws-plugin--s2member-profile-email" class="ws-plugin--s2member-profile-field" value="' . format_to_edit ($user->user_email) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
116
  echo '</label>' . "\n";
117
  echo '</td>' . "\n";
118
  echo '</tr>' . "\n";
119
  /**/
120
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
121
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_email", get_defined_vars ());
122
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
123
  }
126
  {
127
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_first_name", true, get_defined_vars ()))
128
  {
129
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
130
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_first_name", get_defined_vars ());
131
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
132
  /**/
133
  echo '<tr>' . "\n";
134
  echo '<td>' . "\n";
135
  echo '<label for="ws-plugin--s2member-profile-first-name">' . "\n";
136
+ echo '<strong>' . _x ("First Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
137
  echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_profile_first_name" id="ws-plugin--s2member-profile-first-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->first_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
138
  echo '</label>' . "\n";
139
  echo '</td>' . "\n";
140
  echo '</tr>' . "\n";
141
  /**/
142
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
143
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_first_name", get_defined_vars ());
144
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
145
  }
146
  /**/
147
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_last_name", true, get_defined_vars ()))
148
  {
149
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
150
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_last_name", get_defined_vars ());
151
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
152
  /**/
153
  echo '<tr>' . "\n";
154
  echo '<td>' . "\n";
155
  echo '<label for="ws-plugin--s2member-profile-last-name">' . "\n";
156
+ echo '<strong>' . _x ("Last Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
157
  echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_profile_last_name" id="ws-plugin--s2member-profile-last-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->last_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
158
  echo '</label>' . "\n";
159
  echo '</td>' . "\n";
160
  echo '</tr>' . "\n";
161
  /**/
162
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
163
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_last_name", get_defined_vars ());
164
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
165
  }
166
  /**/
167
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_display_name", true, get_defined_vars ()))
168
  {
169
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
170
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_display_name", get_defined_vars ());
171
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
172
  /**/
173
  echo '<tr>' . "\n";
174
  echo '<td>' . "\n";
175
  echo '<label for="ws-plugin--s2member-profile-display-name">' . "\n";
176
+ echo '<strong>' . _x ("Display Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
177
  echo '<input aria-required="true" type="text" maxlength="100" name="ws_plugin__s2member_profile_display_name" id="ws-plugin--s2member-profile-display-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->display_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
178
  echo '</label>' . "\n";
179
  echo '</td>' . "\n";
180
  echo '</tr>' . "\n";
181
  /**/
182
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
183
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_display_name", get_defined_vars ());
184
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
185
  }
192
  {
193
  $fields = get_user_option ("s2member_custom_fields", $user_id);
194
  /**/
195
+ $tabindex = $tabindex + 9; /* Start tabindex at +9 ( +1 below ). */
196
+ /**/
197
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
198
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_custom_fields", get_defined_vars ());
199
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
200
  /**/
201
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
202
  {
203
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
204
  do_action ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_before", get_defined_vars ());
205
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
206
  /**/
209
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
210
  $field_id_class = preg_replace ("/_/", "-", $field_var);
211
  /**/
212
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
213
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_display", true, get_defined_vars ()))
214
  {
215
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
219
  echo '<td>' . "\n";
220
  echo '<label for="ws-plugin--s2member-profile-' . esc_attr ($field_id_class) . '">' . "\n";
221
  echo '<strong' . ((preg_match ("/^(checkbox|pre_checkbox)$/", $field["type"])) ? ' style="display:none;"' : '') . '>' . $field["label"] . (($field["required"] === "yes") ? ' *' : '') . '</strong></label>' . ((preg_match ("/^(checkbox|pre_checkbox)$/", $field["type"])) ? '' : '<br />') . "\n";
222
+ echo c_ws_plugin__s2member_custom_reg_fields::custom_field_gen (__FUNCTION__, $field, "ws_plugin__s2member_profile_", "ws-plugin--s2member-profile-", "ws-plugin--s2member-profile-field", "", ($tabindex = $tabindex + 1), "", $fields, $fields[$field_var], "profile");
223
  echo '</td>' . "\n";
224
  echo '</tr>' . "\n";
225
  }
226
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
227
  }
228
  /**/
229
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
230
  do_action ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_after", get_defined_vars ());
231
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
232
  }
233
  /**/
234
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
235
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_custom_fields", get_defined_vars ());
236
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
237
  }
239
  /**/
240
  if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_password", true, get_defined_vars ()))
241
  {
242
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
243
  do_action ("ws_plugin__s2member_during_profile_during_fields_before_password", get_defined_vars ());
244
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
245
  /**/
246
  echo '<tr>' . "\n";
247
  echo '<td>' . "\n";
248
  /**/
249
+ echo '<label for="ws-plugin--s2member-profile-password1" title="' . esc_attr (_x ("Please type your Password twice to confirm.", "s2member-front", "s2member")) . '">' . "\n";
250
+ echo '<strong>' . _x ("New Password?", "s2member-front", "s2member") . '</strong> <em>' . _x ("( please type it twice )", "s2member-front", "s2member") . '</em><br />' . "\n";
251
+ echo '<em>' . _x ("Only if changing password, otherwise leave blank.", "s2member-front", "s2member") . '</em><br />' . "\n";
252
  echo '<input type="password" maxlength="100" autocomplete="off" name="ws_plugin__s2member_profile_password1" id="ws-plugin--s2member-profile-password1" class="ws-plugin--s2member-profile-field" value="" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '"' . (($user->user_login === "demo") ? ' disabled="disabled"' : '') . ' />' . "\n";
253
  echo '</label>' . "\n";
254
  /**/
255
+ echo '<label for="ws-plugin--s2member-profile-password2" title="' . esc_attr (_x ("Please type your Password twice to confirm.", "s2member-front", "s2member")) . '">' . "\n";
256
  echo '<input type="password" maxlength="100" autocomplete="off" name="ws_plugin__s2member_profile_password2" id="ws-plugin--s2member-profile-password2" class="ws-plugin--s2member-profile-field" value="" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '"' . (($user->user_login === "demo") ? ' disabled="disabled"' : '') . ' />' . "\n";
257
  echo '</label>' . "\n";
258
  /**/
259
+ echo '<div id="ws-plugin--s2member-profile-password-strength" class="ws-plugin--s2member-password-strength"><em>' . _x ("password strength indicator", "s2member-front", "s2member") . '</em></div>' . "\n";
260
  /**/
261
  echo '</td>' . "\n";
262
  echo '</tr>' . "\n";
263
  /**/
264
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
265
  do_action ("ws_plugin__s2member_during_profile_during_fields_after_password", get_defined_vars ());
266
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
267
  }
268
  /**/
269
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
270
  do_action ("ws_plugin__s2member_during_profile_after_fields", get_defined_vars ());
271
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
272
  /**/
274
  echo '<td>' . "\n";
275
  echo '<input type="hidden" name="ws_plugin__s2member_sc_profile_save" id="ws-plugin--s2member-sc-profile-save" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-sc-profile-save")) . '" />' . "\n";
276
  echo '<input type="hidden" name="ws_plugin__s2member_profile_save" id="ws-plugin--s2member-profile-save" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-profile-save")) . '" />' . "\n";
277
+ echo '<input id="ws-plugin--s2member-profile-submit" type="submit" value="' . esc_attr (_x ("Save All Changes", "s2member-front", "s2member")) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
278
  echo '</td>' . "\n";
279
  echo '</tr>' . "\n";
280
  /**/
281
  echo '</tbody>' . "\n";
282
  echo '</table>' . "\n";
283
  /**/
284
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
285
  do_action ("ws_plugin__s2member_during_profile_after_table", get_defined_vars ());
286
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
287
  /**/
includes/classes/sp-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_sp_access"))
21
  {
@@ -40,7 +40,7 @@ if (!class_exists ("c_ws_plugin__s2member_sp_access"))
40
  */
41
  public static function sp_access_link_gen ($sp_ids = FALSE, $hours = 72, $shrink = TRUE)
42
  {
43
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
44
  do_action ("ws_plugin__s2member_before_sp_access_link_gen", get_defined_vars ());
45
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
46
  /**/
@@ -128,7 +128,7 @@ if (!class_exists ("c_ws_plugin__s2member_sp_access"))
128
  /**/
129
  if (!$read_only && !empty ($_GET["s2member_sp_access"])) /* If this is a Specific Post/Page Link? */
130
  {
131
- echo '<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.';
132
  /**/
133
  exit (); /* $_GET["s2member_sp_access"] has expired. Or it is simply invalid. */
134
  }
@@ -152,7 +152,7 @@ if (!class_exists ("c_ws_plugin__s2member_sp_access"))
152
  */
153
  public static function sp_access_session ($add_sp_access_value = FALSE)
154
  {
155
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
156
  do_action ("ws_plugin__s2member_before_sp_access_session", get_defined_vars ());
157
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
158
  /**/
@@ -168,7 +168,7 @@ if (!class_exists ("c_ws_plugin__s2member_sp_access"))
168
  /**/
169
  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);
170
  /**/
171
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
172
  do_action ("ws_plugin__s2member_during_sp_access_session", get_defined_vars ());
173
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
174
  }
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_sp_access"))
21
  {
40
  */
41
  public static function sp_access_link_gen ($sp_ids = FALSE, $hours = 72, $shrink = TRUE)
42
  {
43
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
44
  do_action ("ws_plugin__s2member_before_sp_access_link_gen", get_defined_vars ());
45
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
46
  /**/
128
  /**/
129
  if (!$read_only && !empty ($_GET["s2member_sp_access"])) /* If this is a Specific Post/Page Link? */
130
  {
131
+ echo _x ('<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance.', "s2member-front", "s2member");
132
  /**/
133
  exit (); /* $_GET["s2member_sp_access"] has expired. Or it is simply invalid. */
134
  }
152
  */
153
  public static function sp_access_session ($add_sp_access_value = FALSE)
154
  {
155
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
156
  do_action ("ws_plugin__s2member_before_sp_access_session", get_defined_vars ());
157
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
158
  /**/
168
  /**/
169
  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);
170
  /**/
171
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
172
  do_action ("ws_plugin__s2member_during_sp_access_session", get_defined_vars ());
173
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
174
  }
includes/classes/ssl-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_ssl_in"))
21
  {
@@ -44,7 +44,7 @@ if (!class_exists ("c_ws_plugin__s2member_ssl_in"))
44
  */
45
  public static function force_ssl ($vars = array ()) /* Phase 2 of ``c_ws_plugin__s2member_ssl::check_force_ssl()``. */
46
  {
47
- extract($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_ssl::check_force_ssl()``. */
48
  /**/
49
  $force_ssl = (!is_string ($force_ssl)) ? (string)(int)$force_ssl : $force_ssl; /* Force string. */
50
  $force_ssl = (is_numeric ($force_ssl) && $force_ssl > 1) ? $force_ssl : "yes"; /* Use `yes`. */
@@ -58,8 +58,7 @@ if (!class_exists ("c_ws_plugin__s2member_ssl_in"))
58
  $https = "https://" . $ssl_host_port . $_SERVER["REQUEST_URI"];
59
  $https_with_s2_ssl_gv = add_query_arg ($s2_ssl_gv, urlencode ($force_ssl), $https);
60
  /**/
61
- wp_redirect($https_with_s2_ssl_gv); /* Redirect to https. */
62
- exit (); /* Clean exit. */
63
  }
64
  else /* Otherwise, we buffer all output, and switch all content over to https. */
65
  /* Also, we assume here that other links on the site should NOT be converted to https. */
@@ -169,7 +168,7 @@ if (!class_exists ("c_ws_plugin__s2member_ssl_in"))
169
  }
170
  }
171
  /**/
172
- ob_start("_ws_plugin__s2member_force_ssl_buffer");
173
  }
174
  /**/
175
  return; /* Return for uniformity. */
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_ssl_in"))
21
  {
44
  */
45
  public static function force_ssl ($vars = array ()) /* Phase 2 of ``c_ws_plugin__s2member_ssl::check_force_ssl()``. */
46
  {
47
+ extract ($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_ssl::check_force_ssl()``. */
48
  /**/
49
  $force_ssl = (!is_string ($force_ssl)) ? (string)(int)$force_ssl : $force_ssl; /* Force string. */
50
  $force_ssl = (is_numeric ($force_ssl) && $force_ssl > 1) ? $force_ssl : "yes"; /* Use `yes`. */
58
  $https = "https://" . $ssl_host_port . $_SERVER["REQUEST_URI"];
59
  $https_with_s2_ssl_gv = add_query_arg ($s2_ssl_gv, urlencode ($force_ssl), $https);
60
  /**/
61
+ wp_redirect ($https_with_s2_ssl_gv) . exit ();
 
62
  }
63
  else /* Otherwise, we buffer all output, and switch all content over to https. */
64
  /* Also, we assume here that other links on the site should NOT be converted to https. */
168
  }
169
  }
170
  /**/
171
+ ob_start ("_ws_plugin__s2member_force_ssl_buffer");
172
  }
173
  /**/
174
  return; /* Return for uniformity. */
includes/classes/tracking-cookies-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_tracking_cookies_in"))
21
  {
@@ -48,9 +48,13 @@ if (!class_exists ("c_ws_plugin__s2member_tracking_cookies_in"))
48
  /**/
49
  do_action ("ws_plugin__s2member_during_delete_tracking_cookie", get_defined_vars ());
50
  /**/
51
- header("Content-Type: image/png"); /* Send a 1px transparent PNG image to browser. */
52
  /**/
53
- exit(file_get_contents (dirname (dirname (dirname (__FILE__))) . "/images/trans-1px.png"));
 
 
 
 
54
  }
55
  /**/
56
  do_action ("ws_plugin__s2member_after_delete_tracking_cookie", get_defined_vars ());
@@ -76,9 +80,13 @@ if (!class_exists ("c_ws_plugin__s2member_tracking_cookies_in"))
76
  /**/
77
  do_action ("ws_plugin__s2member_during_delete_sp_tracking_cookie", get_defined_vars ());
78
  /**/
79
- header("Content-Type: image/png"); /* Send a 1px transparent PNG image to browser. */
 
 
 
 
80
  /**/
81
- exit(file_get_contents (dirname (dirname (dirname (__FILE__))) . "/images/trans-1px.png"));
82
  }
83
  /**/
84
  do_action ("ws_plugin__s2member_after_delete_sp_tracking_cookie", 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_tracking_cookies_in"))
21
  {
48
  /**/
49
  do_action ("ws_plugin__s2member_during_delete_tracking_cookie", get_defined_vars ());
50
  /**/
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
  }
59
  /**/
60
  do_action ("ws_plugin__s2member_after_delete_tracking_cookie", get_defined_vars ());
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
  }
91
  /**/
92
  do_action ("ws_plugin__s2member_after_delete_sp_tracking_cookie", get_defined_vars ());
includes/classes/translations.inc.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * Translations.
4
  *
5
  * Copyright: © 2009-2011
6
  * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
@@ -20,7 +20,7 @@ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
20
  if (!class_exists ("c_ws_plugin__s2member_translations"))
21
  {
22
  /**
23
- * Translations.
24
  *
25
  * @package s2Member\Translations
26
  * @since 3.5
@@ -28,8 +28,34 @@ if (!class_exists ("c_ws_plugin__s2member_translations"))
28
  class c_ws_plugin__s2member_translations
29
  {
30
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  * Handles internal translations via `gettext` Filter.
32
  *
 
 
 
 
 
 
 
33
  * @package s2Member\Translations
34
  * @since 3.5
35
  *
@@ -45,55 +71,76 @@ if (!class_exists ("c_ws_plugin__s2member_translations"))
45
  global $current_site, $current_blog; /* In support of Multisite Networking. */
46
  static $s = array (); /* This static array optimizes all of these routines. */
47
  /**/
48
- if ((isset ($s["is_wp_login"]) && $s["is_wp_login"]) || (!isset ($s["is_wp_login"]) && ($s["is_wp_login"] = (strpos ($_SERVER["REQUEST_URI"], "/wp-login.php") !== false) ? true : false)))
49
  {
50
- if ($translated === "Username" || $translated === "Password") /* Give Filters a chance here. */
51
  {
52
- $translated = apply_filters ("ws_plugin__s2member_translation_mangler", $translated . " *", get_defined_vars ());
53
  }
54
- else if ($translated === "E-mail") /* Give Filters a chance here. */
55
  {
56
- $translated = apply_filters ("ws_plugin__s2member_translation_mangler", "Email Address *", get_defined_vars ());
57
  }
58
- else if ($translated === "Registration complete. Please check your e-mail." && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  {
60
- $translated = apply_filters ("ws_plugin__s2member_translation_mangler", "Registration complete. Please log in.", get_defined_vars ());
61
  }
62
  }
63
  /**/
64
  else if ((isset ($s["is_user_new"]) && $s["is_user_new"]) || (!isset ($s["is_user_new"]) && ($s["is_user_new"] = (strpos ($_SERVER["REQUEST_URI"], "/wp-admin/user-new.php") !== false) ? true : false)))
65
  {
66
- if ($translated === "Hi,\n\nYou have been invited to join '%s' at\n%s as a %s.\nPlease click the following link to confirm the invite:\n%s\n" && !empty ($_REQUEST["role"]) && preg_match ("/^(subscriber|s2member_level[0-9]+)$/", $_REQUEST["role"]))
67
  {
68
- $translated = apply_filters ("ws_plugin__s2member_translation_mangler", 'You have been invited to join "%1$s" at' . "\n" . '%2$s as a Member.' . "\n" . 'Please click the following link to confirm the invite:' . "\n" . '%4$s' . "\n", get_defined_vars ());
69
  }
70
  }
71
  /**/
72
  else if ((isset ($s["is_wp_activate"]) && $s["is_wp_activate"]) || (!isset ($s["is_wp_activate"]) && ($s["is_wp_activate"] = (strpos ($_SERVER["REQUEST_URI"], "/wp-activate.php") !== false) ? true : false)))
73
  {
74
- if (strpos (">View your site<", $translated) !== false) /* Change the way this link reads. */
75
  {
76
- $translated = apply_filters ("ws_plugin__s2member_translation_mangler", str_replace (">View your site<", ">Visit site<", $translated), get_defined_vars ());
77
  }
78
  }
79
  /**/
80
  else if ((isset ($s["is_wp_signup"]) && $s["is_wp_signup"]) || (!isset ($s["is_wp_signup"]) && ($s["is_wp_signup"] = (strpos ($_SERVER["REQUEST_URI"], "/wp-signup.php") !== false) ? true : false)))
81
  {
82
- if ($translated === "If you&#8217;re not going to use a great site domain, leave it for a new user. Now have at it!")
83
  {
84
  $translated = apply_filters ("ws_plugin__s2member_translation_mangler", "", get_defined_vars ());
85
  }
86
- else if ($translated === "Welcome back, %s. By filling out the form below, you can <strong>add another site to your account</strong>. There is no limit to the number of sites you can have, so create to your heart&#8217;s content, but write responsibly!")
87
  {
88
- if (is_user_logged_in () && is_object ($user = wp_get_current_user ())) /* Must have a User obj. */
89
  {
90
- $blogs_allowed = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_blogs_level" . c_ws_plugin__s2member_user_access::user_access_level ($user)];
 
91
  $user_blogs = (is_array ($blogs = get_blogs_of_user ($user->ID))) ? count ($blogs) - 1 : 0;
92
  /**/
93
  $user_blogs = ($user_blogs >= 0) ? $user_blogs : 0; /* NOT less than zero. */
94
  $blogs_allowed = ($blogs_allowed >= 0) ? $blogs_allowed : 0;
95
  /**/
96
- $translated = apply_filters ("ws_plugin__s2member_translation_mangler", "By filling out the form below, you can <strong>" . (($user_blogs >= 1) ? "add another site" : "add a site") . " to your account</strong>." . (($blogs_allowed > 1) ? "<br />You may create up to " . esc_html ($blogs_allowed) . " site" . (($blogs_allowed <> 1) ? "s" : "") . "." : ""), get_defined_vars ());
97
  }
98
  }
99
  }
1
  <?php
2
  /**
3
+ * s2Member translations.
4
  *
5
  * Copyright: © 2009-2011
6
  * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
20
  if (!class_exists ("c_ws_plugin__s2member_translations"))
21
  {
22
  /**
23
+ * s2Member translations.
24
  *
25
  * @package s2Member\Translations
26
  * @since 3.5
28
  class c_ws_plugin__s2member_translations
29
  {
30
  /**
31
+ * Loads s2Member's text domain for translations.
32
+ *
33
+ * @package s2Member\Translations
34
+ * @since 110815
35
+ *
36
+ * @attaches-to: ``add_action("init");``
37
+ *
38
+ * @return null
39
+ */
40
+ public static function load ()
41
+ {
42
+ load_plugin_textdomain ("s2member", false, c_ws_plugin__s2member_utils_dirs::rel_path (WP_PLUGIN_DIR, dirname (dirname (__FILE__)) . "/translations/"));
43
+ /**/
44
+ do_action ("ws_plugin__s2member_during_translations_load", get_defined_vars ());
45
+ /**/
46
+ add_filter ("gettext", "c_ws_plugin__s2member_translations::translation_mangler", 10, 3);
47
+ /**/
48
+ }
49
+ /**
50
  * Handles internal translations via `gettext` Filter.
51
  *
52
+ * Important note. Because this routine also uses translation functionality by WordPress®,
53
+ * anything translated by this routine MUST be different, otherwise it will result in a recursive loop,
54
+ * because the ``__()`` family of functions would be called upon recursively by this routine.
55
+ *
56
+ * If you're translating s2Member into a different language, your MO file for s2Member will automagically deal with
57
+ * everything you see below. No worries. Just build your translation file for s2Member, and you're all set.
58
+ *
59
  * @package s2Member\Translations
60
  * @since 3.5
61
  *
71
  global $current_site, $current_blog; /* In support of Multisite Networking. */
72
  static $s = array (); /* This static array optimizes all of these routines. */
73
  /**/
74
+ if ((isset ($s["is_wp_login"]) && $s["is_wp_login"]) || (!isset ($s["is_wp_login"]) && ($s["is_wp_login"] = (strpos ($_SERVER["REQUEST_URI"], "/wp-login.php") !== false && empty ($_REQUEST["action"]) && empty ($_REQUEST["checkemail"])) ? true : false)))
75
  {
76
+ if ($original === "Username") /* Give Filters a chance here. */
77
  {
78
+ $translated = apply_filters ("ws_plugin__s2member_translation_mangler", _x ("Username:", "s2member-front", "s2member"), get_defined_vars ());
79
  }
80
+ else if ($original === "Password") /* Give Filters a chance here. */
81
  {
82
+ $translated = apply_filters ("ws_plugin__s2member_translation_mangler", _x ("My Password:", "s2member-front", "s2member"), get_defined_vars ());
83
  }
84
+ }
85
+ /**/
86
+ else if ((isset ($s["is_wp_login_register"]) && $s["is_wp_login_register"]) || (!isset ($s["is_wp_login_register"]) && ($s["is_wp_login_register"] = (strpos ($_SERVER["REQUEST_URI"], "/wp-login.php") !== false && !empty ($_REQUEST["action"]) && $_REQUEST["action"] === "register") ? true : false)))
87
+ {
88
+ if ($original === "Username") /* Give Filters a chance here. */
89
+ {
90
+ $translated = apply_filters ("ws_plugin__s2member_translation_mangler", _x ("Username *", "s2member-front", "s2member"), get_defined_vars ());
91
+ }
92
+ else if ($original === "Password") /* Give Filters a chance here. */
93
+ {
94
+ $translated = apply_filters ("ws_plugin__s2member_translation_mangler", _x ("Password *", "s2member-front", "s2member"), get_defined_vars ());
95
+ }
96
+ else if ($original === "E-mail") /* Give Filters a chance here. */
97
+ {
98
+ $translated = apply_filters ("ws_plugin__s2member_translation_mangler", _x ("Email Address *", "s2member-front", "s2member"), get_defined_vars ());
99
+ }
100
+ }
101
+ /**/
102
+ else if ((isset ($s["is_wp_login_checkemail"]) && $s["is_wp_login_checkemail"]) || (!isset ($s["is_wp_login_checkemail"]) && ($s["is_wp_login_checkemail"] = (strpos ($_SERVER["REQUEST_URI"], "/wp-login.php") !== false && empty ($_REQUEST["action"]) && !empty ($_REQUEST["checkemail"]) && $_REQUEST["checkemail"] === "registered") ? true : false)))
103
+ {
104
+ if ($original === "Registration complete. Please check your e-mail." && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"])
105
  {
106
+ $translated = apply_filters ("ws_plugin__s2member_translation_mangler", _x ("Registration complete. Please log in.", "s2member-front", "s2member"), get_defined_vars ());
107
  }
108
  }
109
  /**/
110
  else if ((isset ($s["is_user_new"]) && $s["is_user_new"]) || (!isset ($s["is_user_new"]) && ($s["is_user_new"] = (strpos ($_SERVER["REQUEST_URI"], "/wp-admin/user-new.php") !== false) ? true : false)))
111
  {
112
+ if ($original === "Hi,\n\nYou have been invited to join '%s' at\n%s as a %s.\nPlease click the following link to confirm the invite:\n%s\n" && !empty ($_REQUEST["role"]) && preg_match ("/^(subscriber|s2member_level[0-9]+)$/", $_REQUEST["role"]))
113
  {
114
+ $translated = apply_filters ("ws_plugin__s2member_translation_mangler", _x ("You have been invited to join `%1\$s` at\n%2\$s as a Member.\nPlease click the following link to confirm the invite:\n%4\$s\n", "s2member-front", "s2member"), get_defined_vars ());
115
  }
116
  }
117
  /**/
118
  else if ((isset ($s["is_wp_activate"]) && $s["is_wp_activate"]) || (!isset ($s["is_wp_activate"]) && ($s["is_wp_activate"] = (strpos ($_SERVER["REQUEST_URI"], "/wp-activate.php") !== false) ? true : false)))
119
  {
120
+ if ($original === 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>')
121
  {
122
+ $translated = apply_filters ("ws_plugin__s2member_translation_mangler", _x ('Your account is now active. <a href="%1$s">Visit site</a> or <a href="%2$s">Log in</a>.', "s2member-front", "s2member"), get_defined_vars ());
123
  }
124
  }
125
  /**/
126
  else if ((isset ($s["is_wp_signup"]) && $s["is_wp_signup"]) || (!isset ($s["is_wp_signup"]) && ($s["is_wp_signup"] = (strpos ($_SERVER["REQUEST_URI"], "/wp-signup.php") !== false) ? true : false)))
127
  {
128
+ if ($original === "If you&#8217;re not going to use a great site domain, leave it for a new user. Now have at it!")
129
  {
130
  $translated = apply_filters ("ws_plugin__s2member_translation_mangler", "", get_defined_vars ());
131
  }
132
+ else if ($original === "Welcome back, %s. By filling out the form below, you can <strong>add another site to your account</strong>. There is no limit to the number of sites you can have, so create to your heart&#8217;s content, but write responsibly!")
133
  {
134
+ if (is_user_logged_in () && !(is_main_site () && current_user_can ("create_users")) && !is_super_admin () && is_object ($user = wp_get_current_user ()) && $user->ID && is_object ($user = new WP_User ($user->ID, $current_site->blog_id)) && $user->ID)
135
  {
136
+ $mms_options = c_ws_plugin__s2member_utilities::mms_options ();
137
+ $blogs_allowed = (int)@$mms_options["mms_registration_blogs_level" . c_ws_plugin__s2member_user_access::user_access_level ($user)];
138
  $user_blogs = (is_array ($blogs = get_blogs_of_user ($user->ID))) ? count ($blogs) - 1 : 0;
139
  /**/
140
  $user_blogs = ($user_blogs >= 0) ? $user_blogs : 0; /* NOT less than zero. */
141
  $blogs_allowed = ($blogs_allowed >= 0) ? $blogs_allowed : 0;
142
  /**/
143
+ $translated = apply_filters ("ws_plugin__s2member_translation_mangler", _x ('By filling out the form below, you can <strong>add a site to your account</strong>.', "s2member-front", "s2member") . (($blogs_allowed > 1) ? '<br />' . sprintf (_nx ('You may create up to <strong>%s</strong> site.', 'You may create up to <strong>%s</strong> sites.', $blogs_allowed, "s2member-front", "s2member"), $blogs_allowed) : ''), get_defined_vars ());
144
  }
145
  }
146
  }
includes/classes/user-new-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_user_new_in"))
21
  {
@@ -43,7 +43,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
43
  {
44
  global $pagenow; /* The current admin page file name. */
45
  /**/
46
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
47
  do_action ("_ws_plugin__s2member_before_admin_user_new_fields", get_defined_vars ());
48
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
49
  /**/
@@ -57,13 +57,13 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
57
  /**/
58
  $unfs .= '<table class="form-table">' . "\n";
59
  /**/
60
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
61
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before", get_defined_vars ());
62
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
63
  /**/
64
  if (is_multisite ()) /* Multisite Networking is currently lacking these fields; we pop them in. */
65
  {
66
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
67
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_first_name", get_defined_vars ());
68
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
69
  /**/
@@ -72,11 +72,11 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
72
  $unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_first_name" id="ws-plugin--s2member-user-new-first-name" value="' . esc_attr ($_p["ws_plugin__s2member_user_new_first_name"]) . '" class="regular-text" /></td>' . "\n";
73
  $unfs .= '</tr>' . "\n";
74
  /**/
75
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
76
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_first_name", get_defined_vars ());
77
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
78
  /**/
79
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
80
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_last_name", get_defined_vars ());
81
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
82
  /**/
@@ -85,12 +85,12 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
85
  $unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_last_name" id="ws-plugin--s2member-user-new-last-name" value="' . esc_attr ($_p["ws_plugin__s2member_user_new_last_name"]) . '" class="regular-text" /></td>' . "\n";
86
  $unfs .= '</tr>' . "\n";
87
  /**/
88
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
89
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_last_name", get_defined_vars ());
90
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
91
  }
92
  /**/
93
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
94
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_subscr_gateway", get_defined_vars ());
95
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
96
  /**/
@@ -103,11 +103,11 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
103
  $unfs .= '</td>' . "\n";
104
  $unfs .= '</tr>' . "\n";
105
  /**/
106
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
107
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_subscr_gateway", get_defined_vars ());
108
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
109
  /**/
110
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
111
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_subscr_id", get_defined_vars ());
112
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
113
  /**/
@@ -116,24 +116,24 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
116
  $unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_s2member_subscr_id" id="ws-plugin--s2member-user-new-s2member-subscr-id" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_subscr_id"]) . '" class="regular-text" /></td>' . "\n";
117
  $unfs .= '</tr>' . "\n";
118
  /**/
119
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
120
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_subscr_id", get_defined_vars ());
121
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
122
  /**/
123
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
124
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_custom", get_defined_vars ());
125
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
126
  /**/
127
  $unfs .= '<tr>' . "\n";
128
- $unfs .= '<th><label for="ws-plugin--s2member-user-new-s2member-custom">Custom Value:</label> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_sq (esc_attr ($_SERVER["HTTP_HOST"])) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\n' . c_ws_plugin__s2member_utils_strings::esc_sq (esc_attr ($_SERVER["HTTP_HOST"])) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
129
  $unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_s2member_custom" id="ws-plugin--s2member-user-new-s2member-custom" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_custom"]) . '" class="regular-text" /></td>' . "\n";
130
  $unfs .= '</tr>' . "\n";
131
  /**/
132
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
133
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_custom", get_defined_vars ());
134
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
135
  /**/
136
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
137
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_registration_ip", get_defined_vars ());
138
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
139
  /**/
@@ -142,14 +142,14 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
142
  $unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_s2member_registration_ip" id="ws-plugin--s2member-user-new-s2member-registration-ip" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_registration_ip"]) . '" class="regular-text" /></td>' . "\n";
143
  $unfs .= '</tr>' . "\n";
144
  /**/
145
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
146
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_registration_ip", get_defined_vars ());
147
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
148
  /**/
149
  if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ())
150
  /* ^ Will change once Custom Capabilities are compatible with a Blog Farm. */
151
  {
152
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
153
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_ccaps", get_defined_vars ());
154
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
155
  /**/
@@ -158,12 +158,12 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
158
  $unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_s2member_ccaps" id="ws-plugin--s2member-user-new-s2member-ccaps" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_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";
159
  $unfs .= '</tr>' . "\n";
160
  /**/
161
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
162
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_ccaps", get_defined_vars ());
163
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
164
  }
165
  /**/
166
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
167
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_auto_eot_time", get_defined_vars ());
168
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
169
  /**/
@@ -172,13 +172,13 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
172
  $unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_s2member_auto_eot_time" id="ws-plugin--s2member-user-new-auto-eot-time" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_auto_eot_time"]) . '" class="regular-text" /></td>' . "\n";
173
  $unfs .= '</tr>' . "\n";
174
  /**/
175
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
176
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_auto_eot_time", get_defined_vars ());
177
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
178
  /**/
179
  if (c_ws_plugin__s2member_list_servers::list_servers_integrated ()) /* Only if integrated with s2Member. */
180
  {
181
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
182
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_opt_in", get_defined_vars ());
183
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
184
  /**/
@@ -187,7 +187,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
187
  $unfs .= '<td><label><input type="checkbox" name="ws_plugin__s2member_user_new_opt_in" id="ws-plugin--s2member-user-new-opt-in" value="1"' . (($_p["ws_plugin__s2member_user_new_opt_in"]) ? ' checked="checked"' : '') . ' /> Yes, send a mailing list confirmation email to this new User.</label></td>' . "\n";
188
  $unfs .= '</tr>' . "\n";
189
  /**/
190
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
191
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_opt_in", get_defined_vars ());
192
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
193
  }
@@ -201,13 +201,13 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
201
  $unfs .= '</td>' . "\n";
202
  $unfs .= '</tr>' . "\n";
203
  /**/
204
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
205
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_custom_fields", get_defined_vars ());
206
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
207
  /**/
208
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
209
  {
210
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
211
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_during_custom_fields_before", get_defined_vars ());
212
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
213
  /**/
@@ -216,7 +216,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
216
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
217
  $field_id_class = preg_replace ("/_/", "-", $field_var);
218
  /**/
219
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
220
  if (apply_filters ("_ws_plugin__s2member_during_admin_user_new_fields_during_custom_fields_display", true, get_defined_vars ()))
221
  {
222
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
@@ -230,12 +230,12 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
230
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
231
  }
232
  /**/
233
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
234
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_during_custom_fields_after", get_defined_vars ());
235
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
236
  }
237
  /**/
238
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
239
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_custom_fields", get_defined_vars ());
240
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
241
  /**/
@@ -246,7 +246,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
246
  $unfs .= '</tr>' . "\n";
247
  }
248
  /**/
249
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
250
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_notes", get_defined_vars ());
251
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
252
  /**/
@@ -255,11 +255,11 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
255
  $unfs .= '<td><textarea name="ws_plugin__s2member_user_new_s2member_notes" id="ws-plugin--s2member-user-new-s2member-notes" rows="5" wrap="off" spellcheck="false" style="width:99%;">' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_notes"]) . '</textarea></td>' . "\n";
256
  $unfs .= '</tr>' . "\n";
257
  /**/
258
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
259
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_notes", get_defined_vars ());
260
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
261
  /**/
262
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
263
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after", get_defined_vars ());
264
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
265
  /**/
@@ -270,7 +270,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
270
  $buffer = preg_replace ("/(\<\/table\>)(\s*)(\<p\s+class\s*\=\s*['\"]submit['\"]\s*\>)(\s*)(\<input\s+type\s*\=\s*['\"]submit['\"]\s+name\s*\=\s*['\"]createuser['\"])/", "$1$2\n" . $unfs . "$3$4$5", $buffer);
271
  }
272
  /**/
273
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
274
  do_action ("_ws_plugin__s2member_after_admin_user_new_fields", get_defined_vars ());
275
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
276
  /**/
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_new_in"))
21
  {
43
  {
44
  global $pagenow; /* The current admin page file name. */
45
  /**/
46
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
47
  do_action ("_ws_plugin__s2member_before_admin_user_new_fields", get_defined_vars ());
48
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
49
  /**/
57
  /**/
58
  $unfs .= '<table class="form-table">' . "\n";
59
  /**/
60
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
61
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before", get_defined_vars ());
62
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
63
  /**/
64
  if (is_multisite ()) /* Multisite Networking is currently lacking these fields; we pop them in. */
65
  {
66
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
67
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_first_name", get_defined_vars ());
68
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
69
  /**/
72
  $unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_first_name" id="ws-plugin--s2member-user-new-first-name" value="' . esc_attr ($_p["ws_plugin__s2member_user_new_first_name"]) . '" class="regular-text" /></td>' . "\n";
73
  $unfs .= '</tr>' . "\n";
74
  /**/
75
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
76
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_first_name", get_defined_vars ());
77
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
78
  /**/
79
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
80
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_last_name", get_defined_vars ());
81
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
82
  /**/
85
  $unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_last_name" id="ws-plugin--s2member-user-new-last-name" value="' . esc_attr ($_p["ws_plugin__s2member_user_new_last_name"]) . '" class="regular-text" /></td>' . "\n";
86
  $unfs .= '</tr>' . "\n";
87
  /**/
88
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
89
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_last_name", get_defined_vars ());
90
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
91
  }
92
  /**/
93
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
94
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_subscr_gateway", get_defined_vars ());
95
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
96
  /**/
103
  $unfs .= '</td>' . "\n";
104
  $unfs .= '</tr>' . "\n";
105
  /**/
106
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
107
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_subscr_gateway", get_defined_vars ());
108
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
109
  /**/
110
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
111
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_subscr_id", get_defined_vars ());
112
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
113
  /**/
116
  $unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_s2member_subscr_id" id="ws-plugin--s2member-user-new-s2member-subscr-id" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_subscr_id"]) . '" class="regular-text" /></td>' . "\n";
117
  $unfs .= '</tr>' . "\n";
118
  /**/
119
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
120
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_subscr_id", get_defined_vars ());
121
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
122
  /**/
123
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
124
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_custom", get_defined_vars ());
125
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
126
  /**/
127
  $unfs .= '<tr>' . "\n";
128
+ $unfs .= '<th><label for="ws-plugin--s2member-user-new-s2member-custom">Custom Value:</label> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\n' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
129
  $unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_s2member_custom" id="ws-plugin--s2member-user-new-s2member-custom" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_custom"]) . '" class="regular-text" /></td>' . "\n";
130
  $unfs .= '</tr>' . "\n";
131
  /**/
132
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
133
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_custom", get_defined_vars ());
134
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
135
  /**/
136
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
137
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_registration_ip", get_defined_vars ());
138
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
139
  /**/
142
  $unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_s2member_registration_ip" id="ws-plugin--s2member-user-new-s2member-registration-ip" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_registration_ip"]) . '" class="regular-text" /></td>' . "\n";
143
  $unfs .= '</tr>' . "\n";
144
  /**/
145
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
146
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_registration_ip", get_defined_vars ());
147
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
148
  /**/
149
  if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ())
150
  /* ^ Will change once Custom Capabilities are compatible with a Blog Farm. */
151
  {
152
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
153
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_ccaps", get_defined_vars ());
154
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
155
  /**/
158
  $unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_s2member_ccaps" id="ws-plugin--s2member-user-new-s2member-ccaps" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_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";
159
  $unfs .= '</tr>' . "\n";
160
  /**/
161
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
162
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_ccaps", get_defined_vars ());
163
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
164
  }
165
  /**/
166
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
167
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_auto_eot_time", get_defined_vars ());
168
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
169
  /**/
172
  $unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_s2member_auto_eot_time" id="ws-plugin--s2member-user-new-auto-eot-time" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_auto_eot_time"]) . '" class="regular-text" /></td>' . "\n";
173
  $unfs .= '</tr>' . "\n";
174
  /**/
175
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
176
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_auto_eot_time", get_defined_vars ());
177
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
178
  /**/
179
  if (c_ws_plugin__s2member_list_servers::list_servers_integrated ()) /* Only if integrated with s2Member. */
180
  {
181
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
182
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_opt_in", get_defined_vars ());
183
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
184
  /**/
187
  $unfs .= '<td><label><input type="checkbox" name="ws_plugin__s2member_user_new_opt_in" id="ws-plugin--s2member-user-new-opt-in" value="1"' . (($_p["ws_plugin__s2member_user_new_opt_in"]) ? ' checked="checked"' : '') . ' /> Yes, send a mailing list confirmation email to this new User.</label></td>' . "\n";
188
  $unfs .= '</tr>' . "\n";
189
  /**/
190
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
191
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_opt_in", get_defined_vars ());
192
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
193
  }
201
  $unfs .= '</td>' . "\n";
202
  $unfs .= '</tr>' . "\n";
203
  /**/
204
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
205
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_custom_fields", get_defined_vars ());
206
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
207
  /**/
208
  foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
209
  {
210
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
211
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_during_custom_fields_before", get_defined_vars ());
212
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
213
  /**/
216
  $field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
217
  $field_id_class = preg_replace ("/_/", "-", $field_var);
218
  /**/
219
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
220
  if (apply_filters ("_ws_plugin__s2member_during_admin_user_new_fields_during_custom_fields_display", true, get_defined_vars ()))
221
  {
222
  if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
230
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
231
  }
232
  /**/
233
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
234
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_during_custom_fields_after", get_defined_vars ());
235
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
236
  }
237
  /**/
238
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
239
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_custom_fields", get_defined_vars ());
240
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
241
  /**/
246
  $unfs .= '</tr>' . "\n";
247
  }
248
  /**/
249
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
250
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_notes", get_defined_vars ());
251
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
252
  /**/
255
  $unfs .= '<td><textarea name="ws_plugin__s2member_user_new_s2member_notes" id="ws-plugin--s2member-user-new-s2member-notes" rows="5" wrap="off" spellcheck="false" style="width:99%;">' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_notes"]) . '</textarea></td>' . "\n";
256
  $unfs .= '</tr>' . "\n";
257
  /**/
258
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
259
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_notes", get_defined_vars ());
260
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
261
  /**/
262
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
263
  do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after", get_defined_vars ());
264
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
265
  /**/
270
  $buffer = preg_replace ("/(\<\/table\>)(\s*)(\<p\s+class\s*\=\s*['\"]submit['\"]\s*\>)(\s*)(\<input\s+type\s*\=\s*['\"]submit['\"]\s+name\s*\=\s*['\"]createuser['\"])/", "$1$2\n" . $unfs . "$3$4$5", $buffer);
271
  }
272
  /**/
273
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
274
  do_action ("_ws_plugin__s2member_after_admin_user_new_fields", get_defined_vars ());
275
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
276
  /**/
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,7 +43,7 @@ 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
  /**/
@@ -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,24 +109,24 @@ 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
  /**/
120
  echo '<tr>' . "\n";
121
- echo '<th><label for="ws-plugin--s2member-profile-s2member-custom">Custom Value:</label> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_sq (esc_attr ($_SERVER["HTTP_HOST"])) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\n' . c_ws_plugin__s2member_utils_strings::esc_sq (esc_attr ($_SERVER["HTTP_HOST"])) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
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,7 +189,7 @@ 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
  /**/
@@ -197,7 +197,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
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
  /**/
@@ -310,23 +310,23 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
310
  {
311
  echo '<div style="margin:25px 0 25px 0; height:1px; line-height:1px; background:#CCCCCC;"></div>' . "\n";
312
  /**/
313
- echo '<h3>Additional Profile Fields' . ((is_multisite ()) ? ' ( for this Blog )' : '') . '</h3>' . "\n";
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,7 +391,7 @@ 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
  /**/
@@ -462,10 +462,10 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
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
  /**/
@@ -488,7 +488,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
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
  }
@@ -516,24 +516,24 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
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 +542,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
  /**/
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
  /**/
120
  echo '<tr>' . "\n";
121
+ echo '<th><label for="ws-plugin--s2member-profile-s2member-custom">Custom Value:</label> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\n' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
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
  /**/
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
  /**/
310
  {
311
  echo '<div style="margin:25px 0 25px 0; height:1px; line-height:1px; background:#CCCCCC;"></div>' . "\n";
312
  /**/
313
+ echo '<h3>' . _x ("Additional Profile Fields", "s2member-front", "s2member") . ((is_multisite ()) ? ' ' . _x ("( for this site )", "s2member-front", "s2member") : "") . '</h3>' . "\n";
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
  /**/
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
  /**/
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
  }
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
  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
  /**/
includes/classes/utilities.inc.php CHANGED
@@ -126,9 +126,10 @@ if (!class_exists ("c_ws_plugin__s2member_utilities"))
126
  */
127
  public static function s_badge_gen ($v = "1", $no_cache = FALSE, $display_on_failure = FALSE)
128
  {
129
- if ($v && file_exists (($template = dirname (dirname (__FILE__)) . "/templates/badges/s-badge.html")))
130
  {
131
- $badge = preg_replace ("/%%site_url%%/i", urlencode (site_url ()), preg_replace ("/%%v%%/i", (string)$v, file_get_contents ($template)));
 
132
  $badge = preg_replace ("/%%no_cache%%/i", (($no_cache) ? "&amp;no_cache=" . urlencode (mt_rand (0, PHP_INT_MAX)) : ""), $badge);
133
  $badge = preg_replace ("/%%display_on_failure%%/i", (($display_on_failure) ? "&amp;display_on_failure=1" : ""), $badge);
134
  }
@@ -154,6 +155,36 @@ if (!class_exists ("c_ws_plugin__s2member_utilities"))
154
  /**/
155
  return $details; /* Return all details. */
156
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  }
158
  }
159
  ?>
126
  */
127
  public static function s_badge_gen ($v = "1", $no_cache = FALSE, $display_on_failure = FALSE)
128
  {
129
+ if ($v && file_exists (($template = dirname (dirname (__FILE__)) . "/templates/badges/s-badge.php")))
130
  {
131
+ $badge = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents ($template)));
132
+ $badge = preg_replace ("/%%site_url%%/i", urlencode (site_url ()), preg_replace ("/%%v%%/i", (string)$v, $badge));
133
  $badge = preg_replace ("/%%no_cache%%/i", (($no_cache) ? "&amp;no_cache=" . urlencode (mt_rand (0, PHP_INT_MAX)) : ""), $badge);
134
  $badge = preg_replace ("/%%display_on_failure%%/i", (($display_on_failure) ? "&amp;display_on_failure=1" : ""), $badge);
135
  }
155
  /**/
156
  return $details; /* Return all details. */
157
  }
158
+ /**
159
+ * Acquires s2Member options for the Main Site of a Multisite Network.
160
+ *
161
+ * @package s2Member\Utilities
162
+ * @since 110912
163
+ *
164
+ * @return array Array of s2Member options for the Main Site.
165
+ */
166
+ public static function mms_options ()
167
+ {
168
+ return (is_multisite ()) ? (array)get_site_option ("ws_plugin__s2member_options") : array ();
169
+ }
170
+ /**
171
+ * Builds an array of backtrace callers.
172
+ *
173
+ * @package s2Member\Utilities
174
+ * @since 110912
175
+ *
176
+ * @param array $debug_backtrace Optional. Defaults to ``debug_backtrace()``.
177
+ * @return array Array of backtrace callers (lowercase).
178
+ */
179
+ public static function callers ($debug_backtrace = FALSE)
180
+ {
181
+ $callers = array (); /* Initialize array. */
182
+ foreach (($debug_backtrace = (is_array ($debug_backtrace)) ? $debug_backtrace : debug_backtrace ()) as $caller)
183
+ if (isset ($caller["class"], $caller["function"]) || (!isset ($caller["class"]) && isset ($caller["function"])))
184
+ $callers[] = (isset ($caller["class"])) ? $caller["class"] . "::" . $caller["function"] : $caller["function"];
185
+ /**/
186
+ return array_map ("strtolower", array_unique ($callers));
187
+ }
188
  }
189
  }
190
  ?>
includes/classes/utils-captchas.inc.php CHANGED
@@ -59,8 +59,9 @@ if (!class_exists ("c_ws_plugin__s2member_utils_captchas"))
59
  $theme = ($theme) ? $theme : "clean"; /* Defaults to the `clean` theme style. */
60
  $tabindex = (strlen ($tabindex)) ? (int)$tabindex : -1; /* -1 default. */
61
  /**/
62
- $options = '<script type="text/javascript">' . "if(typeof RecaptchaOptions !== 'object'){ var RecaptchaOptions = {theme: '" . c_ws_plugin__s2member_utils_strings::esc_sq ($theme) . "', lang: '" . c_ws_plugin__s2member_utils_strings::esc_sq ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["recaptcha"]["lang"]) . "', tabindex: " . $tabindex . " }; }" . '</script>' . "\n";
63
- $adjustments = '<script type="text/javascript">' . "if(typeof jQuery === 'function'){ jQuery('td a[id^=\"recaptcha\"]').removeAttr('tabindex'); }" . '</script>';
 
64
  /**/
65
  return $options . '<script type="text/javascript" src="' . esc_attr ('https://www.google.com/recaptcha/api/challenge?k=' . urlencode ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["recaptcha"]["public_key"])) . '' . (($error) ? '&amp;error=' . urlencode ($error) : '') . '"></script>' . $adjustments;
66
  }
59
  $theme = ($theme) ? $theme : "clean"; /* Defaults to the `clean` theme style. */
60
  $tabindex = (strlen ($tabindex)) ? (int)$tabindex : -1; /* -1 default. */
61
  /**/
62
+ $options = '<script type="text/javascript">' . "if(typeof RecaptchaOptions !== 'object'){ var RecaptchaOptions = {theme: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq ($theme) . "', lang: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["recaptcha"]["lang"]) . "', tabindex: " . $tabindex . " }; }" . '</script>' . "\n";
63
+ $no_tabindex_icons = '<script type="text/javascript">' . "if(typeof jQuery === 'function'){ jQuery('td a[id^=\"recaptcha\"]').removeAttr('tabindex'); }" . '</script>';
64
+ $adjustments = (!apply_filters ("c_ws_plugin__s2member_utils_tabindex_recaptcha_icons", false, get_defined_vars ())) ? $no_tabindex_icons : "";
65
  /**/
66
  return $options . '<script type="text/javascript" src="' . esc_attr ('https://www.google.com/recaptcha/api/challenge?k=' . urlencode ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["recaptcha"]["public_key"])) . '' . (($error) ? '&amp;error=' . urlencode ($error) : '') . '"></script>' . $adjustments;
67
  }
includes/classes/utils-dirs.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_dirs"))
21
  {
@@ -33,12 +33,12 @@ if (!class_exists ("c_ws_plugin__s2member_utils_dirs"))
33
  * This takes Windows® `\app_data\` sub-folders into consideration.
34
  *
35
  * @package s2Member\Utilities
36
- * @since 3.5
37
  *
38
  * @param str $dir_path Directory path.
39
  * @return str Basename directory path; including a possible `\app_data\` directory.
40
  */
41
- public static function basename_dirs ($dir_path = FALSE)
42
  {
43
  $dir_path = rtrim ($dir_path, DIRECTORY_SEPARATOR . "/");
44
  /**/
@@ -61,6 +61,58 @@ if (!class_exists ("c_ws_plugin__s2member_utils_dirs"))
61
  /**/
62
  return preg_replace ("/(" . preg_quote (DIRECTORY_SEPARATOR, "/") . "|\/)app_data$/i", "", $dir_path, 1);
63
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  }
65
  }
66
  ?>
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_dirs"))
21
  {
33
  * This takes Windows® `\app_data\` sub-folders into consideration.
34
  *
35
  * @package s2Member\Utilities
36
+ * @since 110815
37
  *
38
  * @param str $dir_path Directory path.
39
  * @return str Basename directory path; including a possible `\app_data\` directory.
40
  */
41
+ public static function basename_dir_app_data ($dir_path = FALSE)
42
  {
43
  $dir_path = rtrim ($dir_path, DIRECTORY_SEPARATOR . "/");
44
  /**/
61
  /**/
62
  return preg_replace ("/(" . preg_quote (DIRECTORY_SEPARATOR, "/") . "|\/)app_data$/i", "", $dir_path, 1);
63
  }
64
+ /**
65
+ * Finds the relative path, from one location to another.
66
+ *
67
+ * @package s2Member\Utilities
68
+ * @since 110815
69
+ *
70
+ * @param str $from The directory to calculate a relative path from.
71
+ * @param str $to The directory or file to build a relative path to.
72
+ * @return str String with the relative path to ``$to``.
73
+ */
74
+ public static function rel_path ($from = FALSE, $to = FALSE)
75
+ {
76
+ if (!($rel_path = array ()) && is_string ($from) && strlen ($from) && is_string ($to) && strlen ($to))
77
+ {
78
+ $to = str_replace (DIRECTORY_SEPARATOR, "/", $to);
79
+ $to = (strpos (basename ($to), ".") === false) ? rtrim ($to, "/") . "/" : $to;
80
+ $to = $rel_path = preg_split ("/\//", $to);
81
+ /**/
82
+ $from = str_replace (DIRECTORY_SEPARATOR, "/", $from);
83
+ $from = (strpos (basename ($from), ".") !== false) ? dirname ($from) : $from;
84
+ $from = preg_split ("/\//", rtrim ($from, "/") . "/");
85
+ /**/
86
+ foreach ($from as $depth => $dir) /* Each ``$from`` directory. */
87
+ {
88
+ if (isset ($to[$depth]) && $dir === $to[$depth])
89
+ array_shift($rel_path);
90
+ /**/
91
+ else if (($remaining = count ($from) - $depth) > 1)
92
+ {
93
+ $rel_path = array_pad ($rel_path, ((count ($rel_path) + $remaining - 1) * -1), "..");
94
+ break; /* Stop now, no need to go any further. */
95
+ }
96
+ else
97
+ $rel_path[0] = "./" . $rel_path[0];
98
+ }
99
+ }
100
+ /**/
101
+ return implode ("/", $rel_path);
102
+ }
103
+ /**
104
+ * Shortens to a path from document root.
105
+ *
106
+ * @package s2Member\Utilities
107
+ * @since 110815
108
+ *
109
+ * @param str $path Directory or file path.
110
+ * @return str Shorther path, from document root.
111
+ */
112
+ public static function doc_root_path ($path = FALSE)
113
+ {
114
+ return preg_replace ("/^" . preg_quote (rtrim ($_SERVER["DOCUMENT_ROOT"], DIRECTORY_SEPARATOR . "/"), "/") . "/", "", (string)$path);
115
+ }
116
  }
117
  }
118
  ?>
includes/classes/utils-gets.inc.php CHANGED
@@ -37,9 +37,9 @@ if (!class_exists ("c_ws_plugin__s2member_utils_gets"))
37
  */
38
  public static function get_all_category_ids ()
39
  {
40
- $ids = get_all_category_ids ();
41
  /**/
42
- return (array)$ids;
43
  }
44
  /**
45
  * Retrieves a list of all child Category IDs from the database.
@@ -56,7 +56,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_gets"))
56
  foreach ($categories as $child_category)
57
  $child_ids[] = $child_category->term_id;
58
  /**/
59
- return (array)$child_ids;
60
  }
61
  /**
62
  * Retrieves a list of all Tag IDs in the database.
@@ -71,9 +71,9 @@ if (!class_exists ("c_ws_plugin__s2member_utils_gets"))
71
  global $wpdb; /* Need global DB obj. */
72
  /**/
73
  foreach ((array)get_tags () as $tag)
74
- $ids[] = $tag->term_id;
75
  /**/
76
- return (array)$ids;
77
  }
78
  /**
79
  * Retrieves a list of all Post IDs in the database.
@@ -88,9 +88,9 @@ if (!class_exists ("c_ws_plugin__s2member_utils_gets"))
88
  {
89
  global $wpdb; /* Need global DB obj. */
90
  /**/
91
- $ids = $wpdb->get_col ("SELECT `ID` FROM `" . $wpdb->posts . "` WHERE `post_status` = 'publish' AND `post_type` NOT IN('page','attachment','revision')");
92
  /**/
93
- return (array)$ids;
94
  }
95
  /**
96
  * Retrieves a list of all Page IDs from the database.
@@ -104,9 +104,9 @@ if (!class_exists ("c_ws_plugin__s2member_utils_gets"))
104
  {
105
  global $wpdb; /* Need global DB obj. */
106
  /**/
107
- $ids = $wpdb->get_col ("SELECT `ID` FROM `" . $wpdb->posts . "` WHERE `post_status` = 'publish' AND `post_type` = 'page'");
108
  /**/
109
- return (array)$ids;
110
  }
111
  /**
112
  * Converts a comma-delimited list of: Tag slugs/names/ids - into all IDs.
@@ -122,28 +122,24 @@ if (!class_exists ("c_ws_plugin__s2member_utils_gets"))
122
  foreach (preg_split ("/[\r\n\t;,]+/", $tags) as $tag)
123
  {
124
  if (($tag = trim ($tag)) && is_numeric ($tag))
125
- {
126
- $ids[] = $tag;
127
- }
128
  else if ($tag && is_string ($tag))
129
  {
130
  if (is_object ($term = get_term_by ("name", $tag, "post_tag")))
131
- {
132
- $ids[] = $term->term_id;
133
- }
134
  else if (is_object ($term = get_term_by ("slug", $tag, "post_tag")))
135
- {
136
- $ids[] = $term->term_id;
137
- }
138
  }
139
  }
140
  /**/
141
- return (array)$ids;
142
  }
143
  /**
144
  * Retrieves a list of singular IDs from the database.
145
  *
146
- * Only returns Posts that require Custom Capabilities;
147
  * and ONLY those which are NOT satisfied by ``$user``.
148
  *
149
  * @package s2Member\Utilities
@@ -160,27 +156,28 @@ if (!class_exists ("c_ws_plugin__s2member_utils_gets"))
160
  {
161
  foreach ($results as $result) /* Now we need to check Custom Capabilities against $user. */
162
  {
163
- if (!is_object ($user) || !$user->ID) /* No ``$user``? / not logged-in?. */
164
- $ids[] = $result->post_id; /* There's no way to satisfy anything here. */
165
  /**/
166
  else if (is_array ($ccaps = @unserialize ($result->meta_value)))
167
  /**/
168
- foreach ($ccaps as $ccap) /* Test all Custom Capability requirements. */
 
169
  if (strlen ($ccap)) /* Quick (empty) check here. */
170
  if (!$user->has_cap ("access_s2member_ccap_" . $ccap))
171
  {
172
- $ids[] = $result->post_id;
173
  break;
174
  }
175
  }
176
  }
177
  /**/
178
- return (array)$ids;
179
  }
180
  /**
181
  * Retrieves a list of singular IDs from the database.
182
  *
183
- * Only returns Posts that require Specific Post/Page Access;
184
  * and ONLY those which are NOT satisfied by the current Visitor.
185
  *
186
  * @package s2Member\Utilities
@@ -194,14 +191,33 @@ if (!class_exists ("c_ws_plugin__s2member_utils_gets"))
194
  /**/
195
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["specific_ids"] && is_array ($sps = preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["specific_ids"])))
196
  {
197
- foreach ($sps as $sp) /* Now we need to check access against the current Visitor. */
198
- {
199
- if ($sp && !c_ws_plugin__s2member_sp_access::sp_access ($sp, "read-only"))
200
- $ids[] = $sp;
201
- }
202
  }
203
  /**/
204
- return (array)$ids;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  }
206
  }
207
  }
37
  */
38
  public static function get_all_category_ids ()
39
  {
40
+ $category_ids = get_all_category_ids ();
41
  /**/
42
+ return (array)$category_ids;
43
  }
44
  /**
45
  * Retrieves a list of all child Category IDs from the database.
56
  foreach ($categories as $child_category)
57
  $child_ids[] = $child_category->term_id;
58
  /**/
59
+ return (isset ($child_ids)) ? (array)$child_ids : array ();
60
  }
61
  /**
62
  * Retrieves a list of all Tag IDs in the database.
71
  global $wpdb; /* Need global DB obj. */
72
  /**/
73
  foreach ((array)get_tags () as $tag)
74
+ $tag_ids[] = $tag->term_id;
75
  /**/
76
+ return (isset ($tag_ids)) ? (array)$tag_ids : array ();
77
  }
78
  /**
79
  * Retrieves a list of all Post IDs in the database.
88
  {
89
  global $wpdb; /* Need global DB obj. */
90
  /**/
91
+ $post_ids = $wpdb->get_col ("SELECT `ID` FROM `" . $wpdb->posts . "` WHERE `post_status` = 'publish' AND `post_type` NOT IN('page','attachment','revision')");
92
  /**/
93
+ return (array)$post_ids;
94
  }
95
  /**
96
  * Retrieves a list of all Page IDs from the database.
104
  {
105
  global $wpdb; /* Need global DB obj. */
106
  /**/
107
+ $page_ids = $wpdb->get_col ("SELECT `ID` FROM `" . $wpdb->posts . "` WHERE `post_status` = 'publish' AND `post_type` = 'page'");
108
  /**/
109
+ return (array)$page_ids;
110
  }
111
  /**
112
  * Converts a comma-delimited list of: Tag slugs/names/ids - into all IDs.
122
  foreach (preg_split ("/[\r\n\t;,]+/", $tags) as $tag)
123
  {
124
  if (($tag = trim ($tag)) && is_numeric ($tag))
125
+ $tag_ids[] = $tag;
126
+ /**/
 
127
  else if ($tag && is_string ($tag))
128
  {
129
  if (is_object ($term = get_term_by ("name", $tag, "post_tag")))
130
+ $tag_ids[] = $term->term_id;
131
+ /**/
 
132
  else if (is_object ($term = get_term_by ("slug", $tag, "post_tag")))
133
+ $tag_ids[] = $term->term_id;
 
 
134
  }
135
  }
136
  /**/
137
+ return (isset ($tag_ids)) ? (array)$tag_ids : array ();
138
  }
139
  /**
140
  * Retrieves a list of singular IDs from the database.
141
  *
142
+ * Only returns singular IDs that require Custom Capabilities;
143
  * and ONLY those which are NOT satisfied by ``$user``.
144
  *
145
  * @package s2Member\Utilities
156
  {
157
  foreach ($results as $result) /* Now we need to check Custom Capabilities against $user. */
158
  {
159
+ if (!is_object ($user) || !$user->ID) /* No ``$user``, not logged-in?. */
160
+ $singular_ids[] = $result->post_id; /* No way to satisfy. */
161
  /**/
162
  else if (is_array ($ccaps = @unserialize ($result->meta_value)))
163
  /**/
164
+ foreach ($ccaps as $ccap) /* Test Capability requirements. */
165
+ /**/
166
  if (strlen ($ccap)) /* Quick (empty) check here. */
167
  if (!$user->has_cap ("access_s2member_ccap_" . $ccap))
168
  {
169
+ $singular_ids[] = $result->post_id;
170
  break;
171
  }
172
  }
173
  }
174
  /**/
175
+ return (isset ($singular_ids)) ? (array)$singular_ids : array ();
176
  }
177
  /**
178
  * Retrieves a list of singular IDs from the database.
179
  *
180
+ * Only returns singular IDs that require Specific Post/Page Access;
181
  * and ONLY those which are NOT satisfied by the current Visitor.
182
  *
183
  * @package s2Member\Utilities
191
  /**/
192
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["specific_ids"] && is_array ($sps = preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["specific_ids"])))
193
  {
194
+ foreach ($sps as $sp) /* Now check access against the current Visitor. */
195
+ if ($sp && !c_ws_plugin__s2member_sp_access::sp_access ($sp, "read-only"))
196
+ $singular_ids[] = $sp;
 
 
197
  }
198
  /**/
199
+ return (isset ($singular_ids)) ? (array)$singular_ids : array ();
200
+ }
201
+ /**
202
+ * Retrieves a list of singular IDs from the database.
203
+ *
204
+ * Only returns singular IDs that are within the ``$terms``;
205
+ * passed through the argument to this function.
206
+ *
207
+ * @package s2Member\Utilities
208
+ * @since 110912
209
+ *
210
+ * @param array $terms Required. An array of term IDs.
211
+ * @return array Array of all singular IDs not available to ``$user`` because of Specific Post/Page restrictions.
212
+ */
213
+ public static function get_singular_ids_in_terms ($terms = FALSE)
214
+ {
215
+ global $wpdb; /* Need global DB obj. */
216
+ /**/
217
+ if (is_array ($terms) && !empty ($terms))
218
+ $singular_ids = $wpdb->get_col ("SELECT `object_id` FROM `" . $wpdb->term_relationships . "` WHERE `term_taxonomy_id` IN (SELECT `term_taxonomy_id` FROM `" . $wpdb->term_taxonomy . "` WHERE `term_id` IN('" . implode ("','", $terms) . "'))");
219
+ /**/
220
+ return (isset ($singular_ids)) ? (array)$singular_ids : array ();
221
  }
222
  }
223
  }
includes/classes/utils-html.inc.php CHANGED
@@ -43,6 +43,8 @@ if (!class_exists ("c_ws_plugin__s2member_utils_html"))
43
  */
44
  public static function doctype_html_head ($doctype_html_head_title = FALSE, $doctype_html_head_action = FALSE)
45
  {
 
 
46
  ob_start (); /* Start output buffering here so we can "return" the output from this utility. */
47
  /**/
48
  echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
@@ -54,10 +56,13 @@ if (!class_exists ("c_ws_plugin__s2member_utils_html"))
54
  /**/
55
  echo '<script type="text/javascript" src="' . esc_attr (site_url ("/wp-includes/js/jquery/jquery.js?ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ()))) . '"></script>' . "\n";
56
  echo '<script type="text/javascript" src="' . esc_attr (site_url ("/wp-includes/js/l10n.js?ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ()))) . '"></script>' . "\n";
57
- echo '<script type="text/javascript">var pwsL10n = {empty: "Strength indicator", short: "Very weak", bad: "Weak", good: "Medium", strong: "Strong", mismatch: "Mismatch"}; try{convertEntities(pwsL10n);}catch(e){};</script>' . "\n";
 
58
  echo '<script type="text/javascript" src="' . esc_attr (site_url ("/wp-admin/js/password-strength-meter.js?ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ()))) . '"></script>' . "\n";
59
- echo '<script type="text/javascript" src="' . esc_attr (site_url ("/?ws_plugin__s2member_js_w_globals=" . urlencode (WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5) . "&amp;qcABC=1&amp;ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ()))) . '"></script>' . "\n";
60
- echo '<link href="' . esc_attr (site_url ("/?ws_plugin__s2member_css=1&amp;qcABC=1&amp;ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ()))) . '" type="text/css" rel="stylesheet" media="all" />' . "\n";
 
 
61
  /**/
62
  if ($doctype_html_head_title) /* Add <title></title> tag? */
63
  echo '<title>' . $doctype_html_head_title . '</title>' . "\n";
43
  */
44
  public static function doctype_html_head ($doctype_html_head_title = FALSE, $doctype_html_head_action = FALSE)
45
  {
46
+ $s2o = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["s2o_url"]; /* Loads s2Member only. */
47
+ /**/
48
  ob_start (); /* Start output buffering here so we can "return" the output from this utility. */
49
  /**/
50
  echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\n";
56
  /**/
57
  echo '<script type="text/javascript" src="' . esc_attr (site_url ("/wp-includes/js/jquery/jquery.js?ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ()))) . '"></script>' . "\n";
58
  echo '<script type="text/javascript" src="' . esc_attr (site_url ("/wp-includes/js/l10n.js?ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ()))) . '"></script>' . "\n";
59
+ /**/
60
+ echo '<script type="text/javascript">' . "var pwsL10n = {empty: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Strength indicator", "s2member-front", "s2member")) . "', short: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Very weak", "s2member-front", "s2member")) . "', bad: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Weak", "s2member-front", "s2member")) . "', good: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Medium", "s2member-front", "s2member")) . "', strong: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Strong", "s2member-front", "s2member")) . "', mismatch: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Mismatch", "s2member-front", "s2member")) . "'}; try{convertEntities(pwsL10n);}catch(e){};</script>" . "\n";
61
  echo '<script type="text/javascript" src="' . esc_attr (site_url ("/wp-admin/js/password-strength-meter.js?ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ()))) . '"></script>' . "\n";
62
+ /**/
63
+ echo '<script type="text/javascript" src="' . esc_attr ($s2o . "/?ws_plugin__s2member_js_w_globals=" . urlencode (WS_PLUGIN__S2MEMBER_API_CONSTANTS_MD5) . "&amp;qcABC=1&amp;ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ())) . '"></script>' . "\n";
64
+ /**/
65
+ echo '<link href="' . esc_attr ($s2o . "/?ws_plugin__s2member_css=1&amp;qcABC=1&amp;ver=" . urlencode (c_ws_plugin__s2member_utilities::ver_checksum ())) . '" type="text/css" rel="stylesheet" media="all" />' . "\n";
66
  /**/
67
  if ($doctype_html_head_title) /* Add <title></title> tag? */
68
  echo '<title>' . $doctype_html_head_title . '</title>' . "\n";
includes/classes/utils-s2o.inc.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * s2Member-only utilities.
4
+ *
5
+ * Copyright: © 2009-2011
6
+ * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
+ * ( coded in the USA )
8
+ *
9
+ * Released under the terms of the GNU General Public License.
10
+ * You should have received a copy of the GNU General Public License,
11
+ * along with this software. In the main directory, see: /licensing/
12
+ * If not, see: {@link http://www.gnu.org/licenses/}.
13
+ *
14
+ * @package s2Member\Utilities
15
+ * @since 110912
16
+ */
17
+ if (!class_exists ("c_ws_plugin__s2member_utils_s2o"))
18
+ {
19
+ /**
20
+ * s2Member-only utilities.
21
+ *
22
+ * @package s2Member\Utilities
23
+ * @since 110912
24
+ */
25
+ class c_ws_plugin__s2member_utils_s2o
26
+ {
27
+ /*
28
+ * WordPress® directory.
29
+ *
30
+ * @package s2Member\Utilities
31
+ * @since 110912
32
+ *
33
+ * @param str $starting_dir A directory to start searching from.
34
+ * @param str $alt_starting_dir An alternate directory to search from.
35
+ * @return str|null WordPress® directory, else exits script execution on failure.
36
+ */
37
+ public static function wp_dir ($starting_dir = FALSE, $alt_starting_dir = FALSE)
38
+ {
39
+ if ($starting_dir && is_dir ($starting_dir))
40
+ for ($i = 0, $dir = $starting_dir; $i <= 20; $i++)
41
+ {
42
+ for ($one_dir_up = 0; $one_dir_up < $i; $one_dir_up++)
43
+ $dir = dirname ($dir);
44
+ /**/
45
+ if (file_exists ($dir . "/wp-settings.php"))
46
+ return ($wp_dir = $dir);
47
+ }
48
+ /**/
49
+ if ($alt_starting_dir && is_dir ($alt_starting_dir))
50
+ for ($i = 0, $dir = $alt_starting_dir; $i <= 20; $i++)
51
+ {
52
+ for ($one_dir_up = 0; $one_dir_up < $i; $one_dir_up++)
53
+ $dir = dirname ($dir);
54
+ /**/
55
+ if (file_exists ($dir . "/wp-settings.php"))
56
+ return ($wp_dir = $dir);
57
+ }
58
+ /**/
59
+ header("Content-Type: text/plain; charset=utf-8") . eval ('while (@ob_end_clean ());');
60
+ header("HTTP/1.0 500 Error") . exit ("ERROR: s2Member® unable to locate WordPress® directory.");
61
+ }
62
+ /*
63
+ * WordPress® settings, after ``SHORTINIT`` section.
64
+ *
65
+ * @package s2Member\Utilities
66
+ * @since 110912
67
+ *
68
+ * @param str $wp_dir WordPress® directory path.
69
+ * @param str $o_file Location of calling `*-o.php` file.
70
+ * @return str|bool WordPress® settings, else false on failure.
71
+ */
72
+ public static function wp_settings_as ($wp_dir = FALSE, $o_file = FALSE)
73
+ {
74
+ if ($wp_dir && is_dir ($wp_dir) && file_exists ($wp_dir . "/wp-settings.php") && $o_file && file_exists ($o_file))
75
+ if (($wp_settings = $_wp_settings = trim (file_get_contents ($wp_dir . "/wp-settings.php"))))
76
+ {
77
+ $wp_shortinit_section = "/if *\( *SHORTINIT *\)[\r\n\t\s ]*\{?[\r\n\t\s ]*return false;[\r\n\t\s ]*\}?[\r\n\t\s ]*/";
78
+ if (($_wp_settings_parts = preg_split ($wp_shortinit_section, $_wp_settings, 2)) && ($_wp_settings = trim ($_wp_settings_parts[1])) && ($_wp_settings = "<?php\n" . $_wp_settings))
79
+ {
80
+ if (($_wp_settings = str_replace ("__FILE__", "'" . str_replace ("'", "\'", $wp_dir) . "/wp-settings.php'", $_wp_settings))) /* Eval compatible. Hard-code `../wp-settings.php`. */
81
+ {
82
+ $mu_plugins_section = "/[\r\n\t\s ]+foreach *\( *wp_get_mu_plugins *\( *\) *as *\\\$mu_plugin *\)[\r\n\t\s ]*\{?[\r\n\t\s ]*include_once *\( *\\\$mu_plugin *\);[\r\n\t\s ]*\}?[\r\n\t\s ]*unset *\( *\\\$mu_plugin *\);/";
83
+ $mu_plugins_replace = "\nif (file_exists (WPMU_PLUGIN_DIR . \"/s2member-o.php\"))\n\tinclude_once WPMU_PLUGIN_DIR . \"/s2member-o.php\";"; /* Supports special file: `s2member-o.php`. */
84
+ if (($_wp_settings = preg_replace ($mu_plugins_section, $mu_plugins_replace, $_wp_settings, 1, $mu_plugins_replaced)) && $mu_plugins_replaced)
85
+ {
86
+ $nw_plugins_section = "/[\r\n\t\s ]+foreach *\( *wp_get_active_network_plugins *\( *\) *as *\\\$network_plugin *\)[\r\n\t\s ]*\{?[\r\n\t\s ]*include_once *\( *\\\$network_plugin *\);[\r\n\t\s ]*\}?[\r\n\t\s ]*unset *\( *\\\$network_plugin *\);/";
87
+ $nw_plugins_replace = /* Not even in the plugins directory? » */ "\n\$ws_plugin__s2member_temp_s = preg_replace (\"/-o.php\$/\", \".php\", __FILE__);\n\nif (!file_exists (WP_PLUGIN_DIR . \"/\" . plugin_basename (\$ws_plugin__s2member_temp_s)) && file_exists (\$ws_plugin__s2member_temp_s))\n\tinclude_once \$ws_plugin__s2member_temp_s;\n";
88
+ $nw_plugins_replace .= "\n\$ws_plugin__s2member_temp_s = plugin_basename (preg_replace (\"/-o.php\$/\", \".php\", __FILE__));\n\$ws_plugin__s2member_temp_a = is_multisite () ? wp_get_active_network_plugins () : array ();\n\nif (in_array (WP_PLUGIN_DIR . \"/\" . \$ws_plugin__s2member_temp_s, \$ws_plugin__s2member_temp_a))\n\tinclude_once WP_PLUGIN_DIR . \"/\" . \$ws_plugin__s2member_temp_s;\n\nunset (\$ws_plugin__s2member_temp_s, \$ws_plugin__s2member_temp_a);";
89
+ if (($_wp_settings = preg_replace ($nw_plugins_section, $nw_plugins_replace, $_wp_settings, 1, $nw_plugins_replaced)) && $nw_plugins_replaced)
90
+ {
91
+ $st_plugins_section = "/[\r\n\t\s ]+foreach *\( *wp_get_active_and_valid_plugins *\( *\) *as *\\\$plugin *\)[\r\n\t\s ]*\{?[\r\n\t\s ]*include_once *\( *\\\$plugin *\);[\r\n\t\s ]*\}?[\r\n\t\s ]*unset *\( *\\\$plugin *\);/";
92
+ $st_plugins_replace = /* Not even in the plugins directory? » */ "\n\$ws_plugin__s2member_temp_s = preg_replace (\"/-o.php\$/\", \".php\", __FILE__);\n\nif (!file_exists (WP_PLUGIN_DIR . \"/\" . plugin_basename (\$ws_plugin__s2member_temp_s)) && file_exists (\$ws_plugin__s2member_temp_s))\n\tinclude_once \$ws_plugin__s2member_temp_s;\n";
93
+ $st_plugins_replace .= "\n\$ws_plugin__s2member_temp_s = plugin_basename (preg_replace (\"/-o.php\$/\", \".php\", __FILE__));\n\$ws_plugin__s2member_temp_a = is_multisite () ? wp_get_active_and_valid_plugins () : array ();\n\nif (in_array (WP_PLUGIN_DIR . \"/\" . \$ws_plugin__s2member_temp_s, \$ws_plugin__s2member_temp_a))\n\tinclude_once WP_PLUGIN_DIR . \"/\" . \$ws_plugin__s2member_temp_s;\n\nunset (\$ws_plugin__s2member_temp_s, \$ws_plugin__s2member_temp_a);";
94
+ if (($_wp_settings = preg_replace ($st_plugins_section, $st_plugins_replace, $_wp_settings, 1, $st_plugins_replaced)) && $st_plugins_replaced)
95
+ {
96
+ $theme_funcs_section = "/(?:[\r\n\t\s ]+\/\/ Load the functions for the active theme, for both parent and child theme if applicable\.)?[\r\n\t\s ]+if *\( *\! *defined *\( *['\"]WP_INSTALLING['\"] *\) *\|\| *['\"]wp-activate.php['\"] *\=\=\= *\\\$pagenow *\)[\r\n\t\s ]*\{[\r\n\t\s ]*if *\( *TEMPLATEPATH *\!\=\= *STYLESHEETPATH *&& *file_exists *\( *STYLESHEETPATH *\. *['\"]\/functions\.php['\"] *\) *\)[\r\n\t\s ]*\{?[\r\n\t\s ]*include *\( *STYLESHEETPATH *\. *['\"]\/functions\.php['\"] *\);[\r\n\t\s ]*\}?[\r\n\t\s ]*if *\( *file_exists *\( *TEMPLATEPATH *\. *['\"]\/functions\.php['\"] *\) *\)[\r\n\t\s ]*\{?[\r\n\t\s ]*include *\( *TEMPLATEPATH *\. *['\"]\/functions\.php['\"] *\);[\r\n\t\s ]*\}?[\r\n\t\s ]*\}/";
97
+ if (($_wp_settings = preg_replace ($theme_funcs_section, "", $_wp_settings, 1, $theme_funcs_replaced)) && $theme_funcs_replaced)
98
+ {
99
+ if (($_wp_settings = str_replace ("__FILE__", '"' . str_replace ('"', '\"', $o_file) . '"', $_wp_settings)))
100
+ {
101
+ if (($_wp_settings = trim ($_wp_settings))) /* WordPress®, with s2Member only. */
102
+ return $_wp_settings;
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ }
109
+ }
110
+ }
111
+ /**/
112
+ return false; /* Default return. */
113
+ }
114
+ }
115
+ }
116
+ ?>
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
  {
@@ -34,11 +34,13 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
34
  * @since 3.5
35
  *
36
  * @param str $string Input string.
 
37
  * @return str Output string after double quotes are escaped.
38
  */
39
- public static function esc_dq ($string = FALSE)
40
  {
41
- return str_replace ('"', '\"', (string)$string);
 
42
  }
43
  /**
44
  * Escapes single quotes.
@@ -47,11 +49,28 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
47
  * @since 3.5
48
  *
49
  * @param str $string Input string.
 
50
  * @return str Output string after single quotes are escaped.
51
  */
52
- public static function esc_sq ($string = FALSE)
53
  {
54
- return str_replace ("'", "\'", (string)$string);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  }
56
  /**
57
  * Escapes dollars signs ( for regex patterns ).
@@ -60,11 +79,13 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
60
  * @since 3.5
61
  *
62
  * @param str $string Input string.
 
63
  * @return str Output string after dollar signs are escaped.
64
  */
65
- public static function esc_ds ($string = FALSE)
66
  {
67
- return str_replace ('$', '\\$', (string)$string);
 
68
  }
69
  /**
70
  * Sanitizes a string; by removing non-standard characters.
@@ -172,11 +193,11 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
172
  * @param str $str Input string to be highlighted.
173
  * @return str The highlighted string.
174
  */
175
- public static function highlight_php ($str = FALSE)
176
  {
177
- $str = highlight_string ($str, true); /* Start with PHP syntax highlighting first. */
178
  /**/
179
- return preg_replace_callback ("/(\[)(\/?)(_*s2If|s2Get|s2Member-[A-z_0-9\-]+)(.*?)(\])/i", "c_ws_plugin__s2member_utils_strings::_highlight_php", $str);
180
  }
181
  /**
182
  * Highlights Shortcodes.
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
  {
34
  * @since 3.5
35
  *
36
  * @param str $string Input string.
37
+ * @param int $times Mumber of escapes. Defaults to 1.
38
  * @return str Output string after double quotes are escaped.
39
  */
40
+ public static function esc_dq ($string = FALSE, $times = FALSE)
41
  {
42
+ $times = (is_numeric ($times) && $times >= 0) ? (int)$times : 1;
43
+ return str_replace ('"', str_repeat ("\\", $times) . '"', (string)$string);
44
  }
45
  /**
46
  * Escapes single quotes.
49
  * @since 3.5
50
  *
51
  * @param str $string Input string.
52
+ * @param int $times Mumber of escapes. Defaults to 1.
53
  * @return str Output string after single quotes are escaped.
54
  */
55
+ public static function esc_sq ($string = FALSE, $times = FALSE)
56
  {
57
+ $times = (is_numeric ($times) && $times >= 0) ? (int)$times : 1;
58
+ return str_replace ("'", str_repeat ("\\", $times) . "'", (string)$string);
59
+ }
60
+ /**
61
+ * Escapes JavaScript and single quotes.
62
+ *
63
+ * @package s2Member\Utilities
64
+ * @since 110901
65
+ *
66
+ * @param str $string Input string.
67
+ * @param int $times Mumber of escapes. Defaults to 1.
68
+ * @return str Output string after JavaScript and single quotes are escaped.
69
+ */
70
+ public static function esc_js_sq ($string = FALSE, $times = FALSE)
71
+ {
72
+ $times = (is_numeric ($times) && $times >= 0) ? (int)$times : 1;
73
+ return str_replace ("'", str_repeat ("\\", $times) . "'", str_replace (array ("\r", "\n"), array ("", '\\n'), str_replace ("\'", "'", (string)$string)));
74
  }
75
  /**
76
  * Escapes dollars signs ( for regex patterns ).
79
  * @since 3.5
80
  *
81
  * @param str $string Input string.
82
+ * @param int $times Mumber of escapes. Defaults to 1.
83
  * @return str Output string after dollar signs are escaped.
84
  */
85
+ public static function esc_ds ($string = FALSE, $times = FALSE)
86
  {
87
+ $times = (is_numeric ($times) && $times >= 0) ? (int)$times : 1;
88
+ return str_replace ('$', str_repeat ("\\", $times) . '$', (string)$string);
89
  }
90
  /**
91
  * Sanitizes a string; by removing non-standard characters.
193
  * @param str $str Input string to be highlighted.
194
  * @return str The highlighted string.
195
  */
196
+ public static function highlight_php ($string = FALSE)
197
  {
198
+ $string = highlight_string ((string)$string, true); /* Start with PHP syntax highlighting first. */
199
  /**/
200
+ return preg_replace_callback ("/(\[)(\/?)(_*s2If|s2Get|s2Member-[A-z_0-9\-]+)(.*?)(\])/i", "c_ws_plugin__s2member_utils_strings::_highlight_php", $string);
201
  }
202
  /**
203
  * Highlights Shortcodes.
includes/classes/utils-time.inc.php CHANGED
@@ -50,49 +50,49 @@ if (!class_exists ("c_ws_plugin__s2member_utils_time"))
50
  {
51
  $m = (int)round ($difference / 60);
52
  /**/
53
- $since = ($m < 1) ? "less than a minute" : $since;
54
- $since = ($m === 1) ? "1 minute" : $since;
55
- $since = ($m > 1) ? $m . " minutes" : $since;
56
- $since = ($m >= 60) ? "about 1 hour" : $since;
57
  }
58
  else if ($difference >= 3600 && $difference < 86400)
59
  {
60
  $h = (int)round ($difference / 3600);
61
  /**/
62
- $since = ($h === 1) ? "1 hour" : $since;
63
- $since = ($h > 1) ? $h . " hours" : $since;
64
- $since = ($h >= 24) ? "about 1 day" : $since;
65
  }
66
  else if ($difference >= 86400 && $difference < 604800)
67
  {
68
  $d = (int)round ($difference / 86400);
69
  /**/
70
- $since = ($d === 1) ? "1 day" : $since;
71
- $since = ($d > 1) ? $d . " days" : $since;
72
- $since = ($d >= 7) ? "about 1 week" : $since;
73
  }
74
  else if ($difference >= 604800 && $difference < 2592000)
75
  {
76
  $w = (int)round ($difference / 604800);
77
  /**/
78
- $since = ($w === 1) ? "1 week" : $since;
79
- $since = ($w > 1) ? $w . " weeks" : $since;
80
- $since = ($w >= 4) ? "about 1 month" : $since;
81
  }
82
  else if ($difference >= 2592000 && $difference < 31556926)
83
  {
84
  $m = (int)round ($difference / 2592000);
85
  /**/
86
- $since = ($m === 1) ? "1 month" : $since;
87
- $since = ($m > 1) ? $m . " months" : $since;
88
- $since = ($m >= 12) ? "about 1 year" : $since;
89
  }
90
  else if ($difference >= 31556926) /* Years. */
91
  {
92
  $y = (int)round ($difference / 31556926);
93
  /**/
94
- $since = ($y === 1) ? "1 year" : $since;
95
- $since = ($y > 1) ? $y . " years" : $since;
96
  }
97
  /**/
98
  return $since;
@@ -232,23 +232,23 @@ if (!class_exists ("c_ws_plugin__s2member_utils_time"))
232
  /**/
233
  if ($term_cycle_key && $directive === "recurring") /* recurring = Daily, Weekly, Bi-Weekly, Monthly, Bi-Monthly, Quarterly, Yearly, Lifetime. */
234
  {
235
- $paypal_term_cycles = array ("D" => "Daily", "W" => "Weekly", "M" => "Monthly", "Y" => "Yearly", "L" => "Lifetime", "DAY" => "Daily", "WEEK" => "Weekly", "MONTH" => "Monthly", "YEAR" => "Yearly", "Lifetime" => "Lifetime");
236
  /**/
237
  $term_cycle = isset ($paypal_term_cycles[$term_cycle_key]) ? $paypal_term_cycles[$term_cycle_key] : false;
238
  /**/
239
- $term_cycle = (strtoupper ($term_or_period_term) === "2 W") ? "Bi-Weekly" : $term_cycle;
240
- $term_cycle = (strtoupper ($term_or_period_term) === "2 M") ? "Bi-Monthly" : $term_cycle;
241
- $term_cycle = (strtoupper ($term_or_period_term) === "3 M") ? "Quarterly" : $term_cycle;
242
  }
243
  else if ($term_cycle_key && $directive === "singular") /* singular = Day, Week, Month, Year, Lifetime. */
244
  {
245
- $paypal_term_cycles = array ("D" => "Day", "W" => "Week", "M" => "Month", "Y" => "Year", "L" => "Lifetime", "DAY" => "Day", "WEEK" => "Week", "MONTH" => "Month", "YEAR" => "Year", "Lifetime" => "Lifetime");
246
  /**/
247
  $term_cycle = isset ($paypal_term_cycles[$term_cycle_key]) ? $paypal_term_cycles[$term_cycle_key] : false;
248
  }
249
  else if ($term_cycle_key && $directive === "plural") /* plural = Days, Weeks, Months, Years, Lifetimes. */
250
  {
251
- $paypal_term_cycles = array ("D" => "Days", "W" => "Weeks", "M" => "Months", "Y" => "Years", "L" => "Lifetimes", "DAY" => "Days", "WEEK" => "Weeks", "MONTH" => "Months", "YEAR" => "Years", "Lifetime" => "Lifetimes");
252
  /**/
253
  $term_cycle = isset ($paypal_term_cycles[$term_cycle_key]) ? $paypal_term_cycles[$term_cycle_key] : false;
254
  }
@@ -283,13 +283,15 @@ if (!class_exists ("c_ws_plugin__s2member_utils_time"))
283
  $period_term = strtolower ($cycle_recurring); /* Results in an "ly" ending. */
284
  /**/
285
  else if ($recurring) /* Otherwise, it's recurring; but NOT an "ly" ending. */
286
- $period_term = strtolower ("every " . $period . " " . $cycle_plural);
 
287
  /**/
288
  else if (strtoupper ($term) === "L") /* One-payment for lifetime access. */
289
- $period_term = "lifetime"; /* Lifetime only. */
290
  /**/
291
  else /* Otherwise, this is NOT recurring. Results in X days/weeks/months/years/lifetime. */
292
- $period_term = strtolower ($period . " " . (($period <> 1) ? $cycle_plural : $cycle_singular));
 
293
  /**/
294
  return $period_term; /* Return converted value. */
295
  }
@@ -322,13 +324,15 @@ if (!class_exists ("c_ws_plugin__s2member_utils_time"))
322
  $amount_period_term = number_format ($amount, 2, ".", "") . " / " . strtolower ($cycle_recurring);
323
  /**/
324
  else if ($recurring) /* Otherwise, it's recurring; but NOT an "ly" ending. */
325
- $amount_period_term = number_format ($amount, 2, ".", "") . " " . strtolower ("every " . $period . " " . $cycle_plural);
 
326
  /**/
327
  else if (strtoupper ($term) === "L") /* One-payment for lifetime access. */
328
- $amount_period_term = number_format ($amount, 2, ".", ""); /* Price only. */
329
  /**/
330
  else /* Otherwise, this is NOT recurring. Results in 0.00 for X days/weeks/months/years/lifetime. */
331
- $amount_period_term = number_format ($amount, 2, ".", "") . " for " . strtolower ($period . " " . (($period <> 1) ? $cycle_plural : $cycle_singular));
 
332
  /**/
333
  return $amount_period_term; /* Return converted value. */
334
  }
50
  {
51
  $m = (int)round ($difference / 60);
52
  /**/
53
+ $since = ($m < 1) ? _x ("less than a minute", "s2member-front", "s2member") : $since;
54
+ $since = ($m === 1) ? _x ("1 minute", "s2member-front", "s2member") : $since;
55
+ $since = ($m > 1) ? sprintf (_nx ("%s minute", "%s minutes", $m, "s2member-front", "s2member"), $m) : $since;
56
+ $since = ($m >= 60) ? _x ("about 1 hour", "s2member-front", "s2member") : $since;
57
  }
58
  else if ($difference >= 3600 && $difference < 86400)
59
  {
60
  $h = (int)round ($difference / 3600);
61
  /**/
62
+ $since = ($h === 1) ? _x ("1 hour", "s2member-front", "s2member") : $since;
63
+ $since = ($h > 1) ? sprintf (_nx ("%s hour", "%s hours", $h, "s2member-front", "s2member"), $h) : $since;
64
+ $since = ($h >= 24) ? _x ("about 1 day", "s2member-front", "s2member") : $since;
65
  }
66
  else if ($difference >= 86400 && $difference < 604800)
67
  {
68
  $d = (int)round ($difference / 86400);
69
  /**/
70
+ $since = ($d === 1) ? _x ("1 day", "s2member-front", "s2member") : $since;
71
+ $since = ($d > 1) ? sprintf (_nx ("%s day", "%s days", $d, "s2member-front", "s2member"), $d) : $since;
72
+ $since = ($d >= 7) ? _x ("about 1 week", "s2member-front", "s2member") : $since;
73
  }
74
  else if ($difference >= 604800 && $difference < 2592000)
75
  {
76
  $w = (int)round ($difference / 604800);
77
  /**/
78
+ $since = ($w === 1) ? _x ("1 week", "s2member-front", "s2member") : $since;
79
+ $since = ($w > 1) ? sprintf (_nx ("%s week", "%s weeks", $w, "s2member-front", "s2member"), $w) : $since;
80
+ $since = ($w >= 4) ? _x ("about 1 month", "s2member-front", "s2member") : $since;
81
  }
82
  else if ($difference >= 2592000 && $difference < 31556926)
83
  {
84
  $m = (int)round ($difference / 2592000);
85
  /**/
86
+ $since = ($m === 1) ? _x ("1 month", "s2member-front", "s2member") : $since;
87
+ $since = ($m > 1) ? sprintf (_nx ("%s month", "%s months", $m, "s2member-front", "s2member"), $m) : $since;
88
+ $since = ($m >= 12) ? _x ("about 1 year", "s2member-front", "s2member") : $since;
89
  }
90
  else if ($difference >= 31556926) /* Years. */
91
  {
92
  $y = (int)round ($difference / 31556926);
93
  /**/
94
+ $since = ($y === 1) ? _x ("1 year", "s2member-front", "s2member") : $since;
95
+ $since = ($y > 1) ? sprintf (_nx ("%s year", "%s years", $y, "s2member-front", "s2member"), $y) : $since;
96
  }
97
  /**/
98
  return $since;
232
  /**/
233
  if ($term_cycle_key && $directive === "recurring") /* recurring = Daily, Weekly, Bi-Weekly, Monthly, Bi-Monthly, Quarterly, Yearly, Lifetime. */
234
  {
235
+ $paypal_term_cycles = array ("D" => _x ("Daily", "s2member-front", "s2member"), "W" => _x ("Weekly", "s2member-front", "s2member"), "M" => _x ("Monthly", "s2member-front", "s2member"), "Y" => _x ("Yearly", "s2member-front", "s2member"), "L" => _x ("Lifetime", "s2member-front", "s2member"), "DAY" => _x ("Daily", "s2member-front", "s2member"), "WEEK" => _x ("Weekly", "s2member-front", "s2member"), "MONTH" => _x ("Monthly", "s2member-front", "s2member"), "YEAR" => _x ("Yearly", "s2member-front", "s2member"), "Lifetime" => _x ("Lifetime", "s2member-front", "s2member"));
236
  /**/
237
  $term_cycle = isset ($paypal_term_cycles[$term_cycle_key]) ? $paypal_term_cycles[$term_cycle_key] : false;
238
  /**/
239
+ $term_cycle = (strtoupper ($term_or_period_term) === "2 W") ? _x ("Bi-Weekly", "s2member-front", "s2member") : $term_cycle;
240
+ $term_cycle = (strtoupper ($term_or_period_term) === "2 M") ? _x ("Bi-Monthly", "s2member-front", "s2member") : $term_cycle;
241
+ $term_cycle = (strtoupper ($term_or_period_term) === "3 M") ? _x ("Quarterly", "s2member-front", "s2member") : $term_cycle;
242
  }
243
  else if ($term_cycle_key && $directive === "singular") /* singular = Day, Week, Month, Year, Lifetime. */
244
  {
245
+ $paypal_term_cycles = array ("D" => _x ("Day", "s2member-front", "s2member"), "W" => _x ("Week", "s2member-front", "s2member"), "M" => _x ("Month", "s2member-front", "s2member"), "Y" => _x ("Year", "s2member-front", "s2member"), "L" => _x ("Lifetime", "s2member-front", "s2member"), "DAY" => _x ("Day", "s2member-front", "s2member"), "WEEK" => _x ("Week", "s2member-front", "s2member"), "MONTH" => _x ("Month", "s2member-front", "s2member"), "YEAR" => _x ("Year", "s2member-front", "s2member"), "Lifetime" => _x ("Lifetime", "s2member-front", "s2member"));
246
  /**/
247
  $term_cycle = isset ($paypal_term_cycles[$term_cycle_key]) ? $paypal_term_cycles[$term_cycle_key] : false;
248
  }
249
  else if ($term_cycle_key && $directive === "plural") /* plural = Days, Weeks, Months, Years, Lifetimes. */
250
  {
251
+ $paypal_term_cycles = array ("D" => _x ("Days", "s2member-front", "s2member"), "W" => _x ("Weeks", "s2member-front", "s2member"), "M" => _x ("Months", "s2member-front", "s2member"), "Y" => _x ("Years", "s2member-front", "s2member"), "L" => _x ("Lifetimes", "s2member-front", "s2member"), "DAY" => _x ("Days", "s2member-front", "s2member"), "WEEK" => _x ("Weeks", "s2member-front", "s2member"), "MONTH" => _x ("Months", "s2member-front", "s2member"), "YEAR" => _x ("Years", "s2member-front", "s2member"), "Lifetime" => _x ("Lifetimes", "s2member-front", "s2member"));
252
  /**/
253
  $term_cycle = isset ($paypal_term_cycles[$term_cycle_key]) ? $paypal_term_cycles[$term_cycle_key] : false;
254
  }
283
  $period_term = strtolower ($cycle_recurring); /* Results in an "ly" ending. */
284
  /**/
285
  else if ($recurring) /* Otherwise, it's recurring; but NOT an "ly" ending. */
286
+ /* translators: Each cycle ( i.e. `each day/week/month` or `every 2 days/weeks/months`, etc. ). Cycles are translated elsewhere. */
287
+ $period_term = strtolower (sprintf (_nx ('each %2$s', 'every %1$s %3$s', $period, "s2member-front", "s2member"), $period, $cycle_singular, $cycle_plural));
288
  /**/
289
  else if (strtoupper ($term) === "L") /* One-payment for lifetime access. */
290
+ $period_term = strtolower (_x ("lifetime", "s2member-front", "s2member")); /* Life. */
291
  /**/
292
  else /* Otherwise, this is NOT recurring. Results in X days/weeks/months/years/lifetime. */
293
+ /* translators: Membership cycle ( i.e. `1 day/week/month` or `2 days/weeks/months`, etc. ). Most of this is translated elsewhere. */
294
+ $period_term = strtolower (sprintf (_nx ('%1$s %2$s', '%1$s %3$s', $period, "s2member-front", "s2member"), $period, $cycle_singular, $cycle_plural));
295
  /**/
296
  return $period_term; /* Return converted value. */
297
  }
324
  $amount_period_term = number_format ($amount, 2, ".", "") . " / " . strtolower ($cycle_recurring);
325
  /**/
326
  else if ($recurring) /* Otherwise, it's recurring; but NOT an "ly" ending. */
327
+ /* translators: Each cycle ( i.e. `each day/week/month` or `every 2 days/weeks/months`, etc. ). Cycles are translated elsewhere. */
328
+ $amount_period_term = number_format ($amount, 2, ".", "") . " " . strtolower (sprintf (_nx ('each %2$s', 'every %1$s %3$s', $period, "s2member-front", "s2member"), $period, $cycle_singular, $cycle_plural));
329
  /**/
330
  else if (strtoupper ($term) === "L") /* One-payment for lifetime access. */
331
+ $amount_period_term = number_format ($amount, 2, ".", ""); /* Price. */
332
  /**/
333
  else /* Otherwise, this is NOT recurring. Results in 0.00 for X days/weeks/months/years/lifetime. */
334
+ /* translators: Cycle ( i.e. `for 1 day/week/month` or `for 2 days/weeks/months`, etc. ). Most of this is translated elsewhere. */
335
+ $amount_period_term = number_format ($amount, 2, ".", "") . " " . strtolower (sprintf (_nx ('for %1$s %2$s', 'for %1$s %3$s', $period, "s2member-front", "s2member"), $period, $cycle_singular, $cycle_plural));
336
  /**/
337
  return $amount_period_term; /* Return converted value. */
338
  }
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
  {
@@ -80,7 +80,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_urls"))
80
  /**/
81
  if ($url) /* Obviously, we must have a valid URL before we do anything at all here. */
82
  {
83
- if (preg_match ("/^https/i", $url) && strtolower (substr (PHP_OS, 0, 3)) === "win")
84
  add_filter ("use_curl_transport", "__return_false", ($curl_disabled = 1352));
85
  /**/
86
  if ((is_array ($post_vars) || is_string ($post_vars)) && !empty ($post_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_utils_urls"))
21
  {
80
  /**/
81
  if ($url) /* Obviously, we must have a valid URL before we do anything at all here. */
82
  {
83
+ if (preg_match ("/^https/i", $url) && stripos (PHP_OS, "win") === 0)
84
  add_filter ("use_curl_transport", "__return_false", ($curl_disabled = 1352));
85
  /**/
86
  if ((is_array ($post_vars) || is_string ($post_vars)) && !empty ($post_vars))
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
  }
@@ -144,7 +144,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_users"))
144
  return false; /* Otherwise, return false. */
145
  }
146
  /**
147
- * Retrieves IPN signup vars & validates their Subscription ID.
148
  *
149
  * The ``$user_id`` can be passed in directly; or a lookup can be performed with ``$subscr_id``.
150
  *
@@ -170,6 +170,31 @@ if (!class_exists ("c_ws_plugin__s2member_utils_users"))
170
  return false; /* Otherwise, return false. */
171
  }
172
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  * Obtains a User's Paid Subscr. ID *( if available )*; otherwise their WP User ID.
174
  *
175
  * If ``$user`` IS passed in, this function will return data from a specific ``$user``, or fail if not possible.
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
  }
144
  return false; /* Otherwise, return false. */
145
  }
146
  /**
147
+ * Retrieves IPN Signup Vars & validates their Subscription ID.
148
  *
149
  * The ``$user_id`` can be passed in directly; or a lookup can be performed with ``$subscr_id``.
150
  *
170
  return false; /* Otherwise, return false. */
171
  }
172
  /**
173
+ * Retrieves IPN Signup Var & validates their Subscription ID.
174
+ *
175
+ * The ``$user_id`` can be passed in directly; or a lookup can be performed with ``$subscr_id``.
176
+ *
177
+ * @package s2Member\Utilities
178
+ * @since 110912
179
+ *
180
+ * @param str $var Required. The requested Signup Var.
181
+ * @param int|str $user_id Optional. A numeric WordPress® User ID.
182
+ * @param str $subscr_id Optional. Can be used instead of passing in a ``$user_id``.
183
+ * If ``$subscr_id`` is passed in, it has to match the one found inside the resulting IPN Signup Vars collected by this routine.
184
+ * If neither of these parameters are passed in, the current User is assumed instead, obtained through ``wp_get_current_user()``.
185
+ * @return mixed|bool A User's IPN Signup Var on success, else false on failure.
186
+ */
187
+ public static function get_user_ipn_signup_var ($var = FALSE, $user_id = FALSE, $subscr_id = FALSE)
188
+ {
189
+ if (!empty ($var) && is_array ($user_ipn_signup_vars = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_vars ($user_id, $subscr_id)))
190
+ {
191
+ if (isset ($user_ipn_signup_vars[$var])) /* Available? */
192
+ return $user_ipn_signup_vars[$var];
193
+ }
194
+ /**/
195
+ return false; /* Otherwise, return false. */
196
+ }
197
+ /**
198
  * Obtains a User's Paid Subscr. ID *( if available )*; otherwise their WP User ID.
199
  *
200
  * If ``$user`` IS passed in, this function will return data from a specific ``$user``, or fail if not possible.
includes/codes.inc.php CHANGED
@@ -15,10 +15,11 @@
15
  * @since 3.0
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /*
20
  Add WordPress® Editor Shortcodes.
21
  */
 
22
  add_shortcode ("s2Get", "c_ws_plugin__s2member_sc_gets::sc_get_details");
23
  /**/
24
  add_shortcode ("s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
15
  * @since 3.0
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /*
20
  Add WordPress® Editor Shortcodes.
21
  */
22
+ add_shortcode ("s2Key", "c_ws_plugin__s2member_sc_keys::sc_get_key");
23
  add_shortcode ("s2Get", "c_ws_plugin__s2member_sc_gets::sc_get_details");
24
  /**/
25
  add_shortcode ("s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
includes/dropins/mu-plugins/index.php ADDED
File without changes
includes/dropins/mu-plugins/s2member-o.php ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WordPress® with s2Member only.
4
+ *
5
+ * Copyright: © 2009-2011
6
+ * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
+ * ( coded in the USA )
8
+ *
9
+ * Released under the terms of the GNU General Public License.
10
+ * You should have received a copy of the GNU General Public License,
11
+ * along with this software. In the main directory, see: /licensing/
12
+ * If not, see: {@link http://www.gnu.org/licenses/}.
13
+ *
14
+ * @package s2Member\Only
15
+ * @since 110912
16
+ */
17
+ if (!empty ($_GET["s2member_only"]) && /* Not in admin panels. */ !is_admin ())
18
+ {
19
+ if (!class_exists ("c_ws_plugin__s2member_only"))
20
+ {
21
+ /**
22
+ * WordPress® with s2Member only.
23
+ *
24
+ * @package s2Member\Only
25
+ * @since 110912
26
+ */
27
+ class c_ws_plugin__s2member_only
28
+ {
29
+ /*
30
+ * s2Member plugin only, filter.
31
+ *
32
+ * The `%s2member%` Replacement Code is filled before
33
+ * this file is copied into the `/mu-plugins/` directory for WordPress®.
34
+ *
35
+ * @package s2Member\Only
36
+ * @since 110912
37
+ *
38
+ * @return array Array with s2Member plugin only.
39
+ */
40
+ function filter () /* s2Member plugin only. */
41
+ {
42
+ return array ("%%s2member%%");
43
+ }
44
+ /*
45
+ * s2Member only, if active.
46
+ *
47
+ * The `%s2member%` Replacement Code is filled before
48
+ * this file is copied into the `/mu-plugins/` directory for WordPress®.
49
+ *
50
+ * @package s2Member\Only
51
+ * @since 110912
52
+ *
53
+ * @return null
54
+ */
55
+ function if_active () /* s2Member only, if active. */
56
+ {
57
+ $active_plugins = is_multisite () ? wp_get_active_network_plugins () : array ();
58
+ $active_plugins = array_merge ($active_plugins, wp_get_active_and_valid_plugins ());
59
+ /**/
60
+ if (in_array (WP_PLUGIN_DIR . "/%%s2member%%", $active_plugins) && !is_admin ())
61
+ {
62
+ add_filter ("pre_site_option_active_sitewide_plugins", "c_ws_plugin__s2member_only::filter", 100);
63
+ add_filter ("pre_option_active_plugins", "c_ws_plugin__s2member_only::filter", 100);
64
+ }
65
+ /**/
66
+ return; /* Return for uniformity. */
67
+ }
68
+ }
69
+ }
70
+ /**/
71
+ c_ws_plugin__s2member_only::if_active (); /* s2Member only, if active. */
72
+ }
73
+ ?>
includes/functions/api-functions.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
  * Conditional to determine if the current User is NOT logged in.
21
  *
@@ -1866,7 +1866,7 @@ if (!function_exists ("detach_s2member_query_filters"))
1866
  * ```
1867
  * ———— Shortcode Equivalent ————
1868
  * ```
1869
- * There is NO Shortcode equivalent for this ( yet ).
1870
  * ```
1871
  *
1872
  * This API Funtion produces a time-sensitive File Download Key that is unique to each and every visitor.
@@ -1889,7 +1889,6 @@ if (!function_exists ("detach_s2member_query_filters"))
1889
  * It is also possible to pass in the $directive string `ip-forever`, making the Key last forever, but only for a specific IP address.
1890
  * @return str The File Download Key. Which is an MD5 hash *( always 32 characters )*, URL-safe.
1891
  *
1892
- * @todo Create a Shortcode equivalent.
1893
  * @todo Allow custom expiration times.
1894
  */
1895
  if (!function_exists ("s2member_file_download_key"))
@@ -2134,6 +2133,7 @@ if (!function_exists ("s2member_paid_registration_time"))
2134
  * @param int $user_id Optional. Defaults to the current User's ID.
2135
  * @return mixed The value of the requested field, or false if the field does not exist.
2136
  *
 
2137
  * @see s2Member\API_Functions\s2member_registration_time()
2138
  * @see s2Member\API_Functions\s2member_paid_registration_time()
2139
  *
@@ -2149,6 +2149,62 @@ if (!function_exists ("get_user_field"))
2149
  }
2150
  }
2151
  /**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2152
  * Can be used to auto-fill the `invoice` for PayPal® Button Codes, with a unique Code~IP combination.
2153
  *
2154
  * ———— PHP Code Sample ————
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
  /**
20
  * Conditional to determine if the current User is NOT logged in.
21
  *
1866
  * ```
1867
  * ———— Shortcode Equivalent ————
1868
  * ```
1869
+ * [s2Key file_download="file.zip" directive="" /]
1870
  * ```
1871
  *
1872
  * This API Funtion produces a time-sensitive File Download Key that is unique to each and every visitor.
1889
  * It is also possible to pass in the $directive string `ip-forever`, making the Key last forever, but only for a specific IP address.
1890
  * @return str The File Download Key. Which is an MD5 hash *( always 32 characters )*, URL-safe.
1891
  *
 
1892
  * @todo Allow custom expiration times.
1893
  */
1894
  if (!function_exists ("s2member_file_download_key"))
2133
  * @param int $user_id Optional. Defaults to the current User's ID.
2134
  * @return mixed The value of the requested field, or false if the field does not exist.
2135
  *
2136
+ * @see s2Member\API_Functions\get_s2member_custom_fields()
2137
  * @see s2Member\API_Functions\s2member_registration_time()
2138
  * @see s2Member\API_Functions\s2member_paid_registration_time()
2139
  *
2149
  }
2150
  }
2151
  /**
2152
+ * Custom Registration Field configuration.
2153
+ *
2154
+ * Provides information about the configuration of each Custom Registration/Profile Field.
2155
+ * Returns an associative array with all Custom Field configurations *( and User values too, if ``$user_id`` is passed in )*.
2156
+ *
2157
+ * ———— PHP Code Sample ————
2158
+ * ```
2159
+ * <!php
2160
+ * $fields = get_s2member_custom_fields();
2161
+ * print_r($fields["my_field_id"]["config"]); # The Unique Field ID you configured with s2Member.
2162
+ * !>
2163
+ * ```
2164
+ * ———— PHP Code Sample ( Specific User ) ————
2165
+ * ```
2166
+ * <!php
2167
+ * $fields = get_s2member_custom_fields(123);
2168
+ * echo $fields["my_field_id"]["user_value"]; # The Unique Field ID you configured with s2Member.
2169
+ * print_r($fields["my_field_id"]["config"]); # The Unique Field ID you configured with s2Member.
2170
+ * !>
2171
+ * ```
2172
+ * ———— Shortcode Alternative ( Specific User ) ————
2173
+ * ```
2174
+ * [s2Get user_field="my_field_id" /] # The Unique Field ID you configured with s2Member.
2175
+ * ```
2176
+ *
2177
+ * @package s2Member\API_Functions
2178
+ * @since 110912
2179
+ *
2180
+ * @param int|str $user_id Optional. If supplied, the `user_value` for each Custom Field will be included too.
2181
+ * @return array An associative array with all Custom Field configurations *( and User values too, if ``$user_id`` is supplied )*.
2182
+ *
2183
+ * @see s2Member\API_Functions\get_user_field()
2184
+ * @see s2Member\API_Functions\s2member_registration_time()
2185
+ * @see s2Member\API_Functions\s2member_paid_registration_time()
2186
+ *
2187
+ * @see http://codex.wordpress.org/Function_Reference/get_user_option get_user_option()
2188
+ * @see http://codex.wordpress.org/Function_Reference/update_user_option update_user_option()
2189
+ * @see http://codex.wordpress.org/Function_Reference/wp_get_current_user wp_get_current_user()
2190
+ */
2191
+ if (!function_exists ("get_s2member_custom_fields"))
2192
+ {
2193
+ function get_s2member_custom_fields ($user_id = FALSE)
2194
+ {
2195
+ $fields = ($user_id) ? get_user_option ("s2member_custom_fields", $user_id) : false;
2196
+ /**//**/
2197
+ foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
2198
+ {
2199
+ if ($user_id) /* Should we try to fill the User's value for this Custom Field? */
2200
+ $s2member_custom_fields[$field["id"]]["user_value"] = (isset ($fields[$field["id"]])) ? $fields[$field["id"]] : false;
2201
+ $s2member_custom_fields[$field["id"]]["config"] = $field; /* Copy configuration into config element. */
2202
+ }
2203
+ /**/
2204
+ return (isset ($s2member_custom_fields)) ? (array)$s2member_custom_fields : array ();
2205
+ }
2206
+ }
2207
+ /**
2208
  * Can be used to auto-fill the `invoice` for PayPal® Button Codes, with a unique Code~IP combination.
2209
  *
2210
  * ———— PHP Code Sample ————
includes/hooks.inc.php CHANGED
@@ -23,34 +23,35 @@ add_action ("pre_get_posts", /* WP Query. */
23
  "c_ws_plugin__s2member_security::security_gate_query", 20);
24
  /* Priority matches `/api-functions.inc.php`. */
25
  /**/
26
- add_action ("init", "c_ws_plugin__s2member_ssl::check_force_ssl", 1);
27
- add_action ("init", "c_ws_plugin__s2member_user_securities::initialize", 1);
28
  /**/
29
- add_action ("init", "c_ws_plugin__s2member_no_cache::no_cache", 1);
 
 
30
  /**/
31
- add_action ("init", "c_ws_plugin__s2member_register::register", 1);
32
- add_action ("init", "c_ws_plugin__s2member_paypal_notify::paypal_notify", 1);
33
- add_action ("init", "c_ws_plugin__s2member_files::check_file_download_access", 1);
34
- add_action ("init", "c_ws_plugin__s2member_profile_mods::handle_profile_modifications", 1);
35
- add_action ("init", "c_ws_plugin__s2member_profile_mods_4bp::handle_profile_modifications_4bp", 1);
36
- add_action ("init", "c_ws_plugin__s2member_tracking_cookies::delete_sp_tracking_cookie", 1);
37
- add_action ("init", "c_ws_plugin__s2member_tracking_cookies::delete_tracking_cookie", 1);
38
- add_action ("init", "c_ws_plugin__s2member_cron_jobs::auto_eot_system_via_cron", 1);
39
- add_action ("init", "c_ws_plugin__s2member_mo_page::membership_options_page", 1);
40
- add_action ("init", "c_ws_plugin__s2member_s_badge_status::s_badge_status", 1);
41
  /**/
42
- add_action ("init", "c_ws_plugin__s2member_admin_css_js::menu_pages_css", 1);
43
- add_action ("init", "c_ws_plugin__s2member_admin_css_js::menu_pages_js", 1);
 
44
  /**/
45
- add_action ("init", "c_ws_plugin__s2member_css_js::css", 1);
46
  /**/
47
- add_action ("init", "c_ws_plugin__s2member_constants::constants", 1);
 
 
48
  /**/
49
- add_action ("init", "c_ws_plugin__s2member_css_js::js_w_globals", 1);
50
- add_action ("init", "c_ws_plugin__s2member_profile::profile", 1);
51
- add_action ("init", "c_ws_plugin__s2member_paypal_return::paypal_return", 1);
52
  /**/
53
- add_action ("init", "c_ws_plugin__s2member_labels::config_label_translations");
54
  add_action ("init", "c_ws_plugin__s2member_login_redirects_r::remove_login_redirect_filters", 11);
55
  /**/
56
  add_action ("template_redirect", "c_ws_plugin__s2member_ssl::check_force_ssl", 1);
@@ -62,10 +63,9 @@ add_filter ("widget_text", "do_shortcode"); /* Shortcodes in widgets. */
62
  /**/
63
  add_action ("wp_print_styles", "c_ws_plugin__s2member_css_js_themes::add_css");
64
  add_action ("wp_print_scripts", "c_ws_plugin__s2member_css_js_themes::add_js_w_globals");
65
- add_filter ("gettext", "c_ws_plugin__s2member_translations::translation_mangler", 10, 3);
66
  /**/
67
  add_action ("wp_login_failed", "c_ws_plugin__s2member_brute_force::track_failed_logins");
68
- add_filter ("authenticate", "c_ws_plugin__s2member_brute_force::stop_brute_force_logins", 1000);
69
  /**/
70
  add_action ("delete_user", "c_ws_plugin__s2member_user_deletions::handle_user_deletions");
71
  add_action ("wpmu_delete_user", "c_ws_plugin__s2member_user_deletions::handle_ms_user_deletions");
@@ -132,7 +132,7 @@ add_action ("add_meta_boxes", "c_ws_plugin__s2member_meta_boxes::add_meta_boxes"
132
  add_action ("save_post", "c_ws_plugin__s2member_meta_box_saves::save_meta_boxes");
133
  add_action ("admin_menu", "c_ws_plugin__s2member_menu_pages::add_admin_options");
134
  add_action ("network_admin_menu", "c_ws_plugin__s2member_menu_pages::add_network_admin_options");
135
- add_action ("admin_bar_menu", "c_ws_plugin__s2member_admin_lockouts::filter_admin_menu_bar", 1000);
136
  add_action ("admin_print_scripts", "c_ws_plugin__s2member_menu_pages::add_admin_scripts");
137
  add_action ("admin_print_styles", "c_ws_plugin__s2member_menu_pages::add_admin_styles");
138
  add_filter ("update_feedback", "c_ws_plugin__s2member_mms_patches::sync_mms_patches");
23
  "c_ws_plugin__s2member_security::security_gate_query", 20);
24
  /* Priority matches `/api-functions.inc.php`. */
25
  /**/
26
+ add_action ("init", "c_ws_plugin__s2member_translations::load", 2);
 
27
  /**/
28
+ add_action ("init", "c_ws_plugin__s2member_ssl::check_force_ssl", 3);
29
+ add_action ("init", "c_ws_plugin__s2member_user_securities::initialize", 3);
30
+ add_action ("init", "c_ws_plugin__s2member_no_cache::no_cache", 3);
31
  /**/
32
+ add_action ("init", "c_ws_plugin__s2member_register::register", 4);
33
+ add_action ("init", "c_ws_plugin__s2member_paypal_notify::paypal_notify", 4);
34
+ add_action ("init", "c_ws_plugin__s2member_files::check_file_download_access", 4);
35
+ add_action ("init", "c_ws_plugin__s2member_profile_mods::handle_profile_modifications", 4);
36
+ add_action ("init", "c_ws_plugin__s2member_profile_mods_4bp::handle_profile_modifications_4bp", 4);
37
+ add_action ("init", "c_ws_plugin__s2member_tracking_cookies::delete_sp_tracking_cookie", 4);
38
+ add_action ("init", "c_ws_plugin__s2member_tracking_cookies::delete_tracking_cookie", 4);
39
+ add_action ("init", "c_ws_plugin__s2member_cron_jobs::auto_eot_system_via_cron", 4);
40
+ add_action ("init", "c_ws_plugin__s2member_mo_page::membership_options_page", 4);
41
+ add_action ("init", "c_ws_plugin__s2member_s_badge_status::s_badge_status", 4);
42
  /**/
43
+ add_action ("init", "c_ws_plugin__s2member_admin_css_js::menu_pages_css", 5);
44
+ add_action ("init", "c_ws_plugin__s2member_admin_css_js::menu_pages_js", 5);
45
+ add_action ("init", "c_ws_plugin__s2member_css_js::css", 5);
46
  /**/
47
+ add_action ("init", "c_ws_plugin__s2member_constants::constants", 6);
48
  /**/
49
+ add_action ("init", "c_ws_plugin__s2member_css_js::js_w_globals", 7);
50
+ add_action ("init", "c_ws_plugin__s2member_paypal_return::paypal_return", 7);
51
+ add_action ("init", "c_ws_plugin__s2member_profile::profile", 7);
52
  /**/
53
+ add_action ("init", "c_ws_plugin__s2member_labels::config_label_translations", 10);
 
 
54
  /**/
 
55
  add_action ("init", "c_ws_plugin__s2member_login_redirects_r::remove_login_redirect_filters", 11);
56
  /**/
57
  add_action ("template_redirect", "c_ws_plugin__s2member_ssl::check_force_ssl", 1);
63
  /**/
64
  add_action ("wp_print_styles", "c_ws_plugin__s2member_css_js_themes::add_css");
65
  add_action ("wp_print_scripts", "c_ws_plugin__s2member_css_js_themes::add_js_w_globals");
 
66
  /**/
67
  add_action ("wp_login_failed", "c_ws_plugin__s2member_brute_force::track_failed_logins");
68
+ add_filter ("authenticate", "c_ws_plugin__s2member_brute_force::stop_brute_force_logins", 100);
69
  /**/
70
  add_action ("delete_user", "c_ws_plugin__s2member_user_deletions::handle_user_deletions");
71
  add_action ("wpmu_delete_user", "c_ws_plugin__s2member_user_deletions::handle_ms_user_deletions");
132
  add_action ("save_post", "c_ws_plugin__s2member_meta_box_saves::save_meta_boxes");
133
  add_action ("admin_menu", "c_ws_plugin__s2member_menu_pages::add_admin_options");
134
  add_action ("network_admin_menu", "c_ws_plugin__s2member_menu_pages::add_network_admin_options");
135
+ add_action ("admin_bar_menu", "c_ws_plugin__s2member_admin_lockouts::filter_admin_menu_bar", 100);
136
  add_action ("admin_print_scripts", "c_ws_plugin__s2member_menu_pages::add_admin_scripts");
137
  add_action ("admin_print_styles", "c_ws_plugin__s2member_menu_pages::add_admin_styles");
138
  add_filter ("update_feedback", "c_ws_plugin__s2member_mms_patches::sync_mms_patches");
includes/jquery/index.php ADDED
File without changes
includes/jquery/jquery.json-ps/index.php ADDED
File without changes
includes/{menu-pages/jquery-json-ps-min.js → jquery/jquery.json-ps/jquery.json-ps-min.js} RENAMED
File without changes
includes/{menu-pages/jquery-json-ps.js → jquery/jquery.json-ps/jquery.json-ps.js} RENAMED
@@ -2,7 +2,7 @@
2
  * jQuery extension for JSON Parsing.
3
  *
4
  * This is the development version of the code.
5
- * Which ultimately produces jquery-json-ps-min.js.
6
  *
7
  * This extension builds independent JSON parsing/stringifying functions.
8
  * For better consistency, these functions will NOT fall back on built-in support for JSON.
@@ -10,9 +10,9 @@
10
 
11
  * Based on: {@link http://www.json.org/js.html} see: {@link http://www.json.org/json2.js}
12
  * if(!this.JSON){this.JSON={}}(function(){var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}JSON.__stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.__stringify")}return str("",{"":value})};JSON.__parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.__parse")}}());
13
- * Modified to work independently via: __stringify() and __parse().
14
  *
15
- * This file is included with all WordPress® themes/plugins by WebSharks, Inc.
16
  *
17
  * Copyright: © 2009-2011
18
  * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
@@ -23,7 +23,7 @@
23
  * along with this software. In the main directory, see: /licensing/
24
  * If not, see: {@link http://www.gnu.org/licenses/}.
25
  *
26
- * @package WebSharks\jQuery\JSON Extension
27
  * @since x.xx
28
  */
29
  (function($)
2
  * jQuery extension for JSON Parsing.
3
  *
4
  * This is the development version of the code.
5
+ * Which ultimately produces `jquery.json-ps-min.js`.
6
  *
7
  * This extension builds independent JSON parsing/stringifying functions.
8
  * For better consistency, these functions will NOT fall back on built-in support for JSON.
10
 
11
  * Based on: {@link http://www.json.org/js.html} see: {@link http://www.json.org/json2.js}
12
  * if(!this.JSON){this.JSON={}}(function(){var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}JSON.__stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.__stringify")}return str("",{"":value})};JSON.__parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.__parse")}}());
13
+ * Modified to work via: `$.JSON.stringify` and `$.JSON.parse`.
14
  *
15
+ * Distributed with WordPress® themes/plugins by WebSharks, Inc.
16
  *
17
  * Copyright: © 2009-2011
18
  * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
23
  * along with this software. In the main directory, see: /licensing/
24
  * If not, see: {@link http://www.gnu.org/licenses/}.
25
  *
26
+ * @package WebSharks\jQuery\Extensions
27
  * @since x.xx
28
  */
29
  (function($)
includes/jquery/jquery.sprintf/index.php ADDED
File without changes
includes/jquery/jquery.sprintf/jquery.sprintf-min.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(a){if(typeof a.sprintf!=="function"){a.sprintf=function(){var g=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuidfegEG])/g;var h=arguments,f=0,k=h[f++];var b=function(o,i,l,n){if(!l){l=" "}var m=(o.length>=i)?"":Array(1+i-o.length>>>0).join(l);return n?o+m:m+o};var c=function(n,m,q,i,l,p){var o=i-n.length;if(o>0){if(q||!l){n=b(n,i,p,q)}else{n=n.slice(0,m.length)+b("",o,"0",true)+n.slice(m.length)}}return n};var j=function(q,p,o,r,l,i,n){var m=q>>>0;o=o&&m&&{"2":"0b","8":"0","16":"0x"}[p]||"";q=o+b(m.toString(p),i||0,"0",false);return c(q,o,r,l,n)};var e=function(n,p,l,i,m,o){if(i!=null){n=n.slice(0,i)}return c(n,"",p,l,m,o)};var d=function(A,n,o,s,C,x,m){var i;var w;var l;var B;var u;if(A=="%%"){return"%"}var t=false,p="",r=false,z=false,y=" ";var q=o.length;for(var v=0;o&&v<q;v++){switch(o.charAt(v)){case" ":p=" ";break;case"+":p="+";break;case"-":t=true;break;case"'":y=o.charAt(v+1);break;case"0":r=true;break;case"#":z=true;break}}if(!s){s=0}else{if(s=="*"){s=+h[f++]}else{if(s.charAt(0)=="*"){s=+h[s.slice(1,-1)]}else{s=+s}}}if(s<0){s=-s;t=true}if(!isFinite(s)){throw new Error("sprintf: (minimum-)width must be finite")}if(!x){x="fFeE".indexOf(m)>-1?6:(m=="d")?0:undefined}else{if(x=="*"){x=+h[f++]}else{if(x.charAt(0)=="*"){x=+h[x.slice(1,-1)]}else{x=+x}}}u=n?h[n.slice(0,-1)]:h[f++];switch(m){case"s":return e(String(u),t,s,x,r,y);case"c":return e(String.fromCharCode(+u),t,s,x,r);case"b":return j(u,2,z,t,s,x,r);case"o":return j(u,8,z,t,s,x,r);case"x":return j(u,16,z,t,s,x,r);case"X":return j(u,16,z,t,s,x,r).toUpperCase();case"u":return j(u,10,z,t,s,x,r);case"i":case"d":i=(+u)|0;w=i<0?"-":p;u=w+b(String(Math.abs(i)),x,"0",false);return c(u,w,t,s,r);case"e":case"E":case"f":case"F":case"g":case"G":i=+u;w=i<0?"-":p;l=["toExponential","toFixed","toPrecision"]["efg".indexOf(m.toLowerCase())];B=["toString","toUpperCase"]["eEfFgG".indexOf(m)%2];u=w+Math.abs(i)[l](x);return c(u,w,t,s,r)[B]();default:return A}};return k.replace(g,d)}}})(jQuery);
includes/jquery/jquery.sprintf/jquery.sprintf.js ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * jQuery extension for PHP-equiv sprintf().
3
+ *
4
+ * This is the development version of the code.
5
+ * Which ultimately produces `jquery.sprintf-min.js`.
6
+ *
7
+ * Based on: {@link http://phpjs.org/functions/sprintf:522} see: {@link http://phpjs.org/pages/license}
8
+ * Modified to work via: `$.sprintf()` using jQuery.
9
+ *
10
+ * Distributed with WordPress® themes/plugins by WebSharks, Inc.
11
+ *
12
+ * Copyright: © 2009-2011
13
+ * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
14
+ * ( coded in the USA )
15
+ *
16
+ * Released under the terms of the GNU General Public License.
17
+ * You should have received a copy of the GNU General Public License,
18
+ * along with this software. In the main directory, see: /licensing/
19
+ * If not, see: {@link http://www.gnu.org/licenses/}.
20
+ *
21
+ * @package WebSharks\jQuery\Extensions
22
+ * @since x.xx
23
+ */
24
+ (function($)
25
+ {
26
+ if (typeof $.sprintf !== 'function')
27
+ {
28
+ $.sprintf = function () {
29
+ // http://kevin.vanzonneveld.net
30
+ // + original by: Ash Searle (http://hexmen.com/blog/)
31
+ // + namespaced by: Michael White (http://getsprink.com)
32
+ // + tweaked by: Jack
33
+ // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
34
+ // + input by: Paulo Freitas
35
+ // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
36
+ // + input by: Brett Zamir (http://brett-zamir.me)
37
+ // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
38
+ // * example 1: sprintf("%01.2f", 123.1);
39
+ // * returns 1: 123.10
40
+ // * example 2: sprintf("[%10s]", 'monkey');
41
+ // * returns 2: '[ monkey]'
42
+ // * example 3: sprintf("[%'#10s]", 'monkey');
43
+ // * returns 3: '[####monkey]'
44
+ var regex = /%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuidfegEG])/g;
45
+ var a = arguments,
46
+ i = 0,
47
+ format = a[i++];
48
+
49
+ // pad()
50
+ var pad = function (str, len, chr, leftJustify) {
51
+ if (!chr) {
52
+ chr = ' ';
53
+ }
54
+ var padding = (str.length >= len) ? '' : Array(1 + len - str.length >>> 0).join(chr);
55
+ return leftJustify ? str + padding : padding + str;
56
+ };
57
+
58
+ // justify()
59
+ var justify = function (value, prefix, leftJustify, minWidth, zeroPad, customPadChar) {
60
+ var diff = minWidth - value.length;
61
+ if (diff > 0) {
62
+ if (leftJustify || !zeroPad) {
63
+ value = pad(value, minWidth, customPadChar, leftJustify);
64
+ } else {
65
+ value = value.slice(0, prefix.length) + pad('', diff, '0', true) + value.slice(prefix.length);
66
+ }
67
+ }
68
+ return value;
69
+ };
70
+
71
+ // formatBaseX()
72
+ var formatBaseX = function (value, base, prefix, leftJustify, minWidth, precision, zeroPad) {
73
+ // Note: casts negative numbers to positive ones
74
+ var number = value >>> 0;
75
+ prefix = prefix && number && {
76
+ '2': '0b',
77
+ '8': '0',
78
+ '16': '0x'
79
+ }[base] || '';
80
+ value = prefix + pad(number.toString(base), precision || 0, '0', false);
81
+ return justify(value, prefix, leftJustify, minWidth, zeroPad);
82
+ };
83
+
84
+ // formatString()
85
+ var formatString = function (value, leftJustify, minWidth, precision, zeroPad, customPadChar) {
86
+ if (precision != null) {
87
+ value = value.slice(0, precision);
88
+ }
89
+ return justify(value, '', leftJustify, minWidth, zeroPad, customPadChar);
90
+ };
91
+
92
+ // doFormat()
93
+ var doFormat = function (substring, valueIndex, flags, minWidth, _, precision, type) {
94
+ var number;
95
+ var prefix;
96
+ var method;
97
+ var textTransform;
98
+ var value;
99
+
100
+ if (substring == '%%') {
101
+ return '%';
102
+ }
103
+
104
+ // parse flags
105
+ var leftJustify = false,
106
+ positivePrefix = '',
107
+ zeroPad = false,
108
+ prefixBaseX = false,
109
+ customPadChar = ' ';
110
+ var flagsl = flags.length;
111
+ for (var j = 0; flags && j < flagsl; j++) {
112
+ switch (flags.charAt(j)) {
113
+ case ' ':
114
+ positivePrefix = ' ';
115
+ break;
116
+ case '+':
117
+ positivePrefix = '+';
118
+ break;
119
+ case '-':
120
+ leftJustify = true;
121
+ break;
122
+ case "'":
123
+ customPadChar = flags.charAt(j + 1);
124
+ break;
125
+ case '0':
126
+ zeroPad = true;
127
+ break;
128
+ case '#':
129
+ prefixBaseX = true;
130
+ break;
131
+ }
132
+ }
133
+
134
+ // parameters may be null, undefined, empty-string or real valued
135
+ // we want to ignore null, undefined and empty-string values
136
+ if (!minWidth) {
137
+ minWidth = 0;
138
+ } else if (minWidth == '*') {
139
+ minWidth = +a[i++];
140
+ } else if (minWidth.charAt(0) == '*') {
141
+ minWidth = +a[minWidth.slice(1, -1)];
142
+ } else {
143
+ minWidth = +minWidth;
144
+ }
145
+
146
+ // Note: undocumented perl feature:
147
+ if (minWidth < 0) {
148
+ minWidth = -minWidth;
149
+ leftJustify = true;
150
+ }
151
+
152
+ if (!isFinite(minWidth)) {
153
+ throw new Error('sprintf: (minimum-)width must be finite');
154
+ }
155
+
156
+ if (!precision) {
157
+ precision = 'fFeE'.indexOf(type) > -1 ? 6 : (type == 'd') ? 0 : undefined;
158
+ } else if (precision == '*') {
159
+ precision = +a[i++];
160
+ } else if (precision.charAt(0) == '*') {
161
+ precision = +a[precision.slice(1, -1)];
162
+ } else {
163
+ precision = +precision;
164
+ }
165
+
166
+ // grab value using valueIndex if required?
167
+ value = valueIndex ? a[valueIndex.slice(0, -1)] : a[i++];
168
+
169
+ switch (type) {
170
+ case 's':
171
+ return formatString(String(value), leftJustify, minWidth, precision, zeroPad, customPadChar);
172
+ case 'c':
173
+ return formatString(String.fromCharCode(+value), leftJustify, minWidth, precision, zeroPad);
174
+ case 'b':
175
+ return formatBaseX(value, 2, prefixBaseX, leftJustify, minWidth, precision, zeroPad);
176
+ case 'o':
177
+ return formatBaseX(value, 8, prefixBaseX, leftJustify, minWidth, precision, zeroPad);
178
+ case 'x':
179
+ return formatBaseX(value, 16, prefixBaseX, leftJustify, minWidth, precision, zeroPad);
180
+ case 'X':
181
+ return formatBaseX(value, 16, prefixBaseX, leftJustify, minWidth, precision, zeroPad).toUpperCase();
182
+ case 'u':
183
+ return formatBaseX(value, 10, prefixBaseX, leftJustify, minWidth, precision, zeroPad);
184
+ case 'i':
185
+ case 'd':
186
+ number = (+value) | 0;
187
+ prefix = number < 0 ? '-' : positivePrefix;
188
+ value = prefix + pad(String(Math.abs(number)), precision, '0', false);
189
+ return justify(value, prefix, leftJustify, minWidth, zeroPad);
190
+ case 'e':
191
+ case 'E':
192
+ case 'f':
193
+ case 'F':
194
+ case 'g':
195
+ case 'G':
196
+ number = +value;
197
+ prefix = number < 0 ? '-' : positivePrefix;
198
+ method = ['toExponential', 'toFixed', 'toPrecision']['efg'.indexOf(type.toLowerCase())];
199
+ textTransform = ['toString', 'toUpperCase']['eEfFgG'.indexOf(type) % 2];
200
+ value = prefix + Math.abs(number)[method](precision);
201
+ return justify(value, prefix, leftJustify, minWidth, zeroPad)[textTransform]();
202
+ default:
203
+ return substring;
204
+ }
205
+ };
206
+
207
+ return format.replace(regex, doFormat);
208
+ };
209
+ }
210
+ })(jQuery);
includes/jquery/jquery.ui-effects/index.php ADDED
File without changes
includes/jquery/jquery.ui-effects/jquery.ui-effects-min.js ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery.effects||function(f,j){function l(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1],
2
+ 16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return m.transparent;return m[f.trim(c).toLowerCase()]}function r(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return l(b)}function n(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
3
+ a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function o(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in s||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function t(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d=
4
+ a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:f.fx.speeds[b]||f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=r(b.elem,a);b.end=l(b.end);b.colorInit=
5
+ true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var m={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,
6
+ 183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,
7
+ 165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},p=["add","remove","toggle"],s={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b,d){if(f.isFunction(b)){d=b;b=null}return this.each(function(){var e=f(this),g=e.attr("style")||" ",h=o(n.call(this)),q,u=e.attr("className");f.each(p,function(v,
8
+ i){c[i]&&e[i+"Class"](c[i])});q=o(n.call(this));e.attr("className",u);e.animate(t(h,q),a,b,function(){f.each(p,function(v,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments)})})};f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?
9
+ f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this,[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.5",save:function(c,a){for(var b=0;b<a.length;b++)a[b]!==
10
+ null&&c.data("ec.storage."+a[b],c[0].style[a[b]])},restore:function(c,a){for(var b=0;b<a.length;b++)a[b]!==null&&c.css(a[b],c.data("ec.storage."+a[b]))},setMode:function(c,a){if(a=="toggle")a=c.is(":hidden")?"show":"hide";return a},getBaseline:function(c,a){var b;switch(c[0]){case "top":b=0;break;case "middle":b=0.5;break;case "bottom":b=1;break;default:b=c[0]/a.height}switch(c[1]){case "left":c=0;break;case "center":c=0.5;break;case "right":c=1;break;default:c=c[1]/a.width}return{x:c,y:b}},createWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent();
11
+ var a={width:c.outerWidth(true),height:c.outerHeight(true),"float":c.css("float")},b=f("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});c.wrap(b);b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(d,e){a[e]=c.css(e);if(isNaN(parseInt(a[e],10)))a[e]="auto"});
12
+ c.css({position:"relative",top:0,left:0})}return b.css(a).show()},removeWrapper:function(c){if(c.parent().is(".ui-effects-wrapper"))return c.parent().replaceWith(c);return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments);a={options:a[1],duration:a[2],callback:a[3]};var b=f.effects[c];return b&&!f.fx.off?b.call(this,a):this},_show:f.fn.show,show:function(c){if(!c||
13
+ typeof c=="number"||f.fx.speeds[c]||!f.effects[c])return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(!c||typeof c=="number"||f.fx.speeds[c]||!f.effects[c])return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(!c||typeof c=="number"||f.fx.speeds[c]||!f.effects[c]||typeof c==
14
+ "boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,
15
+ a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=
16
+ e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b,d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+
17
+ b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c,a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/
18
+ 2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g))+b},easeOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*
19
+ a)*Math.sin((a*e-c)*2*Math.PI/g)+d+b},easeInOutElastic:function(c,a,b,d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e/2)==2)return b+d;g||(g=e*0.3*1.5);if(h<Math.abs(d)){h=d;c=g/4}else c=g/(2*Math.PI)*Math.asin(d/h);if(a<1)return-0.5*h*Math.pow(2,10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)+b;return h*Math.pow(2,-10*(a-=1))*Math.sin((a*e-c)*2*Math.PI/g)*0.5+d+b},easeInBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;return d*(a/=e)*a*((g+1)*a-g)+b},easeOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;
20
+ return d*((a=a/e-1)*a*((g+1)*a+g)+1)+b},easeInOutBack:function(c,a,b,d,e,g){if(g==j)g=1.70158;if((a/=e/2)<1)return d/2*a*a*(((g*=1.525)+1)*a-g)+b;return d/2*((a-=2)*a*(((g*=1.525)+1)*a+g)+2)+b},easeInBounce:function(c,a,b,d,e){return d-f.easing.easeOutBounce(c,e-a,0,d,e)+b},easeOutBounce:function(c,a,b,d,e){return(a/=e)<1/2.75?d*7.5625*a*a+b:a<2/2.75?d*(7.5625*(a-=1.5/2.75)*a+0.75)+b:a<2.5/2.75?d*(7.5625*(a-=2.25/2.75)*a+0.9375)+b:d*(7.5625*(a-=2.625/2.75)*a+0.984375)+b},easeInOutBounce:function(c,
21
+ a,b,d,e){if(a<e/2)return f.easing.easeInBounce(c,a*2,0,d,e)*0.5+b;return f.easing.easeOutBounce(c,a*2-e,0,d,e)*0.5+d*0.5+b}})}(jQuery);
22
+ ;
23
+
24
+ (function(b){b.effects.blind=function(c){return this.queue(function(){var a=b(this),g=["position","top","left"],f=b.effects.setMode(a,c.options.mode||"hide"),d=c.options.direction||"vertical";b.effects.save(a,g);a.show();var e=b.effects.createWrapper(a).css({overflow:"hidden"}),h=d=="vertical"?"height":"width";d=d=="vertical"?e.height():e.width();f=="show"&&e.css(h,0);var i={};i[h]=f=="show"?d:0;e.animate(i,c.duration,c.options.easing,function(){f=="hide"&&a.hide();b.effects.restore(a,g);b.effects.removeWrapper(a);
25
+ c.callback&&c.callback.apply(a[0],arguments);a.dequeue()})})}})(jQuery);
26
+ ;
27
+
28
+ (function(e){e.effects.bounce=function(b){return this.queue(function(){var a=e(this),l=["position","top","left"],h=e.effects.setMode(a,b.options.mode||"effect"),d=b.options.direction||"up",c=b.options.distance||20,m=b.options.times||5,i=b.duration||250;/show|hide/.test(h)&&l.push("opacity");e.effects.save(a,l);a.show();e.effects.createWrapper(a);var f=d=="up"||d=="down"?"top":"left";d=d=="up"||d=="left"?"pos":"neg";c=b.options.distance||(f=="top"?a.outerHeight({margin:true})/3:a.outerWidth({margin:true})/
29
+ 3);if(h=="show")a.css("opacity",0).css(f,d=="pos"?-c:c);if(h=="hide")c/=m*2;h!="hide"&&m--;if(h=="show"){var g={opacity:1};g[f]=(d=="pos"?"+=":"-=")+c;a.animate(g,i/2,b.options.easing);c/=2;m--}for(g=0;g<m;g++){var j={},k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing);c=h=="hide"?c*2:c/2}if(h=="hide"){g={opacity:0};g[f]=(d=="pos"?"-=":"+=")+c;a.animate(g,i/2,b.options.easing,function(){a.hide();e.effects.restore(a,l);e.effects.removeWrapper(a);
30
+ b.callback&&b.callback.apply(this,arguments)})}else{j={};k={};j[f]=(d=="pos"?"-=":"+=")+c;k[f]=(d=="pos"?"+=":"-=")+c;a.animate(j,i/2,b.options.easing).animate(k,i/2,b.options.easing,function(){e.effects.restore(a,l);e.effects.removeWrapper(a);b.callback&&b.callback.apply(this,arguments)})}a.queue("fx",function(){a.dequeue()});a.dequeue()})}})(jQuery);
31
+ ;
32
+
33
+ (function(b){b.effects.clip=function(e){return this.queue(function(){var a=b(this),i=["position","top","left","height","width"],f=b.effects.setMode(a,e.options.mode||"hide"),c=e.options.direction||"vertical";b.effects.save(a,i);a.show();var d=b.effects.createWrapper(a).css({overflow:"hidden"});d=a[0].tagName=="IMG"?d:a;var g={size:c=="vertical"?"height":"width",position:c=="vertical"?"top":"left"};c=c=="vertical"?d.height():d.width();if(f=="show"){d.css(g.size,0);d.css(g.position,c/2)}var h={};h[g.size]=
34
+ f=="show"?c:0;h[g.position]=f=="show"?0:c/2;d.animate(h,{queue:false,duration:e.duration,easing:e.options.easing,complete:function(){f=="hide"&&a.hide();b.effects.restore(a,i);b.effects.removeWrapper(a);e.callback&&e.callback.apply(a[0],arguments);a.dequeue()}})})}})(jQuery);
35
+ ;
36
+
37
+ (function(c){c.effects.drop=function(d){return this.queue(function(){var a=c(this),h=["position","top","left","opacity"],e=c.effects.setMode(a,d.options.mode||"hide"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a);var f=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var g=d.options.distance||(f=="top"?a.outerHeight({margin:true})/2:a.outerWidth({margin:true})/2);if(e=="show")a.css("opacity",0).css(f,b=="pos"?-g:g);var i={opacity:e=="show"?1:
38
+ 0};i[f]=(e=="show"?b=="pos"?"+=":"-=":b=="pos"?"-=":"+=")+g;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){e=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
39
+ ;
40
+
41
+ (function(j){j.effects.explode=function(a){return this.queue(function(){var c=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3,d=a.options.pieces?Math.round(Math.sqrt(a.options.pieces)):3;a.options.mode=a.options.mode=="toggle"?j(this).is(":visible")?"hide":"show":a.options.mode;var b=j(this).show().css("visibility","hidden"),g=b.offset();g.top-=parseInt(b.css("marginTop"),10)||0;g.left-=parseInt(b.css("marginLeft"),10)||0;for(var h=b.outerWidth(true),i=b.outerHeight(true),e=0;e<c;e++)for(var f=
42
+ 0;f<d;f++)b.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+
43
+ e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery);
44
+ ;
45
+
46
+ (function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);
47
+ ;
48
+
49
+ (function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","left"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1],10)/100*
50
+ f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery);
51
+ ;
52
+
53
+ (function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&&
54
+ this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
55
+ ;
56
+
57
+ (function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c<times;c++){b.animate({opacity:animateTo},duration,a.options.easing);animateTo=(animateTo+1)%2}b.animate({opacity:animateTo},duration,
58
+ a.options.easing,function(){animateTo==0&&b.hide();a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()}).dequeue()})}})(jQuery);
59
+ ;
60
+
61
+ (function(c){c.effects.puff=function(b){return this.queue(function(){var a=c(this),e=c.effects.setMode(a,b.options.mode||"hide"),g=parseInt(b.options.percent,10)||150,h=g/100,i={height:a.height(),width:a.width()};c.extend(b.options,{fade:true,mode:e,percent:e=="hide"?g:100,from:e=="hide"?i:{height:i.height*h,width:i.width*h}});a.effect("scale",b.options,b.duration,b.callback);a.dequeue()})};c.effects.scale=function(b){return this.queue(function(){var a=c(this),e=c.extend(true,{},b.options),g=c.effects.setMode(a,
62
+ b.options.mode||"effect"),h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:g=="hide"?0:100),i=b.options.direction||"both",f=b.options.origin;if(g!="effect"){e.origin=f||["middle","center"];e.restore=true}f={height:a.height(),width:a.width()};a.from=b.options.from||(g=="show"?{height:0,width:0}:f);h={y:i!="horizontal"?h/100:1,x:i!="vertical"?h/100:1};a.to={height:f.height*h.y,width:f.width*h.x};if(b.options.fade){if(g=="show"){a.from.opacity=0;a.to.opacity=1}if(g=="hide"){a.from.opacity=
63
+ 1;a.to.opacity=0}}e.from=a.from;e.to=a.to;e.mode=g;a.effect("size",e,b.duration,b.callback);a.dequeue()})};c.effects.size=function(b){return this.queue(function(){var a=c(this),e=["position","top","left","width","height","overflow","opacity"],g=["position","top","left","overflow","opacity"],h=["width","height","overflow"],i=["fontSize"],f=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],k=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=c.effects.setMode(a,
64
+ b.options.mode||"effect"),n=b.options.restore||false,m=b.options.scale||"both",l=b.options.origin,j={height:a.height(),width:a.width()};a.from=b.options.from||j;a.to=b.options.to||j;if(l){l=c.effects.getBaseline(l,j);a.from.top=(j.height-a.from.height)*l.y;a.from.left=(j.width-a.from.width)*l.x;a.to.top=(j.height-a.to.height)*l.y;a.to.left=(j.width-a.to.width)*l.x}var d={from:{y:a.from.height/j.height,x:a.from.width/j.width},to:{y:a.to.height/j.height,x:a.to.width/j.width}};if(m=="box"||m=="both"){if(d.from.y!=
65
+ d.to.y){e=e.concat(f);a.from=c.effects.setTransition(a,f,d.from.y,a.from);a.to=c.effects.setTransition(a,f,d.to.y,a.to)}if(d.from.x!=d.to.x){e=e.concat(k);a.from=c.effects.setTransition(a,k,d.from.x,a.from);a.to=c.effects.setTransition(a,k,d.to.x,a.to)}}if(m=="content"||m=="both")if(d.from.y!=d.to.y){e=e.concat(i);a.from=c.effects.setTransition(a,i,d.from.y,a.from);a.to=c.effects.setTransition(a,i,d.to.y,a.to)}c.effects.save(a,n?e:g);a.show();c.effects.createWrapper(a);a.css("overflow","hidden").css(a.from);
66
+ if(m=="content"||m=="both"){f=f.concat(["marginTop","marginBottom"]).concat(i);k=k.concat(["marginLeft","marginRight"]);h=e.concat(f).concat(k);a.find("*[width]").each(function(){child=c(this);n&&c.effects.save(child,h);var o={height:child.height(),width:child.width()};child.from={height:o.height*d.from.y,width:o.width*d.from.x};child.to={height:o.height*d.to.y,width:o.width*d.to.x};if(d.from.y!=d.to.y){child.from=c.effects.setTransition(child,f,d.from.y,child.from);child.to=c.effects.setTransition(child,
67
+ f,d.to.y,child.to)}if(d.from.x!=d.to.x){child.from=c.effects.setTransition(child,k,d.from.x,child.from);child.to=c.effects.setTransition(child,k,d.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){n&&c.effects.restore(child,h)})})}a.animate(a.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){a.to.opacity===0&&a.css("opacity",a.from.opacity);p=="hide"&&a.hide();c.effects.restore(a,n?e:g);c.effects.removeWrapper(a);b.callback&&
68
+ b.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
69
+ ;
70
+
71
+ (function(d){d.effects.shake=function(a){return this.queue(function(){var b=d(this),j=["position","top","left"];d.effects.setMode(b,a.options.mode||"effect");var c=a.options.direction||"left",e=a.options.distance||20,l=a.options.times||3,f=a.duration||a.options.duration||140;d.effects.save(b,j);b.show();d.effects.createWrapper(b);var g=c=="up"||c=="down"?"top":"left",h=c=="up"||c=="left"?"pos":"neg";c={};var i={},k={};c[g]=(h=="pos"?"-=":"+=")+e;i[g]=(h=="pos"?"+=":"-=")+e*2;k[g]=(h=="pos"?"-=":"+=")+
72
+ e*2;b.animate(c,f,a.options.easing);for(e=1;e<l;e++)b.animate(i,f,a.options.easing).animate(k,f,a.options.easing);b.animate(i,f,a.options.easing).animate(c,f/2,a.options.easing,function(){d.effects.restore(b,j);d.effects.removeWrapper(b);a.callback&&a.callback.apply(this,arguments)});b.queue("fx",function(){b.dequeue()});b.dequeue()})}})(jQuery);
73
+ ;
74
+
75
+ (function(c){c.effects.slide=function(d){return this.queue(function(){var a=c(this),h=["position","top","left"],e=c.effects.setMode(a,d.options.mode||"show"),b=d.options.direction||"left";c.effects.save(a,h);a.show();c.effects.createWrapper(a).css({overflow:"hidden"});var f=b=="up"||b=="down"?"top":"left";b=b=="up"||b=="left"?"pos":"neg";var g=d.options.distance||(f=="top"?a.outerHeight({margin:true}):a.outerWidth({margin:true}));if(e=="show")a.css(f,b=="pos"?-g:g);var i={};i[f]=(e=="show"?b=="pos"?
76
+ "+=":"-=":b=="pos"?"-=":"+=")+g;a.animate(i,{queue:false,duration:d.duration,easing:d.options.easing,complete:function(){e=="hide"&&a.hide();c.effects.restore(a,h);c.effects.removeWrapper(a);d.callback&&d.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery);
77
+ ;
78
+
79
+ (function(e){e.effects.transfer=function(a){return this.queue(function(){var b=e(this),c=e(a.options.to),d=c.offset();c={top:d.top,left:d.left,height:c.innerHeight(),width:c.innerWidth()};d=b.offset();var f=e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments);
80
+ b.dequeue()})})}})(jQuery);
81
+ ;
includes/{menu-pages/jquery-ui-effects.js → jquery/jquery.ui-effects/jquery.ui-effects.js} RENAMED
@@ -1,14 +1,22 @@
1
  /**
2
  * jQuery UI Effects. See {@link http://docs.jquery.com/UI/Effects/}
3
  *
4
- * This file is included with all WordPress® themes/plugins by WebSharks, Inc.
5
  *
6
- * Copyright: © 2010 {@link http://jqueryui.com/about}
 
 
 
 
 
 
 
7
  *
 
8
  * Dual licensed under the MIT or GPL Version 2 licenses.
9
  * {@link http://jquery.org/license}
10
  *
11
- * @package WebSharks\jQuery\UI Effects
12
  * @since x.xx
13
  */
14
  /*
1
  /**
2
  * jQuery UI Effects. See {@link http://docs.jquery.com/UI/Effects/}
3
  *
4
+ * Distributed with WordPress® themes/plugins by WebSharks, Inc.
5
  *
6
+ * Copyright: © 2009-2011
7
+ * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
8
+ * ( coded in the USA )
9
+ *
10
+ * Released under the terms of the GNU General Public License.
11
+ * You should have received a copy of the GNU General Public License,
12
+ * along with this software. In the main directory, see: /licensing/
13
+ * If not, see: {@link http://www.gnu.org/licenses/}.
14
  *
15
+ * Copyright: © 2010 {@link http://jqueryui.com/about}
16
  * Dual licensed under the MIT or GPL Version 2 licenses.
17
  * {@link http://jquery.org/license}
18
  *
19
+ * @package WebSharks\jQuery\Extensions
20
  * @since x.xx
21
  */
22
  /*
includes/menu-pages/down-ops.inc.php CHANGED
@@ -58,8 +58,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
58
  /**/
59
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
60
  /**/
61
- echo '<p><strong>Upload restricted files to this security-enabled directory:</strong><br /><code>' . esc_html (preg_replace ("/^" . preg_quote ($_SERVER["DOCUMENT_ROOT"], "/") . "/", "", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '</code></p>' . "\n";
62
- echo '<p>- Now, you can link to any protected file, using this special format:<br />&nbsp;&nbsp;<code>' . esc_html (site_url ("/?s2member_file_download=example-file.zip")) . '</code><br />&nbsp;&nbsp;<small><em><strong>s2member_file_download</strong> = location of the file, relative to the /' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/ directory. In other words, just the file name.</em></small></p>' . "\n";
63
  /**/
64
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
65
  /**/
@@ -86,8 +86,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
86
  echo '<tr>' . "\n";
87
  /**/
88
  echo '<td>' . "\n";
89
- 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; }" /> days.<br />' . "\n";
90
- echo 'Only this many unique downloads ( <code><em>999999999 = unlimited</em></code> ) will be permitted every X days.' . "\n";
91
  echo '</td>' . "\n";
92
  /**/
93
  echo '</tr>' . "\n";
@@ -112,7 +112,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
112
  /**/
113
  echo '<div class="ws-menu-page-section ws-plugin--s2member-limit-exceeded-page-section">' . "\n";
114
  echo '<h3>Download Limit Exceeded Page ( required, if providing access to protected files )</h3>' . "\n";
115
- echo '<p>This Page will be shown if a Member reaches their download limit, based on the configuration you\'ve specified in the fields above. This Page should be created by you, in WordPress®. This Page should provide an informative message to the Member, describing your file access restrictions. Just tell them a little bit about your policy on file downloads, and why they might have reached this Page.</p>' . "\n";
116
  do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_limit_exceeded_page", get_defined_vars ());
117
  /**/
118
  echo '<table class="form-table">' . "\n";
@@ -134,7 +134,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
134
  foreach (($ws_plugin__s2member_temp_a = array_merge ((array)get_pages ())) as $ws_plugin__s2member_temp_o)
135
  echo '<option value="' . esc_attr ($ws_plugin__s2member_temp_o->ID) . '"' . (($ws_plugin__s2member_temp_o->ID == $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"]) ? ' selected="selected"' : '') . '>' . esc_html ($ws_plugin__s2member_temp_o->post_title) . '</option>' . "\n";
136
  echo '</select><br />' . "\n";
137
- echo 'Please choose a Page that Members will see if they reach their file download limit. This Page should provide an informative message to the Member, describing your file access restrictions. Just tell them a little bit about your policy on file downloads. We recommend the following title: <code>Download Limit Exceeded</code>.' . "\n";
138
  echo '</td>' . "\n";
139
  /**/
140
  echo '</tr>' . "\n";
@@ -155,14 +155,21 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
155
  /**/
156
  echo '<div class="ws-menu-page-section ws-plugin--s2member-restrictions-section">' . "\n";
157
  echo '<h3>Advanced Download Restrictions ( optional, for greater flexibility )</h3>' . "\n";
158
- echo '<p>By default, s2Member uses your Basic Download Restrictions, as configured above. However, you can force s2Member to allow File Downloads, using an extra query string parameter ( <code>s2member_file_download_key</code> ). A File Download `Key` is passed through this parameter, and it tells s2Member to allow the download of this particular file, regardless of Membership Level; and WITHOUT checking any Basic Restrictions, that you may, or may not, have configured above. The creation of a File Download `Key`, requires a small PHP code snippet. In order to use PHP scripting inside your Posts/Pages, you\'ll need to install this handy plugin ( <a href="http://wordpress.org/extend/plugins/php-execution-plugin/" target="_blank" rel="external">PHP Execution</a> ).</p>' . "\n";
159
- echo '<p>' . esc_html (site_url ("/?s2member_file_download=example-file.zip")) . '<code>&amp;s2member_file_download_key=&lt;?php echo s2member_file_download_key("example-file.zip"); ?&gt;</code><br />&nbsp;&nbsp;<small><em><strong>s2member_file_download_key</strong> = &lt;?php echo s2member_file_download_key("location of the file, relative to the /' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/ directory"); ?&gt;</em></small></p>' . "\n";
160
  do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_advanced_restrictions", get_defined_vars ());
161
  /**/
162
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
163
  /**/
164
- echo '<p>The function `<code>s2member_file_download_key()</code>`, is part of the s2Member API. It produces a time-sensitive File Download Key that is unique to each and every visitor. Each Key it produces ( at the time it is produced ), will be valid for the current day, and only for a specific IP address and User-Agent string; as detected by s2Member. This makes it possible for you to create links on your site, which provide access to protected file downloads; and without having to worry about one visitor sharing their link with another. So let\'s take a quick look at what <code>s2member_file_download_key()</code> actually produces.</p>' . "\n";
165
- echo '<p><code>s2member_file_download_key ("example-file.zip")</code> = a site-specific hash of <em>s2member_xencrypt(date("Y-m-d") . $_SERVER["REMOTE_ADDR"] . $_SERVER["HTTP_USER_AGENT"] . $file)</em></p>' . "\n";
 
 
 
 
 
 
 
 
166
  echo '<p>When <code>s2member_file_download_key = <em>a valid Key</em></code>, it works independently from Member Level Access. That is, a visitor does NOT have to be logged in to receive access; they just need a valid Key. Using this advanced technique, you could extend s2Member\'s file protection routines, or even combine them with Specific Post/Page Access, and more. The possibilities are limitless really.</p>' . "\n";
167
  /**/
168
  echo '</div>' . "\n";
@@ -239,8 +246,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
239
  echo '<div class="ws-menu-page-section ws-plugin--s2member-inline-extensions-section">' . "\n";
240
  echo '<h3>Amazon® S3/CDN Storage &amp; Delivery ( optional )</h3>' . "\n";
241
  echo '<a href="http://aws.amazon.com/s3/" target="_blank"><img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/amazon-logo.png" class="ws-menu-page-right" style="width:250px; height:100px; border:0;" alt="." /></a>' . "\n";
242
- echo '<p>Amazon® Simple Storage Service ( <a href="http://aws.amazon.com/s3/" target="_blank" rel="external">Amazon® S3</a> ). Amazon® S3 is storage for the Internet. It is designed to make web-scale computing easier for developers. Amazon® S3 provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web. It gives developers access to the same highly scalable, reliable, secure, fast, inexpensive infrastructure that Amazon® uses to run its own global network of web sites. s2Member has been integrated with Amazon® S3, so that <em>( if you wish )</em>, instead of using the <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory, you can store all of your protected files inside an Amazon® S3 Bucket.</p>' . "\n";
243
- echo '<p>If you configure the options below, s2Member will assume all protected files are inside your Amazon® S3 Bucket; and the <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory is no longer used at all. That being said, all other aspects of s2Member\'s File Download protection remain the same. The only thing that changes, is the location of your protected Files. In other words, Basic Download Restrictions, Download Keys, Inline Extensions, Custom Capability and/or Membership Level Files will all continue to work just as before. The only difference is that s2Member will use your Amazon® S3 Bucket as a CDN <em>( i.e. Content Delivery Network )</em> instead of the local <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory.</p>' . "\n";
244
  echo '<p>s2Member assumes that you\'re creating a new Amazon® S3 Bucket, specifically for this installation; and that your Bucket is NOT available publicly. In other words, if you type this URL into your browser ( i.e. <code>http://s3.amazonaws.com/your-bucket-name/</code> ), you should get an error that says: <code>Access Denied</code>. That\'s good, that\'s exactly what you want. You can create your Amazon® S3 Bucket using the <a href="https://console.aws.amazon.com/s3/home" target="_blank" rel="external">Amazon® interface</a>. Or, some people prefer to use this popular Firefox® extension ( <a href="http://www.s3fox.net/" target="_blank" rel="external">S3 Fox Organizer</a> ).</p>' . "\n";
245
  do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_amazon_s3", get_defined_vars ());
246
  /**/
@@ -265,7 +272,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
265
  /**/
266
  echo '<td>' . "\n";
267
  echo '<input type="text" name="ws_plugin__s2member_amazon_s3_files_bucket" id="ws-plugin--s2member-amazon-s3-files-bucket" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"]) . '" /><br />' . "\n";
268
- echo 'Your Amazon® S3 Bucket will be used, instead of the <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory.' . "\n";
269
  echo '</td>' . "\n";
270
  /**/
271
  echo '</tr>' . "\n";
@@ -298,7 +305,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
298
  echo '<tr>' . "\n";
299
  /**/
300
  echo '<td>' . "\n";
301
- echo '<input type="text" name="ws_plugin__s2member_amazon_s3_files_secret_key" id="ws-plugin--s2member-amazon-s3-files-secret-key" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_secret_key"]) . '" /><br />' . "\n";
302
  echo 'See: <code>Amazon® Web Services -> Account -> Security Credentials</code>.' . "\n";
303
  echo '</td>' . "\n";
304
  /**/
@@ -312,6 +319,30 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
312
  do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_after_inline_extensions", get_defined_vars ());
313
  }
314
  /**/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
315
  do_action ("ws_plugin__s2member_during_down_ops_page_after_left_sections", get_defined_vars ());
316
  /**/
317
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
58
  /**/
59
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
60
  /**/
61
+ echo '<p><strong>Upload restricted files to this security-enabled directory:</strong><br /><code>' . esc_html (c_ws_plugin__s2member_utils_dirs::doc_root_path ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '</code></p>' . "\n";
62
+ echo '<p>- Now, you can link to any protected file, using this special format:<br />&nbsp;&nbsp;<code>' . esc_html (site_url ("/?s2member_file_download=example-file.zip")) . '</code><br />&nbsp;&nbsp;<small><em><strong>s2member_file_download</strong> = file, relative to the /' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/ directory. In other words, just the file name.</em></small></p>' . "\n";
63
  /**/
64
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
65
  /**/
86
  echo '<tr>' . "\n";
87
  /**/
88
  echo '<td>' . "\n";
89
+ 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";
90
+ echo 'Only this many unique downloads ( <code><em>999999999 = unlimited</em></code> ) will be permitted every X day(s).' . "\n";
91
  echo '</td>' . "\n";
92
  /**/
93
  echo '</tr>' . "\n";
112
  /**/
113
  echo '<div class="ws-menu-page-section ws-plugin--s2member-limit-exceeded-page-section">' . "\n";
114
  echo '<h3>Download Limit Exceeded Page ( required, if providing access to protected files )</h3>' . "\n";
115
+ echo '<p>This Page will be shown when/if a Member reaches their download limit, based on your configuration of <strong>Basic Download Restrictions</strong> above. This Page should be created by you, in WordPress®. This Page should provide an informative message to the Member, describing your file access restrictions. Just tell them a little bit about your policy on file downloads, and why they might have reached this Page.</p>' . "\n";
116
  do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_limit_exceeded_page", get_defined_vars ());
117
  /**/
118
  echo '<table class="form-table">' . "\n";
134
  foreach (($ws_plugin__s2member_temp_a = array_merge ((array)get_pages ())) as $ws_plugin__s2member_temp_o)
135
  echo '<option value="' . esc_attr ($ws_plugin__s2member_temp_o->ID) . '"' . (($ws_plugin__s2member_temp_o->ID == $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"]) ? ' selected="selected"' : '') . '>' . esc_html ($ws_plugin__s2member_temp_o->post_title) . '</option>' . "\n";
136
  echo '</select><br />' . "\n";
137
+ echo 'We recommend the following title: <code>Download Limit Exceeded</code>.' . "\n";
138
  echo '</td>' . "\n";
139
  /**/
140
  echo '</tr>' . "\n";
155
  /**/
156
  echo '<div class="ws-menu-page-section ws-plugin--s2member-restrictions-section">' . "\n";
157
  echo '<h3>Advanced Download Restrictions ( optional, for greater flexibility )</h3>' . "\n";
158
+ echo '<p>By default, s2Member uses your Basic Download Restrictions, as configured above. However, you can force s2Member to allow File Downloads, using an extra query string parameter: <code>&amp;s2member_file_download_key=[Key]</code>. A File Download `Key` is passed through this parameter; it tells s2Member to allow the download of this particular file, regardless of Membership Level; and WITHOUT checking any Basic Restrictions, that you may or may not have configured above. The creation of a File Download `Key`, requires a small PHP code snippet. In order to use PHP scripting inside your Posts/Pages, you\'ll need to install this handy plugin ( <a href="http://wordpress.org/extend/plugins/php-execution-plugin/" target="_blank" rel="external">PHP Execution</a> ). There is also a Shortcode equivalent, which does NOT require PHP at all, as seen below.</p>' . "\n";
 
159
  do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_advanced_restrictions", get_defined_vars ());
160
  /**/
161
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
162
  /**/
163
+ echo '<p>' . esc_html (site_url ("/?s2member_file_download=example-file.zip")) . '<code>&amp;s2member_file_download_key=&lt;?php echo s2member_file_download_key("example-file.zip"); ?&gt;</code><br />&nbsp;&nbsp;<small><em><strong>s2member_file_download_key</strong> = &lt;?php echo s2member_file_download_key("file, relative to the /' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/ directory"); ?&gt;</em></small></p>' . "\n";
164
+ /**/
165
+ echo '<div class="ws-menu-page-hr"></div>' . "\n";
166
+ /**/
167
+ echo '<p>' . esc_html (site_url ("/?s2member_file_download=example-file.zip")) . '<code>&amp;s2member_file_download_key=[s2Key file_download="example-file.zip" /]</code><br />&nbsp;&nbsp;<small><em><strong>Shortcode equivalent:</strong> <code>[s2Key file_download="example-file.zip" /]</code></em></small></p>' . "\n";
168
+ /**/
169
+ echo '<div class="ws-menu-page-hr"></div>' . "\n";
170
+ /**/
171
+ echo '<p>The function <a href="http://www.primothemes.com/forums/viewtopic.php?f=40&t=12453#src_doc_s2member_file_download_key%28%29" target="_blank" rel="external">s2member_file_download_key()</a>, is part of the s2Member API. It produces a time-sensitive File Download Key that is unique to each and every visitor. Each Key it produces <em>( at the time it is produced )</em>, will be valid for the current day, and only for a specific IP address and User-Agent string; as detected by s2Member. This makes it possible for you to create links on your site, which provide access to protected file downloads; and without having to worry about one visitor sharing their link with another. So let\'s take a quick look at what <code>s2member_file_download_key()</code> actually produces.</p>' . "\n";
172
+ echo '<p><code>s2member_file_download_key("example-file.zip")</code> = a site-specific hash of: <code>date("Y-m-d").$_SERVER["REMOTE_ADDR"].$_SERVER["HTTP_USER_AGENT"].$file</code></p>' . "\n";
173
  echo '<p>When <code>s2member_file_download_key = <em>a valid Key</em></code>, it works independently from Member Level Access. That is, a visitor does NOT have to be logged in to receive access; they just need a valid Key. Using this advanced technique, you could extend s2Member\'s file protection routines, or even combine them with Specific Post/Page Access, and more. The possibilities are limitless really.</p>' . "\n";
174
  /**/
175
  echo '</div>' . "\n";
246
  echo '<div class="ws-menu-page-section ws-plugin--s2member-inline-extensions-section">' . "\n";
247
  echo '<h3>Amazon® S3/CDN Storage &amp; Delivery ( optional )</h3>' . "\n";
248
  echo '<a href="http://aws.amazon.com/s3/" target="_blank"><img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/amazon-logo.png" class="ws-menu-page-right" style="width:250px; height:100px; border:0;" alt="." /></a>' . "\n";
249
+ echo '<p>Amazon® Simple Storage Service ( <a href="http://aws.amazon.com/s3/" target="_blank" rel="external">Amazon® S3</a> ). Amazon® S3 is storage for the Internet. It is designed to make web-scale computing easier for developers. Amazon® S3 provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web. It gives developers access to the same highly scalable, reliable, secure, fast, inexpensive infrastructure that Amazon® uses to run its own global network of web sites. s2Member has been integrated with Amazon® S3, so that <em>( if you wish )</em>, instead of using the <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory, you can store all of your protected files inside an Amazon® S3 Bucket.</p>' . "\n";
250
+ echo '<p>If you configure the options below, s2Member will assume all protected files are inside your Amazon® S3 Bucket; and the <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory is no longer used at all. That being said, all other aspects of s2Member\'s File Download protection remain the same. The only thing that changes, is the location of your protected Files. In other words, Basic Download Restrictions, Download Keys, Inline Extensions, Custom Capability and/or Membership Level Files will all continue to work just as before. The only difference is that s2Member will use your Amazon® S3 Bucket as a CDN <em>( i.e. Content Delivery Network )</em> instead of the local <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory.</p>' . "\n";
251
  echo '<p>s2Member assumes that you\'re creating a new Amazon® S3 Bucket, specifically for this installation; and that your Bucket is NOT available publicly. In other words, if you type this URL into your browser ( i.e. <code>http://s3.amazonaws.com/your-bucket-name/</code> ), you should get an error that says: <code>Access Denied</code>. That\'s good, that\'s exactly what you want. You can create your Amazon® S3 Bucket using the <a href="https://console.aws.amazon.com/s3/home" target="_blank" rel="external">Amazon® interface</a>. Or, some people prefer to use this popular Firefox® extension ( <a href="http://www.s3fox.net/" target="_blank" rel="external">S3 Fox Organizer</a> ).</p>' . "\n";
252
  do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_amazon_s3", get_defined_vars ());
253
  /**/
272
  /**/
273
  echo '<td>' . "\n";
274
  echo '<input type="text" name="ws_plugin__s2member_amazon_s3_files_bucket" id="ws-plugin--s2member-amazon-s3-files-bucket" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"]) . '" /><br />' . "\n";
275
+ echo 'Your Amazon® S3 Bucket will be used, instead of the <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory.' . "\n";
276
  echo '</td>' . "\n";
277
  /**/
278
  echo '</tr>' . "\n";
305
  echo '<tr>' . "\n";
306
  /**/
307
  echo '<td>' . "\n";
308
+ echo '<input type="password" name="ws_plugin__s2member_amazon_s3_files_secret_key" id="ws-plugin--s2member-amazon-s3-files-secret-key" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_secret_key"]) . '" /><br />' . "\n";
309
  echo 'See: <code>Amazon® Web Services -> Account -> Security Credentials</code>.' . "\n";
310
  echo '</td>' . "\n";
311
  /**/
319
  do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_after_inline_extensions", get_defined_vars ());
320
  }
321
  /**/
322
+ if (apply_filters ("ws_plugin__s2member_during_down_ops_page_during_left_sections_display_rewrite_linkage", true, get_defined_vars ()))
323
+ {
324
+ do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_before_rewrite_linkage", get_defined_vars ());
325
+ /**/
326
+ echo '<div class="ws-menu-page-group" title="Advanced Mod-Rewrite Linkage">' . "\n";
327
+ /**/
328
+ echo '<div class="ws-menu-page-section ws-plugin--s2member-rewrite-linkage-section">' . "\n";
329
+ echo '<h3>Advanced Mod-Rewrite Linkage</h3>' . "\n";
330
+ echo '<p>s2Member automatically creates <code>mod_rewrite</code> rules inside your <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory, which provide additional flexibility in the way protected files can be served to your Customers. With s2Member\'s <code>mod_rewrite</code> rules, it is now possible to link directly to a protected file, avoiding the use of query string variables <em>( it\'s completely optional though, i.e. NOT required )</em>.</p>' . "\n";
331
+ echo '<p>This new flexibility may come in handy for site owners serving files through media playback devices that have issues with query string variables. For instance, it is now possible to link to an s2Member-protected file directly, like this: <code>... /wp-content/plugins/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/example-file.zip</code> instead of <code>... /?s2member_file_download=example-file.zip</code>. Either way works, but the direct link might be easier for some.</p>' . "\n";
332
+ echo '<p>It is also possible to pass query string parameters through a direct link:<br /><code>... /wp-content/plugins/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/example-file.zip?s2member_file_inline=yes&amp;s2member_file_download_key=[key]</code>.</p>' . "\n";
333
+ echo '<p>That being said, s2Member\'s <code>mod_rewrite</code> rules allow for more advanced control over s2Member-specific parameters.</p>' . "\n";
334
+ echo '<p>For example, you could just do this for inline files:<br /><code>... /wp-content/plugins/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '<strong class="ws-menu-page-hilite">/s2member-file-inline</strong>/example-file.zip</code></p>' . "\n";
335
+ echo '<p>Or, if you really want to get advanced, you could do something like this:<br /><code>... /wp-content/plugins/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '<strong class="ws-menu-page-hilite">/s2member-file-inline-[yes|no]/s2member-file-download-key-[key]</strong>/example-file.zip</code></p>' . "\n";
336
+ echo '<p>Or even this, if you\'re using Remote Header Authorization:<br /><code>... /wp-content/plugins/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '<strong class="ws-menu-page-hilite">/s2member-file-remote</strong>/example-file.zip</code></p>' . "\n";
337
+ echo '<p><em>* Note, the order of your s2Member-specific parameters with Advanced Mod-Rewrite Linkage is irrelevant. Feel free to add/remove, or even change the order. Everything discussed here is also Multisite compatible. Everything discussed here is also compatible when/if combined with Amazon® S3/CDN Storage. However, NONE of this will work on servers that do NOT support <code>mod_rewrite</code>. Almost all web servers do though.</em></p>' . "\n";
338
+ do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_rewrite_linkage", get_defined_vars ());
339
+ echo '</div>' . "\n";
340
+ /**/
341
+ echo '</div>' . "\n";
342
+ /**/
343
+ do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_after_rewrite_linkage", get_defined_vars ());
344
+ }
345
+ /**/
346
  do_action ("ws_plugin__s2member_during_down_ops_page_after_left_sections", get_defined_vars ());
347
  /**/
348
  echo '<div class="ws-menu-page-hr"></div>' . "\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
  {
@@ -71,7 +71,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_els_ops"))
71
  echo '<tr>' . "\n";
72
  /**/
73
  echo '<td>' . "\n";
74
- echo '<input type="text" name="ws_plugin__s2member_mailchimp_api_key" id="ws-plugin--s2member-mailchimp-api-key" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mailchimp_api_key"]) . '" /><br />' . "\n";
75
  echo 'Once you have a MailChimp® account, you\'ll need to <a href="https://admin.mailchimp.com/account/api/" target="_blank" rel="external">add an API Key</a>.' . "\n";
76
  echo '</td>' . "\n";
77
  /**/
@@ -244,16 +244,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_els_ops"))
244
  echo '<td>' . "\n";
245
  echo '<div class="ws-menu-page-scrollbox" style="height:150px;">' . "\n";
246
  echo '<input type="hidden" name="ws_plugin__s2member_custom_reg_auto_opt_outs[]" value="update-signal" />' . "\n";
247
- foreach (array (/**/
248
- "removal-deletion" => "<strong>Anytime a User is deleted ( including manual deletions )</strong>",/**/
249
- "ipn-refund-reversal-deletion" => "&#9492;&#9472; Anytime s2Member deletes an account because of a Refund/Reversal.",/**/
250
- "(ipn|auto-eot)-cancellation-expiration-deletion" => "&#9492;&#9472; Anytime s2Member deletes an account because of a Cancellation/Expiration.",/**/
251
- /**/
252
- "modification" => "<strong>Anytime a User's Role changes ( including manual changes )</strong>",/**/
253
- "ipn-refund-reversal-demotion" => "&#9492;&#9472; Anytime s2Member demotes an account because of a Refund/Reversal.",/**/
254
- "(ipn|auto-eot)-cancellation-expiration-demotion" => "&#9492;&#9472; Anytime s2Member demotes an account because of a Cancellation/Expiration.",/**/
255
- "ipn-upgrade-downgrade" => "&#9492;&#9472; Anytime s2Member changes a User's Role after a paid Subscr. Modification.",/**/
256
- ) as $ws_plugin__s2member_temp_s_value => $ws_plugin__s2member_temp_s_label)
257
  echo '<input type="checkbox" name="ws_plugin__s2member_custom_reg_auto_opt_outs[]" id="ws-plugin--s2member-custom-reg-auto-opt-outs-' . 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_auto_opt_outs"])) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-custom-reg-auto-opt-outs-' . esc_attr (preg_replace ("/[^a-z0-9_\-]/", "-", $ws_plugin__s2member_temp_s_value)) . '">' . $ws_plugin__s2member_temp_s_label . '</label><br />' . "\n";
258
  echo '</div>' . "\n";
259
  echo '</td>' . "\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
  {
71
  echo '<tr>' . "\n";
72
  /**/
73
  echo '<td>' . "\n";
74
+ echo '<input type="password" name="ws_plugin__s2member_mailchimp_api_key" id="ws-plugin--s2member-mailchimp-api-key" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mailchimp_api_key"]) . '" /><br />' . "\n";
75
  echo 'Once you have a MailChimp® account, you\'ll need to <a href="https://admin.mailchimp.com/account/api/" target="_blank" rel="external">add an API Key</a>.' . "\n";
76
  echo '</td>' . "\n";
77
  /**/
244
  echo '<td>' . "\n";
245
  echo '<div class="ws-menu-page-scrollbox" style="height:150px;">' . "\n";
246
  echo '<input type="hidden" name="ws_plugin__s2member_custom_reg_auto_opt_outs[]" value="update-signal" />' . "\n";
247
+ foreach (array ("removal-deletion" => "<strong>Anytime a User is deleted ( including manual deletions )</strong>", "ipn-refund-reversal-deletion" => "&#9492;&#9472; Anytime s2Member deletes an account because of a Refund/Reversal.", "(ipn|auto-eot)-cancellation-expiration-deletion" => "&#9492;&#9472; Anytime s2Member deletes an account because of a Cancellation/Expiration.", "modification" => "<strong>Anytime a User's Role changes ( including manual changes )</strong>", "ipn-refund-reversal-demotion" => "&#9492;&#9472; Anytime s2Member demotes an account because of a Refund/Reversal.", "(ipn|auto-eot)-cancellation-expiration-demotion" => "&#9492;&#9472; Anytime s2Member demotes an account because of a Cancellation/Expiration.", "ipn-upgrade-downgrade" => "&#9492;&#9472; Anytime s2Member changes a User's Role after a paid Subscr. Modification.") as $ws_plugin__s2member_temp_s_value => $ws_plugin__s2member_temp_s_label)
 
 
 
 
 
 
 
 
 
248
  echo '<input type="checkbox" name="ws_plugin__s2member_custom_reg_auto_opt_outs[]" id="ws-plugin--s2member-custom-reg-auto-opt-outs-' . 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_auto_opt_outs"])) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-custom-reg-auto-opt-outs-' . esc_attr (preg_replace ("/[^a-z0-9_\-]/", "-", $ws_plugin__s2member_temp_s_value)) . '">' . $ws_plugin__s2member_temp_s_label . '</label><br />' . "\n";
249
  echo '</div>' . "\n";
250
  echo '</td>' . "\n";
includes/menu-pages/gen-ops.inc.php CHANGED
@@ -129,6 +129,25 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
129
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_security", get_defined_vars ());
130
  }
131
  /**/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  if (apply_filters ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_s_badge_wp_footer_code", true, get_defined_vars ()))
133
  {
134
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_s_badge_wp_footer_code", get_defined_vars ());
@@ -1200,7 +1219,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
1200
  echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["force_admin_lockouts"]) ? ' selected="selected"' : '') . '>No ( I want to use the WordPress® default methodologies )</option>' . "\n";
1201
  echo '<option value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["force_admin_lockouts"]) ? ' selected="selected"' : '') . '>Yes ( redirect to Login Welcome Page; locking all /wp-admin/ areas )</option>' . "\n";
1202
  echo '</select><br />' . "\n";
1203
- echo 'Recommended setting ( <code>Yes</code> ). <em><strong>*Note*</strong> When this 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 ).</em>' . "\n";
1204
  echo '</td>' . "\n";
1205
  /**/
1206
  echo '</tr>' . "\n";
129
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_security", get_defined_vars ());
130
  }
131
  /**/
132
+ if (apply_filters ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_localhost_info", (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site () || is_super_admin ()), get_defined_vars ()))
133
+ {
134
+ do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_localhost_info", get_defined_vars ());
135
+ /**/
136
+ echo '<div class="ws-menu-page-group" title="Localhost WAMP/MAMP Developers">' . "\n";
137
+ /**/
138
+ echo '<div class="ws-menu-page-section ws-plugin--s2member-localhost-info-section">' . "\n";
139
+ echo '<h3>Localhost WAMP/MAMP Installs ( are you a developer? )</h3>' . "\n";
140
+ echo '<p>If you\'re developing your site in a <code>localhost</code> environment, running something like WAMP/MAMP, or <a href="http://www.easyphp.org/" target="_blank" rel="external">EasyPHP</a>, please 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;">"LOCALHOST"</span>, <span style="color:#0000BB;">true</span><span style="color:#007700;">);</span></code>.</p>' . "\n";
141
+ echo '<p>This lets s2Member know definitively that your site is in a <code>localhost</code> environment. s2Member will adjust itself accordingly, maximizing functionality during your developement. s2Member can usually auto-detect this, but in cases where your <code>localhost</code> installation runs on something other than <code>127.0.0.1/localhost</code>, you need to tell s2Member definitively, by adding that line to your <code>/wp-config.php</code> file. For instance, s2Member needs to know when your server IP is the same as all User IPs.</p>' . "\n";
142
+ echo '<p><em>Once your site goes live, please remove the line. If you\'re already on a live server connected to the web, please ignore this section.</em></p>' . "\n";
143
+ do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_localhost_info", get_defined_vars ());
144
+ echo '</div>' . "\n";
145
+ /**/
146
+ echo '</div>' . "\n";
147
+ /**/
148
+ do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_localhost_info", get_defined_vars ());
149
+ }
150
+ /**/
151
  if (apply_filters ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_s_badge_wp_footer_code", true, get_defined_vars ()))
152
  {
153
  do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_s_badge_wp_footer_code", get_defined_vars ());
1219
  echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["force_admin_lockouts"]) ? ' selected="selected"' : '') . '>No ( I want to use the WordPress® default methodologies )</option>' . "\n";
1220
  echo '<option value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["force_admin_lockouts"]) ? ' selected="selected"' : '') . '>Yes ( redirect to Login Welcome Page; locking all /wp-admin/ areas )</option>' . "\n";
1221
  echo '</select><br />' . "\n";
1222
+ echo 'Recommended setting ( <code>Yes</code> ). <em><strong>*Note*</strong> When this 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.</em>' . "\n";
1223
  echo '</td>' . "\n";
1224
  /**/
1225
  echo '</tr>' . "\n";
includes/menu-pages/integrations.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_integrations"))
21
  {
@@ -96,7 +96,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_integrations"))
96
  /**/
97
  echo '<td>' . "\n";
98
  echo '<input type="text" name="ws_plugin__s2member_bridge_bbpress_plugins_dir" id="ws_plugin--s2member-bridge-bbpress-plugins-dir" value="' . format_to_edit ($_POST["ws_plugin__s2member_bridge_bbpress_plugins_dir"]) . '" /><br />' . "\n";
99
- echo 'Something like: <code>' . esc_html (untrailingslashit ($_SERVER["DOCUMENT_ROOT"]) . "/bbpress/my-plugins") . '</code>' . "\n";
100
  echo '</td>' . "\n";
101
  /**/
102
  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_integrations"))
21
  {
96
  /**/
97
  echo '<td>' . "\n";
98
  echo '<input type="text" name="ws_plugin__s2member_bridge_bbpress_plugins_dir" id="ws_plugin--s2member-bridge-bbpress-plugins-dir" value="' . format_to_edit ($_POST["ws_plugin__s2member_bridge_bbpress_plugins_dir"]) . '" /><br />' . "\n";
99
+ echo 'Something like: <code>' . esc_html (rtrim ($_SERVER["DOCUMENT_ROOT"], DIRECTORY_SEPARATOR . "/") . "/bbpress/my-plugins") . '</code>' . "\n";
100
  echo '</td>' . "\n";
101
  /**/
102
  echo '</tr>' . "\n";
includes/menu-pages/js-c-warning.inc.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * JS conflict warning for Menu Pages.
4
+ *
5
+ * Copyright: © 2009-2011
6
+ * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
+ * ( coded in the USA )
8
+ *
9
+ * Released under the terms of the GNU General Public License.
10
+ * You should have received a copy of the GNU General Public License,
11
+ * along with this software. In the main directory, see: /licensing/
12
+ * If not, see: {@link http://www.gnu.org/licenses/}.
13
+ *
14
+ * @package s2Member\Menu_Pages
15
+ * @since 110912
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_pages_js_c_warning"))
21
+ {
22
+ /**
23
+ * Newsletter/Feed Boxes for Menu Pages.
24
+ *
25
+ * @package s2Member\Menu_Pages
26
+ * @since 110531
27
+ */
28
+ class c_ws_plugin__s2member_menu_pages_js_c_warning
29
+ {
30
+ public function __construct ()
31
+ {
32
+ echo '<p style="margin-top:0;"><strong>Dashboard JavaScript Conflict</strong></p>' . "\n";
33
+ echo '<p>Something is conflicting with the jQuery JavaScript framework, which s2Member® uses; causing this warning to be visible to you.</p>' . "\n";
34
+ echo '<p style="margin-bottom:0;">Please deactivate one other plugin at a time until you find the culprit. Or, in Firefox®, see <code>Tools -> Error Console</code>.</p>';
35
+ }
36
+ }
37
+ }
38
+ /**/
39
+ new c_ws_plugin__s2member_menu_pages_js_c_warning ();
40
+ ?>
includes/menu-pages/menu-pages-min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(b){var a=b("div.ws-menu-page-group");a.each(function(e){var g=b(this),d="<ins>+</ins>",f=g,h=b.trim(f.attr("title"));var c=b('<div class="ws-menu-page-group-header">'+d+h+"</div>");c.css({"z-index":100-e});c.insertBefore(f),f.hide(),c.click(function(){var k=b(this),j=b("ins",k),i=k.next();if(i.css("display")==="none"){k.addClass("open"),j.html("-"),i.show()}else{k.removeClass("open"),j.html("+"),i.hide()}return false});if(a.length>1&&e===0){b('<div class="ws-menu-page-groups-show">+</div>').insertBefore(c).click(function(){b("div.ws-menu-page-group-header").each(function(){var k=b(this),j=b("ins",k),i=k.next();k.addClass("open"),j.html("-"),i.show();return});return false});b('<div class="ws-menu-page-groups-hide">-</div>').insertBefore(c).click(function(){b("div.ws-menu-page-group-header").each(function(){var k=b(this),j=b("ins",k),i=k.next();k.removeClass("open"),j.html("+"),i.hide();return});return false})}if(f.attr("default-state")==="open"){c.trigger("click")}return});if(a.length>1){b("div.ws-menu-page-group-header:first").css({"margin-right":"140px"});b("div.ws-menu-page-group:first").css({"margin-right":"145px"})}b("div.ws-menu-page-r-group-header").click(function(){var d=b(this),c=d.next("div.ws-menu-page-r-group");if(c.css("display")==="none"){b("ins",d).html("-"),d.addClass("open"),c.show()}else{b("ins",d).html("+"),d.removeClass("open");c.hide()}return false});b("div.ws-menu-page-group-header:first, div.ws-menu-page-r-group-header:first").css({"margin-top":"0"});b("div.ws-menu-page-group > div.ws-menu-page-section:first-child > h3").css({"margin-top":"0"});b("div.ws-menu-page-readme > div.readme > div.section:last-child").css({"border-bottom-width":"0"});b("input.ws-menu-page-media-btn").filter(function(){return(b(this).attr("rel"))?true:false}).click(function(){var c=b(this);window.send_to_editor=function(g){var h,f,d=b.trim(c.attr("rel"));if(d&&(h=b("input#"+d)).length>0){var e=h.css("background-color"),i=b.trim(b(g).attr("src"));i=(!i)?b.trim(b("img",g).attr("src")):i;h.val(i),h.css({"background-color":"#FFFFCC"}),setTimeout(function(){h.css({"background-color":e})},2000);tb_remove();return}else{if(d&&(f=b("textarea#"+d)).length>0){var e=f.css("background-color"),i=b.trim(b(g).attr("src"));i=(!i)?b.trim(b("img",g).attr("src")):i;f.val(b.trim(f.val())+"\n"+i),f.css({"background-color":"#FFFFCC"}),setTimeout(function(){f.css({"background-color":e})},2000);tb_remove();return}}};tb_show("","./media-upload.php?type=image&TB_iframe=true");return false});b("form#ws-mlist-form").submit(function(){var c="";if(!b.trim(b("input#ws-mlist-fname").val())){c+="First Name missing, please try again.\n\n"}if(!b.trim(b("input#ws-mlist-lname").val())){c+="Last Name missing, please try again.\n\n"}if(!b.trim(b("input#ws-mlist-email").val())){c+="Email missing, please try again.\n\n"}else{if(!b("input#ws-mlist-email").val().match(/^([a-z_~0-9\+\-]+)(((\.?)([a-z_~0-9\+\-]+))*)(@)([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){c+="Invalid email address, please try again.\n\n"}}if(c=b.trim(c)){alert("— Oops, you missed something: —\n\n"+c);return false}return true})});
1
+ jQuery(document).ready(function(b){b("div#ws-menu-page-js-c-w").hide();var a=b("div.ws-menu-page-group");a.each(function(e){var g=b(this),d="<ins>+</ins>",f=g,h=b.trim(f.attr("title"));var c=b('<div class="ws-menu-page-group-header">'+d+h+"</div>");c.css({"z-index":100-e});c.insertBefore(f),f.hide(),c.click(function(){var k=b(this),j=b("ins",k),i=k.next();if(i.css("display")==="none"){k.addClass("open"),j.html("-"),i.show()}else{k.removeClass("open"),j.html("+"),i.hide()}return false});if(a.length>1&&e===0){b('<div class="ws-menu-page-groups-show">+</div>').insertBefore(c).click(function(){b("div.ws-menu-page-group-header").each(function(){var k=b(this),j=b("ins",k),i=k.next();k.addClass("open"),j.html("-"),i.show();return});return false});b('<div class="ws-menu-page-groups-hide">-</div>').insertBefore(c).click(function(){b("div.ws-menu-page-group-header").each(function(){var k=b(this),j=b("ins",k),i=k.next();k.removeClass("open"),j.html("+"),i.hide();return});return false})}if(f.attr("default-state")==="open"){c.trigger("click")}return});if(a.length>1){b("div.ws-menu-page-group-header:first").css({"margin-right":"140px"});b("div.ws-menu-page-group:first").css({"margin-right":"145px"})}b("div.ws-menu-page-r-group-header").click(function(){var d=b(this),c=d.next("div.ws-menu-page-r-group");if(c.css("display")==="none"){b("ins",d).html("-"),d.addClass("open"),c.show()}else{b("ins",d).html("+"),d.removeClass("open");c.hide()}return false});b("div.ws-menu-page-group-header:first, div.ws-menu-page-r-group-header:first").css({"margin-top":"0"});b("div.ws-menu-page-group > div.ws-menu-page-section:first-child > h3").css({"margin-top":"0"});b("div.ws-menu-page-readme > div.readme > div.section:last-child").css({"border-bottom-width":"0"});b("input.ws-menu-page-media-btn").filter(function(){return(b(this).attr("rel"))?true:false}).click(function(){var c=b(this);window.send_to_editor=function(g){var h,f,d=b.trim(c.attr("rel"));if(d&&(h=b("input#"+d)).length>0){var e=h.css("background-color"),i=b.trim(b(g).attr("src"));i=(!i)?b.trim(b("img",g).attr("src")):i;h.val(i),h.css({"background-color":"#FFFFCC"}),setTimeout(function(){h.css({"background-color":e})},2000);tb_remove();return}else{if(d&&(f=b("textarea#"+d)).length>0){var e=f.css("background-color"),i=b.trim(b(g).attr("src"));i=(!i)?b.trim(b("img",g).attr("src")):i;f.val(b.trim(f.val())+"\n"+i),f.css({"background-color":"#FFFFCC"}),setTimeout(function(){f.css({"background-color":e})},2000);tb_remove();return}}};tb_show("","./media-upload.php?type=image&TB_iframe=true");return false});b("form#ws-mlist-form").submit(function(){var c="";if(!b.trim(b("input#ws-mlist-fname").val())){c+="First Name missing, please try again.\n\n"}if(!b.trim(b("input#ws-mlist-lname").val())){c+="Last Name missing, please try again.\n\n"}if(!b.trim(b("input#ws-mlist-email").val())){c+="Email missing, please try again.\n\n"}else{if(!b("input#ws-mlist-email").val().match(/^([a-z_~0-9\+\-]+)(((\.?)([a-z_~0-9\+\-]+))*)(@)([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){c+="Invalid email address, please try again.\n\n"}}if(c=b.trim(c)){alert("— Oops, you missed something: —\n\n"+c);return false}return true})});
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_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")})}else{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")}else{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 some very unhappy Customers. Data corruption WILL occur!\n\nFor 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()})()}}else{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_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_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})}else{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()}})}else{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")}else{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_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_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_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_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_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_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_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_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_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_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_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_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}}}}}}}}});
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")})}else{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")}else{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 some very unhappy Customers. Data corruption WILL occur!\n\nFor 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()})()}}else{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")}else{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()}})}else{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")}else{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}}}}}}}}});
includes/menu-pages/menu-pages-s.js CHANGED
@@ -30,7 +30,7 @@ jQuery(document).ready (function($)
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_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');
@@ -375,7 +375,7 @@ jQuery(document).ready (function($)
375
  /**/
376
  var fieldId2Var = function(fieldId) /* Convert ids to variables. */
377
  {
378
- return ( typeof fieldId === 'string') ? $.trim (fieldId).toLowerCase ().replace (/[^a-z0-9]/g, '_') : '';
379
  };
380
  /**/
381
  var fieldTypeDesc = function(type)
@@ -826,13 +826,12 @@ jQuery(document).ready (function($)
826
  /**/
827
  else if (location.href.match (/page\=ws-plugin--s2member-res-ops/))
828
  {
829
- /**/
830
  $('input#ws-plugin--s2member-brute-force-restrictions-reset-button').click (function()
831
  {
832
  var $this = $(this); /* Save $(this) into $this. */
833
  $this.val ('one moment please ...'); /* Indicate loading status ( please wait ). */
834
  /**/
835
- $.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_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'}, function(response)
836
  {
837
  alert('s2Member\'s Brute Force Restriction Logs have all been reset.'), $this.val ('Reset Brute Force Logs');
838
  });
@@ -845,13 +844,33 @@ jQuery(document).ready (function($)
845
  var $this = $(this); /* Save $(this) into $this. */
846
  $this.val ('one moment please ...'); /* Indicate loading status ( please wait ). */
847
  /**/
848
- $.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_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'}, function(response)
849
  {
850
  alert('s2Member\'s IP Restriction Logs have all been reset.'), $this.val ('Reset IP Restriction Logs');
851
  });
852
  /**/
853
  return false;
854
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
855
  }
856
  /**/
857
  else if (location.href.match (/page\=ws-plugin--s2member-paypal-ops/))
@@ -1044,7 +1063,7 @@ jQuery(document).ready (function($)
1044
  (regRecur !== 'BN') ? code.html (code.val ().replace (/ (\<input type\="hidden" name\="amount" value\="(.*?)" \/\>)/g, " <!--$1-->")) : null;
1045
  /**/
1046
  shortCodeTemplateAttrs += (button === 'modification') ? 'modify="1" ' : ''; /* For Modification Buttons. */
1047
- 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_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"';
1048
  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) + '"';
1049
  shortCode.val (shortCodeTemplate.replace (/%%attrs%%/, shortCodeTemplateAttrs));
1050
  /**/
@@ -1054,7 +1073,7 @@ jQuery(document).ready (function($)
1054
  code.html (code.val ().replace (/ name\="item_number" value\="(.*?)"/, ' name="item_number" value="' + esc_attr(levelCcapsPer) + '"'));
1055
  code.html (code.val ().replace (/ name\="page_style" value\="(.*?)"/, ' name="page_style" value="' + esc_attr(pageStyle) + '"'));
1056
  code.html (code.val ().replace (/ name\="currency_code" value\="(.*?)"/, ' name="currency_code" value="' + esc_attr(currencyCode) + '"'));
1057
- code.html (code.val ().replace (/ name\="custom" value\="(.*?)"/, ' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));
1058
  /**/
1059
  code.html (code.val ().replace (/ name\="modify" value\="(.*?)"/, ' name="modify" value="' + ((button === 'modification') ? '1' : '0') + '"'));
1060
  /**/
@@ -1071,7 +1090,7 @@ jQuery(document).ready (function($)
1071
  code.html (code.val ().replace (/ name\="p3" value\="(.*?)"/, ' name="p3" value="' + esc_attr(regPeriod) + '"'));
1072
  code.html (code.val ().replace (/ name\="t3" value\="(.*?)"/, ' name="t3" value="' + esc_attr(regTerm) + '"'));
1073
  /**/
1074
- $('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_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace (/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g, ''));
1075
  /**/
1076
  (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.');
1077
  /**/
@@ -1129,7 +1148,7 @@ jQuery(document).ready (function($)
1129
  }
1130
  /**/
1131
  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) + '"';
1132
- shortCodeTemplateAttrs += ' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="' + esc_attr(regAmount) + '" rp="' + esc_attr(regPeriod) + '" rt="' + esc_attr(regTerm) + '" rr="' + esc_attr(regRecur) + '"';
1133
  shortCode.val (shortCodeTemplate.replace (/%%attrs%%/, shortCodeTemplateAttrs));
1134
  /**/
1135
  code.html (code.val ().replace (/ name\="lc" value\="(.*?)"/, ' name="lc" value="' + esc_attr(localeCode) + '"'));
@@ -1138,11 +1157,11 @@ jQuery(document).ready (function($)
1138
  code.html (code.val ().replace (/ name\="item_number" value\="(.*?)"/, ' name="item_number" value="' + esc_attr(levelCcapsPer) + '"'));
1139
  code.html (code.val ().replace (/ name\="page_style" value\="(.*?)"/, ' name="page_style" value="' + esc_attr(pageStyle) + '"'));
1140
  code.html (code.val ().replace (/ name\="currency_code" value\="(.*?)"/, ' name="currency_code" value="' + esc_attr(currencyCode) + '"'));
1141
- code.html (code.val ().replace (/ name\="custom" value\="(.*?)"/, ' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));
1142
  /**/
1143
  code.html (code.val ().replace (/ name\="amount" value\="(.*?)"/, ' name="amount" value="' + esc_attr(regAmount) + '"'));
1144
  /**/
1145
- $('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_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace (/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g, ''));
1146
  /**/
1147
  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.');
1148
  /**/
@@ -1200,7 +1219,7 @@ jQuery(document).ready (function($)
1200
  var spIdsHours = 'sp:' + ids + ':' + hours; /* Combined sp:ids:expiration hours. */
1201
  /**/
1202
  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) + '"';
1203
- shortCodeTemplateAttrs += ' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="' + esc_attr(regAmount) + '"';
1204
  shortCode.val (shortCodeTemplate.replace (/%%attrs%%/, shortCodeTemplateAttrs));
1205
  /**/
1206
  code.html (code.val ().replace (/ name\="lc" value\="(.*?)"/, ' name="lc" value="' + esc_attr(localeCode) + '"'));
@@ -1209,11 +1228,11 @@ jQuery(document).ready (function($)
1209
  code.html (code.val ().replace (/ name\="item_number" value\="(.*?)"/, ' name="item_number" value="' + esc_attr(spIdsHours) + '"'));
1210
  code.html (code.val ().replace (/ name\="page_style" value\="(.*?)"/, ' name="page_style" value="' + esc_attr(pageStyle) + '"'));
1211
  code.html (code.val ().replace (/ name\="currency_code" value\="(.*?)"/, ' name="currency_code" value="' + esc_attr(currencyCode) + '"'));
1212
- code.html (code.val ().replace (/ name\="custom" value\="(.*?)"/, ' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));
1213
  /**/
1214
  code.html (code.val ().replace (/ name\="amount" value\="(.*?)"/, ' name="amount" value="' + esc_attr(regAmount) + '"'));
1215
  /**/
1216
- $('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_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace (/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g, ''));
1217
  /**/
1218
  alert('Your Button has been generated.\nPlease copy/paste the Shortcode Format into your WordPress® Editor.');
1219
  /**/
@@ -1242,7 +1261,7 @@ jQuery(document).ready (function($)
1242
  alert('— Oops, a slight problem: —\n\nPaid Subscr. ID is a required value.');
1243
  return false;
1244
  }
1245
- else if (!custom || custom.indexOf ('<?php echo c_ws_plugin__s2member_utils_strings::esc_sq ($_SERVER["HTTP_HOST"]); ?>') !== 0)
1246
  {
1247
  alert('— Oops, a slight problem: —\n\nThe Custom Value MUST start with your domain name.');
1248
  return false;
@@ -1253,7 +1272,7 @@ jQuery(document).ready (function($)
1253
  return false;
1254
  }
1255
  /**/
1256
- $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_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)
1257
  {
1258
  $link.show ().html ('<a href="' + esc_attr(response) + '" target="_blank" rel="external">' + esc_html(response) + '</a>'), $loading.hide ();
1259
  });
@@ -1278,7 +1297,7 @@ jQuery(document).ready (function($)
1278
  if (additionals[i] && additionals[i] !== leading)
1279
  ids += ',' + additionals[i];
1280
  /**/
1281
- $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_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)
1282
  {
1283
  $link.show ().html ('<a href="' + esc_attr(response) + '" target="_blank" rel="external">' + esc_html(response) + '</a>'), $loading.hide ();
1284
  });
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');
375
  /**/
376
  var fieldId2Var = function(fieldId) /* Convert ids to variables. */
377
  {
378
+ return( typeof fieldId === 'string') ? $.trim (fieldId).toLowerCase ().replace (/[^a-z0-9]/g, '_') : '';
379
  };
380
  /**/
381
  var fieldTypeDesc = function(type)
826
  /**/
827
  else if (location.href.match (/page\=ws-plugin--s2member-res-ops/))
828
  {
 
829
  $('input#ws-plugin--s2member-brute-force-restrictions-reset-button').click (function()
830
  {
831
  var $this = $(this); /* Save $(this) into $this. */
832
  $this.val ('one moment please ...'); /* Indicate loading status ( please wait ). */
833
  /**/
834
+ $.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)
835
  {
836
  alert('s2Member\'s Brute Force Restriction Logs have all been reset.'), $this.val ('Reset Brute Force Logs');
837
  });
844
  var $this = $(this); /* Save $(this) into $this. */
845
  $this.val ('one moment please ...'); /* Indicate loading status ( please wait ). */
846
  /**/
847
+ $.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)
848
  {
849
  alert('s2Member\'s IP Restriction Logs have all been reset.'), $this.val ('Reset IP Restriction Logs');
850
  });
851
  /**/
852
  return false;
853
  });
854
+ /**/
855
+ $('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query\[\]"]').change (function()
856
+ {
857
+ var thisChange = $(this).val (); /* Record value associated with change event. Allows for intutitive unchecking. */
858
+ /**/
859
+ $('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query\[\]"]').each (function()
860
+ {
861
+ var $this = $(this), val = $this.val (), checkboxes = 'input[type="checkbox"]';
862
+ /**/
863
+ if (val === 'all' && this.checked) /* All sub-items get checked/disabled. */
864
+ $this.nextAll (checkboxes).attr ({'checked': 'checked', 'disabled': 'disabled'});
865
+ /**/
866
+ else if (val === 'all' && !this.checked)
867
+ {
868
+ $this.nextAll (checkboxes).removeAttr ('disabled');
869
+ (thisChange === 'all') ? $this.nextAll (checkboxes).removeAttr ('checked') : null;
870
+ }
871
+ });
872
+ /**/
873
+ }).last ().trigger ('change');
874
  }
875
  /**/
876
  else if (location.href.match (/page\=ws-plugin--s2member-paypal-ops/))
1063
  (regRecur !== 'BN') ? code.html (code.val ().replace (/ (\<input type\="hidden" name\="amount" value\="(.*?)" \/\>)/g, " <!--$1-->")) : null;
1064
  /**/
1065
  shortCodeTemplateAttrs += (button === 'modification') ? 'modify="1" ' : ''; /* For Modification Buttons. */
1066
+ 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"])); ?>"';
1067
  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) + '"';
1068
  shortCode.val (shortCodeTemplate.replace (/%%attrs%%/, shortCodeTemplateAttrs));
1069
  /**/
1073
  code.html (code.val ().replace (/ name\="item_number" value\="(.*?)"/, ' name="item_number" value="' + esc_attr(levelCcapsPer) + '"'));
1074
  code.html (code.val ().replace (/ name\="page_style" value\="(.*?)"/, ' name="page_style" value="' + esc_attr(pageStyle) + '"'));
1075
  code.html (code.val ().replace (/ name\="currency_code" value\="(.*?)"/, ' name="currency_code" value="' + esc_attr(currencyCode) + '"'));
1076
+ 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"])); ?>"'));
1077
  /**/
1078
  code.html (code.val ().replace (/ name\="modify" value\="(.*?)"/, ' name="modify" value="' + ((button === 'modification') ? '1' : '0') + '"'));
1079
  /**/
1090
  code.html (code.val ().replace (/ name\="p3" value\="(.*?)"/, ' name="p3" value="' + esc_attr(regPeriod) + '"'));
1091
  code.html (code.val ().replace (/ name\="t3" value\="(.*?)"/, ' name="t3" value="' + esc_attr(regTerm) + '"'));
1092
  /**/
1093
+ $('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, ''));
1094
  /**/
1095
  (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.');
1096
  /**/
1148
  }
1149
  /**/
1150
  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) + '"';
1151
+ 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) + '"';
1152
  shortCode.val (shortCodeTemplate.replace (/%%attrs%%/, shortCodeTemplateAttrs));
1153
  /**/
1154
  code.html (code.val ().replace (/ name\="lc" value\="(.*?)"/, ' name="lc" value="' + esc_attr(localeCode) + '"'));
1157
  code.html (code.val ().replace (/ name\="item_number" value\="(.*?)"/, ' name="item_number" value="' + esc_attr(levelCcapsPer) + '"'));
1158
  code.html (code.val ().replace (/ name\="page_style" value\="(.*?)"/, ' name="page_style" value="' + esc_attr(pageStyle) + '"'));
1159
  code.html (code.val ().replace (/ name\="currency_code" value\="(.*?)"/, ' name="currency_code" value="' + esc_attr(currencyCode) + '"'));
1160
+ 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"])); ?>"'));
1161
  /**/
1162
  code.html (code.val ().replace (/ name\="amount" value\="(.*?)"/, ' name="amount" value="' + esc_attr(regAmount) + '"'));
1163
  /**/
1164
+ $('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, ''));
1165
  /**/
1166
  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.');
1167
  /**/
1219
  var spIdsHours = 'sp:' + ids + ':' + hours; /* Combined sp:ids:expiration hours. */
1220
  /**/
1221
  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) + '"';
1222
+ shortCodeTemplateAttrs += ' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="' + esc_attr(regAmount) + '"';
1223
  shortCode.val (shortCodeTemplate.replace (/%%attrs%%/, shortCodeTemplateAttrs));
1224
  /**/
1225
  code.html (code.val ().replace (/ name\="lc" value\="(.*?)"/, ' name="lc" value="' + esc_attr(localeCode) + '"'));
1228
  code.html (code.val ().replace (/ name\="item_number" value\="(.*?)"/, ' name="item_number" value="' + esc_attr(spIdsHours) + '"'));
1229
  code.html (code.val ().replace (/ name\="page_style" value\="(.*?)"/, ' name="page_style" value="' + esc_attr(pageStyle) + '"'));
1230
  code.html (code.val ().replace (/ name\="currency_code" value\="(.*?)"/, ' name="currency_code" value="' + esc_attr(currencyCode) + '"'));
1231
+ 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"])); ?>"'));
1232
  /**/
1233
  code.html (code.val ().replace (/ name\="amount" value\="(.*?)"/, ' name="amount" value="' + esc_attr(regAmount) + '"'));
1234
  /**/
1235
+ $('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, ''));
1236
  /**/
1237
  alert('Your Button has been generated.\nPlease copy/paste the Shortcode Format into your WordPress® Editor.');
1238
  /**/
1261
  alert('— Oops, a slight problem: —\n\nPaid Subscr. ID is a required value.');
1262
  return false;
1263
  }
1264
+ else if (!custom || custom.indexOf ('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq ($_SERVER["HTTP_HOST"]); ?>') !== 0)
1265
  {
1266
  alert('— Oops, a slight problem: —\n\nThe Custom Value MUST start with your domain name.');
1267
  return false;
1272
  return false;
1273
  }
1274
  /**/
1275
+ $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)
1276
  {
1277
  $link.show ().html ('<a href="' + esc_attr(response) + '" target="_blank" rel="external">' + esc_html(response) + '</a>'), $loading.hide ();
1278
  });
1297
  if (additionals[i] && additionals[i] !== leading)
1298
  ids += ',' + additionals[i];
1299
  /**/
1300
+ $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)
1301
  {
1302
  $link.show ().html ('<a href="' + esc_attr(response) + '" target="_blank" rel="external">' + esc_html(response) + '</a>'), $loading.hide ();
1303
  });
includes/menu-pages/menu-pages.css CHANGED
@@ -59,7 +59,7 @@ div.ws-menu-page div.ws-menu-page-hr
59
  div.ws-menu-page .ws-menu-page-hilite
60
  {
61
  font-size: 102%;
62
- background: #FFFEEB;
63
  }
64
  div.ws-menu-page .ws-menu-page-error
65
  {
@@ -392,6 +392,7 @@ div.ws-menu-page-readme > div.readme > div.section > div.content ol
392
  Specifically for the right sidebar panel.
393
  These CSS selectors address common layout styles.
394
  */
 
395
  td.ws-menu-page-table-r div.ws-menu-page-mlist,
396
  td.ws-menu-page-table-r div.ws-menu-page-installation,
397
  td.ws-menu-page-table-r div.ws-menu-page-tools,
@@ -414,6 +415,17 @@ td.ws-menu-page-table-r div.ws-menu-page-others img
414
  width: 200px;
415
  height: auto;
416
  }
 
 
 
 
 
 
 
 
 
 
 
417
  /*
418
  Specifically for the right sidebar panel.
419
  - Specifically for the mailing list box.
59
  div.ws-menu-page .ws-menu-page-hilite
60
  {
61
  font-size: 102%;
62
+ background: #FAF9BB;
63
  }
64
  div.ws-menu-page .ws-menu-page-error
65
  {
392
  Specifically for the right sidebar panel.
393
  These CSS selectors address common layout styles.
394
  */
395
+ td.ws-menu-page-table-r div.ws-menu-page-js-c-w,
396
  td.ws-menu-page-table-r div.ws-menu-page-mlist,
397
  td.ws-menu-page-table-r div.ws-menu-page-installation,
398
  td.ws-menu-page-table-r div.ws-menu-page-tools,
415
  width: 200px;
416
  height: auto;
417
  }
418
+ td.ws-menu-page-table-r div.ws-menu-page-js-c-w
419
+ {
420
+ width: 178px;
421
+ padding: 10px;
422
+ background: #FFF5F7;
423
+ text-align: justify;
424
+ border: 1px solid #FA4D4D;
425
+ -moz-border-radius: 5px;
426
+ -webkit-border-radius: 5px;
427
+ border-radius: 5px;
428
+ }
429
  /*
430
  Specifically for the right sidebar panel.
431
  - Specifically for the mailing list box.
includes/menu-pages/menu-pages.js CHANGED
@@ -23,6 +23,8 @@ These routines address common layout styles for menu pages.
23
  */
24
  jQuery(document).ready (function($)
25
  {
 
 
26
  var $groups = $('div.ws-menu-page-group'); /* Query groups. */
27
  $groups.each (function(index) /* Go through each group, one at a time. */
28
  {
@@ -110,7 +112,7 @@ jQuery(document).ready (function($)
110
  /**/
111
  $('input.ws-menu-page-media-btn').filter (function() /* Only those that have a rel attribute. */
112
  {
113
- return ($(this).attr ('rel')) ? true : false; /* Must have rel targeting an input id. */
114
  })/**/
115
  .click (function() /* Attach click events to media buttons with send_to_editor(). */
116
  {
23
  */
24
  jQuery(document).ready (function($)
25
  {
26
+ $('div#ws-menu-page-js-c-w').hide (); /* Hide warning. */
27
+ /**/
28
  var $groups = $('div.ws-menu-page-group'); /* Query groups. */
29
  $groups.each (function(index) /* Go through each group, one at a time. */
30
  {
112
  /**/
113
  $('input.ws-menu-page-media-btn').filter (function() /* Only those that have a rel attribute. */
114
  {
115
+ return($(this).attr ('rel')) ? true : false; /* Must have rel targeting an input id. */
116
  })/**/
117
  .click (function() /* Attach click events to media buttons with send_to_editor(). */
118
  {
includes/menu-pages/mms-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_mms_ops"))
21
  {
@@ -129,19 +129,21 @@ 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
- /**/
133
  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";
134
- /**/
135
- 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. 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 the configuration options you set below.</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";
139
  echo '<h4 style="margin-bottom:0;">Running a Multisite Blog Farm? ( <a href="#" onclick="jQuery(\'div#ws-plugin--s2member-mms-registration-support-package-details\').toggle(); return false;" class="ws-dotted-link">click here / please read</a> )</h4>' . "\n";
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. 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
  /**/
 
 
145
  echo '<table class="form-table">' . "\n";
146
  echo '<tbody>' . "\n";
147
  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_mms_ops"))
21
  {
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";
138
  echo '<h4 style="margin-bottom:0;">Running a Multisite Blog Farm? ( <a href="#" onclick="jQuery(\'div#ws-plugin--s2member-mms-registration-support-package-details\').toggle(); return false;" class="ws-dotted-link">click here / please read</a> )</h4>' . "\n";
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
  /**/
145
+ echo '<div class="ws-menu-page-hr"></div>' . "\n";
146
+ /**/
147
  echo '<table class="form-table">' . "\n";
148
  echo '<tbody>' . "\n";
149
  echo '<tr>' . "\n";
includes/menu-pages/paypal-buttons.inc.php CHANGED
@@ -71,9 +71,9 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
71
  /**/
72
  echo '<td>' . "\n";
73
  echo '<form onsubmit="return false;">' . "\n";
74
- echo '<p id="ws-plugin--s2member-level' . $n . '-trial-line">I\'ll offer the first <input type="text" id="ws-plugin--s2member-level' . $n . '-trial-period" value="0" size="6" /> <select id="ws-plugin--s2member-level' . $n . '-trial-term">' . file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-trial-terms.html") . '</select> @ $<input type="text" id="ws-plugin--s2member-level' . $n . '-trial-amount" value="0.00" size="4" /></p>' . "\n";
75
- echo '<p><span id="ws-plugin--s2member-level' . $n . '-trial-then">Then, </span>I want to charge: $<input type="text" id="ws-plugin--s2member-level' . $n . '-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-level' . $n . '-term">' . file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-regular-terms.html") . '</select></p>' . "\n";
76
- echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal® account. PayPal® allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal®, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal® Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" id="ws-plugin--s2member-level' . $n . '-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-level' . $n . '-currency">' . file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.html") . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalButtonGenerate(\'level' . $n . '\');" class="button-primary" /></p>' . "\n";
77
  echo '<p>Description: <input type="text" id="ws-plugin--s2member-level' . $n . '-desc" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"]) . ' / description and pricing details here." size="73" /></p>' . "\n";
78
  echo '<p' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" id="ws-plugin--s2member-level' . $n . '-ccaps" size="40" maxlength="125" /></p>' . "\n";
79
  echo '</form>' . "\n";
@@ -89,7 +89,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
89
  do_action ($ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_during_levelN_buttons_before_shortcode, get_defined_vars ());
90
  /**/
91
  echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual &amp; HTML Editors )<br />' . "\n";
92
- $ws_plugin__s2member_temp_s = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/shortcodes/paypal-checkout-button-shortcode.html"));
93
  $ws_plugin__s2member_temp_s = preg_replace ("/%%level%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($n)), $ws_plugin__s2member_temp_s);
94
  $ws_plugin__s2member_temp_s = preg_replace ("/%%level_label%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"])), $ws_plugin__s2member_temp_s);
95
  $ws_plugin__s2member_temp_s = preg_replace ("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_temp_s);
@@ -98,7 +98,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
98
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
99
  echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
100
  echo '<textarea id="ws-plugin--s2member-level' . $n . '-button" rows="8" wrap="off" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;">';
101
- $ws_plugin__s2member_temp_s = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-checkout-button.html"));
102
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
103
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
104
  $ws_plugin__s2member_temp_s = preg_replace ("/%%level%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($n)), $ws_plugin__s2member_temp_s);
@@ -175,9 +175,9 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
175
  /**/
176
  echo '</select></p>' . "\n";
177
  /**/
178
- echo '<p id="ws-plugin--s2member-modification-trial-line">I\'ll offer the first <input type="text" id="ws-plugin--s2member-modification-trial-period" value="0" size="6" /> <select id="ws-plugin--s2member-modification-trial-term">' . file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-trial-terms.html") . '</select> @ $<input type="text" id="ws-plugin--s2member-modification-trial-amount" value="0.00" size="4" /></p>' . "\n";
179
- echo '<p><span id="ws-plugin--s2member-modification-trial-then">Then, </span>I want to charge: $<input type="text" id="ws-plugin--s2member-modification-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-modification-term">' . file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-regular-terms.html") . '</select><span id="ws-plugin--s2member-modification-20p-rule"><br /><small>* Watch out for <a href="https://www.x.com/thread/41748" target="_blank" rel="external">the 20% rule</a>. Additional details are <a href="https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_WPRecurringPayments#id086530108PM__id08653060UE6" target="_blank" rel="external">documented here</a>.<br />* <strong>Tip</strong> <a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Pro Module / Prices")) . '" target="_blank" rel="external">s2Member Pro Forms</a> are NOT subjected to this ridiculous 20% rule.</small></span></p>' . "\n";
180
- echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal® account. PayPal® allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal®, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal® Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" id="ws-plugin--s2member-modification-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-modification-currency">' . file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.html") . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalButtonGenerate(\'modification\');" class="button-primary" /></p>' . "\n";
181
  echo '<p>Description: <input type="text" id="ws-plugin--s2member-modification-desc" value="Description and pricing details here." size="73" /></p>' . "\n";
182
  echo '<p' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" id="ws-plugin--s2member-modification-ccaps" size="40" maxlength="125" /></p>' . "\n";
183
  echo '</form>' . "\n";
@@ -190,7 +190,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
190
  echo '<form onsubmit="return false;">' . "\n";
191
  do_action ("ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_during_modification_buttons_before_shortcode", get_defined_vars ());
192
  echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual &amp; HTML Editors )<br />' . "\n";
193
- $ws_plugin__s2member_temp_s = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/shortcodes/paypal-checkout-button-shortcode.html"));
194
  $ws_plugin__s2member_temp_s = preg_replace ("/%%level%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ("1")), $ws_plugin__s2member_temp_s);
195
  $ws_plugin__s2member_temp_s = preg_replace ("/%%level_label%% /", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level1_label"])), $ws_plugin__s2member_temp_s);
196
  $ws_plugin__s2member_temp_s = preg_replace ("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_temp_s);
@@ -200,7 +200,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
200
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
201
  echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
202
  echo '<textarea id="ws-plugin--s2member-modification-button" rows="8" wrap="off" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;">';
203
- $ws_plugin__s2member_temp_s = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-checkout-button.html"));
204
  $ws_plugin__s2member_temp_s = preg_replace ('/name\="modify" value\="(.*?)"/', 'name="modify" value="1"', $ws_plugin__s2member_temp_s);
205
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
206
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
@@ -260,8 +260,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
260
  /**/
261
  echo '<td>' . "\n";
262
  echo '<form onsubmit="return false;">' . "\n";
263
- echo '<p>I want to charge: $<input type="text" id="ws-plugin--s2member-ccap-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-ccap-term">' . file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-ccap-terms.html") . '</select></p>' . "\n";
264
- echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal® account. PayPal® allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal®, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal® Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" id="ws-plugin--s2member-ccap-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-ccap-currency">' . file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.html") . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalCcapButtonGenerate();" class="button-primary" /></p>' . "\n";
265
  echo '<p>Description: <input type="text" id="ws-plugin--s2member-ccap-desc" value="Description and pricing details here." size="73" /></p>' . "\n";
266
  echo '<p>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\'); return false;" tabindex="-1">[?]</a> <input type="text" id="ws-plugin--s2member-ccap-ccaps" size="40" maxlength="125" /></p>' . "\n";
267
  echo '</form>' . "\n";
@@ -274,14 +274,14 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
274
  echo '<form onsubmit="return false;">' . "\n";
275
  do_action ("ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_during_ccap_buttons_before_shortcode", get_defined_vars ());
276
  echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual &amp; HTML Editors )<br />' . "\n";
277
- $ws_plugin__s2member_temp_s = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/shortcodes/paypal-ccaps-checkout-button-shortcode.html"));
278
  $ws_plugin__s2member_temp_s = preg_replace ("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_temp_s);
279
  echo '<input id="ws-plugin--s2member-ccap-shortcode" type="text" value="' . format_to_edit ($ws_plugin__s2member_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
280
  /**/
281
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
282
  echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
283
  echo '<textarea id="ws-plugin--s2member-ccap-button" rows="8" wrap="off" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;">';
284
- $ws_plugin__s2member_temp_s = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-ccaps-checkout-button.html"));
285
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
286
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
287
  $ws_plugin__s2member_temp_s = preg_replace ("/%%cancel_return%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (home_url ("/"))), $ws_plugin__s2member_temp_s);
@@ -332,7 +332,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
332
  echo '<label for="ws-plugin--s2member-cancellation-shortcode">' . "\n";
333
  echo 'Button Code<br />For Cancellations:<br /><br />' . "\n";
334
  echo '<div id="ws-plugin--s2member-cancellation-button-prev">' . "\n";
335
- $ws_plugin__s2member_temp_s = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-cancellation-button.html"));
336
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
337
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
338
  $ws_plugin__s2member_temp_s = preg_replace ("/%%images%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images")), $ws_plugin__s2member_temp_s);
@@ -355,13 +355,13 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
355
  echo '<form onsubmit="return false;">' . "\n";
356
  do_action ("ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_during_cancellation_buttons_before_shortcode", get_defined_vars ());
357
  echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual &amp; HTML Editors )<br />' . "\n";
358
- $ws_plugin__s2member_temp_s = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/shortcodes/paypal-cancellation-button-shortcode.html"));
359
  echo '<input id="ws-plugin--s2member-cancellation-shortcode" type="text" value="' . format_to_edit ($ws_plugin__s2member_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
360
  /**/
361
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
362
  echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
363
  echo '<textarea id="ws-plugin--s2member-cancellation-button" rows="8" wrap="off" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;">';
364
- $ws_plugin__s2member_temp_s = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-cancellation-button.html"));
365
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
366
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
367
  $ws_plugin__s2member_temp_s = preg_replace ("/%%images%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images")), $ws_plugin__s2member_temp_s);
@@ -407,7 +407,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
407
  echo '<option value="' . $n . '">s2Member Level #' . $n . '</option>' . "\n";
408
  echo '</select></p>' . "\n";
409
  echo '<p>Paid Subscr. ID: <input id="ws-plugin--s2member-reg-link-subscr-id" type="text" value="" size="50" /> <a href="#" onclick="alert(\'The Customer\\\'s Paid Subscr. ID ( aka: Recurring Profile ID, Transaction ID ) must be unique. This value can be obtained from inside your PayPal® account under the History tab. Each paying Customer MUST be associated with a unique Paid Subscr. ID. If the Customer is NOT associated with a Paid Subscr. ID, you will need to generate a unique value for this field on your own. But keep in mind, s2Member will be unable to maintain future communication with the PayPal® IPN ( i.e. Notification ) service if this value does not reflect a real Paid Subscr. ID that exists in your PayPal® History log.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
410
- echo '<p>Custom String Value: <input id="ws-plugin--s2member-reg-link-custom" type="text" value="' . esc_attr ($_SERVER["HTTP_HOST"]) . '" size="30" /> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_sq (esc_attr ($_SERVER["HTTP_HOST"])) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\n' . c_ws_plugin__s2member_utils_strings::esc_sq (esc_attr ($_SERVER["HTTP_HOST"])) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a> <input type="button" value="Generate Access Link" onclick="ws_plugin__s2member_paypalRegLinkGenerate();" class="button-primary" /> <img id="ws-plugin--s2member-reg-link-loading" src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
411
  echo '<p' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\'); return false;" tabindex="-1">[?]</a> <input type="text" id="ws-plugin--s2member-reg-link-ccaps" size="40" maxlength="125" 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 ());" /></p>' . "\n";
412
  echo '<p>Fixed Term Length ( for Buy Now transactions ): <input id="ws-plugin--s2member-reg-link-fixed-term" type="text" value="" size="10" /> <a href="#" onclick="alert(\'If the Customer purchased Membership through a Buy Now transaction ( i.e. there is no Initial/Trial Period and no recurring charges for ongoing access ), you may configure a Fixed Term Length in this field. This way the Customer\\\'s Membership Access is automatically revoked by s2Member at the appropriate time. This will be a numeric value, followed by a space, then a single letter.\\n\\nHere are some examples:\\n\\n1 D ( this means 1 Day )\\n1 W ( this means 1 Week )\\n1 M ( this means 1 Month )\\n1 Y ( this means 1 Year )\\n1 L ( this means 1 Lifetime )\'); return false;">[?]</a></p>' . "\n";
413
  echo '<p id="ws-plugin--s2member-reg-link" style="font-family:Consolas, monospace; display:none;"></p>' . "\n";
@@ -481,9 +481,9 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
481
  /**/
482
  echo '</optgroup></select> <a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page ( they\\\'ll land on your Leading Post/Page after checkout ), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically ( e.g. only one Access Link is needed, and s2Member generates this automatically ). However, you will STILL need to design your Leading Post/Page ( which is what a Customer will actually land on ), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* s2Member sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this 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;" tabindex="-1">[?]</a></p>' . "\n";
483
  /**/
484
- echo '<p>I want to charge: $<input type="text" id="ws-plugin--s2member-sp-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-sp-hours">' . file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-sp-hours.html") . '</select></p>' . "\n";
485
  echo '<p>Description: <input type="text" id="ws-plugin--s2member-sp-desc" value="Description and pricing details here." size="68" /></p>' . "\n";
486
- echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal® account. PayPal® allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal®, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal® Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" id="ws-plugin--s2member-sp-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-sp-currency">' . file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.html") . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalSpButtonGenerate();" class="button-primary" /></p>' . "\n";
487
  echo '</form>' . "\n";
488
  echo '</td>' . "\n";
489
  /**/
@@ -494,14 +494,14 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
494
  echo '<form onsubmit="return false;">' . "\n";
495
  do_action ("ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_during_sp_buttons_before_shortcode", get_defined_vars ());
496
  echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual &amp; HTML Editors )<br />' . "\n";
497
- $ws_plugin__s2member_temp_s = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/shortcodes/paypal-sp-checkout-button-shortcode.html"));
498
  $ws_plugin__s2member_temp_s = preg_replace ("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_temp_s);
499
  echo '<input id="ws-plugin--s2member-sp-shortcode" type="text" value="' . format_to_edit ($ws_plugin__s2member_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
500
  /**/
501
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
502
  echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
503
  echo '<textarea id="ws-plugin--s2member-sp-button" rows="8" wrap="off" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;">';
504
- $ws_plugin__s2member_temp_s = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-sp-checkout-button.html"));
505
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
506
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
507
  $ws_plugin__s2member_temp_s = preg_replace ("/%%cancel_return%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (home_url ("/"))), $ws_plugin__s2member_temp_s);
@@ -575,7 +575,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
575
  /**/
576
  echo '</optgroup></select> <a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page ( they\\\'ll land on your Leading Post/Page after checkout ), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically ( e.g. only one Access Link is needed, and s2Member generates this automatically ). However, you will STILL need to design your Leading Post/Page ( which is what a Customer will actually land on ), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* s2Member sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this 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;" tabindex="-1">[?]</a></p>' . "\n";
577
  /**/
578
- echo '<p><select id="ws-plugin--s2member-sp-link-hours">' . file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-sp-hours.html") . '</select> <input type="button" value="Generate Access Link" onclick="ws_plugin__s2member_paypalSpLinkGenerate();" class="button-primary" /> <img id="ws-plugin--s2member-sp-link-loading" src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
579
  echo '<p id="ws-plugin--s2member-sp-link" style="font-family:Consolas, monospace; display:none;"></p>' . "\n";
580
  echo '</form>' . "\n";
581
  echo '</td>' . "\n";
@@ -609,7 +609,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
609
  echo '<ul>' . "\n";
610
  echo '<li><code>cancel="0"</code> Cancellation Button. Only valid w/ Membership Level Access. Possible values: <code>0</code> = this is NOT a Cancellation Button, <code>1</code> = this IS a Cancellation Button.</li>' . "\n";
611
  echo '<li><code>cc="USD"</code> 3 character Currency Code. Not valid when <code>cancel="1"</code>.</li>' . "\n";
612
- echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? '<li><code>ccaps="music,videos"</code> A comma-delimited list of Custom Capabilities. Only valid w/ Membership Level Access and/or Independent Capabilities.</li>' . "\n" : '';
613
  echo '<li><code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '"</code> must start with your domain. Additional values can be piped in ( ex: <code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3|etc"</code> ). Not valid when <code>cancel="1"</code>.</li>' . "\n";
614
  echo '<li><code>desc="Gold Membership"</code> A brief purchase Description. Not valid when <code>cancel="1"</code>.</li>' . "\n";
615
  echo '<li><code>dg="0"</code> The Digital Goods directive. s2Member will eventually be integrated with <a href="https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_IntroducingExpressCheckoutDG" target="_blank" rel="external">Digital Goods</a> for inline Express Checkout. But for now, this should always be <code>0</code>.</li>' . "\n";
@@ -617,7 +617,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
617
  echo '<li><code>ids="14"</code> A Post/Page ID#, or a comma-delimited list of IDs. Only valid when <code>sp="1"</code> for Specific Post/Page Access.</li>' . "\n";
618
  echo '<li><code>image="default"</code> Button Image Location. Possible values: <code>default</code> = use the default PayPal® Button, <code>http://...</code> = location of your custom Image.</li>' . "\n";
619
  echo '<li><code>lc=""</code> Optional 2 character Locale Code <em>( i.e. Country Code )</em>. This controls the interface language used at PayPal® during checkout. If unspecified, the language is determined by PayPal® when possible, defaulting to <code>US</code> <em>english</em> when not possible. Not valid when <code>cancel="1"</code>.</li>' . "\n";
620
- echo '<li><code>level="1"</code> Membership Level [1-4] <em>( or, up to the number of configured Levels )</em>. Only valid for Buttons providing paid Membership Level Access.' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? '' : ' Or, with Independent Custom Capabilities this MUST be set to <code>level="*"</code>.') . '</li>' . "\n";
621
  echo '<li><code>modify="0"</code> Modification directive. Only valid w/ Membership Level Access. Possible values: <code>0</code> = allows Customers to only create a new Subscription, <code>1</code> = allows Customers to modify their current Subscription or sign up for a new one, <code>2</code> = allows Customers to only modify their current Subscription.</li>' . "\n";
622
  echo '<li><code>ns="1"</code> The <em>no_shipping</em> directive. Possible values: <code>0</code> = prompt for an address, but do not require one, <code>1</code> = do not prompt for a shipping address, <code>2</code> = prompt for an address, and require one. Not valid when <code>cancel="1"</code>.</li>' . "\n";
623
  echo '<li><code>output="button"</code> Output Type. Possible values: <code>button</code> = PayPal® Button w/hidden inputs, <code>anchor</code> = PayPal® Button ( &lt;a&gt; anchor tag ) URL w/ ?query string, <code>url</code> = raw URL w/ ?query string.</li>' . "\n";
71
  /**/
72
  echo '<td>' . "\n";
73
  echo '<form onsubmit="return false;">' . "\n";
74
+ echo '<p id="ws-plugin--s2member-level' . $n . '-trial-line">I\'ll offer the first <input type="text" id="ws-plugin--s2member-level' . $n . '-trial-period" value="0" size="6" /> <select id="ws-plugin--s2member-level' . $n . '-trial-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-trial-terms.php"))) . '</select> @ $<input type="text" id="ws-plugin--s2member-level' . $n . '-trial-amount" value="0.00" size="4" /></p>' . "\n";
75
+ echo '<p><span id="ws-plugin--s2member-level' . $n . '-trial-then">Then, </span>I want to charge: $<input type="text" id="ws-plugin--s2member-level' . $n . '-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-level' . $n . '-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-regular-terms.php"))) . '</select></p>' . "\n";
76
+ echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal® account. PayPal® allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal®, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal® Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" id="ws-plugin--s2member-level' . $n . '-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-level' . $n . '-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalButtonGenerate(\'level' . $n . '\');" class="button-primary" /></p>' . "\n";
77
  echo '<p>Description: <input type="text" id="ws-plugin--s2member-level' . $n . '-desc" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"]) . ' / description and pricing details here." size="73" /></p>' . "\n";
78
  echo '<p' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" id="ws-plugin--s2member-level' . $n . '-ccaps" size="40" maxlength="125" /></p>' . "\n";
79
  echo '</form>' . "\n";
89
  do_action ($ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_during_levelN_buttons_before_shortcode, get_defined_vars ());
90
  /**/
91
  echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual &amp; HTML Editors )<br />' . "\n";
92
+ $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/shortcodes/paypal-checkout-button-shortcode.php")));
93
  $ws_plugin__s2member_temp_s = preg_replace ("/%%level%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($n)), $ws_plugin__s2member_temp_s);
94
  $ws_plugin__s2member_temp_s = preg_replace ("/%%level_label%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"])), $ws_plugin__s2member_temp_s);
95
  $ws_plugin__s2member_temp_s = preg_replace ("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_temp_s);
98
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
99
  echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
100
  echo '<textarea id="ws-plugin--s2member-level' . $n . '-button" rows="8" wrap="off" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;">';
101
+ $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-checkout-button.php")));
102
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
103
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
104
  $ws_plugin__s2member_temp_s = preg_replace ("/%%level%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($n)), $ws_plugin__s2member_temp_s);
175
  /**/
176
  echo '</select></p>' . "\n";
177
  /**/
178
+ echo '<p id="ws-plugin--s2member-modification-trial-line">I\'ll offer the first <input type="text" id="ws-plugin--s2member-modification-trial-period" value="0" size="6" /> <select id="ws-plugin--s2member-modification-trial-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-trial-terms.php"))) . '</select> @ $<input type="text" id="ws-plugin--s2member-modification-trial-amount" value="0.00" size="4" /></p>' . "\n";
179
+ echo '<p><span id="ws-plugin--s2member-modification-trial-then">Then, </span>I want to charge: $<input type="text" id="ws-plugin--s2member-modification-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-modification-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-regular-terms.php"))) . '</select><span id="ws-plugin--s2member-modification-20p-rule"><br /><small>* Watch out for <a href="https://www.x.com/thread/41748" target="_blank" rel="external">the 20% rule</a>. Additional details are <a href="https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_WPRecurringPayments#id086530108PM__id08653060UE6" target="_blank" rel="external">documented here</a>.<br />* <strong>Tip</strong> <a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Pro Module / Prices")) . '" target="_blank" rel="external">s2Member Pro Forms</a> are NOT subjected to this ridiculous 20% rule.</small></span></p>' . "\n";
180
+ echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal® account. PayPal® allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal®, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal® Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" id="ws-plugin--s2member-modification-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-modification-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalButtonGenerate(\'modification\');" class="button-primary" /></p>' . "\n";
181
  echo '<p>Description: <input type="text" id="ws-plugin--s2member-modification-desc" value="Description and pricing details here." size="73" /></p>' . "\n";
182
  echo '<p' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" id="ws-plugin--s2member-modification-ccaps" size="40" maxlength="125" /></p>' . "\n";
183
  echo '</form>' . "\n";
190
  echo '<form onsubmit="return false;">' . "\n";
191
  do_action ("ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_during_modification_buttons_before_shortcode", get_defined_vars ());
192
  echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual &amp; HTML Editors )<br />' . "\n";
193
+ $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/shortcodes/paypal-checkout-button-shortcode.php")));
194
  $ws_plugin__s2member_temp_s = preg_replace ("/%%level%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ("1")), $ws_plugin__s2member_temp_s);
195
  $ws_plugin__s2member_temp_s = preg_replace ("/%%level_label%% /", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level1_label"])), $ws_plugin__s2member_temp_s);
196
  $ws_plugin__s2member_temp_s = preg_replace ("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_temp_s);
200
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
201
  echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
202
  echo '<textarea id="ws-plugin--s2member-modification-button" rows="8" wrap="off" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;">';
203
+ $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-checkout-button.php")));
204
  $ws_plugin__s2member_temp_s = preg_replace ('/name\="modify" value\="(.*?)"/', 'name="modify" value="1"', $ws_plugin__s2member_temp_s);
205
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
206
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
260
  /**/
261
  echo '<td>' . "\n";
262
  echo '<form onsubmit="return false;">' . "\n";
263
+ echo '<p>I want to charge: $<input type="text" id="ws-plugin--s2member-ccap-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-ccap-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-ccap-terms.php"))) . '</select></p>' . "\n";
264
+ echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal® account. PayPal® allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal®, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal® Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" id="ws-plugin--s2member-ccap-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-ccap-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalCcapButtonGenerate();" class="button-primary" /></p>' . "\n";
265
  echo '<p>Description: <input type="text" id="ws-plugin--s2member-ccap-desc" value="Description and pricing details here." size="73" /></p>' . "\n";
266
  echo '<p>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\'); return false;" tabindex="-1">[?]</a> <input type="text" id="ws-plugin--s2member-ccap-ccaps" size="40" maxlength="125" /></p>' . "\n";
267
  echo '</form>' . "\n";
274
  echo '<form onsubmit="return false;">' . "\n";
275
  do_action ("ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_during_ccap_buttons_before_shortcode", get_defined_vars ());
276
  echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual &amp; HTML Editors )<br />' . "\n";
277
+ $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/shortcodes/paypal-ccaps-checkout-button-shortcode.php")));
278
  $ws_plugin__s2member_temp_s = preg_replace ("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_temp_s);
279
  echo '<input id="ws-plugin--s2member-ccap-shortcode" type="text" value="' . format_to_edit ($ws_plugin__s2member_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
280
  /**/
281
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
282
  echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
283
  echo '<textarea id="ws-plugin--s2member-ccap-button" rows="8" wrap="off" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;">';
284
+ $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-ccaps-checkout-button.php")));
285
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
286
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
287
  $ws_plugin__s2member_temp_s = preg_replace ("/%%cancel_return%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (home_url ("/"))), $ws_plugin__s2member_temp_s);
332
  echo '<label for="ws-plugin--s2member-cancellation-shortcode">' . "\n";
333
  echo 'Button Code<br />For Cancellations:<br /><br />' . "\n";
334
  echo '<div id="ws-plugin--s2member-cancellation-button-prev">' . "\n";
335
+ $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-cancellation-button.php")));
336
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
337
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
338
  $ws_plugin__s2member_temp_s = preg_replace ("/%%images%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images")), $ws_plugin__s2member_temp_s);
355
  echo '<form onsubmit="return false;">' . "\n";
356
  do_action ("ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_during_cancellation_buttons_before_shortcode", get_defined_vars ());
357
  echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual &amp; HTML Editors )<br />' . "\n";
358
+ $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/shortcodes/paypal-cancellation-button-shortcode.php")));
359
  echo '<input id="ws-plugin--s2member-cancellation-shortcode" type="text" value="' . format_to_edit ($ws_plugin__s2member_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
360
  /**/
361
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
362
  echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
363
  echo '<textarea id="ws-plugin--s2member-cancellation-button" rows="8" wrap="off" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;">';
364
+ $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-cancellation-button.php")));
365
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
366
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
367
  $ws_plugin__s2member_temp_s = preg_replace ("/%%images%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images")), $ws_plugin__s2member_temp_s);
407
  echo '<option value="' . $n . '">s2Member Level #' . $n . '</option>' . "\n";
408
  echo '</select></p>' . "\n";
409
  echo '<p>Paid Subscr. ID: <input id="ws-plugin--s2member-reg-link-subscr-id" type="text" value="" size="50" /> <a href="#" onclick="alert(\'The Customer\\\'s Paid Subscr. ID ( aka: Recurring Profile ID, Transaction ID ) must be unique. This value can be obtained from inside your PayPal® account under the History tab. Each paying Customer MUST be associated with a unique Paid Subscr. ID. If the Customer is NOT associated with a Paid Subscr. ID, you will need to generate a unique value for this field on your own. But keep in mind, s2Member will be unable to maintain future communication with the PayPal® IPN ( i.e. Notification ) service if this value does not reflect a real Paid Subscr. ID that exists in your PayPal® History log.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
410
+ echo '<p>Custom String Value: <input id="ws-plugin--s2member-reg-link-custom" type="text" value="' . esc_attr ($_SERVER["HTTP_HOST"]) . '" size="30" /> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\n' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a> <input type="button" value="Generate Access Link" onclick="ws_plugin__s2member_paypalRegLinkGenerate();" class="button-primary" /> <img id="ws-plugin--s2member-reg-link-loading" src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
411
  echo '<p' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\'); return false;" tabindex="-1">[?]</a> <input type="text" id="ws-plugin--s2member-reg-link-ccaps" size="40" maxlength="125" 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 ());" /></p>' . "\n";
412
  echo '<p>Fixed Term Length ( for Buy Now transactions ): <input id="ws-plugin--s2member-reg-link-fixed-term" type="text" value="" size="10" /> <a href="#" onclick="alert(\'If the Customer purchased Membership through a Buy Now transaction ( i.e. there is no Initial/Trial Period and no recurring charges for ongoing access ), you may configure a Fixed Term Length in this field. This way the Customer\\\'s Membership Access is automatically revoked by s2Member at the appropriate time. This will be a numeric value, followed by a space, then a single letter.\\n\\nHere are some examples:\\n\\n1 D ( this means 1 Day )\\n1 W ( this means 1 Week )\\n1 M ( this means 1 Month )\\n1 Y ( this means 1 Year )\\n1 L ( this means 1 Lifetime )\'); return false;">[?]</a></p>' . "\n";
413
  echo '<p id="ws-plugin--s2member-reg-link" style="font-family:Consolas, monospace; display:none;"></p>' . "\n";
481
  /**/
482
  echo '</optgroup></select> <a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page ( they\\\'ll land on your Leading Post/Page after checkout ), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically ( e.g. only one Access Link is needed, and s2Member generates this automatically ). However, you will STILL need to design your Leading Post/Page ( which is what a Customer will actually land on ), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* s2Member sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this 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;" tabindex="-1">[?]</a></p>' . "\n";
483
  /**/
484
+ echo '<p>I want to charge: $<input type="text" id="ws-plugin--s2member-sp-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-sp-hours">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-sp-hours.php"))) . '</select></p>' . "\n";
485
  echo '<p>Description: <input type="text" id="ws-plugin--s2member-sp-desc" value="Description and pricing details here." size="68" /></p>' . "\n";
486
+ echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal® account. PayPal® allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal®, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal® Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" id="ws-plugin--s2member-sp-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-sp-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalSpButtonGenerate();" class="button-primary" /></p>' . "\n";
487
  echo '</form>' . "\n";
488
  echo '</td>' . "\n";
489
  /**/
494
  echo '<form onsubmit="return false;">' . "\n";
495
  do_action ("ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_during_sp_buttons_before_shortcode", get_defined_vars ());
496
  echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual &amp; HTML Editors )<br />' . "\n";
497
+ $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/shortcodes/paypal-sp-checkout-button-shortcode.php")));
498
  $ws_plugin__s2member_temp_s = preg_replace ("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_temp_s);
499
  echo '<input id="ws-plugin--s2member-sp-shortcode" type="text" value="' . format_to_edit ($ws_plugin__s2member_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
500
  /**/
501
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
502
  echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
503
  echo '<textarea id="ws-plugin--s2member-sp-button" rows="8" wrap="off" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;">';
504
+ $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-sp-checkout-button.php")));
505
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
506
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
507
  $ws_plugin__s2member_temp_s = preg_replace ("/%%cancel_return%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (home_url ("/"))), $ws_plugin__s2member_temp_s);
575
  /**/
576
  echo '</optgroup></select> <a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page ( they\\\'ll land on your Leading Post/Page after checkout ), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically ( e.g. only one Access Link is needed, and s2Member generates this automatically ). However, you will STILL need to design your Leading Post/Page ( which is what a Customer will actually land on ), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* s2Member sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this 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;" tabindex="-1">[?]</a></p>' . "\n";
577
  /**/
578
+ echo '<p><select id="ws-plugin--s2member-sp-link-hours">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-sp-hours.php"))) . '</select> <input type="button" value="Generate Access Link" onclick="ws_plugin__s2member_paypalSpLinkGenerate();" class="button-primary" /> <img id="ws-plugin--s2member-sp-link-loading" src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
579
  echo '<p id="ws-plugin--s2member-sp-link" style="font-family:Consolas, monospace; display:none;"></p>' . "\n";
580
  echo '</form>' . "\n";
581
  echo '</td>' . "\n";
609
  echo '<ul>' . "\n";
610
  echo '<li><code>cancel="0"</code> Cancellation Button. Only valid w/ Membership Level Access. Possible values: <code>0</code> = this is NOT a Cancellation Button, <code>1</code> = this IS a Cancellation Button.</li>' . "\n";
611
  echo '<li><code>cc="USD"</code> 3 character Currency Code. Not valid when <code>cancel="1"</code>.</li>' . "\n";
612
+ echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? '<li><code>ccaps="music,videos"</code> A comma-delimited list of Custom Capabilities. Only valid w/ Membership Level Access and/or Independent Custom Capabilities.</li>' . "\n" : '';
613
  echo '<li><code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '"</code> must start with your domain. Additional values can be piped in ( ex: <code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3|etc"</code> ). Not valid when <code>cancel="1"</code>.</li>' . "\n";
614
  echo '<li><code>desc="Gold Membership"</code> A brief purchase Description. Not valid when <code>cancel="1"</code>.</li>' . "\n";
615
  echo '<li><code>dg="0"</code> The Digital Goods directive. s2Member will eventually be integrated with <a href="https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_IntroducingExpressCheckoutDG" target="_blank" rel="external">Digital Goods</a> for inline Express Checkout. But for now, this should always be <code>0</code>.</li>' . "\n";
617
  echo '<li><code>ids="14"</code> A Post/Page ID#, or a comma-delimited list of IDs. Only valid when <code>sp="1"</code> for Specific Post/Page Access.</li>' . "\n";
618
  echo '<li><code>image="default"</code> Button Image Location. Possible values: <code>default</code> = use the default PayPal® Button, <code>http://...</code> = location of your custom Image.</li>' . "\n";
619
  echo '<li><code>lc=""</code> Optional 2 character Locale Code <em>( i.e. Country Code )</em>. This controls the interface language used at PayPal® during checkout. If unspecified, the language is determined by PayPal® when possible, defaulting to <code>US</code> <em>english</em> when not possible. Not valid when <code>cancel="1"</code>.</li>' . "\n";
620
+ echo '<li><code>level="1"</code> Membership Level [1-4] <em>( or, up to the number of configured Levels )</em>. Only valid for Buttons providing paid Membership Level Access.' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? '' : ' Or, with Independent Custom Capabilities this MUST be set to <code>level="*"</code>, and <code>ccaps=""</code> must NOT be empty <em>( i.e. <code>level="*" ccaps="music,videos"</code> )</em>.') . '</li>' . "\n";
621
  echo '<li><code>modify="0"</code> Modification directive. Only valid w/ Membership Level Access. Possible values: <code>0</code> = allows Customers to only create a new Subscription, <code>1</code> = allows Customers to modify their current Subscription or sign up for a new one, <code>2</code> = allows Customers to only modify their current Subscription.</li>' . "\n";
622
  echo '<li><code>ns="1"</code> The <em>no_shipping</em> directive. Possible values: <code>0</code> = prompt for an address, but do not require one, <code>1</code> = do not prompt for a shipping address, <code>2</code> = prompt for an address, and require one. Not valid when <code>cancel="1"</code>.</li>' . "\n";
623
  echo '<li><code>output="button"</code> Output Type. Possible values: <code>button</code> = PayPal® Button w/hidden inputs, <code>anchor</code> = PayPal® Button ( &lt;a&gt; anchor tag ) URL w/ ?query string, <code>url</code> = raw URL w/ ?query string.</li>' . "\n";
includes/menu-pages/paypal-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_paypal_ops"))
21
  {
@@ -106,7 +106,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_ops"))
106
  echo '<tr>' . "\n";
107
  /**/
108
  echo '<td>' . "\n";
109
- echo '<input type="text" name="ws_plugin__s2member_paypal_api_password" id="ws-plugin--s2member-paypal-api-password" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_password"]) . '" /><br />' . "\n";
110
  echo 'In your PayPal® account, go to: <code>Profile -> Request API Credentials</code>.' . "\n";
111
  echo '</td>' . "\n";
112
  /**/
@@ -123,7 +123,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_ops"))
123
  echo '<tr>' . "\n";
124
  /**/
125
  echo '<td>' . "\n";
126
- echo '<input type="text" name="ws_plugin__s2member_paypal_api_signature" id="ws-plugin--s2member-paypal-api-signature" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_signature"]) . '" /><br />' . "\n";
127
  echo 'In your PayPal® account, go to: <code>Profile -> Request API Credentials</code>.' . "\n";
128
  echo '</td>' . "\n";
129
  /**/
@@ -186,7 +186,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_ops"))
186
  /**/
187
  echo '<td>' . "\n";
188
  echo '<input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-0" value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-1" value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-1">Yes, enable debugging, with API, IPN &amp; Return Page logging.</label><br />' . "\n";
189
- echo '<em>This enables API, IPN and Return Page logging. The log files are stored here:<br /><code>' . esc_html (preg_replace ("/^" . preg_quote ($_SERVER["DOCUMENT_ROOT"], "/") . "/", "", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"])) . '</code></em>' . "\n";
190
  echo '</td>' . "\n";
191
  /**/
192
  echo '</tr>' . "\n";
@@ -270,7 +270,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_ops"))
270
  echo '<tr>' . "\n";
271
  /**/
272
  echo '<td>' . "\n";
273
- echo '<input type="text" name="ws_plugin__s2member_paypal_identity_token" id="ws-plugin--s2member-paypal-identity-token" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_identity_token"]) . '" /><br />' . "\n";
274
  echo 'Your PDT Identity Token will appear under <em>Profile -> Website Payment Preferences</em> in your PayPal® account.' . "\n";
275
  echo '</td>' . "\n";
276
  /**/
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_paypal_ops"))
21
  {
106
  echo '<tr>' . "\n";
107
  /**/
108
  echo '<td>' . "\n";
109
+ echo '<input type="password" name="ws_plugin__s2member_paypal_api_password" id="ws-plugin--s2member-paypal-api-password" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_password"]) . '" /><br />' . "\n";
110
  echo 'In your PayPal® account, go to: <code>Profile -> Request API Credentials</code>.' . "\n";
111
  echo '</td>' . "\n";
112
  /**/
123
  echo '<tr>' . "\n";
124
  /**/
125
  echo '<td>' . "\n";
126
+ echo '<input type="password" name="ws_plugin__s2member_paypal_api_signature" id="ws-plugin--s2member-paypal-api-signature" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_signature"]) . '" /><br />' . "\n";
127
  echo 'In your PayPal® account, go to: <code>Profile -> Request API Credentials</code>.' . "\n";
128
  echo '</td>' . "\n";
129
  /**/
186
  /**/
187
  echo '<td>' . "\n";
188
  echo '<input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-0" value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__s2member_gateway_debug_logs" id="ws-plugin--s2member-gateway-debug-logs-1" value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-gateway-debug-logs-1">Yes, enable debugging, with API, IPN &amp; Return Page logging.</label><br />' . "\n";
189
+ echo '<em>This enables API, IPN and Return Page logging. The log files are stored here:<br /><code>' . esc_html (c_ws_plugin__s2member_utils_dirs::doc_root_path ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"])) . '</code></em>' . "\n";
190
  echo '</td>' . "\n";
191
  /**/
192
  echo '</tr>' . "\n";
270
  echo '<tr>' . "\n";
271
  /**/
272
  echo '<td>' . "\n";
273
+ echo '<input type="password" name="ws_plugin__s2member_paypal_identity_token" id="ws-plugin--s2member-paypal-identity-token" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_identity_token"]) . '" /><br />' . "\n";
274
  echo 'Your PDT Identity Token will appear under <em>Profile -> Website Payment Preferences</em> in your PayPal® account.' . "\n";
275
  echo '</td>' . "\n";
276
  /**/
includes/menu-pages/res-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_res_ops"))
21
  {
@@ -282,8 +282,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_res_ops"))
282
  /**/
283
  echo '<div class="ws-menu-page-section ws-plugin--s2member-query-level-access-section">' . "\n";
284
  echo '<h3>Alternative View Protection ( optional / experimental )</h3>' . "\n";
285
- echo '<p>s2Member protects Categories, Tags, Posts, Pages, Files, URIs &amp; more. BUT, even with all of those security restrictions, it\'s still possible for protected content excerpts to be seen through XML feeds, in search results generated by WordPress®; and/or ( depending on your theme ), possibly in other Archive views; which might include: Posts by Author, Posts by Date, a list of featured items formulated by your theme, OR even through other widgets/plugins adding functionality to your site. ~ We refer to all of these collectively, as "Alternative Views".</p>' . "\n";
286
- echo '<p>Using the options below, you can tell s2Member to protect some ( or all ) of these "Alternative Views", by filtering WordPress® database queries for you. s2Member can automatically hide protected content that is NOT available to the current User/Member. In other words, s2Member is capable of pre-filtering ALL database queries, so that excerpts of protected content will not be allowed to slip through. This is marked "experimental", because we\'re still testing this against MANY widget/plugin/theme combinations. Please <a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Forum URI")) . '" target="_blank">report</a> all bugs.</p>' . "\n";
287
  do_action ("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_uri_level_access", get_defined_vars ());
288
  /**/
289
  echo '<table class="form-table">' . "\n";
@@ -300,15 +300,15 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_res_ops"))
300
  echo '<tr>' . "\n";
301
  /**/
302
  echo '<td>' . "\n";
303
- echo '<select name="ws_plugin__s2member_filter_wp_query" id="ws-plugin--s2member-filter-wp-query">' . "\n";
304
- echo '<option value="none"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["filter_wp_query"] === "none") ? ' selected="selected"' : '') . '>None ( do NOT filter any WordPress® queries )</option>' . "\n";
305
- echo '<option value="feeds"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["filter_wp_query"] === "feeds") ? ' selected="selected"' : '') . '>Feeds Only ( hide protected content in feeds only )</option>' . "\n";
306
- echo '<option value="searches"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["filter_wp_query"] === "searches") ? ' selected="selected"' : '') . '>Searches Only ( hide protected content in search results only )</option>' . "\n";
307
- echo '<option value="searches,feeds"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["filter_wp_query"] === "searches,feeds") ? ' selected="selected"' : '') . '>Searches &amp; Feeds Only ( hide protected content in search results &amp; feeds only )</option>' . "\n";
308
- echo '<option value="all"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["filter_wp_query"] === "all") ? ' selected="selected"' : '') . '>Yes ( filter ALL WordPress® queries; protecting all Alternative Views )</option>' . "\n";
309
- echo '</select><br />' . "\n";
310
- echo 'Attn Developers: Filters can be suppressed dynamically, using this technique:<br />' . "\n";
311
- echo '<code>query_posts(" ... &amp;suppress_filters=true");</code>' . "\n";
312
  echo '</td>' . "\n";
313
  /**/
314
  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_res_ops"))
21
  {
282
  /**/
283
  echo '<div class="ws-menu-page-section ws-plugin--s2member-query-level-access-section">' . "\n";
284
  echo '<h3>Alternative View Protection ( optional / experimental )</h3>' . "\n";
285
+ echo '<p>s2Member protects Categories, Tags, Posts, Pages, Files, URIs &amp; more. BUT, even with all of those security restrictions, it\'s still possible for protected content excerpts to be seen through XML feeds, in search results generated by WordPress®; and/or <em>( depending on your theme )</em>, possibly in other Archive views; which might include: Posts by Author, Posts by Date, a list of featured items formulated by your theme, OR even through other widgets/plugins adding functionality to your site. ~ We refer to all of these collectively, as "Alternative Views".</p>' . "\n";
286
+ echo '<p>Using the options below, you can tell s2Member to protect some <em>( or all )</em> of these "Alternative Views", by filtering WordPress® database queries for you. s2Member can automatically hide protected content that is NOT available to the current User/Member. In other words, s2Member is capable of pre-filtering ALL database queries, so that excerpts of protected content will not be allowed to slip through. This is marked "experimental", because we\'re still testing this against MANY widget/plugin/theme combinations. Please <a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Forum URI")) . '" target="_blank">report</a> all bugs.</p>' . "\n";
287
  do_action ("ws_plugin__s2member_during_res_ops_page_during_left_sections_during_uri_level_access", get_defined_vars ());
288
  /**/
289
  echo '<table class="form-table">' . "\n";
300
  echo '<tr>' . "\n";
301
  /**/
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";
309
+ echo '<code><a href="http://codex.wordpress.org/Function_Reference/query_posts" target="_blank" rel="external">query_posts</a>("suppress_filters=true");</code><br />' . "\n";
310
+ echo '<code><a href="http://codex.wordpress.org/Function_Reference/get_posts" target="_blank" rel="external">get_posts</a>()</code> auto-suppresses filters.<br />' . "\n";
311
+ echo 'Also see <a href="http://www.primothemes.com/forums/viewtopic.php?f=40&t=12453#src_doc_attach_s2member_query_filters%28%29" target="_blank" rel="external">this article</a> in the s2Member® Codex.' . "\n";
312
  echo '</td>' . "\n";
313
  /**/
314
  echo '</tr>' . "\n";
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
  {
@@ -363,7 +363,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_scripting"))
363
  echo '<div class="ws-menu-page-section ws-plugin--s2member-custom-capability-files-section">' . "\n";
364
  echo '<h3>Restricting Files, Based On Custom Capabilities</h3>' . "\n";
365
  echo '<p>If you\'re NOT familiar with Custom Capabilities yet, please read the section above, titled: `Custom Capability Packages`, and also see: `s2Member -> Download Options`, both as primers; BEFORE you read this section. Once you understand the basic concept of Custom Capabilities &amp; Protected File Downloads, you\'ll see that ( by default ) s2Member does NOT handle File Download Protection with respect to Custom Capabilities. That\'s where Custom Capability Sub-directories come in.</p>' . "\n";
366
- echo '<p>You can create Custom Capability Sub-directories under: <code>' . esc_html (preg_replace ("/^" . preg_quote ($_SERVER["DOCUMENT_ROOT"], "/") . "/", "", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '</code>. For instance, if you have a Custom Capability <code>music</code>, you can place protected files that should ONLY be accessible to Members with <code>access_s2member_ccap_music</code>, inside: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-ccap-music/</code>. Some examples are provided below.</p>' . "\n";
367
  do_action ("ws_plugin__s2member_during_scripting_page_during_left_sections_during_custom_capability_files", get_defined_vars ());
368
  /**/
369
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
@@ -374,8 +374,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_scripting"))
374
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
375
  /**/
376
  echo '<p><strong>Custom Capabilities:</strong> ( music,videos )</p>' . "\n";
377
- echo '<p>Sub-Directory: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-ccap-music</code><br />Sub-Directory: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-ccap-videos</code></p>' . "\n";
378
- echo '<p>Protected File: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-ccap-music/file.mp3</code><br />Protected File: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-ccap-videos/file.avi</code></p>' . "\n";
379
  echo '<p>Now, here are some link examples, using Custom Capability Sub-directories:</p>' . "\n";
380
  echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/ccap-file-downloads.php")) . '</p>' . "\n";
381
  echo '<p><em>These links will ONLY work for Members who are logged-in, with the proper Capabilities.</em></p>' . "\n";
@@ -383,8 +383,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_scripting"))
383
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
384
  /**/
385
  echo '<p><strong>Membership Levels:</strong> ( this also works fine )</p>' . "\n";
386
- echo '<p>Sub-Directory: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level0</code><br />Sub-Directory: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level1</code><br />Sub-Directory: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level2</code><br />Sub-Directory: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level3</code><br />Sub-Directory: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level4</code></p>' . "\n";
387
- echo '<p>Protected File: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level0/tiger.doc</code><br />Protected File: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level1/zebra.pdf</code><br />Protected File: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level2/elephant.doc</code><br />Protected File: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level3/rhino.pdf</code><br />Protected File: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dirs ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level4/lion.doc</code></p>' . "\n";
388
  echo '<p>Now, here are some link examples, using Member Level Sub-directories:</p>' . "\n";
389
  echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/level-file-downloads.php")) . '</p>' . "\n";
390
  echo '<p><em>These links will ONLY work for Members who are logged-in, with an adequate Membership Level.</em></p>' . "\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_scripting"))
21
  {
363
  echo '<div class="ws-menu-page-section ws-plugin--s2member-custom-capability-files-section">' . "\n";
364
  echo '<h3>Restricting Files, Based On Custom Capabilities</h3>' . "\n";
365
  echo '<p>If you\'re NOT familiar with Custom Capabilities yet, please read the section above, titled: `Custom Capability Packages`, and also see: `s2Member -> Download Options`, both as primers; BEFORE you read this section. Once you understand the basic concept of Custom Capabilities &amp; Protected File Downloads, you\'ll see that ( by default ) s2Member does NOT handle File Download Protection with respect to Custom Capabilities. That\'s where Custom Capability Sub-directories come in.</p>' . "\n";
366
+ echo '<p>You can create Custom Capability Sub-directories under: <code>' . esc_html (c_ws_plugin__s2member_utils_dirs::doc_root_path ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '</code>. For instance, if you have a Custom Capability <code>music</code>, you can place protected files that should ONLY be accessible to Members with <code>access_s2member_ccap_music</code>, inside: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-ccap-music/</code>. Some examples are provided below.</p>' . "\n";
367
  do_action ("ws_plugin__s2member_during_scripting_page_during_left_sections_during_custom_capability_files", get_defined_vars ());
368
  /**/
369
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
374
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
375
  /**/
376
  echo '<p><strong>Custom Capabilities:</strong> ( music,videos )</p>' . "\n";
377
+ echo '<p>Sub-Directory: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-ccap-music</code><br />Sub-Directory: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-ccap-videos</code></p>' . "\n";
378
+ echo '<p>Protected File: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-ccap-music/file.mp3</code><br />Protected File: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-ccap-videos/file.avi</code></p>' . "\n";
379
  echo '<p>Now, here are some link examples, using Custom Capability Sub-directories:</p>' . "\n";
380
  echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/ccap-file-downloads.php")) . '</p>' . "\n";
381
  echo '<p><em>These links will ONLY work for Members who are logged-in, with the proper Capabilities.</em></p>' . "\n";
383
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
384
  /**/
385
  echo '<p><strong>Membership Levels:</strong> ( this also works fine )</p>' . "\n";
386
+ echo '<p>Sub-Directory: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level0</code><br />Sub-Directory: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level1</code><br />Sub-Directory: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level2</code><br />Sub-Directory: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level3</code><br />Sub-Directory: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level4</code></p>' . "\n";
387
+ echo '<p>Protected File: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level0/tiger.doc</code><br />Protected File: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level1/zebra.pdf</code><br />Protected File: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level2/elephant.doc</code><br />Protected File: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level3/rhino.pdf</code><br />Protected File: <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/access-s2member-level4/lion.doc</code></p>' . "\n";
388
  echo '<p>Now, here are some link examples, using Member Level Sub-directories:</p>' . "\n";
389
  echo '<p>' . c_ws_plugin__s2member_utils_strings::highlight_php (file_get_contents (dirname (__FILE__) . "/code-samples/level-file-downloads.php")) . '</p>' . "\n";
390
  echo '<p><em>These links will ONLY work for Members who are logged-in, with an adequate Membership Level.</em></p>' . "\n";
includes/s2member-min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(b){ws_plugin__s2member_uniqueFilesDownloaded=[];var a='<?php echo c_ws_plugin__s2member_utils_strings::esc_sq (preg_quote ((c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? "/" . ltrim (BP_REGISTER_SLUG,"/") : ""), "/"); ?>';var c='<?php echo c_ws_plugin__s2member_utils_strings::esc_sq (preg_quote ((c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? "/" . ltrim (BP_XPROFILE_SLUG,"/") : ""), "/"); ?>';if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN&&S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY<S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED){b('a[href*="s2member_file_download"]').click(function(){if(!this.href.match(/s2member_file_download_key\=(.+)/i)){var d="** Please Confirm This File Download **\n\n";d+="You've downloaded "+S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY+" protected file"+((S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY!==1)?"s":"")+" in the last "+S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS+" days.\n\n";d+="You're entitled to "+((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED)?"UNLIMITED downloads though ( so, no worries ).":S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED+" unique downloads every "+S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS+" day period.");if(this.href.match(/s2member_skip_confirmation/i)||confirm(d)){if(b.inArray(this.href,ws_plugin__s2member_uniqueFilesDownloaded)===-1){ws_plugin__s2member_uniqueFilesDownloaded.push(this.href),S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY++}return true}else{return false}}else{return true}})}if(!location.href.match(/\/wp-admin\//)){b("input#ws-plugin--s2member-profile-password1, input#ws-plugin--s2member-profile-password2").keyup(function(){ws_plugin__s2member_passwordStrength(b("input#ws-plugin--s2member-profile-login"),b("input#ws-plugin--s2member-profile-password1"),b("input#ws-plugin--s2member-profile-password2"),b("div#ws-plugin--s2member-profile-password-strength"))});b("form#ws-plugin--s2member-profile").submit(function(){var f=this,e="",d="",j="";var h=b("input#ws-plugin--s2member-profile-password1",f);var g=b("input#ws-plugin--s2member-profile-password2",f);var i=b("input#ws-plugin--s2member-profile-submit",f);b(":input",f).each(function(){var k=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(k&&(e=b.trim(b('label[for="'+k+'"]',f).first().children("strong").first().text().replace(/[\r\n\t]+/g," ")))){if(d=ws_plugin__s2member_validationErrors(e,this,f)){j+=d+"\n\n"}}});if(j=b.trim(j)){alert("— Oops, you missed something: —\n\n"+j);return false}else{if(b.trim(h.val())&&b.trim(h.val())!==b.trim(g.val())){alert("— Oops, you missed something: —\n\nPasswords do not match up. Please try again.");return false}}ws_plugin__s2member_animateProcessing(i);return true})}if(location.href.match(/\/wp-signup\.php/)){b("div#content > div.mu_register > form#setupform").submit(function(){var f=this,e="",d="",h="";b("input#user_email",f).attr("data-expected","email");var g=b('p.submit input[type="submit"]',f);b("input#user_name, input#user_email, input#blogname, input#blog_title, input#captcha_code",f).attr({"aria-required":"true"});b(":input",f).each(function(){var i=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(i&&(e=b.trim(b('label[for="'+i+'"]',f).first().text().replace(/[\r\n\t]+/g," ")))){if(d=ws_plugin__s2member_validationErrors(e,this,f)){h+=d+"\n\n"}}});if(h=b.trim(h)){alert("— Oops, you missed something: —\n\n"+h);return false}ws_plugin__s2member_animateProcessing(g);return true})}else{if(location.href.match(/\/wp-login\.php/)){b("input#ws-plugin--s2member-custom-reg-field-user-pass1, input#ws-plugin--s2member-custom-reg-field-user-pass2").keyup(function(){ws_plugin__s2member_passwordStrength(b("input#user_login"),b("input#ws-plugin--s2member-custom-reg-field-user-pass1"),b("input#ws-plugin--s2member-custom-reg-field-user-pass2"),b("div#ws-plugin--s2member-custom-reg-field-user-pass-strength"))});b("div#login > form#registerform input#wp-submit").attr("tabindex","1000");b("div#login > form#registerform").submit(function(){var f=this,e="",d="",j="";b("input#user_email",f).attr("data-expected","email");var i=b('input#ws-plugin--s2member-custom-reg-field-user-pass1[aria-required="true"]',f);var g=b("input#ws-plugin--s2member-custom-reg-field-user-pass2",f);var h=b("input#wp-submit",f);b("input#user_login, input#user_email, input#captcha_code",f).attr({"aria-required":"true"});b(":input",f).each(function(){var k=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(b.inArray(k,["user_login","user_email","captcha_code"])!==-1){if((e=b.trim(b(this).parent("label").text().replace(/[\r\n\t]+/g," ")))){if(d=ws_plugin__s2member_validationErrors(e,this,f)){j+=d+"\n\n"}}}else{if(k&&(e=b.trim(b('label[for="'+k+'"]',f).first().children("span").first().text().replace(/[\r\n\t]+/g," ")))){if(d=ws_plugin__s2member_validationErrors(e,this,f)){j+=d+"\n\n"}}}});if(j=b.trim(j)){alert("— Oops, you missed something: —\n\n"+j);return false}else{if(i.length&&b.trim(i.val())!==b.trim(g.val())){alert("— Oops, you missed something: —\n\nPasswords do not match up. Please try again.");return false}}ws_plugin__s2member_animateProcessing(h);return true})}else{if(location.href.match(/\/wp-admin\/(user\/)?profile\.php/)){b("form#your-profile").submit(function(){var f=this,e="",d="",g="";b("input#email",f).attr("data-expected","email");b(':input[id^="ws-plugin--s2member-profile-"]',f).each(function(){var h=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(h&&(e=b.trim(b('label[for="'+h+'"]',f).first().text().replace(/[\r\n\t]+/g," ")))){if(d=ws_plugin__s2member_validationErrors(e,this,f)){g+=d+"\n\n"}}});if(g=b.trim(g)){alert("— Oops, you missed something: —\n\n"+g);return false}return true})}else{if(a&&location.href.match(a)){b("body.registration form div#ws-plugin--s2member-custom-reg-fields-4bp-section").closest("form").submit(function(){var f=this,e="",d="",g="";b("input#signup_email",f).attr("data-expected","email");b("input#signup_username, input#signup_email, input#signup_password, input#field_1",f).attr({"aria-required":"true"});b(":input",f).each(function(){var h=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(h&&(e=b.trim(b('label[for="'+h+'"]',f).first().text().replace(/[\r\n\t]+/g," ")))){if(d=ws_plugin__s2member_validationErrors(e,this,f)){g+=d+"\n\n"}}});if(g=b.trim(g)){alert("— Oops, you missed something: —\n\n"+g);return false}return true})}else{if(c&&location.href.match(c)&&location.href.match(/\/edit\//)){b('body.logged-in.profile.profile-edit input.ws-plugin--s2member-profile-field-4bp[type = "text"]').closest("form").submit(function(){var f=this,e="",d="",g="";b("input#field_1",f).attr({"aria-required":"true"});b(":input",f).each(function(){var h=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(h&&(e=b.trim(b('label[for="'+h+'"]',f).first().text().replace(/[\r\n\t]+/g," ")))){if(d=ws_plugin__s2member_validationErrors(e,this,f)){g+=d+"\n\n"}}});if(g=b.trim(g)){alert("— Oops, you missed something: —\n\n"+g);return false}return true})}}}}}ws_plugin__s2member_passwordStrength=function(e,g,f,d){if(e instanceof jQuery&&g instanceof jQuery&&f instanceof jQuery&&d instanceof jQuery&&typeof passwordStrength==="function"&&typeof pwsL10n==="object"){d.removeClass("ws-plugin--s2member-password-strength-short ws-plugin--s2member-password-strength-bad ws-plugin--s2member-password-strength-good ws-plugin--s2member-password-strength-strong ws-plugin--s2member-password-strength-mismatch");switch(passwordStrength(g.val(),e.val(),f.val())){case 1:d.addClass("ws-plugin--s2member-password-strength-short").html(pwsL10n["short"]);break;case 2:d.addClass("ws-plugin--s2member-password-strength-bad").html(pwsL10n.bad);break;case 3:d.addClass("ws-plugin--s2member-password-strength-good").html(pwsL10n.good);break;case 4:d.addClass("ws-plugin--s2member-password-strength-strong").html(pwsL10n.strong);break;case 5:d.addClass("ws-plugin--s2member-password-strength-mismatch").html(pwsL10n.mismatch);break;default:d.addClass("ws-plugin--s2member-password-strength-short").html(pwsL10n["short"])}}return};ws_plugin__s2member_validationErrors=function(p,o,e,k,j){if(typeof p==="string"&&p&&typeof o==="object"&&typeof e==="object"){if(typeof o.tagName==="string"&&o.tagName.match(/^(input|textarea|select)$/i)&&!o.disabled){var r=o.tagName.toLowerCase(),n=b(o),m=b.trim(n.attr("type")).toLowerCase(),d=b.trim(n.attr("name")),q=n.val();var k=(typeof k==="boolean")?k:(n.attr("aria-required")==="true"),j=(typeof j==="string")?j:b.trim(n.attr("data-expected"));var i=('<?php echo strlen($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"]); ?>'>0)?true:false;var g=new RegExp('^(<?php echo c_ws_plugin__s2member_utils_strings::esc_sq(implode("|", preg_split("/[\r\n\t ;,]+/", preg_quote($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"], "/")))); ?>)@',"i");if(r==="input"&&m==="checkbox"&&d.match(/\[\]$/)){if(typeof o.id==="string"&&o.id.match(/-0$/)){if(k&&!b('input[name="'+d.replace(/([\[\]])/g,"$1")+'"]:checked',e).length){return p+"\nPlease check at least one of the boxes."}}}else{if(r==="input"&&m==="checkbox"){if(k&&!o.checked){return p+"\nRequired. This box must be checked."}}else{if(r==="input"&&m==="radio"){if(typeof o.id==="string"&&o.id.match(/-0$/)){if(k&&!b('input[name="'+d.replace(/([\[\]])/g,"$1")+'"]:checked',e).length){return p+"\nPlease select one of the options."}}}else{if(r==="select"&&n.attr("multiple")){if(k&&(!(q instanceof Array)||!q.length)){return p+"\nPlease select at least one of the options."}}else{if(typeof q!=="string"||(k&&!(q=b.trim(q)).length)){return p+"\nThis is a required field, please try again."}else{if((q=b.trim(q)).length&&((r==="input"&&m.match(/^(text|password)$/i))||r==="textarea")&&typeof j==="string"&&j.length){if(j==="numeric-wp-commas"&&(!q.match(/^[0-9\.,]+$/)||isNaN(q.replace(/,/g,"")))){return p+"\nMust be numeric ( with or without decimals, commas allowed )."}else{if(j==="numeric"&&(!q.match(/^[0-9\.]+$/)||isNaN(q))){return p+"\nMust be numeric ( with or without decimals, no commas )."}else{if(j==="integer"&&(!q.match(/^[0-9]+$/)||isNaN(q))){return p+"\nMust be an integer ( a whole number, without any decimals )."}else{if(j==="integer-gt-0"&&(!q.match(/^[0-9]+$/)||isNaN(q)||q<=0)){return p+"\nMust be an integer > 0 ( whole number, no decimals, greater than 0 )."}else{if(j==="float"&&(!q.match(/^[0-9\.]+$/)||!q.match(/[0-9]/)||!q.match(/\./)||isNaN(q))){return p+"\nMust be a float ( floating point number, decimals required )."}else{if(j==="float-gt-0"&&(!q.match(/^[0-9\.]+$/)||!q.match(/[0-9]/)||!q.match(/\./)||isNaN(q)||q<=0)){return p+"\nMust be a float > 0 ( floating point number, decimals required, greater than 0 )."}else{if(j==="date"&&!q.match(/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}$/)){return p+"\nMust be a date ( required date format: dd/mm/yyyy )."}else{if(j==="email"&&!q.match(/^([a-z_~0-9\+\-]+)(((\.?)([a-z_~0-9\+\-]+))*)(@)([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){return p+"\nMust be a valid email address."}else{if(j==="email"&&i&&q.match(g)){return p+"\nPlease use a personal email address.\nAddresses like <"+q.split("@")[0]+"@> are problematic."}else{if(j==="url"&&!q.match(/^http(s?)\:\/\/(.{5,})$/i)){return p+"\nMust be a full URL ( starting with http or https )."}else{if(j==="domain"&&!q.match(/^([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){return p+"\nMust be a domain name ( domain name only, without http )."}else{if(j==="phone"&&(!q.match(/^[0-9 \(\)\-]+$/)||q.replace(/[^0-9]/g,"").length!==10)){return p+"\nMust be a phone # ( 10 digits w/possible hyphens,spaces,brackets )."}else{if(j==="uszip"&&!q.match(/^[0-9]{5}(-[0-9]{4})?$/)){return p+"\nMust be a US zipcode ( 5-9 digits w/possible hyphen )."}else{if(j==="cazip"&&!q.match(/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i)){return p+"\nMust be a Canadian zipcode ( 6 alpha-numerics w/possible space )."}else{if(j==="uczip"&&!q.match(/^[0-9]{5}(-[0-9]{4})?$/)&&!q.match(/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i)){return p+"\nMust be a zipcode ( either a US or Canadian zipcode )."}else{if(j.match(/^alphanumerics-spaces-punctuation-([0-9]+)(-e)?$/)&&!q.match(/^[a-z 0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i)){return p+"\nPlease use alphanumerics, spaces & punctuation only."}else{if(j.match(/^alphanumerics-spaces-([0-9]+)(-e)?$/)&&!q.match(/^[a-z 0-9]+$/i)){return p+"\nPlease use alphanumerics & spaces only."}else{if(j.match(/^alphanumerics-punctuation-([0-9]+)(-e)?$/)&&!q.match(/^[a-z0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i)){return p+"\nPlease use alphanumerics & punctuation only ( no spaces )."}else{if(j.match(/^alphanumerics-([0-9]+)(-e)?$/)&&!q.match(/^[a-z0-9]+$/i)){return p+"\nPlease use alphanumerics only ( no spaces/punctuation )."}else{if(j.match(/^alphabetics-([0-9]+)(-e)?$/)&&!q.match(/^[a-z]+$/i)){return p+"\nPlease use alphabetics only ( no digits/spaces/punctuation )."}else{if(j.match(/^numerics-([0-9]+)(-e)?$/)&&!q.match(/^[0-9]+$/i)){return p+"\nPlease use numeric digits only."}else{if(j.match(/^(any|alphanumerics-spaces-punctuation|alphanumerics-spaces|alphanumerics-punctuation|alphanumerics|alphabetics|numerics)-([0-9]+)(-e)?$/)){var l=j.split("-"),f=Number(l[1]),h=(l.length>2)?Number(l[2]):"";if(h&&q.length!==f){return p+"\nMust be exactly "+f+" "+((l[0]==="numerics")?"digit":"character")+((f>1)?"s":"")+"."}else{if(q.length<f){return p+"\nMust be at least "+f+" "+((l[0]==="numerics")?"digit":"character")+((f>1)?"s":"")+"."}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}return""};ws_plugin__s2member_animateProcessingConfig={originalText:"",interval:null,speed:100},ws_plugin__s2member_animateProcessing=function(e,d){if(e instanceof jQuery){if(d){clearInterval(ws_plugin__s2member_animateProcessingConfig.interval);if(ws_plugin__s2member_animateProcessingConfig.originalText){e.val(ws_plugin__s2member_animateProcessingConfig.originalText)}return}e.first().each(function(){var h=b(this),g=0,f="r",j=[".","..","..."];ws_plugin__s2member_animateProcessingConfig.originalText=h.val();clearInterval(ws_plugin__s2member_animateProcessingConfig.interval);ws_plugin__s2member_animateProcessingConfig.interval=setInterval(function(){if(f==="r"){if(g+1<=j.length-1){g=g+1,f="r"}else{g=g-1,f="l"}}else{if(f==="l"){if(g-1>=0){g=g-1,f="l"}else{g=g+1,f="r"}}}for(var k=j[g],i=j[g].length;i<j.length;i++){k+=" "}h.val("Processing"+k)},ws_plugin__s2member_animateProcessingConfig.speed)})}}});
1
+ jQuery(document).ready(function(b){ws_plugin__s2member_uniqueFilesDownloaded=[];var a='<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (preg_quote ((c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? "/" . ltrim (BP_REGISTER_SLUG,"/") : "register"), "/"); ?>';var c='<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (preg_quote ((c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? "/" . ltrim (BP_XPROFILE_SLUG,"/") : "profile"), "/"); ?>';if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN&&S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY<S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED){b('a[href*="s2member_file_download"], a[href*="s2member-file"').click(function(){if(!this.href.match(/s2member_file_download_key\=(.+)/i)){var d='<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Confirm File Download —", "s2member-front", "s2member")); ?>\n\n';d+=b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`ve downloaded %s protected %s in the last %s.", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY,((S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("file", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("files", "s2member-front", "s2member")); ?>'),((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("24 hours", "s2member-front", "s2member")); ?>':b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("%s days", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS)))+"\n\n";d+=(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`re entitled to UNLIMITED downloads though ( so, no worries ).", "s2member-front", "s2member")); ?>':b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`re entitled to %s unique %s %s.", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED,((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("download", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("downloads", "s2member-front", "s2member")); ?>'),((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("each day", "s2member-front", "s2member")); ?>':b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("every %s-day period", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS)));if(this.href.match(/s2member_skip_confirmation/i)||confirm(d)){if(b.inArray(this.href,ws_plugin__s2member_uniqueFilesDownloaded)===-1){ws_plugin__s2member_uniqueFilesDownloaded.push(this.href),S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY++}return true}else{return false}}else{return true}})}if(!location.href.match(/\/wp-admin\//)){b("input#ws-plugin--s2member-profile-password1, input#ws-plugin--s2member-profile-password2").keyup(function(){ws_plugin__s2member_passwordStrength(b("input#ws-plugin--s2member-profile-login"),b("input#ws-plugin--s2member-profile-password1"),b("input#ws-plugin--s2member-profile-password2"),b("div#ws-plugin--s2member-profile-password-strength"))});b("form#ws-plugin--s2member-profile").submit(function(){var f=this,e="",d="",j="";var h=b("input#ws-plugin--s2member-profile-password1",f);var g=b("input#ws-plugin--s2member-profile-password2",f);var i=b("input#ws-plugin--s2member-profile-submit",f);b(":input",f).each(function(){var k=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(k&&(e=b.trim(b('label[for="'+k+'"]',f).first().children("strong").first().text().replace(/[\r\n\t]+/g," ")))){if(d=ws_plugin__s2member_validationErrors(e,this,f)){j+=d+"\n\n"}}});if(j=b.trim(j)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+j);return false}else{if(b.trim(h.val())&&b.trim(h.val())!==b.trim(g.val())){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Passwords do not match up. Please try again.", "s2member-front", "s2member")); ?>');return false}}ws_plugin__s2member_animateProcessing(i);return true})}if(location.href.match(/\/wp-signup\.php/)){b("div#content > div.mu_register > form#setupform").submit(function(){var f=this,e="",d="",h="";b("input#user_email",f).attr("data-expected","email");var g=b('p.submit input[type="submit"]',f);b("input#user_name, input#user_email, input#blogname, input#blog_title, input#captcha_code",f).attr({"aria-required":"true"});b(":input",f).each(function(){var i=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(i&&(e=b.trim(b('label[for="'+i+'"]',f).first().text().replace(/[\r\n\t]+/g," ")))){if(d=ws_plugin__s2member_validationErrors(e,this,f)){h+=d+"\n\n"}}});if(h=b.trim(h)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+h);return false}ws_plugin__s2member_animateProcessing(g);return true})}else{if(location.href.match(/\/wp-login\.php/)){b("input#ws-plugin--s2member-custom-reg-field-user-pass1, input#ws-plugin--s2member-custom-reg-field-user-pass2").keyup(function(){ws_plugin__s2member_passwordStrength(b("input#user_login"),b("input#ws-plugin--s2member-custom-reg-field-user-pass1"),b("input#ws-plugin--s2member-custom-reg-field-user-pass2"),b("div#ws-plugin--s2member-custom-reg-field-user-pass-strength"))});b("div#login > form#registerform input#wp-submit").attr("tabindex","1000");b("div#login > form#registerform").submit(function(){var f=this,e="",d="",j="";b("input#user_email",f).attr("data-expected","email");var i=b('input#ws-plugin--s2member-custom-reg-field-user-pass1[aria-required="true"]',f);var g=b("input#ws-plugin--s2member-custom-reg-field-user-pass2",f);var h=b("input#wp-submit",f);b("input#user_login, input#user_email, input#captcha_code",f).attr({"aria-required":"true"});b(":input",f).each(function(){var k=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(b.inArray(k,["user_login","user_email","captcha_code"])!==-1){if((e=b.trim(b(this).parent("label").text().replace(/[\r\n\t]+/g," ")))){if(d=ws_plugin__s2member_validationErrors(e,this,f)){j+=d+"\n\n"}}}else{if(k&&(e=b.trim(b('label[for="'+k+'"]',f).first().children("span").first().text().replace(/[\r\n\t]+/g," ")))){if(d=ws_plugin__s2member_validationErrors(e,this,f)){j+=d+"\n\n"}}}});if(j=b.trim(j)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+j);return false}else{if(i.length&&b.trim(i.val())!==b.trim(g.val())){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Passwords do not match up. Please try again.", "s2member-front", "s2member")); ?>');return false}}ws_plugin__s2member_animateProcessing(h);return true})}else{if(location.href.match(/\/wp-admin\/(user\/)?profile\.php/)){b("form#your-profile").submit(function(){var f=this,e="",d="",g="";b("input#email",f).attr("data-expected","email");b(':input[id^="ws-plugin--s2member-profile-"]',f).each(function(){var h=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(h&&(e=b.trim(b('label[for="'+h+'"]',f).first().text().replace(/[\r\n\t]+/g," ")))){if(d=ws_plugin__s2member_validationErrors(e,this,f)){g+=d+"\n\n"}}});if(g=b.trim(g)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+g);return false}return true})}else{if(a&&location.href.match(a)){b("body.registration form div#ws-plugin--s2member-custom-reg-fields-4bp-section").closest("form").submit(function(){var f=this,e="",d="",g="";b("input#signup_email",f).attr("data-expected","email");b("input#signup_username, input#signup_email, input#signup_password, input#field_1",f).attr({"aria-required":"true"});b(":input",f).each(function(){var h=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(h&&(e=b.trim(b('label[for="'+h+'"]',f).first().text().replace(/[\r\n\t]+/g," ")))){if(d=ws_plugin__s2member_validationErrors(e,this,f)){g+=d+"\n\n"}}});if(g=b.trim(g)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+g);return false}return true})}else{if(c&&location.href.match(c)&&location.href.match(/\/edit\//)){b('body.logged-in.profile.profile-edit input.ws-plugin--s2member-profile-field-4bp[type = "text"]').closest("form").submit(function(){var f=this,e="",d="",g="";b("input#field_1",f).attr({"aria-required":"true"});b(":input",f).each(function(){var h=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(h&&(e=b.trim(b('label[for="'+h+'"]',f).first().text().replace(/[\r\n\t]+/g," ")))){if(d=ws_plugin__s2member_validationErrors(e,this,f)){g+=d+"\n\n"}}});if(g=b.trim(g)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+g);return false}return true})}}}}}ws_plugin__s2member_passwordStrength=function(e,g,f,d){if(e instanceof jQuery&&g instanceof jQuery&&f instanceof jQuery&&d instanceof jQuery&&typeof passwordStrength==="function"&&typeof pwsL10n==="object"){d.removeClass("ws-plugin--s2member-password-strength-short ws-plugin--s2member-password-strength-bad ws-plugin--s2member-password-strength-good ws-plugin--s2member-password-strength-strong ws-plugin--s2member-password-strength-mismatch");switch(passwordStrength(g.val(),e.val(),f.val())){case 1:d.addClass("ws-plugin--s2member-password-strength-short").html(pwsL10n["short"]);break;case 2:d.addClass("ws-plugin--s2member-password-strength-bad").html(pwsL10n.bad);break;case 3:d.addClass("ws-plugin--s2member-password-strength-good").html(pwsL10n.good);break;case 4:d.addClass("ws-plugin--s2member-password-strength-strong").html(pwsL10n.strong);break;case 5:d.addClass("ws-plugin--s2member-password-strength-mismatch").html(pwsL10n.mismatch);break;default:d.addClass("ws-plugin--s2member-password-strength-short").html(pwsL10n["short"])}}return};ws_plugin__s2member_validationErrors=function(p,o,e,k,j){if(typeof p==="string"&&p&&typeof o==="object"&&typeof e==="object"){if(typeof o.tagName==="string"&&o.tagName.match(/^(input|textarea|select)$/i)&&!o.disabled){var r=o.tagName.toLowerCase(),n=b(o),m=b.trim(n.attr("type")).toLowerCase(),d=b.trim(n.attr("name")),q=n.val();var k=(typeof k==="boolean")?k:(n.attr("aria-required")==="true"),j=(typeof j==="string")?j:b.trim(n.attr("data-expected"));var i=('<?php echo strlen($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"]); ?>'>0)?true:false;var g=new RegExp('^(<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (implode ("|", preg_split ("/[\r\n\t ;,]+/", preg_quote ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"], "/")))); ?>)@',"i");if(r==="input"&&m==="checkbox"&&d.match(/\[\]$/)){if(typeof o.id==="string"&&o.id.match(/-0$/)){if(k&&!b('input[name="'+d.replace(/([\[\]])/g,"$1")+'"]:checked',e).length){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please check at least one of the boxes.", "s2member-front", "s2member")); ?>'}}}else{if(r==="input"&&m==="checkbox"){if(k&&!o.checked){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Required. This box must be checked.", "s2member-front", "s2member")); ?>'}}else{if(r==="input"&&m==="radio"){if(typeof o.id==="string"&&o.id.match(/-0$/)){if(k&&!b('input[name="'+d.replace(/([\[\]])/g,"$1")+'"]:checked',e).length){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please select one of the options.", "s2member-front", "s2member")); ?>'}}}else{if(r==="select"&&n.attr("multiple")){if(k&&(!(q instanceof Array)||!q.length)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please select at least one of the options.", "s2member-front", "s2member")); ?>'}}else{if(typeof q!=="string"||(k&&!(q=b.trim(q)).length)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("This is a required field, please try again.", "s2member-front", "s2member")); ?>'}else{if((q=b.trim(q)).length&&((r==="input"&&m.match(/^(text|password)$/i))||r==="textarea")&&typeof j==="string"&&j.length){if(j==="numeric-wp-commas"&&(!q.match(/^[0-9\.,]+$/)||isNaN(q.replace(/,/g,"")))){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be numeric ( with or without decimals, commas allowed ).", "s2member-front", "s2member")); ?>'}else{if(j==="numeric"&&(!q.match(/^[0-9\.]+$/)||isNaN(q))){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be numeric ( with or without decimals, no commas ).", "s2member-front", "s2member")); ?>'}else{if(j==="integer"&&(!q.match(/^[0-9]+$/)||isNaN(q))){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be an integer ( a whole number, without any decimals ).", "s2member-front", "s2member")); ?>'}else{if(j==="integer-gt-0"&&(!q.match(/^[0-9]+$/)||isNaN(q)||q<=0)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be an integer > 0 ( whole number, no decimals, greater than 0 ).", "s2member-front", "s2member")); ?>'}else{if(j==="float"&&(!q.match(/^[0-9\.]+$/)||!q.match(/[0-9]/)||!q.match(/\./)||isNaN(q))){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a float ( floating point number, decimals required ).", "s2member-front", "s2member")); ?>'}else{if(j==="float-gt-0"&&(!q.match(/^[0-9\.]+$/)||!q.match(/[0-9]/)||!q.match(/\./)||isNaN(q)||q<=0)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a float > 0 ( floating point number, decimals required, greater than 0 ).", "s2member-front", "s2member")); ?>'}else{if(j==="date"&&!q.match(/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}$/)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a date ( required date format: dd/mm/yyyy ).", "s2member-front", "s2member")); ?>'}else{if(j==="email"&&!q.match(/^([a-z_~0-9\+\-]+)(((\.?)([a-z_~0-9\+\-]+))*)(@)([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a valid email address.", "s2member-front", "s2member")); ?>'}else{if(j==="email"&&i&&q.match(g)){return p+"\n"+b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use a personal email address.\nAddresses like <%s@> are problematic.", "s2member-front", "s2member")); ?>',q.split("@")[0])}else{if(j==="url"&&!q.match(/^http(s?)\:\/\/(.{5,})$/i)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a full URL ( starting with http or https ).", "s2member-front", "s2member")); ?>'}else{if(j==="domain"&&!q.match(/^([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a domain name ( domain name only, without http ).", "s2member-front", "s2member")); ?>'}else{if(j==="phone"&&(!q.match(/^[0-9 \(\)\-]+$/)||q.replace(/[^0-9]/g,"").length!==10)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a phone # ( 10 digits w/possible hyphens,spaces,brackets ).", "s2member-front", "s2member")); ?>'}else{if(j==="uszip"&&!q.match(/^[0-9]{5}(-[0-9]{4})?$/)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a US zipcode ( 5-9 digits w/possible hyphen ).", "s2member-front", "s2member")); ?>'}else{if(j==="cazip"&&!q.match(/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a Canadian zipcode ( 6 alpha-numerics w/possible space ).", "s2member-front", "s2member")); ?>'}else{if(j==="uczip"&&!q.match(/^[0-9]{5}(-[0-9]{4})?$/)&&!q.match(/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a zipcode ( either a US or Canadian zipcode ).", "s2member-front", "s2member")); ?>'}else{if(j.match(/^alphanumerics-spaces-punctuation-([0-9]+)(-e)?$/)&&!q.match(/^[a-z 0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics, spaces & punctuation only.", "s2member-front", "s2member")); ?>'}else{if(j.match(/^alphanumerics-spaces-([0-9]+)(-e)?$/)&&!q.match(/^[a-z 0-9]+$/i)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics & spaces only.", "s2member-front", "s2member")); ?>'}else{if(j.match(/^alphanumerics-punctuation-([0-9]+)(-e)?$/)&&!q.match(/^[a-z0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics & punctuation only ( no spaces ).", "s2member-front", "s2member")); ?>'}else{if(j.match(/^alphanumerics-([0-9]+)(-e)?$/)&&!q.match(/^[a-z0-9]+$/i)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics only ( no spaces/punctuation ).", "s2member-front", "s2member")); ?>'}else{if(j.match(/^alphabetics-([0-9]+)(-e)?$/)&&!q.match(/^[a-z]+$/i)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphabetics only ( no digits/spaces/punctuation ).", "s2member-front", "s2member")); ?>'}else{if(j.match(/^numerics-([0-9]+)(-e)?$/)&&!q.match(/^[0-9]+$/i)){return p+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use numeric digits only.", "s2member-front", "s2member")); ?>'}else{if(j.match(/^(any|alphanumerics-spaces-punctuation|alphanumerics-spaces|alphanumerics-punctuation|alphanumerics|alphabetics|numerics)-([0-9]+)(-e)?$/)){var l=j.split("-"),f=Number(l[1]),h=(l.length>2)?Number(l[2]):"";if(h&&q.length!==f){return p+"\n"+b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be exactly %s %s.", "s2member-front", "s2member")); ?>',f,((l[0]==="numerics")?((f===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digit", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digits", "s2member-front", "s2member")); ?>'):((f===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("character", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("characters", "s2member-front", "s2member")); ?>')))}else{if(q.length<f){return p+"\n"+b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be at least %s %s.", "s2member-front", "s2member")); ?>',f,((l[0]==="numerics")?((f===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digit", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digits", "s2member-front", "s2member")); ?>'):((f===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("character", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("characters", "s2member-front", "s2member")); ?>')))}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}return""};ws_plugin__s2member_animateProcessingConfig={originalText:"",interval:null,speed:100},ws_plugin__s2member_animateProcessing=function(e,d){if(e instanceof jQuery){if(d){clearInterval(ws_plugin__s2member_animateProcessingConfig.interval);if(ws_plugin__s2member_animateProcessingConfig.originalText){e.val(ws_plugin__s2member_animateProcessingConfig.originalText)}return}e.first().each(function(){var h=b(this),g=0,f="r",j=[".","..","..."];ws_plugin__s2member_animateProcessingConfig.originalText=h.val();clearInterval(ws_plugin__s2member_animateProcessingConfig.interval);ws_plugin__s2member_animateProcessingConfig.interval=setInterval(function(){if(f==="r"){if(g+1<=j.length-1){g=g+1,f="r"}else{g=g-1,f="l"}}else{if(f==="l"){if(g-1>=0){g=g-1,f="l"}else{g=g+1,f="r"}}}for(var k=j[g],i=j[g].length;i<j.length;i++){k+=" "}h.val('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Processing", "s2member-front", "s2member")); ?>'+k)},ws_plugin__s2member_animateProcessingConfig.speed)})}}});
includes/s2member.js CHANGED
@@ -24,22 +24,22 @@ jQuery(document).ready (function($)
24
  ws_plugin__s2member_uniqueFilesDownloaded = []; /* Real-time counts. */
25
  /* This is used in case a user downloads multiple files from a single page. */
26
  /**/
27
- var bpRegisterSlug = '<?php echo c_ws_plugin__s2member_utils_strings::esc_sq (preg_quote ((c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? "/" . ltrim (BP_REGISTER_SLUG,"/") : ""), "/"); ?>';
28
- var bpxProfileSlug = '<?php echo c_ws_plugin__s2member_utils_strings::esc_sq (preg_quote ((c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? "/" . ltrim (BP_XPROFILE_SLUG,"/") : ""), "/"); ?>';
29
  /**/
30
  if (S2MEMBER_CURRENT_USER_IS_LOGGED_IN && S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY < S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED)
31
  {
32
- $('a[href*="s2member_file_download"]').click (function()
33
  {
34
  if (!this.href.match (/s2member_file_download_key\=(.+)/i))
35
  {
36
- var c = '** Please Confirm This File Download **\n\n';
37
- c += 'You\'ve downloaded ' + S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY + ' protected file' + ((S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY !== 1) ? 's' : '') + ' in the last ' + S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS + ' days.\n\n';
38
- c += 'You\'re entitled to ' + ((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED) ? 'UNLIMITED downloads though ( so, no worries ).' : S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED + ' unique downloads every ' + S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS + ' day period.');
39
  /**/
40
  if (this.href.match (/s2member_skip_confirmation/i) || confirm(c))
41
  {
42
- if ($.inArray (this.href, ws_plugin__s2member_uniqueFilesDownloaded) === -1) /* Real-time counting. */
43
  ws_plugin__s2member_uniqueFilesDownloaded.push (this.href), S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY++;
44
  return true; /* Allow. */
45
  }
@@ -83,14 +83,14 @@ jQuery(document).ready (function($)
83
  /**/
84
  if (errors = $.trim (errors))
85
  {
86
- alert('— Oops, you missed something: —\n\n' + errors);
87
  /**/
88
  return false;
89
  }
90
  /**/
91
  else if ($.trim ($password1.val ()) && $.trim ($password1.val ()) !== $.trim ($password2.val ()))
92
  {
93
- alert('— Oops, you missed something: —\n\nPasswords do not match up. Please try again.');
94
  /**/
95
  return false;
96
  }
@@ -128,7 +128,7 @@ jQuery(document).ready (function($)
128
  /**/
129
  if (errors = $.trim (errors))
130
  {
131
- alert('— Oops, you missed something: —\n\n' + errors);
132
  /**/
133
  return false;
134
  }
@@ -184,14 +184,14 @@ jQuery(document).ready (function($)
184
  /**/
185
  if (errors = $.trim (errors))
186
  {
187
- alert('— Oops, you missed something: —\n\n' + errors);
188
  /**/
189
  return false;
190
  }
191
  /**/
192
  else if ($pass1.length && $.trim ($pass1.val ()) !== $.trim ($pass2.val ()))
193
  {
194
- alert('— Oops, you missed something: —\n\nPasswords do not match up. Please try again.');
195
  /**/
196
  return false;
197
  }
@@ -225,7 +225,7 @@ jQuery(document).ready (function($)
225
  /**/
226
  if (errors = $.trim (errors))
227
  {
228
- alert('— Oops, you missed something: —\n\n' + errors);
229
  /**/
230
  return false;
231
  }
@@ -259,7 +259,7 @@ jQuery(document).ready (function($)
259
  /**/
260
  if (errors = $.trim (errors))
261
  {
262
- alert('— Oops, you missed something: —\n\n' + errors);
263
  /**/
264
  return false;
265
  }
@@ -291,7 +291,7 @@ jQuery(document).ready (function($)
291
  /**/
292
  if (errors = $.trim (errors))
293
  {
294
- alert('— Oops, you missed something: —\n\n' + errors);
295
  /**/
296
  return false;
297
  }
@@ -344,129 +344,129 @@ jQuery(document).ready (function($)
344
  var required = ( typeof required === 'boolean') ? required : ($field.attr ('aria-required') === 'true'), expected = ( typeof expected === 'string') ? expected : $.trim ($field.attr ('data-expected'));
345
  /**/
346
  var forcePersonalEmails = ('<?php echo strlen($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"]); ?>' > 0) ? true : false;
347
- var nonPersonalEmailUsers = new RegExp('^(<?php echo c_ws_plugin__s2member_utils_strings::esc_sq(implode("|", preg_split("/[\r\n\t ;,]+/", preg_quote($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"], "/")))); ?>)@', 'i');
348
  /**/
349
  if (tag === 'input' && type === 'checkbox' && name.match (/\[\]$/))
350
  {
351
  if (typeof field.id === 'string' && field.id.match (/-0$/))
352
  if (required && !$('input[name="' + name.replace (/([\[\]])/g, '\$1') + '"]:checked', context).length)
353
- return label + '\nPlease check at least one of the boxes.';
354
  }
355
  else if (tag === 'input' && type === 'checkbox')
356
  {
357
  if (required && !field.checked)
358
- return label + '\nRequired. This box must be checked.';
359
  }
360
  else if (tag === 'input' && type === 'radio')
361
  {
362
  if (typeof field.id === 'string' && field.id.match (/-0$/))
363
  if (required && !$('input[name="' + name.replace (/([\[\]])/g, '\$1') + '"]:checked', context).length)
364
- return label + '\nPlease select one of the options.';
365
  }
366
  else if (tag === 'select' && $field.attr ('multiple'))
367
  {
368
  if (required && (!(value instanceof Array) || !value.length))
369
- return label + '\nPlease select at least one of the options.';
370
  }
371
  else if (typeof value !== 'string' || (required && !(value = $.trim (value)).length))
372
  {
373
- return label + '\nThis is a required field, please try again.';
374
  }
375
  else if ((value = $.trim (value)).length && ((tag === 'input' && type.match (/^(text|password)$/i)) || tag === 'textarea') && typeof expected === 'string' && expected.length)
376
  {
377
  if (expected === 'numeric-wp-commas' && (!value.match (/^[0-9\.,]+$/) || isNaN(value.replace (/,/g, ''))))
378
  {
379
- return label + '\nMust be numeric ( with or without decimals, commas allowed ).';
380
  }
381
  else if (expected === 'numeric' && (!value.match (/^[0-9\.]+$/) || isNaN(value)))
382
  {
383
- return label + '\nMust be numeric ( with or without decimals, no commas ).';
384
  }
385
  else if (expected === 'integer' && (!value.match (/^[0-9]+$/) || isNaN(value)))
386
  {
387
- return label + '\nMust be an integer ( a whole number, without any decimals ).';
388
  }
389
  else if (expected === 'integer-gt-0' && (!value.match (/^[0-9]+$/) || isNaN(value) || value <= 0))
390
  {
391
- return label + '\nMust be an integer > 0 ( whole number, no decimals, greater than 0 ).';
392
  }
393
  else if (expected === 'float' && (!value.match (/^[0-9\.]+$/) || !value.match (/[0-9]/) || !value.match (/\./) || isNaN(value)))
394
  {
395
- return label + '\nMust be a float ( floating point number, decimals required ).';
396
  }
397
  else if (expected === 'float-gt-0' && (!value.match (/^[0-9\.]+$/) || !value.match (/[0-9]/) || !value.match (/\./) || isNaN(value) || value <= 0))
398
  {
399
- return label + '\nMust be a float > 0 ( floating point number, decimals required, greater than 0 ).';
400
  }
401
  else if (expected === 'date' && !value.match (/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}$/))
402
  {
403
- return label + '\nMust be a date ( required date format: dd/mm/yyyy ).';
404
  }
405
  else if (expected === 'email' && !value.match (/^([a-z_~0-9\+\-]+)(((\.?)([a-z_~0-9\+\-]+))*)(@)([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i))
406
  {
407
- return label + '\nMust be a valid email address.';
408
  }
409
  else if (expected === 'email' && forcePersonalEmails && value.match (nonPersonalEmailUsers))
410
  {
411
- return label + '\nPlease use a personal email address.\nAddresses like <' + value.split ('@')[0] + '@> are problematic.';
412
  }
413
  else if (expected === 'url' && !value.match (/^http(s?)\:\/\/(.{5,})$/i))
414
  {
415
- return label + '\nMust be a full URL ( starting with http or https ).';
416
  }
417
  else if (expected === 'domain' && !value.match (/^([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i))
418
  {
419
- return label + '\nMust be a domain name ( domain name only, without http ).';
420
  }
421
  else if (expected === 'phone' && (!value.match (/^[0-9 \(\)\-]+$/) || value.replace (/[^0-9]/g, '').length !== 10))
422
  {
423
- return label + '\nMust be a phone # ( 10 digits w/possible hyphens,spaces,brackets ).';
424
  }
425
  else if (expected === 'uszip' && !value.match (/^[0-9]{5}(-[0-9]{4})?$/))
426
  {
427
- return label + '\nMust be a US zipcode ( 5-9 digits w/possible hyphen ).';
428
  }
429
  else if (expected === 'cazip' && !value.match (/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i))
430
  {
431
- return label + '\nMust be a Canadian zipcode ( 6 alpha-numerics w/possible space ).';
432
  }
433
  else if (expected === 'uczip' && !value.match (/^[0-9]{5}(-[0-9]{4})?$/) && !value.match (/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i))
434
  {
435
- return label + '\nMust be a zipcode ( either a US or Canadian zipcode ).';
436
  }
437
  else if (expected.match (/^alphanumerics-spaces-punctuation-([0-9]+)(-e)?$/) && !value.match (/^[a-z 0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i))
438
  {
439
- return label + '\nPlease use alphanumerics, spaces & punctuation only.';
440
  }
441
  else if (expected.match (/^alphanumerics-spaces-([0-9]+)(-e)?$/) && !value.match (/^[a-z 0-9]+$/i))
442
  {
443
- return label + '\nPlease use alphanumerics & spaces only.';
444
  }
445
  else if (expected.match (/^alphanumerics-punctuation-([0-9]+)(-e)?$/) && !value.match (/^[a-z0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i))
446
  {
447
- return label + '\nPlease use alphanumerics & punctuation only ( no spaces ).';
448
  }
449
  else if (expected.match (/^alphanumerics-([0-9]+)(-e)?$/) && !value.match (/^[a-z0-9]+$/i))
450
  {
451
- return label + '\nPlease use alphanumerics only ( no spaces/punctuation ).';
452
  }
453
  else if (expected.match (/^alphabetics-([0-9]+)(-e)?$/) && !value.match (/^[a-z]+$/i))
454
  {
455
- return label + '\nPlease use alphabetics only ( no digits/spaces/punctuation ).';
456
  }
457
  else if (expected.match (/^numerics-([0-9]+)(-e)?$/) && !value.match (/^[0-9]+$/i))
458
  {
459
- return label + '\nPlease use numeric digits only.';
460
  }
461
  else if (expected.match (/^(any|alphanumerics-spaces-punctuation|alphanumerics-spaces|alphanumerics-punctuation|alphanumerics|alphabetics|numerics)-([0-9]+)(-e)?$/))
462
  {
463
  var split = expected.split ('-'), length = Number(split[1]), exactLength = (split.length > 2) ? Number(split[2]) : '';
464
  /**/
465
  if (exactLength && value.length !== length) /* An exact length is required? */
466
- return label + '\nMust be exactly ' + length + ' ' + ((split[0] === 'numerics') ? 'digit' : 'character') + ((length > 1) ? 's' : '') + '.';
467
  /**/
468
  else if (value.length < length) /* Otherwise, we interpret as the minimum length. */
469
- return label + '\nMust be at least ' + length + ' ' + ((split[0] === 'numerics') ? 'digit' : 'character') + ((length > 1) ? 's' : '') + '.';
470
  }
471
  }
472
  }
@@ -519,7 +519,7 @@ jQuery(document).ready (function($)
519
  _dots += ' '; /* Prevents jumping. */
520
  }
521
  /**/
522
- $this.val ('Processing' + _dots);
523
  }, ws_plugin__s2member_animateProcessingConfig.speed);
524
  });
525
  }
24
  ws_plugin__s2member_uniqueFilesDownloaded = []; /* Real-time counts. */
25
  /* This is used in case a user downloads multiple files from a single page. */
26
  /**/
27
+ var bpRegisterSlug = '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (preg_quote ((c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? "/" . ltrim (BP_REGISTER_SLUG,"/") : "register"), "/"); ?>';
28
+ var bpxProfileSlug = '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (preg_quote ((c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? "/" . ltrim (BP_XPROFILE_SLUG,"/") : "profile"), "/"); ?>';
29
  /**/
30
  if (S2MEMBER_CURRENT_USER_IS_LOGGED_IN && S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY < S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED)
31
  {
32
+ $('a[href*="s2member_file_download"], a[href*="s2member-file"').click (function()
33
  {
34
  if (!this.href.match (/s2member_file_download_key\=(.+)/i))
35
  {
36
+ var c = '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Confirm File Download —", "s2member-front", "s2member")); ?>' + '\n\n';
37
+ c += $.sprintf ('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`ve downloaded %s protected %s in the last %s.", "s2member-front", "s2member")); ?>', S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY, ((S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY === 1) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("file", "s2member-front", "s2member")); ?>' : '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("files", "s2member-front", "s2member")); ?>'), ((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS === 1) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("24 hours", "s2member-front", "s2member")); ?>' : $.sprintf ('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("%s days", "s2member-front", "s2member")); ?>', S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS))) + '\n\n';
38
+ c += (S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`re entitled to UNLIMITED downloads though ( so, no worries ).", "s2member-front", "s2member")); ?>' : $.sprintf ('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`re entitled to %s unique %s %s.", "s2member-front", "s2member")); ?>', S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED, ((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED === 1) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("download", "s2member-front", "s2member")); ?>' : '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("downloads", "s2member-front", "s2member")); ?>'), ((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS === 1) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("each day", "s2member-front", "s2member")); ?>' : $.sprintf ('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("every %s-day period", "s2member-front", "s2member")); ?>', S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS)));
39
  /**/
40
  if (this.href.match (/s2member_skip_confirmation/i) || confirm(c))
41
  {
42
+ if ($.inArray (this.href, ws_plugin__s2member_uniqueFilesDownloaded) === -1)
43
  ws_plugin__s2member_uniqueFilesDownloaded.push (this.href), S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY++;
44
  return true; /* Allow. */
45
  }
83
  /**/
84
  if (errors = $.trim (errors))
85
  {
86
+ alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>' + '\n\n' + errors);
87
  /**/
88
  return false;
89
  }
90
  /**/
91
  else if ($.trim ($password1.val ()) && $.trim ($password1.val ()) !== $.trim ($password2.val ()))
92
  {
93
+ alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>' + '\n\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Passwords do not match up. Please try again.", "s2member-front", "s2member")); ?>');
94
  /**/
95
  return false;
96
  }
128
  /**/
129
  if (errors = $.trim (errors))
130
  {
131
+ alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>' + '\n\n' + errors);
132
  /**/
133
  return false;
134
  }
184
  /**/
185
  if (errors = $.trim (errors))
186
  {
187
+ alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>' + '\n\n' + errors);
188
  /**/
189
  return false;
190
  }
191
  /**/
192
  else if ($pass1.length && $.trim ($pass1.val ()) !== $.trim ($pass2.val ()))
193
  {
194
+ alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>' + '\n\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Passwords do not match up. Please try again.", "s2member-front", "s2member")); ?>');
195
  /**/
196
  return false;
197
  }
225
  /**/
226
  if (errors = $.trim (errors))
227
  {
228
+ alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>' + '\n\n' + errors);
229
  /**/
230
  return false;
231
  }
259
  /**/
260
  if (errors = $.trim (errors))
261
  {
262
+ alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>' + '\n\n' + errors);
263
  /**/
264
  return false;
265
  }
291
  /**/
292
  if (errors = $.trim (errors))
293
  {
294
+ alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>' + '\n\n' + errors);
295
  /**/
296
  return false;
297
  }
344
  var required = ( typeof required === 'boolean') ? required : ($field.attr ('aria-required') === 'true'), expected = ( typeof expected === 'string') ? expected : $.trim ($field.attr ('data-expected'));
345
  /**/
346
  var forcePersonalEmails = ('<?php echo strlen($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"]); ?>' > 0) ? true : false;
347
+ var nonPersonalEmailUsers = new RegExp('^(<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (implode ("|", preg_split ("/[\r\n\t ;,]+/", preg_quote ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"], "/")))); ?>)@', 'i');
348
  /**/
349
  if (tag === 'input' && type === 'checkbox' && name.match (/\[\]$/))
350
  {
351
  if (typeof field.id === 'string' && field.id.match (/-0$/))
352
  if (required && !$('input[name="' + name.replace (/([\[\]])/g, '\$1') + '"]:checked', context).length)
353
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please check at least one of the boxes.", "s2member-front", "s2member")); ?>';
354
  }
355
  else if (tag === 'input' && type === 'checkbox')
356
  {
357
  if (required && !field.checked)
358
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Required. This box must be checked.", "s2member-front", "s2member")); ?>';
359
  }
360
  else if (tag === 'input' && type === 'radio')
361
  {
362
  if (typeof field.id === 'string' && field.id.match (/-0$/))
363
  if (required && !$('input[name="' + name.replace (/([\[\]])/g, '\$1') + '"]:checked', context).length)
364
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please select one of the options.", "s2member-front", "s2member")); ?>';
365
  }
366
  else if (tag === 'select' && $field.attr ('multiple'))
367
  {
368
  if (required && (!(value instanceof Array) || !value.length))
369
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please select at least one of the options.", "s2member-front", "s2member")); ?>';
370
  }
371
  else if (typeof value !== 'string' || (required && !(value = $.trim (value)).length))
372
  {
373
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("This is a required field, please try again.", "s2member-front", "s2member")); ?>';
374
  }
375
  else if ((value = $.trim (value)).length && ((tag === 'input' && type.match (/^(text|password)$/i)) || tag === 'textarea') && typeof expected === 'string' && expected.length)
376
  {
377
  if (expected === 'numeric-wp-commas' && (!value.match (/^[0-9\.,]+$/) || isNaN(value.replace (/,/g, ''))))
378
  {
379
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be numeric ( with or without decimals, commas allowed ).", "s2member-front", "s2member")); ?>';
380
  }
381
  else if (expected === 'numeric' && (!value.match (/^[0-9\.]+$/) || isNaN(value)))
382
  {
383
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be numeric ( with or without decimals, no commas ).", "s2member-front", "s2member")); ?>';
384
  }
385
  else if (expected === 'integer' && (!value.match (/^[0-9]+$/) || isNaN(value)))
386
  {
387
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be an integer ( a whole number, without any decimals ).", "s2member-front", "s2member")); ?>';
388
  }
389
  else if (expected === 'integer-gt-0' && (!value.match (/^[0-9]+$/) || isNaN(value) || value <= 0))
390
  {
391
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be an integer > 0 ( whole number, no decimals, greater than 0 ).", "s2member-front", "s2member")); ?>';
392
  }
393
  else if (expected === 'float' && (!value.match (/^[0-9\.]+$/) || !value.match (/[0-9]/) || !value.match (/\./) || isNaN(value)))
394
  {
395
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a float ( floating point number, decimals required ).", "s2member-front", "s2member")); ?>';
396
  }
397
  else if (expected === 'float-gt-0' && (!value.match (/^[0-9\.]+$/) || !value.match (/[0-9]/) || !value.match (/\./) || isNaN(value) || value <= 0))
398
  {
399
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a float > 0 ( floating point number, decimals required, greater than 0 ).", "s2member-front", "s2member")); ?>';
400
  }
401
  else if (expected === 'date' && !value.match (/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}$/))
402
  {
403
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a date ( required date format: dd/mm/yyyy ).", "s2member-front", "s2member")); ?>';
404
  }
405
  else if (expected === 'email' && !value.match (/^([a-z_~0-9\+\-]+)(((\.?)([a-z_~0-9\+\-]+))*)(@)([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i))
406
  {
407
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a valid email address.", "s2member-front", "s2member")); ?>';
408
  }
409
  else if (expected === 'email' && forcePersonalEmails && value.match (nonPersonalEmailUsers))
410
  {
411
+ return label + '\n' + $.sprintf ('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use a personal email address.\nAddresses like <%s@> are problematic.", "s2member-front", "s2member")); ?>', value.split ('@')[0]);
412
  }
413
  else if (expected === 'url' && !value.match (/^http(s?)\:\/\/(.{5,})$/i))
414
  {
415
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a full URL ( starting with http or https ).", "s2member-front", "s2member")); ?>';
416
  }
417
  else if (expected === 'domain' && !value.match (/^([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i))
418
  {
419
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a domain name ( domain name only, without http ).", "s2member-front", "s2member")); ?>';
420
  }
421
  else if (expected === 'phone' && (!value.match (/^[0-9 \(\)\-]+$/) || value.replace (/[^0-9]/g, '').length !== 10))
422
  {
423
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a phone # ( 10 digits w/possible hyphens,spaces,brackets ).", "s2member-front", "s2member")); ?>';
424
  }
425
  else if (expected === 'uszip' && !value.match (/^[0-9]{5}(-[0-9]{4})?$/))
426
  {
427
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a US zipcode ( 5-9 digits w/possible hyphen ).", "s2member-front", "s2member")); ?>';
428
  }
429
  else if (expected === 'cazip' && !value.match (/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i))
430
  {
431
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a Canadian zipcode ( 6 alpha-numerics w/possible space ).", "s2member-front", "s2member")); ?>';
432
  }
433
  else if (expected === 'uczip' && !value.match (/^[0-9]{5}(-[0-9]{4})?$/) && !value.match (/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i))
434
  {
435
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a zipcode ( either a US or Canadian zipcode ).", "s2member-front", "s2member")); ?>';
436
  }
437
  else if (expected.match (/^alphanumerics-spaces-punctuation-([0-9]+)(-e)?$/) && !value.match (/^[a-z 0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i))
438
  {
439
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics, spaces & punctuation only.", "s2member-front", "s2member")); ?>';
440
  }
441
  else if (expected.match (/^alphanumerics-spaces-([0-9]+)(-e)?$/) && !value.match (/^[a-z 0-9]+$/i))
442
  {
443
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics & spaces only.", "s2member-front", "s2member")); ?>';
444
  }
445
  else if (expected.match (/^alphanumerics-punctuation-([0-9]+)(-e)?$/) && !value.match (/^[a-z0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i))
446
  {
447
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics & punctuation only ( no spaces ).", "s2member-front", "s2member")); ?>';
448
  }
449
  else if (expected.match (/^alphanumerics-([0-9]+)(-e)?$/) && !value.match (/^[a-z0-9]+$/i))
450
  {
451
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics only ( no spaces/punctuation ).", "s2member-front", "s2member")); ?>';
452
  }
453
  else if (expected.match (/^alphabetics-([0-9]+)(-e)?$/) && !value.match (/^[a-z]+$/i))
454
  {
455
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphabetics only ( no digits/spaces/punctuation ).", "s2member-front", "s2member")); ?>';
456
  }
457
  else if (expected.match (/^numerics-([0-9]+)(-e)?$/) && !value.match (/^[0-9]+$/i))
458
  {
459
+ return label + '\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use numeric digits only.", "s2member-front", "s2member")); ?>';
460
  }
461
  else if (expected.match (/^(any|alphanumerics-spaces-punctuation|alphanumerics-spaces|alphanumerics-punctuation|alphanumerics|alphabetics|numerics)-([0-9]+)(-e)?$/))
462
  {
463
  var split = expected.split ('-'), length = Number(split[1]), exactLength = (split.length > 2) ? Number(split[2]) : '';
464
  /**/
465
  if (exactLength && value.length !== length) /* An exact length is required? */
466
+ return label + '\n' + $.sprintf ('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be exactly %s %s.", "s2member-front", "s2member")); ?>', length, ((split[0] === 'numerics') ? ((length === 1) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digit", "s2member-front", "s2member")); ?>' : '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digits", "s2member-front", "s2member")); ?>') : ((length === 1) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("character", "s2member-front", "s2member")); ?>' : '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("characters", "s2member-front", "s2member")); ?>')));
467
  /**/
468
  else if (value.length < length) /* Otherwise, we interpret as the minimum length. */
469
+ return label + '\n' + $.sprintf ('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be at least %s %s.", "s2member-front", "s2member")); ?>', length, ((split[0] === 'numerics') ? ((length === 1) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digit", "s2member-front", "s2member")); ?>' : '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digits", "s2member-front", "s2member")); ?>') : ((length === 1) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("character", "s2member-front", "s2member")); ?>' : '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("characters", "s2member-front", "s2member")); ?>')));
470
  }
471
  }
472
  }
519
  _dots += ' '; /* Prevents jumping. */
520
  }
521
  /**/
522
+ $this.val ('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Processing", "s2member-front", "s2member")); ?>' + _dots);
523
  }, ws_plugin__s2member_animateProcessingConfig.speed);
524
  });
525
  }
includes/syscon.inc.php CHANGED
@@ -18,7 +18,15 @@
18
  * @since 3.0
19
  */
20
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
21
- exit("Do not access this file directly.");
 
 
 
 
 
 
 
 
22
  /*
23
  Determine the full URL to the directory this plugin resides in.
24
  */
@@ -26,6 +34,10 @@ $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] = (stripos (__FILE__, WP_CON
26
  plugins_url ("/" . basename (dirname (dirname (__FILE__)))) : /* Otherwise, this gives it a chance to live anywhere in the content dir. */
27
  content_url (preg_replace ("/^(.*?)\/" . preg_quote (basename (WP_CONTENT_DIR), "/") . "/", "", str_replace (DIRECTORY_SEPARATOR, "/", dirname (dirname (__FILE__)))));
28
  /*
 
 
 
 
29
  Configure the number of Membership Levels being used with s2Member. This is NOT ready ( yet ). Some areas of s2Member are still hard-coded at 4 Levels + Subscribers.
30
  */
31
  $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"] = 4; /* Hard coded in at 4 Levels. This can only be extended when/if s2Member Pro is installed. */
@@ -42,17 +54,23 @@ Configure regular expression match for Specific Post/Page Access Item Numbers (
42
  */
43
  $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["sp_access_item_number_regex"] = "/^(sp)(?:(?:\:([1-9][0-9,]*))(?:\:([1-9][0-9]*)))$/";
44
  /*
45
- Configure the directory for files protected by s2Member.
 
 
 
 
46
  */
47
- $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] = apply_filters ("ws_plugin__s2member_files_dir", dirname (dirname (__FILE__)) . "-files" . ((preg_match ("/^win/i", PHP_OS)) ? "/app_data" : ""));
 
48
  /*
49
  Configure the directory for logs protected by s2Member.
50
  */
51
- $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"] = apply_filters ("ws_plugin__s2member_logs_dir", dirname (dirname (__FILE__)) . "-logs" . ((preg_match ("/^win/i", PHP_OS)) ? "/app_data" : ""));
 
52
  /*
53
  Configure the global reCaptcha for ( www.s2-all-domains.com ). These public/private keys work on any installation.
54
  */
55
- $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["recaptcha"] = array ("public_key" => "6LdxxcESAAAAANL7vrhz2glFIhmLGY58hXOhGkE0", "private_key" => "6LdxxcESAAAAAOlXATQTR75735n0eSIcOnp4GeNd", "lang" => "en");
56
  /*
57
  Configure the right menu options panel for s2Member.
58
  */
@@ -113,16 +131,19 @@ if (!function_exists ("ws_plugin__s2member_configure_options_and_their_defaults"
113
  $default_options["custom_reg_names"] = "1";
114
  $default_options["custom_reg_display_name"] = "full";
115
  $default_options["custom_reg_password"] = "0";
 
116
  $default_options["custom_reg_opt_in"] = "1";
117
- $default_options["custom_reg_opt_in_label"] = "Yes, I want to receive updates via email.";
 
118
  $default_options["custom_reg_auto_opt_outs"] = array ();
119
  $default_options["custom_reg_auto_opt_out_transitions"] = "0";
 
120
  $default_options["custom_reg_fields_4bp"] = array ();
121
  $default_options["custom_reg_force_personal_emails"] = "";
122
  /**/
123
  $default_options["allow_subscribers_in"] = "0";
124
  $default_options["force_admin_lockouts"] = "0";
125
- $default_options["filter_wp_query"] = "none";
126
  /**/
127
  $default_options["mms_auto_patch"] = "1";
128
  $default_options["mms_registration_file"] = "wp-login";
@@ -160,12 +181,12 @@ if (!function_exists ("ws_plugin__s2member_configure_options_and_their_defaults"
160
  /**/
161
  $default_options["new_user_emails_enabled"] = "0";
162
  /**/
163
- $default_options["new_user_email_subject"] = "[" . get_bloginfo ("name") . "] Username/Password";
164
- $default_options["new_user_email_message"] = "Your Username/Password for:\n" . get_bloginfo ("name") . "\n\nUsername: %%user_login%%\nPassword: %%user_pass%%\n%%wp_login_url%%";
165
  /**/
166
  $default_options["new_user_admin_email_recipients"] = get_bloginfo ("admin_email");
167
- $default_options["new_user_admin_email_subject"] = "[" . get_bloginfo ("name") . "] New User Registration";
168
- $default_options["new_user_admin_email_message"] = "New User Registration on your site:\n" . get_bloginfo ("name") . "\n\nUser ID: %%user_id%%\nUsername: %%user_login%%\nEmail: %%user_email%%\nIP Address: %%user_ip%%";
169
  /**/
170
  $default_options["paypal_sandbox"] = "0";
171
  $default_options["paypal_business"] = "";
@@ -181,12 +202,12 @@ if (!function_exists ("ws_plugin__s2member_configure_options_and_their_defaults"
181
  $default_options["sp_tracking_codes"] = "";
182
  /**/
183
  $default_options["signup_email_recipients"] = '"%%full_name%%" <%%payer_email%%>';
184
- $default_options["signup_email_subject"] = "Congratulations! ( your membership has been approved )";
185
- $default_options["signup_email_message"] = "Thanks %%first_name%%! Your membership has been approved.\n\nIf you haven't already done so, the next step is to Register a Username.\n\nComplete your registration here:\n%%registration_url%%\n\nIf you have any trouble, please feel free to contact us.\n\nBest Regards,\n" . get_bloginfo ("name");
186
  /**/
187
  $default_options["sp_email_recipients"] = '"%%full_name%%" <%%payer_email%%>';
188
- $default_options["sp_email_subject"] = "Thank You! ( instructions for access )";
189
- $default_options["sp_email_message"] = "Thanks %%first_name%%!\n\n%%item_name%%\n\nYour order can be retrieved here:\n%%sp_access_url%%\n( link expires in %%sp_access_exp%% )\n\nIf you have any trouble, please feel free to contact us.\n\nBest Regards,\n" . get_bloginfo ("name");
190
  /**/
191
  $default_options["mailchimp_api_key"] = "";
192
  /**/
@@ -216,8 +237,8 @@ if (!function_exists ("ws_plugin__s2member_configure_options_and_their_defaults"
216
  $default_options["sp_sale_notification_recipients"] = "";
217
  $default_options["sp_ref_rev_notification_recipients"] = "";
218
  /**/
219
- for ($n = 0, $l = array ("Free Subscriber", "Bronze Member", "Silver Member", "Gold Member", "Platinum Member"); $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
220
- $default_options["level" . $n . "_label"] = (!empty ($l[$n])) ? $l[$n] : "Level " . $n . " Member";
221
  /**/
222
  $default_options["apply_label_translations"] = "0";
223
  /**/
@@ -266,32 +287,36 @@ if (!function_exists ("ws_plugin__s2member_configure_options_and_their_defaults"
266
  */
267
  $GLOBALS["WS_PLUGIN__"]["s2member"]["o"] = array_merge ($default_options, (($options !== false) ? (array)$options : (array)get_option ("ws_plugin__s2member_options")));
268
  /**/
 
 
 
 
 
 
 
 
269
  /* Backward compatibility for PayPal® API Credentials. Starting with v3.5+, this info is stored by the free version of s2Member. */
270
- if (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_username"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_paypal_api_username"])
271
  $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_username"] = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_paypal_api_username"];
272
  /**/
273
- if (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_password"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_paypal_api_password"])
274
  $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_password"] = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_paypal_api_password"];
275
  /**/
276
- if (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_signature"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_paypal_api_signature"])
277
  $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_signature"] = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_paypal_api_signature"];
278
- /**/
279
- /* Backward compatibility for old logo image width of 500 pixels. Changed in v110604. */
280
- if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src"] === $default_options["login_reg_logo_src"])
281
- $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src_width"] = $default_options["login_reg_logo_src_width"];
282
  /*
283
  This builds an MD5 checksum for the full array of options. This also includes the config checksum and the current set of default options.
284
  */
285
  $checksum = md5 (($checksum_prefix = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["checksum"] . serialize ($default_options)) . serialize (array_merge ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"], array ("options_checksum" => 0))));
286
  /*
287
- Validate each option, possibly reverting back to the default value in some cases.
288
  */
289
  if ($options !== false || ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["options_checksum"] !== $checksum && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"] !== $default_options))
290
  {
291
  foreach ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"] as $key => &$value)
292
  {
293
  if (!isset ($default_options[$key]) && !preg_match ("/^pro_/", $key))
294
- unset($GLOBALS["WS_PLUGIN__"]["s2member"]["o"][$key]);
295
  /**/
296
  else if ($key === "options_checksum" && (!is_string ($value) || !strlen ($value)))
297
  $value = $default_options[$key];
@@ -362,7 +387,7 @@ if (!function_exists ("ws_plugin__s2member_configure_options_and_their_defaults"
362
  else if ($key === "force_admin_lockouts" && (!is_string ($value) || !is_numeric ($value)))
363
  $value = $default_options[$key];
364
  /**/
365
- else if ($key === "filter_wp_query" && (!is_string ($value) || !preg_match ("/^(none|searches|feeds|searches,feeds|all)$/", $value)))
366
  $value = $default_options[$key];
367
  /**/
368
  else if ($key === "login_welcome_page" && (!is_string ($value) || !is_numeric ($value)))
18
  * @since 3.0
19
  */
20
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
21
+ exit ("Do not access this file directly.");
22
+ /*
23
+ Determine the directory.
24
+ */
25
+ $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir"] = dirname (dirname (__FILE__));
26
+ /*
27
+ Determine the base directory name.
28
+ */
29
+ $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_base"] = basename (dirname (dirname (__FILE__)));
30
  /*
31
  Determine the full URL to the directory this plugin resides in.
32
  */
34
  plugins_url ("/" . basename (dirname (dirname (__FILE__)))) : /* Otherwise, this gives it a chance to live anywhere in the content dir. */
35
  content_url (preg_replace ("/^(.*?)\/" . preg_quote (basename (WP_CONTENT_DIR), "/") . "/", "", str_replace (DIRECTORY_SEPARATOR, "/", dirname (dirname (__FILE__)))));
36
  /*
37
+ Determine full URL to the s2Member-only file that loads WordPress® with only s2Member active.
38
+ */
39
+ $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["s2o_url"] = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/" . preg_replace ("/\.php$/", "-o.php", basename ($GLOBALS["WS_PLUGIN__"]["s2member"]["l"]));
40
+ /*
41
  Configure the number of Membership Levels being used with s2Member. This is NOT ready ( yet ). Some areas of s2Member are still hard-coded at 4 Levels + Subscribers.
42
  */
43
  $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"] = 4; /* Hard coded in at 4 Levels. This can only be extended when/if s2Member Pro is installed. */
54
  */
55
  $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["sp_access_item_number_regex"] = "/^(sp)(?:(?:\:([1-9][0-9,]*))(?:\:([1-9][0-9]*)))$/";
56
  /*
57
+ Configure multibyte detection order when charset is unknown ( used by calls to `mb_convert_encoding()` ).
58
+ */
59
+ $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["mb_detection_order"] = "UTF-8, ISO-8859-1, WINDOWS-1252, ASCII, JIS, EUC-JP, SJIS";
60
+ /*
61
+ Configure directory and .htaccess for files protected by s2Member.
62
  */
63
+ $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] = apply_filters ("ws_plugin__s2member_files_dir", dirname (dirname (__FILE__)) . "-files" . ((stripos (PHP_OS, "win") === 0 && (!function_exists ("apache_get_version") || apache_get_version () === false)) ? "/app_data" : ""));
64
+ $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir_htaccess"] = dirname (__FILE__) . "/templates/cfg-files/s2member-files.php";
65
  /*
66
  Configure the directory for logs protected by s2Member.
67
  */
68
+ $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"] = apply_filters ("ws_plugin__s2member_logs_dir", dirname (dirname (__FILE__)) . "-logs" . ((stripos (PHP_OS, "win") === 0 && (!function_exists ("apache_get_version") || apache_get_version () === false)) ? "/app_data" : ""));
69
+ $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir_htaccess"] = dirname (__FILE__) . "/templates/cfg-files/s2member-logs.php";
70
  /*
71
  Configure the global reCaptcha for ( www.s2-all-domains.com ). These public/private keys work on any installation.
72
  */
73
+ $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["recaptcha"] = array ("public_key" => "6LdxxcESAAAAANL7vrhz2glFIhmLGY58hXOhGkE0", "private_key" => "6LdxxcESAAAAAOlXATQTR75735n0eSIcOnp4GeNd", "lang" => _x ("en", "s2member-front recaptcha-lang-code", "s2member"));
74
  /*
75
  Configure the right menu options panel for s2Member.
76
  */
131
  $default_options["custom_reg_names"] = "1";
132
  $default_options["custom_reg_display_name"] = "full";
133
  $default_options["custom_reg_password"] = "0";
134
+ /**/
135
  $default_options["custom_reg_opt_in"] = "1";
136
+ $default_options["custom_reg_opt_in_label"] = _x ("Yes, I want to receive updates via email.", "s2member-front", "s2member");
137
+ /**/
138
  $default_options["custom_reg_auto_opt_outs"] = array ();
139
  $default_options["custom_reg_auto_opt_out_transitions"] = "0";
140
+ /**/
141
  $default_options["custom_reg_fields_4bp"] = array ();
142
  $default_options["custom_reg_force_personal_emails"] = "";
143
  /**/
144
  $default_options["allow_subscribers_in"] = "0";
145
  $default_options["force_admin_lockouts"] = "0";
146
+ $default_options["filter_wp_query"] = array ();
147
  /**/
148
  $default_options["mms_auto_patch"] = "1";
149
  $default_options["mms_registration_file"] = "wp-login";
181
  /**/
182
  $default_options["new_user_emails_enabled"] = "0";
183
  /**/
184
+ $default_options["new_user_email_subject"] = sprintf (_x ("[%s] Username/Password", "s2member-front", "s2member"), get_bloginfo ("name"));
185
+ $default_options["new_user_email_message"] = sprintf (_x ("Your Username/Password for:\n%s\n\nUsername: %%user_login%%\nPassword: %%user_pass%%\n%%wp_login_url%%", "s2member-front", "s2member"), get_bloginfo ("name"));
186
  /**/
187
  $default_options["new_user_admin_email_recipients"] = get_bloginfo ("admin_email");
188
+ $default_options["new_user_admin_email_subject"] = sprintf (_x ("[%s] New User Registration", "s2member-front", "s2member"), get_bloginfo ("name"));
189
+ $default_options["new_user_admin_email_message"] = sprintf (_x ("New User Registration on your site:\n%s\n\nUser ID: %%user_id%%\nUsername: %%user_login%%\nEmail: %%user_email%%\nIP Address: %%user_ip%%", "s2member-front", "s2member"), get_bloginfo ("name"));
190
  /**/
191
  $default_options["paypal_sandbox"] = "0";
192
  $default_options["paypal_business"] = "";
202
  $default_options["sp_tracking_codes"] = "";
203
  /**/
204
  $default_options["signup_email_recipients"] = '"%%full_name%%" <%%payer_email%%>';
205
+ $default_options["signup_email_subject"] = _x ("Congratulations! ( your membership has been approved )", "s2member-front", "s2member");
206
+ $default_options["signup_email_message"] = sprintf (_x ("Thanks %%first_name%%! Your membership has been approved.\n\nIf you haven't already done so, the next step is to Register a Username.\n\nComplete your registration here:\n%%registration_url%%\n\nIf you have any trouble, please feel free to contact us.\n\nBest Regards,\n%s", "s2member-front", "s2member"), get_bloginfo ("name"));
207
  /**/
208
  $default_options["sp_email_recipients"] = '"%%full_name%%" <%%payer_email%%>';
209
+ $default_options["sp_email_subject"] = _x ("Thank You! ( instructions for access )", "s2member-front", "s2member");
210
+ $default_options["sp_email_message"] = sprintf (_x ("Thanks %%first_name%%!\n\n%%item_name%%\n\nYour order can be retrieved here:\n%%sp_access_url%%\n( link expires in %%sp_access_exp%% )\n\nIf you have any trouble, please feel free to contact us.\n\nBest Regards,\n%s", "s2member-front", "s2member"), get_bloginfo ("name"));
211
  /**/
212
  $default_options["mailchimp_api_key"] = "";
213
  /**/
237
  $default_options["sp_sale_notification_recipients"] = "";
238
  $default_options["sp_ref_rev_notification_recipients"] = "";
239
  /**/
240
+ for ($n = 0, $l = array (_x ("Free Subscriber", "s2member-front", "s2member"), _x ("Bronze Member", "s2member-front", "s2member"), _x ("Silver Member", "s2member-front", "s2member"), _x ("Gold Member", "s2member-front", "s2member"), _x ("Platinum Member", "s2member-front", "s2member")); $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
241
+ $default_options["level" . $n . "_label"] = (!empty ($l[$n])) ? $l[$n] : sprintf (_x ("Level %s Member", "s2member-front", "s2member"), $n);
242
  /**/
243
  $default_options["apply_label_translations"] = "0";
244
  /**/
287
  */
288
  $GLOBALS["WS_PLUGIN__"]["s2member"]["o"] = array_merge ($default_options, (($options !== false) ? (array)$options : (array)get_option ("ws_plugin__s2member_options")));
289
  /**/
290
+ /* Back compatibility for `filter_wp_query`. Changed in v110912 to array. */
291
+ if (is_string ($_ov = &$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["filter_wp_query"]))
292
+ $_ov = (!$_ov || $_ov === "none") ? $default_options["filter_wp_query"] : array_unique (preg_split ("/[;,\r\n\t\s ]+/", $_ov));
293
+ /**/
294
+ /* Backward compatibility for old logo image width of 500 pixels. Changed in v110604. */
295
+ if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src"] === $default_options["login_reg_logo_src"])
296
+ $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src_width"] = $default_options["login_reg_logo_src_width"];
297
+ /**/
298
  /* Backward compatibility for PayPal® API Credentials. Starting with v3.5+, this info is stored by the free version of s2Member. */
299
+ if (empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_username"]) && !empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_paypal_api_username"]))
300
  $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_username"] = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_paypal_api_username"];
301
  /**/
302
+ if (empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_password"]) && !empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_paypal_api_password"]))
303
  $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_password"] = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_paypal_api_password"];
304
  /**/
305
+ if (empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_signature"]) && !empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_paypal_api_signature"]))
306
  $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_signature"] = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["pro_paypal_api_signature"];
 
 
 
 
307
  /*
308
  This builds an MD5 checksum for the full array of options. This also includes the config checksum and the current set of default options.
309
  */
310
  $checksum = md5 (($checksum_prefix = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["checksum"] . serialize ($default_options)) . serialize (array_merge ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"], array ("options_checksum" => 0))));
311
  /*
312
+ Validate each option, possibly reverting back to the default value in some cases. This is only processed when/if the checksum is not up-to-date.
313
  */
314
  if ($options !== false || ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["options_checksum"] !== $checksum && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"] !== $default_options))
315
  {
316
  foreach ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"] as $key => &$value)
317
  {
318
  if (!isset ($default_options[$key]) && !preg_match ("/^pro_/", $key))
319
+ unset ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"][$key]);
320
  /**/
321
  else if ($key === "options_checksum" && (!is_string ($value) || !strlen ($value)))
322
  $value = $default_options[$key];
387
  else if ($key === "force_admin_lockouts" && (!is_string ($value) || !is_numeric ($value)))
388
  $value = $default_options[$key];
389
  /**/
390
+ else if ($key === "filter_wp_query" && !is_array ($value)) /* Array CAN be empty. */
391
  $value = $default_options[$key];
392
  /**/
393
  else if ($key === "login_welcome_page" && (!is_string ($value) || !is_numeric ($value)))
includes/templates/badges/{s-badge.html → s-badge.php} RENAMED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  <div class="ws-plugin--s2member-s-badge">
2
- <a href="http://www.s2member.com/" onclick="window.open('http://www.s2member.com/s-badges/s-details.php?v=%%v%%&amp;site_url=%%site_url%%%%no_cache%%%%display_on_failure%%', '_popup', 'width=752,height=702,left='+((screen.width/2)-(752/2))+',screenX='+((screen.width/2)-(752/2))+',top='+((screen.height/2)-(702/2))+',screenY='+((screen.height/2)-(702/2))+',location=0,menubar=0,toolbar=0,scrollbars=0,resizable=1'); return false;" title="s2Member&reg; ( security for WordPress&reg; )"><img src="//www.s2member.com/s-badges/s-badge.php?v=%%v%%&amp;site_url=%%site_url%%%%no_cache%%%%display_on_failure%%" style="border:0;" alt="s2Member&reg; ( security for WordPress&reg; )" title="s2Member&reg; ( security for WordPress&reg; )" /></a>
3
  </div>
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+ ?>
5
+
6
  <div class="ws-plugin--s2member-s-badge">
7
+ <a href="http://www.s2member.com/" onclick="window.open('http://www.s2member.com/s-badges/s-details.php?v=%%v%%&amp;site_url=%%site_url%%%%no_cache%%%%display_on_failure%%', '_popup', 'width=752,height=702,left='+((screen.width/2)-(752/2))+',screenX='+((screen.width/2)-(752/2))+',top='+((screen.height/2)-(702/2))+',screenY='+((screen.height/2)-(702/2))+',location=0,menubar=0,toolbar=0,scrollbars=0,resizable=1'); return false;" title="s2Member&reg;"><img src="//www.s2member.com/s-badges/s-badge.php?v=%%v%%&amp;site_url=%%site_url%%%%no_cache%%%%display_on_failure%%" style="border:0;" alt="s2Member&reg;" title="<?php echo esc_attr (_x ("s2Member&reg; ( Security for WordPress&reg; )", "s2member-front", "s2member")); ?>" /></a>
8
  </div>
includes/templates/buttons/paypal-cancellation-button.html DELETED
@@ -1,3 +0,0 @@
1
- <a href="https://%%endpoint%%/cgi-bin/webscr?cmd=_subscr-find&amp;alias=%%paypal_business%%" style="outline:none;">
2
- <img src="https://www.paypal.com/en_US/i/btn/btn_unsubscribe_LG.gif" style="width:auto; height:auto; border:0;" alt="PayPal®" />
3
- </a>
 
 
 
includes/templates/buttons/paypal-cancellation-button.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+ ?>
5
+
6
+ <a href="https://%%endpoint%%/cgi-bin/webscr?cmd=_subscr-find&amp;alias=%%paypal_business%%" style="outline:none;">
7
+ <img src="https://www.paypal.com/<?php echo esc_attr (_x ("en_US", "s2member-front paypal-button-lang-code", "s2member")); ?>/i/btn/btn_unsubscribe_LG.gif" style="width:auto; height:auto; border:0;" alt="PayPal®" />
8
+ </a>
includes/templates/buttons/paypal-ccaps-checkout-button.html DELETED
@@ -1,30 +0,0 @@
1
- <form action="https://%%endpoint%%/cgi-bin/webscr" method="post">
2
- <input type="hidden" name="business" value="%%paypal_business%%" />
3
- <input type="hidden" name="cmd" value="_xclick" />
4
- <!-- Instant Payment Notification & Return Page Details -->
5
- <input type="hidden" name="notify_url" value="%%notify_url%%" />
6
- <input type="hidden" name="cancel_return" value="%%cancel_return%%" />
7
- <input type="hidden" name="return" value="%%return%%" />
8
- <input type="hidden" name="rm" value="2" />
9
- <!-- Configures Basic Checkout Fields -->
10
- <input type="hidden" name="lc" value="" />
11
- <input type="hidden" name="no_shipping" value="1" />
12
- <input type="hidden" name="no_note" value="1" />
13
- <input type="hidden" name="custom" value="%%custom%%" />
14
- <input type="hidden" name="currency_code" value="USD" />
15
- <input type="hidden" name="page_style" value="paypal" />
16
- <input type="hidden" name="charset" value="utf-8" />
17
- <input type="hidden" name="item_name" value="Description and pricing details here." />
18
- <input type="hidden" name="item_number" value="*:music,videos" />
19
- <input type="hidden" name="amount" value="0.01" />
20
- <!-- Configures s2Member's Unique Invoice ID/Code -->
21
- <input type="hidden" name="invoice" value="<?php echo S2MEMBER_VALUE_FOR_PP_INV(); ?>" />
22
- <!-- Associates Purchase With A User/Member ( when/if applicable ) -->
23
- <input type="hidden" name="on0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>" />
24
- <input type="hidden" name="os0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>" />
25
- <!-- Identifies The Customer's IP Address For Tracking -->
26
- <input type="hidden" name="on1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>" />
27
- <input type="hidden" name="os1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>" />
28
- <!-- Displays The PayPal® Image Button -->
29
- <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal®" />
30
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/templates/buttons/paypal-ccaps-checkout-button.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+ ?>
5
+
6
+ <form action="https://%%endpoint%%/cgi-bin/webscr" method="post">
7
+ <input type="hidden" name="business" value="%%paypal_business%%" />
8
+ <input type="hidden" name="cmd" value="_xclick" />
9
+ <!-- <?php echo _x ("Instant Payment Notification & Return Page Details", "s2member-admin", "s2member"); ?> -->
10
+ <input type="hidden" name="notify_url" value="%%notify_url%%" />
11
+ <input type="hidden" name="cancel_return" value="%%cancel_return%%" />
12
+ <input type="hidden" name="return" value="%%return%%" />
13
+ <input type="hidden" name="rm" value="2" />
14
+ <!-- <?php echo _x ("Configures Basic Checkout Fields", "s2member-admin", "s2member"); ?> -->
15
+ <input type="hidden" name="lc" value="" />
16
+ <input type="hidden" name="no_shipping" value="1" />
17
+ <input type="hidden" name="no_note" value="1" />
18
+ <input type="hidden" name="custom" value="%%custom%%" />
19
+ <input type="hidden" name="currency_code" value="USD" />
20
+ <input type="hidden" name="page_style" value="paypal" />
21
+ <input type="hidden" name="charset" value="utf-8" />
22
+ <input type="hidden" name="item_name" value="<?php echo esc_attr (_x ("Description and pricing details here.", "s2member-admin", "s2member")); ?>" />
23
+ <input type="hidden" name="item_number" value="*:music,videos" />
24
+ <input type="hidden" name="amount" value="0.01" />
25
+ <!-- <?php echo _x ("Configures s2Member's Unique Invoice ID/Code", "s2member-admin", "s2member"); ?> -->
26
+ <input type="hidden" name="invoice" value="<?php echo "<?php echo S2MEMBER_VALUE_FOR_PP_INV(); ?>"; ?>" />
27
+ <!-- <?php echo _x ("Associates Purchase With A User/Member ( when/if applicable )", "s2member-admin", "s2member"); ?> -->
28
+ <input type="hidden" name="on0" value="<?php echo "<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>"; ?>" />
29
+ <input type="hidden" name="os0" value="<?php echo "<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>"; ?>" />
30
+ <!-- <?php echo _x ("Identifies The Customer's IP Address For Tracking", "s2member-admin", "s2member"); ?> -->
31
+ <input type="hidden" name="on1" value="<?php echo "<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>"; ?>" />
32
+ <input type="hidden" name="os1" value="<?php echo "<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>"; ?>" />
33
+ <!-- <?php echo _x ("Displays The PayPal® Image Button", "s2member-admin", "s2member"); ?> -->
34
+ <input type="image" src="https://www.paypal.com/<?php echo esc_attr (_x ("en_US", "s2member-front paypal-button-lang-code", "s2member")); ?>/i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal®" />
35
+ </form>
includes/templates/buttons/paypal-checkout-button.html DELETED
@@ -1,42 +0,0 @@
1
- <form action="https://%%endpoint%%/cgi-bin/webscr" method="post">
2
- <input type="hidden" name="business" value="%%paypal_business%%" />
3
- <input type="hidden" name="cmd" value="_xclick-subscriptions" />
4
- <!-- Instant Payment Notification & Return Page Details -->
5
- <input type="hidden" name="notify_url" value="%%notify_url%%" />
6
- <input type="hidden" name="cancel_return" value="%%cancel_return%%" />
7
- <input type="hidden" name="return" value="%%return%%" />
8
- <input type="hidden" name="rm" value="2" />
9
- <!-- Configures Basic Checkout Fields -->
10
- <input type="hidden" name="lc" value="" />
11
- <input type="hidden" name="no_shipping" value="1" />
12
- <input type="hidden" name="no_note" value="1" />
13
- <input type="hidden" name="custom" value="%%custom%%" />
14
- <input type="hidden" name="currency_code" value="USD" />
15
- <input type="hidden" name="page_style" value="paypal" />
16
- <input type="hidden" name="charset" value="utf-8" />
17
- <input type="hidden" name="item_name" value="%%level_label%% / description and pricing details here." />
18
- <input type="hidden" name="item_number" value="%%level%%" />
19
- <!-- Configures s2Member's Unique Invoice ID/Code -->
20
- <input type="hidden" name="invoice" value="<?php echo S2MEMBER_VALUE_FOR_PP_INV(); ?>" />
21
- <!-- Identifies/Updates An Existing User/Member ( when/if applicable ) -->
22
- <input type="hidden" name="on0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>" />
23
- <input type="hidden" name="os0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>" />
24
- <!-- Identifies The Customer's IP Address For Tracking -->
25
- <input type="hidden" name="on1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>" />
26
- <input type="hidden" name="os1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>" />
27
- <!-- Controls Modify Behavior At PayPal® Checkout -->
28
- <input type="hidden" name="modify" value="0" />
29
- <!-- Customizes Prices, Payments & Billing Cycle -->
30
- <!--<input type="hidden" name="amount" value="0.01" />-->
31
- <input type="hidden" name="src" value="1" />
32
- <input type="hidden" name="srt" value="" />
33
- <input type="hidden" name="sra" value="1" />
34
- <input type="hidden" name="a1" value="0.00" />
35
- <input type="hidden" name="p1" value="0" />
36
- <input type="hidden" name="t1" value="D" />
37
- <input type="hidden" name="a3" value="0.01" />
38
- <input type="hidden" name="p3" value="1" />
39
- <input type="hidden" name="t3" value="M" />
40
- <!-- Displays The PayPal® Image Button -->
41
- <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal®" />
42
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/templates/buttons/paypal-checkout-button.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+ ?>
5
+
6
+ <form action="https://%%endpoint%%/cgi-bin/webscr" method="post">
7
+ <input type="hidden" name="business" value="%%paypal_business%%" />
8
+ <input type="hidden" name="cmd" value="_xclick-subscriptions" />
9
+ <!-- <?php echo _x ("Instant Payment Notification & Return Page Details", "s2member-admin", "s2member"); ?> -->
10
+ <input type="hidden" name="notify_url" value="%%notify_url%%" />
11
+ <input type="hidden" name="cancel_return" value="%%cancel_return%%" />
12
+ <input type="hidden" name="return" value="%%return%%" />
13
+ <input type="hidden" name="rm" value="2" />
14
+ <!-- <?php echo _x ("Configures Basic Checkout Fields", "s2member-admin", "s2member"); ?> -->
15
+ <input type="hidden" name="lc" value="" />
16
+ <input type="hidden" name="no_shipping" value="1" />
17
+ <input type="hidden" name="no_note" value="1" />
18
+ <input type="hidden" name="custom" value="%%custom%%" />
19
+ <input type="hidden" name="currency_code" value="USD" />
20
+ <input type="hidden" name="page_style" value="paypal" />
21
+ <input type="hidden" name="charset" value="utf-8" />
22
+ <input type="hidden" name="item_name" value="%%level_label%% / <?php echo esc_attr (_x ("Description and pricing details here.", "s2member-admin", "s2member")); ?>" />
23
+ <input type="hidden" name="item_number" value="%%level%%" />
24
+ <!-- <?php echo _x ("Configures s2Member's Unique Invoice ID/Code", "s2member-admin", "s2member"); ?> -->
25
+ <input type="hidden" name="invoice" value="<?php echo "<?php echo S2MEMBER_VALUE_FOR_PP_INV(); ?>"; ?>" />
26
+ <!-- <?php echo _x ("Identifies/Updates An Existing User/Member ( when/if applicable )", "s2member-admin", "s2member"); ?> -->
27
+ <input type="hidden" name="on0" value="<?php echo "<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>"; ?>" />
28
+ <input type="hidden" name="os0" value="<?php echo "<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>"; ?>" />
29
+ <!-- <?php echo _x ("Identifies The Customer's IP Address For Tracking", "s2member-admin", "s2member"); ?> -->
30
+ <input type="hidden" name="on1" value="<?php echo "<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>"; ?>" />
31
+ <input type="hidden" name="os1" value="<?php echo "<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>"; ?>" />
32
+ <!-- <?php echo _x ("Controls Modify Behavior At PayPal® Checkout", "s2member-admin", "s2member"); ?> -->
33
+ <input type="hidden" name="modify" value="0" />
34
+ <!-- <?php echo _x ("Customizes Prices, Payments & Billing Cycle", "s2member-admin", "s2member"); ?> -->
35
+ <!--<input type="hidden" name="amount" value="0.01" />-->
36
+ <input type="hidden" name="src" value="1" />
37
+ <input type="hidden" name="srt" value="" />
38
+ <input type="hidden" name="sra" value="1" />
39
+ <input type="hidden" name="a1" value="0.00" />
40
+ <input type="hidden" name="p1" value="0" />
41
+ <input type="hidden" name="t1" value="D" />
42
+ <input type="hidden" name="a3" value="0.01" />
43
+ <input type="hidden" name="p3" value="1" />
44
+ <input type="hidden" name="t3" value="M" />
45
+ <!-- <?php echo _x ("Displays The PayPal® Image Button", "s2member-admin", "s2member"); ?> -->
46
+ <input type="image" src="https://www.paypal.com/<?php echo esc_attr (_x ("en_US", "s2member-front paypal-button-lang-code", "s2member")); ?>/i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal®" />
47
+ </form>
includes/templates/buttons/paypal-sp-checkout-button.html DELETED
@@ -1,30 +0,0 @@
1
- <form action="https://%%endpoint%%/cgi-bin/webscr" method="post">
2
- <input type="hidden" name="business" value="%%paypal_business%%" />
3
- <input type="hidden" name="cmd" value="_xclick" />
4
- <!-- Instant Payment Notification & Return Page Details -->
5
- <input type="hidden" name="notify_url" value="%%notify_url%%" />
6
- <input type="hidden" name="cancel_return" value="%%cancel_return%%" />
7
- <input type="hidden" name="return" value="%%return%%" />
8
- <input type="hidden" name="rm" value="2" />
9
- <!-- Configures Basic Checkout Fields -->
10
- <input type="hidden" name="lc" value="" />
11
- <input type="hidden" name="no_shipping" value="1" />
12
- <input type="hidden" name="no_note" value="1" />
13
- <input type="hidden" name="custom" value="%%custom%%" />
14
- <input type="hidden" name="currency_code" value="USD" />
15
- <input type="hidden" name="page_style" value="paypal" />
16
- <input type="hidden" name="charset" value="utf-8" />
17
- <input type="hidden" name="item_name" value="Description and pricing details here." />
18
- <input type="hidden" name="item_number" value="sp:0:72" />
19
- <input type="hidden" name="amount" value="0.01" />
20
- <!-- Configures s2Member's Unique Invoice ID/Code -->
21
- <input type="hidden" name="invoice" value="<?php echo S2MEMBER_VALUE_FOR_PP_INV(); ?>" />
22
- <!-- Associates Purchase With A User/Member ( when/if applicable ) -->
23
- <input type="hidden" name="on0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>" />
24
- <input type="hidden" name="os0" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>" />
25
- <!-- Identifies The Customer's IP Address For Tracking -->
26
- <input type="hidden" name="on1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>" />
27
- <input type="hidden" name="os1" value="<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>" />
28
- <!-- Displays The PayPal® Image Button -->
29
- <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal®" />
30
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/templates/buttons/paypal-sp-checkout-button.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+ ?>
5
+
6
+ <form action="https://%%endpoint%%/cgi-bin/webscr" method="post">
7
+ <input type="hidden" name="business" value="%%paypal_business%%" />
8
+ <input type="hidden" name="cmd" value="_xclick" />
9
+ <!-- <?php echo _x ("Instant Payment Notification & Return Page Details", "s2member-admin", "s2member"); ?> -->
10
+ <input type="hidden" name="notify_url" value="%%notify_url%%" />
11
+ <input type="hidden" name="cancel_return" value="%%cancel_return%%" />
12
+ <input type="hidden" name="return" value="%%return%%" />
13
+ <input type="hidden" name="rm" value="2" />
14
+ <!-- <?php echo _x ("Configures Basic Checkout Fields", "s2member-admin", "s2member"); ?> -->
15
+ <input type="hidden" name="lc" value="" />
16
+ <input type="hidden" name="no_shipping" value="1" />
17
+ <input type="hidden" name="no_note" value="1" />
18
+ <input type="hidden" name="custom" value="%%custom%%" />
19
+ <input type="hidden" name="currency_code" value="USD" />
20
+ <input type="hidden" name="page_style" value="paypal" />
21
+ <input type="hidden" name="charset" value="utf-8" />
22
+ <input type="hidden" name="item_name" value="<?php echo esc_attr (_x ("Description and pricing details here.", "s2member-admin", "s2member")); ?>" />
23
+ <input type="hidden" name="item_number" value="sp:0:72" />
24
+ <input type="hidden" name="amount" value="0.01" />
25
+ <!-- <?php echo _x ("Configures s2Member's Unique Invoice ID/Code", "s2member-admin", "s2member"); ?> -->
26
+ <input type="hidden" name="invoice" value="<?php echo "<?php echo S2MEMBER_VALUE_FOR_PP_INV(); ?>"; ?>" />
27
+ <!-- <?php echo _x ("Associates Purchase With A User/Member ( when/if applicable )", "s2member-admin", "s2member"); ?> -->
28
+ <input type="hidden" name="on0" value="<?php echo "<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON0; ?>"; ?>" />
29
+ <input type="hidden" name="os0" value="<?php echo "<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS0; ?>"; ?>" />
30
+ <!-- <?php echo _x ("Identifies The Customer's IP Address For Tracking", "s2member-admin", "s2member"); ?> -->
31
+ <input type="hidden" name="on1" value="<?php echo "<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_ON1; ?>"; ?>" />
32
+ <input type="hidden" name="os1" value="<?php echo "<?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_OS1; ?>"; ?>" />
33
+ <!-- <?php echo _x ("Displays The PayPal® Image Button", "s2member-admin", "s2member"); ?> -->
34
+ <input type="image" src="https://www.paypal.com/<?php echo esc_attr (_x ("en_US", "s2member-front paypal-button-lang-code", "s2member")); ?>/i/btn/btn_xpressCheckout.gif" style="width:auto; height:auto; border:0;" alt="PayPal®" />
35
+ </form>
includes/templates/cfg-files/index.php ADDED
File without changes
includes/templates/cfg-files/s2member-files.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+
5
+ global $base; /* A Multisite ``$base`` configuration? */
6
+ $ws_plugin__s2member_temp_s_base = (!empty ($base)) ? $base : parse_url (network_home_url ("/"), PHP_URL_PATH);
7
+ /* The function ``network_home_url ()`` defaults to ``home_url ()`` on standard WordPress® installs. */
8
+ /* Must use the `home` URL here, because that's what WordPress® uses in it's `mod_rewrite` file. */
9
+ ?>
10
+
11
+ Options +FollowSymLinks -MultiViews
12
+
13
+ <IfModule mod_rewrite.c>
14
+ RewriteEngine On
15
+ RewriteBase <?php echo $ws_plugin__s2member_temp_s_base . "\n"; ?>
16
+
17
+ RewriteCond %{ENV:s2member_file_ms_scan} !^complete$
18
+ RewriteCond %{THE_REQUEST} ^(?:GET|HEAD)(?:[\ ]+)(?:<?php echo preg_quote ($ws_plugin__s2member_temp_s_base, " "); ?>)([_0-9a-zA-Z\-]+/)(?:wp-content/)
19
+ RewriteRule ^(.*)$ - [E=s2member_file_ms_scan:complete,E=s2_blog:%1]
20
+
21
+ RewriteCond %{ENV:s2member_file_download_scan} !^complete$
22
+ RewriteRule ^(.*)$ - [E=s2member_file_download_scan:complete,E=s2member_file_download:$1]
23
+
24
+ RewriteCond %{ENV:s2member_file_download} ^(.*?)(?:s2member-file-remote/)(.+)$
25
+ RewriteRule ^(.*)$ - [N,E=s2member_file_download:%1%2,E=s2member_file_remote:&s2member_file_remote=yes]
26
+
27
+ RewriteCond %{ENV:s2member_file_download} ^(.*?)(?:s2member-file-remote-(.+?)/)(.+)$
28
+ RewriteRule ^(.*)$ - [N,E=s2member_file_download:%1%3,E=s2member_file_remote:&s2member_file_remote=%2]
29
+
30
+ RewriteCond %{ENV:s2member_file_download} ^(.*?)(?:s2member-file-inline/)(.+)$
31
+ RewriteRule ^(.*)$ - [N,E=s2member_file_download:%1%2,E=s2member_file_inline:&s2member_file_inline=yes]
32
+
33
+ RewriteCond %{ENV:s2member_file_download} ^(.*?)(?:s2member-file-inline-(.+?)/)(.+)$
34
+ RewriteRule ^(.*)$ - [N,E=s2member_file_download:%1%3,E=s2member_file_inline:&s2member_file_inline=%2]
35
+
36
+ RewriteCond %{ENV:s2member_file_download} ^(.*?)(?:s2member-file-download-key-(.+?)/)(.+)$
37
+ RewriteRule ^(.*)$ - [N,E=s2member_file_download:%1%3,E=s2member_file_download_key:&s2member_file_download_key=%2]
38
+
39
+ RewriteRule ^(.*)$ %{ENV:s2_blog}?s2member_file_download=%{ENV:s2member_file_download}%{ENV:s2member_file_inline}%{ENV:s2member_file_download_key}%{ENV:s2member_file_remote} [QSA,L]
40
+ </IfModule>
41
+
42
+ <IfModule !mod_rewrite.c>
43
+ deny from all
44
+ </IfModule>
45
+
46
+ <?php unset ($ws_plugin__s2member_temp_s_base); ?>
includes/templates/cfg-files/s2member-logs.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+ ?>
5
+
6
+ deny from all
includes/templates/options/{paypal-currencies.html → paypal-currencies.php} RENAMED
@@ -1,4 +1,9 @@
1
- <optgroup label="Currency">
 
 
 
 
 
2
  <option value="ADF">ADF</option>
3
  <option value="ADP">ADP</option>
4
  <option value="AED">AED</option>
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+ ?>
5
+
6
+ <optgroup label="<?php echo esc_attr (_x ("Currency", "s2member-admin", "s2member")); ?>">
7
  <option value="ADF">ADF</option>
8
  <option value="ADP">ADP</option>
9
  <option value="AED">AED</option>
includes/templates/options/paypal-membership-ccap-terms.html DELETED
@@ -1,3 +0,0 @@
1
- <optgroup label="PayPal® ( Buy Now )">
2
- <option value="1-L-BN" selected="selected">One Time ( for lifetime access, non-recurring )</option>
3
- </optgroup>
 
 
 
includes/templates/options/paypal-membership-ccap-terms.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+ ?>
5
+
6
+ <optgroup label="<?php echo esc_attr (_x ("PayPal® ( Buy Now )", "s2member-admin", "s2member")); ?>">
7
+ <option value="1-L-BN" selected="selected"><?php echo esc_html (_x ("One Time ( for lifetime access, non-recurring )", "s2member-admin", "s2member")); ?></option>
8
+ </optgroup>
includes/templates/options/paypal-membership-regular-terms.html DELETED
@@ -1,63 +0,0 @@
1
- <optgroup label="PayPal® ( Subscriptions )">
2
- <option value="1-D-1">Daily ( recurring charge, for ongoing access )</option>
3
- <option value="1-W-1">Weekly ( recurring charge, for ongoing access )</option>
4
- <option value="2-W-1">Bi-Weekly ( recurring charge, for ongoing access )</option>
5
- <option value="1-M-1" selected="selected">Monthly ( recurring charge, for ongoing access )</option>
6
- <option value="2-M-1">Bi-Monthly ( recurring charge, for ongoing access )</option>
7
- <option value="3-M-1">Quarterly ( recurring charge, for ongoing access )</option>
8
- <option value="1-Y-1">Yearly ( recurring charge, for ongoing access )</option>
9
- </optgroup>
10
-
11
- <option disabled="disabled"></option>
12
-
13
- <optgroup label="PayPal® ( Subscriptions )">
14
- <option value="1-D-0">One Time ( for 1 day access, non-recurring )</option>
15
- <option value="2-D-0">One Time ( for 2 day access, non-recurring )</option>
16
- <option value="3-D-0">One Time ( for 3 day access, non-recurring )</option>
17
- <option value="4-D-0">One Time ( for 4 day access, non-recurring )</option>
18
- <option value="5-D-0">One Time ( for 5 day access, non-recurring )</option>
19
- <option value="6-D-0">One Time ( for 6 day access, non-recurring )</option>
20
-
21
- <option value="1-W-0">One Time ( for 1 week access, non-recurring )</option>
22
- <option value="2-W-0">One Time ( for 2 week access, non-recurring )</option>
23
- <option value="3-W-0">One Time ( for 3 week access, non-recurring )</option>
24
-
25
- <option value="1-M-0">One Time ( for 1 month access, non-recurring )</option>
26
- <option value="2-M-0">One Time ( for 2 month access, non-recurring )</option>
27
- <option value="3-M-0">One Time ( for 3 month access, non-recurring )</option>
28
- <option value="4-M-0">One Time ( for 4 month access, non-recurring )</option>
29
- <option value="5-M-0">One Time ( for 5 month access, non-recurring )</option>
30
- <option value="6-M-0">One Time ( for 6 month access, non-recurring )</option>
31
-
32
- <option value="1-Y-0">One Time ( for 1 year access, non-recurring )</option>
33
- </optgroup>
34
-
35
- <option disabled="disabled"></option>
36
-
37
- <optgroup label="PayPal® ( Buy Now )">
38
- <option value="1-D-BN">One Time ( for 1 day access, non-recurring, no trial )</option>
39
- <option value="2-D-BN">One Time ( for 2 day access, non-recurring, no trial )</option>
40
- <option value="3-D-BN">One Time ( for 3 day access, non-recurring, no trial )</option>
41
- <option value="4-D-BN">One Time ( for 4 day access, non-recurring, no trial )</option>
42
- <option value="5-D-BN">One Time ( for 5 day access, non-recurring, no trial )</option>
43
- <option value="6-D-BN">One Time ( for 6 day access, non-recurring, no trial )</option>
44
-
45
- <option value="1-W-BN">One Time ( for 1 week access, non-recurring, no trial )</option>
46
- <option value="2-W-BN">One Time ( for 2 week access, non-recurring, no trial )</option>
47
- <option value="3-W-BN">One Time ( for 3 week access, non-recurring, no trial )</option>
48
-
49
- <option value="1-M-BN">One Time ( for 1 month access, non-recurring, no trial )</option>
50
- <option value="2-M-BN">One Time ( for 2 month access, non-recurring, no trial )</option>
51
- <option value="3-M-BN">One Time ( for 3 month access, non-recurring, no trial )</option>
52
- <option value="4-M-BN">One Time ( for 4 month access, non-recurring, no trial )</option>
53
- <option value="5-M-BN">One Time ( for 5 month access, non-recurring, no trial )</option>
54
- <option value="6-M-BN">One Time ( for 6 month access, non-recurring, no trial )</option>
55
-
56
- <option value="1-Y-BN">One Time ( for 1 year access, non-recurring, no trial )</option>
57
- <option value="2-Y-BN">One Time ( for 2 year access, non-recurring, no trial )</option>
58
- <option value="3-Y-BN">One Time ( for 3 year access, non-recurring, no trial )</option>
59
- <option value="4-Y-BN">One Time ( for 4 year access, non-recurring, no trial )</option>
60
- <option value="5-Y-BN">One Time ( for 5 year access, non-recurring, no trial )</option>
61
-
62
- <option value="1-L-BN">One Time ( for lifetime access, non-recurring, no trial )</option>
63
- </optgroup>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/templates/options/paypal-membership-regular-terms.php ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+ ?>
5
+
6
+ <optgroup label="<?php echo esc_attr (_x ("PayPal® ( Subscriptions )", "s2member-admin", "s2member")); ?>">
7
+ <option value="1-D-1"><?php echo esc_html (_x ("Daily ( recurring charge, for ongoing access )", "s2member-admin", "s2member")); ?></option>
8
+ <option value="1-W-1"><?php echo esc_html (_x ("Weekly ( recurring charge, for ongoing access )", "s2member-admin", "s2member")); ?></option>
9
+ <option value="2-W-1"><?php echo esc_html (_x ("Bi-Weekly ( recurring charge, for ongoing access )", "s2member-admin", "s2member")); ?></option>
10
+ <option value="1-M-1" selected="selected"><?php echo esc_html (_x ("Monthly ( recurring charge, for ongoing access )", "s2member-admin", "s2member")); ?></option>
11
+ <option value="2-M-1"><?php echo esc_html (_x ("Bi-Monthly ( recurring charge, for ongoing access )", "s2member-admin", "s2member")); ?></option>
12
+ <option value="3-M-1"><?php echo esc_html (_x ("Quarterly ( recurring charge, for ongoing access )", "s2member-admin", "s2member")); ?></option>
13
+ <option value="1-Y-1"><?php echo esc_html (_x ("Yearly ( recurring charge, for ongoing access )", "s2member-admin", "s2member")); ?></option>
14
+ </optgroup>
15
+
16
+ <option disabled="disabled"></option>
17
+
18
+ <optgroup label="<?php echo esc_attr (_x ("PayPal® ( Subscriptions )", "s2member-admin", "s2member")); ?>">
19
+ <option value="1-D-0"><?php echo esc_html (_x ("One Time ( for 1 day access, non-recurring )", "s2member-admin", "s2member")); ?></option>
20
+ <option value="2-D-0"><?php echo esc_html (_x ("One Time ( for 2 day access, non-recurring )", "s2member-admin", "s2member")); ?></option>
21
+ <option value="3-D-0"><?php echo esc_html (_x ("One Time ( for 3 day access, non-recurring )", "s2member-admin", "s2member")); ?></option>
22
+ <option value="4-D-0"><?php echo esc_html (_x ("One Time ( for 4 day access, non-recurring )", "s2member-admin", "s2member")); ?></option>
23
+ <option value="5-D-0"><?php echo esc_html (_x ("One Time ( for 5 day access, non-recurring )", "s2member-admin", "s2member")); ?></option>
24
+ <option value="6-D-0"><?php echo esc_html (_x ("One Time ( for 6 day access, non-recurring )", "s2member-admin", "s2member")); ?></option>
25
+
26
+ <option value="1-W-0"><?php echo esc_html (_x ("One Time ( for 1 week access, non-recurring )", "s2member-admin", "s2member")); ?></option>
27
+ <option value="2-W-0"><?php echo esc_html (_x ("One Time ( for 2 week access, non-recurring )", "s2member-admin", "s2member")); ?></option>
28
+ <option value="3-W-0"><?php echo esc_html (_x ("One Time ( for 3 week access, non-recurring )", "s2member-admin", "s2member")); ?></option>
29
+
30
+ <option value="1-M-0"><?php echo esc_html (_x ("One Time ( for 1 month access, non-recurring )", "s2member-admin", "s2member")); ?></option>
31
+ <option value="2-M-0"><?php echo esc_html (_x ("One Time ( for 2 month access, non-recurring )", "s2member-admin", "s2member")); ?></option>
32
+ <option value="3-M-0"><?php echo esc_html (_x ("One Time ( for 3 month access, non-recurring )", "s2member-admin", "s2member")); ?></option>
33
+ <option value="4-M-0"><?php echo esc_html (_x ("One Time ( for 4 month access, non-recurring )", "s2member-admin", "s2member")); ?></option>
34
+ <option value="5-M-0"><?php echo esc_html (_x ("One Time ( for 5 month access, non-recurring )", "s2member-admin", "s2member")); ?></option>
35
+ <option value="6-M-0"><?php echo esc_html (_x ("One Time ( for 6 month access, non-recurring )", "s2member-admin", "s2member")); ?></option>
36
+
37
+ <option value="1-Y-0"><?php echo esc_html (_x ("One Time ( for 1 year access, non-recurring )", "s2member-admin", "s2member")); ?></option>
38
+ </optgroup>
39
+
40
+ <option disabled="disabled"></option>
41
+
42
+ <optgroup label="<?php echo esc_attr (_x ("PayPal® ( Buy Now )", "s2member-admin", "s2member")); ?>">
43
+ <option value="1-D-BN"><?php echo esc_html (_x ("One Time ( for 1 day access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
44
+ <option value="2-D-BN"><?php echo esc_html (_x ("One Time ( for 2 day access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
45
+ <option value="3-D-BN"><?php echo esc_html (_x ("One Time ( for 3 day access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
46
+ <option value="4-D-BN"><?php echo esc_html (_x ("One Time ( for 4 day access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
47
+ <option value="5-D-BN"><?php echo esc_html (_x ("One Time ( for 5 day access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
48
+ <option value="6-D-BN"><?php echo esc_html (_x ("One Time ( for 6 day access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
49
+
50
+ <option value="1-W-BN"><?php echo esc_html (_x ("One Time ( for 1 week access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
51
+ <option value="2-W-BN"><?php echo esc_html (_x ("One Time ( for 2 week access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
52
+ <option value="3-W-BN"><?php echo esc_html (_x ("One Time ( for 3 week access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
53
+
54
+ <option value="1-M-BN"><?php echo esc_html (_x ("One Time ( for 1 month access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
55
+ <option value="2-M-BN"><?php echo esc_html (_x ("One Time ( for 2 month access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
56
+ <option value="3-M-BN"><?php echo esc_html (_x ("One Time ( for 3 month access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
57
+ <option value="4-M-BN"><?php echo esc_html (_x ("One Time ( for 4 month access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
58
+ <option value="5-M-BN"><?php echo esc_html (_x ("One Time ( for 5 month access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
59
+ <option value="6-M-BN"><?php echo esc_html (_x ("One Time ( for 6 month access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
60
+
61
+ <option value="1-Y-BN"><?php echo esc_html (_x ("One Time ( for 1 year access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
62
+ <option value="2-Y-BN"><?php echo esc_html (_x ("One Time ( for 2 year access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
63
+ <option value="3-Y-BN"><?php echo esc_html (_x ("One Time ( for 3 year access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
64
+ <option value="4-Y-BN"><?php echo esc_html (_x ("One Time ( for 4 year access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
65
+ <option value="5-Y-BN"><?php echo esc_html (_x ("One Time ( for 5 year access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
66
+
67
+ <option value="1-L-BN"><?php echo esc_html (_x ("One Time ( for lifetime access, non-recurring, no trial )", "s2member-admin", "s2member")); ?></option>
68
+ </optgroup>
includes/templates/options/paypal-membership-trial-terms.html DELETED
@@ -1,4 +0,0 @@
1
- <option value="D" selected="selected">Days</option>
2
- <option value="W">Weeks</option>
3
- <option value="M">Months</option>
4
- <option value="Y">Years</option>
 
 
 
 
includes/templates/options/paypal-membership-trial-terms.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+ ?>
5
+
6
+ <option value="D" selected="selected"><?php echo esc_html (_x ("Days", "s2member-admin", "s2member")); ?></option>
7
+ <option value="W"><?php echo esc_html (_x ("Weeks", "s2member-admin", "s2member")); ?></option>
8
+ <option value="M"><?php echo esc_html (_x ("Months", "s2member-admin", "s2member")); ?></option>
9
+ <option value="Y"><?php echo esc_html (_x ("Years", "s2member-admin", "s2member")); ?></option>
includes/templates/options/paypal-sp-hours.html DELETED
@@ -1,46 +0,0 @@
1
- <optgroup label="Expires In Hours">
2
- <option value="2">Buy Now ( Specific Post/Page, link valid for 2 hours )</option>
3
- <option value="4">Buy Now ( Specific Post/Page, link valid for 4 hours )</option>
4
- <option value="6">Buy Now ( Specific Post/Page, link valid for 6 hours )</option>
5
- <option value="8">Buy Now ( Specific Post/Page, link valid for 8 hours )</option>
6
- <option value="10">Buy Now ( Specific Post/Page, link valid for 10 hours )</option>
7
- <option value="12">Buy Now ( Specific Post/Page, link valid for 12 hours )</option>
8
- </optgroup>
9
-
10
- <option disabled="disabled"></option>
11
-
12
- <optgroup label="Expires In Days">
13
- <option value="24">Buy Now ( Specific Post/Page, link valid for 1 day )</option>
14
- <option value="48">Buy Now ( Specific Post/Page, link valid for 2 days )</option>
15
- <option value="72" selected="selected">Buy Now ( Specific Post/Page, link valid for 3 days )</option>
16
- <option value="96">Buy Now ( Specific Post/Page, link valid for 4 days )</option>
17
- <option value="120">Buy Now ( Specific Post/Page, link valid for 5 days )</option>
18
- <option value="144">Buy Now ( Specific Post/Page, link valid for 6 days )</option>
19
- </optgroup>
20
-
21
- <option disabled="disabled"></option>
22
-
23
- <optgroup label="Expires In Weeks">
24
- <option value="168">Buy Now ( Specific Post/Page, link valid for 1 week )</option>
25
- <option value="336">Buy Now ( Specific Post/Page, link valid for 2 weeks )</option>
26
- <option value="504">Buy Now ( Specific Post/Page, link valid for 3 weeks )</option>
27
- </optgroup>
28
-
29
- <option disabled="disabled"></option>
30
-
31
- <optgroup label="Expires In Months">
32
- <option value="720">Buy Now ( Specific Post/Page, link valid for 1 month )</option>
33
- <option value="1440">Buy Now ( Specific Post/Page, link valid for 2 months )</option>
34
- <option value="2190">Buy Now ( Specific Post/Page, link valid for 3 months )</option>
35
- <option value="4380">Buy Now ( Specific Post/Page, link valid for 6 months )</option>
36
- </optgroup>
37
-
38
- <option disabled="disabled"></option>
39
-
40
- <optgroup label="Expires In Years">
41
- <option value="8760">Buy Now ( Specific Post/Page, link valid for 1 year )</option>
42
- <option value="17520">Buy Now ( Specific Post/Page, link valid for 2 years )</option>
43
- <option value="26280">Buy Now ( Specific Post/Page, link valid for 3 years )</option>
44
- <option value="35040">Buy Now ( Specific Post/Page, link valid for 4 years )</option>
45
- <option value="43800">Buy Now ( Specific Post/Page, link valid for 5 years )</option>
46
- </optgroup>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/templates/options/paypal-sp-hours.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+ ?>
5
+
6
+ <optgroup label="<?php echo esc_attr (_x ("Expires In Hours", "s2member-admin", "s2member")); ?>">
7
+ <option value="2"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 2 hours )", "s2member-admin", "s2member")); ?></option>
8
+ <option value="4"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 4 hours )", "s2member-admin", "s2member")); ?></option>
9
+ <option value="6"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 6 hours )", "s2member-admin", "s2member")); ?></option>
10
+ <option value="8"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 8 hours )", "s2member-admin", "s2member")); ?></option>
11
+ <option value="10"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 10 hours )", "s2member-admin", "s2member")); ?></option>
12
+ <option value="12"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 12 hours )", "s2member-admin", "s2member")); ?></option>
13
+ </optgroup>
14
+
15
+ <option disabled="disabled"></option>
16
+
17
+ <optgroup label="<?php echo esc_attr (_x ("Expires In Days", "s2member-admin", "s2member")); ?>">
18
+ <option value="24"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 1 day )", "s2member-admin", "s2member")); ?></option>
19
+ <option value="48"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 2 days )", "s2member-admin", "s2member")); ?></option>
20
+ <option value="72" selected="selected"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 3 days )", "s2member-admin", "s2member")); ?></option>
21
+ <option value="96"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 4 days )", "s2member-admin", "s2member")); ?></option>
22
+ <option value="120"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 5 days )", "s2member-admin", "s2member")); ?></option>
23
+ <option value="144"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 6 days )", "s2member-admin", "s2member")); ?></option>
24
+ </optgroup>
25
+
26
+ <option disabled="disabled"></option>
27
+
28
+ <optgroup label="<?php echo esc_attr (_x ("Expires In Weeks", "s2member-admin", "s2member")); ?>">
29
+ <option value="168"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 1 week )", "s2member-admin", "s2member")); ?></option>
30
+ <option value="336"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 2 weeks )", "s2member-admin", "s2member")); ?></option>
31
+ <option value="504"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 3 weeks )", "s2member-admin", "s2member")); ?></option>
32
+ </optgroup>
33
+
34
+ <option disabled="disabled"></option>
35
+
36
+ <optgroup label="<?php echo esc_attr (_x ("Expires In Months", "s2member-admin", "s2member")); ?>">
37
+ <option value="720"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 1 month )", "s2member-admin", "s2member")); ?></option>
38
+ <option value="1440"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 2 months )", "s2member-admin", "s2member")); ?></option>
39
+ <option value="2190"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 3 months )", "s2member-admin", "s2member")); ?></option>
40
+ <option value="4380"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 6 months )", "s2member-admin", "s2member")); ?></option>
41
+ </optgroup>
42
+
43
+ <option disabled="disabled"></option>
44
+
45
+ <optgroup label="<?php echo esc_attr (_x ("Expires In Years", "s2member-admin", "s2member")); ?>">
46
+ <option value="8760"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 1 year )", "s2member-admin", "s2member")); ?></option>
47
+ <option value="17520"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 2 years )", "s2member-admin", "s2member")); ?></option>
48
+ <option value="26280"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 3 years )", "s2member-admin", "s2member")); ?></option>
49
+ <option value="35040"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 4 years )", "s2member-admin", "s2member")); ?></option>
50
+ <option value="43800"><?php echo esc_html (_x ("Buy Now ( Specific Post/Page, link valid for 5 years )", "s2member-admin", "s2member")); ?></option>
51
+ </optgroup>
includes/templates/returns/{default-return.html → default-return.php} RENAMED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  %%doctype_html_head%%
2
  <!-- Note. The DOCTYPE and HEAD Replacement Code can be removed if you would rather build your own. -->
3
  <!-- Note. It is OK to use PHP code inside this template file ( when/if needed ). -->
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+ ?>
5
+
6
  %%doctype_html_head%%
7
  <!-- Note. The DOCTYPE and HEAD Replacement Code can be removed if you would rather build your own. -->
8
  <!-- Note. It is OK to use PHP code inside this template file ( when/if needed ). -->
includes/templates/shortcodes/paypal-cancellation-button-shortcode.html DELETED
@@ -1 +0,0 @@
1
- [s2Member-PayPal-Button cancel="1" image="default" output="anchor" /]
 
includes/templates/shortcodes/paypal-cancellation-button-shortcode.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+ ?>
5
+
6
+ [s2Member-PayPal-Button cancel="1" image="default" output="anchor" /]
includes/templates/shortcodes/paypal-ccaps-checkout-button-shortcode.html DELETED
@@ -1 +0,0 @@
1
- [s2Member-PayPal-Button level="*" ccaps="music,videos" desc="Description and pricing details here." ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="%%custom%%" ra="0.01" rp="1" rt="L" rr="BN" image="default" output="button" /]
 
includes/templates/shortcodes/paypal-ccaps-checkout-button-shortcode.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+ ?>
5
+
6
+ [s2Member-PayPal-Button level="*" ccaps="music,videos" desc="<?php echo esc_attr (_x ("Description and pricing details here.", "s2member-admin", "s2member")); ?>" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="%%custom%%" ra="0.01" rp="1" rt="L" rr="BN" image="default" output="button" /]
includes/templates/shortcodes/paypal-checkout-button-shortcode.html DELETED
@@ -1 +0,0 @@
1
- [s2Member-PayPal-Button level="%%level%%" ccaps="" desc="%%level_label%% / description and pricing details here." ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="%%custom%%" ta="0" tp="0" tt="D" ra="0.01" rp="1" rt="M" rr="1" rrt="" rra="1" image="default" output="button" /]
 
includes/templates/shortcodes/paypal-checkout-button-shortcode.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+ ?>
5
+
6
+ [s2Member-PayPal-Button level="%%level%%" ccaps="" desc="%%level_label%% / <?php echo esc_attr (_x ("Description and pricing details here.", "s2member-admin", "s2member")); ?>" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="%%custom%%" ta="0" tp="0" tt="D" ra="0.01" rp="1" rt="M" rr="1" rrt="" rra="1" image="default" output="button" /]
includes/templates/shortcodes/paypal-sp-checkout-button-shortcode.html DELETED
@@ -1 +0,0 @@
1
- [s2Member-PayPal-Button sp="1" ids="0" exp="72" desc="Description and pricing details here." ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="%%custom%%" ra="0.01" image="default" output="button" /]
 
includes/templates/shortcodes/paypal-sp-checkout-button-shortcode.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
3
+ exit("Do not access this file directly.");
4
+ ?>
5
+
6
+ [s2Member-PayPal-Button sp="1" ids="0" exp="72" desc="<?php echo esc_attr (_x ("Description and pricing details here.", "s2member-admin", "s2member")); ?>" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="%%custom%%" ra="0.01" image="default" output="button" /]
includes/translations/index.php ADDED
File without changes
includes/translations/s2member.pot ADDED
@@ -0,0 +1,3984 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2010 s2Member
2
+ # This file is distributed under the same license as the s2Member package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: s2Member 110912\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/.__s2member\n"
7
+ "POT-Creation-Date: 2011-09-13 03:17:39+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+
15
+ #: s2member/includes/classes/brute-force.inc.php:93
16
+ msgctxt "s2member-front"
17
+ msgid "Max failed logins. Please wait %s and try again."
18
+ msgstr ""
19
+
20
+ #: s2member/includes/classes/custom-reg-fields.inc.php:337
21
+ #: s2member/includes/classes/custom-reg-fields.inc.php:479
22
+ #: s2member/includes/classes/profile-in.inc.php:120
23
+ #: s2member/includes/classes/sc-profile-in.inc.php:136
24
+ #: s2member-pro/includes/templates/forms/authnet-checkout-form.php:51
25
+ #: s2member-pro/includes/templates/forms/authnet-registration-form.php:32
26
+ #: s2member-pro/includes/templates/forms/authnet-sp-checkout-form.php:51
27
+ #: s2member-pro/includes/templates/forms/paypal-checkout-form.php:51
28
+ #: s2member-pro/includes/templates/forms/paypal-registration-form.php:32
29
+ #: s2member-pro/includes/templates/forms/paypal-sp-checkout-form.php:51
30
+ msgctxt "s2member-front"
31
+ msgid "First Name"
32
+ msgstr ""
33
+
34
+ #: s2member/includes/classes/custom-reg-fields.inc.php:349
35
+ #: s2member/includes/classes/custom-reg-fields.inc.php:494
36
+ #: s2member/includes/classes/profile-in.inc.php:140
37
+ #: s2member/includes/classes/sc-profile-in.inc.php:156
38
+ #: s2member-pro/includes/templates/forms/authnet-checkout-form.php:57
39
+ #: s2member-pro/includes/templates/forms/authnet-registration-form.php:38
40
+ #: s2member-pro/includes/templates/forms/authnet-sp-checkout-form.php:57
41
+ #: s2member-pro/includes/templates/forms/paypal-checkout-form.php:57
42
+ #: s2member-pro/includes/templates/forms/paypal-registration-form.php:38
43
+ #: s2member-pro/includes/templates/forms/paypal-sp-checkout-form.php:57
44
+ msgctxt "s2member-front"
45
+ msgid "Last Name"
46
+ msgstr ""
47
+
48
+ #: s2member/includes/classes/custom-reg-fields.inc.php:451
49
+ #: s2member/includes/classes/custom-reg-fields.inc.php:456
50
+ #: s2member/includes/classes/profile-in.inc.php:233
51
+ #: s2member/includes/classes/profile-in.inc.php:239
52
+ #: s2member/includes/classes/sc-profile-in.inc.php:249
53
+ #: s2member/includes/classes/sc-profile-in.inc.php:255
54
+ msgctxt "s2member-front"
55
+ msgid "Please type your Password twice to confirm."
56
+ msgstr ""
57
+
58
+ #: s2member/includes/classes/custom-reg-fields.inc.php:452
59
+ msgctxt "s2member-front"
60
+ msgid "Password ( please type it twice )"
61
+ msgstr ""
62
+
63
+ #: s2member/includes/classes/custom-reg-fields.inc.php:460
64
+ #: s2member/includes/classes/profile-in.inc.php:243
65
+ #: s2member/includes/classes/sc-profile-in.inc.php:259
66
+ #: s2member-pro/includes/templates/forms/authnet-checkout-form.php:79
67
+ #: s2member-pro/includes/templates/forms/authnet-registration-form.php:60
68
+ #: s2member-pro/includes/templates/forms/paypal-checkout-form.php:79
69
+ #: s2member-pro/includes/templates/forms/paypal-registration-form.php:60
70
+ msgctxt "s2member-front"
71
+ msgid "password strength indicator"
72
+ msgstr ""
73
+
74
+ #: s2member/includes/classes/email-configs.inc.php:171
75
+ msgctxt "s2member-front"
76
+ msgid "as a Member"
77
+ msgstr ""
78
+
79
+ #: s2member/includes/classes/files-in.inc.php:61
80
+ #: s2member/includes/classes/files-in.inc.php:155
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:66
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:76
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:275
96
+ msgctxt "s2member-front"
97
+ msgid "Members Only"
98
+ msgstr ""
99
+
100
+ #: s2member/includes/classes/files-in.inc.php:277
101
+ msgctxt "s2member-front"
102
+ msgid "Access Denied"
103
+ msgstr ""
104
+
105
+ #: s2member/includes/classes/ip-restrictions.inc.php:76
106
+ #: s2member/includes/classes/ip-restrictions.inc.php:90
107
+ msgctxt "s2member-front"
108
+ 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."
109
+ msgstr ""
110
+
111
+ #: s2member/includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php:132
112
+ #: s2member/includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php:160
113
+ #: s2member/includes/classes/paypal-notify-in-wa-ccaps-wo-level.inc.php:100
114
+ msgctxt "s2member-front"
115
+ msgid "Thank you! Your account has been updated."
116
+ msgstr ""
117
+
118
+ #: s2member/includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php:132
119
+ #: s2member/includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php:160
120
+ #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:180
121
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:226
122
+ msgctxt "s2member-front"
123
+ msgid "Thank you! You've been updated to:"
124
+ msgstr ""
125
+
126
+ #: s2member/includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php:132
127
+ #: s2member/includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php:160
128
+ #: s2member/includes/classes/paypal-notify-in-wa-ccaps-wo-level.inc.php:100
129
+ msgctxt "s2member-front"
130
+ msgid "Please log back in now."
131
+ msgstr ""
132
+
133
+ #: s2member/includes/classes/paypal-notify-in-wa-ccaps-wo-level.inc.php:100
134
+ #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:146
135
+ msgctxt "s2member-front"
136
+ msgid "Thank you! You now have access to:"
137
+ msgstr ""
138
+
139
+ #: s2member/includes/classes/paypal-return-in-no-tx-data.inc.php:61
140
+ #: s2member/includes/classes/paypal-return-in-proxy-ty-email.inc.php:59
141
+ msgctxt "s2member-front"
142
+ msgid "<strong>Thank you! ( you MUST check your email before proceeding ).</strong><br /><br />* Note: It can take <em>( up to 15 minutes )</em> for Email Confirmation with important details. If you don't receive email confirmation in the next 15 minutes, please contact Support."
143
+ msgstr ""
144
+
145
+ #: s2member/includes/classes/paypal-return-in-no-tx-data.inc.php:61
146
+ #: s2member/includes/classes/paypal-return-in-proxy-ty-email.inc.php:59
147
+ msgctxt "s2member-front"
148
+ msgid "<strong>** Sandbox Mode **</strong> You may NOT receive this Email in Sandbox Mode. Sandbox addresses are usually bogus (for testing)."
149
+ msgstr ""
150
+
151
+ #: s2member/includes/classes/paypal-return-in-no-tx-data.inc.php:62
152
+ #: s2member/includes/classes/paypal-return-in-proxy-ty-email.inc.php:60
153
+ msgctxt "s2member-front"
154
+ msgid "Check Your Email ( Then Click Here )"
155
+ msgstr ""
156
+
157
+ #: s2member/includes/classes/paypal-return-in-no-tx-data.inc.php:62
158
+ #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:192
159
+ #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:203
160
+ #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:214
161
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:238
162
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:249
163
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:362
164
+ #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:158
165
+ #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:169
166
+ #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:180
167
+ #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:191
168
+ #: s2member/includes/classes/paypal-return-in-web-accept-sp.inc.php:121
169
+ #: s2member/includes/classes/paypal-return-in-web-accept-sp.inc.php:132
170
+ #: s2member/includes/classes/paypal-return-in.inc.php:91
171
+ #: s2member/includes/classes/paypal-return-in.inc.php:105
172
+ #: s2member/includes/classes/paypal-return-in.inc.php:133
173
+ msgctxt "s2member-front"
174
+ msgid "Back To Home Page"
175
+ msgstr ""
176
+
177
+ #: s2member/includes/classes/paypal-return-in-proxy-x-preview.inc.php:59
178
+ msgctxt "s2member-front"
179
+ msgid "<strong>Thank you! ( this is a preview, no action necessary ).</strong><br /><br />* Note: each of your Customers are returned back to your site immediately after they complete checkout. This Return Page displays a message and instructions for the Customer. s2Member may change the message and instructions dynamically, based on what the Customer is actually doing <em>( i.e. based on the type of transaction that is taking place )</em>.<br /><br /><em>* With <a href=\"%s\" target=\"_blank\">s2Member Pro</a> installed, it is possible to customize this Return Page in various ways.</em>"
180
+ msgstr ""
181
+
182
+ #: s2member/includes/classes/paypal-return-in-proxy-x-preview.inc.php:60
183
+ #: s2member/includes/classes/paypal-return-in-web-accept-sp.inc.php:110
184
+ msgctxt "s2member-front"
185
+ msgid "Continue ( Click Here )"
186
+ msgstr ""
187
+
188
+ #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:181
189
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:227
190
+ #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:147
191
+ msgctxt "s2member-front"
192
+ msgid "Please Log Back In ( Click Here )"
193
+ msgstr ""
194
+
195
+ #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:191
196
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:237
197
+ msgctxt "s2member-front"
198
+ msgid "<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access. Please make sure that you are NOT logged in as an Administrator while testing."
199
+ msgstr ""
200
+
201
+ #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:202
202
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:248
203
+ msgctxt "s2member-front"
204
+ msgid "<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />Could not get the existing User ID from the DB."
205
+ msgstr ""
206
+
207
+ #: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:213
208
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:361
209
+ #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:190
210
+ #: s2member/includes/classes/paypal-return-in-web-accept-sp.inc.php:131
211
+ msgctxt "s2member-front"
212
+ msgid "<strong>Page Expired:</strong> Duplicate Return-Data.<br />Please contact Support if you need any assistance."
213
+ msgstr ""
214
+
215
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:321
216
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:344
217
+ msgctxt "s2member-front"
218
+ msgid "<strong>Thank you! Your account has been approved.<br />The next step is to Register a Username for immediate access.</strong>"
219
+ msgstr ""
220
+
221
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:322
222
+ #: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:345
223
+ msgctxt "s2member-front"
224
+ msgid "Please Register Now ( Click Here )"
225
+ msgstr ""
226
+
227
+ #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:157
228
+ msgctxt "s2member-front"
229
+ msgid "<strong>ERROR:</strong> Unable to add new Capabilities.<br />Please contact Support for assistance.<br /><br />The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access. Please make sure that you are NOT logged in as an Administrator while testing."
230
+ msgstr ""
231
+
232
+ #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:168
233
+ msgctxt "s2member-front"
234
+ msgid "<strong>ERROR:</strong> Unable to add new Capabilities.<br />Please contact Support for assistance.<br /><br />Could not get the existing User ID from the DB."
235
+ msgstr ""
236
+
237
+ #: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:179
238
+ msgctxt "s2member-front"
239
+ msgid "<strong>ERROR:</strong> Unable to add new Capabilities.<br />Please contact Support for assistance.<br /><br />Missing User/Member details."
240
+ msgstr ""
241
+
242
+ #: s2member/includes/classes/paypal-return-in-web-accept-sp.inc.php:109
243
+ msgctxt "s2member-front"
244
+ msgid "<strong>Thank You! Your transaction has been approved.</strong>"
245
+ msgstr ""
246
+
247
+ #: s2member/includes/classes/paypal-return-in-web-accept-sp.inc.php:120
248
+ msgctxt "s2member-front"
249
+ msgid "<strong>ERROR:</strong> Unable to generate Access Link.<br />Please contact Support for assistance."
250
+ msgstr ""
251
+
252
+ #: s2member/includes/classes/paypal-return-in.inc.php:90
253
+ msgctxt "s2member-front"
254
+ msgid "<strong>ERROR:</strong> Unexpected <code>txn_type/status</code>.<br />The <code>txn_type/status</code> did not meet requirements.<br />Please contact Support for assistance."
255
+ msgstr ""
256
+
257
+ #: s2member/includes/classes/paypal-return-in.inc.php:104
258
+ msgctxt "s2member-front"
259
+ msgid "<strong>ERROR:</strong> Unable to verify <code>$_SERVER[\"HTTP_HOST\"]</code>.<br />Please contact Support for assistance.<br /><br />If you are the site owner, please check the <code>custom</code> value in your Button Code. It MUST start with your domain name."
260
+ msgstr ""
261
+
262
+ #: s2member/includes/classes/paypal-return-in.inc.php:132
263
+ msgctxt "s2member-front"
264
+ msgid "<strong>ERROR:</strong> Unable to verify <code>$_POST</code> vars.<br />Please contact Support for assistance.<br /><br />This is most likely related to an invalid configuration of s2Member, or a problem with server compatibility. If you are the site owner, and you're absolutely SURE that your configuration is valid, you may want to run some tests on your server, just to be sure <code>$_POST</code> variables are populated, and that your server is able to connect/communicate with your Payment Gateway over an HTTPS connection.<br /><br />s2Member uses the <code>WP_Http</code> class for remote connections; which will try to use <code>cURL</code> first, and then fall back on the <code>FOPEN</code> method when <code>cURL</code> is not available. On a Windows® server, you may have to disable your <code>cURL</code> extension; and instead, set <code>allow_url_fopen = yes</code> in your php.ini file. The <code>cURL</code> extension (usually) does NOT support SSL connections on a Windows® server.<br /><br />Please see <a href=\"http://www.primothemes.com/forums/viewtopic.php?f=36&t=2636\" target=\"_blank\">this thread</a> for details regarding the ideal server configuration for s2Member."
265
+ msgstr ""
266
+
267
+ #. translators: Exclude `%2$s` and `%3$s`. These are English details returned
268
+ #. by PayPal®. Replace `%2$s` and `%3$s` with: `Unable to process, please try
269
+ #. again`, or something to that affect. Or, if you prefer, you could Filter
270
+ #. ``$response["__error"]`` with `ws_plugin__s2member_paypal_api_response`.
271
+
272
+ #: s2member/includes/classes/paypal-utilities.inc.php:172
273
+ msgctxt "s2member-front"
274
+ msgid "Error #%1$s. %2$s. %3$s."
275
+ msgstr ""
276
+
277
+ #: s2member/includes/classes/paypal-utilities.inc.php:175
278
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:96
279
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:318
280
+ msgctxt "s2member-front"
281
+ msgid "Error. Please contact Support for assistance."
282
+ msgstr ""
283
+
284
+ #: s2member/includes/classes/paypal-utilities.inc.php:219
285
+ #: s2member/includes/classes/paypal-utilities.inc.php:225
286
+ msgctxt "s2member-front"
287
+ msgid "Error #%s. Transaction declined. Please use an alternate funding source."
288
+ msgstr ""
289
+
290
+ #: s2member/includes/classes/paypal-utilities.inc.php:222
291
+ msgctxt "s2member-front"
292
+ msgid "Error #%s. Transaction declined. Express Checkout was NOT confirmed."
293
+ msgstr ""
294
+
295
+ #: s2member/includes/classes/profile-in.inc.php:78
296
+ #: s2member/includes/classes/sc-profile-in.inc.php:94
297
+ #: s2member-pro/includes/classes/login-widget.inc.php:115
298
+ msgctxt "s2member-front"
299
+ msgid "Username"
300
+ msgstr ""
301
+
302
+ #: s2member/includes/classes/profile-in.inc.php:78
303
+ #: s2member/includes/classes/sc-profile-in.inc.php:94
304
+ msgctxt "s2member-front"
305
+ msgid "( cannot be changed )"
306
+ msgstr ""
307
+
308
+ #: s2member/includes/classes/profile-in.inc.php:98
309
+ #: s2member/includes/classes/sc-profile-in.inc.php:114
310
+ #: s2member-pro/includes/templates/forms/authnet-checkout-form.php:63
311
+ #: s2member-pro/includes/templates/forms/authnet-registration-form.php:44
312
+ #: s2member-pro/includes/templates/forms/authnet-sp-checkout-form.php:63
313
+ #: s2member-pro/includes/templates/forms/paypal-checkout-form.php:63
314
+ #: s2member-pro/includes/templates/forms/paypal-registration-form.php:44
315
+ #: s2member-pro/includes/templates/forms/paypal-sp-checkout-form.php:63
316
+ msgctxt "s2member-front"
317
+ msgid "Email Address"
318
+ msgstr ""
319
+
320
+ #: s2member/includes/classes/profile-in.inc.php:160
321
+ #: s2member/includes/classes/sc-profile-in.inc.php:176
322
+ msgctxt "s2member-front"
323
+ msgid "Display Name"
324
+ msgstr ""
325
+
326
+ #: s2member/includes/classes/profile-in.inc.php:234
327
+ #: s2member/includes/classes/sc-profile-in.inc.php:250
328
+ msgctxt "s2member-front"
329
+ msgid "New Password?"
330
+ msgstr ""
331
+
332
+ #: s2member/includes/classes/profile-in.inc.php:234
333
+ #: s2member/includes/classes/sc-profile-in.inc.php:250
334
+ msgctxt "s2member-front"
335
+ msgid "( please type it twice )"
336
+ msgstr ""
337
+
338
+ #: s2member/includes/classes/profile-in.inc.php:235
339
+ #: s2member/includes/classes/sc-profile-in.inc.php:251
340
+ msgctxt "s2member-front"
341
+ msgid "Only if changing password, otherwise leave blank."
342
+ msgstr ""
343
+
344
+ #: s2member/includes/classes/profile-in.inc.php:260
345
+ #: s2member/includes/classes/sc-profile-in.inc.php:277
346
+ msgctxt "s2member-front"
347
+ msgid "Save All Changes"
348
+ msgstr ""
349
+
350
+ #: s2member/includes/classes/profile-mods-in.inc.php:133
351
+ #: s2member/includes/classes/profile-mods-in.inc.php:134
352
+ #: s2member/includes/classes/profile-mods-in.inc.php:135
353
+ #: s2member/includes/classes/sc-profile-in.inc.php:70
354
+ msgctxt "s2member-front"
355
+ msgid "Profile updated successfully."
356
+ msgstr ""
357
+
358
+ #: s2member/includes/classes/register-in.inc.php:80
359
+ #: s2member/includes/classes/register-in.inc.php:83
360
+ #: s2member/includes/classes/register-in.inc.php:86
361
+ #: s2member/includes/classes/register-in.inc.php:89
362
+ #: s2member/includes/classes/sp-access.inc.php:131
363
+ msgctxt "s2member-front"
364
+ msgid "<strong>Your Link Expired:</strong><br />Please contact Support if you need assistance."
365
+ msgstr ""
366
+
367
+ #: s2member/includes/classes/registrations.inc.php:450
368
+ msgctxt "s2member-front"
369
+ msgid "s2Member security violation. You attempted to POST administrative variables that will NOT be trusted in a NON-administrative zone!"
370
+ msgstr ""
371
+
372
+ #: s2member/includes/classes/return-templates.inc.php:50
373
+ msgctxt "s2member-front"
374
+ msgid "Continue"
375
+ msgstr ""
376
+
377
+ #: s2member/includes/classes/return-templates.inc.php:51
378
+ msgctxt "s2member-front"
379
+ msgid "Thank you. Please click the link below."
380
+ msgstr ""
381
+
382
+ #: s2member/includes/classes/return-templates.inc.php:73
383
+ msgctxt "s2member-front"
384
+ msgid "[ %s ] <strong><em>says&hellip;</em></strong>"
385
+ msgstr ""
386
+
387
+ #: s2member/includes/classes/return-templates.inc.php:77
388
+ msgctxt "s2member-front"
389
+ msgid "If you need assistance, please <a href=\"%s\" target=\"_blank\">contact support</a>."
390
+ msgstr ""
391
+
392
+ #: s2member/includes/classes/sc-paypal-button-e.inc.php:77
393
+ #: s2member/includes/classes/sc-paypal-button-in.inc.php:73
394
+ #: s2member/includes/classes/sc-paypal-button-in.inc.php:94
395
+ #: s2member/includes/classes/sc-paypal-button-in.inc.php:148
396
+ #: s2member/includes/classes/sc-paypal-button-in.inc.php:203
397
+ #: s2member/includes/templates/buttons/paypal-cancellation-button.php:7
398
+ #: s2member/includes/templates/buttons/paypal-ccaps-checkout-button.php:34
399
+ #: s2member/includes/templates/buttons/paypal-checkout-button.php:46
400
+ #: s2member/includes/templates/buttons/paypal-sp-checkout-button.php:34
401
+ #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
402
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:262
403
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:505
404
+ msgctxt "s2member-front paypal-button-lang-code"
405
+ msgid "en_US"
406
+ msgstr ""
407
+
408
+ #: s2member/includes/classes/translations.inc.php:78
409
+ msgctxt "s2member-front"
410
+ msgid "Username:"
411
+ msgstr ""
412
+
413
+ #: s2member/includes/classes/translations.inc.php:82
414
+ msgctxt "s2member-front"
415
+ msgid "My Password:"
416
+ msgstr ""
417
+
418
+ #: s2member/includes/classes/translations.inc.php:90
419
+ msgctxt "s2member-front"
420
+ msgid "Username *"
421
+ msgstr ""
422
+
423
+ #: s2member/includes/classes/translations.inc.php:94
424
+ msgctxt "s2member-front"
425
+ msgid "Password *"
426
+ msgstr ""
427
+
428
+ #: s2member/includes/classes/translations.inc.php:98
429
+ msgctxt "s2member-front"
430
+ msgid "Email Address *"
431
+ msgstr ""
432
+
433
+ #: s2member/includes/classes/translations.inc.php:106
434
+ msgctxt "s2member-front"
435
+ msgid "Registration complete. Please log in."
436
+ msgstr ""
437
+
438
+ #: s2member/includes/classes/translations.inc.php:114
439
+ msgctxt "s2member-front"
440
+ msgid ""
441
+ "You have been invited to join `%1$s` at\n"
442
+ "%2$s as a Member.\n"
443
+ "Please click the following link to confirm the invite:\n"
444
+ "%4$s\n"
445
+ msgstr ""
446
+
447
+ #: s2member/includes/classes/translations.inc.php:122
448
+ msgctxt "s2member-front"
449
+ msgid "Your account is now active. <a href=\"%1$s\">Visit site</a> or <a href=\"%2$s\">Log in</a>."
450
+ msgstr ""
451
+
452
+ #: s2member/includes/classes/translations.inc.php:143
453
+ msgctxt "s2member-front"
454
+ msgid "By filling out the form below, you can <strong>add a site to your account</strong>."
455
+ msgstr ""
456
+
457
+ #: s2member/includes/classes/translations.inc.php:143
458
+ msgctxt "s2member-front"
459
+ msgid "You may create up to <strong>%s</strong> site."
460
+ msgid_plural "You may create up to <strong>%s</strong> sites."
461
+ msgstr[0] ""
462
+ msgstr[1] ""
463
+
464
+ #: s2member/includes/classes/users-list-in.inc.php:313
465
+ msgctxt "s2member-front"
466
+ msgid "Additional Profile Fields"
467
+ msgstr ""
468
+
469
+ #: s2member/includes/classes/users-list-in.inc.php:313
470
+ msgctxt "s2member-front"
471
+ msgid "( for this site )"
472
+ msgstr ""
473
+
474
+ #: s2member/includes/classes/utils-html.inc.php:60
475
+ msgctxt "s2member-front"
476
+ msgid "Strength indicator"
477
+ msgstr ""
478
+
479
+ #: s2member/includes/classes/utils-html.inc.php:60
480
+ msgctxt "s2member-front"
481
+ msgid "Very weak"
482
+ msgstr ""
483
+
484
+ #: s2member/includes/classes/utils-html.inc.php:60
485
+ msgctxt "s2member-front"
486
+ msgid "Weak"
487
+ msgstr ""
488
+
489
+ #: s2member/includes/classes/utils-html.inc.php:60
490
+ msgctxt "s2member-front"
491
+ msgid "Medium"
492
+ msgstr ""
493
+
494
+ #: s2member/includes/classes/utils-html.inc.php:60
495
+ msgctxt "s2member-front"
496
+ msgid "Strong"
497
+ msgstr ""
498
+
499
+ #: s2member/includes/classes/utils-html.inc.php:60
500
+ msgctxt "s2member-front"
501
+ msgid "Mismatch"
502
+ msgstr ""
503
+
504
+ #: s2member/includes/classes/utils-time.inc.php:53
505
+ msgctxt "s2member-front"
506
+ msgid "less than a minute"
507
+ msgstr ""
508
+
509
+ #: s2member/includes/classes/utils-time.inc.php:54
510
+ msgctxt "s2member-front"
511
+ msgid "1 minute"
512
+ msgstr ""
513
+
514
+ #: s2member/includes/classes/utils-time.inc.php:55
515
+ msgctxt "s2member-front"
516
+ msgid "%s minute"
517
+ msgid_plural "%s minutes"
518
+ msgstr[0] ""
519
+ msgstr[1] ""
520
+
521
+ #: s2member/includes/classes/utils-time.inc.php:56
522
+ msgctxt "s2member-front"
523
+ msgid "about 1 hour"
524
+ msgstr ""
525
+
526
+ #: s2member/includes/classes/utils-time.inc.php:62
527
+ msgctxt "s2member-front"
528
+ msgid "1 hour"
529
+ msgstr ""
530
+
531
+ #: s2member/includes/classes/utils-time.inc.php:63
532
+ msgctxt "s2member-front"
533
+ msgid "%s hour"
534
+ msgid_plural "%s hours"
535
+ msgstr[0] ""
536
+ msgstr[1] ""
537
+
538
+ #: s2member/includes/classes/utils-time.inc.php:64
539
+ msgctxt "s2member-front"
540
+ msgid "about 1 day"
541
+ msgstr ""
542
+
543
+ #: s2member/includes/classes/utils-time.inc.php:70
544
+ msgctxt "s2member-front"
545
+ msgid "1 day"
546
+ msgstr ""
547
+
548
+ #: s2member/includes/classes/utils-time.inc.php:71
549
+ msgctxt "s2member-front"
550
+ msgid "%s day"
551
+ msgid_plural "%s days"
552
+ msgstr[0] ""
553
+ msgstr[1] ""
554
+
555
+ #: s2member/includes/classes/utils-time.inc.php:72
556
+ msgctxt "s2member-front"
557
+ msgid "about 1 week"
558
+ msgstr ""
559
+
560
+ #: s2member/includes/classes/utils-time.inc.php:78
561
+ msgctxt "s2member-front"
562
+ msgid "1 week"
563
+ msgstr ""
564
+
565
+ #: s2member/includes/classes/utils-time.inc.php:79
566
+ msgctxt "s2member-front"
567
+ msgid "%s week"
568
+ msgid_plural "%s weeks"
569
+ msgstr[0] ""
570
+ msgstr[1] ""
571
+
572
+ #: s2member/includes/classes/utils-time.inc.php:80
573
+ msgctxt "s2member-front"
574
+ msgid "about 1 month"
575
+ msgstr ""
576
+
577
+ #: s2member/includes/classes/utils-time.inc.php:86
578
+ msgctxt "s2member-front"
579
+ msgid "1 month"
580
+ msgstr ""
581
+
582
+ #: s2member/includes/classes/utils-time.inc.php:87
583
+ msgctxt "s2member-front"
584
+ msgid "%s month"
585
+ msgid_plural "%s months"
586
+ msgstr[0] ""
587
+ msgstr[1] ""
588
+
589
+ #: s2member/includes/classes/utils-time.inc.php:88
590
+ msgctxt "s2member-front"
591
+ msgid "about 1 year"
592
+ msgstr ""
593
+
594
+ #: s2member/includes/classes/utils-time.inc.php:94
595
+ msgctxt "s2member-front"
596
+ msgid "1 year"
597
+ msgstr ""
598
+
599
+ #: s2member/includes/classes/utils-time.inc.php:95
600
+ msgctxt "s2member-front"
601
+ msgid "%s year"
602
+ msgid_plural "%s years"
603
+ msgstr[0] ""
604
+ msgstr[1] ""
605
+
606
+ #: s2member/includes/classes/utils-time.inc.php:235
607
+ msgctxt "s2member-front"
608
+ msgid "Daily"
609
+ msgstr ""
610
+
611
+ #: s2member/includes/classes/utils-time.inc.php:235
612
+ msgctxt "s2member-front"
613
+ msgid "Weekly"
614
+ msgstr ""
615
+
616
+ #: s2member/includes/classes/utils-time.inc.php:235
617
+ msgctxt "s2member-front"
618
+ msgid "Monthly"
619
+ msgstr ""
620
+
621
+ #: s2member/includes/classes/utils-time.inc.php:235
622
+ msgctxt "s2member-front"
623
+ msgid "Yearly"
624
+ msgstr ""
625
+
626
+ #: s2member/includes/classes/utils-time.inc.php:235
627
+ #: s2member/includes/classes/utils-time.inc.php:245
628
+ msgctxt "s2member-front"
629
+ msgid "Lifetime"
630
+ msgstr ""
631
+
632
+ #: s2member/includes/classes/utils-time.inc.php:239
633
+ msgctxt "s2member-front"
634
+ msgid "Bi-Weekly"
635
+ msgstr ""
636
+
637
+ #: s2member/includes/classes/utils-time.inc.php:240
638
+ msgctxt "s2member-front"
639
+ msgid "Bi-Monthly"
640
+ msgstr ""
641
+
642
+ #: s2member/includes/classes/utils-time.inc.php:241
643
+ msgctxt "s2member-front"
644
+ msgid "Quarterly"
645
+ msgstr ""
646
+
647
+ #: s2member/includes/classes/utils-time.inc.php:245
648
+ msgctxt "s2member-front"
649
+ msgid "Day"
650
+ msgstr ""
651
+
652
+ #: s2member/includes/classes/utils-time.inc.php:245
653
+ msgctxt "s2member-front"
654
+ msgid "Week"
655
+ msgstr ""
656
+
657
+ #: s2member/includes/classes/utils-time.inc.php:245
658
+ msgctxt "s2member-front"
659
+ msgid "Month"
660
+ msgstr ""
661
+
662
+ #: s2member/includes/classes/utils-time.inc.php:245
663
+ msgctxt "s2member-front"
664
+ msgid "Year"
665
+ msgstr ""
666
+
667
+ #: s2member/includes/classes/utils-time.inc.php:251
668
+ msgctxt "s2member-front"
669
+ msgid "Days"
670
+ msgstr ""
671
+
672
+ #: s2member/includes/classes/utils-time.inc.php:251
673
+ msgctxt "s2member-front"
674
+ msgid "Weeks"
675
+ msgstr ""
676
+
677
+ #: s2member/includes/classes/utils-time.inc.php:251
678
+ msgctxt "s2member-front"
679
+ msgid "Months"
680
+ msgstr ""
681
+
682
+ #: s2member/includes/classes/utils-time.inc.php:251
683
+ msgctxt "s2member-front"
684
+ msgid "Years"
685
+ msgstr ""
686
+
687
+ #: s2member/includes/classes/utils-time.inc.php:251
688
+ msgctxt "s2member-front"
689
+ msgid "Lifetimes"
690
+ msgstr ""
691
+
692
+ #. translators: Each cycle ( i.e. `each day/week/month` or `every 2
693
+ #. days/weeks/months`, etc. ). Cycles are translated elsewhere.
694
+
695
+ #: s2member/includes/classes/utils-time.inc.php:287
696
+ #: s2member/includes/classes/utils-time.inc.php:328
697
+ msgctxt "s2member-front"
698
+ msgid "each %2$s"
699
+ msgid_plural "every %1$s %3$s"
700
+ msgstr[0] ""
701
+ msgstr[1] ""
702
+
703
+ #: s2member/includes/classes/utils-time.inc.php:290
704
+ msgctxt "s2member-front"
705
+ msgid "lifetime"
706
+ msgstr ""
707
+
708
+ #. translators: Membership cycle ( i.e. `1 day/week/month` or `2
709
+ #. days/weeks/months`, etc. ). Most of this is translated elsewhere.
710
+
711
+ #: s2member/includes/classes/utils-time.inc.php:294
712
+ msgctxt "s2member-front"
713
+ msgid "%1$s %2$s"
714
+ msgid_plural "%1$s %3$s"
715
+ msgstr[0] ""
716
+ msgstr[1] ""
717
+
718
+ #. translators: Cycle ( i.e. `for 1 day/week/month` or `for 2
719
+ #. days/weeks/months`, etc. ). Most of this is translated elsewhere.
720
+
721
+ #: s2member/includes/classes/utils-time.inc.php:335
722
+ msgctxt "s2member-front"
723
+ msgid "for %1$s %2$s"
724
+ msgid_plural "for %1$s %3$s"
725
+ msgstr[0] ""
726
+ msgstr[1] ""
727
+
728
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:36
729
+ msgctxt "s2member-front"
730
+ msgid "— Confirm File Download —"
731
+ msgstr ""
732
+
733
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:37
734
+ msgctxt "s2member-front"
735
+ msgid "You`ve downloaded %s protected %s in the last %s."
736
+ msgstr ""
737
+
738
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:37
739
+ msgctxt "s2member-front"
740
+ msgid "file"
741
+ msgstr ""
742
+
743
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:37
744
+ msgctxt "s2member-front"
745
+ msgid "files"
746
+ msgstr ""
747
+
748
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:37
749
+ msgctxt "s2member-front"
750
+ msgid "24 hours"
751
+ msgstr ""
752
+
753
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:37
754
+ msgctxt "s2member-front"
755
+ msgid "%s days"
756
+ msgstr ""
757
+
758
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:38
759
+ msgctxt "s2member-front"
760
+ msgid "You`re entitled to UNLIMITED downloads though ( so, no worries )."
761
+ msgstr ""
762
+
763
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:38
764
+ msgctxt "s2member-front"
765
+ msgid "You`re entitled to %s unique %s %s."
766
+ msgstr ""
767
+
768
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:38
769
+ msgctxt "s2member-front"
770
+ msgid "download"
771
+ msgstr ""
772
+
773
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:38
774
+ msgctxt "s2member-front"
775
+ msgid "downloads"
776
+ msgstr ""
777
+
778
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:38
779
+ msgctxt "s2member-front"
780
+ msgid "each day"
781
+ msgstr ""
782
+
783
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:38
784
+ msgctxt "s2member-front"
785
+ msgid "every %s-day period"
786
+ msgstr ""
787
+
788
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:86
789
+ #: s2member/includes/s2member.js:93 s2member/includes/s2member.js:131
790
+ #: s2member/includes/s2member.js:187 s2member/includes/s2member.js:194
791
+ #: s2member/includes/s2member.js:228 s2member/includes/s2member.js:262
792
+ #: s2member/includes/s2member.js:294
793
+ #: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
794
+ #: s2member-pro/includes/separates/gateways/authnet/authnet.js:66
795
+ #: s2member-pro/includes/separates/gateways/authnet/authnet.js:73
796
+ #: s2member-pro/includes/separates/gateways/authnet/authnet.js:160
797
+ #: s2member-pro/includes/separates/gateways/authnet/authnet.js:167
798
+ #: s2member-pro/includes/separates/gateways/authnet/authnet.js:232
799
+ #: s2member-pro/includes/separates/gateways/authnet/authnet.js:239
800
+ #: s2member-pro/includes/separates/gateways/authnet/authnet.js:246
801
+ #: s2member-pro/includes/separates/gateways/authnet/authnet.js:446
802
+ #: s2member-pro/includes/separates/gateways/authnet/authnet.js:453
803
+ #: s2member-pro/includes/separates/gateways/authnet/authnet.js:674
804
+ #: s2member-pro/includes/separates/gateways/authnet/authnet.js:681
805
+ #: s2member-pro/includes/separates/gateways/authnet/authnet.js:688
806
+ #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
807
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:66
808
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:73
809
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:160
810
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:167
811
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:232
812
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:239
813
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:246
814
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:481
815
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:488
816
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:744
817
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:751
818
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:758
819
+ msgctxt "s2member-front"
820
+ msgid "— Oops, you missed something: —"
821
+ msgstr ""
822
+
823
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:93
824
+ #: s2member/includes/s2member.js:194
825
+ #: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
826
+ #: s2member-pro/includes/separates/gateways/authnet/authnet.js:239
827
+ #: s2member-pro/includes/separates/gateways/authnet/authnet.js:681
828
+ #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
829
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:239
830
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:751
831
+ msgctxt "s2member-front"
832
+ msgid "Passwords do not match up. Please try again."
833
+ msgstr ""
834
+
835
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:353
836
+ msgctxt "s2member-front"
837
+ msgid "Please check at least one of the boxes."
838
+ msgstr ""
839
+
840
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:358
841
+ msgctxt "s2member-front"
842
+ msgid "Required. This box must be checked."
843
+ msgstr ""
844
+
845
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:364
846
+ msgctxt "s2member-front"
847
+ msgid "Please select one of the options."
848
+ msgstr ""
849
+
850
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:369
851
+ msgctxt "s2member-front"
852
+ msgid "Please select at least one of the options."
853
+ msgstr ""
854
+
855
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:373
856
+ msgctxt "s2member-front"
857
+ msgid "This is a required field, please try again."
858
+ msgstr ""
859
+
860
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:379
861
+ msgctxt "s2member-front"
862
+ msgid "Must be numeric ( with or without decimals, commas allowed )."
863
+ msgstr ""
864
+
865
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:383
866
+ msgctxt "s2member-front"
867
+ msgid "Must be numeric ( with or without decimals, no commas )."
868
+ msgstr ""
869
+
870
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:387
871
+ msgctxt "s2member-front"
872
+ msgid "Must be an integer ( a whole number, without any decimals )."
873
+ msgstr ""
874
+
875
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:391
876
+ msgctxt "s2member-front"
877
+ msgid "Must be an integer > 0 ( whole number, no decimals, greater than 0 )."
878
+ msgstr ""
879
+
880
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:395
881
+ msgctxt "s2member-front"
882
+ msgid "Must be a float ( floating point number, decimals required )."
883
+ msgstr ""
884
+
885
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:399
886
+ msgctxt "s2member-front"
887
+ msgid "Must be a float > 0 ( floating point number, decimals required, greater than 0 )."
888
+ msgstr ""
889
+
890
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:403
891
+ msgctxt "s2member-front"
892
+ msgid "Must be a date ( required date format: dd/mm/yyyy )."
893
+ msgstr ""
894
+
895
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:407
896
+ msgctxt "s2member-front"
897
+ msgid "Must be a valid email address."
898
+ msgstr ""
899
+
900
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:411
901
+ msgctxt "s2member-front"
902
+ msgid ""
903
+ "Please use a personal email address.\n"
904
+ "Addresses like <%s@> are problematic."
905
+ msgstr ""
906
+
907
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:415
908
+ msgctxt "s2member-front"
909
+ msgid "Must be a full URL ( starting with http or https )."
910
+ msgstr ""
911
+
912
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:419
913
+ msgctxt "s2member-front"
914
+ msgid "Must be a domain name ( domain name only, without http )."
915
+ msgstr ""
916
+
917
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:423
918
+ msgctxt "s2member-front"
919
+ msgid "Must be a phone # ( 10 digits w/possible hyphens,spaces,brackets )."
920
+ msgstr ""
921
+
922
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:427
923
+ msgctxt "s2member-front"
924
+ msgid "Must be a US zipcode ( 5-9 digits w/possible hyphen )."
925
+ msgstr ""
926
+
927
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:431
928
+ msgctxt "s2member-front"
929
+ msgid "Must be a Canadian zipcode ( 6 alpha-numerics w/possible space )."
930
+ msgstr ""
931
+
932
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:435
933
+ msgctxt "s2member-front"
934
+ msgid "Must be a zipcode ( either a US or Canadian zipcode )."
935
+ msgstr ""
936
+
937
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:439
938
+ msgctxt "s2member-front"
939
+ msgid "Please use alphanumerics, spaces & punctuation only."
940
+ msgstr ""
941
+
942
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:443
943
+ msgctxt "s2member-front"
944
+ msgid "Please use alphanumerics & spaces only."
945
+ msgstr ""
946
+
947
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:447
948
+ msgctxt "s2member-front"
949
+ msgid "Please use alphanumerics & punctuation only ( no spaces )."
950
+ msgstr ""
951
+
952
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:451
953
+ msgctxt "s2member-front"
954
+ msgid "Please use alphanumerics only ( no spaces/punctuation )."
955
+ msgstr ""
956
+
957
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:455
958
+ msgctxt "s2member-front"
959
+ msgid "Please use alphabetics only ( no digits/spaces/punctuation )."
960
+ msgstr ""
961
+
962
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:459
963
+ msgctxt "s2member-front"
964
+ msgid "Please use numeric digits only."
965
+ msgstr ""
966
+
967
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:466
968
+ msgctxt "s2member-front"
969
+ msgid "Must be exactly %s %s."
970
+ msgstr ""
971
+
972
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:466
973
+ #: s2member/includes/s2member.js:469
974
+ msgctxt "s2member-front"
975
+ msgid "digit"
976
+ msgstr ""
977
+
978
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:466
979
+ #: s2member/includes/s2member.js:469
980
+ msgctxt "s2member-front"
981
+ msgid "digits"
982
+ msgstr ""
983
+
984
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:466
985
+ #: s2member/includes/s2member.js:469
986
+ msgctxt "s2member-front"
987
+ msgid "character"
988
+ msgstr ""
989
+
990
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:466
991
+ #: s2member/includes/s2member.js:469
992
+ msgctxt "s2member-front"
993
+ msgid "characters"
994
+ msgstr ""
995
+
996
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:469
997
+ msgctxt "s2member-front"
998
+ msgid "Must be at least %s %s."
999
+ msgstr ""
1000
+
1001
+ #: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:522
1002
+ msgctxt "s2member-front"
1003
+ msgid "Processing"
1004
+ msgstr ""
1005
+
1006
+ #: s2member/includes/syscon.inc.php:73
1007
+ msgctxt "s2member-front recaptcha-lang-code"
1008
+ msgid "en"
1009
+ msgstr ""
1010
+
1011
+ #: s2member/includes/syscon.inc.php:136
1012
+ msgctxt "s2member-front"
1013
+ msgid "Yes, I want to receive updates via email."
1014
+ msgstr ""
1015
+
1016
+ #: s2member/includes/syscon.inc.php:184
1017
+ msgctxt "s2member-front"
1018
+ msgid "[%s] Username/Password"
1019
+ msgstr ""
1020
+
1021
+ #: s2member/includes/syscon.inc.php:185
1022
+ msgctxt "s2member-front"
1023
+ msgid ""
1024
+ "Your Username/Password for:\n"
1025
+ "%s\n"
1026
+ "\n"
1027
+ "Username: %%user_login%%\n"
1028
+ "Password: %%user_pass%%\n"
1029
+ "%%wp_login_url%%"
1030
+ msgstr ""
1031
+
1032
+ #: s2member/includes/syscon.inc.php:188
1033
+ msgctxt "s2member-front"
1034
+ msgid "[%s] New User Registration"
1035
+ msgstr ""
1036
+
1037
+ #: s2member/includes/syscon.inc.php:189
1038
+ msgctxt "s2member-front"
1039
+ msgid ""
1040
+ "New User Registration on your site:\n"
1041
+ "%s\n"
1042
+ "\n"
1043
+ "User ID: %%user_id%%\n"
1044
+ "Username: %%user_login%%\n"
1045
+ "Email: %%user_email%%\n"
1046
+ "IP Address: %%user_ip%%"
1047
+ msgstr ""
1048
+
1049
+ #: s2member/includes/syscon.inc.php:205 s2member-pro/includes/syscon.inc.php:90
1050
+ msgctxt "s2member-front"
1051
+ msgid "Congratulations! ( your membership has been approved )"
1052
+ msgstr ""
1053
+
1054
+ #: s2member/includes/syscon.inc.php:206
1055
+ msgctxt "s2member-front"
1056
+ msgid ""
1057
+ "Thanks %%first_name%%! Your membership has been approved.\n"
1058
+ "\n"
1059
+ "If you haven't already done so, the next step is to Register a Username.\n"
1060
+ "\n"
1061
+ "Complete your registration here:\n"
1062
+ "%%registration_url%%\n"
1063
+ "\n"
1064
+ "If you have any trouble, please feel free to contact us.\n"
1065
+ "\n"
1066
+ "Best Regards,\n"
1067
+ "%s"
1068
+ msgstr ""
1069
+
1070
+ #: s2member/includes/syscon.inc.php:209 s2member-pro/includes/syscon.inc.php:94
1071
+ msgctxt "s2member-front"
1072
+ msgid "Thank You! ( instructions for access )"
1073
+ msgstr ""
1074
+
1075
+ #: s2member/includes/syscon.inc.php:210
1076
+ msgctxt "s2member-front"
1077
+ msgid ""
1078
+ "Thanks %%first_name%%!\n"
1079
+ "\n"
1080
+ "%%item_name%%\n"
1081
+ "\n"
1082
+ "Your order can be retrieved here:\n"
1083
+ "%%sp_access_url%%\n"
1084
+ "( link expires in %%sp_access_exp%% )\n"
1085
+ "\n"
1086
+ "If you have any trouble, please feel free to contact us.\n"
1087
+ "\n"
1088
+ "Best Regards,\n"
1089
+ "%s"
1090
+ msgstr ""
1091
+
1092
+ #: s2member/includes/syscon.inc.php:240
1093
+ msgctxt "s2member-front"
1094
+ msgid "Free Subscriber"
1095
+ msgstr ""
1096
+
1097
+ #: s2member/includes/syscon.inc.php:240
1098
+ msgctxt "s2member-front"
1099
+ msgid "Bronze Member"
1100
+ msgstr ""
1101
+
1102
+ #: s2member/includes/syscon.inc.php:240
1103
+ msgctxt "s2member-front"
1104
+ msgid "Silver Member"
1105
+ msgstr ""
1106
+
1107
+ #: s2member/includes/syscon.inc.php:240
1108
+ msgctxt "s2member-front"
1109
+ msgid "Gold Member"
1110
+ msgstr ""
1111
+
1112
+ #: s2member/includes/syscon.inc.php:240
1113
+ msgctxt "s2member-front"
1114
+ msgid "Platinum Member"
1115
+ msgstr ""
1116
+
1117
+ #: s2member/includes/syscon.inc.php:241
1118
+ msgctxt "s2member-front"
1119
+ msgid "Level %s Member"
1120
+ msgstr ""
1121
+
1122
+ #: s2member/includes/templates/badges/s-badge.php:7
1123
+ msgctxt "s2member-front"
1124
+ msgid "s2Member&reg; ( Security for WordPress&reg; )"
1125
+ msgstr ""
1126
+
1127
+ #: s2member/includes/templates/buttons/paypal-ccaps-checkout-button.php:9
1128
+ #: s2member/includes/templates/buttons/paypal-checkout-button.php:9
1129
+ #: s2member/includes/templates/buttons/paypal-sp-checkout-button.php:9
1130
+ msgctxt "s2member-admin"
1131
+ msgid "Instant Payment Notification & Return Page Details"
1132
+ msgstr ""
1133
+
1134
+ #: s2member/includes/templates/buttons/paypal-ccaps-checkout-button.php:14
1135
+ #: s2member/includes/templates/buttons/paypal-checkout-button.php:14
1136
+ #: s2member/includes/templates/buttons/paypal-sp-checkout-button.php:14
1137
+ msgctxt "s2member-admin"
1138
+ msgid "Configures Basic Checkout Fields"
1139
+ msgstr ""
1140
+
1141
+ #: s2member/includes/templates/buttons/paypal-ccaps-checkout-button.php:22
1142
+ #: s2member/includes/templates/buttons/paypal-checkout-button.php:22
1143
+ #: s2member/includes/templates/buttons/paypal-sp-checkout-button.php:22
1144
+ #: s2member/includes/templates/shortcodes/paypal-ccaps-checkout-button-shortcode.php:6
1145
+ #: s2member/includes/templates/shortcodes/paypal-checkout-button-shortcode.php:6
1146
+ #: s2member/includes/templates/shortcodes/paypal-sp-checkout-button-shortcode.php:6
1147
+ #: s2member-pro/includes/templates/shortcodes/alipay-ccaps-checkout-button-shortcode.php:6
1148
+ #: s2member-pro/includes/templates/shortcodes/alipay-checkout-button-shortcode.php:6
1149
+ #: s2member-pro/includes/templates/shortcodes/alipay-sp-checkout-button-shortcode.php:6
1150
+ #: s2member-pro/includes/templates/shortcodes/authnet-ccaps-checkout-form-shortcode.php:6
1151
+ #: s2member-pro/includes/templates/shortcodes/authnet-checkout-form-shortcode.php:6
1152
+ #: s2member-pro/includes/templates/shortcodes/authnet-sp-checkout-form-shortcode.php:6
1153
+ #: s2member-pro/includes/templates/shortcodes/ccbill-ccaps-checkout-button-shortcode.php:6
1154
+ #: s2member-pro/includes/templates/shortcodes/ccbill-checkout-button-shortcode.php:6
1155
+ #: s2member-pro/includes/templates/shortcodes/ccbill-sp-checkout-button-shortcode.php:6
1156
+ #: s2member-pro/includes/templates/shortcodes/clickbank-ccaps-checkout-button-shortcode.php:6
1157
+ #: s2member-pro/includes/templates/shortcodes/clickbank-checkout-button-shortcode.php:6
1158
+ #: s2member-pro/includes/templates/shortcodes/clickbank-sp-checkout-button-shortcode.php:6
1159
+ #: s2member-pro/includes/templates/shortcodes/google-ccaps-checkout-button-shortcode.php:6
1160
+ #: s2member-pro/includes/templates/shortcodes/google-checkout-button-shortcode.php:6
1161
+ #: s2member-pro/includes/templates/shortcodes/google-sp-checkout-button-shortcode.php:6
1162
+ #: s2member-pro/includes/templates/shortcodes/paypal-ccaps-checkout-form-shortcode.php:6
1163
+ #: s2member-pro/includes/templates/shortcodes/paypal-checkout-form-shortcode.php:6
1164
+ #: s2member-pro/includes/templates/shortcodes/paypal-sp-checkout-form-shortcode.php:6
1165
+ msgctxt "s2member-admin"
1166
+ msgid "Description and pricing details here."
1167
+ msgstr ""
1168
+
1169
+ #: s2member/includes/templates/buttons/paypal-ccaps-checkout-button.php:25
1170
+ #: s2member/includes/templates/buttons/paypal-checkout-button.php:24
1171
+ #: s2member/includes/templates/buttons/paypal-sp-checkout-button.php:25
1172
+ msgctxt "s2member-admin"
1173
+ msgid "Configures s2Member's Unique Invoice ID/Code"
1174
+ msgstr ""
1175
+
1176
+ #: s2member/includes/templates/buttons/paypal-ccaps-checkout-button.php:27
1177
+ #: s2member/includes/templates/buttons/paypal-sp-checkout-button.php:27
1178
+ msgctxt "s2member-admin"
1179
+ msgid "Associates Purchase With A User/Member ( when/if applicable )"
1180
+ msgstr ""
1181
+
1182
+ #: s2member/includes/templates/buttons/paypal-ccaps-checkout-button.php:30
1183
+ #: s2member/includes/templates/buttons/paypal-checkout-button.php:29
1184
+ #: s2member/includes/templates/buttons/paypal-sp-checkout-button.php:30
1185
+ msgctxt "s2member-admin"
1186
+ msgid "Identifies The Customer's IP Address For Tracking"
1187
+ msgstr ""
1188
+
1189
+ #: s2member/includes/templates/buttons/paypal-ccaps-checkout-button.php:33
1190
+ #: s2member/includes/templates/buttons/paypal-checkout-button.php:45
1191
+ #: s2member/includes/templates/buttons/paypal-sp-checkout-button.php:33
1192
+ msgctxt "s2member-admin"
1193
+ msgid "Displays The PayPal® Image Button"
1194
+ msgstr ""
1195
+
1196
+ #: s2member/includes/templates/buttons/paypal-checkout-button.php:26
1197
+ msgctxt "s2member-admin"
1198
+ msgid "Identifies/Updates An Existing User/Member ( when/if applicable )"
1199
+ msgstr ""
1200
+
1201
+ #: s2member/includes/templates/buttons/paypal-checkout-button.php:32
1202
+ msgctxt "s2member-admin"
1203
+ msgid "Controls Modify Behavior At PayPal® Checkout"
1204
+ msgstr ""
1205
+
1206
+ #: s2member/includes/templates/buttons/paypal-checkout-button.php:34
1207
+ msgctxt "s2member-admin"
1208
+ msgid "Customizes Prices, Payments & Billing Cycle"
1209
+ msgstr ""
1210
+
1211
+ #: s2member/includes/templates/options/paypal-currencies.php:6
1212
+ #: s2member-pro/includes/templates/options/authnet-currencies.php:6
1213
+ #: s2member-pro/includes/templates/options/ccbill-currencies.php:6
1214
+ #: s2member-pro/includes/templates/options/google-currencies.php:6
1215
+ #: s2member-pro/includes/templates/options/paypal-currencies.php:6
1216
+ msgctxt "s2member-admin"
1217
+ msgid "Currency"
1218
+ msgstr ""
1219
+
1220
+ #: s2member/includes/templates/options/paypal-membership-ccap-terms.php:6
1221
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:42
1222
+ msgctxt "s2member-admin"
1223
+ msgid "PayPal® ( Buy Now )"
1224
+ msgstr ""
1225
+
1226
+ #: s2member/includes/templates/options/paypal-membership-ccap-terms.php:7
1227
+ #: s2member-pro/includes/templates/options/authnet-membership-ccap-terms.php:7
1228
+ #: s2member-pro/includes/templates/options/paypal-membership-ccap-terms.php:7
1229
+ msgctxt "s2member-admin"
1230
+ msgid "One Time ( for lifetime access, non-recurring )"
1231
+ msgstr ""
1232
+
1233
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:6
1234
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:18
1235
+ msgctxt "s2member-admin"
1236
+ msgid "PayPal® ( Subscriptions )"
1237
+ msgstr ""
1238
+
1239
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:7
1240
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:7
1241
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:7
1242
+ msgctxt "s2member-admin"
1243
+ msgid "Daily ( recurring charge, for ongoing access )"
1244
+ msgstr ""
1245
+
1246
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:8
1247
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:7
1248
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:8
1249
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:8
1250
+ msgctxt "s2member-admin"
1251
+ msgid "Weekly ( recurring charge, for ongoing access )"
1252
+ msgstr ""
1253
+
1254
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:9
1255
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:8
1256
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:9
1257
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:9
1258
+ msgctxt "s2member-admin"
1259
+ msgid "Bi-Weekly ( recurring charge, for ongoing access )"
1260
+ msgstr ""
1261
+
1262
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:10
1263
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:9
1264
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:7
1265
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:10
1266
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:10
1267
+ msgctxt "s2member-admin"
1268
+ msgid "Monthly ( recurring charge, for ongoing access )"
1269
+ msgstr ""
1270
+
1271
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:11
1272
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:10
1273
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:8
1274
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:11
1275
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:11
1276
+ msgctxt "s2member-admin"
1277
+ msgid "Bi-Monthly ( recurring charge, for ongoing access )"
1278
+ msgstr ""
1279
+
1280
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:12
1281
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:11
1282
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:9
1283
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:12
1284
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:12
1285
+ msgctxt "s2member-admin"
1286
+ msgid "Quarterly ( recurring charge, for ongoing access )"
1287
+ msgstr ""
1288
+
1289
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:13
1290
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:12
1291
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:13
1292
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:13
1293
+ msgctxt "s2member-admin"
1294
+ msgid "Yearly ( recurring charge, for ongoing access )"
1295
+ msgstr ""
1296
+
1297
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:19
1298
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:19
1299
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:19
1300
+ msgctxt "s2member-admin"
1301
+ msgid "One Time ( for 1 day access, non-recurring )"
1302
+ msgstr ""
1303
+
1304
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:20
1305
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:20
1306
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:20
1307
+ msgctxt "s2member-admin"
1308
+ msgid "One Time ( for 2 day access, non-recurring )"
1309
+ msgstr ""
1310
+
1311
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:21
1312
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:21
1313
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:21
1314
+ msgctxt "s2member-admin"
1315
+ msgid "One Time ( for 3 day access, non-recurring )"
1316
+ msgstr ""
1317
+
1318
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:22
1319
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:22
1320
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:22
1321
+ msgctxt "s2member-admin"
1322
+ msgid "One Time ( for 4 day access, non-recurring )"
1323
+ msgstr ""
1324
+
1325
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:23
1326
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:23
1327
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:23
1328
+ msgctxt "s2member-admin"
1329
+ msgid "One Time ( for 5 day access, non-recurring )"
1330
+ msgstr ""
1331
+
1332
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:24
1333
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:24
1334
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:24
1335
+ msgctxt "s2member-admin"
1336
+ msgid "One Time ( for 6 day access, non-recurring )"
1337
+ msgstr ""
1338
+
1339
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:26
1340
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:18
1341
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:26
1342
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:26
1343
+ msgctxt "s2member-admin"
1344
+ msgid "One Time ( for 1 week access, non-recurring )"
1345
+ msgstr ""
1346
+
1347
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:27
1348
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:19
1349
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:27
1350
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:27
1351
+ msgctxt "s2member-admin"
1352
+ msgid "One Time ( for 2 week access, non-recurring )"
1353
+ msgstr ""
1354
+
1355
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:28
1356
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:20
1357
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:28
1358
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:28
1359
+ msgctxt "s2member-admin"
1360
+ msgid "One Time ( for 3 week access, non-recurring )"
1361
+ msgstr ""
1362
+
1363
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:30
1364
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:22
1365
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:30
1366
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:30
1367
+ msgctxt "s2member-admin"
1368
+ msgid "One Time ( for 1 month access, non-recurring )"
1369
+ msgstr ""
1370
+
1371
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:31
1372
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:23
1373
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:31
1374
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:31
1375
+ msgctxt "s2member-admin"
1376
+ msgid "One Time ( for 2 month access, non-recurring )"
1377
+ msgstr ""
1378
+
1379
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:32
1380
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:24
1381
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:32
1382
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:32
1383
+ msgctxt "s2member-admin"
1384
+ msgid "One Time ( for 3 month access, non-recurring )"
1385
+ msgstr ""
1386
+
1387
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:33
1388
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:25
1389
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:33
1390
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:33
1391
+ msgctxt "s2member-admin"
1392
+ msgid "One Time ( for 4 month access, non-recurring )"
1393
+ msgstr ""
1394
+
1395
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:34
1396
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:26
1397
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:34
1398
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:34
1399
+ msgctxt "s2member-admin"
1400
+ msgid "One Time ( for 5 month access, non-recurring )"
1401
+ msgstr ""
1402
+
1403
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:35
1404
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:27
1405
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:35
1406
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:35
1407
+ msgctxt "s2member-admin"
1408
+ msgid "One Time ( for 6 month access, non-recurring )"
1409
+ msgstr ""
1410
+
1411
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:37
1412
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:29
1413
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:37
1414
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:37
1415
+ msgctxt "s2member-admin"
1416
+ msgid "One Time ( for 1 year access, non-recurring )"
1417
+ msgstr ""
1418
+
1419
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:43
1420
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:35
1421
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:43
1422
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:43
1423
+ msgctxt "s2member-admin"
1424
+ msgid "One Time ( for 1 day access, non-recurring, no trial )"
1425
+ msgstr ""
1426
+
1427
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:44
1428
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:36
1429
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:15
1430
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:44
1431
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:44
1432
+ msgctxt "s2member-admin"
1433
+ msgid "One Time ( for 2 day access, non-recurring, no trial )"
1434
+ msgstr ""
1435
+
1436
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:45
1437
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:37
1438
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:16
1439
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:45
1440
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:45
1441
+ msgctxt "s2member-admin"
1442
+ msgid "One Time ( for 3 day access, non-recurring, no trial )"
1443
+ msgstr ""
1444
+
1445
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:46
1446
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:38
1447
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:17
1448
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:46
1449
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:46
1450
+ msgctxt "s2member-admin"
1451
+ msgid "One Time ( for 4 day access, non-recurring, no trial )"
1452
+ msgstr ""
1453
+
1454
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:47
1455
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:39
1456
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:18
1457
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:47
1458
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:47
1459
+ msgctxt "s2member-admin"
1460
+ msgid "One Time ( for 5 day access, non-recurring, no trial )"
1461
+ msgstr ""
1462
+
1463
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:48
1464
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:40
1465
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:19
1466
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:48
1467
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:48
1468
+ msgctxt "s2member-admin"
1469
+ msgid "One Time ( for 6 day access, non-recurring, no trial )"
1470
+ msgstr ""
1471
+
1472
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:50
1473
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:42
1474
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:21
1475
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:50
1476
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:50
1477
+ msgctxt "s2member-admin"
1478
+ msgid "One Time ( for 1 week access, non-recurring, no trial )"
1479
+ msgstr ""
1480
+
1481
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:51
1482
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:43
1483
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:22
1484
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:51
1485
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:51
1486
+ msgctxt "s2member-admin"
1487
+ msgid "One Time ( for 2 week access, non-recurring, no trial )"
1488
+ msgstr ""
1489
+
1490
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:52
1491
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:44
1492
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:23
1493
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:52
1494
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:52
1495
+ msgctxt "s2member-admin"
1496
+ msgid "One Time ( for 3 week access, non-recurring, no trial )"
1497
+ msgstr ""
1498
+
1499
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:54
1500
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:46
1501
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:25
1502
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:54
1503
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:54
1504
+ msgctxt "s2member-admin"
1505
+ msgid "One Time ( for 1 month access, non-recurring, no trial )"
1506
+ msgstr ""
1507
+
1508
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:55
1509
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:47
1510
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:26
1511
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:55
1512
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:55
1513
+ msgctxt "s2member-admin"
1514
+ msgid "One Time ( for 2 month access, non-recurring, no trial )"
1515
+ msgstr ""
1516
+
1517
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:56
1518
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:48
1519
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:27
1520
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:56
1521
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:56
1522
+ msgctxt "s2member-admin"
1523
+ msgid "One Time ( for 3 month access, non-recurring, no trial )"
1524
+ msgstr ""
1525
+
1526
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:57
1527
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:49
1528
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:28
1529
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:57
1530
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:57
1531
+ msgctxt "s2member-admin"
1532
+ msgid "One Time ( for 4 month access, non-recurring, no trial )"
1533
+ msgstr ""
1534
+
1535
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:58
1536
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:50
1537
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:29
1538
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:58
1539
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:58
1540
+ msgctxt "s2member-admin"
1541
+ msgid "One Time ( for 5 month access, non-recurring, no trial )"
1542
+ msgstr ""
1543
+
1544
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:59
1545
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:51
1546
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:30
1547
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:59
1548
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:59
1549
+ msgctxt "s2member-admin"
1550
+ msgid "One Time ( for 6 month access, non-recurring, no trial )"
1551
+ msgstr ""
1552
+
1553
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:61
1554
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:53
1555
+ #: s2member-pro/includes/templates/options/ccbill-membership-regular-terms.php:32
1556
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:61
1557
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:61
1558
+ msgctxt "s2member-admin"
1559
+ msgid "One Time ( for 1 year access, non-recurring, no trial )"
1560
+ msgstr ""
1561
+
1562
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:62
1563
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:54
1564
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:62
1565
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:62
1566
+ msgctxt "s2member-admin"
1567
+ msgid "One Time ( for 2 year access, non-recurring, no trial )"
1568
+ msgstr ""
1569
+
1570
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:63
1571
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:55
1572
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:63
1573
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:63
1574
+ msgctxt "s2member-admin"
1575
+ msgid "One Time ( for 3 year access, non-recurring, no trial )"
1576
+ msgstr ""
1577
+
1578
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:64
1579
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:56
1580
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:64
1581
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:64
1582
+ msgctxt "s2member-admin"
1583
+ msgid "One Time ( for 4 year access, non-recurring, no trial )"
1584
+ msgstr ""
1585
+
1586
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:65
1587
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:57
1588
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:65
1589
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:65
1590
+ msgctxt "s2member-admin"
1591
+ msgid "One Time ( for 5 year access, non-recurring, no trial )"
1592
+ msgstr ""
1593
+
1594
+ #: s2member/includes/templates/options/paypal-membership-regular-terms.php:67
1595
+ #: s2member-pro/includes/templates/options/authnet-membership-regular-terms.php:59
1596
+ #: s2member-pro/includes/templates/options/google-membership-regular-terms.php:67
1597
+ #: s2member-pro/includes/templates/options/paypal-membership-regular-terms.php:67
1598
+ msgctxt "s2member-admin"
1599
+ msgid "One Time ( for lifetime access, non-recurring, no trial )"
1600
+ msgstr ""
1601
+
1602
+ #: s2member/includes/templates/options/paypal-membership-trial-terms.php:6
1603
+ #: s2member-pro/includes/templates/options/authnet-membership-trial-terms.php:6
1604
+ #: s2member-pro/includes/templates/options/ccbill-membership-trial-terms.php:6
1605
+ #: s2member-pro/includes/templates/options/google-membership-trial-terms.php:6
1606
+ #: s2member-pro/includes/templates/options/paypal-membership-trial-terms.php:6
1607
+ msgctxt "s2member-admin"
1608
+ msgid "Days"
1609
+ msgstr ""
1610
+
1611
+ #: s2member/includes/templates/options/paypal-membership-trial-terms.php:7
1612
+ #: s2member-pro/includes/templates/options/authnet-membership-trial-terms.php:7
1613
+ #: s2member-pro/includes/templates/options/google-membership-trial-terms.php:7
1614
+ #: s2member-pro/includes/templates/options/paypal-membership-trial-terms.php:7
1615
+ msgctxt "s2member-admin"
1616
+ msgid "Weeks"
1617
+ msgstr ""
1618
+
1619
+ #: s2member/includes/templates/options/paypal-membership-trial-terms.php:8
1620
+ #: s2member-pro/includes/templates/options/authnet-membership-trial-terms.php:8
1621
+ #: s2member-pro/includes/templates/options/google-membership-trial-terms.php:8
1622
+ #: s2member-pro/includes/templates/options/paypal-membership-trial-terms.php:8
1623
+ msgctxt "s2member-admin"
1624
+ msgid "Months"
1625
+ msgstr ""
1626
+
1627
+ #: s2member/includes/templates/options/paypal-membership-trial-terms.php:9
1628
+ #: s2member-pro/includes/templates/options/authnet-membership-trial-terms.php:9
1629
+ #: s2member-pro/includes/templates/options/google-membership-trial-terms.php:9
1630
+ #: s2member-pro/includes/templates/options/paypal-membership-trial-terms.php:9
1631
+ msgctxt "s2member-admin"
1632
+ msgid "Years"
1633
+ msgstr ""
1634
+
1635
+ #: s2member/includes/templates/options/paypal-sp-hours.php:6
1636
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:6
1637
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:6
1638
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:6
1639
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:6
1640
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:6
1641
+ msgctxt "s2member-admin"
1642
+ msgid "Expires In Hours"
1643
+ msgstr ""
1644
+
1645
+ #: s2member/includes/templates/options/paypal-sp-hours.php:7
1646
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:7
1647
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:7
1648
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:7
1649
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:7
1650
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:7
1651
+ msgctxt "s2member-admin"
1652
+ msgid "Buy Now ( Specific Post/Page, link valid for 2 hours )"
1653
+ msgstr ""
1654
+
1655
+ #: s2member/includes/templates/options/paypal-sp-hours.php:8
1656
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:8
1657
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:8
1658
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:8
1659
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:8
1660
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:8
1661
+ msgctxt "s2member-admin"
1662
+ msgid "Buy Now ( Specific Post/Page, link valid for 4 hours )"
1663
+ msgstr ""
1664
+
1665
+ #: s2member/includes/templates/options/paypal-sp-hours.php:9
1666
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:9
1667
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:9
1668
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:9
1669
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:9
1670
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:9
1671
+ msgctxt "s2member-admin"
1672
+ msgid "Buy Now ( Specific Post/Page, link valid for 6 hours )"
1673
+ msgstr ""
1674
+
1675
+ #: s2member/includes/templates/options/paypal-sp-hours.php:10
1676
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:10
1677
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:10
1678
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:10
1679
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:10
1680
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:10
1681
+ msgctxt "s2member-admin"
1682
+ msgid "Buy Now ( Specific Post/Page, link valid for 8 hours )"
1683
+ msgstr ""
1684
+
1685
+ #: s2member/includes/templates/options/paypal-sp-hours.php:11
1686
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:11
1687
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:11
1688
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:11
1689
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:11
1690
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:11
1691
+ msgctxt "s2member-admin"
1692
+ msgid "Buy Now ( Specific Post/Page, link valid for 10 hours )"
1693
+ msgstr ""
1694
+
1695
+ #: s2member/includes/templates/options/paypal-sp-hours.php:12
1696
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:12
1697
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:12
1698
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:12
1699
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:12
1700
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:12
1701
+ msgctxt "s2member-admin"
1702
+ msgid "Buy Now ( Specific Post/Page, link valid for 12 hours )"
1703
+ msgstr ""
1704
+
1705
+ #: s2member/includes/templates/options/paypal-sp-hours.php:17
1706
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:17
1707
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:17
1708
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:6
1709
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:17
1710
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:17
1711
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:17
1712
+ msgctxt "s2member-admin"
1713
+ msgid "Expires In Days"
1714
+ msgstr ""
1715
+
1716
+ #: s2member/includes/templates/options/paypal-sp-hours.php:18
1717
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:18
1718
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:18
1719
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:18
1720
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:18
1721
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:18
1722
+ msgctxt "s2member-admin"
1723
+ msgid "Buy Now ( Specific Post/Page, link valid for 1 day )"
1724
+ msgstr ""
1725
+
1726
+ #: s2member/includes/templates/options/paypal-sp-hours.php:19
1727
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:19
1728
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:19
1729
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:7
1730
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:19
1731
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:19
1732
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:19
1733
+ msgctxt "s2member-admin"
1734
+ msgid "Buy Now ( Specific Post/Page, link valid for 2 days )"
1735
+ msgstr ""
1736
+
1737
+ #: s2member/includes/templates/options/paypal-sp-hours.php:20
1738
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:20
1739
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:20
1740
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:8
1741
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:20
1742
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:20
1743
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:20
1744
+ msgctxt "s2member-admin"
1745
+ msgid "Buy Now ( Specific Post/Page, link valid for 3 days )"
1746
+ msgstr ""
1747
+
1748
+ #: s2member/includes/templates/options/paypal-sp-hours.php:21
1749
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:21
1750
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:21
1751
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:9
1752
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:21
1753
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:21
1754
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:21
1755
+ msgctxt "s2member-admin"
1756
+ msgid "Buy Now ( Specific Post/Page, link valid for 4 days )"
1757
+ msgstr ""
1758
+
1759
+ #: s2member/includes/templates/options/paypal-sp-hours.php:22
1760
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:22
1761
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:22
1762
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:10
1763
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:22
1764
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:22
1765
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:22
1766
+ msgctxt "s2member-admin"
1767
+ msgid "Buy Now ( Specific Post/Page, link valid for 5 days )"
1768
+ msgstr ""
1769
+
1770
+ #: s2member/includes/templates/options/paypal-sp-hours.php:23
1771
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:23
1772
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:23
1773
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:11
1774
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:23
1775
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:23
1776
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:23
1777
+ msgctxt "s2member-admin"
1778
+ msgid "Buy Now ( Specific Post/Page, link valid for 6 days )"
1779
+ msgstr ""
1780
+
1781
+ #: s2member/includes/templates/options/paypal-sp-hours.php:28
1782
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:28
1783
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:28
1784
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:16
1785
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:28
1786
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:28
1787
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:28
1788
+ msgctxt "s2member-admin"
1789
+ msgid "Expires In Weeks"
1790
+ msgstr ""
1791
+
1792
+ #: s2member/includes/templates/options/paypal-sp-hours.php:29
1793
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:29
1794
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:29
1795
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:17
1796
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:29
1797
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:29
1798
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:29
1799
+ msgctxt "s2member-admin"
1800
+ msgid "Buy Now ( Specific Post/Page, link valid for 1 week )"
1801
+ msgstr ""
1802
+
1803
+ #: s2member/includes/templates/options/paypal-sp-hours.php:30
1804
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:30
1805
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:30
1806
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:18
1807
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:30
1808
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:30
1809
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:30
1810
+ msgctxt "s2member-admin"
1811
+ msgid "Buy Now ( Specific Post/Page, link valid for 2 weeks )"
1812
+ msgstr ""
1813
+
1814
+ #: s2member/includes/templates/options/paypal-sp-hours.php:31
1815
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:31
1816
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:31
1817
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:19
1818
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:31
1819
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:31
1820
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:31
1821
+ msgctxt "s2member-admin"
1822
+ msgid "Buy Now ( Specific Post/Page, link valid for 3 weeks )"
1823
+ msgstr ""
1824
+
1825
+ #: s2member/includes/templates/options/paypal-sp-hours.php:36
1826
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:36
1827
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:36
1828
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:24
1829
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:36
1830
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:36
1831
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:36
1832
+ msgctxt "s2member-admin"
1833
+ msgid "Expires In Months"
1834
+ msgstr ""
1835
+
1836
+ #: s2member/includes/templates/options/paypal-sp-hours.php:37
1837
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:37
1838
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:37
1839
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:25
1840
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:37
1841
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:37
1842
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:37
1843
+ msgctxt "s2member-admin"
1844
+ msgid "Buy Now ( Specific Post/Page, link valid for 1 month )"
1845
+ msgstr ""
1846
+
1847
+ #: s2member/includes/templates/options/paypal-sp-hours.php:38
1848
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:38
1849
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:38
1850
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:26
1851
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:38
1852
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:38
1853
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:38
1854
+ msgctxt "s2member-admin"
1855
+ msgid "Buy Now ( Specific Post/Page, link valid for 2 months )"
1856
+ msgstr ""
1857
+
1858
+ #: s2member/includes/templates/options/paypal-sp-hours.php:39
1859
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:39
1860
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:39
1861
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:27
1862
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:39
1863
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:39
1864
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:39
1865
+ msgctxt "s2member-admin"
1866
+ msgid "Buy Now ( Specific Post/Page, link valid for 3 months )"
1867
+ msgstr ""
1868
+
1869
+ #: s2member/includes/templates/options/paypal-sp-hours.php:40
1870
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:40
1871
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:40
1872
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:28
1873
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:40
1874
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:40
1875
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:40
1876
+ msgctxt "s2member-admin"
1877
+ msgid "Buy Now ( Specific Post/Page, link valid for 6 months )"
1878
+ msgstr ""
1879
+
1880
+ #: s2member/includes/templates/options/paypal-sp-hours.php:45
1881
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:45
1882
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:45
1883
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:33
1884
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:45
1885
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:45
1886
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:45
1887
+ msgctxt "s2member-admin"
1888
+ msgid "Expires In Years"
1889
+ msgstr ""
1890
+
1891
+ #: s2member/includes/templates/options/paypal-sp-hours.php:46
1892
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:46
1893
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:46
1894
+ #: s2member-pro/includes/templates/options/ccbill-sp-hours.php:34
1895
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:46
1896
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:46
1897
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:46
1898
+ msgctxt "s2member-admin"
1899
+ msgid "Buy Now ( Specific Post/Page, link valid for 1 year )"
1900
+ msgstr ""
1901
+
1902
+ #: s2member/includes/templates/options/paypal-sp-hours.php:47
1903
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:47
1904
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:47
1905
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:47
1906
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:47
1907
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:47
1908
+ msgctxt "s2member-admin"
1909
+ msgid "Buy Now ( Specific Post/Page, link valid for 2 years )"
1910
+ msgstr ""
1911
+
1912
+ #: s2member/includes/templates/options/paypal-sp-hours.php:48
1913
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:48
1914
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:48
1915
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:48
1916
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:48
1917
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:48
1918
+ msgctxt "s2member-admin"
1919
+ msgid "Buy Now ( Specific Post/Page, link valid for 3 years )"
1920
+ msgstr ""
1921
+
1922
+ #: s2member/includes/templates/options/paypal-sp-hours.php:49
1923
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:49
1924
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:49
1925
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:49
1926
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:49
1927
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:49
1928
+ msgctxt "s2member-admin"
1929
+ msgid "Buy Now ( Specific Post/Page, link valid for 4 years )"
1930
+ msgstr ""
1931
+
1932
+ #: s2member/includes/templates/options/paypal-sp-hours.php:50
1933
+ #: s2member-pro/includes/templates/options/alipay-sp-hours.php:50
1934
+ #: s2member-pro/includes/templates/options/authnet-sp-hours.php:50
1935
+ #: s2member-pro/includes/templates/options/clickbank-sp-hours.php:50
1936
+ #: s2member-pro/includes/templates/options/google-sp-hours.php:50
1937
+ #: s2member-pro/includes/templates/options/paypal-sp-hours.php:50
1938
+ msgctxt "s2member-admin"
1939
+ msgid "Buy Now ( Specific Post/Page, link valid for 5 years )"
1940
+ msgstr ""
1941
+
1942
+ #: s2member-pro/includes/classes/gateways/alipay/alipay-return-in.inc.php:116
1943
+ msgctxt "s2member-front"
1944
+ msgid ""
1945
+ "ERROR: Unexpected status. Please contact Support for assistance.\n"
1946
+ "\n"
1947
+ "The AliPay® status did NOT match a required action."
1948
+ msgstr ""
1949
+
1950
+ #: s2member-pro/includes/classes/gateways/alipay/alipay-return-in.inc.php:131
1951
+ msgctxt "s2member-front"
1952
+ msgid ""
1953
+ "ERROR: Unable to verify POST vars. Please contact Support for assistance.\n"
1954
+ "\n"
1955
+ "This is most likely related to an invalid AliPay® configuration. If you are the site owner, please check: s2Member -> AliPay® Options."
1956
+ msgstr ""
1957
+
1958
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-cancellation-in.inc.php:115
1959
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:114
1960
+ msgctxt "s2member-front"
1961
+ msgid "<strong>Billing termination confirmed.</strong> Your account has been cancelled."
1962
+ msgstr ""
1963
+
1964
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-cancellation-in.inc.php:124
1965
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-cancellation-in.inc.php:133
1966
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-cancellation-in.inc.php:142
1967
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:127
1968
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:140
1969
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:149
1970
+ msgctxt "s2member-front"
1971
+ msgid "<strong>Billing terminated.</strong> Your account has been cancelled."
1972
+ msgstr ""
1973
+
1974
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-cancellation-in.inc.php:151
1975
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-update-in.inc.php:134
1976
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:158
1977
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:151
1978
+ msgctxt "s2member-front"
1979
+ msgid "You're <strong>NOT</strong> logged in."
1980
+ msgstr ""
1981
+
1982
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:248
1983
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:589
1984
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:289
1985
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:621
1986
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:420
1987
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:857
1988
+ msgctxt "s2member-front"
1989
+ msgid "<strong>Thank you.</strong> Your account has been updated.<br />&mdash; Please <a href=\"%s\" rel=\"nofollow\">log back in</a> now."
1990
+ msgstr ""
1991
+
1992
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:450
1993
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:708
1994
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:454
1995
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:776
1996
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:685
1997
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:1012
1998
+ msgctxt "s2member-front"
1999
+ msgid "<strong>Thank you.</strong> Your account has been approved.<br />&mdash; Please <a href=\"%s\" rel=\"nofollow\">login</a>."
2000
+ msgstr ""
2001
+
2002
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:462
2003
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:489
2004
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:720
2005
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:744
2006
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-registration-in.inc.php:127
2007
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-registration-in.inc.php:147
2008
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:466
2009
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:490
2010
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:788
2011
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:812
2012
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:697
2013
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:721
2014
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:1024
2015
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:1048
2016
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-registration-in.inc.php:127
2017
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-registration-in.inc.php:147
2018
+ msgctxt "s2member-front"
2019
+ msgid "<strong>Oops.</strong> A slight problem. Please contact Support for assistance."
2020
+ msgstr ""
2021
+
2022
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:477
2023
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:732
2024
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:478
2025
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:800
2026
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:709
2027
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:1036
2028
+ msgctxt "s2member-front"
2029
+ msgid "<strong>Thank you.</strong> Your account has been approved.<br />&mdash; You'll receive an email momentarily."
2030
+ msgstr ""
2031
+
2032
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:755
2033
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:823
2034
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:1059
2035
+ msgctxt "s2member-front"
2036
+ msgid "<strong>Unknown error.</strong> Please contact Support for assistance."
2037
+ msgstr ""
2038
+
2039
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:113
2040
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:224
2041
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:360
2042
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:484
2043
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:676
2044
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:117
2045
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:228
2046
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:362
2047
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:484
2048
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:675
2049
+ msgctxt "s2member-front"
2050
+ msgid "Security Code"
2051
+ msgstr ""
2052
+
2053
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:191
2054
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:643
2055
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:195
2056
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:642
2057
+ msgctxt "s2member-front"
2058
+ msgid "Additional Info"
2059
+ msgstr ""
2060
+
2061
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:327
2062
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:451
2063
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:607
2064
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:331
2065
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:453
2066
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:608
2067
+ msgctxt "s2member-front"
2068
+ msgid "Visa®"
2069
+ msgstr ""
2070
+
2071
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:327
2072
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:451
2073
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:607
2074
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:331
2075
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:453
2076
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:608
2077
+ msgctxt "s2member-front"
2078
+ msgid "MasterCard®"
2079
+ msgstr ""
2080
+
2081
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:327
2082
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:451
2083
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:607
2084
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:331
2085
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:453
2086
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:608
2087
+ msgctxt "s2member-front"
2088
+ msgid "Discover®"
2089
+ msgstr ""
2090
+
2091
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:327
2092
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:451
2093
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:607
2094
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:331
2095
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:453
2096
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:608
2097
+ msgctxt "s2member-front"
2098
+ msgid "American Express®"
2099
+ msgstr ""
2100
+
2101
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-registration-in.inc.php:117
2102
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-registration-in.inc.php:117
2103
+ msgctxt "s2member-front"
2104
+ msgid "<strong>Thank you.</strong> Please <a href=\"%s\" rel=\"nofollow\">login</a>."
2105
+ msgstr ""
2106
+
2107
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-registration-in.inc.php:137
2108
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-registration-in.inc.php:137
2109
+ msgctxt "s2member-front"
2110
+ msgid "<strong>Thank you.</strong> You'll receive an email momentarily."
2111
+ msgstr ""
2112
+
2113
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:210
2114
+ msgctxt "s2member-admin"
2115
+ msgid "Authorize.Net® configuration error. Please configure your Authorize.Net® API Login ID."
2116
+ msgstr ""
2117
+
2118
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:213
2119
+ msgctxt "s2member-admin"
2120
+ msgid "Authorize.Net® configuration error. Your Authorize.Net® API Transaction Key is not yet configured."
2121
+ msgstr ""
2122
+
2123
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:216
2124
+ msgctxt "s2member-admin"
2125
+ msgid "Authorize.Net® configuration error. Your Authorize.Net® Secret MD5 Hash is not yet configured."
2126
+ msgstr ""
2127
+
2128
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:238
2129
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:521
2130
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:241
2131
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:593
2132
+ msgctxt "s2member-front"
2133
+ msgid "You must <a href=\"%s\" rel=\"nofollow\">log in</a> to cancel your account."
2134
+ msgstr ""
2135
+
2136
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:241
2137
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:244
2138
+ msgctxt "s2member-front"
2139
+ msgid "Nothing to cancel. You're NOT a paid Member."
2140
+ msgstr ""
2141
+
2142
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:246
2143
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:249
2144
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:254
2145
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:261
2146
+ msgctxt "s2member-front"
2147
+ msgid "Nothing to cancel. You have NO recurring fees."
2148
+ msgstr ""
2149
+
2150
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:256
2151
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:533
2152
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:268
2153
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:605
2154
+ msgctxt "s2member-front"
2155
+ msgid "You must <a href=\"%s\" rel=\"nofollow\">log in</a> to update your billing information."
2156
+ msgstr ""
2157
+
2158
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:259
2159
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:271
2160
+ msgctxt "s2member-front"
2161
+ msgid "Nothing to update. You're NOT a paid Member."
2162
+ msgstr ""
2163
+
2164
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:264
2165
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:267
2166
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:284
2167
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:291
2168
+ msgctxt "s2member-front"
2169
+ msgid "Nothing to update. You have NO recurring fees. Or, your billing profile is no longer active. Please contact Support if you need assistance."
2170
+ msgstr ""
2171
+
2172
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:274
2173
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:298
2174
+ msgctxt "s2member-admin"
2175
+ msgid "Invalid form configuration. Missing \"level\" attribute. Membership Level. Must be numeric [0-%s]."
2176
+ msgstr ""
2177
+
2178
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:277
2179
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:301
2180
+ msgctxt "s2member-admin"
2181
+ msgid "Invalid form configuration. Invalid \"level\" attribute. Membership Level. Must be numeric [0-%s]."
2182
+ msgstr ""
2183
+
2184
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:280
2185
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:370
2186
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:304
2187
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:412
2188
+ msgctxt "s2member-admin"
2189
+ msgid "Invalid form configuration. Invalid \"ccaps\" attribute. Custom Capabilities. When provided, must be all lowercase [a-z_0-9,]. A preceding `-all,` directive is also acceptable."
2190
+ msgstr ""
2191
+
2192
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:283
2193
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:394
2194
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:307
2195
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:454
2196
+ msgctxt "s2member-admin"
2197
+ msgid "Invalid form configuration. Invalid \"tp\" attribute. The Trial Period. When provided, must be numeric."
2198
+ msgstr ""
2199
+
2200
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:286
2201
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:397
2202
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:310
2203
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:457
2204
+ msgctxt "s2member-admin"
2205
+ msgid "Invalid form configuration. Invalid \"tp\" attribute. The Trial Period. When provided, must be >= 1."
2206
+ msgstr ""
2207
+
2208
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:289
2209
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:400
2210
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:313
2211
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:460
2212
+ msgctxt "s2member-admin"
2213
+ msgid "Invalid form configuration. Missing \"tt\" attribute. The Trial Term. When \"tp\" is provided, \"tt\" ( Trial Term ) must be one of D,W,M,Y."
2214
+ msgstr ""
2215
+
2216
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:292
2217
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:403
2218
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:316
2219
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:463
2220
+ msgctxt "s2member-admin"
2221
+ msgid "Invalid form configuration. Invalid \"tt\" attribute. The Trial Term. When \"tp\" is provided, \"tt\" ( Trial Term ) must be one of D,W,M,Y."
2222
+ msgstr ""
2223
+
2224
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:295
2225
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:319
2226
+ msgctxt "s2member-admin"
2227
+ msgid "Invalid form configuration. Invalid \"custom\" attribute. When provided, must start with your domain name."
2228
+ msgstr ""
2229
+
2230
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:301
2231
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:325
2232
+ msgctxt "s2member-admin"
2233
+ msgid "Invalid form configuration. Missing \"ids\" attribute. Must contain comma-delimited Post/Page IDs."
2234
+ msgstr ""
2235
+
2236
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:304
2237
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:328
2238
+ msgctxt "s2member-admin"
2239
+ msgid "Invalid form configuration. Invalid \"ids\" attribute. Must contain comma-delimited Post/Page IDs. Must contain [0-9,] only."
2240
+ msgstr ""
2241
+
2242
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:307
2243
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:331
2244
+ msgctxt "s2member-admin"
2245
+ msgid "Invalid form configuration. Missing \"exp\" attribute. Specific Post/Page Expiration ( in hours ). Must be numeric."
2246
+ msgstr ""
2247
+
2248
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:310
2249
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:334
2250
+ msgctxt "s2member-admin"
2251
+ msgid "Invalid form configuration. Invalid \"exp\" attribute. Specific Post/Page Expiration ( in hours ). Must be numeric."
2252
+ msgstr ""
2253
+
2254
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:313
2255
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:337
2256
+ msgctxt "s2member-admin"
2257
+ msgid "Invalid form configuration. Invalid \"exp\" attribute. Specific Post/Page Expiration ( in hours ). Must be >= 1."
2258
+ msgstr ""
2259
+
2260
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:316
2261
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:340
2262
+ msgctxt "s2member-admin"
2263
+ msgid "Invalid form configuration. Invalid \"exp\" attribute. Specific Post/Page Expiration ( in hours ). Must be <= 43800."
2264
+ msgstr ""
2265
+
2266
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:319
2267
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:343
2268
+ msgctxt "s2member-admin"
2269
+ msgid "Invalid form configuration. Missing \"sp_ids_exp\" internal attribute. Please check Shortcode Attributes."
2270
+ msgstr ""
2271
+
2272
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:322
2273
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:346
2274
+ msgctxt "s2member-admin"
2275
+ msgid "Invalid form configuration. Invalid \"sp_ids_exp\" internal attribute. Please check Shortcode Attributes."
2276
+ msgstr ""
2277
+
2278
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:325
2279
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:376
2280
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:349
2281
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:418
2282
+ msgctxt "s2member-admin"
2283
+ msgid "Invalid form configuration. Missing \"desc\" attribute. Please provide a Description for this form."
2284
+ msgstr ""
2285
+
2286
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:328
2287
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:379
2288
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:352
2289
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:421
2290
+ msgctxt "s2member-admin"
2291
+ msgid "Invalid form configuration. Your \"desc\" ( Description ) attribute must be <= 100 characters long."
2292
+ msgstr ""
2293
+
2294
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:331
2295
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:382
2296
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:355
2297
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:424
2298
+ msgctxt "s2member-admin"
2299
+ msgid "Invalid form configuration. Missing \"custom\" attribute. Must start with your domain name."
2300
+ msgstr ""
2301
+
2302
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:334
2303
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:358
2304
+ msgctxt "s2member-admin"
2305
+ msgid "Invalid form configuration. Invalid \"custom\" attribute. Must start with your domain name."
2306
+ msgstr ""
2307
+
2308
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:337
2309
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:388
2310
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:361
2311
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:430
2312
+ msgctxt "s2member-admin"
2313
+ msgid "Invalid form configuration. Missing \"cc\" attribute. Must be a 3 character Currency Code."
2314
+ msgstr ""
2315
+
2316
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:340
2317
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:391
2318
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:364
2319
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:433
2320
+ msgctxt "s2member-admin"
2321
+ msgid "Invalid form configuration. Invalid \"cc\" attribute. Must be a 3 character Currency Code."
2322
+ msgstr ""
2323
+
2324
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:343
2325
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:475
2326
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:385
2327
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:532
2328
+ msgctxt "s2member-admin"
2329
+ msgid "Invalid form configuration. Missing \"ra\" attribute. The Regular Amount. Must be >= 0.01."
2330
+ msgstr ""
2331
+
2332
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:346
2333
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:478
2334
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:388
2335
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:535
2336
+ msgctxt "s2member-admin"
2337
+ msgid "Invalid form configuration. Invalid \"ra\" attribute. The Regular Amount. Must be numeric."
2338
+ msgstr ""
2339
+
2340
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:349
2341
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:481
2342
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:391
2343
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:538
2344
+ msgctxt "s2member-admin"
2345
+ msgid "Invalid form configuration. Invalid \"ra\" attribute. The Regular Amount. Must be >= 0.01."
2346
+ msgstr ""
2347
+
2348
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:352
2349
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:484
2350
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:394
2351
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:541
2352
+ msgctxt "s2member-admin"
2353
+ msgid "Invalid form configuration. Invalid \"ra\" attribute. The Regular Amount. Must be <= 10000.00."
2354
+ msgstr ""
2355
+
2356
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:358
2357
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:400
2358
+ msgctxt "s2member-front"
2359
+ msgid "You must <a href=\"%s\" rel=\"nofollow\">login</a> to update your billing plan."
2360
+ msgstr ""
2361
+
2362
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:361
2363
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:403
2364
+ msgctxt "s2member-front"
2365
+ msgid "You must <a href=\"%s\" rel=\"nofollow\">login</a> before making this purchase."
2366
+ msgstr ""
2367
+
2368
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:364
2369
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:406
2370
+ msgctxt "s2member-admin"
2371
+ msgid "Invalid form configuration. Missing \"level\" attribute. Membership Level. Must be numeric [1-%s], or an asterisk (*)."
2372
+ msgstr ""
2373
+
2374
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:367
2375
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:409
2376
+ msgctxt "s2member-admin"
2377
+ msgid "Invalid form configuration. Invalid \"level\" attribute. Membership Level. Must be numeric [1-%s], or an asterisk (*)."
2378
+ msgstr ""
2379
+
2380
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:373
2381
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:415
2382
+ msgctxt "s2member-admin"
2383
+ msgid "Invalid form configuration. Missing or invalid \"ccaps\" attribute. When \"level\" is \"*\" for ( Independent Custom Capabilities ), \"ccaps\" is required. All lowercase [a-z_0-9,]. A preceding `-all,` directive is also acceptable."
2384
+ msgstr ""
2385
+
2386
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:385
2387
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:427
2388
+ msgctxt "s2member-admin"
2389
+ msgid "Invalid form configuration. Invalid \"custom\" attribute. Must start with matching domain."
2390
+ msgstr ""
2391
+
2392
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:406
2393
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:466
2394
+ msgctxt "s2member-admin"
2395
+ msgid "Invalid form configuration. Invalid \"tt, tp\" attributes. The \"tt\" ( Trial Term ) attribute is \"D\", and \"tp\" ( Trial Period ) > 365."
2396
+ msgstr ""
2397
+
2398
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:409
2399
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:469
2400
+ msgctxt "s2member-admin"
2401
+ msgid "Invalid form configuration. Invalid \"tt, tp\" attributes. The \"tt\" ( Trial Term ) attribute is \"W\", and \"tp\" ( Trial Period ) > 52."
2402
+ msgstr ""
2403
+
2404
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:412
2405
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:472
2406
+ msgctxt "s2member-admin"
2407
+ msgid "Invalid form configuration. Invalid \"tt, tp\" attributes. The \"tt\" ( Trial Term ) attribute is \"M\", and \"tp\" ( Trial Period ) > 12."
2408
+ msgstr ""
2409
+
2410
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:415
2411
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:475
2412
+ msgctxt "s2member-admin"
2413
+ msgid "Invalid form configuration. Invalid \"tt, tp\" attributes. The \"tt\" ( Trial Term ) attribute is \"Y\", and \"tp\" ( Trial Period ) > 1."
2414
+ msgstr ""
2415
+
2416
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:418
2417
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:478
2418
+ msgctxt "s2member-admin"
2419
+ msgid "Invalid form configuration. Invalid \"ta\" attribute. The Trial Amount. When provided, must be numeric."
2420
+ msgstr ""
2421
+
2422
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:421
2423
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:481
2424
+ msgctxt "s2member-admin"
2425
+ msgid "Invalid form configuration. Invalid \"ta\" attribute. The Trial Amount. When provided, must be >= 0.00."
2426
+ msgstr ""
2427
+
2428
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:424
2429
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:484
2430
+ msgctxt "s2member-admin"
2431
+ msgid "Invalid form configuration. Invalid \"ta\" attribute. The Trial Amount. When provided, must be <= 10000.00."
2432
+ msgstr ""
2433
+
2434
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:427
2435
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:487
2436
+ msgctxt "s2member-admin"
2437
+ msgid "Invalid form configuration. Missing \"rp\" attribute. The Regular Period. Must be >= 1."
2438
+ msgstr ""
2439
+
2440
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:430
2441
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:490
2442
+ msgctxt "s2member-admin"
2443
+ msgid "Invalid form configuration. Invalid \"rp\" attribute. The Regular Period. Must be numeric."
2444
+ msgstr ""
2445
+
2446
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:433
2447
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:493
2448
+ msgctxt "s2member-admin"
2449
+ msgid "Invalid form configuration. Invalid \"rp\" attribute. The Regular Period. Must be >= 1."
2450
+ msgstr ""
2451
+
2452
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:436
2453
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:496
2454
+ msgctxt "s2member-admin"
2455
+ msgid "Invalid form configuration. Missing \"rt\" attribute. The Regular Term. Must be one of D,W,M,Y,L."
2456
+ msgstr ""
2457
+
2458
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:439
2459
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:499
2460
+ msgctxt "s2member-admin"
2461
+ msgid "Invalid form configuration. Invalid \"rt\" attribute. The Regular Term. Must be one of D,W,M,Y,L."
2462
+ msgstr ""
2463
+
2464
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:442
2465
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:502
2466
+ msgctxt "s2member-admin"
2467
+ msgid "Invalid form configuration. Invalid \"rt, rp, rr\" attributes. The \"rt\" ( Regular Term ) attribute is \"D\", \"rp\" ( Regular Period ) > 365, and \"rr\" is not \"BN\" ( Buy Now )."
2468
+ msgstr ""
2469
+
2470
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:445
2471
+ msgctxt "s2member-admin"
2472
+ msgid "Invalid form configuration. Invalid \"rt, rp, rr\" attributes. The \"rt\" ( Regular Term ) attribute is \"D\", \"rp\" ( Regular Period ) is < 7, and \"rr\" is not \"BN\" ( Buy Now )."
2473
+ msgstr ""
2474
+
2475
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:448
2476
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:505
2477
+ msgctxt "s2member-admin"
2478
+ msgid "Invalid form configuration. Invalid \"rt, rp, rr\" attributes. The \"rt\" ( Regular Term ) attribute is \"W\", \"rp\" ( Regular Period ) > 52, and \"rr\" is not \"BN\" ( Buy Now )."
2479
+ msgstr ""
2480
+
2481
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:451
2482
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:508
2483
+ msgctxt "s2member-admin"
2484
+ msgid "Invalid form configuration. Invalid \"rt, rp, rr\" attributes. The \"rt\" ( Regular Term ) attribute is \"M\", \"rp\" ( Regular Period ) > 12, and \"rr\" is not \"BN\" ( Buy Now )."
2485
+ msgstr ""
2486
+
2487
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:454
2488
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:511
2489
+ msgctxt "s2member-admin"
2490
+ msgid "Invalid form configuration. Invalid \"rt, rp, rr\" attributes. The \"rt\" ( Regular Term ) attribute is \"Y\", \"rp\" ( Regular Period ) > 5, and \"rr\" is not \"BN\" ( Buy Now )."
2491
+ msgstr ""
2492
+
2493
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:457
2494
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:514
2495
+ msgctxt "s2member-admin"
2496
+ msgid "Invalid form configuration. Invalid \"rt, rp, rr\" attributes. The \"rt\" ( Regular Term ) attribute is \"Y\", \"rp\" ( Regular Period ) > 1, and \"rr\" is not \"BN\" ( Buy Now )."
2497
+ msgstr ""
2498
+
2499
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:460
2500
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:517
2501
+ msgctxt "s2member-admin"
2502
+ msgid "Invalid form configuration. Invalid \"rp, rt\" attributes. The \"rt\" ( Regular Term ) attribute is \"L\" ( Lifetime ), and \"rp\" ( Regular Period ) > 1."
2503
+ msgstr ""
2504
+
2505
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:463
2506
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:520
2507
+ msgctxt "s2member-admin"
2508
+ msgid "Invalid form configuration. Invalid \"rt, rr\" attributes. The \"rt\" ( Regular Term ) attribute is \"L\" ( Lifetime ), and \"rr\" is not \"BN\" ( Buy Now )."
2509
+ msgstr ""
2510
+
2511
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:466
2512
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:523
2513
+ msgctxt "s2member-admin"
2514
+ msgid "Invalid form configuration. Missing \"level_ccaps_eotper\" attribute. Please check Shortcode Attributes."
2515
+ msgstr ""
2516
+
2517
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:469
2518
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:472
2519
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:526
2520
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:529
2521
+ msgctxt "s2member-admin"
2522
+ msgid "Invalid form configuration. Invalid \"level_ccaps_eotper\" attribute. Please check Shortcode Attributes."
2523
+ msgstr ""
2524
+
2525
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:487
2526
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:544
2527
+ msgctxt "s2member-admin"
2528
+ msgid "Invalid form configuration. Invalid \"rr\" attribute. Regular Recurring. When provided, must be 0, 1, or BN."
2529
+ msgstr ""
2530
+
2531
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:490
2532
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:547
2533
+ msgctxt "s2member-admin"
2534
+ msgid "Invalid form configuration. Invalid \"rr, tp\" attributes. The \"rr\" ( Regular Recurring ) attribute is \"BN\" ( Buy Now ), and \"tp\" ( Trial Period ) is not \"0\"."
2535
+ msgstr ""
2536
+
2537
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:493
2538
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:550
2539
+ msgctxt "s2member-admin"
2540
+ msgid "Invalid form configuration. Invalid \"level, rr\" attributes. The \"level\" ( Level ) attribute is \"*\" for ( Independent Custom Capabilities ), and \"rr\" is not \"BN\" ( Buy Now )."
2541
+ msgstr ""
2542
+
2543
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:496
2544
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:553
2545
+ msgctxt "s2member-admin"
2546
+ msgid "Invalid form configuration. Invalid \"ta, tp, tt\" attributes. Trial Period. When provided, these cannot be exactly the same as your \"ra, rp, rt\" attributes."
2547
+ msgstr ""
2548
+
2549
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:524
2550
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:575
2551
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:620
2552
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:674
2553
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:764
2554
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:596
2555
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:647
2556
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:692
2557
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:746
2558
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:836
2559
+ msgctxt "s2member-front"
2560
+ msgid "Missing or invalid Security Code. Please try again."
2561
+ msgstr ""
2562
+
2563
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:527
2564
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:536
2565
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:686
2566
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:599
2567
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:608
2568
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:758
2569
+ msgctxt "s2member-admin"
2570
+ msgid "Unable to process. You are an Administrator. Stopping here for security. Otherwise, an Administrator could lose access."
2571
+ msgstr ""
2572
+
2573
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:539
2574
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:638
2575
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:728
2576
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:611
2577
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:710
2578
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:800
2579
+ msgctxt "s2member-front"
2580
+ msgid "Missing Card Type ( Billing Method ). Please try again."
2581
+ msgstr ""
2582
+
2583
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:542
2584
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:641
2585
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:731
2586
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:614
2587
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:713
2588
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:803
2589
+ msgctxt "s2member-front"
2590
+ msgid "Invalid Card Type ( Billing Method ). Please try again."
2591
+ msgstr ""
2592
+
2593
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:545
2594
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:644
2595
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:734
2596
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:617
2597
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:716
2598
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:806
2599
+ msgctxt "s2member-front"
2600
+ msgid "Missing Card Number. Please try again."
2601
+ msgstr ""
2602
+
2603
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:548
2604
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:647
2605
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:737
2606
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:620
2607
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:719
2608
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:809
2609
+ msgctxt "s2member-front"
2610
+ msgid "Missing Card Expiration Date ( mm/yyyy ). Please try again."
2611
+ msgstr ""
2612
+
2613
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:551
2614
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:650
2615
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:740
2616
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:623
2617
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:722
2618
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:812
2619
+ msgctxt "s2member-front"
2620
+ msgid "Invalid Card Expiration Date. Must be in this format ( mm/yyyy ). Please try again."
2621
+ msgstr ""
2622
+
2623
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:554
2624
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:653
2625
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:743
2626
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:626
2627
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:725
2628
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:815
2629
+ msgctxt "s2member-front"
2630
+ msgid "Missing Card Verification Code. It's on the back of your Card. 3-4 digits. Please try again."
2631
+ msgstr ""
2632
+
2633
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:557
2634
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:656
2635
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:746
2636
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:629
2637
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:728
2638
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:818
2639
+ msgctxt "s2member-front"
2640
+ msgid "Missing Card Start Date, or Issue #. Required for Maestro/Solo. Please try again."
2641
+ msgstr ""
2642
+
2643
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:560
2644
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:659
2645
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:749
2646
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:632
2647
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:731
2648
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:821
2649
+ msgctxt "s2member-front"
2650
+ msgid "Missing Street Address. Please try again."
2651
+ msgstr ""
2652
+
2653
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:563
2654
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:662
2655
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:752
2656
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:635
2657
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:734
2658
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:824
2659
+ msgctxt "s2member-front"
2660
+ msgid "Missing City/Town. Please try again."
2661
+ msgstr ""
2662
+
2663
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:566
2664
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:665
2665
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:755
2666
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:638
2667
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:737
2668
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:827
2669
+ msgctxt "s2member-front"
2670
+ msgid "Missing State/Province. Please try again."
2671
+ msgstr ""
2672
+
2673
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:569
2674
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:668
2675
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:758
2676
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:641
2677
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:740
2678
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:830
2679
+ msgctxt "s2member-front"
2680
+ msgid "Missing Country. Please try again."
2681
+ msgstr ""
2682
+
2683
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:572
2684
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:671
2685
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:761
2686
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:644
2687
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:743
2688
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:833
2689
+ msgctxt "s2member-front"
2690
+ msgid "Missing Postal/Zip Code. Please try again."
2691
+ msgstr ""
2692
+
2693
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:581
2694
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:626
2695
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:689
2696
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:653
2697
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:698
2698
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:761
2699
+ msgctxt "s2member-front"
2700
+ msgid "Missing First Name. Please try again."
2701
+ msgstr ""
2702
+
2703
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:584
2704
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:629
2705
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:692
2706
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:656
2707
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:701
2708
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:764
2709
+ msgctxt "s2member-front"
2710
+ msgid "Missing Last Name. Please try again."
2711
+ msgstr ""
2712
+
2713
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:587
2714
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:632
2715
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:695
2716
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:659
2717
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:704
2718
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:767
2719
+ msgctxt "s2member-front"
2720
+ msgid "Missing or invalid Email Address. Please try again."
2721
+ msgstr ""
2722
+
2723
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:590
2724
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:635
2725
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:698
2726
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:662
2727
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:707
2728
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:770
2729
+ msgctxt "s2member-front"
2730
+ msgid "Invalid Email Address. Please try again."
2731
+ msgstr ""
2732
+
2733
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:593
2734
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:701
2735
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:665
2736
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:773
2737
+ msgctxt "s2member-front"
2738
+ msgid "That Email Address is already in use. Please try again."
2739
+ msgstr ""
2740
+
2741
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:596
2742
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:704
2743
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:668
2744
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:776
2745
+ msgctxt "s2member-front"
2746
+ msgid "Missing or invalid Username. Please try again."
2747
+ msgstr ""
2748
+
2749
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:599
2750
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:707
2751
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:671
2752
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:779
2753
+ msgctxt "s2member-front"
2754
+ msgid "Invalid Username. Please try again. Use ONLY lowercase alphanumerics."
2755
+ msgstr ""
2756
+
2757
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:602
2758
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:710
2759
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:674
2760
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:782
2761
+ msgctxt "s2member-front"
2762
+ msgid "That Username is already in use. Please try again."
2763
+ msgstr ""
2764
+
2765
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:608
2766
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:716
2767
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:680
2768
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:788
2769
+ msgctxt "s2member-front"
2770
+ msgid "Missing Password. Please try again."
2771
+ msgstr ""
2772
+
2773
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:611
2774
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:719
2775
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:683
2776
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:791
2777
+ msgctxt "s2member-front"
2778
+ msgid "Invalid Password. Must be at least 6 characters. Please try again."
2779
+ msgstr ""
2780
+
2781
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:614
2782
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:722
2783
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:686
2784
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:794
2785
+ msgctxt "s2member-front"
2786
+ msgid "Invalid Password. Max length is 20 characters. Please try again."
2787
+ msgstr ""
2788
+
2789
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:617
2790
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:725
2791
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:689
2792
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:797
2793
+ msgctxt "s2member-front"
2794
+ msgid "Password fields do NOT match. Please try again."
2795
+ msgstr ""
2796
+
2797
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:680
2798
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:752
2799
+ msgctxt "s2member-front"
2800
+ msgid "You must <a href=\"%s\" rel=\"nofollow\">log in</a> to modify your billing plan."
2801
+ msgstr ""
2802
+
2803
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:683
2804
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:755
2805
+ msgctxt "s2member-front"
2806
+ msgid "You must <a href=\"%s\" rel=\"nofollow\">log in</a> before making this purchase."
2807
+ msgstr ""
2808
+
2809
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-responses.inc.php:767
2810
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:839
2811
+ msgctxt "s2member-front"
2812
+ msgid "Unknown form submission type. Please contact Support."
2813
+ msgstr ""
2814
+
2815
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-sp-checkout-in.inc.php:163
2816
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-sp-checkout-in.inc.php:275
2817
+ msgctxt "s2member-front"
2818
+ msgid "<strong>Thank you.</strong> Your purchase has been approved.<br />&mdash; Please <a href=\"%s\" rel=\"nofollow\">click here</a> to proceed."
2819
+ msgstr ""
2820
+
2821
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-sp-checkout-in.inc.php:173
2822
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-sp-checkout-in.inc.php:285
2823
+ msgctxt "s2member-front"
2824
+ msgid "<strong>Oops.</strong> Unable to generate Access Link. Please contact Support for assistance."
2825
+ msgstr ""
2826
+
2827
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-update-in.inc.php:107
2828
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:112
2829
+ msgctxt "s2member-front"
2830
+ msgid "<strong>Confirmed.</strong> Your billing information has been updated."
2831
+ msgstr ""
2832
+
2833
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-update-in.inc.php:120
2834
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:129
2835
+ msgctxt "s2member-front"
2836
+ msgid "<strong>Unable to update.</strong> You have NO recurring fees. Or, your billing profile is no longer active. Please contact Support if you need assistance."
2837
+ msgstr ""
2838
+
2839
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-update-in.inc.php:129
2840
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:146
2841
+ msgctxt "s2member-front"
2842
+ msgid "<strong>Oops.</strong> No Subscr. ID. Please contact Support for assistance."
2843
+ msgstr ""
2844
+
2845
+ #. translators: Exclude `%2$s`. This is an English error returned by
2846
+ #. Authorize.Net®. Please replace `%2$s` with: `Unable to process, please try
2847
+ #. again`, or something to that affect. Or, if you prefer, you could Filter
2848
+ #. ``$response["__error"]`` with
2849
+ #. `ws_plugin__s2member_pro_authnet_aim_response`.
2850
+ #. translators: Exclude `%2$s`. This is an English error returned by
2851
+ #. Authorize.Net®. Please replace `%2$s` with: `Unable to process, please try
2852
+ #. again`, or something to that affect. Or, if you prefer, you could Filter
2853
+ #. ``$response["__error"]`` with
2854
+ #. `ws_plugin__s2member_pro_authnet_arb_response`.
2855
+
2856
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:93
2857
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:315
2858
+ msgctxt "s2member-front"
2859
+ msgid "Error #%1$s. %2$s."
2860
+ msgstr ""
2861
+
2862
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:701
2863
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:842
2864
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:272
2865
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:413
2866
+ msgctxt "s2member-front percentage-symbol"
2867
+ msgid "%"
2868
+ msgstr ""
2869
+
2870
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:841
2871
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:412
2872
+ msgctxt "s2member-front"
2873
+ msgid " + tax"
2874
+ msgstr ""
2875
+
2876
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:868
2877
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:912
2878
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:923
2879
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:943
2880
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:995
2881
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1008
2882
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:439
2883
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:483
2884
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:494
2885
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:514
2886
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:566
2887
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:579
2888
+ msgctxt "s2member-front"
2889
+ msgid "COUPON %s off. ( Now: %s )"
2890
+ msgstr ""
2891
+
2892
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:869
2893
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:913
2894
+ #: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:92