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

Version Description

Download this release

Release Info

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

Code changes from version 111105 to 111206

Files changed (111) hide show
  1. includes/classes/admin-lockouts.inc.php +51 -30
  2. includes/classes/cron-jobs-in.inc.php +4 -5
  3. includes/classes/cron-jobs.inc.php +2 -2
  4. includes/classes/css-js-in.inc.php +18 -18
  5. includes/classes/css-js-themes.inc.php +4 -4
  6. includes/classes/css-js.inc.php +5 -5
  7. includes/classes/custom-reg-fields-4bp.inc.php +3 -3
  8. includes/classes/custom-reg-fields.inc.php +41 -41
  9. includes/classes/email-configs.inc.php +6 -5
  10. includes/classes/files-in.inc.php +3 -3
  11. includes/classes/files.inc.php +3 -3
  12. includes/classes/ip-restrictions.inc.php +2 -2
  13. includes/classes/labels.inc.php +2 -2
  14. includes/classes/list-servers.inc.php +2 -2
  15. includes/classes/login-customizations.inc.php +4 -4
  16. includes/classes/login-redirects-r.inc.php +2 -2
  17. includes/classes/login-redirects.inc.php +1 -1
  18. includes/classes/menu-pages-rs.inc.php +4 -4
  19. includes/classes/menu-pages.inc.php +22 -22
  20. includes/classes/meta-box-saves.inc.php +1 -1
  21. includes/classes/meta-box-security.inc.php +2 -2
  22. includes/classes/meta-boxes.inc.php +1 -1
  23. includes/classes/mms-patches.inc.php +1 -1
  24. includes/classes/mo-page-in.inc.php +1 -1
  25. includes/classes/mo-page.inc.php +1 -1
  26. includes/classes/no-cache.inc.php +87 -65
  27. includes/classes/op-notices.inc.php +3 -3
  28. includes/classes/option-forces.inc.php +8 -8
  29. includes/classes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php +4 -4
  30. includes/classes/paypal-notify-in.inc.php +1 -1
  31. includes/classes/paypal-notify.inc.php +1 -1
  32. includes/classes/paypal-return-in-subscr-modify-w-level.inc.php +11 -7
  33. includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php +23 -16
  34. includes/classes/paypal-return-in.inc.php +1 -1
  35. includes/classes/paypal-return.inc.php +1 -1
  36. includes/classes/paypal-utilities.inc.php +30 -30
  37. includes/classes/profile-in.inc.php +29 -29
  38. includes/classes/profile-mods-4bp-in.inc.php +1 -1
  39. includes/classes/profile-mods-4bp.inc.php +1 -1
  40. includes/classes/profile-mods-in.inc.php +1 -1
  41. includes/classes/profile-mods.inc.php +1 -1
  42. includes/classes/profile.inc.php +1 -1
  43. includes/classes/querys.inc.php +62 -56
  44. includes/classes/register-access.inc.php +1 -1
  45. includes/classes/register-in.inc.php +1 -1
  46. includes/classes/register.inc.php +1 -1
  47. includes/classes/registration-times.inc.php +1 -1
  48. includes/classes/registrations.inc.php +623 -626
  49. includes/classes/roles-caps.inc.php +1 -1
  50. includes/classes/s-badge-status-in.inc.php +1 -1
  51. includes/classes/s-badge-status.inc.php +1 -1
  52. includes/classes/sc-files-in.inc.php +1 -1
  53. includes/classes/sc-files.inc.php +1 -1
  54. includes/classes/sc-gets-in.inc.php +1 -1
  55. includes/classes/sc-gets.inc.php +1 -1
  56. includes/classes/sc-if-conds-in.inc.php +7 -7
  57. includes/classes/sc-if-conds.inc.php +1 -1
  58. includes/classes/sc-keys-in.inc.php +1 -1
  59. includes/classes/sc-keys.inc.php +1 -1
  60. includes/classes/sc-paypal-button-e.inc.php +5 -5
  61. includes/classes/sc-paypal-button-in.inc.php +46 -46
  62. includes/classes/sc-paypal-button.inc.php +1 -1
  63. includes/classes/sc-profile-in.inc.php +7 -7
  64. includes/classes/sc-profile.inc.php +1 -1
  65. includes/classes/sc-s-badge-in.inc.php +1 -1
  66. includes/classes/sc-s-badge.inc.php +1 -1
  67. includes/classes/security.inc.php +2 -2
  68. includes/classes/sp-access.inc.php +1 -1
  69. includes/classes/ssl-in.inc.php +2 -2
  70. includes/classes/ssl.inc.php +2 -2
  71. includes/classes/systematics-sp.inc.php +58 -36
  72. includes/classes/systematics.inc.php +67 -41
  73. includes/classes/tracking-codes.inc.php +12 -12
  74. includes/classes/tracking-cookies-in.inc.php +2 -2
  75. includes/classes/tracking-cookies.inc.php +2 -2
  76. includes/classes/translations.inc.php +2 -2
  77. includes/classes/user-deletions.inc.php +3 -3
  78. includes/classes/user-new-in.inc.php +38 -38
  79. includes/classes/user-new.inc.php +1 -1
  80. includes/classes/user-securities.inc.php +4 -4
  81. includes/classes/users-list-in.inc.php +59 -59
  82. includes/classes/users-list.inc.php +7 -7
  83. includes/classes/utils-arrays.inc.php +34 -14
  84. includes/classes/utils-captchas.inc.php +24 -7
  85. includes/classes/utils-conds.inc.php +9 -14
  86. includes/classes/utils-dirs.inc.php +5 -5
  87. includes/classes/utils-encryption.inc.php +84 -69
  88. includes/classes/utils-strings.inc.php +130 -58
  89. includes/classes/utils-urls.inc.php +177 -92
  90. includes/functions/api-functions.inc.php +138 -0
  91. includes/menu-pages/api-ops.inc.php +9 -9
  92. includes/menu-pages/down-ops.inc.php +8 -8
  93. includes/menu-pages/els-ops.inc.php +5 -5
  94. includes/menu-pages/gen-ops.inc.php +27 -27
  95. includes/menu-pages/menu-pages-min.js +1 -1
  96. includes/menu-pages/menu-pages-s-min.js +1 -1
  97. includes/menu-pages/menu-pages-s.js +123 -157
  98. includes/menu-pages/menu-pages.css +52 -60
  99. includes/menu-pages/menu-pages.js +33 -36
  100. includes/menu-pages/mms-ops.inc.php +3 -3
  101. includes/menu-pages/paypal-buttons.inc.php +27 -32
  102. includes/menu-pages/paypal-ops.inc.php +10 -10
  103. includes/menu-pages/res-ops.inc.php +5 -5
  104. includes/menu-pages/scripting.inc.php +4 -4
  105. includes/menu-pages/{ws-mlist.inc.php → updates.inc.php} +22 -30
  106. includes/s2member-min.js +1 -1
  107. includes/s2member.js +50 -71
  108. includes/syscon.inc.php +3 -3
  109. includes/translations/s2member.pot +350 -350
  110. readme.txt +12 -3
  111. s2member.php +11 -10
includes/classes/admin-lockouts.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_lockouts"))
21
{
@@ -41,14 +41,14 @@ 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 ((!defined ("DOING_AJAX") || !DOING_AJAX) && !current_user_can ("edit_posts") /* Give Filters a chance here too. */)
45
if (apply_filters ("ws_plugin__s2member_admin_lockout", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["force_admin_lockouts"], get_defined_vars ()))
46
{
47
if ($redirection_url = c_ws_plugin__s2member_login_redirects::login_redirection_url ())
48
- wp_redirect($redirection_url) . exit (); /* Special Redirection. */
49
/**/
50
else /* Else we use the Login Welcome Page configured for s2Member. */
51
- wp_redirect(get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"])) . exit ();
52
}
53
/**/
54
do_action ("ws_plugin__s2member_after_admin_lockouts", get_defined_vars ());
@@ -68,29 +68,35 @@ if (!class_exists ("c_ws_plugin__s2member_admin_lockouts"))
68
*/
69
public static function filter_admin_menu_bar (&$wp_admin_bar = FALSE)
70
{
71
- global $current_site, $current_blog; /* In support of Multisite Networking. */
72
- /**/
73
do_action ("ws_plugin__s2member_before_filter_admin_menu_bar", get_defined_vars ());
74
/**/
75
if (is_object ($wp_admin_bar) && !current_user_can ("edit_posts") /* Always for Users/Members. */)
76
{
77
- if (isset /* Does it have this? */ ($wp_admin_bar->menu->{"wp-logo"}))
78
- unset /* Ditch this. */($wp_admin_bar->menu->{"wp-logo"});
79
- /**/
80
- if (isset /* Does it have this? */ ($wp_admin_bar->menu->{"site-name"}["href"]))
81
- $wp_admin_bar->menu->{"site-name"}["href"] = /* Modify this to. */ site_url ("/");
82
- /**/
83
- if (isset /* Does it have this? */ ($wp_admin_bar->menu->{"site-name"}["children"]))
84
- unset /* Ditch this. */($wp_admin_bar->menu->{"site-name"}["children"]);
85
- /**/
86
- if (isset /* Before WordPress® 3.3-beta2. */ ($wp_admin_bar->menu->{"dashboard"}))
87
- unset /* Ditch this. */($wp_admin_bar->menu->{"dashboard"});
88
/**/
89
- if (isset /* Does it have this? */ ($wp_admin_bar->menu->{"my-sites"}))
90
- unset /* Ditch this. */($wp_admin_bar->menu->{"my-sites"});
91
- /**/
92
- if (isset /* Before WordPress® 3.3-beta2. */ ($wp_admin_bar->menu->{"my-blogs"}))
93
- unset /* Ditch this. */($wp_admin_bar->menu->{"my-blogs"});
94
}
95
/**/
96
if (is_object ($wp_admin_bar) && !current_user_can ("edit_posts") /* If locking Users/Members out of `/wp-admin/` areas. */)
@@ -99,17 +105,32 @@ if (!class_exists ("c_ws_plugin__s2member_admin_lockouts"))
99
$lwp = c_ws_plugin__s2member_login_redirects::login_redirection_url ();
100
$lwp = (!$lwp) ? get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"]) : $lwp;
101
/**/
102
- if (isset /* Does it have this? */ ($wp_admin_bar->menu->{"my-account"}["href"]))
103
- $wp_admin_bar->menu->{"my-account"}["href"] = /* Modify this to. */ $lwp;
104
/**/
105
- if (isset /* Before WordPress® 3.3-beta2. */ ($wp_admin_bar->menu->{"my-account-with-avatar"}["href"]))
106
- $wp_admin_bar->menu->{"my-account-with-avatar"}["href"] = /* Modify this to. */ $lwp;
107
/**/
108
- if (isset /* Does it have this? */ ($wp_admin_bar->menu->{"my-account"}["children"]->{"edit-profile"}["href"]))
109
- $wp_admin_bar->menu->{"my-account"}["children"]->{"edit-profile"}["href"] = /* Modify this to. */ $lwp;
110
/**/
111
- if (isset /* Before WordPress® 3.3-beta2. */ ($wp_admin_bar->menu->{"my-account-with-avatar"}["children"]->{"edit-profile"}["href"]))
112
- $wp_admin_bar->menu->{"my-account-with-avatar"}["children"]->{"edit-profile"}["href"] = /* Modify this to. */ $lwp;
113
}
114
/**/
115
do_action ("ws_plugin__s2member_after_filter_admin_menu_bar", 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_admin_lockouts"))
21
{
41
{
42
do_action ("ws_plugin__s2member_before_admin_lockouts", get_defined_vars ());
43
/**/
44
+ if (is_admin () && (!defined ("DOING_AJAX") || !DOING_AJAX) && !current_user_can ("edit_posts") /* Give Filters a chance here too. */)
45
if (apply_filters ("ws_plugin__s2member_admin_lockout", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["force_admin_lockouts"], get_defined_vars ()))
46
{
47
if ($redirection_url = c_ws_plugin__s2member_login_redirects::login_redirection_url ())
48
+ wp_redirect ($redirection_url) . exit (); /* Special Redirection. */
49
/**/
50
else /* Else we use the Login Welcome Page configured for s2Member. */
51
+ wp_redirect (get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"])) . exit ();
52
}
53
/**/
54
do_action ("ws_plugin__s2member_after_admin_lockouts", get_defined_vars ());
68
*/
69
public static function filter_admin_menu_bar (&$wp_admin_bar = FALSE)
70
{
71
do_action ("ws_plugin__s2member_before_filter_admin_menu_bar", get_defined_vars ());
72
/**/
73
+ $uses_nodes = (version_compare (get_bloginfo ("version"), "3.3-RC1", ">=")) ? true : false;
74
+ /**/
75
if (is_object ($wp_admin_bar) && !current_user_can ("edit_posts") /* Always for Users/Members. */)
76
{
77
+ if ($uses_nodes && $wp_admin_bar->get_node /* We have this node? */ ("site-name"))
78
+ {
79
+ $id = /* Give this a special/unique ID. */ "s2-site-name";
80
+ $title = wp_html_excerpt /* A brief excerpt. */ (get_bloginfo ("name"), 42);
81
+ $title = ($title !== get_bloginfo ("name")) ? trim ($title) . "…" : $title;
82
+ $href = /* Change to front page. */ site_url ("/");
83
+ /**/
84
+ $wp_admin_bar->add_node (array ("id" => $id, "title" => $title, "href" => $href));
85
+ $wp_admin_bar->remove_node /* Ditch now, replacing this. */ ("site-name");
86
+ /**/
87
+ unset /* A little housekeeping. */ ($id, $title, $href);
88
+ }
89
+ if ($uses_nodes && $wp_admin_bar->get_node /* We have this node? */ ("wp-logo"))
90
+ $wp_admin_bar->remove_node /* Ditch this node. */ ("wp-logo");
91
+ /* ------- */
92
+ if (!$uses_nodes && isset /* Have this item? */ ($wp_admin_bar->menu->{"dashboard"}))
93
+ unset /* Ditch this item. */ ($wp_admin_bar->menu->{"dashboard"});
94
/**/
95
+ if (!$uses_nodes && isset /* Have this item? */ ($wp_admin_bar->menu->{"my-blogs"}))
96
+ unset /* Ditch this item. */ ($wp_admin_bar->menu->{"my-blogs"});
97
+ /* ------- */
98
+ if ($uses_nodes && $wp_admin_bar->get_node /* We have this node? */ ("my-sites"))
99
+ $wp_admin_bar->remove_node /* Ditch this node. */ ("my-sites");
100
}
101
/**/
102
if (is_object ($wp_admin_bar) && !current_user_can ("edit_posts") /* If locking Users/Members out of `/wp-admin/` areas. */)
105
$lwp = c_ws_plugin__s2member_login_redirects::login_redirection_url ();
106
$lwp = (!$lwp) ? get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"]) : $lwp;
107
/**/
108
+ if ($uses_nodes && $wp_admin_bar->get_node /* We have this node? */ ("my-account"))
109
+ $wp_admin_bar->add_node /* Update this node. */ (array ("id" => "my-account", "href" => $lwp));
110
+ /**/
111
+ if ($uses_nodes && $wp_admin_bar->get_node /* We have this node? */ ("user-info"))
112
+ $wp_admin_bar->add_node /* Update this node. */ (array ("id" => "user-info", "href" => $lwp));
113
+ /**/
114
+ if ($uses_nodes && $wp_admin_bar->get_node /* We have this node? */ ("edit-profile"))
115
+ $wp_admin_bar->add_node /* Update this node. */ (array ("id" => "edit-profile", "href" => $lwp));
116
+ /* ------- */
117
+ if (!$uses_nodes && isset /* Have this item? */ ($wp_admin_bar->menu->{"my-account"}["href"]))
118
+ $wp_admin_bar->menu->{"my-account"}["href"] = /* Update this item. */ $lwp;
119
+ /**/
120
+ if (!$uses_nodes && isset /* Have this item? */ ($wp_admin_bar->menu->{"my-account"}["children"]->{"edit-profile"}["href"]))
121
+ $wp_admin_bar->menu->{"my-account"}["children"]->{"edit-profile"}["href"] = /* Update this item. */ $lwp;
122
/**/
123
+ if (!$uses_nodes && isset /* Have this item? */ ($wp_admin_bar->menu->{"my-account"}["children"]->{"user-info"}["href"]))
124
+ $wp_admin_bar->menu->{"my-account"}["children"]->{"user-info"}["href"] = /* Update this item. */ $lwp;
125
+ /* ------- */
126
+ if (!$uses_nodes && isset /* Have this item? */ ($wp_admin_bar->menu->{"my-account-with-avatar"}["href"]))
127
+ $wp_admin_bar->menu->{"my-account-with-avatar"}["href"] = /* Update this item. */ $lwp;
128
/**/
129
+ if (!$uses_nodes && isset /* Have this item? */ ($wp_admin_bar->menu->{"my-account-with-avatar"}["children"]->{"user-info"}["href"]))
130
+ $wp_admin_bar->menu->{"my-account-with-avatar"}["children"]->{"user-info"}["href"] = /* Update this item. */ $lwp;
131
/**/
132
+ if (!$uses_nodes && isset /* Have this item? */ ($wp_admin_bar->menu->{"my-account-with-avatar"}["children"]->{"edit-profile"}["href"]))
133
+ $wp_admin_bar->menu->{"my-account-with-avatar"}["children"]->{"edit-profile"}["href"] = /* Update this item. */ $lwp;
134
}
135
/**/
136
do_action ("ws_plugin__s2member_after_filter_admin_menu_bar", get_defined_vars ());
includes/classes/cron-jobs-in.inc.php CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_cron_jobs_in"))
33
* @package s2Member\Cron_Jobs
34
* @since 3.5
35
*
36
- * @attaches-to: ``add_filter("cron_schedules");``
37
*
38
* @param array $schedules Expects an array of WP_Cron schedules passed in by the Filter.
39
* @return array Array of WP_Cron schedules after having added a 10 minute cycle.
@@ -54,7 +54,7 @@ if (!class_exists ("c_ws_plugin__s2member_cron_jobs_in"))
54
* @package s2Member\Cron_Jobs
55
* @since 3.5
56
*
57
- * @attaches-to: ``add_action("init");``
58
*
59
* @return null Or exits script execution after task completed.
60
*/
@@ -62,15 +62,14 @@ if (!class_exists ("c_ws_plugin__s2member_cron_jobs_in"))
62
{
63
do_action ("ws_plugin__s2member_before_auto_eot_system_via_cron", get_defined_vars ());
64
/**/
65
- if (!empty ($_GET["s2member_auto_eot_system_via_cron"])) /* Being called through HTTP? */
66
{
67
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["auto_eot_system_enabled"])
68
{
69
- c_ws_plugin__s2member_auto_eots::auto_eot_system (); /* Process Auto EOTs now. */
70
/**/
71
do_action ("ws_plugin__s2member_during_auto_eot_system_via_cron", get_defined_vars ());
72
}
73
- /**/
74
exit (); /* Clean exit. */
75
}
76
/**/
33
* @package s2Member\Cron_Jobs
34
* @since 3.5
35
*
36
+ * @attaches-to ``add_filter("cron_schedules");``
37
*
38
* @param array $schedules Expects an array of WP_Cron schedules passed in by the Filter.
39
* @return array Array of WP_Cron schedules after having added a 10 minute cycle.
54
* @package s2Member\Cron_Jobs
55
* @since 3.5
56
*
57
+ * @attaches-to ``add_action("init");``
58
*
59
* @return null Or exits script execution after task completed.
60
*/
62
{
63
do_action ("ws_plugin__s2member_before_auto_eot_system_via_cron", get_defined_vars ());
64
/**/
65
+ if (!empty ($_GET["s2member_auto_eot_system_via_cron"])) /* Called through HTTP? */
66
{
67
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["auto_eot_system_enabled"])
68
{
69
+ c_ws_plugin__s2member_auto_eots::auto_eot_system (); /* Process. */
70
/**/
71
do_action ("ws_plugin__s2member_during_auto_eot_system_via_cron", get_defined_vars ());
72
}
73
exit (); /* Clean exit. */
74
}
75
/**/
includes/classes/cron-jobs.inc.php CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_cron_jobs"))
33
* @package s2Member\Cron_Jobs
34
* @since 3.5
35
*
36
- * @attaches-to: ``add_filter("cron_schedules");``
37
*
38
* @param array $schedules Expects an array of WP_Cron schedules passed in by the Filter.
39
* @return inner Return-value of inner routine.
@@ -48,7 +48,7 @@ if (!class_exists ("c_ws_plugin__s2member_cron_jobs"))
48
* @package s2Member\Cron_Jobs
49
* @since 3.5
50
*
51
- * @attaches-to: ``add_action("init");``
52
*
53
* @return null|inner Return-value of inner routine.
54
*/
33
* @package s2Member\Cron_Jobs
34
* @since 3.5
35
*
36
+ * @attaches-to ``add_filter("cron_schedules");``
37
*
38
* @param array $schedules Expects an array of WP_Cron schedules passed in by the Filter.
39
* @return inner Return-value of inner routine.
48
* @package s2Member\Cron_Jobs
49
* @since 3.5
50
*
51
+ * @attaches-to ``add_action("init");``
52
*
53
* @return null|inner Return-value of inner routine.
54
*/
includes/classes/css-js-in.inc.php CHANGED
@@ -15,7 +15,7 @@
15
* @since 3.5
16
*/
17
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
/**/
20
if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
21
{
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
33
* @package s2Member\CSS_JS
34
* @since 3.5
35
*
36
- * @attaches-to: ``add_action("init");``
37
*
38
* @return null Or exits script execution after loading CSS.
39
*/
@@ -43,20 +43,20 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
43
/**/
44
if (!empty ($_GET["ws_plugin__s2member_css"]))
45
{
46
- status_header (200); /* 200 OK status header. */
47
/**/
48
- header ("Content-Type: text/css; charset=utf-8");
49
- header ("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("+1 week")) . " GMT");
50
- header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
51
- header ("Cache-Control: max-age=604800");
52
- header ("Pragma: public");
53
/**/
54
- eval ('while (@ob_end_clean ());'); /* Clean buffers. */
55
/**/
56
$u = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"];
57
$i = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images";
58
/**/
59
- ob_start ("c_ws_plugin__s2member_utils_css::compress_css");
60
/**/
61
include_once dirname (dirname (__FILE__)) . "/s2member.css";
62
/**/
@@ -75,7 +75,7 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
75
* @package s2Member\CSS_JS
76
* @since 3.5
77
*
78
- * @attaches-to: ``add_action("init");``
79
*
80
* @return null Or exits script execution after loading JS w/Globals.
81
*/
@@ -85,15 +85,15 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
85
/**/
86
if (!empty ($_GET["ws_plugin__s2member_js_w_globals"]))
87
{
88
- status_header (200); /* 200 OK status header. */
89
/**/
90
- header ("Content-Type: text/javascript; charset=utf-8");
91
- header ("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("+1 week")) . " GMT");
92
- header ("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
93
- header ("Cache-Control: max-age=604800");
94
- header ("Pragma: public");
95
/**/
96
- eval ('while (@ob_end_clean ());'); /* Clean buffers. */
97
/**/
98
include_once dirname (dirname (__FILE__)) . "/jquery/jquery.sprintf/jquery.sprintf-min.js";
99
/**/
15
* @since 3.5
16
*/
17
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit("Do not access this file directly.");
19
/**/
20
if (!class_exists ("c_ws_plugin__s2member_css_js_in"))
21
{
33
* @package s2Member\CSS_JS
34
* @since 3.5
35
*
36
+ * @attaches-to ``add_action("init");``
37
*
38
* @return null Or exits script execution after loading CSS.
39
*/
43
/**/
44
if (!empty ($_GET["ws_plugin__s2member_css"]))
45
{
46
+ status_header(200); /* 200 OK status. */
47
/**/
48
+ header("Content-Type: text/css; charset=utf-8");
49
+ header("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("+1 week")) . " GMT");
50
+ header("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
51
+ header("Cache-Control: max-age=604800");
52
+ header("Pragma: public");
53
/**/
54
+ eval('while (@ob_end_clean ());');
55
/**/
56
$u = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"];
57
$i = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images";
58
/**/
59
+ ob_start("c_ws_plugin__s2member_utils_css::compress_css");
60
/**/
61
include_once dirname (dirname (__FILE__)) . "/s2member.css";
62
/**/
75
* @package s2Member\CSS_JS
76
* @since 3.5
77
*
78
+ * @attaches-to ``add_action("init");``
79
*
80
* @return null Or exits script execution after loading JS w/Globals.
81
*/
85
/**/
86
if (!empty ($_GET["ws_plugin__s2member_js_w_globals"]))
87
{
88
+ status_header(200); /* 200 OK status header. */
89
/**/
90
+ header("Content-Type: text/javascript; charset=utf-8");
91
+ header("Expires: " . gmdate ("D, d M Y H:i:s", strtotime ("+1 week")) . " GMT");
92
+ header("Last-Modified: " . gmdate ("D, d M Y H:i:s") . " GMT");
93
+ header("Cache-Control: max-age=604800");
94
+ header("Pragma: public");
95
/**/
96
+ eval('while (@ob_end_clean ());');
97
/**/
98
include_once dirname (dirname (__FILE__)) . "/jquery/jquery.sprintf/jquery.sprintf-min.js";
99
/**/
includes/classes/css-js-themes.inc.php CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_themes"))
33
* @package s2Member\CSS_JS
34
* @since 3.5
35
*
36
- * @attaches-to: ``add_action("wp_print_styles");``
37
*
38
* @return null After enqueuing CSS for theme integration.
39
*/
@@ -43,7 +43,7 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_themes"))
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
/**/
@@ -62,7 +62,7 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_themes"))
62
* @package s2Member\CSS_JS
63
* @since 3.5
64
*
65
- * @attaches-to: ``add_action("wp_print_scripts");``
66
*
67
* @return null After enqueuing JS for theme integration.
68
*/
@@ -74,7 +74,7 @@ if (!class_exists ("c_ws_plugin__s2member_css_js_themes"))
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
{
33
* @package s2Member\CSS_JS
34
* @since 3.5
35
*
36
+ * @attaches-to ``add_action("wp_print_styles");``
37
*
38
* @return null After enqueuing CSS for theme integration.
39
*/
43
/**/
44
if (!is_admin ()) /* Not in the admin. */
45
{
46
+ $s2o = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["s2o_url"];
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
/**/
62
* @package s2Member\CSS_JS
63
* @since 3.5
64
*
65
+ * @attaches-to ``add_action("wp_print_scripts");``
66
*
67
* @return null After enqueuing JS for theme integration.
68
*/
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"];
78
/**/
79
if (is_user_logged_in ()) /* Separate version for logged-in Users/Members. */
80
{
includes/classes/css-js.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"))
21
{
@@ -33,13 +33,13 @@ if (!class_exists ("c_ws_plugin__s2member_css_js"))
33
* @package s2Member\CSS_JS
34
* @since 3.5
35
*
36
- * @attaches-to: ``add_action("init");``
37
*
38
* @return null|inner Return-value of inner routine.
39
*/
40
public static function css ()
41
{
42
- if (!empty ($_GET["ws_plugin__s2member_css"])) /* Call inner routine? */
43
{
44
return c_ws_plugin__s2member_css_js_in::css ();
45
}
@@ -50,13 +50,13 @@ if (!class_exists ("c_ws_plugin__s2member_css_js"))
50
* @package s2Member\CSS_JS
51
* @since 3.5
52
*
53
- * @attaches-to: ``add_action("init");``
54
*
55
* @return null|inner Return-value of inner routine.
56
*/
57
public static function js_w_globals ()
58
{
59
- if (!empty ($_GET["ws_plugin__s2member_js_w_globals"])) /* Call inner routine? */
60
{
61
return c_ws_plugin__s2member_css_js_in::js_w_globals ();
62
}
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"))
21
{
33
* @package s2Member\CSS_JS
34
* @since 3.5
35
*
36
+ * @attaches-to ``add_action("init");``
37
*
38
* @return null|inner Return-value of inner routine.
39
*/
40
public static function css ()
41
{
42
+ if (!empty ($_GET["ws_plugin__s2member_css"]))
43
{
44
return c_ws_plugin__s2member_css_js_in::css ();
45
}
50
* @package s2Member\CSS_JS
51
* @since 3.5
52
*
53
+ * @attaches-to ``add_action("init");``
54
*
55
* @return null|inner Return-value of inner routine.
56
*/
57
public static function js_w_globals ()
58
{
59
+ if (!empty ($_GET["ws_plugin__s2member_js_w_globals"]))
60
{
61
return c_ws_plugin__s2member_css_js_in::js_w_globals ();
62
}
includes/classes/custom-reg-fields-4bp.inc.php CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
33
* @package s2Member\Custom_Reg_Fields
34
* @since 110524RC
35
*
36
- * @attaches-to: ``add_action("bp_after_signup_profile_fields");``
37
*
38
* @return null
39
*
@@ -135,7 +135,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
135
* @package s2Member\Custom_Reg_Fields
136
* @since 110524RC
137
*
138
- * @attaches-to: ``add_action("bp_after_profile_field_content");``
139
*
140
* @return null
141
*/
@@ -212,7 +212,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields_4bp"))
212
* @package s2Member\Custom_Reg_Fields
213
* @since 110524RC
214
*
215
- * @attaches-to: ``add_action("bp_profile_field_item");``
216
*
217
* @return null
218
*/
33
* @package s2Member\Custom_Reg_Fields
34
* @since 110524RC
35
*
36
+ * @attaches-to ``add_action("bp_after_signup_profile_fields");``
37
*
38
* @return null
39
*
135
* @package s2Member\Custom_Reg_Fields
136
* @since 110524RC
137
*
138
+ * @attaches-to ``add_action("bp_after_profile_field_content");``
139
*
140
* @return null
141
*/
212
* @package s2Member\Custom_Reg_Fields
213
* @since 110524RC
214
*
215
+ * @attaches-to ``add_action("bp_profile_field_item");``
216
*
217
* @return null
218
*/
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
/**/
@@ -82,7 +82,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
82
/**/
83
else /* Else handle this Field normally. */
84
{
85
- $gen = '<input type="text" maxlength="100"';
86
$gen .= ' value="' . format_to_edit ((isset ($field["deflt"]) && strlen ($field["deflt"]) && !$_submission) ? (string)$field["deflt"] : (string)$_value) . '"';
87
$gen .= $common . ' />';
88
}
@@ -252,13 +252,13 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
252
/**/
253
else /* Else handle this Field normally. */
254
{
255
- $gen = '<input type="text" maxlength="100"';
256
$gen .= ' value="' . format_to_edit ((isset ($field["deflt"]) && strlen ($field["deflt"]) && !$_submission) ? (string)$field["deflt"] : (string)$_value) . '"';
257
$gen .= $common . ' />';
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
/**/
@@ -306,7 +306,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
306
* @package s2Member\Custom_Reg_Fields
307
* @since 3.5
308
*
309
- * @attaches-to: ``add_action("signup_extra_fields");``
310
*
311
* @return null
312
*
@@ -316,13 +316,13 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
316
{
317
do_action ("ws_plugin__s2member_before_ms_custom_registration_fields", get_defined_vars ());
318
/**/
319
- if (is_multisite () && is_main_site ()) /* Must be Multisite / Main Site. */
320
{
321
$_p = (!empty ($_POST)) ? c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_POST)) : array ();
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">' . _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,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
/**/
@@ -420,7 +420,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
420
* @package s2Member\Custom_Reg_Fields
421
* @since 3.5
422
*
423
- * @attaches-to: ``add_action("register_form");``
424
*
425
* @return null
426
*
@@ -436,13 +436,13 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
436
/**/
437
$tabindex = 20; /* Incremented tabindex starting with 20. */
438
/**/
439
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
440
do_action ("ws_plugin__s2member_during_custom_registration_fields_before", get_defined_vars ());
441
unset ($__refs, $__v); /* Unset defined __refs, __v. */
442
/**/
443
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_password"])
444
{
445
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
446
do_action ("ws_plugin__s2member_during_custom_registration_fields_before_user_pass", get_defined_vars ());
447
unset ($__refs, $__v); /* Unset defined __refs, __v. */
448
/**/
@@ -450,7 +450,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
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";
@@ -461,7 +461,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
461
/**/
462
echo '</p>' . "\n";
463
/**/
464
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
465
do_action ("ws_plugin__s2member_during_custom_registration_fields_after_user_pass", get_defined_vars ());
466
unset ($__refs, $__v); /* Unset defined __refs, __v. */
467
}
@@ -470,33 +470,33 @@ 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>' . _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
}
@@ -508,7 +508,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
508
/**/
509
foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
510
{
511
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
512
do_action ("ws_plugin__s2member_during_custom_registration_fields_before_custom_fields", get_defined_vars ());
513
unset ($__refs, $__v); /* Unset defined __refs, __v. */
514
/**/
@@ -517,7 +517,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
517
$field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
518
$field_id_class = preg_replace ("/_/", "-", $field_var);
519
/**/
520
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
521
if (apply_filters ("ws_plugin__s2member_during_custom_registration_fields_during_custom_fields_display", true, get_defined_vars ()))
522
{
523
if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
@@ -532,7 +532,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
532
unset ($__refs, $__v); /* Unset defined __refs, __v. */
533
}
534
/**/
535
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
536
do_action ("ws_plugin__s2member_during_custom_registration_fields_after_custom_fields", get_defined_vars ());
537
unset ($__refs, $__v); /* Unset defined __refs, __v. */
538
}
@@ -540,7 +540,7 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
540
/**/
541
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"] && c_ws_plugin__s2member_list_servers::list_servers_integrated ())
542
{
543
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
544
do_action ("ws_plugin__s2member_during_custom_registration_fields_before_opt_in", get_defined_vars ());
545
unset ($__refs, $__v); /* Unset defined __refs, __v. */
546
/**/
@@ -551,16 +551,16 @@ if (!class_exists ("c_ws_plugin__s2member_custom_reg_fields"))
551
echo '</label>' . "\n";
552
echo '</p>' . "\n";
553
/**/
554
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
555
do_action ("ws_plugin__s2member_during_custom_registration_fields_after_opt_in", get_defined_vars ());
556
unset ($__refs, $__v); /* Unset defined __refs, __v. */
557
}
558
/**/
559
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
560
do_action ("ws_plugin__s2member_during_custom_registration_fields_after", get_defined_vars ());
561
unset ($__refs, $__v); /* Unset defined __refs, __v. */
562
/**/
563
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
564
do_action ("ws_plugin__s2member_after_custom_registration_fields", get_defined_vars ());
565
unset ($__refs, $__v); /* Unset defined __refs, __v. */
566
/**/
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
/**/
82
/**/
83
else /* Else handle this Field normally. */
84
{
85
+ $gen = '<input type="text" maxlength="100" autocomplete="off"';
86
$gen .= ' value="' . format_to_edit ((isset ($field["deflt"]) && strlen ($field["deflt"]) && !$_submission) ? (string)$field["deflt"] : (string)$_value) . '"';
87
$gen .= $common . ' />';
88
}
252
/**/
253
else /* Else handle this Field normally. */
254
{
255
+ $gen = '<input type="text" maxlength="100" autocomplete="off"';
256
$gen .= ' value="' . format_to_edit ((isset ($field["deflt"]) && strlen ($field["deflt"]) && !$_submission) ? (string)$field["deflt"] : (string)$_value) . '"';
257
$gen .= $common . ' />';
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
/**/
306
* @package s2Member\Custom_Reg_Fields
307
* @since 3.5
308
*
309
+ * @attaches-to ``add_action("signup_extra_fields");``
310
*
311
* @return null
312
*
316
{
317
do_action ("ws_plugin__s2member_before_ms_custom_registration_fields", get_defined_vars ());
318
/**/
319
+ if (is_multisite () && is_main_site ()) /* Must be Main Site of a Network. */
320
{
321
$_p = (!empty ($_POST)) ? c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_POST)) : array ();
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 type="text" aria-required="true" maxlength="100" autocomplete="off" 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 type="text" aria-required="true" maxlength="100" autocomplete="off" 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
/**/
420
* @package s2Member\Custom_Reg_Fields
421
* @since 3.5
422
*
423
+ * @attaches-to ``add_action("register_form");``
424
*
425
* @return null
426
*
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
/**/
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 type="password" aria-required="true" 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";
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 type="text" aria-required="true" maxlength="100" autocomplete="off" 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 type="text" aria-required="true" maxlength="100" autocomplete="off" 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
}
508
/**/
509
foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
510
{
511
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
512
do_action ("ws_plugin__s2member_during_custom_registration_fields_before_custom_fields", get_defined_vars ());
513
unset ($__refs, $__v); /* Unset defined __refs, __v. */
514
/**/
517
$field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
518
$field_id_class = preg_replace ("/_/", "-", $field_var);
519
/**/
520
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
521
if (apply_filters ("ws_plugin__s2member_during_custom_registration_fields_during_custom_fields_display", true, get_defined_vars ()))
522
{
523
if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
532
unset ($__refs, $__v); /* Unset defined __refs, __v. */
533
}
534
/**/
535
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
536
do_action ("ws_plugin__s2member_during_custom_registration_fields_after_custom_fields", get_defined_vars ());
537
unset ($__refs, $__v); /* Unset defined __refs, __v. */
538
}
540
/**/
541
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"] && c_ws_plugin__s2member_list_servers::list_servers_integrated ())
542
{
543
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
544
do_action ("ws_plugin__s2member_during_custom_registration_fields_before_opt_in", get_defined_vars ());
545
unset ($__refs, $__v); /* Unset defined __refs, __v. */
546
/**/
551
echo '</label>' . "\n";
552
echo '</p>' . "\n";
553
/**/
554
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
555
do_action ("ws_plugin__s2member_during_custom_registration_fields_after_opt_in", get_defined_vars ());
556
unset ($__refs, $__v); /* Unset defined __refs, __v. */
557
}
558
/**/
559
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
560
do_action ("ws_plugin__s2member_during_custom_registration_fields_after", get_defined_vars ());
561
unset ($__refs, $__v); /* Unset defined __refs, __v. */
562
/**/
563
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
564
do_action ("ws_plugin__s2member_after_custom_registration_fields", get_defined_vars ());
565
unset ($__refs, $__v); /* Unset defined __refs, __v. */
566
/**/
includes/classes/email-configs.inc.php CHANGED
@@ -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
{
@@ -42,6 +42,7 @@ if (!class_exists ("c_ws_plugin__s2member_email_configs"))
42
do_action ("ws_plugin__s2member_before_email_config", get_defined_vars ());
43
/**/
44
c_ws_plugin__s2member_email_configs::email_config_release ();
45
add_filter ("wp_mail_from", "c_ws_plugin__s2member_email_configs::_email_config_email");
46
add_filter ("wp_mail_from_name", "c_ws_plugin__s2member_email_configs::_email_config_name");
47
/**/
@@ -121,7 +122,7 @@ if (!class_exists ("c_ws_plugin__s2member_email_configs"))
121
remove_filter ("wp_mail_from_name", "c_ws_plugin__s2member_email_configs::_email_config_name");
122
/**/
123
if ($all) /* If ``$all`` is true, remove ALL attached WordPress® Filters. */
124
- remove_all_filters("wp_mail_from") . remove_all_filters ("wp_mail_from_name");
125
/**/
126
do_action ("ws_plugin__s2member_after_email_config_release", get_defined_vars ());
127
/**/
@@ -135,14 +136,14 @@ if (!class_exists ("c_ws_plugin__s2member_email_configs"))
135
* @package s2Member\Email_Configs
136
* @since 3.5
137
*
138
- * @attaches-to: ``add_filter("wpmu_signup_user_notification_email");``
139
*
140
* @param str $message Expects the message string to be passed in by the Filter.
141
* @return str Message after having been Filtered by s2Member.
142
*/
143
public static function ms_nice_email_roles ($message = FALSE)
144
{
145
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
146
do_action ("ws_plugin__s2member_before_ms_nice_email_roles", get_defined_vars ());
147
unset ($__refs, $__v); /* Unset defined __refs, __v. */
148
/**/
@@ -186,7 +187,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
{
42
do_action ("ws_plugin__s2member_before_email_config", get_defined_vars ());
43
/**/
44
c_ws_plugin__s2member_email_configs::email_config_release ();
45
+ /**/
46
add_filter ("wp_mail_from", "c_ws_plugin__s2member_email_configs::_email_config_email");
47
add_filter ("wp_mail_from_name", "c_ws_plugin__s2member_email_configs::_email_config_name");
48
/**/
122
remove_filter ("wp_mail_from_name", "c_ws_plugin__s2member_email_configs::_email_config_name");
123
/**/
124
if ($all) /* If ``$all`` is true, remove ALL attached WordPress® Filters. */
125
+ remove_all_filters ("wp_mail_from") . remove_all_filters ("wp_mail_from_name");
126
/**/
127
do_action ("ws_plugin__s2member_after_email_config_release", get_defined_vars ());
128
/**/
136
* @package s2Member\Email_Configs
137
* @since 3.5
138
*
139
+ * @attaches-to ``add_filter("wpmu_signup_user_notification_email");``
140
*
141
* @param str $message Expects the message string to be passed in by the Filter.
142
* @return str Message after having been Filtered by s2Member.
143
*/
144
public static function ms_nice_email_roles ($message = FALSE)
145
{
146
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
147
do_action ("ws_plugin__s2member_before_ms_nice_email_roles", get_defined_vars ());
148
unset ($__refs, $__v); /* Unset defined __refs, __v. */
149
/**/
187
*/
188
public static function new_user_notification ($user_id = FALSE, $user_pass = FALSE, $notify = array ("user", "admin"))
189
{
190
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
191
do_action ("ws_plugin__s2member_before_new_user_notification", get_defined_vars ());
192
unset ($__refs, $__v); /* Unset defined __refs, __v. */
193
/**/
includes/classes/files-in.inc.php CHANGED
@@ -33,8 +33,8 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
33
* @package s2Member\Files
34
* @since 3.5
35
*
36
- * @attaches-to: ``add_action("init");``
37
- * @also-called-by: API Function {@link s2Member\API_Functions\s2member_file_download_url()}, w/ ``$create_file_download_url`` param.
38
*
39
* @param array $create_file_download_url Optional. If this function is called directly, we can pass arguments through this array.
40
* Possible array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `check_user`.
@@ -455,7 +455,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
455
* @package s2Member\Files
456
* @since 110926
457
*
458
- * @attaches-to: ``add_filter("ws_plugin__s2member_check_file_download_access_user");``
459
*
460
* @param obj $user Expects a WP_User object passed in by the Filter.
461
* @return obj A `WP_User` object, possibly obtained through Header Authorization.
33
* @package s2Member\Files
34
* @since 3.5
35
*
36
+ * @attaches-to ``add_action("init");``
37
+ * @also-called-by API Function {@link s2Member\API_Functions\s2member_file_download_url()}, w/ ``$create_file_download_url`` param.
38
*
39
* @param array $create_file_download_url Optional. If this function is called directly, we can pass arguments through this array.
40
* Possible array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `check_user`.
455
* @package s2Member\Files
456
* @since 110926
457
*
458
+ * @attaches-to ``add_filter("ws_plugin__s2member_check_file_download_access_user");``
459
*
460
* @param obj $user Expects a WP_User object passed in by the Filter.
461
* @return obj A `WP_User` object, possibly obtained through Header Authorization.
includes/classes/files.inc.php CHANGED
@@ -33,8 +33,8 @@ if (!class_exists ("c_ws_plugin__s2member_files"))
33
* @package s2Member\Files
34
* @since 110524RC
35
*
36
- * @attaches-to: ``add_action("init");``
37
- * @also-called-by: API Function {@link s2Member\API_Functions\s2member_file_download_url()}, w/ ``$create_file_download_url`` param.
38
*
39
* @param array $create_file_download_url Optional. If this function is called directly, we can pass arguments through this array.
40
* Possible array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `check_user`.
@@ -166,7 +166,7 @@ if (!class_exists ("c_ws_plugin__s2member_files"))
166
else /* Otherwise, we use the default ``$salt``, which is VERY restrictive; even to a specific browser. */
167
eval ('$allow_caching = false; $salt = date ("Y-m-d") . $_SERVER["REMOTE_ADDR"] . $_SERVER["HTTP_USER_AGENT"] . $file;');
168
/**/
169
- $key = md5 (c_ws_plugin__s2member_utils_encryption::xencrypt ($salt));
170
/**/
171
if ($allow_caching === false) /* Disallow caching? */
172
c_ws_plugin__s2member_no_cache::no_cache_constants (true);
33
* @package s2Member\Files
34
* @since 110524RC
35
*
36
+ * @attaches-to ``add_action("init");``
37
+ * @also-called-by API Function {@link s2Member\API_Functions\s2member_file_download_url()}, w/ ``$create_file_download_url`` param.
38
*
39
* @param array $create_file_download_url Optional. If this function is called directly, we can pass arguments through this array.
40
* Possible array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `check_user`.
166
else /* Otherwise, we use the default ``$salt``, which is VERY restrictive; even to a specific browser. */
167
eval ('$allow_caching = false; $salt = date ("Y-m-d") . $_SERVER["REMOTE_ADDR"] . $_SERVER["HTTP_USER_AGENT"] . $file;');
168
/**/
169
+ $key = md5 (c_ws_plugin__s2member_utils_encryption::xencrypt ($salt, false, false));
170
/**/
171
if ($allow_caching === false) /* Disallow caching? */
172
c_ws_plugin__s2member_no_cache::no_cache_constants (true);
includes/classes/ip-restrictions.inc.php CHANGED
@@ -174,7 +174,7 @@ if (!class_exists ("c_ws_plugin__s2member_ip_restrictions"))
174
* @package s2Member\IP_Restrictions
175
* @since 3.5
176
*
177
- * @attaches-to: ``add_action("wp_ajax_ws_plugin__s2member_delete_reset_specific_ip_restrictions_via_ajax");``
178
*
179
* @return null Exits script execution after returning data for AJAX caller.
180
*/
@@ -230,7 +230,7 @@ if (!class_exists ("c_ws_plugin__s2member_ip_restrictions"))
230
* @package s2Member\IP_Restrictions
231
* @since 3.5
232
*
233
- * @attaches-to: ``add_action("wp_ajax_ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax");``
234
*
235
* @return null Exits script execution after returning data for AJAX caller.
236
*/
174
* @package s2Member\IP_Restrictions
175
* @since 3.5
176
*
177
+ * @attaches-to ``add_action("wp_ajax_ws_plugin__s2member_delete_reset_specific_ip_restrictions_via_ajax");``
178
*
179
* @return null Exits script execution after returning data for AJAX caller.
180
*/
230
* @package s2Member\IP_Restrictions
231
* @since 3.5
232
*
233
+ * @attaches-to ``add_action("wp_ajax_ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax");``
234
*
235
* @return null Exits script execution after returning data for AJAX caller.
236
*/
includes/classes/labels.inc.php CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_labels"))
33
* @package s2Member\Roles_Caps
34
* @since 3.5
35
*
36
- * @attaches-to: ``add_action("init");``
37
*
38
* @return null
39
*/
@@ -54,7 +54,7 @@ if (!class_exists ("c_ws_plugin__s2member_labels"))
54
* @package s2Member\Roles_Caps
55
* @since 3.5
56
*
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.
33
* @package s2Member\Roles_Caps
34
* @since 3.5
35
*
36
+ * @attaches-to ``add_action("init");``
37
*
38
* @return null
39
*/
54
* @package s2Member\Roles_Caps
55
* @since 3.5
56
*
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.
includes/classes/list-servers.inc.php CHANGED
@@ -312,8 +312,8 @@ if (!class_exists ("c_ws_plugin__s2member_list_servers"))
312
* @package s2Member\List_Servers
313
* @since 3.5
314
*
315
- * @attaches-to: ``add_action("ws_plugin__s2member_during_collective_mods");``
316
- * @attaches-to: ``add_action("ws_plugin__s2member_during_collective_eots");``
317
*
318
* @param int|str $user_id Required. A WordPress® User ID, numeric string or integer.
319
* @param array $vars Required. An array of defined variables passed by the calling Hook.
312
* @package s2Member\List_Servers
313
* @since 3.5
314
*
315
+ * @attaches-to ``add_action("ws_plugin__s2member_during_collective_mods");``
316
+ * @attaches-to ``add_action("ws_plugin__s2member_during_collective_eots");``
317
*
318
* @param int|str $user_id Required. A WordPress® User ID, numeric string or integer.
319
* @param array $vars Required. An array of defined variables passed by the calling Hook.
includes/classes/login-customizations.inc.php CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_login_customizations"))
33
* @package s2Member\Login_Customizations
34
* @since 3.5
35
*
36
- * @attaches-to: ``add_filter("login_headerurl");``
37
*
38
* @param str $url Expects a login header URL passed in by the Filter.
39
* @return str A URL based on s2Member's UI configuration.
@@ -52,7 +52,7 @@ if (!class_exists ("c_ws_plugin__s2member_login_customizations"))
52
* @package s2Member\Login_Customizations
53
* @since 3.5
54
*
55
- * @attaches-to: ``add_filter("login_headertitle");``
56
*
57
* @param str $title Expects a title passed in by the Filter.
58
* @return str A title based on s2Member's UI configuration.
@@ -71,7 +71,7 @@ if (!class_exists ("c_ws_plugin__s2member_login_customizations"))
71
* @package s2Member\Login_Customizations
72
* @since 3.5
73
*
74
- * @attaches-to: ``add_action("login_head");``
75
*
76
* @return void
77
*/
@@ -150,7 +150,7 @@ if (!class_exists ("c_ws_plugin__s2member_login_customizations"))
150
* @package s2Member\Login_Customizations
151
* @since 3.5
152
*
153
- * @attaches-to: ``add_action("login_footer");``
154
*
155
* @return void
156
*/
33
* @package s2Member\Login_Customizations
34
* @since 3.5
35
*
36
+ * @attaches-to ``add_filter("login_headerurl");``
37
*
38
* @param str $url Expects a login header URL passed in by the Filter.
39
* @return str A URL based on s2Member's UI configuration.
52
* @package s2Member\Login_Customizations
53
* @since 3.5
54
*
55
+ * @attaches-to ``add_filter("login_headertitle");``
56
*
57
* @param str $title Expects a title passed in by the Filter.
58
* @return str A title based on s2Member's UI configuration.
71
* @package s2Member\Login_Customizations
72
* @since 3.5
73
*
74
+ * @attaches-to ``add_action("login_head");``
75
*
76
* @return void
77
*/
150
* @package s2Member\Login_Customizations
151
* @since 3.5
152
*
153
+ * @attaches-to ``add_action("login_footer");``
154
*
155
* @return void
156
*/
includes/classes/login-redirects-r.inc.php CHANGED
@@ -34,7 +34,7 @@ if (!class_exists ("c_ws_plugin__s2member_login_redirects_r"))
34
* In the case of BuddyPress, it's own Filter against `login_redirect` will deal with empty values. However, since s2Member removes all Filters
35
* against `login_redirect` ( for compatibility ), we NEED this simple routine to check empty values, and default them to ``admin_url()``.
36
*
37
- * @attaches-to: ``add_filter("login_redirect");``
38
*
39
* @package s2Member\Login_Redirects
40
* @since 110926
@@ -49,7 +49,7 @@ if (!class_exists ("c_ws_plugin__s2member_login_redirects_r"))
49
/**
50
* Removes all other ``login_redirect`` Filters to prevent conflicts with s2Member.
51
*
52
- * @attaches-to: ``add_action("init");``
53
*
54
* @package s2Member\Login_Redirects
55
* @since 3.5
34
* In the case of BuddyPress, it's own Filter against `login_redirect` will deal with empty values. However, since s2Member removes all Filters
35
* against `login_redirect` ( for compatibility ), we NEED this simple routine to check empty values, and default them to ``admin_url()``.
36
*
37
+ * @attaches-to ``add_filter("login_redirect");``
38
*
39
* @package s2Member\Login_Redirects
40
* @since 110926
49
/**
50
* Removes all other ``login_redirect`` Filters to prevent conflicts with s2Member.
51
*
52
+ * @attaches-to ``add_action("init");``
53
*
54
* @package s2Member\Login_Redirects
55
* @since 3.5
includes/classes/login-redirects.inc.php CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_login_redirects"))
33
* @package s2Member\Login_Redirects
34
* @since 3.5
35
*
36
- * @attaches-to: ``add_action("wp_login");``
37
*
38
* @param str $username Expects Username to be passed in by the Action Hook.
39
* @return null Or exits script execution after a redirection takes place.
33
* @package s2Member\Login_Redirects
34
* @since 3.5
35
*
36
+ * @attaches-to ``add_action("wp_login");``
37
*
38
* @param str $username Expects Username to be passed in by the Action Hook.
39
* @return null Or exits script execution after a redirection takes place.
includes/classes/menu-pages-rs.inc.php CHANGED
@@ -44,13 +44,13 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages_rs"))
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";
53
- include_once dirname (dirname (__FILE__)) . "/menu-pages/ws-mlist.inc.php";
54
echo '</div>' . "\n";
55
}
56
/**/
44
echo '</div>' . "\n";
45
/**/
46
echo '<script type="text/javascript">' . "\n";
47
+ echo "jQuery('div#ws-menu-page-js-c-w').hide();" . "\n";
48
echo '</script>' . "\n";
49
/**/
50
+ if ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["menu_pages"]["updates"])
51
{
52
+ echo '<div class="ws-menu-page-updates">' . "\n";
53
+ include_once dirname (dirname (__FILE__)) . "/menu-pages/updates.inc.php";
54
echo '</div>' . "\n";
55
}
56
/**/
includes/classes/menu-pages.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_menu_pages"))
21
{
@@ -48,7 +48,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
48
{
49
$updated_all_options = false; /* Initialize this to a value of false. Initializing this variable here makes it an available reference-variable to Hooks/Filters. */
50
/**/
51
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
52
do_action ("ws_plugin__s2member_before_update_all_options", get_defined_vars ()); /* If you use this Hook, be sure to use ``wp_verify_nonce()``. */
53
unset ($__refs, $__v); /* Unset defined __refs, __v. */
54
/**/
@@ -70,7 +70,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
70
/**/
71
unset ($key, $value); /* Unset these utility variables now. This prevents bleeding vars into Hooks/Filters that are of no use. */
72
/**/
73
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
74
do_action ("ws_plugin__s2member_during_update_all_options", get_defined_vars ()); /* If you use this Hook, be sure to use ``wp_verify_nonce()``. */
75
unset ($__refs, $__v); /* Unset defined __refs, __v. */
76
/**/
@@ -110,7 +110,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
110
$updated_all_options = true; /* Flag indicating this routine was processed successfully; and that all s2Member options have been updated successfully.*/
111
}
112
/**/
113
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
114
do_action ("ws_plugin__s2member_after_update_all_options", get_defined_vars ()); /* If you use this Hook, be sure to use ``wp_verify_nonce()``. */
115
unset ($__refs, $__v); /* Unset defined __refs, __v. */
116
/**/
@@ -122,7 +122,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
122
* @package s2Member\Menu_Pages
123
* @since 3.5
124
*
125
- * @attaches-to: ``add_action("admin_menu");``
126
*
127
* @return null
128
*/
@@ -146,7 +146,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
146
add_submenu_page ($menu, "s2Member Quick-Start Guide", "Quick-Start Guide", "create_users", "ws-plugin--s2member-start", "c_ws_plugin__s2member_menu_pages::start_page");
147
/**/
148
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_divider_1", true, get_defined_vars ())) /* Divider. */
149
- add_submenu_page ($menu, "-", '<div style="margin:1px 0 1px -5px; height:1px; line-height:1px; background:#CCCCCC;"></div>', "create_users", "#");
150
/**/
151
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_mms_ops_page", (!is_multisite () || is_main_site ()), get_defined_vars ()))
152
add_submenu_page ($menu, "s2Member Multisite Configuration", "Multisite (Config)", "create_users", "ws-plugin--s2member-mms-ops", "c_ws_plugin__s2member_menu_pages::mms_ops_page");
@@ -161,7 +161,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
161
add_submenu_page ($menu, "s2Member Download Options", "Download Options", "create_users", "ws-plugin--s2member-down-ops", "c_ws_plugin__s2member_menu_pages::down_ops_page");
162
/**/
163
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_divider_2", true, get_defined_vars ())) /* Divider. */
164
- add_submenu_page ($menu, "-", '<div style="margin:1px 0 1px -5px; height:1px; line-height:1px; background:#CCCCCC;"></div>', "create_users", "#");
165
/**/
166
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_new_user_page", true, get_defined_vars ())) /* Shortcut. */
167
add_submenu_page ($menu, "s2Member / Add A Member", "Add A Member", "create_users", "user-new.php");
@@ -170,7 +170,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
170
add_submenu_page ($menu, "s2Member / Browse Members", "Browse Members", "create_users", "users.php");
171
/**/
172
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_divider_3", true, get_defined_vars ())) /* Divider. */
173
- add_submenu_page ($menu, "-", '<div style="margin:1px 0 1px -5px; height:1px; line-height:1px; background:#CCCCCC;"></div>', "create_users", "#");
174
/**/
175
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_paypal_ops_page", true, get_defined_vars ()))
176
add_submenu_page ($menu, "s2Member PayPal Options", "PayPal® Options", "create_users", "ws-plugin--s2member-paypal-ops", "c_ws_plugin__s2member_menu_pages::paypal_ops_page");
@@ -179,7 +179,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
179
add_submenu_page ($menu, "s2Member PayPal® Buttons", "PayPal® Buttons", "create_users", "ws-plugin--s2member-paypal-buttons", "c_ws_plugin__s2member_menu_pages::paypal_buttons_page");
180
/**/
181
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_divider_4", true, get_defined_vars ())) /* Divider. */
182
- add_submenu_page ($menu, "-", '<div style="margin:1px 0 1px -5px; height:1px; line-height:1px; background:#CCCCCC;"></div>', "create_users", "#");
183
/**/
184
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_trk_ops_page", true, get_defined_vars ()))
185
add_submenu_page ($menu, "s2Member API / Tracking", "API / Tracking", "create_users", "ws-plugin--s2member-trk-ops", "c_ws_plugin__s2member_menu_pages::trk_ops_page");
@@ -194,13 +194,13 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
194
add_submenu_page ($menu, "s2Member API / Scripting", "API / Scripting", "create_users", "ws-plugin--s2member-scripting", "c_ws_plugin__s2member_menu_pages::scripting_page");
195
/**/
196
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_divider_5", true, get_defined_vars ())) /* Divider. */
197
- add_submenu_page ($menu, "-", '<div style="margin:1px 0 1px -5px; height:1px; line-height:1px; background:#CCCCCC;"></div>', "create_users", "#");
198
/**/
199
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_integrations_page", (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()), get_defined_vars ()))
200
add_submenu_page ($menu, "s2Member / Other Integrations", "Other Integrations", "create_users", "ws-plugin--s2member-integrations", "c_ws_plugin__s2member_menu_pages::integrations_page");
201
/**/
202
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_divider_6", true, get_defined_vars ())) /* Divider. */
203
- add_submenu_page ($menu, "-", '<div style="margin:1px 0 1px -5px; height:1px; line-height:1px; background:#CCCCCC;"></div>', "create_users", "#");
204
/**/
205
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_info_page", (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()), get_defined_vars ()))
206
add_submenu_page ($menu, "s2Member Information", "s2Member Info", "create_users", "ws-plugin--s2member-info", "c_ws_plugin__s2member_menu_pages::info_page");
@@ -218,7 +218,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
218
* @package s2Member\Menu_Pages
219
* @since 3.5
220
*
221
- * @attaches-to: ``add_action("network_admin_menu");``
222
*
223
* @return null
224
*/
@@ -253,7 +253,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
253
* @package s2Member\Menu_Pages
254
* @since 3.5
255
*
256
- * @attaches-to: ``add_filter("plugin_action_links");``
257
*
258
* @param array $actions Expects an existing array of actions links, passed in by the Filter.
259
* @param str $plugin_file Expects path to a plugin file. We need to test against this for s2Member.
@@ -261,7 +261,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
261
*/
262
public static function _add_settings_link ($actions = FALSE, $plugin_file = FALSE)
263
{
264
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
265
do_action ("_ws_plugin__s2member_before_add_settings_link", get_defined_vars ());
266
unset ($__refs, $__v); /* Unset defined __refs, __v. */
267
/**/
@@ -270,7 +270,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
270
$settings = '<a href="' . esc_attr (admin_url ("/admin.php?page=ws-plugin--s2member-gen-ops")) . '">Settings</a>';
271
array_unshift ($actions, apply_filters ("ws_plugin__s2member_add_settings_link", $settings, get_defined_vars ()));
272
/**/
273
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
274
do_action ("_ws_plugin__s2member_during_add_settings_link", get_defined_vars ());
275
unset ($__refs, $__v); /* Unset defined __refs, __v. */
276
}
@@ -283,7 +283,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
283
* @package s2Member\Menu_Pages
284
* @since 3.5
285
*
286
- * @attaches-to: ``add_action("admin_print_scripts");``
287
*
288
* @return null
289
*/
@@ -293,10 +293,10 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
293
/**/
294
if (!empty ($_GET["page"]) && preg_match ("/ws-plugin--s2member-/", $_GET["page"]))
295
{
296
- wp_enqueue_script("jquery");
297
- wp_enqueue_script("thickbox");
298
- wp_enqueue_script("media-upload");
299
- wp_enqueue_script("jquery-ui-core");
300
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 ());
301
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 ());
302
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 ());
@@ -315,7 +315,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
315
* @package s2Member\Menu_Pages
316
* @since 3.5
317
*
318
- * @attaches-to: ``add_action("admin_print_styles");``
319
*
320
* @return null
321
*/
@@ -325,7 +325,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
325
/**/
326
if (!empty ($_GET["page"]) && preg_match ("/ws-plugin--s2member-/", $_GET["page"]))
327
{
328
- wp_enqueue_style("thickbox");
329
wp_enqueue_style ("ws-plugin--s2member-menu-pages", site_url ("/?ws_plugin__s2member_menu_pages_css=" . urlencode (mt_rand ())), array ("thickbox"), c_ws_plugin__s2member_utilities::ver_checksum (), "all");
330
/**/
331
do_action ("ws_plugin__s2member_during_add_admin_styles", 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_menu_pages"))
21
{
48
{
49
$updated_all_options = false; /* Initialize this to a value of false. Initializing this variable here makes it an available reference-variable to Hooks/Filters. */
50
/**/
51
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
52
do_action ("ws_plugin__s2member_before_update_all_options", get_defined_vars ()); /* If you use this Hook, be sure to use ``wp_verify_nonce()``. */
53
unset ($__refs, $__v); /* Unset defined __refs, __v. */
54
/**/
70
/**/
71
unset ($key, $value); /* Unset these utility variables now. This prevents bleeding vars into Hooks/Filters that are of no use. */
72
/**/
73
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
74
do_action ("ws_plugin__s2member_during_update_all_options", get_defined_vars ()); /* If you use this Hook, be sure to use ``wp_verify_nonce()``. */
75
unset ($__refs, $__v); /* Unset defined __refs, __v. */
76
/**/
110
$updated_all_options = true; /* Flag indicating this routine was processed successfully; and that all s2Member options have been updated successfully.*/
111
}
112
/**/
113
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
114
do_action ("ws_plugin__s2member_after_update_all_options", get_defined_vars ()); /* If you use this Hook, be sure to use ``wp_verify_nonce()``. */
115
unset ($__refs, $__v); /* Unset defined __refs, __v. */
116
/**/
122
* @package s2Member\Menu_Pages
123
* @since 3.5
124
*
125
+ * @attaches-to ``add_action("admin_menu");``
126
*
127
* @return null
128
*/
146
add_submenu_page ($menu, "s2Member Quick-Start Guide", "Quick-Start Guide", "create_users", "ws-plugin--s2member-start", "c_ws_plugin__s2member_menu_pages::start_page");
147
/**/
148
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_divider_1", true, get_defined_vars ())) /* Divider. */
149
+ add_submenu_page ($menu, "", '<span style="display:block; margin:1px 0 1px -5px; padding:0; height:1px; line-height:1px; background:#CCCCCC;"></span>', "create_users", "#");
150
/**/
151
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_mms_ops_page", (!is_multisite () || is_main_site ()), get_defined_vars ()))
152
add_submenu_page ($menu, "s2Member Multisite Configuration", "Multisite (Config)", "create_users", "ws-plugin--s2member-mms-ops", "c_ws_plugin__s2member_menu_pages::mms_ops_page");
161
add_submenu_page ($menu, "s2Member Download Options", "Download Options", "create_users", "ws-plugin--s2member-down-ops", "c_ws_plugin__s2member_menu_pages::down_ops_page");
162
/**/
163
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_divider_2", true, get_defined_vars ())) /* Divider. */
164
+ add_submenu_page ($menu, "", '<span style="display:block; margin:1px 0 1px -5px; padding:0; height:1px; line-height:1px; background:#CCCCCC;"></span>', "create_users", "#");
165
/**/
166
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_new_user_page", true, get_defined_vars ())) /* Shortcut. */
167
add_submenu_page ($menu, "s2Member / Add A Member", "Add A Member", "create_users", "user-new.php");
170
add_submenu_page ($menu, "s2Member / Browse Members", "Browse Members", "create_users", "users.php");
171
/**/
172
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_divider_3", true, get_defined_vars ())) /* Divider. */
173
+ add_submenu_page ($menu, "", '<span style="display:block; margin:1px 0 1px -5px; padding:0; height:1px; line-height:1px; background:#CCCCCC;"></span>', "create_users", "#");
174
/**/
175
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_paypal_ops_page", true, get_defined_vars ()))
176
add_submenu_page ($menu, "s2Member PayPal Options", "PayPal® Options", "create_users", "ws-plugin--s2member-paypal-ops", "c_ws_plugin__s2member_menu_pages::paypal_ops_page");
179
add_submenu_page ($menu, "s2Member PayPal® Buttons", "PayPal® Buttons", "create_users", "ws-plugin--s2member-paypal-buttons", "c_ws_plugin__s2member_menu_pages::paypal_buttons_page");
180
/**/
181
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_divider_4", true, get_defined_vars ())) /* Divider. */
182
+ add_submenu_page ($menu, "", '<span style="display:block; margin:1px 0 1px -5px; padding:0; height:1px; line-height:1px; background:#CCCCCC;"></span>', "create_users", "#");
183
/**/
184
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_trk_ops_page", true, get_defined_vars ()))
185
add_submenu_page ($menu, "s2Member API / Tracking", "API / Tracking", "create_users", "ws-plugin--s2member-trk-ops", "c_ws_plugin__s2member_menu_pages::trk_ops_page");
194
add_submenu_page ($menu, "s2Member API / Scripting", "API / Scripting", "create_users", "ws-plugin--s2member-scripting", "c_ws_plugin__s2member_menu_pages::scripting_page");
195
/**/
196
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_divider_5", true, get_defined_vars ())) /* Divider. */
197
+ add_submenu_page ($menu, "", '<span style="display:block; margin:1px 0 1px -5px; padding:0; height:1px; line-height:1px; background:#CCCCCC;"></span>', "create_users", "#");
198
/**/
199
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_integrations_page", (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()), get_defined_vars ()))
200
add_submenu_page ($menu, "s2Member / Other Integrations", "Other Integrations", "create_users", "ws-plugin--s2member-integrations", "c_ws_plugin__s2member_menu_pages::integrations_page");
201
/**/
202
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_divider_6", true, get_defined_vars ())) /* Divider. */
203
+ add_submenu_page ($menu, "", '<span style="display:block; margin:1px 0 1px -5px; padding:0; height:1px; line-height:1px; background:#CCCCCC;"></span>', "create_users", "#");
204
/**/
205
if (apply_filters ("ws_plugin__s2member_during_add_admin_options_add_info_page", (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()), get_defined_vars ()))
206
add_submenu_page ($menu, "s2Member Information", "s2Member Info", "create_users", "ws-plugin--s2member-info", "c_ws_plugin__s2member_menu_pages::info_page");
218
* @package s2Member\Menu_Pages
219
* @since 3.5
220
*
221
+ * @attaches-to ``add_action("network_admin_menu");``
222
*
223
* @return null
224
*/
253
* @package s2Member\Menu_Pages
254
* @since 3.5
255
*
256
+ * @attaches-to ``add_filter("plugin_action_links");``
257
*
258
* @param array $actions Expects an existing array of actions links, passed in by the Filter.
259
* @param str $plugin_file Expects path to a plugin file. We need to test against this for s2Member.
261
*/
262
public static function _add_settings_link ($actions = FALSE, $plugin_file = FALSE)
263
{
264
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
265
do_action ("_ws_plugin__s2member_before_add_settings_link", get_defined_vars ());
266
unset ($__refs, $__v); /* Unset defined __refs, __v. */
267
/**/
270
$settings = '<a href="' . esc_attr (admin_url ("/admin.php?page=ws-plugin--s2member-gen-ops")) . '">Settings</a>';
271
array_unshift ($actions, apply_filters ("ws_plugin__s2member_add_settings_link", $settings, get_defined_vars ()));
272
/**/
273
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
274
do_action ("_ws_plugin__s2member_during_add_settings_link", get_defined_vars ());
275
unset ($__refs, $__v); /* Unset defined __refs, __v. */
276
}
283
* @package s2Member\Menu_Pages
284
* @since 3.5
285
*
286
+ * @attaches-to ``add_action("admin_print_scripts");``
287
*
288
* @return null
289
*/
293
/**/
294
if (!empty ($_GET["page"]) && preg_match ("/ws-plugin--s2member-/", $_GET["page"]))
295
{
296
+ wp_enqueue_script ("jquery");
297
+ wp_enqueue_script ("thickbox");
298
+ wp_enqueue_script ("media-upload");
299
+ wp_enqueue_script ("jquery-ui-core");
300
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 ());
301
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 ());
302
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 ());
315
* @package s2Member\Menu_Pages
316
* @since 3.5
317
*
318
+ * @attaches-to ``add_action("admin_print_styles");``
319
*
320
* @return null
321
*/
325
/**/
326
if (!empty ($_GET["page"]) && preg_match ("/ws-plugin--s2member-/", $_GET["page"]))
327
{
328
+ wp_enqueue_style ("thickbox");
329
wp_enqueue_style ("ws-plugin--s2member-menu-pages", site_url ("/?ws_plugin__s2member_menu_pages_css=" . urlencode (mt_rand ())), array ("thickbox"), c_ws_plugin__s2member_utilities::ver_checksum (), "all");
330
/**/
331
do_action ("ws_plugin__s2member_during_add_admin_styles", get_defined_vars ());
includes/classes/meta-box-saves.inc.php CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_meta_box_saves"))
33
* @package s2Member\Meta_Boxes
34
* @since 3.5
35
*
36
- * @attaches-to: ``add_action("save_post");``
37
*
38
* @param int|str $post_id Numeric Post/Page ID.
39
* @return null
33
* @package s2Member\Meta_Boxes
34
* @since 3.5
35
*
36
+ * @attaches-to ``add_action("save_post");``
37
*
38
* @param int|str $post_id Numeric Post/Page ID.
39
* @return null
includes/classes/meta-box-security.inc.php CHANGED
@@ -76,7 +76,7 @@ if (!class_exists ("c_ws_plugin__s2member_meta_box_security"))
76
{
77
echo '<p style="margin-top:15px; margin-left:2px;"><strong>Require Custom Capabilities?</strong></p>' . "\n";
78
echo '<label class="screen-reader-text" for="ws-plugin--s2member-security-meta-box-ccaps">Custom Capabilities?</label>' . "\n";
79
- echo '<input type="text" name="ws_plugin__s2member_security_meta_box_ccaps" id="ws-plugin--s2member-security-meta-box-ccaps" value="' . format_to_edit (trim (implode (",", (array)get_post_meta ($page_id, "s2member_ccaps_req", true)))) . '" 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 ());" style="width:99%;" />' . "\n";
80
echo '<br /><small>* see: <code>API Scripting -> Custom Capabilities</code></small>' . "\n";
81
}
82
}
@@ -122,7 +122,7 @@ if (!class_exists ("c_ws_plugin__s2member_meta_box_security"))
122
{
123
echo '<p style="margin-top:15px; margin-left:2px;"><strong>Require Custom Capabilities?</strong></p>' . "\n";
124
echo '<label class="screen-reader-text" for="ws-plugin--s2member-security-meta-box-ccaps">Custom Capabilities?</label>' . "\n";
125
- echo '<input type="text" name="ws_plugin__s2member_security_meta_box_ccaps" id="ws-plugin--s2member-security-meta-box-ccaps" value="' . format_to_edit (trim (implode (",", (array)get_post_meta ($post_id, "s2member_ccaps_req", true)))) . '" 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 ());" style="width:99%;" />' . "\n";
126
echo '<br /><small>* see: <code>API Scripting -> Custom Capabilities</code></small>' . "\n";
127
}
128
}
76
{
77
echo '<p style="margin-top:15px; margin-left:2px;"><strong>Require Custom Capabilities?</strong></p>' . "\n";
78
echo '<label class="screen-reader-text" for="ws-plugin--s2member-security-meta-box-ccaps">Custom Capabilities?</label>' . "\n";
79
+ echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_security_meta_box_ccaps" id="ws-plugin--s2member-security-meta-box-ccaps" value="' . format_to_edit (trim (implode (",", (array)get_post_meta ($page_id, "s2member_ccaps_req", true)))) . '" 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 ());" style="width:99%;" />' . "\n";
80
echo '<br /><small>* see: <code>API Scripting -> Custom Capabilities</code></small>' . "\n";
81
}
82
}
122
{
123
echo '<p style="margin-top:15px; margin-left:2px;"><strong>Require Custom Capabilities?</strong></p>' . "\n";
124
echo '<label class="screen-reader-text" for="ws-plugin--s2member-security-meta-box-ccaps">Custom Capabilities?</label>' . "\n";
125
+ echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_security_meta_box_ccaps" id="ws-plugin--s2member-security-meta-box-ccaps" value="' . format_to_edit (trim (implode (",", (array)get_post_meta ($post_id, "s2member_ccaps_req", true)))) . '" 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 ());" style="width:99%;" />' . "\n";
126
echo '<br /><small>* see: <code>API Scripting -> Custom Capabilities</code></small>' . "\n";
127
}
128
}
includes/classes/meta-boxes.inc.php CHANGED
@@ -36,7 +36,7 @@ if (!class_exists ("c_ws_plugin__s2member_meta_boxes"))
36
* @package s2Member\Meta_Boxes
37
* @since 3.5
38
*
39
- * @attaches-to: ``add_action("add_meta_boxes");``
40
*
41
* @param str $type String indicating type of Post, or another classification *( i.e. `nav_menu_item` )*.
42
* @return null
36
* @package s2Member\Meta_Boxes
37
* @since 3.5
38
*
39
+ * @attaches-to ``add_action("add_meta_boxes");``
40
*
41
* @param str $type String indicating type of Post, or another classification *( i.e. `nav_menu_item` )*.
42
* @return null
includes/classes/mms-patches.inc.php CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_mms_patches"))
33
* @package s2Member\Main_Multisite_Patches
34
* @since 3.5
35
*
36
- * @attaches-to: ``add_filter("update_feedback");``
37
*
38
* @param str $message Expects message string passed through by the Filter.
39
* @return str Message after having been Filtered by this routine.
33
* @package s2Member\Main_Multisite_Patches
34
* @since 3.5
35
*
36
+ * @attaches-to ``add_filter("update_feedback");``
37
*
38
* @param str $message Expects message string passed through by the Filter.
39
* @return str Message after having been Filtered by this routine.
includes/classes/mo-page-in.inc.php CHANGED
@@ -40,7 +40,7 @@ if (!class_exists ("c_ws_plugin__s2member_mo_page_in"))
40
* @package s2Member\Membership_Options_Page
41
* @since 3.5
42
*
43
- * @attaches-to: ``add_action("init");``
44
*
45
* @return null Or exits script execution after redirection w/ `301` status.
46
*/
40
* @package s2Member\Membership_Options_Page
41
* @since 3.5
42
*
43
+ * @attaches-to ``add_action("init");``
44
*
45
* @return null Or exits script execution after redirection w/ `301` status.
46
*/
includes/classes/mo-page.inc.php CHANGED
@@ -36,7 +36,7 @@ if (!class_exists ("c_ws_plugin__s2member_mo_page"))
36
* @package s2Member\Membership_Options_Page
37
* @since 3.5
38
*
39
- * @attaches-to: ``add_action("init");``
40
*
41
* @return null|inner Return-value of inner routine.
42
*/
36
* @package s2Member\Membership_Options_Page
37
* @since 3.5
38
*
39
+ * @attaches-to ``add_action("init");``
40
*
41
* @return null|inner Return-value of inner routine.
42
*/
includes/classes/no-cache.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_no_cache"))
21
{
@@ -28,82 +28,80 @@ if (!class_exists ("c_ws_plugin__s2member_no_cache"))
28
class c_ws_plugin__s2member_no_cache
29
{
30
/**
31
- * Handles no-cache headers and compatible constants for s2Member.
32
*
33
- * This is compatible with Quick Cache and also with WP Super Cache.
34
*
35
* @package s2Member\No_Cache
36
* @since 3.5
37
*
38
- * @attaches-to: ``add_action("init");``
39
*
40
- * @return null
41
*/
42
- public static function no_cache ()
43
{
44
do_action ("ws_plugin__s2member_before_no_cache", get_defined_vars ());
45
/**/
46
- c_ws_plugin__s2member_no_cache::no_cache_constants (); /* This first. */
47
- c_ws_plugin__s2member_no_cache::no_cache_headers (); /* Now run headers. */
48
/**/
49
do_action ("ws_plugin__s2member_after_no_cache", get_defined_vars ());
50
/**/
51
- return; /* Return for uniformity. */
52
}
53
/**
54
- * Defines compatible cache constants for s2Member.
55
*
56
- * This is compatible with Quick Cache and also with WP Super Cache.
57
- * Quick Cache uses: ``QUICK_CACHE_ALLOWED``, and Super Cache uses: ``DONOTCACHEPAGE``.
58
- * Actually, Quick Cache is compatible with either of these defined constants.
59
*
60
- * Always disallow caching for logged in users and GET requests with `/?s2member` systematic use.
61
- * For clarity on the systematic use with s2member in the request, see: `/classes/systematics.inc.php`.
62
- * Also disallow caching if the ``$no_cache`` param is passed in as true by other routines.
63
- * BUT, always obey the `qcAC` param that specifically allows caching.
64
*
65
- * This function is also called upon by other routines that protect members-only content areas.
66
- * Members-only content areas should never be cached. In other words, there are some important supplemental
67
- * routines that occur outside the scope of this single function. This function is called upon by those other
68
- * targeted routines, to handle the cache constants when they are required.
69
*
70
* @package s2Member\No_Cache
71
* @since 3.5
72
*
73
- * @param bool $no_cache Optional. Defaults to false. If true, force no-cache headers if at all possible.
74
- * @return bool This function will always return `true`.
75
*
76
- * @see s2Member\URIs\c_ws_plugin__s2member_ruris::check_ruri_level_access()
77
- * @see s2Member\Categories\c_ws_plugin__s2member_catgs::check_catg_level_access()
78
- * @see s2Member\Tags\c_ws_plugin__s2member_ptags::check_ptag_level_access()
79
- * @see s2Member\Posts\c_ws_plugin__s2member_posts::check_post_level_access()
80
- * @see s2Member\Pages\c_ws_plugin__s2member_pages::check_page_level_access()
81
- * @see s2Member\IP_Restrictions\c_ws_plugin__s2member_ip_restrictions::ip_restrictions_ok()
82
- * @see s2Member\Files\c_ws_plugin__s2member_files::file_download_key()
83
- * @see Button/Form/Shortcode Generators.
84
*/
85
public static function no_cache_constants ($no_cache = FALSE)
86
{
87
- static $once; /* We only need to set these Constants once. */
88
/**/
89
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
90
do_action ("ws_plugin__s2member_before_no_cache_constants", get_defined_vars ());
91
unset ($__refs, $__v); /* Unset defined __refs, __v. */
92
/**/
93
- if (!$once && empty ($_GET["qcAC"]) && ($no_cache || is_user_logged_in () || (!empty ($_SERVER["QUERY_STRING"]) && strpos ($_SERVER["QUERY_STRING"], "s2member") === 0 && c_ws_plugin__s2member_utils_conds::is_site_root ($_SERVER["REQUEST_URI"]))))
94
{
95
/**
96
- * No-cache Constant for Quick Cache.
97
*
98
* @package s2Member\No_Cache
99
- * @since 3.5
100
*
101
* @var bool
102
*/
103
- if (!defined ("QUICK_CACHE_ALLOWED"))
104
- define ("QUICK_CACHE_ALLOWED", false);
105
/**
106
- * No-cache for other cache plugins.
107
*
108
* @package s2Member\No_Cache
109
* @since 3.5
@@ -112,10 +110,30 @@ if (!class_exists ("c_ws_plugin__s2member_no_cache"))
112
*/
113
if (!defined ("DONOTCACHEPAGE"))
114
define ("DONOTCACHEPAGE", true);
115
/**/
116
- $GLOBALS["ws_plugin__s2member_no_cache_headers_selective"] = true;
117
/**/
118
- $once = true; /* Only need to set these Constants one time. */
119
/**/
120
do_action ("ws_plugin__s2member_during_no_cache_constants", get_defined_vars ());
121
}
@@ -127,43 +145,47 @@ if (!class_exists ("c_ws_plugin__s2member_no_cache"))
127
/**
128
* Sends Cache-Control ( no-cache ) headers.
129
*
130
- * This uses the ``nocache_headers()`` function provided by WordPress®.
131
- * This is compatible with the Quick Cache parameter `?qcABC=1` as well.
132
- * Always obey the `qcABC` param that specifically allows browser caching.
133
*
134
* @package s2Member\No_Cache
135
* @since 3.5
136
*
137
* @return bool This function will always return `true`.
138
*/
139
- public static function no_cache_headers ()
140
{
141
static $once; /* We only need to set these headers one time. */
142
/**/
143
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
144
do_action ("ws_plugin__s2member_before_no_cache_headers", get_defined_vars ());
145
unset ($__refs, $__v); /* Unset defined __refs, __v. */
146
/**/
147
- $using_selective_behavior = apply_filters ("ws_plugin__s2member_no_cache_headers_selective", false, get_defined_vars ());
148
- $selective = @$GLOBALS["ws_plugin__s2member_no_cache_headers_selective"]; /* Selective ( i.e. required )? */
149
/**/
150
- if (!$once && empty ($_GET["qcABC"]) && (!$using_selective_behavior || $selective) && !apply_filters ("ws_plugin__s2member_disable_no_cache_headers", false, get_defined_vars ()))
151
- {
152
- $no_cache_headers_already_sent = false; /* Only if NOT already sent. Initialize this to a false value. */
153
- /**/
154
- foreach (headers_list () as $header) /* No-cache headers already sent? We need to check here. */
155
- if (stripos ($header, "no-cache") !== false) /* No-cache headers already sent? */
156
- {
157
- $no_cache_headers_already_sent = true; /* Yep, sent. */
158
- break; /* Break now, no need to continue any further. */
159
- }
160
- if (!$no_cache_headers_already_sent) /* Check here. */
161
- nocache_headers (); /* Only if NOT already sent. */
162
- /**/
163
- $once = true; /* Only set these headers once. */
164
- /**/
165
- do_action ("ws_plugin__s2member_during_no_cache_headers", get_defined_vars ());
166
- }
167
/**/
168
do_action ("ws_plugin__s2member_after_no_cache_headers", get_defined_vars ());
169
/**/
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_no_cache"))
21
{
28
class c_ws_plugin__s2member_no_cache
29
{
30
/**
31
+ * No-cache headers required?
32
*
33
+ * @package s2Member\No_Cache
34
+ * @since 111115
35
+ *
36
+ * @var null|bool
37
+ */
38
+ public static $headers;
39
+ /**
40
+ * Handles no-cache constants, and no-cache headers.
41
*
42
* @package s2Member\No_Cache
43
* @since 3.5
44
*
45
+ * @attaches-to ``add_action("init");``
46
+ * @also-called-by Other routines within s2Member.
47
*
48
+ * @param bool $no_cache Optional. Defaults to false. If true, force no-cache if at all possible.
49
+ * @return bool This function will always return `true`.
50
*/
51
+ public static function no_cache ($no_cache = FALSE)
52
{
53
do_action ("ws_plugin__s2member_before_no_cache", get_defined_vars ());
54
/**/
55
+ c_ws_plugin__s2member_no_cache::no_cache_constants ($no_cache) . c_ws_plugin__s2member_no_cache::no_cache_headers ($no_cache);
56
/**/
57
do_action ("ws_plugin__s2member_after_no_cache", get_defined_vars ());
58
/**/
59
+ return true; /* Always return true. */
60
}
61
/**
62
+ * Defines no-cache constants for various WordPress® plugins.
63
*
64
+ * This is compatible with Quick Cache, W3 Total Cache, and also with WP Super Cache.
65
+ * Quick Cache uses: ``QUICK_CACHE_ALLOWED``, and other plugins use: ``DONOTCACHEPAGE``.
66
+ * W3 Total Cache is also known to be compatible with ``DONOTCACHEOBJECT`` and ``DONOTCACHEDB``.
67
*
68
+ * Disallow caching if the ``$no_cache`` parameter is passed in as ``true``, by other routines.
69
+ * In addition, always disallow caching for logged in users, and GET requests with: `/?s2member` Systematics.
70
+ * For clarity on s2Member Systematics, see: {@link s2Member\Systematics\c_ws_plugin__s2member_systematics::is_s2_systematic_use_page()}.
71
*
72
+ * However, this routine will ALWAYS obey the `?qcAC` query string parameter.
73
+ * This Quick Cache parameter explicitly allows caching to occur.
74
*
75
* @package s2Member\No_Cache
76
* @since 3.5
77
*
78
+ * @also-called-by Other routines within s2Member.
79
*
80
+ * @param bool $no_cache Optional. Defaults to false. If true, force no-cache if at all possible.
81
+ * @return bool This function will always return `true`.
82
*/
83
public static function no_cache_constants ($no_cache = FALSE)
84
{
85
+ static $once; /* We only need to set these constants once. */
86
/**/
87
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
88
do_action ("ws_plugin__s2member_before_no_cache_constants", get_defined_vars ());
89
unset ($__refs, $__v); /* Unset defined __refs, __v. */
90
/**/
91
+ if (!$once && empty ($_GET["qcAC"]) && ($no_cache || is_user_logged_in () || c_ws_plugin__s2member_systematics::is_s2_systematic_use_page ()))
92
{
93
/**
94
+ * No-cache DB queries for plugins.
95
*
96
* @package s2Member\No_Cache
97
+ * @since 111115
98
*
99
* @var bool
100
*/
101
+ if (!defined ("DONOTCACHEDB"))
102
+ define ("DONOTCACHEDB", true);
103
/**
104
+ * No-cache Page for plugins.
105
*
106
* @package s2Member\No_Cache
107
* @since 3.5
110
*/
111
if (!defined ("DONOTCACHEPAGE"))
112
define ("DONOTCACHEPAGE", true);
113
+ /**
114
+ * No-cache Objects for plugins.
115
+ *
116
+ * @package s2Member\No_Cache
117
+ * @since 111115
118
+ *
119
+ * @var bool
120
+ */
121
+ if (!defined ("DONOTCACHEOBJECT"))
122
+ define ("DONOTCACHEOBJECT", true);
123
+ /**
124
+ * No-cache anything for Quick Cache plugin.
125
+ *
126
+ * @package s2Member\No_Cache
127
+ * @since 3.5
128
+ *
129
+ * @var bool
130
+ */
131
+ if (!defined ("QUICK_CACHE_ALLOWED"))
132
+ define ("QUICK_CACHE_ALLOWED", false);
133
/**/
134
+ $once = true; /* Only need to set these constants one time. */
135
/**/
136
+ c_ws_plugin__s2member_no_cache::$headers = /* Headers required too. */ true;
137
/**/
138
do_action ("ws_plugin__s2member_during_no_cache_constants", get_defined_vars ());
139
}
145
/**
146
* Sends Cache-Control ( no-cache ) headers.
147
*
148
+ * Disallow browser caching if the ``$no_cache`` parameter is passed in as ``true``, by other routines.
149
+ * Disallow browser caching when/if no-cache Constants are set by {@link s2Member\No_Cache\c_ws_plugin__s2member_no_cache::no_cache_constants()},
150
+ * via static variable boolean value for: ``c_ws_plugin__s2member_no_cache::$headers``.
151
+ *
152
+ * However, this routine will ALWAYS obey the `?qcABC` query string parameter.
153
+ * This Quick Cache parameter explicitly allows browser caching to occur.
154
*
155
* @package s2Member\No_Cache
156
* @since 3.5
157
*
158
+ * @also-called-by Other routines within s2Member.
159
+ *
160
+ * @param bool $no_cache Optional. Defaults to false. If true, force no-cache if at all possible.
161
* @return bool This function will always return `true`.
162
*/
163
+ public static function no_cache_headers ($no_cache = FALSE)
164
{
165
static $once; /* We only need to set these headers one time. */
166
/**/
167
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$__v;');
168
do_action ("ws_plugin__s2member_before_no_cache_headers", get_defined_vars ());
169
unset ($__refs, $__v); /* Unset defined __refs, __v. */
170
/**/
171
+ $using_selective_behavior = /* Off by default. */ apply_filters ("ws_plugin__s2member_no_cache_headers_selective", false, get_defined_vars ());
172
/**/
173
+ if (!$once && !headers_sent () && empty ($_GET["qcABC"]) && ($no_cache || !$using_selective_behavior || c_ws_plugin__s2member_no_cache::$headers))
174
+ if ( /* Give Filters a chance. */!apply_filters ("ws_plugin__s2member_disable_no_cache_headers", false, get_defined_vars ()))
175
+ {
176
+ foreach (headers_list () as $header) /* No-cache headers already sent? We need to check here. */
177
+ if (stripos ($header, "no-cache") !== false) /* No-cache headers already sent? */
178
+ {
179
+ $no_cache_headers_already_sent = true; /* Yep, sent. */
180
+ break; /* Break now, no need to continue further. */
181
+ }
182
+ if (!isset ($no_cache_headers_already_sent)) /* Not yet? */
183
+ nocache_headers (); /* Only if NOT already sent. */
184
+ /**/
185
+ $once = true; /* This is static var. Only send headers once. */
186
+ /**/
187
+ do_action ("ws_plugin__s2member_during_no_cache_headers", get_defined_vars ());
188
+ }
189
/**/
190
do_action ("ws_plugin__s2member_after_no_cache_headers", get_defined_vars ());
191
/**/
includes/classes/op-notices.inc.php CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_op_notices"))
33
* @package s2Member\Option_Notices
34
* @since 3.5
35
*
36
- * @attaches-to: ``add_action("load-options-general.php");``
37
*
38
* @return null
39
*/
@@ -66,7 +66,7 @@ if (!class_exists ("c_ws_plugin__s2member_op_notices"))
66
* @package s2Member\Option_Notices
67
* @since 3.5
68
*
69
- * @attaches-to: ``add_action("load-settings.php");``
70
*
71
* @return null
72
*/
@@ -99,7 +99,7 @@ if (!class_exists ("c_ws_plugin__s2member_op_notices"))
99
* @package s2Member\Option_Notices
100
* @since 3.5
101
*
102
- * @attaches-to: ``add_action("load-options-reading.php");``
103
*
104
* @return null
105
*/
33
* @package s2Member\Option_Notices
34
* @since 3.5
35
*
36
+ * @attaches-to ``add_action("load-options-general.php");``
37
*
38
* @return null
39
*/
66
* @package s2Member\Option_Notices
67
* @since 3.5
68
*
69
+ * @attaches-to ``add_action("load-settings.php");``
70
*
71
* @return null
72
*/
99
* @package s2Member\Option_Notices
100
* @since 3.5
101
*
102
+ * @attaches-to ``add_action("load-options-reading.php");``
103
*
104
* @return null
105
*/
includes/classes/option-forces.inc.php CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_option_forces"))
33
* @package s2Member\Option_Forces
34
* @since 3.5
35
*
36
- * @attaches-to: ``add_filter("pre_option_default_role");``
37
*
38
* @param str $default_role Expects a default Role to be passed by the Filter.
39
* @return str Default Role, as configured by s2Member.
@@ -50,7 +50,7 @@ if (!class_exists ("c_ws_plugin__s2member_option_forces"))
50
* @package s2Member\Option_Forces
51
* @since 3.5
52
*
53
- * @attaches-to: ``add_filter("pre_site_option_default_user_role");``
54
*
55
* @param str $default_role Expects a default Role to be passed by the Filter.
56
* @return str Default Role, as configured by s2Member.
@@ -84,7 +84,7 @@ if (!class_exists ("c_ws_plugin__s2member_option_forces"))
84
* @package s2Member\Option_Forces
85
* @since 3.5
86
*
87
- * @attaches-to: ``add_filter("pre_site_option_add_new_users");``
88
*
89
* @param int|str $allow Numeric string (`1`) or (`0`), expected by the Filter.
90
* @return str Numeric (`1`) or (`0`) indicating true or false. Forces to (`1`) true.
@@ -101,7 +101,7 @@ if (!class_exists ("c_ws_plugin__s2member_option_forces"))
101
* @package s2Member\Option_Forces
102
* @since 3.5
103
*
104
- * @attaches-to: ``add_filter("pre_site_option_dashboard_blog");``
105
*
106
* @param int|str $dashboard_blog Numeric Dashboard Blog ID passed through by the Filter.
107
* @return int|str Numeric Dashboard Blog ID, as configured by s2Member. Forces to the Main Site.
@@ -122,7 +122,7 @@ if (!class_exists ("c_ws_plugin__s2member_option_forces"))
122
* @package s2Member\Option_Forces
123
* @since 3.5
124
*
125
- * @attaches-to: ``add_filter("pre_option_users_can_register");``
126
*
127
* @param int|str $users_can_register Numeric (`1`) or (`0`), indicating true or false; passed through by the Filter.
128
* @return str Numeric value of (`1`) or (`0`), indicating true or false; depending on several factors.
@@ -157,7 +157,7 @@ if (!class_exists ("c_ws_plugin__s2member_option_forces"))
157
* @package s2Member\Option_Forces
158
* @since 3.5
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.
@@ -241,8 +241,8 @@ if (!class_exists ("c_ws_plugin__s2member_option_forces"))
241
* @package s2Member\Option_Forces
242
* @since 3.5
243
*
244
- * @attaches-to: ``add_filter("bp_core_get_root_options");``
245
- * @attaches-to: ``add_filter("bp_core_get_site_options");`` **( before BuddyPress v1.5 )**.
246
*
247
* @param array $site_options Expects array of BuddyPress site options.
248
* @return array Site options array, after having been Filtered by this routine.
33
* @package s2Member\Option_Forces
34
* @since 3.5
35
*
36
+ * @attaches-to ``add_filter("pre_option_default_role");``
37
*
38
* @param str $default_role Expects a default Role to be passed by the Filter.
39
* @return str Default Role, as configured by s2Member.
50
* @package s2Member\Option_Forces
51
* @since 3.5
52
*
53
+ * @attaches-to ``add_filter("pre_site_option_default_user_role");``
54
*
55
* @param str $default_role Expects a default Role to be passed by the Filter.
56
* @return str Default Role, as configured by s2Member.
84
* @package s2Member\Option_Forces
85
* @since 3.5
86
*
87
+ * @attaches-to ``add_filter("pre_site_option_add_new_users");``
88
*
89
* @param int|str $allow Numeric string (`1`) or (`0`), expected by the Filter.
90
* @return str Numeric (`1`) or (`0`) indicating true or false. Forces to (`1`) true.
101
* @package s2Member\Option_Forces
102
* @since 3.5
103
*
104
+ * @attaches-to ``add_filter("pre_site_option_dashboard_blog");``
105
*
106
* @param int|str $dashboard_blog Numeric Dashboard Blog ID passed through by the Filter.
107
* @return int|str Numeric Dashboard Blog ID, as configured by s2Member. Forces to the Main Site.
122
* @package s2Member\Option_Forces
123
* @since 3.5
124
*
125
+ * @attaches-to ``add_filter("pre_option_users_can_register");``
126
*
127
* @param int|str $users_can_register Numeric (`1`) or (`0`), indicating true or false; passed through by the Filter.
128
* @return str Numeric value of (`1`) or (`0`), indicating true or false; depending on several factors.
157
* @package s2Member\Option_Forces
158
* @since 3.5
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.
241
* @package s2Member\Option_Forces
242
* @since 3.5
243
*
244
+ * @attaches-to ``add_filter("bp_core_get_root_options");``
245
+ * @attaches-to ``add_filter("bp_core_get_site_options");`` **( before BuddyPress v1.5 )**.
246
*
247
* @param array $site_options Expects array of BuddyPress site options.
248
* @return array Site options array, after having been Filtered by this routine.
includes/classes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php CHANGED
@@ -44,9 +44,9 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_l
44
/**/
45
if (/**/(/**/(!empty ($paypal["txn_type"]) && preg_match ("/^(subscr_eot|recurring_payment_expired|recurring_payment_suspended_due_to_max_failed_payment)#x2F;i", $paypal["txn_type"]) && ($recurring = true))/**/
46
|| (!empty ($paypal["txn_type"]) && preg_match ("/^recurring_payment_profile_cancel#x2F;i", $paypal["txn_type"]) && !empty ($paypal["initial_payment_status"]) && preg_match ("/^failed#x2F;i", $paypal["initial_payment_status"]) && ($recurring = true))/**/
47
- || (!empty ($paypal["txn_type"]) && preg_match ("/^new_case#x2F;i", $paypal["txn_type"]) && !empty ($paypal["case_type"]) && preg_match ("/^chargeback#x2F;i", $paypal["case_type"]) && !($recurring = false)) /* Seek this for future compatibility. */
48
- || (!empty ($paypal["payment_status"]) && preg_match ("/^(refunded|reversed|reversal)#x2F;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)) || ($paypal["item_number"] = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_var ("item_number", false, $paypal["subscr_id"]))) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"]))/**/
@@ -309,7 +309,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_l
309
$ipn = array ("txn_type" => "subscr_eot"); /* Create a simulated IPN response for txn_type=subscr_eot. */
310
/**/
311
foreach ($paypal as $var => $val)
312
- if (in_array ($var, array ("subscr_gateway", "subscr_id", "custom", "invoice", "payer_email", "first_name", "last_name", "item_name", "item_number", "period1", "period3", "option_name1", "option_selection1", "option_name2", "option_selection2")))
313
$ipn[$var] = $val;
314
/**/
315
$paypal["s2member_log"][] = "Re-generating. This IPN will go into a Transient Queue; and be re-processed during registration.";
44
/**/
45
if (/**/(/**/(!empty ($paypal["txn_type"]) && preg_match ("/^(subscr_eot|recurring_payment_expired|recurring_payment_suspended_due_to_max_failed_payment)#x2F;i", $paypal["txn_type"]) && ($recurring = true))/**/
46
|| (!empty ($paypal["txn_type"]) && preg_match ("/^recurring_payment_profile_cancel#x2F;i", $paypal["txn_type"]) && !empty ($paypal["initial_payment_status"]) && preg_match ("/^failed#x2F;i", $paypal["initial_payment_status"]) && ($recurring = true))/**/
47
+ || (!empty ($paypal["txn_type"]) && preg_match ("/^new_case#x2F;i", $paypal["txn_type"]) && !empty ($paypal["case_type"]) && preg_match ("/^chargeback#x2F;i", $paypal["case_type"]) && !($recurring = false)) /* Seeking this for future compatibility. */
48
+ || (!empty ($paypal["payment_status"]) && preg_match ("/^(refunded|reversed|reversal)#x2F;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"]))) /* Other MUST haves. */
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)) || ($paypal["item_number"] = c_ws_plugin__s2member_utils_users::get_user_ipn_signup_var ("item_number", false, $paypal["subscr_id"]))) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"]))/**/
309
$ipn = array ("txn_type" => "subscr_eot"); /* Create a simulated IPN response for txn_type=subscr_eot. */
310
/**/
311
foreach ($paypal as $var => $val)
312
+ if (in_array ($var, array ("subscr_gateway", "subscr_id", "custom", "invoice", "payer_email", "first_name", "last_name", "item_name", "item_number", /* Exclude; might be defaults. "period1", "period3", */ "option_name1", "option_selection1", "option_name2", "option_selection2")))
313
$ipn[$var] = $val;
314
/**/
315
$paypal["s2member_log"][] = "Re-generating. This IPN will go into a Transient Queue; and be re-processed during registration.";
includes/classes/paypal-notify-in.inc.php CHANGED
@@ -43,7 +43,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in"))
43
* @package s2Member\PayPal
44
* @since 3.5
45
*
46
- * @attaches-to: ``add_action("init");``
47
*
48
* @return null Or exits script execution after handling IPN procesing.
49
*/
43
* @package s2Member\PayPal
44
* @since 3.5
45
*
46
+ * @attaches-to ``add_action("init");``
47
*
48
* @return null Or exits script execution after handling IPN procesing.
49
*/
includes/classes/paypal-notify.inc.php CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify"))
33
* @package s2Member\PayPal
34
* @since 3.5
35
*
36
- * @attaches-to: ``add_action("init");``
37
*
38
* @return null|inner Return-value of inner routine.
39
*/
33
* @package s2Member\PayPal
34
* @since 3.5
35
*
36
+ * @attaches-to ``add_action("init");``
37
*
38
* @return null|inner Return-value of inner routine.
39
*/
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#x2F;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
/**/
@@ -75,6 +75,8 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_modify_w_level
75
$paypal["regular_term"] = $paypal["period3"]; /* This is just set to keep a standard; this way both initial_term & regular_term are available. */
76
$paypal["recurring"] = ($paypal["recurring"]) ? $paypal["mc_amount3"] : "0"; /* If non-recurring, this should be zero, otherwise Regular. */
77
/**/
78
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)
79
{
80
if (!$user->has_cap ("administrator")) /* Do NOT process this routine on Administrators. */
@@ -87,7 +89,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