Version Description
Download this release
Release Info
Developer | PriMoThemes |
Plugin | s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members) |
Version | 111206 |
Comparing to | |
See all releases |
Code changes from version 111105 to 111206
- includes/classes/admin-lockouts.inc.php +51 -30
- includes/classes/cron-jobs-in.inc.php +4 -5
- includes/classes/cron-jobs.inc.php +2 -2
- includes/classes/css-js-in.inc.php +18 -18
- includes/classes/css-js-themes.inc.php +4 -4
- includes/classes/css-js.inc.php +5 -5
- includes/classes/custom-reg-fields-4bp.inc.php +3 -3
- includes/classes/custom-reg-fields.inc.php +41 -41
- includes/classes/email-configs.inc.php +6 -5
- includes/classes/files-in.inc.php +3 -3
- includes/classes/files.inc.php +3 -3
- includes/classes/ip-restrictions.inc.php +2 -2
- includes/classes/labels.inc.php +2 -2
- includes/classes/list-servers.inc.php +2 -2
- includes/classes/login-customizations.inc.php +4 -4
- includes/classes/login-redirects-r.inc.php +2 -2
- includes/classes/login-redirects.inc.php +1 -1
- includes/classes/menu-pages-rs.inc.php +4 -4
- includes/classes/menu-pages.inc.php +22 -22
- includes/classes/meta-box-saves.inc.php +1 -1
- includes/classes/meta-box-security.inc.php +2 -2
- includes/classes/meta-boxes.inc.php +1 -1
- includes/classes/mms-patches.inc.php +1 -1
- includes/classes/mo-page-in.inc.php +1 -1
- includes/classes/mo-page.inc.php +1 -1
- includes/classes/no-cache.inc.php +87 -65
- includes/classes/op-notices.inc.php +3 -3
- includes/classes/option-forces.inc.php +8 -8
- includes/classes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php +4 -4
- includes/classes/paypal-notify-in.inc.php +1 -1
- includes/classes/paypal-notify.inc.php +1 -1
- includes/classes/paypal-return-in-subscr-modify-w-level.inc.php +11 -7
- includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php +23 -16
- includes/classes/paypal-return-in.inc.php +1 -1
- includes/classes/paypal-return.inc.php +1 -1
- includes/classes/paypal-utilities.inc.php +30 -30
- includes/classes/profile-in.inc.php +29 -29
- includes/classes/profile-mods-4bp-in.inc.php +1 -1
- includes/classes/profile-mods-4bp.inc.php +1 -1
- includes/classes/profile-mods-in.inc.php +1 -1
- includes/classes/profile-mods.inc.php +1 -1
- includes/classes/profile.inc.php +1 -1
- includes/classes/querys.inc.php +62 -56
- includes/classes/register-access.inc.php +1 -1
- includes/classes/register-in.inc.php +1 -1
- includes/classes/register.inc.php +1 -1
- includes/classes/registration-times.inc.php +1 -1
- includes/classes/registrations.inc.php +623 -626
- includes/classes/roles-caps.inc.php +1 -1
- includes/classes/s-badge-status-in.inc.php +1 -1
- includes/classes/s-badge-status.inc.php +1 -1
- includes/classes/sc-files-in.inc.php +1 -1
- includes/classes/sc-files.inc.php +1 -1
- includes/classes/sc-gets-in.inc.php +1 -1
- includes/classes/sc-gets.inc.php +1 -1
- includes/classes/sc-if-conds-in.inc.php +7 -7
- includes/classes/sc-if-conds.inc.php +1 -1
- includes/classes/sc-keys-in.inc.php +1 -1
- includes/classes/sc-keys.inc.php +1 -1
- includes/classes/sc-paypal-button-e.inc.php +5 -5
- includes/classes/sc-paypal-button-in.inc.php +46 -46
- includes/classes/sc-paypal-button.inc.php +1 -1
- includes/classes/sc-profile-in.inc.php +7 -7
- includes/classes/sc-profile.inc.php +1 -1
- includes/classes/sc-s-badge-in.inc.php +1 -1
- includes/classes/sc-s-badge.inc.php +1 -1
- includes/classes/security.inc.php +2 -2
- includes/classes/sp-access.inc.php +1 -1
- includes/classes/ssl-in.inc.php +2 -2
- includes/classes/ssl.inc.php +2 -2
- includes/classes/systematics-sp.inc.php +58 -36
- includes/classes/systematics.inc.php +67 -41
- includes/classes/tracking-codes.inc.php +12 -12
- includes/classes/tracking-cookies-in.inc.php +2 -2
- includes/classes/tracking-cookies.inc.php +2 -2
- includes/classes/translations.inc.php +2 -2
- includes/classes/user-deletions.inc.php +3 -3
- includes/classes/user-new-in.inc.php +38 -38
- includes/classes/user-new.inc.php +1 -1
- includes/classes/user-securities.inc.php +4 -4
- includes/classes/users-list-in.inc.php +59 -59
- includes/classes/users-list.inc.php +7 -7
- includes/classes/utils-arrays.inc.php +34 -14
- includes/classes/utils-captchas.inc.php +24 -7
- includes/classes/utils-conds.inc.php +9 -14
- includes/classes/utils-dirs.inc.php +5 -5
- includes/classes/utils-encryption.inc.php +84 -69
- includes/classes/utils-strings.inc.php +130 -58
- includes/classes/utils-urls.inc.php +177 -92
- includes/functions/api-functions.inc.php +138 -0
- includes/menu-pages/api-ops.inc.php +9 -9
- includes/menu-pages/down-ops.inc.php +8 -8
- includes/menu-pages/els-ops.inc.php +5 -5
- includes/menu-pages/gen-ops.inc.php +27 -27
- includes/menu-pages/menu-pages-min.js +1 -1
- includes/menu-pages/menu-pages-s-min.js +1 -1
- includes/menu-pages/menu-pages-s.js +123 -157
- includes/menu-pages/menu-pages.css +52 -60
- includes/menu-pages/menu-pages.js +33 -36
- includes/menu-pages/mms-ops.inc.php +3 -3
- includes/menu-pages/paypal-buttons.inc.php +27 -32
- includes/menu-pages/paypal-ops.inc.php +10 -10
- includes/menu-pages/res-ops.inc.php +5 -5
- includes/menu-pages/scripting.inc.php +4 -4
- includes/menu-pages/{ws-mlist.inc.php → updates.inc.php} +22 -30
- includes/s2member-min.js +1 -1
- includes/s2member.js +50 -71
- includes/syscon.inc.php +3 -3
- includes/translations/s2member.pot +350 -350
- readme.txt +12 -3
- 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 (
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
/**/
|
89 |
-
if (isset /*
|
90 |
-
unset /* Ditch this. */($wp_admin_bar->menu->{"my-
|
91 |
-
|
92 |
-
if (
|
93 |
-
|
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 (
|
103 |
-
$wp_admin_bar->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
/**/
|
105 |
-
if (isset /*
|
106 |
-
$wp_admin_bar->menu->{"my-account-
|
|
|
|
|
|
|
107 |
/**/
|
108 |
-
if (isset /*
|
109 |
-
$wp_admin_bar->menu->{"my-account"}["children"]->{"
|
110 |
/**/
|
111 |
-
if (isset /*
|
112 |
-
$wp_admin_bar->menu->{"my-account-with-avatar"}["children"]->{"edit-profile"}["href"] = /*
|
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
|
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
|
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"])) /*
|
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 |
-
/**/
|
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
|
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
|
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
|
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
|
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
|
47 |
/**/
|
48 |
-
header
|
49 |
-
header
|
50 |
-
header
|
51 |
-
header
|
52 |
-
header
|
53 |
/**/
|
54 |
-
eval
|
55 |
/**/
|
56 |
$u = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"];
|
57 |
$i = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images";
|
58 |
/**/
|
59 |
-
ob_start
|
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
|
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
|
89 |
/**/
|
90 |
-
header
|
91 |
-
header
|
92 |
-
header
|
93 |
-
header
|
94 |
-
header
|
95 |
/**/
|
96 |
-
eval
|
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
|
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"];
|
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
|
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"];
|
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
|
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,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
|
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 |
}
|
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
|
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
|
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
|
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
|
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
|
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"
|
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"
|
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
|
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"
|
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"
|
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"
|
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
|
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
|
37 |
-
* @also-called-by
|
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
|
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
|
37 |
-
* @also-called-by
|
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
|
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
|
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
|
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
|
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
|
316 |
-
* @attaches-to
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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";
|
48 |
echo '</script>' . "\n";
|
49 |
/**/
|
50 |
-
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["menu_pages"]["
|
51 |
{
|
52 |
-
echo '<div class="ws-menu-page-
|
53 |
-
include_once dirname (dirname (__FILE__)) . "/menu-pages/
|
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
|
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, "
|
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, "
|
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, "
|
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, "
|
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, "
|
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, "
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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 |
-
*
|
32 |
*
|
33 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
*
|
35 |
* @package s2Member\No_Cache
|
36 |
* @since 3.5
|
37 |
*
|
38 |
-
* @attaches-to
|
|
|
39 |
*
|
40 |
-
* @
|
|
|
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 ()
|
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; /*
|
52 |
}
|
53 |
/**
|
54 |
-
* Defines
|
55 |
*
|
56 |
-
* This is compatible with Quick Cache and also with WP Super Cache.
|
57 |
-
* Quick Cache uses: ``QUICK_CACHE_ALLOWED``, and
|
58 |
-
*
|
59 |
*
|
60 |
-
*
|
61 |
-
*
|
62 |
-
*
|
63 |
-
* BUT, always obey the `qcAC` param that specifically allows caching.
|
64 |
*
|
65 |
-
*
|
66 |
-
*
|
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 |
-
* @
|
74 |
-
* @return bool This function will always return `true`.
|
75 |
*
|
76 |
-
* @
|
77 |
-
* @
|
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
|
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 () ||
|
94 |
{
|
95 |
/**
|
96 |
-
* No-cache
|
97 |
*
|
98 |
* @package s2Member\No_Cache
|
99 |
-
* @since
|
100 |
*
|
101 |
* @var bool
|
102 |
*/
|
103 |
-
if (!defined ("
|
104 |
-
define ("
|
105 |
/**
|
106 |
-
* No-cache for
|
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 |
-
$
|
117 |
/**/
|
118 |
-
|
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 |
-
*
|
131 |
-
*
|
132 |
-
*
|
|
|
|
|
|
|
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 ||
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
245 |
-
* @attaches-to
|
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)$/i", $paypal["txn_type"]) && ($recurring = true))/**/
|
46 |
|| (!empty ($paypal["txn_type"]) && preg_match ("/^recurring_payment_profile_cancel$/i", $paypal["txn_type"]) && !empty ($paypal["initial_payment_status"]) && preg_match ("/^failed$/i", $paypal["initial_payment_status"]) && ($recurring = true))/**/
|
47 |
-
|| (!empty ($paypal["txn_type"]) && preg_match ("/^new_case$/i", $paypal["txn_type"]) && !empty ($paypal["case_type"]) && preg_match ("/^chargeback$/i", $paypal["case_type"]) && !($recurring = false)) /*
|
48 |
-
|| (!empty ($paypal["payment_status"]) && preg_match ("/^(refunded|reversed|reversal)$/i", $paypal["payment_status"]) && !($recurring = false))/**/) /* The
|
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"]))) /*
|
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)$/i", $paypal["txn_type"]) && ($recurring = true))/**/
|
46 |
|| (!empty ($paypal["txn_type"]) && preg_match ("/^recurring_payment_profile_cancel$/i", $paypal["txn_type"]) && !empty ($paypal["initial_payment_status"]) && preg_match ("/^failed$/i", $paypal["initial_payment_status"]) && ($recurring = true))/**/
|
47 |
+
|| (!empty ($paypal["txn_type"]) && preg_match ("/^new_case$/i", $paypal["txn_type"]) && !empty ($paypal["case_type"]) && preg_match ("/^chargeback$/i", $paypal["case_type"]) && !($recurring = false)) /* Seeking this for future compatibility. */
|
48 |
+
|| (!empty ($paypal["payment_status"]) && preg_match ("/^(refunded|reversed|reversal)$/i", $paypal["payment_status"]) && !($recurring = false))/**/) /* The `txn_type` is irrelevant in all of these payment statuses: `refunded|reversed|reversal`. */
|
49 |
+
&& (!empty ($paypal["subscr_id"]) || ($paypal["subscr_id"] = c_ws_plugin__s2member_paypal_utilities::paypal_pro_subscr_id ($paypal)) || (!empty ($paypal["parent_txn_id"]) && ($paypal["subscr_id"] = $paypal["parent_txn_id"]))) /* 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
|
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
|
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
|
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
|
44 |
/**/
|
45 |
if (/**/(!empty ($paypal["txn_type"]) && preg_match ("/^subscr_modify$/i", $paypal["txn_type"]))/**/
|
46 |
&& (!empty ($paypal["item_number"]) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"]))/**/
|
47 |
&& (!empty ($paypal["subscr_id"]))/**/)
|
48 |
{
|
49 |
-
eval
|
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 |
{
|
90 |
-
add_existing_user_to_blog
|
91 |
$user = new WP_User ($user_id); /* Now update the $user object we're using. */
|
92 |
}
|
93 |
/**/
|
@@ -113,6 +115,8 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_modify_w_level
|
|
113 |
if (!get_user_option ("s2member_registration_ip", $user_id))
|
114 |
update_user_option ($user_id, "s2member_registration_ip", $paypal["ip"]);
|
115 |
/**/
|
|
|
|
|
116 |
delete_user_option ($user_id, "s2member_file_download_access_log");
|
117 |
/**/
|
118 |
delete_user_option ($user_id, "s2member_auto_eot_time");
|
@@ -161,7 +165,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_modify_w_level
|
|
161 |
}
|
162 |
}
|
163 |
/**/
|
164 |
-
eval
|
165 |
do_action ("ws_plugin__s2member_during_paypal_return_during_subscr_modify", get_defined_vars ());
|
166 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
167 |
/**/
|
@@ -169,7 +173,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_modify_w_level
|
|
169 |
{
|
170 |
$paypal["s2member_log"][] = "Redirecting this Member to a custom URL after modification: " . $redirection_url_after_modification;
|
171 |
/**/
|
172 |
-
wp_redirect
|
173 |
}
|
174 |
else /* Else, use standard/default handling in this scenario. Have the Customer log in again. */
|
175 |
{
|
@@ -213,7 +217,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_modify_w_level
|
|
213 |
_x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
|
214 |
}
|
215 |
/**/
|
216 |
-
eval
|
217 |
do_action ("ws_plugin__s2member_during_paypal_return_after_subscr_modify", get_defined_vars ());
|
218 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
219 |
/**/
|
15 |
* @since 110720
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_modify_w_level"))
|
21 |
{
|
40 |
*/
|
41 |
public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
|
42 |
{
|
43 |
+
extract($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
|
44 |
/**/
|
45 |
if (/**/(!empty ($paypal["txn_type"]) && preg_match ("/^subscr_modify$/i", $paypal["txn_type"]))/**/
|
46 |
&& (!empty ($paypal["item_number"]) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"]))/**/
|
47 |
&& (!empty ($paypal["subscr_id"]))/**/)
|
48 |
{
|
49 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
50 |
do_action ("ws_plugin__s2member_during_paypal_return_before_subscr_modify", get_defined_vars ());
|
51 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
52 |
/**/
|
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 |
+
eval('$ipn_signup_vars = $paypal; unset($ipn_signup_vars["s2member_log"]);'); /* Create array of wouldbe IPN signup vars w/o s2member_log. */
|
79 |
+
/**/
|
80 |
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)
|
81 |
{
|
82 |
if (!$user->has_cap ("administrator")) /* Do NOT process this routine on Administrators. */
|
89 |
/**/
|
90 |
if (is_multisite () && !is_user_member_of_blog ($user_id)) /* Must have a Role on this Blog. */
|
91 |
{
|
92 |
+
add_existing_user_to_blog(array ("user_id" => $user_id, "role" => "s2member_level" . $paypal["level"]));
|
93 |
$user = new WP_User ($user_id); /* Now update the $user object we're using. */
|
94 |
}
|
95 |
/**/
|
115 |
if (!get_user_option ("s2member_registration_ip", $user_id))
|
116 |
update_user_option ($user_id, "s2member_registration_ip", $paypal["ip"]);
|
117 |
/**/
|
118 |
+
update_user_option ($user_id, "s2member_ipn_signup_vars", $ipn_signup_vars);
|
119 |
+
/**/
|
120 |
delete_user_option ($user_id, "s2member_file_download_access_log");
|
121 |
/**/
|
122 |
delete_user_option ($user_id, "s2member_auto_eot_time");
|
165 |
}
|
166 |
}
|
167 |
/**/
|
168 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
169 |
do_action ("ws_plugin__s2member_during_paypal_return_during_subscr_modify", get_defined_vars ());
|
170 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
171 |
/**/
|
173 |
{
|
174 |
$paypal["s2member_log"][] = "Redirecting this Member to a custom URL after modification: " . $redirection_url_after_modification;
|
175 |
/**/
|
176 |
+
wp_redirect($redirection_url_after_modification);
|
177 |
}
|
178 |
else /* Else, use standard/default handling in this scenario. Have the Customer log in again. */
|
179 |
{
|
217 |
_x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
|
218 |
}
|
219 |
/**/
|
220 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
221 |
do_action ("ws_plugin__s2member_during_paypal_return_after_subscr_modify", get_defined_vars ());
|
222 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
223 |
/**/
|
includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 110720
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"))
|
21 |
{
|
@@ -40,14 +40,14 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
|
|
40 |
*/
|
41 |
public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
|
42 |
{
|
43 |
-
extract
|
44 |
/**/
|
45 |
if (/**/(!empty ($paypal["txn_type"]) && preg_match ("/^(web_accept|subscr_signup|subscr_payment)$/i", $paypal["txn_type"]))/**/
|
46 |
&& (!empty ($paypal["item_number"]) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"]))/**/
|
47 |
&& (!empty ($paypal["subscr_id"]) || (!empty ($paypal["txn_id"]) && ($paypal["subscr_id"] = $paypal["txn_id"])))/**/
|
48 |
&& (empty ($paypal["payment_status"]) || empty ($payment_status_issues) || !preg_match ($payment_status_issues, $paypal["payment_status"]))/**/)
|
49 |
{
|
50 |
-
eval
|
51 |
do_action ("ws_plugin__s2member_during_paypal_return_before_subscr_signup", get_defined_vars ());
|
52 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
53 |
/**/
|
@@ -81,6 +81,8 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
|
|
81 |
$paypal["regular"] = $paypal["mc_amount3"]; /* This is the Regular Payment Amount that is charged to the Customer. Always required by PayPal®. */
|
82 |
$paypal["regular_term"] = $paypal["period3"]; /* This is just set to keep a standard; this way both initial_term & regular_term are available. */
|
83 |
$paypal["recurring"] = ($paypal["recurring"]) ? $paypal["mc_amount3"] : "0"; /* If non-recurring, this should be zero, otherwise Regular. */
|
|
|
|
|
84 |
}
|
85 |
else if (preg_match ("/^(web_accept|subscr_signup)$/i", $paypal["txn_type"]))
|
86 |
{
|
@@ -100,13 +102,15 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
|
|
100 |
$paypal["regular"] = $paypal["mc_amount3"]; /* This is the Regular Payment Amount that is charged to the Customer. Always required by PayPal®. */
|
101 |
$paypal["regular_term"] = $paypal["period3"]; /* This is just set to keep a standard; this way both initial_term & regular_term are available. */
|
102 |
$paypal["recurring"] = ($paypal["recurring"]) ? $paypal["mc_amount3"] : "0"; /* If non-recurring, this should be zero, otherwise Regular. */
|
|
|
|
|
103 |
}
|
104 |
/*
|
105 |
New Subscription with advanced update vars ( option_name1, option_selection1 )? Used in Subscr. Modifications.
|
106 |
*/
|
107 |
if (preg_match ("/(referenc|associat|updat|upgrad)/i", $paypal["option_name1"]) && $paypal["option_selection1"])
|
108 |
{
|
109 |
-
eval
|
110 |
do_action ("ws_plugin__s2member_during_paypal_return_before_subscr_signup_w_update_vars", get_defined_vars ());
|
111 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
112 |
/**/
|
@@ -125,7 +129,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
|
|
125 |
/**/
|
126 |
if (is_multisite () && !is_user_member_of_blog ($user_id)) /* Must have a Role on this Blog. */
|
127 |
{
|
128 |
-
add_existing_user_to_blog
|
129 |
$user = new WP_User ($user_id);
|
130 |
}
|
131 |
/**/
|
@@ -151,6 +155,9 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
|
|
151 |
if (!get_user_option ("s2member_registration_ip", $user_id))
|
152 |
update_user_option ($user_id, "s2member_registration_ip", $paypal["ip"]);
|
153 |
/**/
|
|
|
|
|
|
|
154 |
delete_user_option ($user_id, "s2member_file_download_access_log");
|
155 |
/**/
|
156 |
if (preg_match ("/^web_accept$/i", $paypal["txn_type"]) && $paypal["eotper"])
|
@@ -207,7 +214,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
|
|
207 |
}
|
208 |
}
|
209 |
/**/
|
210 |
-
eval
|
211 |
do_action ("ws_plugin__s2member_during_paypal_return_during_subscr_signup_w_update_vars", get_defined_vars ());
|
212 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
213 |
/**/
|
@@ -215,7 +222,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
|
|
215 |
{
|
216 |
$paypal["s2member_log"][] = "Redirecting Customer to a custom URL after modification: " . $redirection_url_after_modification;
|
217 |
/**/
|
218 |
-
wp_redirect
|
219 |
}
|
220 |
else /* Else, use standard/default handling in this scenario. Have the Customer log in again. */
|
221 |
{
|
@@ -248,7 +255,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
|
|
248 |
_x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
|
249 |
}
|
250 |
/**/
|
251 |
-
eval
|
252 |
do_action ("ws_plugin__s2member_during_paypal_return_after_subscr_signup_w_update_vars", get_defined_vars ());
|
253 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
254 |
}
|
@@ -257,7 +264,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
|
|
257 |
*/
|
258 |
else /* Else this is a normal Subscription signup, we are not updating an existing Subscription. */
|
259 |
{
|
260 |
-
eval
|
261 |
do_action ("ws_plugin__s2member_during_paypal_return_before_subscr_signup_wo_update_vars", get_defined_vars ());
|
262 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
263 |
/**/
|
@@ -294,7 +301,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
|
|
294 |
}
|
295 |
}
|
296 |
/**/
|
297 |
-
eval
|
298 |
do_action ("ws_plugin__s2member_during_paypal_return_during_subscr_signup_wo_update_vars", get_defined_vars ());
|
299 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
300 |
/**/
|
@@ -304,13 +311,13 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
|
|
304 |
{
|
305 |
$paypal["s2member_log"][] = "Redirecting Customer to a custom URL after signup: " . $redirection_url_after_mms_farm_signup;
|
306 |
/**/
|
307 |
-
wp_redirect
|
308 |
}
|
309 |
else if ($custom_success_redirection) /* Using a custom success redirection URL? */
|
310 |
{
|
311 |
$paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection;
|
312 |
/**/
|
313 |
-
wp_redirect
|
314 |
}
|
315 |
else /* Else use the default return URL in this scenario, which is the Signup Page. */
|
316 |
{
|
@@ -327,13 +334,13 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
|
|
327 |
{
|
328 |
$paypal["s2member_log"][] = "Redirecting Customer to a custom URL after signup: " . $redirection_url_after_signup;
|
329 |
/**/
|
330 |
-
wp_redirect
|
331 |
}
|
332 |
else if ($custom_success_redirection) /* Using a custom success redirection URL? */
|
333 |
{
|
334 |
$paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection;
|
335 |
/**/
|
336 |
-
wp_redirect
|
337 |
}
|
338 |
else /* Else use the default return URL in this scenario, which is the Registration Page. */
|
339 |
{
|
@@ -345,7 +352,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
|
|
345 |
}
|
346 |
}
|
347 |
/**/
|
348 |
-
eval
|
349 |
do_action ("ws_plugin__s2member_during_paypal_return_after_subscr_signup_wo_update_vars", get_defined_vars ());
|
350 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
351 |
}
|
@@ -361,7 +368,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"
|
|
361 |
_x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
|
362 |
}
|
363 |
/**/
|
364 |
-
eval
|
365 |
do_action ("ws_plugin__s2member_during_paypal_return_after_subscr_signup", get_defined_vars ());
|
366 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
367 |
/**/
|
15 |
* @since 110720
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_paypal_return_in_subscr_or_wa_w_level"))
|
21 |
{
|
40 |
*/
|
41 |
public static function cp ($vars = array ()) /* Conditional phase for ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
|
42 |
{
|
43 |
+
extract($vars); /* Extract all vars passed in from: ``c_ws_plugin__s2member_paypal_notify_in::paypal_notify()``. */
|
44 |
/**/
|
45 |
if (/**/(!empty ($paypal["txn_type"]) && preg_match ("/^(web_accept|subscr_signup|subscr_payment)$/i", $paypal["txn_type"]))/**/
|
46 |
&& (!empty ($paypal["item_number"]) && preg_match ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["membership_item_number_w_level_regex"], $paypal["item_number"]))/**/
|
47 |
&& (!empty ($paypal["subscr_id"]) || (!empty ($paypal["txn_id"]) && ($paypal["subscr_id"] = $paypal["txn_id"])))/**/
|
48 |
&& (empty ($paypal["payment_status"]) || empty ($payment_status_issues) || !preg_match ($payment_status_issues, $paypal["payment_status"]))/**/)
|
49 |
{
|
50 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
51 |
do_action ("ws_plugin__s2member_during_paypal_return_before_subscr_signup", get_defined_vars ());
|
52 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
53 |
/**/
|
81 |
$paypal["regular"] = $paypal["mc_amount3"]; /* This is the Regular Payment Amount that is charged to the Customer. Always required by PayPal®. */
|
82 |
$paypal["regular_term"] = $paypal["period3"]; /* This is just set to keep a standard; this way both initial_term & regular_term are available. */
|
83 |
$paypal["recurring"] = ($paypal["recurring"]) ? $paypal["mc_amount3"] : "0"; /* If non-recurring, this should be zero, otherwise Regular. */
|
84 |
+
/**/
|
85 |
+
eval('$ipn_signup_vars = $paypal; unset($ipn_signup_vars["s2member_log"]);'); /* Create array of wouldbe IPN signup vars w/o s2member_log. */
|
86 |
}
|
87 |
else if (preg_match ("/^(web_accept|subscr_signup)$/i", $paypal["txn_type"]))
|
88 |
{
|
102 |
$paypal["regular"] = $paypal["mc_amount3"]; /* This is the Regular Payment Amount that is charged to the Customer. Always required by PayPal®. */
|
103 |
$paypal["regular_term"] = $paypal["period3"]; /* This is just set to keep a standard; this way both initial_term & regular_term are available. */
|
104 |
$paypal["recurring"] = ($paypal["recurring"]) ? $paypal["mc_amount3"] : "0"; /* If non-recurring, this should be zero, otherwise Regular. */
|
105 |
+
/**/
|
106 |
+
eval('$ipn_signup_vars = $paypal; unset($ipn_signup_vars["s2member_log"]);'); /* Create array of wouldbe IPN signup vars w/o s2member_log. */
|
107 |
}
|
108 |
/*
|
109 |
New Subscription with advanced update vars ( option_name1, option_selection1 )? Used in Subscr. Modifications.
|
110 |
*/
|
111 |
if (preg_match ("/(referenc|associat|updat|upgrad)/i", $paypal["option_name1"]) && $paypal["option_selection1"])
|
112 |
{
|
113 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
114 |
do_action ("ws_plugin__s2member_during_paypal_return_before_subscr_signup_w_update_vars", get_defined_vars ());
|
115 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
116 |
/**/
|
129 |
/**/
|
130 |
if (is_multisite () && !is_user_member_of_blog ($user_id)) /* Must have a Role on this Blog. */
|
131 |
{
|
132 |
+
add_existing_user_to_blog(array ("user_id" => $user_id, "role" => "s2member_level" . $paypal["level"]));
|
133 |
$user = new WP_User ($user_id);
|
134 |
}
|
135 |
/**/
|
155 |
if (!get_user_option ("s2member_registration_ip", $user_id))
|
156 |
update_user_option ($user_id, "s2member_registration_ip", $paypal["ip"]);
|
157 |
/**/
|
158 |
+
if ( /* We should have these from the routines above. */!empty ($ipn_signup_vars))
|
159 |
+
update_user_option ($user_id, "s2member_ipn_signup_vars", $ipn_signup_vars);
|
160 |
+
/**/
|
161 |
delete_user_option ($user_id, "s2member_file_download_access_log");
|
162 |
/**/
|
163 |
if (preg_match ("/^web_accept$/i", $paypal["txn_type"]) && $paypal["eotper"])
|
214 |
}
|
215 |
}
|
216 |
/**/
|
217 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
218 |
do_action ("ws_plugin__s2member_during_paypal_return_during_subscr_signup_w_update_vars", get_defined_vars ());
|
219 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
220 |
/**/
|
222 |
{
|
223 |
$paypal["s2member_log"][] = "Redirecting Customer to a custom URL after modification: " . $redirection_url_after_modification;
|
224 |
/**/
|
225 |
+
wp_redirect($redirection_url_after_modification);
|
226 |
}
|
227 |
else /* Else, use standard/default handling in this scenario. Have the Customer log in again. */
|
228 |
{
|
255 |
_x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
|
256 |
}
|
257 |
/**/
|
258 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
259 |
do_action ("ws_plugin__s2member_during_paypal_return_after_subscr_signup_w_update_vars", get_defined_vars ());
|
260 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
261 |
}
|
264 |
*/
|
265 |
else /* Else this is a normal Subscription signup, we are not updating an existing Subscription. */
|
266 |
{
|
267 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
268 |
do_action ("ws_plugin__s2member_during_paypal_return_before_subscr_signup_wo_update_vars", get_defined_vars ());
|
269 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
270 |
/**/
|
301 |
}
|
302 |
}
|
303 |
/**/
|
304 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
305 |
do_action ("ws_plugin__s2member_during_paypal_return_during_subscr_signup_wo_update_vars", get_defined_vars ());
|
306 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
307 |
/**/
|
311 |
{
|
312 |
$paypal["s2member_log"][] = "Redirecting Customer to a custom URL after signup: " . $redirection_url_after_mms_farm_signup;
|
313 |
/**/
|
314 |
+
wp_redirect($redirection_url_after_mms_farm_signup);
|
315 |
}
|
316 |
else if ($custom_success_redirection) /* Using a custom success redirection URL? */
|
317 |
{
|
318 |
$paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection;
|
319 |
/**/
|
320 |
+
wp_redirect($custom_success_redirection);
|
321 |
}
|
322 |
else /* Else use the default return URL in this scenario, which is the Signup Page. */
|
323 |
{
|
334 |
{
|
335 |
$paypal["s2member_log"][] = "Redirecting Customer to a custom URL after signup: " . $redirection_url_after_signup;
|
336 |
/**/
|
337 |
+
wp_redirect($redirection_url_after_signup);
|
338 |
}
|
339 |
else if ($custom_success_redirection) /* Using a custom success redirection URL? */
|
340 |
{
|
341 |
$paypal["s2member_log"][] = "Redirecting Customer to a custom URL on success: " . $custom_success_redirection;
|
342 |
/**/
|
343 |
+
wp_redirect($custom_success_redirection);
|
344 |
}
|
345 |
else /* Else use the default return URL in this scenario, which is the Registration Page. */
|
346 |
{
|
352 |
}
|
353 |
}
|
354 |
/**/
|
355 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
356 |
do_action ("ws_plugin__s2member_during_paypal_return_after_subscr_signup_wo_update_vars", get_defined_vars ());
|
357 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
358 |
}
|
368 |
_x ("Back To Home Page", "s2member-front", "s2member"), home_url ("/"));
|
369 |
}
|
370 |
/**/
|
371 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
372 |
do_action ("ws_plugin__s2member_during_paypal_return_after_subscr_signup", get_defined_vars ());
|
373 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
374 |
/**/
|
includes/classes/paypal-return-in.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in"))
|
|
33 |
* @package s2Member\PayPal
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @return null Or exits script execution after redirection.
|
39 |
*/
|
33 |
* @package s2Member\PayPal
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("init");``
|
37 |
*
|
38 |
* @return null Or exits script execution after redirection.
|
39 |
*/
|
includes/classes/paypal-return.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return"))
|
|
33 |
* @package s2Member\PayPal
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
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-utilities.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
21 |
{
|
@@ -37,13 +37,13 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
|
37 |
*/
|
38 |
public static function paypal_postvars ()
|
39 |
{
|
40 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
41 |
do_action ("ws_plugin__s2member_before_paypal_postvars", get_defined_vars ());
|
42 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
43 |
/*
|
44 |
Custom conditionals can be applied by filters.
|
45 |
*/
|
46 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
47 |
if (!($postvars = apply_filters ("ws_plugin__s2member_during_paypal_postvars_conditionals", array (), get_defined_vars ())))
|
48 |
{
|
49 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
@@ -74,7 +74,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
|
74 |
{
|
75 |
foreach ($postvars as $key => $value)
|
76 |
if (preg_match ("/^s2member_/", $key))
|
77 |
-
unset($postvars[$key]);
|
78 |
/**/
|
79 |
$postback = $postvars; /* Copy. */
|
80 |
$postback["cmd"] = "_notify-validate";
|
@@ -86,6 +86,9 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
|
86 |
if (!empty ($_GET["s2member_paypal_proxy"]) && !empty ($_GET["s2member_paypal_proxy_verification"]) && $_GET["s2member_paypal_proxy_verification"] === c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen ())
|
87 |
return apply_filters ("ws_plugin__s2member_paypal_postvars", array_merge ($postvars, array ("proxy_verified" => $_GET["s2member_paypal_proxy"])), get_defined_vars ());
|
88 |
/**/
|
|
|
|
|
|
|
89 |
else if (trim (strtolower (c_ws_plugin__s2member_utils_urls::remote ("https://" . $endpoint . "/cgi-bin/webscr", $postback, array ("timeout" => 20)))) === "verified")
|
90 |
return apply_filters ("ws_plugin__s2member_paypal_postvars", $postvars, get_defined_vars ());
|
91 |
/**/
|
@@ -114,15 +117,15 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
|
114 |
{
|
115 |
global $current_site, $current_blog; /* Multisite Networking. */
|
116 |
/**/
|
117 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
118 |
do_action ("ws_plugin__s2member_before_paypal_proxy_key_gen", get_defined_vars ());
|
119 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
120 |
/**/
|
121 |
if (is_multisite () && !is_main_site ())
|
122 |
-
$key = md5 (c_ws_plugin__s2member_utils_encryption::xencrypt ($current_blog->domain . $current_blog->path));
|
123 |
/**/
|
124 |
else /* Else it's a standard Proxy Key; not on a Multisite Network, or not on the Main Site anyway. */
|
125 |
-
$key = md5 (c_ws_plugin__s2member_utils_encryption::xencrypt (preg_replace ("/\:[0-9]+$/", "", $_SERVER["HTTP_HOST"])));
|
126 |
/**/
|
127 |
return apply_filters ("ws_plugin__s2member_paypal_proxy_key_gen", $key, get_defined_vars ());
|
128 |
}
|
@@ -140,30 +143,30 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
|
140 |
*/
|
141 |
public static function paypal_api_response ($post_vars = FALSE)
|
142 |
{
|
143 |
-
global
|
144 |
/**/
|
145 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
146 |
do_action ("ws_plugin__s2member_before_paypal_api_response", get_defined_vars ());
|
147 |
-
unset
|
148 |
/**/
|
149 |
$url = "https://" . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "api-3t.sandbox.paypal.com" : "api-3t.paypal.com") . "/nvp";
|
150 |
/**/
|
151 |
$post_vars = apply_filters ("ws_plugin__s2member_paypal_api_post_vars", $post_vars, get_defined_vars ());
|
152 |
-
$post_vars = (is_array ($post_vars)) ? $post_vars : array ();
|
153 |
/**/
|
154 |
-
$post_vars["VERSION"] =
|
155 |
$post_vars["USER"] = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_username"];
|
156 |
$post_vars["PWD"] = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_password"];
|
157 |
$post_vars["SIGNATURE"] = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_signature"];
|
158 |
/**/
|
159 |
-
$input_time = date ("D M j, Y g:i:s a T");
|
160 |
/**/
|
161 |
$nvp = trim (c_ws_plugin__s2member_utils_urls::remote ($url, $post_vars, array ("timeout" => 20)));
|
162 |
/**/
|
163 |
-
$output_time = date ("D M j, Y g:i:s a T");
|
164 |
/**/
|
165 |
-
wp_parse_str
|
166 |
-
$response = c_ws_plugin__s2member_utils_strings::trim_deep (
|
167 |
/**/
|
168 |
if (!$response["ACK"] || !preg_match ("/^(Success|SuccessWithWarning)$/i", $response["ACK"]))
|
169 |
{
|
@@ -174,10 +177,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
|
174 |
else /* Else, generate an error messsage - so something is reported back to the Customer. */
|
175 |
$response["__error"] = _x ("Error. Please contact Support for assistance.", "s2member-front", "s2member");
|
176 |
}
|
177 |
-
|
178 |
-
If debugging is enabled; we need to maintain a comprehensive log file.
|
179 |
-
Logging now supports Multisite Networking as well.
|
180 |
-
*/
|
181 |
$logv = c_ws_plugin__s2member_utilities::ver_details ();
|
182 |
$logm = c_ws_plugin__s2member_utilities::mem_details ();
|
183 |
$log4 = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . "\nUser-Agent: " . $_SERVER["HTTP_USER_AGENT"];
|
@@ -209,7 +209,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
|
209 |
*/
|
210 |
public static function _paypal_api_response_filters ($response = FALSE)
|
211 |
{
|
212 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
213 |
do_action ("_ws_plugin__s2member_before_paypal_api_response_filters", get_defined_vars ());
|
214 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
215 |
/**/
|
@@ -238,7 +238,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
|
238 |
*/
|
239 |
public static function paypal_pro_term ($term = FALSE)
|
240 |
{
|
241 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
242 |
do_action ("ws_plugin__s2member_before_paypal_pro_term", get_defined_vars ());
|
243 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
244 |
/**/
|
@@ -259,7 +259,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
|
259 |
*/
|
260 |
public static function paypal_std_term ($term = FALSE)
|
261 |
{
|
262 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
263 |
do_action ("ws_plugin__s2member_before_paypal_std_term", get_defined_vars ());
|
264 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
265 |
/**/
|
@@ -280,7 +280,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
|
280 |
*/
|
281 |
public static function paypal_pro_subscr_id ($array_or_string = FALSE)
|
282 |
{
|
283 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
284 |
do_action ("ws_plugin__s2member_before_paypal_pro_subscr_id", get_defined_vars ());
|
285 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
286 |
/**/
|
@@ -307,7 +307,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
|
307 |
*/
|
308 |
public static function paypal_pro_item_number ($array_or_string = FALSE)
|
309 |
{
|
310 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
311 |
do_action ("ws_plugin__s2member_before_paypal_pro_item_number", get_defined_vars ());
|
312 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
313 |
/**/
|
@@ -342,7 +342,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
|
342 |
*/
|
343 |
public static function paypal_pro_item_name ($array_or_string = FALSE)
|
344 |
{
|
345 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
346 |
do_action ("ws_plugin__s2member_before_paypal_pro_item_name", get_defined_vars ());
|
347 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
348 |
/**/
|
@@ -376,7 +376,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
|
376 |
*/
|
377 |
public static function paypal_pro_period1 ($array_or_string = FALSE, $default = "0 D")
|
378 |
{
|
379 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
380 |
do_action ("ws_plugin__s2member_before_paypal_pro_period1", get_defined_vars ());
|
381 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
382 |
/**/
|
@@ -397,7 +397,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
|
397 |
/**/
|
398 |
if (strtoupper ($span) === "SEMIMONTH")
|
399 |
if (is_numeric ($num) && $num >= 1)
|
400 |
-
eval('$num = "2"; $span = "W";');
|
401 |
/**/
|
402 |
if (strlen ($span) !== 1) /* To Standard format. */
|
403 |
$span = c_ws_plugin__s2member_paypal_utilities::paypal_std_term ($span);
|
@@ -429,7 +429,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
|
429 |
*/
|
430 |
public static function paypal_pro_period3 ($array_or_string = FALSE, $default = "1 D")
|
431 |
{
|
432 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
433 |
do_action ("ws_plugin__s2member_before_paypal_pro_period3", get_defined_vars ());
|
434 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
435 |
/**/
|
@@ -450,7 +450,7 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
|
450 |
/**/
|
451 |
if (strtoupper ($span) === "SEMIMONTH")
|
452 |
if (is_numeric ($num) && $num >= 1)
|
453 |
-
eval('$num = "2"; $span = "W";');
|
454 |
/**/
|
455 |
if (strlen ($span) !== 1) /* To Standard format. */
|
456 |
$span = c_ws_plugin__s2member_paypal_utilities::paypal_std_term ($span);
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit ("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_paypal_utilities"))
|
21 |
{
|
37 |
*/
|
38 |
public static function paypal_postvars ()
|
39 |
{
|
40 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
41 |
do_action ("ws_plugin__s2member_before_paypal_postvars", get_defined_vars ());
|
42 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
43 |
/*
|
44 |
Custom conditionals can be applied by filters.
|
45 |
*/
|
46 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
47 |
if (!($postvars = apply_filters ("ws_plugin__s2member_during_paypal_postvars_conditionals", array (), get_defined_vars ())))
|
48 |
{
|
49 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
74 |
{
|
75 |
foreach ($postvars as $key => $value)
|
76 |
if (preg_match ("/^s2member_/", $key))
|
77 |
+
unset ($postvars[$key]);
|
78 |
/**/
|
79 |
$postback = $postvars; /* Copy. */
|
80 |
$postback["cmd"] = "_notify-validate";
|
86 |
if (!empty ($_GET["s2member_paypal_proxy"]) && !empty ($_GET["s2member_paypal_proxy_verification"]) && $_GET["s2member_paypal_proxy_verification"] === c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen ())
|
87 |
return apply_filters ("ws_plugin__s2member_paypal_postvars", array_merge ($postvars, array ("proxy_verified" => $_GET["s2member_paypal_proxy"])), get_defined_vars ());
|
88 |
/**/
|
89 |
+
else if (empty ($_POST) && !empty ($_GET["s2member_paypal_proxy"]) && !empty ($_GET["s2member_paypal_proxy_verification"]) && c_ws_plugin__s2member_utils_urls::s2member_sig_ok ($_SERVER["REQUEST_URI"], false, false, "s2member_paypal_proxy_verification"))
|
90 |
+
return apply_filters ("ws_plugin__s2member_paypal_postvars", array_merge ($postvars, array ("proxy_verified" => $_GET["s2member_paypal_proxy"])), get_defined_vars ());
|
91 |
+
/**/
|
92 |
else if (trim (strtolower (c_ws_plugin__s2member_utils_urls::remote ("https://" . $endpoint . "/cgi-bin/webscr", $postback, array ("timeout" => 20)))) === "verified")
|
93 |
return apply_filters ("ws_plugin__s2member_paypal_postvars", $postvars, get_defined_vars ());
|
94 |
/**/
|
117 |
{
|
118 |
global $current_site, $current_blog; /* Multisite Networking. */
|
119 |
/**/
|
120 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
121 |
do_action ("ws_plugin__s2member_before_paypal_proxy_key_gen", get_defined_vars ());
|
122 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
123 |
/**/
|
124 |
if (is_multisite () && !is_main_site ())
|
125 |
+
$key = md5 (c_ws_plugin__s2member_utils_encryption::xencrypt ($current_blog->domain . $current_blog->path, false, false));
|
126 |
/**/
|
127 |
else /* Else it's a standard Proxy Key; not on a Multisite Network, or not on the Main Site anyway. */
|
128 |
+
$key = md5 (c_ws_plugin__s2member_utils_encryption::xencrypt (preg_replace ("/\:[0-9]+$/", "", $_SERVER["HTTP_HOST"]), false, false));
|
129 |
/**/
|
130 |
return apply_filters ("ws_plugin__s2member_paypal_proxy_key_gen", $key, get_defined_vars ());
|
131 |
}
|
143 |
*/
|
144 |
public static function paypal_api_response ($post_vars = FALSE)
|
145 |
{
|
146 |
+
global /* For Multisite support. */ $current_site, $current_blog;
|
147 |
/**/
|
148 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
149 |
do_action ("ws_plugin__s2member_before_paypal_api_response", get_defined_vars ());
|
150 |
+
unset /* Unset defined __refs, __v. */ ($__refs, $__v);
|
151 |
/**/
|
152 |
$url = "https://" . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "api-3t.sandbox.paypal.com" : "api-3t.paypal.com") . "/nvp";
|
153 |
/**/
|
154 |
$post_vars = apply_filters ("ws_plugin__s2member_paypal_api_post_vars", $post_vars, get_defined_vars ());
|
155 |
+
$post_vars = (is_array ($post_vars)) ? $post_vars : array ();
|
156 |
/**/
|
157 |
+
$post_vars["VERSION"] = /* Configure the PayPal® API version. */ "71.0";
|
158 |
$post_vars["USER"] = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_username"];
|
159 |
$post_vars["PWD"] = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_password"];
|
160 |
$post_vars["SIGNATURE"] = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_signature"];
|
161 |
/**/
|
162 |
+
$input_time = /* Record input/nvp for logging. */ date ("D M j, Y g:i:s a T");
|
163 |
/**/
|
164 |
$nvp = trim (c_ws_plugin__s2member_utils_urls::remote ($url, $post_vars, array ("timeout" => 20)));
|
165 |
/**/
|
166 |
+
$output_time = /* Now record after output time. */ date ("D M j, Y g:i:s a T");
|
167 |
/**/
|
168 |
+
wp_parse_str /* Parse NVP response. */ ($nvp, $response);
|
169 |
+
$response = c_ws_plugin__s2member_utils_strings::trim_deep ($response);
|
170 |
/**/
|
171 |
if (!$response["ACK"] || !preg_match ("/^(Success|SuccessWithWarning)$/i", $response["ACK"]))
|
172 |
{
|
177 |
else /* Else, generate an error messsage - so something is reported back to the Customer. */
|
178 |
$response["__error"] = _x ("Error. Please contact Support for assistance.", "s2member-front", "s2member");
|
179 |
}
|
180 |
+
/**/
|
|
|
|
|
|
|
181 |
$logv = c_ws_plugin__s2member_utilities::ver_details ();
|
182 |
$logm = c_ws_plugin__s2member_utilities::mem_details ();
|
183 |
$log4 = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . "\nUser-Agent: " . $_SERVER["HTTP_USER_AGENT"];
|
209 |
*/
|
210 |
public static function _paypal_api_response_filters ($response = FALSE)
|
211 |
{
|
212 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
213 |
do_action ("_ws_plugin__s2member_before_paypal_api_response_filters", get_defined_vars ());
|
214 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
215 |
/**/
|
238 |
*/
|
239 |
public static function paypal_pro_term ($term = FALSE)
|
240 |
{
|
241 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
242 |
do_action ("ws_plugin__s2member_before_paypal_pro_term", get_defined_vars ());
|
243 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
244 |
/**/
|
259 |
*/
|
260 |
public static function paypal_std_term ($term = FALSE)
|
261 |
{
|
262 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
263 |
do_action ("ws_plugin__s2member_before_paypal_std_term", get_defined_vars ());
|
264 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
265 |
/**/
|
280 |
*/
|
281 |
public static function paypal_pro_subscr_id ($array_or_string = FALSE)
|
282 |
{
|
283 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
284 |
do_action ("ws_plugin__s2member_before_paypal_pro_subscr_id", get_defined_vars ());
|
285 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
286 |
/**/
|
307 |
*/
|
308 |
public static function paypal_pro_item_number ($array_or_string = FALSE)
|
309 |
{
|
310 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
311 |
do_action ("ws_plugin__s2member_before_paypal_pro_item_number", get_defined_vars ());
|
312 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
313 |
/**/
|
342 |
*/
|
343 |
public static function paypal_pro_item_name ($array_or_string = FALSE)
|
344 |
{
|
345 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
346 |
do_action ("ws_plugin__s2member_before_paypal_pro_item_name", get_defined_vars ());
|
347 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
348 |
/**/
|
376 |
*/
|
377 |
public static function paypal_pro_period1 ($array_or_string = FALSE, $default = "0 D")
|
378 |
{
|
379 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
380 |
do_action ("ws_plugin__s2member_before_paypal_pro_period1", get_defined_vars ());
|
381 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
382 |
/**/
|
397 |
/**/
|
398 |
if (strtoupper ($span) === "SEMIMONTH")
|
399 |
if (is_numeric ($num) && $num >= 1)
|
400 |
+
eval ('$num = "2"; $span = "W";');
|
401 |
/**/
|
402 |
if (strlen ($span) !== 1) /* To Standard format. */
|
403 |
$span = c_ws_plugin__s2member_paypal_utilities::paypal_std_term ($span);
|
429 |
*/
|
430 |
public static function paypal_pro_period3 ($array_or_string = FALSE, $default = "1 D")
|
431 |
{
|
432 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
433 |
do_action ("ws_plugin__s2member_before_paypal_pro_period3", get_defined_vars ());
|
434 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
435 |
/**/
|
450 |
/**/
|
451 |
if (strtoupper ($span) === "SEMIMONTH")
|
452 |
if (is_numeric ($num) && $num >= 1)
|
453 |
+
eval ('$num = "2"; $span = "W";');
|
454 |
/**/
|
455 |
if (strlen ($span) !== 1) /* To Standard format. */
|
456 |
$span = c_ws_plugin__s2member_paypal_utilities::paypal_std_term ($span);
|
includes/classes/profile-in.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_profile_in"))
|
21 |
{
|
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
|
|
33 |
* @package s2Member\Profiles
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @return null Or exits script execution after display.
|
39 |
*/
|
@@ -55,20 +55,20 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
|
|
55 |
/**/
|
56 |
echo '<form method="post" name="ws_plugin__s2member_profile" id="ws-plugin--s2member-profile" action="' . esc_attr (site_url ("/")) . '">' . "\n";
|
57 |
/**/
|
58 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
59 |
do_action ("ws_plugin__s2member_during_profile_before_table", get_defined_vars ());
|
60 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
61 |
/**/
|
62 |
echo '<table cellpadding="0" cellspacing="0">' . "\n";
|
63 |
echo '<tbody>' . "\n";
|
64 |
/**/
|
65 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
66 |
do_action ("ws_plugin__s2member_during_profile_before_fields", get_defined_vars ());
|
67 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
68 |
/**/
|
69 |
if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_username", true, get_defined_vars ()))
|
70 |
{
|
71 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
72 |
do_action ("ws_plugin__s2member_during_profile_during_fields_before_username", get_defined_vars ());
|
73 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
74 |
/**/
|
@@ -76,19 +76,19 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
|
|
76 |
echo '<td>' . "\n";
|
77 |
echo '<label for="ws-plugin--s2member-profile-login">' . "\n";
|
78 |
echo '<strong>' . _x ("Username", "s2member-front", "s2member") . ' *</strong> <small>' . _x ("( cannot be changed )", "s2member-front", "s2member") . '</small><br />' . "\n";
|
79 |
-
echo '<input aria-required="true"
|
80 |
echo '</label>' . "\n";
|
81 |
echo '</td>' . "\n";
|
82 |
echo '</tr>' . "\n";
|
83 |
/**/
|
84 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
85 |
do_action ("ws_plugin__s2member_during_profile_during_fields_after_username", get_defined_vars ());
|
86 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
87 |
}
|
88 |
/**/
|
89 |
if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_email", true, get_defined_vars ()))
|
90 |
{
|
91 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
92 |
do_action ("ws_plugin__s2member_during_profile_during_fields_before_email", get_defined_vars ());
|
93 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
94 |
/**/
|
@@ -96,12 +96,12 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
|
|
96 |
echo '<td>' . "\n";
|
97 |
echo '<label for="ws-plugin--s2member-profile-email">' . "\n";
|
98 |
echo '<strong>' . _x ("Email Address", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
|
99 |
-
echo '<input aria-required="true" data-expected="email"
|
100 |
echo '</label>' . "\n";
|
101 |
echo '</td>' . "\n";
|
102 |
echo '</tr>' . "\n";
|
103 |
/**/
|
104 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
105 |
do_action ("ws_plugin__s2member_during_profile_during_fields_after_email", get_defined_vars ());
|
106 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
107 |
}
|
@@ -110,7 +110,7 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
|
|
110 |
{
|
111 |
if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_first_name", true, get_defined_vars ()))
|
112 |
{
|
113 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
114 |
do_action ("ws_plugin__s2member_during_profile_during_fields_before_first_name", get_defined_vars ());
|
115 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
116 |
/**/
|
@@ -118,19 +118,19 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
|
|
118 |
echo '<td>' . "\n";
|
119 |
echo '<label for="ws-plugin--s2member-profile-first-name">' . "\n";
|
120 |
echo '<strong>' . _x ("First Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
|
121 |
-
echo '<input aria-required="true"
|
122 |
echo '</label>' . "\n";
|
123 |
echo '</td>' . "\n";
|
124 |
echo '</tr>' . "\n";
|
125 |
/**/
|
126 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
127 |
do_action ("ws_plugin__s2member_during_profile_during_fields_after_first_name", get_defined_vars ());
|
128 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
129 |
}
|
130 |
/**/
|
131 |
if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_last_name", true, get_defined_vars ()))
|
132 |
{
|
133 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
134 |
do_action ("ws_plugin__s2member_during_profile_during_fields_before_last_name", get_defined_vars ());
|
135 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
136 |
/**/
|
@@ -138,19 +138,19 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
|
|
138 |
echo '<td>' . "\n";
|
139 |
echo '<label for="ws-plugin--s2member-profile-last-name">' . "\n";
|
140 |
echo '<strong>' . _x ("Last Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
|
141 |
-
echo '<input aria-required="true"
|
142 |
echo '</label>' . "\n";
|
143 |
echo '</td>' . "\n";
|
144 |
echo '</tr>' . "\n";
|
145 |
/**/
|
146 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
147 |
do_action ("ws_plugin__s2member_during_profile_during_fields_after_last_name", get_defined_vars ());
|
148 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
149 |
}
|
150 |
/**/
|
151 |
if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_display_name", true, get_defined_vars ()))
|
152 |
{
|
153 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
154 |
do_action ("ws_plugin__s2member_during_profile_during_fields_before_display_name", get_defined_vars ());
|
155 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
156 |
/**/
|
@@ -158,12 +158,12 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
|
|
158 |
echo '<td>' . "\n";
|
159 |
echo '<label for="ws-plugin--s2member-profile-display-name">' . "\n";
|
160 |
echo '<strong>' . _x ("Display Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
|
161 |
-
echo '<input aria-required="true"
|
162 |
echo '</label>' . "\n";
|
163 |
echo '</td>' . "\n";
|
164 |
echo '</tr>' . "\n";
|
165 |
/**/
|
166 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
167 |
do_action ("ws_plugin__s2member_during_profile_during_fields_after_display_name", get_defined_vars ());
|
168 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
169 |
}
|
@@ -178,13 +178,13 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
|
|
178 |
/**/
|
179 |
$tabindex = $tabindex + 9; /* Start tabindex at +9 ( +1 below ). */
|
180 |
/**/
|
181 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
182 |
do_action ("ws_plugin__s2member_during_profile_during_fields_before_custom_fields", get_defined_vars ());
|
183 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
184 |
/**/
|
185 |
foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
|
186 |
{
|
187 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
188 |
do_action ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_before", get_defined_vars ());
|
189 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
190 |
/**/
|
@@ -193,7 +193,7 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
|
|
193 |
$field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
|
194 |
$field_id_class = preg_replace ("/_/", "-", $field_var);
|
195 |
/**/
|
196 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
197 |
if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_display", true, get_defined_vars ()))
|
198 |
{
|
199 |
if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
|
@@ -210,12 +210,12 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
|
|
210 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
211 |
}
|
212 |
/**/
|
213 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
214 |
do_action ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_after", get_defined_vars ());
|
215 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
216 |
}
|
217 |
/**/
|
218 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
219 |
do_action ("ws_plugin__s2member_during_profile_during_fields_after_custom_fields", get_defined_vars ());
|
220 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
221 |
}
|
@@ -223,7 +223,7 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
|
|
223 |
/**/
|
224 |
if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_password", true, get_defined_vars ()))
|
225 |
{
|
226 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
227 |
do_action ("ws_plugin__s2member_during_profile_during_fields_before_password", get_defined_vars ());
|
228 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
229 |
/**/
|
@@ -245,26 +245,26 @@ if (!class_exists ("c_ws_plugin__s2member_profile_in"))
|
|
245 |
echo '</td>' . "\n";
|
246 |
echo '</tr>' . "\n";
|
247 |
/**/
|
248 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
249 |
do_action ("ws_plugin__s2member_during_profile_during_fields_after_password", get_defined_vars ());
|
250 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
251 |
}
|
252 |
/**/
|
253 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
254 |
do_action ("ws_plugin__s2member_during_profile_after_fields", get_defined_vars ());
|
255 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
256 |
/**/
|
257 |
echo '<tr>' . "\n";
|
258 |
echo '<td>' . "\n";
|
259 |
echo '<input type="hidden" name="ws_plugin__s2member_profile_save" id="ws-plugin--s2member-profile-save" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-profile-save")) . '" />' . "\n";
|
260 |
-
echo '<input id="ws-plugin--s2member-profile-submit"
|
261 |
echo '</td>' . "\n";
|
262 |
echo '</tr>' . "\n";
|
263 |
/**/
|
264 |
echo '</tbody>' . "\n";
|
265 |
echo '</table>' . "\n";
|
266 |
/**/
|
267 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
268 |
do_action ("ws_plugin__s2member_during_profile_after_table", get_defined_vars ());
|
269 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
270 |
/**/
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit ("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_profile_in"))
|
21 |
{
|
33 |
* @package s2Member\Profiles
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("init");``
|
37 |
*
|
38 |
* @return null Or exits script execution after display.
|
39 |
*/
|
55 |
/**/
|
56 |
echo '<form method="post" name="ws_plugin__s2member_profile" id="ws-plugin--s2member-profile" action="' . esc_attr (site_url ("/")) . '">' . "\n";
|
57 |
/**/
|
58 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
59 |
do_action ("ws_plugin__s2member_during_profile_before_table", get_defined_vars ());
|
60 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
61 |
/**/
|
62 |
echo '<table cellpadding="0" cellspacing="0">' . "\n";
|
63 |
echo '<tbody>' . "\n";
|
64 |
/**/
|
65 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
66 |
do_action ("ws_plugin__s2member_during_profile_before_fields", get_defined_vars ());
|
67 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
68 |
/**/
|
69 |
if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_username", true, get_defined_vars ()))
|
70 |
{
|
71 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
72 |
do_action ("ws_plugin__s2member_during_profile_during_fields_before_username", get_defined_vars ());
|
73 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
74 |
/**/
|
76 |
echo '<td>' . "\n";
|
77 |
echo '<label for="ws-plugin--s2member-profile-login">' . "\n";
|
78 |
echo '<strong>' . _x ("Username", "s2member-front", "s2member") . ' *</strong> <small>' . _x ("( cannot be changed )", "s2member-front", "s2member") . '</small><br />' . "\n";
|
79 |
+
echo '<input type="text" aria-required="true" maxlength="60" autocomplete="off" name="ws_plugin__s2member_profile_login" id="ws-plugin--s2member-profile-login" class="ws-plugin--s2member-profile-field" value="' . format_to_edit ($user->user_login) . '" disabled="disabled" />' . "\n";
|
80 |
echo '</label>' . "\n";
|
81 |
echo '</td>' . "\n";
|
82 |
echo '</tr>' . "\n";
|
83 |
/**/
|
84 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
85 |
do_action ("ws_plugin__s2member_during_profile_during_fields_after_username", get_defined_vars ());
|
86 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
87 |
}
|
88 |
/**/
|
89 |
if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_email", true, get_defined_vars ()))
|
90 |
{
|
91 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
92 |
do_action ("ws_plugin__s2member_during_profile_during_fields_before_email", get_defined_vars ());
|
93 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
94 |
/**/
|
96 |
echo '<td>' . "\n";
|
97 |
echo '<label for="ws-plugin--s2member-profile-email">' . "\n";
|
98 |
echo '<strong>' . _x ("Email Address", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
|
99 |
+
echo '<input type="text" aria-required="true" data-expected="email" maxlength="100" autocomplete="off" name="ws_plugin__s2member_profile_email" id="ws-plugin--s2member-profile-email" class="ws-plugin--s2member-profile-field" value="' . format_to_edit ($user->user_email) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
|
100 |
echo '</label>' . "\n";
|
101 |
echo '</td>' . "\n";
|
102 |
echo '</tr>' . "\n";
|
103 |
/**/
|
104 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
105 |
do_action ("ws_plugin__s2member_during_profile_during_fields_after_email", get_defined_vars ());
|
106 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
107 |
}
|
110 |
{
|
111 |
if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_first_name", true, get_defined_vars ()))
|
112 |
{
|
113 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
114 |
do_action ("ws_plugin__s2member_during_profile_during_fields_before_first_name", get_defined_vars ());
|
115 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
116 |
/**/
|
118 |
echo '<td>' . "\n";
|
119 |
echo '<label for="ws-plugin--s2member-profile-first-name">' . "\n";
|
120 |
echo '<strong>' . _x ("First Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
|
121 |
+
echo '<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="ws_plugin__s2member_profile_first_name" id="ws-plugin--s2member-profile-first-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->first_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
|
122 |
echo '</label>' . "\n";
|
123 |
echo '</td>' . "\n";
|
124 |
echo '</tr>' . "\n";
|
125 |
/**/
|
126 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
127 |
do_action ("ws_plugin__s2member_during_profile_during_fields_after_first_name", get_defined_vars ());
|
128 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
129 |
}
|
130 |
/**/
|
131 |
if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_last_name", true, get_defined_vars ()))
|
132 |
{
|
133 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
134 |
do_action ("ws_plugin__s2member_during_profile_during_fields_before_last_name", get_defined_vars ());
|
135 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
136 |
/**/
|
138 |
echo '<td>' . "\n";
|
139 |
echo '<label for="ws-plugin--s2member-profile-last-name">' . "\n";
|
140 |
echo '<strong>' . _x ("Last Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
|
141 |
+
echo '<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="ws_plugin__s2member_profile_last_name" id="ws-plugin--s2member-profile-last-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->last_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
|
142 |
echo '</label>' . "\n";
|
143 |
echo '</td>' . "\n";
|
144 |
echo '</tr>' . "\n";
|
145 |
/**/
|
146 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
147 |
do_action ("ws_plugin__s2member_during_profile_during_fields_after_last_name", get_defined_vars ());
|
148 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
149 |
}
|
150 |
/**/
|
151 |
if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_display_name", true, get_defined_vars ()))
|
152 |
{
|
153 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
154 |
do_action ("ws_plugin__s2member_during_profile_during_fields_before_display_name", get_defined_vars ());
|
155 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
156 |
/**/
|
158 |
echo '<td>' . "\n";
|
159 |
echo '<label for="ws-plugin--s2member-profile-display-name">' . "\n";
|
160 |
echo '<strong>' . _x ("Display Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
|
161 |
+
echo '<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="ws_plugin__s2member_profile_display_name" id="ws-plugin--s2member-profile-display-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->display_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
|
162 |
echo '</label>' . "\n";
|
163 |
echo '</td>' . "\n";
|
164 |
echo '</tr>' . "\n";
|
165 |
/**/
|
166 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
167 |
do_action ("ws_plugin__s2member_during_profile_during_fields_after_display_name", get_defined_vars ());
|
168 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
169 |
}
|
178 |
/**/
|
179 |
$tabindex = $tabindex + 9; /* Start tabindex at +9 ( +1 below ). */
|
180 |
/**/
|
181 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
182 |
do_action ("ws_plugin__s2member_during_profile_during_fields_before_custom_fields", get_defined_vars ());
|
183 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
184 |
/**/
|
185 |
foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
|
186 |
{
|
187 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
188 |
do_action ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_before", get_defined_vars ());
|
189 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
190 |
/**/
|
193 |
$field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
|
194 |
$field_id_class = preg_replace ("/_/", "-", $field_var);
|
195 |
/**/
|
196 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
197 |
if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_display", true, get_defined_vars ()))
|
198 |
{
|
199 |
if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
|
210 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
211 |
}
|
212 |
/**/
|
213 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
214 |
do_action ("ws_plugin__s2member_during_profile_during_fields_during_custom_fields_after", get_defined_vars ());
|
215 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
216 |
}
|
217 |
/**/
|
218 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
219 |
do_action ("ws_plugin__s2member_during_profile_during_fields_after_custom_fields", get_defined_vars ());
|
220 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
221 |
}
|
223 |
/**/
|
224 |
if (apply_filters ("ws_plugin__s2member_during_profile_during_fields_display_password", true, get_defined_vars ()))
|
225 |
{
|
226 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
227 |
do_action ("ws_plugin__s2member_during_profile_during_fields_before_password", get_defined_vars ());
|
228 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
229 |
/**/
|
245 |
echo '</td>' . "\n";
|
246 |
echo '</tr>' . "\n";
|
247 |
/**/
|
248 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
249 |
do_action ("ws_plugin__s2member_during_profile_during_fields_after_password", get_defined_vars ());
|
250 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
251 |
}
|
252 |
/**/
|
253 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
254 |
do_action ("ws_plugin__s2member_during_profile_after_fields", get_defined_vars ());
|
255 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
256 |
/**/
|
257 |
echo '<tr>' . "\n";
|
258 |
echo '<td>' . "\n";
|
259 |
echo '<input type="hidden" name="ws_plugin__s2member_profile_save" id="ws-plugin--s2member-profile-save" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-profile-save")) . '" />' . "\n";
|
260 |
+
echo '<input type="submit" id="ws-plugin--s2member-profile-submit" value="' . esc_attr (_x ("Save All Changes", "s2member-front", "s2member")) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
|
261 |
echo '</td>' . "\n";
|
262 |
echo '</tr>' . "\n";
|
263 |
/**/
|
264 |
echo '</tbody>' . "\n";
|
265 |
echo '</table>' . "\n";
|
266 |
/**/
|
267 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
268 |
do_action ("ws_plugin__s2member_during_profile_after_table", get_defined_vars ());
|
269 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
270 |
/**/
|
includes/classes/profile-mods-4bp-in.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_profile_mods_4bp_in"))
|
|
33 |
* @package s2Member\Profiles
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @return null After re-configuring the ``$current_user`` object.
|
39 |
*/
|
33 |
* @package s2Member\Profiles
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("init");``
|
37 |
*
|
38 |
* @return null After re-configuring the ``$current_user`` object.
|
39 |
*/
|
includes/classes/profile-mods-4bp.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_profile_mods_4bp"))
|
|
33 |
* @package s2Member\Profiles
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @return null|inner Return-value of inner routine.
|
39 |
*/
|
33 |
* @package s2Member\Profiles
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("init");``
|
37 |
*
|
38 |
* @return null|inner Return-value of inner routine.
|
39 |
*/
|
includes/classes/profile-mods-in.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_profile_mods_in"))
|
|
33 |
* @package s2Member\Profiles
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @return null After re-configuring the ``$current_user`` object.
|
39 |
* May also exit script execution when handling the Stand-Alone Profile Modification Form.
|
33 |
* @package s2Member\Profiles
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("init");``
|
37 |
*
|
38 |
* @return null After re-configuring the ``$current_user`` object.
|
39 |
* May also exit script execution when handling the Stand-Alone Profile Modification Form.
|
includes/classes/profile-mods.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_profile_mods"))
|
|
33 |
* @package s2Member\Profiles
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @return null|inner Return-value of inner routine.
|
39 |
*/
|
33 |
* @package s2Member\Profiles
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("init");``
|
37 |
*
|
38 |
* @return null|inner Return-value of inner routine.
|
39 |
*/
|
includes/classes/profile.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_profile"))
|
|
33 |
* @package s2Member\Profiles
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @return null|inner Return-value of inner routine.
|
39 |
*/
|
33 |
* @package s2Member\Profiles
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("init");``
|
37 |
*
|
38 |
* @return null|inner Return-value of inner routine.
|
39 |
*/
|
includes/classes/querys.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_querys"))
|
21 |
{
|
@@ -52,13 +52,13 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
|
|
52 |
*/
|
53 |
public static function force_query_level_access (&$wp_query = FALSE)
|
54 |
{
|
55 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
56 |
do_action ("ws_plugin__s2member_before_force_query_level_access", get_defined_vars ());
|
57 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
58 |
/**/
|
59 |
c_ws_plugin__s2member_querys::query_level_access ($wp_query, true);
|
60 |
/**/
|
61 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
62 |
do_action ("ws_plugin__s2member_after_force_query_level_access", get_defined_vars ());
|
63 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
64 |
/**/
|
@@ -82,6 +82,8 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
|
|
82 |
*
|
83 |
* @todo For improved reliability, modify other query vars associated with exclusions/inclusions. Like `tag_slug__in`?
|
84 |
* See: {@link http://codex.wordpress.org/Class_Reference/WP_Query#Parameters WP_Query#Parameters}
|
|
|
|
|
85 |
*/
|
86 |
public static function query_level_access (&$wp_query = FALSE, $force = FALSE)
|
87 |
{
|
@@ -89,7 +91,7 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
|
|
89 |
static $initial_query = true; /* Tracks the initial query. */
|
90 |
c_ws_plugin__s2member_querys::$current_wp_query = &$wp_query;
|
91 |
/**/
|
92 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
93 |
do_action ("ws_plugin__s2member_before_query_level_access", get_defined_vars ());
|
94 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
95 |
/**/
|
@@ -117,124 +119,128 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
|
|
117 |
if (in_array ("wp_get_nav_menu_items", ($callers = (isset ($callers) ? $callers : c_ws_plugin__s2member_utilities::callers ()))))
|
118 |
add_filter ("wp_get_nav_menu_items", "c_ws_plugin__s2member_querys::_query_level_access_navs", 100);
|
119 |
/**/
|
120 |
-
if ((is_user_logged_in () && is_object ($user = wp_get_current_user ()) && ($user_id = $user->ID)) || !($user = false))
|
121 |
{
|
122 |
-
if (!$user && ($
|
123 |
{
|
124 |
-
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), array ($
|
125 |
-
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), array ($
|
126 |
}
|
127 |
/**/
|
128 |
-
if (!$user && ($
|
129 |
{
|
130 |
-
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), array ($
|
131 |
-
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), array ($
|
132 |
}
|
133 |
/**/
|
134 |
-
if (is_array ($
|
135 |
{
|
136 |
-
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $
|
137 |
-
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), $
|
138 |
}
|
139 |
/**/
|
140 |
-
if (is_array ($
|
141 |
{
|
142 |
-
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $
|
143 |
-
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), $
|
144 |
}
|
|
|
145 |
/**/
|
146 |
for ($n = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n >= 0; $n--) /* Category Level Restrictions. */
|
147 |
{
|
148 |
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_catgs"] === "all" && (!$user || !current_user_can ("access_s2member_level" . $n)))
|
149 |
{
|
150 |
$wp_query->set ("category__in", array ()); /* Include no other Categories. */
|
151 |
-
$wp_query->set ("category__not_in", ($
|
152 |
-
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), ($
|
153 |
-
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $
|
154 |
break; /* All Categories will be locked down. */
|
155 |
}
|
156 |
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_catgs"] && (!$user || !current_user_can ("access_s2member_level" . $n)))
|
157 |
{
|
158 |
-
foreach (($
|
159 |
-
$
|
160 |
/**/
|
161 |
-
$wp_query->set ("category__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("category__in")), $
|
162 |
-
$wp_query->set ("category__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("category__not_in")), $
|
163 |
-
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), ($
|
164 |
-
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $
|
165 |
}
|
166 |
}
|
|
|
167 |
/**/
|
168 |
for ($n = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n >= 0; $n--) /* Tag Level Restrictions. */
|
169 |
{
|
170 |
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_ptags"] === "all" && (!$user || !current_user_can ("access_s2member_level" . $n)))
|
171 |
{
|
172 |
$wp_query->set ("tag__in", array ()); /* Include no other Tags. */
|
173 |
-
$wp_query->set ("tag__not_in", ($
|
174 |
-
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), ($
|
175 |
-
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $
|
176 |
break; /* ALL Tags will be locked down. */
|
177 |
}
|
178 |
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_ptags"] && (!$user || !current_user_can ("access_s2member_level" . $n)))
|
179 |
{
|
180 |
-
$
|
181 |
/**/
|
182 |
-
$wp_query->set ("tag__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("tag__in")), $
|
183 |
-
$wp_query->set ("tag__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("tag__not_in")), $
|
184 |
-
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), ($
|
185 |
-
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $
|
186 |
}
|
187 |
}
|
|
|
188 |
/**/
|
189 |
for ($n = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n >= 0; $n--) /* Post Level Restrictions. */
|
190 |
{
|
191 |
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"] === "all" && (!$user || !current_user_can ("access_s2member_level" . $n)))
|
192 |
{
|
193 |
-
$wp_query->set ("post__in", array ())
|
194 |
-
$wp_query->set ("post__not_in",
|
195 |
break; /* ALL Posts will be locked down. */
|
196 |
}
|
197 |
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"] && (!$user || !current_user_can ("access_s2member_level" . $n)))
|
198 |
{
|
199 |
-
foreach (($
|
200 |
-
if (strpos ($
|
201 |
-
if (is_array ($
|
202 |
-
$
|
203 |
-
unset /* A little housekeeping here. */ ($p, $m, $p_of_type);
|
204 |
/**/
|
205 |
-
$
|
206 |
/**/
|
207 |
-
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $
|
208 |
-
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), $
|
209 |
}
|
210 |
}
|
|
|
211 |
/**/
|
212 |
for ($n = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n >= 0; $n--) /* Page Level Restrictions. */
|
213 |
{
|
214 |
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"] === "all" && (!$user || !current_user_can ("access_s2member_level" . $n)))
|
215 |
{
|
216 |
-
$wp_query->set ("post__in", array ())
|
217 |
-
$wp_query->set ("post__not_in",
|
218 |
break; /* ALL Pages will be locked down. */
|
219 |
}
|
220 |
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"] && (!$user || !current_user_can ("access_s2member_level" . $n)))
|
221 |
{
|
222 |
-
$
|
223 |
/**/
|
224 |
-
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $
|
225 |
-
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), $
|
226 |
}
|
227 |
}
|
|
|
228 |
}
|
229 |
/**/
|
230 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
231 |
do_action ("ws_plugin__s2member_during_query_level_access", get_defined_vars ());
|
232 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
233 |
}
|
234 |
}
|
235 |
}
|
236 |
/**/
|
237 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
238 |
do_action ("ws_plugin__s2member_after_query_level_access", get_defined_vars ());
|
239 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
240 |
/**/
|
@@ -258,7 +264,7 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
|
|
258 |
{
|
259 |
global $wpdb; /* Need this global DB object reference here. */
|
260 |
/**/
|
261 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
262 |
do_action ("_ws_plugin__s2member_before_query_level_access_sys", get_defined_vars ());
|
263 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
264 |
/**/
|
@@ -271,12 +277,12 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
|
|
271 |
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), $s)));
|
272 |
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $s)));
|
273 |
/**/
|
274 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
275 |
do_action ("_ws_plugin__s2member_during_query_level_access_sys", get_defined_vars ());
|
276 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
277 |
}
|
278 |
/**/
|
279 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
280 |
do_action ("_ws_plugin__s2member_after_query_level_access_sys", get_defined_vars ());
|
281 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
282 |
/**/
|
@@ -309,8 +315,8 @@ if (!class_exists ("c_ws_plugin__s2member_querys"))
|
|
309 |
{
|
310 |
foreach ($items as $child_key => $child_item /* Loop back through all ``$items``, looking for children. */)
|
311 |
if (!empty ($child_item->menu_item_parent) && (int)$child_item->menu_item_parent === (int)$item->ID)
|
312 |
-
unset /* Remove this ``$child_item``, belonging to an excluded parent. */($items[$child_key]);
|
313 |
-
unset /* Exclude the parent ``$item`` now. */($items[$key]);
|
314 |
}
|
315 |
}
|
316 |
remove_filter ("wp_get_nav_menu_items", "c_ws_plugin__s2member_querys::_query_level_access_navs", 100);
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit ("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_querys"))
|
21 |
{
|
52 |
*/
|
53 |
public static function force_query_level_access (&$wp_query = FALSE)
|
54 |
{
|
55 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
56 |
do_action ("ws_plugin__s2member_before_force_query_level_access", get_defined_vars ());
|
57 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
58 |
/**/
|
59 |
c_ws_plugin__s2member_querys::query_level_access ($wp_query, true);
|
60 |
/**/
|
61 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
62 |
do_action ("ws_plugin__s2member_after_force_query_level_access", get_defined_vars ());
|
63 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
64 |
/**/
|
82 |
*
|
83 |
* @todo For improved reliability, modify other query vars associated with exclusions/inclusions. Like `tag_slug__in`?
|
84 |
* See: {@link http://codex.wordpress.org/Class_Reference/WP_Query#Parameters WP_Query#Parameters}
|
85 |
+
* @todo Make it possible to force filtering, even when used in combination with Query Conditionals and ``get_posts()``, which auto-supresses.
|
86 |
+
* Or, perhaps strengthen the existing ``$force`` parameter in this regard.
|
87 |
*/
|
88 |
public static function query_level_access (&$wp_query = FALSE, $force = FALSE)
|
89 |
{
|
91 |
static $initial_query = true; /* Tracks the initial query. */
|
92 |
c_ws_plugin__s2member_querys::$current_wp_query = &$wp_query;
|
93 |
/**/
|
94 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
95 |
do_action ("ws_plugin__s2member_before_query_level_access", get_defined_vars ());
|
96 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
97 |
/**/
|
119 |
if (in_array ("wp_get_nav_menu_items", ($callers = (isset ($callers) ? $callers : c_ws_plugin__s2member_utilities::callers ()))))
|
120 |
add_filter ("wp_get_nav_menu_items", "c_ws_plugin__s2member_querys::_query_level_access_navs", 100);
|
121 |
/**/
|
122 |
+
if ((is_user_logged_in () && is_object ($user = wp_get_current_user ()) && !empty ($user->ID) && ($user_id = $user->ID)) || !($user = false))
|
123 |
{
|
124 |
+
if (!$user && ($_lwp = (int)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"]))
|
125 |
{
|
126 |
+
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), array ($_lwp))));
|
127 |
+
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), array ($_lwp))));
|
128 |
}
|
129 |
/**/
|
130 |
+
if (!$user && ($_dep = (int)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"]))
|
131 |
{
|
132 |
+
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), array ($_dep))));
|
133 |
+
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), array ($_dep))));
|
134 |
}
|
135 |
/**/
|
136 |
+
if (is_array ($_ccaps = c_ws_plugin__s2member_utils_gets::get_unavailable_singular_ids_with_ccaps ($user)) && !empty ($_ccaps))
|
137 |
{
|
138 |
+
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $_ccaps)));
|
139 |
+
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), $_ccaps)));
|
140 |
}
|
141 |
/**/
|
142 |
+
if (is_array ($_sps = c_ws_plugin__s2member_utils_gets::get_unavailable_singular_ids_with_sp ()) && !empty ($_sps))
|
143 |
{
|
144 |
+
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $_sps)));
|
145 |
+
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), $_sps)));
|
146 |
}
|
147 |
+
unset /* A little housekeeping here. Ditch these temporary variables. */ ($_lwp, $_dep, $_ccaps, $_sps);
|
148 |
/**/
|
149 |
for ($n = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n >= 0; $n--) /* Category Level Restrictions. */
|
150 |
{
|
151 |
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_catgs"] === "all" && (!$user || !current_user_can ("access_s2member_level" . $n)))
|
152 |
{
|
153 |
$wp_query->set ("category__in", array ()); /* Include no other Categories. */
|
154 |
+
$wp_query->set ("category__not_in", ($_catgs = c_ws_plugin__s2member_utils_gets::get_all_category_ids ()));
|
155 |
+
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), ($_singulars = c_ws_plugin__s2member_utils_gets::get_singular_ids_in_terms ($_catgs)))));
|
156 |
+
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $_singulars)));
|
157 |
break; /* All Categories will be locked down. */
|
158 |
}
|
159 |
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_catgs"] && (!$user || !current_user_can ("access_s2member_level" . $n)))
|
160 |
{
|
161 |
+
foreach (($_catgs = preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_catgs"])) as $_catg)
|
162 |
+
$_catgs = array_merge ($_catgs, c_ws_plugin__s2member_utils_gets::get_all_child_category_ids ($_catg));
|
163 |
/**/
|
164 |
+
$wp_query->set ("category__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("category__in")), $_catgs)));
|
165 |
+
$wp_query->set ("category__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("category__not_in")), $_catgs)));
|
166 |
+
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), ($_singulars = c_ws_plugin__s2member_utils_gets::get_singular_ids_in_terms ($_catgs)))));
|
167 |
+
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $_singulars)));
|
168 |
}
|
169 |
}
|
170 |
+
unset /* A little housekeeping here. Ditch these temporary variables. */ ($_catgs, $_catg, $_singulars);
|
171 |
/**/
|
172 |
for ($n = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n >= 0; $n--) /* Tag Level Restrictions. */
|
173 |
{
|
174 |
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_ptags"] === "all" && (!$user || !current_user_can ("access_s2member_level" . $n)))
|
175 |
{
|
176 |
$wp_query->set ("tag__in", array ()); /* Include no other Tags. */
|
177 |
+
$wp_query->set ("tag__not_in", ($_tags = c_ws_plugin__s2member_utils_gets::get_all_tag_ids ()));
|
178 |
+
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), ($_singulars = c_ws_plugin__s2member_utils_gets::get_singular_ids_in_terms ($_tags)))));
|
179 |
+
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $_singulars)));
|
180 |
break; /* ALL Tags will be locked down. */
|
181 |
}
|
182 |
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_ptags"] && (!$user || !current_user_can ("access_s2member_level" . $n)))
|
183 |
{
|
184 |
+
$_tags = c_ws_plugin__s2member_utils_gets::get_tags_converted_to_ids ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_ptags"]);
|
185 |
/**/
|
186 |
+
$wp_query->set ("tag__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("tag__in")), $_tags)));
|
187 |
+
$wp_query->set ("tag__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("tag__not_in")), $_tags)));
|
188 |
+
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), ($_singulars = c_ws_plugin__s2member_utils_gets::get_singular_ids_in_terms ($_tags)))));
|
189 |
+
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $_singulars)));
|
190 |
}
|
191 |
}
|
192 |
+
unset /* A little housekeeping here. Ditch these temporary variables. */ ($_tags, $_tag, $_singulars);
|
193 |
/**/
|
194 |
for ($n = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n >= 0; $n--) /* Post Level Restrictions. */
|
195 |
{
|
196 |
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"] === "all" && (!$user || !current_user_can ("access_s2member_level" . $n)))
|
197 |
{
|
198 |
+
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), ($_posts = c_ws_plugin__s2member_utils_gets::get_all_post_ids ()))));
|
199 |
+
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), $_posts)));
|
200 |
break; /* ALL Posts will be locked down. */
|
201 |
}
|
202 |
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"] && (!$user || !current_user_can ("access_s2member_level" . $n)))
|
203 |
{
|
204 |
+
foreach (($_posts = preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"])) as $_p)
|
205 |
+
if (strpos ($_p, "all-") === 0 && preg_match ("/^all-(.+)$/", $_p, $_m) /* Protecting `all-` of a specific Post Type? */)
|
206 |
+
if (is_array ($_p_of_type = c_ws_plugin__s2member_utils_gets::get_all_post_ids ($_m[1])) && !empty ($_p_of_type))
|
207 |
+
$_posts = array_merge /* Merge all Posts of this Post Type. */ ($_posts, $_p_of_type);
|
|
|
208 |
/**/
|
209 |
+
$_posts = array_unique ( /* Force integers. */c_ws_plugin__s2member_utils_arrays::force_integers ($_posts));
|
210 |
/**/
|
211 |
+
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $_posts)));
|
212 |
+
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), $_posts)));
|
213 |
}
|
214 |
}
|
215 |
+
unset /* A little housekeeping here. Ditch these temporary variables. */ ($_posts, $_p, $_m, $_p_of_type);
|
216 |
/**/
|
217 |
for ($n = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n >= 0; $n--) /* Page Level Restrictions. */
|
218 |
{
|
219 |
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"] === "all" && (!$user || !current_user_can ("access_s2member_level" . $n)))
|
220 |
{
|
221 |
+
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), ($_pages = c_ws_plugin__s2member_utils_gets::get_all_page_ids ()))));
|
222 |
+
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), $_pages)));
|
223 |
break; /* ALL Pages will be locked down. */
|
224 |
}
|
225 |
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"] && (!$user || !current_user_can ("access_s2member_level" . $n)))
|
226 |
{
|
227 |
+
$_pages = c_ws_plugin__s2member_utils_arrays::force_integers (preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"]));
|
228 |
/**/
|
229 |
+
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $_pages)));
|
230 |
+
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), $_pages)));
|
231 |
}
|
232 |
}
|
233 |
+
unset /* A little housekeeping here. Ditch these temporary variables. */ ($_pages);
|
234 |
}
|
235 |
/**/
|
236 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
237 |
do_action ("ws_plugin__s2member_during_query_level_access", get_defined_vars ());
|
238 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
239 |
}
|
240 |
}
|
241 |
}
|
242 |
/**/
|
243 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
244 |
do_action ("ws_plugin__s2member_after_query_level_access", get_defined_vars ());
|
245 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
246 |
/**/
|
264 |
{
|
265 |
global $wpdb; /* Need this global DB object reference here. */
|
266 |
/**/
|
267 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
268 |
do_action ("_ws_plugin__s2member_before_query_level_access_sys", get_defined_vars ());
|
269 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
270 |
/**/
|
277 |
$wp_query->set ("post__not_in", array_unique (array_merge (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__not_in")), $s)));
|
278 |
$wp_query->set ("post__in", array_unique (array_diff (c_ws_plugin__s2member_utils_arrays::force_integers ((array)$wp_query->get ("post__in")), $s)));
|
279 |
/**/
|
280 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
281 |
do_action ("_ws_plugin__s2member_during_query_level_access_sys", get_defined_vars ());
|
282 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
283 |
}
|
284 |
/**/
|
285 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
286 |
do_action ("_ws_plugin__s2member_after_query_level_access_sys", get_defined_vars ());
|
287 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
288 |
/**/
|
315 |
{
|
316 |
foreach ($items as $child_key => $child_item /* Loop back through all ``$items``, looking for children. */)
|
317 |
if (!empty ($child_item->menu_item_parent) && (int)$child_item->menu_item_parent === (int)$item->ID)
|
318 |
+
unset /* Remove this ``$child_item``, belonging to an excluded parent. */ ($items[$child_key]);
|
319 |
+
unset /* Exclude the parent ``$item`` now. */ ($items[$key]);
|
320 |
}
|
321 |
}
|
322 |
remove_filter ("wp_get_nav_menu_items", "c_ws_plugin__s2member_querys::_query_level_access_navs", 100);
|
includes/classes/register-access.inc.php
CHANGED
@@ -64,7 +64,7 @@ if (!class_exists ("c_ws_plugin__s2member_register_access"))
|
|
64 |
* @package s2Member\Registrations
|
65 |
* @since 3.5
|
66 |
*
|
67 |
-
* @attaches-to
|
68 |
*
|
69 |
* @return null Exits script execution after output is generated for AJAX caller.
|
70 |
*/
|
64 |
* @package s2Member\Registrations
|
65 |
* @since 3.5
|
66 |
*
|
67 |
+
* @attaches-to ``add_action("wp_ajax_ws_plugin__s2member_reg_access_link_via_ajax");``
|
68 |
*
|
69 |
* @return null Exits script execution after output is generated for AJAX caller.
|
70 |
*/
|
includes/classes/register-in.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_register_in"))
|
|
33 |
* @package s2Member\Registrations
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @return null Or exits script execution after redirection.
|
39 |
*/
|
33 |
* @package s2Member\Registrations
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("init");``
|
37 |
*
|
38 |
* @return null Or exits script execution after redirection.
|
39 |
*/
|
includes/classes/register.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_register"))
|
|
33 |
* @package s2Member\Registrations
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @return null|inner Return-value of inner routine.
|
39 |
*/
|
33 |
* @package s2Member\Registrations
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("init");``
|
37 |
*
|
38 |
* @return null|inner Return-value of inner routine.
|
39 |
*/
|
includes/classes/registration-times.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_registration_times"))
|
|
33 |
* @package s2Member\Registrations
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @param int|str $user_id A numeric WordPress® User ID should be passed in by the Action Hook.
|
39 |
* @param str $role A WordPress® Role ID/Name should be passed in by the Action Hook.
|
33 |
* @package s2Member\Registrations
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("set_user_role");``
|
37 |
*
|
38 |
* @param int|str $user_id A numeric WordPress® User ID should be passed in by the Action Hook.
|
39 |
* @param str $role A WordPress® Role ID/Name should be passed in by the Action Hook.
|
includes/classes/registrations.inc.php
CHANGED
@@ -36,7 +36,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
|
|
36 |
* @package s2Member\Registrations
|
37 |
* @since 3.5
|
38 |
*
|
39 |
-
* @attaches-to
|
40 |
*
|
41 |
* @param str $password Expects a plain text Password passed through by the Filter.
|
42 |
* @return str Password, possibly assigned through s2Member Custom Registration/Profile Field input.
|
@@ -72,7 +72,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
|
|
72 |
* @package s2Member\Registrations
|
73 |
* @since 3.5
|
74 |
*
|
75 |
-
* @attaches-to
|
76 |
*
|
77 |
* @param array $result Expects a ``$result`` array to be passed through by the Filter.
|
78 |
* @return array The Filtered ``$result`` array. Possibly containing errors introduced by s2Member.
|
@@ -106,7 +106,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
|
|
106 |
* @package s2Member\Registrations
|
107 |
* @since 3.5
|
108 |
*
|
109 |
-
* @attaches-to
|
110 |
*
|
111 |
* @return null
|
112 |
*/
|
@@ -139,8 +139,8 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
|
|
139 |
* @package s2Member\Registrations
|
140 |
* @since 3.5
|
141 |
*
|
142 |
-
* @attaches-to
|
143 |
-
* @attaches-to
|
144 |
*
|
145 |
* @param array $meta Expects an array of meta-data to be passed in by the Filter.
|
146 |
* @return array Full ``$meta`` array with s2Member Custom Fields included.
|
@@ -182,7 +182,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
|
|
182 |
* @package s2Member\Registrations
|
183 |
* @since 3.5
|
184 |
*
|
185 |
-
* @attaches-to
|
186 |
*
|
187 |
* @param obj $_error Expects a `WP_Error` object to be passed through by the Filter.
|
188 |
* @param array $vars Expects the defined variables from the scope of the calling Filter.
|
@@ -225,7 +225,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
|
|
225 |
* @package s2Member\Registrations
|
226 |
* @since 3.5
|
227 |
*
|
228 |
-
* @attaches-to
|
229 |
*
|
230 |
* @param int|str $user_id A numeric WordPress® User ID.
|
231 |
* @param str $password Plain text Password should be passed through by the Action Hook.
|
@@ -243,7 +243,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
|
|
243 |
if (is_multisite ()) /* This event should ONLY be processed with Multisite Networking. */
|
244 |
if ((is_blog_admin () && $pagenow === "user-new.php" && isset ($_POST["noconfirmation"])) || (!is_admin () && ((preg_match ("/\/wp-activate\.php/", $_SERVER["REQUEST_URI"])) || (c_ws_plugin__s2member_utils_conds::bp_is_installed () && bp_is_activation_page ()))))
|
245 |
{
|
246 |
-
c_ws_plugin__s2member_registrations::configure_user_registration ($user_id, $password, ((isset ($meta["s2member_ms_signup_meta"])) ? $meta["s2member_ms_signup_meta"] :
|
247 |
delete_user_meta ($user_id, "s2member_ms_signup_meta");
|
248 |
}
|
249 |
/**/
|
@@ -264,7 +264,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
|
|
264 |
* @package s2Member\Registrations
|
265 |
* @since 3.5
|
266 |
*
|
267 |
-
* @attaches-to
|
268 |
*
|
269 |
* @param int|str $blog_id A numeric WordPress® Blog ID.
|
270 |
* @param int|str $user_id A numeric WordPress® User ID.
|
@@ -282,7 +282,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
|
|
282 |
if (is_multisite ()) /* This event should ONLY be processed with Multisite Networking. */
|
283 |
if (!is_admin () && ((preg_match ("/\/wp-activate\.php/", $_SERVER["REQUEST_URI"])) || (c_ws_plugin__s2member_utils_conds::bp_is_installed () && bp_is_activation_page ())))
|
284 |
{
|
285 |
-
c_ws_plugin__s2member_registrations::configure_user_registration ($user_id, $password, ((isset ($meta["s2member_ms_signup_meta"])) ? $meta["s2member_ms_signup_meta"] :
|
286 |
delete_user_meta ($user_id, "s2member_ms_signup_meta");
|
287 |
}
|
288 |
/**/
|
@@ -301,7 +301,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
|
|
301 |
* @package s2Member\Registrations
|
302 |
* @since 3.5
|
303 |
*
|
304 |
-
* @attaches-to
|
305 |
*
|
306 |
* @param obj $errors Expects a `WP_Error` object passed in by the Filter.
|
307 |
* @param str $user_login Expects the User's Username, passed in by the Filter.
|
@@ -322,7 +322,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
|
|
322 |
{
|
323 |
foreach ($errors->get_error_codes () as $error_code)
|
324 |
if (!in_array ($error_code, array ("username_exists", "email_exists")))
|
325 |
-
$other_important_errors_exist =
|
326 |
/**/
|
327 |
if (empty ($other_important_errors_exist)) /* Only if/when NO other important errors exist already. */
|
328 |
{
|
@@ -336,9 +336,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
|
|
336 |
/**/
|
337 |
do_action ("ws_plugin__s2member_during_ms_register_existing_user", get_defined_vars ());
|
338 |
/**/
|
339 |
-
wp_safe_redirect ($redirect_to); /*
|
340 |
-
/**/
|
341 |
-
exit (); /* Clean exit. */
|
342 |
}
|
343 |
}
|
344 |
}
|
@@ -398,635 +396,634 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
|
|
398 |
* @package s2Member\Registrations
|
399 |
* @since 3.5
|
400 |
*
|
401 |
-
* @attaches-to
|
402 |
*
|
403 |
* @param int|str $user_id A numeric WordPress® User ID.
|
404 |
-
* @param str $password Optional in most cases. A User's plain text Password.
|
405 |
-
*
|
406 |
-
* @
|
407 |
-
* @return null
|
408 |
*
|
409 |
* @todo Impossible to delete cookies when fired inside: `/wp-activate.php`?
|
410 |
*/
|
411 |
public static function configure_user_registration ($user_id = FALSE, $password = FALSE, $meta = FALSE)
|
412 |
{
|
413 |
global $wpdb; /* Global database object reference. */
|
414 |
-
global $pagenow; /*
|
415 |
-
global $current_site, $current_blog; /* Multisite Networking. */
|
416 |
-
static $email_config, $processed; /*
|
417 |
/**/
|
418 |
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
419 |
do_action ("ws_plugin__s2member_before_configure_user_registration", get_defined_vars ());
|
420 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
421 |
/**/
|
422 |
-
/* With Multisite Networking, we need this to run on `user_register` ahead of `
|
423 |
if (!isset ($email_config) && ($email_config = true)) /* Anytime this routine is fired; we configure email. */
|
424 |
-
c_ws_plugin__s2member_email_configs::email_config (); /* Configures `From:` header
|
425 |
/**/
|
426 |
-
|
|
|
427 |
/**/
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
&& !(is_multisite () && is_blog_admin () && $pagenow === "user-new.php" && isset ($_p["noconfirmation"]) && is_super_admin () && func_num_args () !== 3) /* OK? */
|
432 |
-
&& !(preg_match ("/\/wp-activate\.php/", $_SERVER["REQUEST_URI"]) && func_num_args () !== 3) /* If activating; we MUST have a ``$meta`` arg to proceed. Otherwise ignore. */
|
433 |
-
&& !(c_ws_plugin__s2member_utils_conds::pro_is_installed () && c_ws_plugin__s2member_pro_remote_ops::is_remote_op ("create_user") && empty ($GLOBALS["ws_plugin__s2member_registration_vars"]))/**/
|
434 |
-
&& !(c_ws_plugin__s2member_utils_conds::bp_is_installed () && bp_is_activation_page () && func_num_args () !== 3)
|
435 |
-
/**/
|
436 |
-
&& $user_id && is_object ($user = new WP_User ($user_id)) && !empty ($user->ID) && ($user_id = $user->ID) && ($processed = true))
|
437 |
-
{
|
438 |
-
settype ($_p, "array") . settype ($meta, "array");
|
439 |
-
settype ($GLOBALS["ws_plugin__s2member_registration_vars"], "array");
|
440 |
-
/**/
|
441 |
-
foreach ($_p as $key => $value) /* Scan ``$_p`` vars; adding `custom_reg_field` keys. */
|
442 |
-
if (preg_match ("/^ws_plugin__s2member_user_new_/", $key)) /* Look for `user_new` keys. */
|
443 |
-
if ($key = preg_replace ("/_user_new_/", "_custom_reg_field_", $key))
|
444 |
-
$_p[$key] = $value; /* Add these keys for uniformity. */
|
445 |
-
unset ($key, $value); /* Prevents bleeding vars into Hooks/Filters. */
|
446 |
-
/**/
|
447 |
-
$meta = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($meta));
|
448 |
-
/**/
|
449 |
-
if (!is_admin () && (isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_subscr_gateway"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_subscr_id"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_custom"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_ccaps"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_auto_eot_time"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_notes"])))
|
450 |
-
exit (_x ("s2Member security violation. You attempted to POST administrative variables that will NOT be trusted in a NON-administrative zone!", "s2member-front", "s2member"));
|
451 |
-
/**/
|
452 |
-
$_pmr = array_merge ($_p, $meta, $GLOBALS["ws_plugin__s2member_registration_vars"]); /* Merge these all together now. */
|
453 |
-
unset ($_p, $meta, $GLOBALS["ws_plugin__s2member_registration_vars"]); /* These vars can all be unset now; we now have them all in ``$_pmr``. */
|
454 |
-
/**/
|
455 |
-
$custom_reg_display_name = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"]; /* Can be configured by the site owner. */
|
456 |
/**/
|
457 |
-
if (!
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
/**/
|
462 |
-
$processed = "yes"; /* Mark this as yes. */
|
463 |
-
/**/
|
464 |
-
$current_role = c_ws_plugin__s2member_user_access::user_access_role ($user);
|
465 |
-
@list ($level, $ccaps, $eotper) = preg_split ("/\:/", $item_number, 3);
|
466 |
-
$role = "s2member_level" . $level; /* Membership Level. */
|
467 |
-
/**/
|
468 |
-
$email = $user->user_email;
|
469 |
-
$login = $user->user_login;
|
470 |
-
$ip = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_registration_ip"];
|
471 |
-
$ip = (!$ip) ? $_SERVER["REMOTE_ADDR"] : $ip; /* Else use environment variable. */
|
472 |
-
$cv = preg_split ("/\|/", $custom);
|
473 |
-
/**/
|
474 |
-
if (!($auto_eot_time = "") && $eotper) /* If a specific EOT Period is included. */
|
475 |
-
$auto_eot_time = c_ws_plugin__s2member_utils_time::auto_eot_time ("", "", "", $eotper);
|
476 |
-
/**/
|
477 |
-
$notes = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_notes"];
|
478 |
-
/**/
|
479 |
-
$opt_in = (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"]) ? true : false;
|
480 |
-
$opt_in = (!$opt_in && !empty ($_pmr["ws_plugin__s2member_custom_reg_field_opt_in"])) ? true : $opt_in;
|
481 |
-
/**/
|
482 |
-
if (!($fname = $user->first_name))
|
483 |
-
if (!empty ($_pmr["ws_plugin__s2member_custom_reg_field_first_name"]))
|
484 |
-
$fname = (string)$_pmr["ws_plugin__s2member_custom_reg_field_first_name"];
|
485 |
-
/**/
|
486 |
-
if (!$fname) /* Also try BuddyPress. */
|
487 |
-
if (!empty ($_pmr["field_1"])) /* BuddyPress? */
|
488 |
-
$fname = trim (preg_replace ("/ (.*)$/", "", (string)$_pmr["field_1"]));
|
489 |
-
/**/
|
490 |
-
if (!($lname = $user->last_name))
|
491 |
-
if (!empty ($_pmr["ws_plugin__s2member_custom_reg_field_last_name"]))
|
492 |
-
$lname = (string)$_pmr["ws_plugin__s2member_custom_reg_field_last_name"];
|
493 |
-
/**/
|
494 |
-
if (!$lname) /* Also try BuddyPress. */
|
495 |
-
if (!empty ($_pmr["field_1"]) && preg_match ("/^(.+?) (.+)$/", (string)$_pmr["field_1"]))
|
496 |
-
$lname = trim (preg_replace ("/^(.+?) (.+)$/", "$2", (string)$_pmr["field_1"]));
|
497 |
-
/**/
|
498 |
-
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] && !$fname)
|
499 |
-
if ($login) /* Username and empty Last Name. */
|
500 |
-
eval ('$fname = trim ($login); $lname = "";');
|
501 |
-
/**/
|
502 |
-
$name = trim ($fname . " " . $lname); /* Both names. */
|
503 |
-
/**/
|
504 |
-
if (!($pass = $password)) /* Try s2Member's generator. */
|
505 |
-
if (!empty ($GLOBALS["ws_plugin__s2member_generate_password_return"]))
|
506 |
-
$pass = (string)$GLOBALS["ws_plugin__s2member_generate_password_return"];
|
507 |
-
/**/
|
508 |
-
if (!$pass) /* Also try BuddyPress Password. */
|
509 |
-
if (!empty ($_pmr["signup_password"])) /* BuddyPress? */
|
510 |
-
$pass = (string)$_pmr["signup_password"];
|
511 |
-
/**/
|
512 |
-
if ($pass) /* No Password nag. Update this globally. */
|
513 |
-
{
|
514 |
-
/* Note: ``delete_user_setting()`` uses cookies. */
|
515 |
-
delete_user_setting ("default_password_nag", $user_id);
|
516 |
-
update_user_option ($user_id, "default_password_nag", false, true);
|
517 |
-
}
|
518 |
-
/**/
|
519 |
-
update_user_option ($user_id, "s2member_registration_ip", $ip);
|
520 |
-
update_user_option ($user_id, "s2member_auto_eot_time", $auto_eot_time);
|
521 |
-
update_user_option ($user_id, "s2member_subscr_gateway", $subscr_gateway);
|
522 |
-
update_user_option ($user_id, "s2member_subscr_id", $subscr_id);
|
523 |
-
update_user_option ($user_id, "s2member_custom", $custom);
|
524 |
-
update_user_option ($user_id, "s2member_notes", $notes);
|
525 |
-
/**/
|
526 |
-
if (!$user->first_name && $fname)
|
527 |
-
update_user_meta ($user_id, "first_name", $fname);
|
528 |
-
/**/
|
529 |
-
if (!$user->last_name && $lname)
|
530 |
-
update_user_meta ($user_id, "last_name", $lname);
|
531 |
-
/**/
|
532 |
-
if (!$user->display_name || $user->display_name === $user->user_login)
|
533 |
-
{
|
534 |
-
if ($custom_reg_display_name === "full" && $name)
|
535 |
-
wp_update_user (array ("ID" => $user_id, "display_name" => $name));
|
536 |
-
else if ($custom_reg_display_name === "first" && $fname)
|
537 |
-
wp_update_user (array ("ID" => $user_id, "display_name" => $fname));
|
538 |
-
else if ($custom_reg_display_name === "last" && $lname)
|
539 |
-
wp_update_user (array ("ID" => $user_id, "display_name" => $lname));
|
540 |
-
else if ($custom_reg_display_name === "login" && $login)
|
541 |
-
wp_update_user (array ("ID" => $user_id, "display_name" => $login));
|
542 |
-
}
|
543 |
-
/**/
|
544 |
-
if (is_multisite ()) /* Should we handle Main Site permissions and Originating Blog ID#? */
|
545 |
-
{
|
546 |
-
if (!is_main_site () && strtotime ($user->user_registered) >= strtotime ("-10 seconds"))
|
547 |
-
remove_user_from_blog ($user_id, $current_site->blog_id); /* No Main Site Role. */
|
548 |
/**/
|
549 |
-
if (!
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
if (($
|
908 |
-
if (($
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
if (
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1030 |
/**/
|
1031 |
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
1032 |
do_action ("ws_plugin__s2member_after_configure_user_registration", get_defined_vars ());
|
36 |
* @package s2Member\Registrations
|
37 |
* @since 3.5
|
38 |
*
|
39 |
+
* @attaches-to ``add_filter("random_password");``
|
40 |
*
|
41 |
* @param str $password Expects a plain text Password passed through by the Filter.
|
42 |
* @return str Password, possibly assigned through s2Member Custom Registration/Profile Field input.
|
72 |
* @package s2Member\Registrations
|
73 |
* @since 3.5
|
74 |
*
|
75 |
+
* @attaches-to ``add_filter("wpmu_validate_user_signup");``
|
76 |
*
|
77 |
* @param array $result Expects a ``$result`` array to be passed through by the Filter.
|
78 |
* @return array The Filtered ``$result`` array. Possibly containing errors introduced by s2Member.
|
106 |
* @package s2Member\Registrations
|
107 |
* @since 3.5
|
108 |
*
|
109 |
+
* @attaches-to ``add_filter("signup_hidden_fields");``
|
110 |
*
|
111 |
* @return null
|
112 |
*/
|
139 |
* @package s2Member\Registrations
|
140 |
* @since 3.5
|
141 |
*
|
142 |
+
* @attaches-to ``add_filter("add_signup_meta");``
|
143 |
+
* @attaches-to ``add_filter("bp_signup_usermeta");``
|
144 |
*
|
145 |
* @param array $meta Expects an array of meta-data to be passed in by the Filter.
|
146 |
* @return array Full ``$meta`` array with s2Member Custom Fields included.
|
182 |
* @package s2Member\Registrations
|
183 |
* @since 3.5
|
184 |
*
|
185 |
+
* @attaches-to ``add_filter("_wpmu_activate_existing_error_");``
|
186 |
*
|
187 |
* @param obj $_error Expects a `WP_Error` object to be passed through by the Filter.
|
188 |
* @param array $vars Expects the defined variables from the scope of the calling Filter.
|
225 |
* @package s2Member\Registrations
|
226 |
* @since 3.5
|
227 |
*
|
228 |
+
* @attaches-to ``add_action("wpmu_activate_user");``
|
229 |
*
|
230 |
* @param int|str $user_id A numeric WordPress® User ID.
|
231 |
* @param str $password Plain text Password should be passed through by the Action Hook.
|
243 |
if (is_multisite ()) /* This event should ONLY be processed with Multisite Networking. */
|
244 |
if ((is_blog_admin () && $pagenow === "user-new.php" && isset ($_POST["noconfirmation"])) || (!is_admin () && ((preg_match ("/\/wp-activate\.php/", $_SERVER["REQUEST_URI"])) || (c_ws_plugin__s2member_utils_conds::bp_is_installed () && bp_is_activation_page ()))))
|
245 |
{
|
246 |
+
c_ws_plugin__s2member_registrations::configure_user_registration ($user_id, $password, ((isset ($meta["s2member_ms_signup_meta"]) && is_array ($meta["s2member_ms_signup_meta"])) ? $meta["s2member_ms_signup_meta"] : array ()));
|
247 |
delete_user_meta ($user_id, "s2member_ms_signup_meta");
|
248 |
}
|
249 |
/**/
|
264 |
* @package s2Member\Registrations
|
265 |
* @since 3.5
|
266 |
*
|
267 |
+
* @attaches-to ``add_action("wpmu_activate_blog");``
|
268 |
*
|
269 |
* @param int|str $blog_id A numeric WordPress® Blog ID.
|
270 |
* @param int|str $user_id A numeric WordPress® User ID.
|
282 |
if (is_multisite ()) /* This event should ONLY be processed with Multisite Networking. */
|
283 |
if (!is_admin () && ((preg_match ("/\/wp-activate\.php/", $_SERVER["REQUEST_URI"])) || (c_ws_plugin__s2member_utils_conds::bp_is_installed () && bp_is_activation_page ())))
|
284 |
{
|
285 |
+
c_ws_plugin__s2member_registrations::configure_user_registration ($user_id, $password, ((isset ($meta["s2member_ms_signup_meta"]) && is_array ($meta["s2member_ms_signup_meta"])) ? $meta["s2member_ms_signup_meta"] : array ()));
|
286 |
delete_user_meta ($user_id, "s2member_ms_signup_meta");
|
287 |
}
|
288 |
/**/
|
301 |
* @package s2Member\Registrations
|
302 |
* @since 3.5
|
303 |
*
|
304 |
+
* @attaches-to ``add_filter("registration_errors");``
|
305 |
*
|
306 |
* @param obj $errors Expects a `WP_Error` object passed in by the Filter.
|
307 |
* @param str $user_login Expects the User's Username, passed in by the Filter.
|
322 |
{
|
323 |
foreach ($errors->get_error_codes () as $error_code)
|
324 |
if (!in_array ($error_code, array ("username_exists", "email_exists")))
|
325 |
+
$other_important_errors_exist[] = $error_code;
|
326 |
/**/
|
327 |
if (empty ($other_important_errors_exist)) /* Only if/when NO other important errors exist already. */
|
328 |
{
|
336 |
/**/
|
337 |
do_action ("ws_plugin__s2member_during_ms_register_existing_user", get_defined_vars ());
|
338 |
/**/
|
339 |
+
wp_safe_redirect ($redirect_to) . exit (); /* Safe, like: ``register_new_user()``. */
|
|
|
|
|
340 |
}
|
341 |
}
|
342 |
}
|
396 |
* @package s2Member\Registrations
|
397 |
* @since 3.5
|
398 |
*
|
399 |
+
* @attaches-to ``add_action("user_register");``
|
400 |
*
|
401 |
* @param int|str $user_id A numeric WordPress® User ID.
|
402 |
+
* @param str $password Optional in most cases. A User's plain text Password. If unspecified, attempts are made to collect the plain text Password from other sources.
|
403 |
+
* @param array $meta Optional in most cases. Defaults to false. An array of meta data for a User/Member.
|
404 |
+
* @return null No return value. Returns `null` in possible every scenario.
|
|
|
405 |
*
|
406 |
* @todo Impossible to delete cookies when fired inside: `/wp-activate.php`?
|
407 |
*/
|
408 |
public static function configure_user_registration ($user_id = FALSE, $password = FALSE, $meta = FALSE)
|
409 |
{
|
410 |
global $wpdb; /* Global database object reference. */
|
411 |
+
global $pagenow; /* We need this to detect the current administration page. */
|
412 |
+
global $current_site, $current_blog; /* Adds support for Multisite Networking. */
|
413 |
+
static $email_config, $processed; /* Static vars prevent duplicate processing. */
|
414 |
/**/
|
415 |
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
416 |
do_action ("ws_plugin__s2member_before_configure_user_registration", get_defined_vars ());
|
417 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
418 |
/**/
|
419 |
+
/* With Multisite Networking, we need this to run on `user_register` ahead of `wpmu_activate_[user|blog]`. */
|
420 |
if (!isset ($email_config) && ($email_config = true)) /* Anytime this routine is fired; we configure email. */
|
421 |
+
c_ws_plugin__s2member_email_configs::email_config (); /* Configures `From:` email header. */
|
422 |
/**/
|
423 |
+
$_p = /* Grab global ``$_POST`` array here, if it's possible to do so. */ (isset ($_POST)) ? $_POST : null;
|
424 |
+
$rvs = (isset ($GLOBALS["ws_plugin__s2member_registration_vars"])) ? $GLOBALS["ws_plugin__s2member_registration_vars"] : null;
|
425 |
/**/
|
426 |
+
if (!$processed /* Process only once. Safeguard this routine against duplicate processing via plugins ( or even WordPress® itself ). */)
|
427 |
+
/**/
|
428 |
+
if ( /* We MUST have at least ONE of these three arrays. Any of these will do in most cases. */is_array ($_p) || is_array ($meta) || is_array ($rvs))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
/**/
|
430 |
+
if (!(is_multisite () && is_blog_admin () && $pagenow === "user-new.php" && isset ($_p["noconfirmation"]) && is_super_admin () && !is_array ($meta)))
|
431 |
+
if (!(preg_match ("/\/wp-activate\.php/", $_SERVER["REQUEST_URI"]) && !is_array ($meta)) /* If activating; we absolutely MUST have a ``$meta`` array. */)
|
432 |
+
if (!(c_ws_plugin__s2member_utils_conds::bp_is_installed () && bp_is_activation_page () && !is_array ($meta)) /* If activating; MUST have ``$meta``. */)
|
433 |
+
if (!(c_ws_plugin__s2member_utils_conds::pro_is_installed () && c_ws_plugin__s2member_pro_remote_ops::is_remote_op ("create_user") && !is_array ($rvs)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
/**/
|
435 |
+
if ($user_id && is_object ($user = new WP_User ($user_id)) && !empty ($user->ID) && ($user_id = $user->ID) && ($processed = true))
|
436 |
+
{
|
437 |
+
settype /* Force arrays here. */ ($_p, "array") . settype ($meta, "array") . settype ($rvs, "array");
|
438 |
+
/**/
|
439 |
+
$_p = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_p));
|
440 |
+
$meta = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($meta));
|
441 |
+
$rvs = c_ws_plugin__s2member_utils_strings::trim_deep /* Do NOT strip. */ ($rvs);
|
442 |
+
/**/
|
443 |
+
foreach ($_p as $_key => $_value) /* Scan ``$_p`` vars; adding `custom_reg_field` keys. */
|
444 |
+
if (preg_match ("/^ws_plugin__s2member_user_new_/", $_key)) /* Look for keys. */
|
445 |
+
if ($_key = str_replace ("_user_new_", "_custom_reg_field_", $_key))
|
446 |
+
$_p[$_key] = $_value; /* Add each of these key conversions. */
|
447 |
+
unset /* Just a little housekeeping here. */ ($_key, $_value);
|
448 |
+
/**/
|
449 |
+
if (!is_admin () && (isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_subscr_gateway"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_subscr_id"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_custom"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_ccaps"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_auto_eot_time"]) || isset ($_p["ws_plugin__s2member_custom_reg_field_s2member_notes"])))
|
450 |
+
exit (_x ("s2Member security violation. You attempted to POST administrative variables that will NOT be trusted in a NON-administrative zone!", "s2member-front", "s2member"));
|
451 |
+
/**/
|
452 |
+
$_pmr = array_merge ($_p, $meta, $rvs); /* Merge all of these arrays together now, in this specific order. */
|
453 |
+
unset ($_p, $meta, $rvs); /* These variables can all be unset now; we have them all in the ``$_pmr`` array. */
|
454 |
+
/**/
|
455 |
+
$custom_reg_display_name = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_display_name"]; /* Can be configured by the site owner. */
|
456 |
+
/**/
|
457 |
+
if (!is_admin () && (!c_ws_plugin__s2member_utils_conds::pro_is_installed () || !c_ws_plugin__s2member_pro_remote_ops::is_remote_op ("create_user")) && /* A paying Customer? */ ($reg_cookies = c_ws_plugin__s2member_register_access::reg_cookies_ok ()) && extract ($reg_cookies))
|
458 |
+
{ /* This routine could be processed through `/wp-login.php?action=register`, `/wp-activate.php`, or `/activate` via BuddyPress`.
|
459 |
+
This may also be processed through a standard BuddyPress installation, or another plugin calling `user_register`.
|
460 |
+
If processed through `/wp-activate.php`, it could've originated inside the admin, via `/user-new.php`. */
|
461 |
+
/**/
|
462 |
+
$processed = "yes"; /* Mark this as yes. */
|
463 |
+
/**/
|
464 |
+
$current_role = c_ws_plugin__s2member_user_access::user_access_role ($user);
|
465 |
+
@list ($level, $ccaps, $eotper) = preg_split ("/\:/", $item_number, 3);
|
466 |
+
$role = "s2member_level" . $level; /* Membership Level. */
|
467 |
+
/**/
|
468 |
+
$email = $user->user_email;
|
469 |
+
$login = $user->user_login;
|
470 |
+
$ip = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_registration_ip"];
|
471 |
+
$ip = (!$ip) ? $_SERVER["REMOTE_ADDR"] : $ip; /* Else use environment variable. */
|
472 |
+
$cv = preg_split ("/\|/", $custom);
|
473 |
+
/**/
|
474 |
+
if (!($auto_eot_time = "") && $eotper) /* If a specific EOT Period is included. */
|
475 |
+
$auto_eot_time = c_ws_plugin__s2member_utils_time::auto_eot_time ("", "", "", $eotper);
|
476 |
+
/**/
|
477 |
+
$notes = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_notes"];
|
478 |
+
/**/
|
479 |
+
$opt_in = (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"]) ? true : false;
|
480 |
+
$opt_in = (!$opt_in && !empty ($_pmr["ws_plugin__s2member_custom_reg_field_opt_in"])) ? true : $opt_in;
|
481 |
+
/**/
|
482 |
+
if (!($fname = $user->first_name))
|
483 |
+
if (!empty ($_pmr["ws_plugin__s2member_custom_reg_field_first_name"]))
|
484 |
+
$fname = (string)$_pmr["ws_plugin__s2member_custom_reg_field_first_name"];
|
485 |
+
/**/
|
486 |
+
if (!$fname) /* Also try BuddyPress. */
|
487 |
+
if (!empty ($_pmr["field_1"])) /* BuddyPress? */
|
488 |
+
$fname = trim (preg_replace ("/ (.*)$/", "", (string)$_pmr["field_1"]));
|
489 |
+
/**/
|
490 |
+
if (!($lname = $user->last_name))
|
491 |
+
if (!empty ($_pmr["ws_plugin__s2member_custom_reg_field_last_name"]))
|
492 |
+
$lname = (string)$_pmr["ws_plugin__s2member_custom_reg_field_last_name"];
|
493 |
+
/**/
|
494 |
+
if (!$lname) /* Also try BuddyPress. */
|
495 |
+
if (!empty ($_pmr["field_1"]) && preg_match ("/^(.+?) (.+)$/", (string)$_pmr["field_1"]))
|
496 |
+
$lname = trim (preg_replace ("/^(.+?) (.+)$/", "$2", (string)$_pmr["field_1"]));
|
497 |
+
/**/
|
498 |
+
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] && !$fname)
|
499 |
+
if ($login) /* Username and empty Last Name. */
|
500 |
+
eval ('$fname = trim ($login); $lname = "";');
|
501 |
+
/**/
|
502 |
+
$name = trim ($fname . " " . $lname); /* Both names. */
|
503 |
+
/**/
|
504 |
+
if (!($pass = $password)) /* Try s2Member's generator. */
|
505 |
+
if (!empty ($GLOBALS["ws_plugin__s2member_generate_password_return"]))
|
506 |
+
$pass = (string)$GLOBALS["ws_plugin__s2member_generate_password_return"];
|
507 |
+
/**/
|
508 |
+
if (!$pass) /* Also try BuddyPress Password. */
|
509 |
+
if (!empty ($_pmr["signup_password"])) /* BuddyPress? */
|
510 |
+
$pass = (string)$_pmr["signup_password"];
|
511 |
+
/**/
|
512 |
+
if ($pass) /* No Password nag. Update this globally. */
|
513 |
+
{
|
514 |
+
(!headers_sent ()) ? delete_user_setting ("default_password_nag", $user_id) : null;
|
515 |
+
update_user_option ($user_id, "default_password_nag", false, true);
|
516 |
+
}
|
517 |
+
/**/
|
518 |
+
update_user_option ($user_id, "s2member_registration_ip", $ip);
|
519 |
+
update_user_option ($user_id, "s2member_auto_eot_time", $auto_eot_time);
|
520 |
+
update_user_option ($user_id, "s2member_subscr_gateway", $subscr_gateway);
|
521 |
+
update_user_option ($user_id, "s2member_subscr_id", $subscr_id);
|
522 |
+
update_user_option ($user_id, "s2member_custom", $custom);
|
523 |
+
update_user_option ($user_id, "s2member_notes", $notes);
|
524 |
+
/**/
|
525 |
+
if (!$user->first_name && $fname)
|
526 |
+
update_user_meta ($user_id, "first_name", $fname);
|
527 |
+
/**/
|
528 |
+
if (!$user->last_name && $lname)
|
529 |
+
update_user_meta ($user_id, "last_name", $lname);
|
530 |
+
/**/
|
531 |
+
if (!$user->display_name || $user->display_name === $user->user_login)
|
532 |
+
{
|
533 |
+
if ($custom_reg_display_name === "full" && $name)
|
534 |
+
wp_update_user (array ("ID" => $user_id, "display_name" => $name));
|
535 |
+
else if ($custom_reg_display_name === "first" && $fname)
|
536 |
+
wp_update_user (array ("ID" => $user_id, "display_name" => $fname));
|
537 |
+
else if ($custom_reg_display_name === "last" && $lname)
|
538 |
+
wp_update_user (array ("ID" => $user_id, "display_name" => $lname));
|
539 |
+
else if ($custom_reg_display_name === "login" && $login)
|
540 |
+
wp_update_user (array ("ID" => $user_id, "display_name" => $login));
|
541 |
+
}
|
542 |
+
/**/
|
543 |
+
if (is_multisite ()) /* Should we handle Main Site permissions and Originating Blog ID#? */
|
544 |
+
{
|
545 |
+
if (!is_main_site () && strtotime ($user->user_registered) >= strtotime ("-10 seconds"))
|
546 |
+
remove_user_from_blog ($user_id, $current_site->blog_id); /* No Main Site Role. */
|
547 |
+
/**/
|
548 |
+
if (!get_user_meta ($user_id, "s2member_originating_blog", true)) /* Recorded yet? */
|
549 |
+
update_user_meta ($user_id, "s2member_originating_blog", $current_blog->blog_id);
|
550 |
+
}
|
551 |
+
/**/
|
552 |
+
if ($current_role !== $role) /* Only if NOT the current Role. */
|
553 |
+
$user->set_role ($role); /* s2Member. */
|
554 |
+
/**/
|
555 |
+
if ($ccaps && preg_match ("/^-all/", str_replace ("+", "", $ccaps)))
|
556 |
+
foreach ($user->allcaps as $cap => $cap_enabled)
|
557 |
+
if (preg_match ("/^access_s2member_ccap_/", $cap))
|
558 |
+
$user->remove_cap ($ccap = $cap);
|
559 |
+
/**/
|
560 |
+
if ($ccaps && preg_replace ("/^-all[\r\n\t\s;,]*/", "", str_replace ("+", "", $ccaps)))
|
561 |
+
foreach (preg_split ("/[\r\n\t\s;,]+/", preg_replace ("/^-all[\r\n\t\s;,]*/", "", str_replace ("+", "", $ccaps))) as $ccap)
|
562 |
+
if (strlen ($ccap = trim (strtolower (preg_replace ("/[^a-z_0-9]/i", "", $ccap)))))
|
563 |
+
$user->add_cap ("access_s2member_ccap_" . $ccap);
|
564 |
+
/**/
|
565 |
+
if (!($fields = array ()) && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"])
|
566 |
+
foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
|
567 |
+
{
|
568 |
+
$field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
|
569 |
+
$field_id_class = preg_replace ("/_/", "-", $field_var);
|
570 |
+
/**/
|
571 |
+
if (isset ($_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var]))
|
572 |
+
$fields[$field_var] = $_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var];
|
573 |
+
}
|
574 |
+
/**/
|
575 |
+
if (!empty ($fields)) /* Only if NOT empty. */
|
576 |
+
update_user_option ($user_id, "s2member_custom_fields", $fields);
|
577 |
+
/**/
|
578 |
+
if ($level > 0) /* We ONLY process this if they are higher than Level #0. */
|
579 |
+
{
|
580 |
+
$pr_times = get_user_option ("s2member_paid_registration_times", $user_id);
|
581 |
+
$pr_times["level"] = (empty ($pr_times["level"])) ? time () : $pr_times["level"];
|
582 |
+
$pr_times["level" . $level] = (empty ($pr_times["level" . $level])) ? time () : $pr_times["level" . $level];
|
583 |
+
update_user_option ($user_id, "s2member_paid_registration_times", $pr_times); /* Update now. */
|
584 |
+
}
|
585 |
+
/**/
|
586 |
+
if (($transient = "s2m_" . md5 ("s2member_transient_ipn_signup_vars_" . $subscr_id)) && is_array ($ipn_signup_vars = get_transient ($transient)))
|
587 |
+
{
|
588 |
+
update_user_option ($user_id, "s2member_ipn_signup_vars", $ipn_signup_vars); /* For future reference. */
|
589 |
+
delete_transient ($transient); /* This can be deleted now. */
|
590 |
+
}
|
591 |
+
if (($transient = "s2m_" . md5 ("s2member_transient_ipn_subscr_payment_" . $subscr_id)) && is_array ($subscr_payment = get_transient ($transient)) && !empty ($subscr_payment["subscr_gateway"]))
|
592 |
+
{
|
593 |
+
$proxy = array ("s2member_paypal_notify" => "1", "s2member_paypal_proxy" => stripslashes ((string)$subscr_payment["subscr_gateway"]), "s2member_paypal_proxy_verification" => c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen ());
|
594 |
+
c_ws_plugin__s2member_utils_urls::remote (add_query_arg (urlencode_deep ($proxy), site_url ("/")), stripslashes_deep ($subscr_payment), array ("timeout" => 20));
|
595 |
+
delete_transient ($transient); /* This can be deleted now. */
|
596 |
+
}
|
597 |
+
if (($transient = "s2m_" . md5 ("s2member_transient_ipn_subscr_eot_" . $subscr_id)) && is_array ($subscr_eot = get_transient ($transient)) && !empty ($subscr_eot["subscr_gateway"]))
|
598 |
+
{
|
599 |
+
$proxy = array ("s2member_paypal_notify" => "1", "s2member_paypal_proxy" => stripslashes ((string)$subscr_eot["subscr_gateway"]), "s2member_paypal_proxy_verification" => c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen ());
|
600 |
+
c_ws_plugin__s2member_utils_urls::remote (add_query_arg (urlencode_deep ($proxy), site_url ("/")), stripslashes_deep ($subscr_eot), array ("timeout" => 20));
|
601 |
+
delete_transient ($transient); /* This can be deleted now. */
|
602 |
+
}
|
603 |
+
/**/
|
604 |
+
if (!headers_sent ()) /* Only if headers are NOT yet sent. Here we establish both Signup and Payment Tracking Cookies. */
|
605 |
+
@setcookie ("s2member_tracking", ($s2member_tracking = c_ws_plugin__s2member_utils_encryption::encrypt ($subscr_id)), time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie ("s2member_tracking", $s2member_tracking, time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["s2member_tracking"] = $s2member_tracking);
|
606 |
+
/**/
|
607 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
608 |
+
do_action ("ws_plugin__s2member_during_configure_user_registration_front_side_paid", get_defined_vars ());
|
609 |
+
do_action ("ws_plugin__s2member_during_configure_user_registration_front_side", get_defined_vars ());
|
610 |
+
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
611 |
+
}
|
612 |
+
/**/
|
613 |
+
else if (!is_admin () && (!c_ws_plugin__s2member_utils_conds::pro_is_installed () || !c_ws_plugin__s2member_pro_remote_ops::is_remote_op ("create_user")))
|
614 |
+
{ /* This routine could be processed through `/wp-login.php?action=register`, `/wp-activate.php`, or `/activate` via BuddyPress`.
|
615 |
+
This may also be processed through a standard BuddyPress installation, or another plugin calling `user_register`.
|
616 |
+
If processed through `/wp-activate.php`, it could've originated inside the admin, via `/user-new.php`. */
|
617 |
+
/**/
|
618 |
+
$processed = "yes"; /* Mark this as yes. */
|
619 |
+
/**/
|
620 |
+
$current_role = c_ws_plugin__s2member_user_access::user_access_role ($user);
|
621 |
+
$role = ""; /* Initialize ``$role`` to an empty string here, before processing. */
|
622 |
+
$role = (!$role && ($level = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_level"]) > 0) ? "s2member_level" . $level : $role;
|
623 |
+
$role = (!$role && ($level = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_level"]) === "0") ? "subscriber" : $role;
|
624 |
+
$role = (!$role && $current_role) ? $current_role : $role; /* Use existing Role? */
|
625 |
+
$role = (!$role) ? get_option ("default_role") : $role; /* Otherwise default. */
|
626 |
+
/**/
|
627 |
+
$level = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_level"];
|
628 |
+
$level = (!$level && preg_match ("/^(administrator|editor|author|contributor)$/i", $role)) ? "4" : $level;
|
629 |
+
$level = (!$level && preg_match ("/^s2member_level[1-9][0-9]*$/i", $role)) ? preg_replace ("/^s2member_level/", "", $role) : $level;
|
630 |
+
$level = (!$level && preg_match ("/^subscriber$/i", $role)) ? "0" : $level;
|
631 |
+
$level = (!$level) ? "0" : $level;
|
632 |
+
/**/
|
633 |
+
$ccaps = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_ccaps"];
|
634 |
+
/**/
|
635 |
+
$email = $user->user_email;
|
636 |
+
$login = $user->user_login;
|
637 |
+
$ip = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_registration_ip"];
|
638 |
+
$ip = (!$ip) ? $_SERVER["REMOTE_ADDR"] : $ip; /* Else use environment variable. */
|
639 |
+
$custom = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_custom"];
|
640 |
+
$subscr_id = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_subscr_id"];
|
641 |
+
$subscr_gateway = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_subscr_gateway"];
|
642 |
+
$cv = preg_split ("/\|/", (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_custom"]);
|
643 |
+
/**/
|
644 |
+
$auto_eot_time = ($eot = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_auto_eot_time"]) ? strtotime ($eot) : "";
|
645 |
+
$notes = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_notes"];
|
646 |
+
/**/
|
647 |
+
$opt_in = (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"]) ? true : false;
|
648 |
+
$opt_in = (!$opt_in && !empty ($_pmr["ws_plugin__s2member_custom_reg_field_opt_in"])) ? true : $opt_in;
|
649 |
+
/**/
|
650 |
+
if (!($fname = $user->first_name))
|
651 |
+
if (!empty ($_pmr["ws_plugin__s2member_custom_reg_field_first_name"]))
|
652 |
+
$fname = (string)$_pmr["ws_plugin__s2member_custom_reg_field_first_name"];
|
653 |
+
/**/
|
654 |
+
if (!$fname) /* Also try BuddyPress. */
|
655 |
+
if (!empty ($_pmr["field_1"])) /* BuddyPress? */
|
656 |
+
$fname = trim (preg_replace ("/ (.*)$/", "", (string)$_pmr["field_1"]));
|
657 |
+
/**/
|
658 |
+
if (!($lname = $user->last_name))
|
659 |
+
if (!empty ($_pmr["ws_plugin__s2member_custom_reg_field_last_name"]))
|
660 |
+
$lname = (string)$_pmr["ws_plugin__s2member_custom_reg_field_last_name"];
|
661 |
+
/**/
|
662 |
+
if (!$lname) /* Also try BuddyPress. */
|
663 |
+
if (!empty ($_pmr["field_1"]) && preg_match ("/^(.+?) (.+)$/", (string)$_pmr["field_1"]))
|
664 |
+
$lname = trim (preg_replace ("/^(.+?) (.+)$/", "$2", (string)$_pmr["field_1"]));
|
665 |
+
/**/
|
666 |
+
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] && !$fname)
|
667 |
+
if ($login) /* Username and empty Last Name. */
|
668 |
+
eval ('$fname = trim ($login); $lname = "";');
|
669 |
+
/**/
|
670 |
+
$name = trim ($fname . " " . $lname); /* Both names. */
|
671 |
+
/**/
|
672 |
+
if (!($pass = $password)) /* Try s2Member's generator. */
|
673 |
+
if (!empty ($GLOBALS["ws_plugin__s2member_generate_password_return"]))
|
674 |
+
$pass = (string)$GLOBALS["ws_plugin__s2member_generate_password_return"];
|
675 |
+
/**/
|
676 |
+
if (!$pass) /* Also try BuddyPress Password. */
|
677 |
+
if (!empty ($_pmr["signup_password"])) /* BuddyPress? */
|
678 |
+
$pass = (string)$_pmr["signup_password"];
|
679 |
+
/**/
|
680 |
+
if ($pass) /* No Password nag. Update this globally. */
|
681 |
+
{
|
682 |
+
(!headers_sent ()) ? delete_user_setting ("default_password_nag", $user_id) : null;
|
683 |
+
update_user_option ($user_id, "default_password_nag", false, true);
|
684 |
+
}
|
685 |
+
/**/
|
686 |
+
update_user_option ($user_id, "s2member_registration_ip", $ip);
|
687 |
+
update_user_option ($user_id, "s2member_auto_eot_time", $auto_eot_time);
|
688 |
+
update_user_option ($user_id, "s2member_subscr_gateway", $subscr_gateway);
|
689 |
+
update_user_option ($user_id, "s2member_subscr_id", $subscr_id);
|
690 |
+
update_user_option ($user_id, "s2member_custom", $custom);
|
691 |
+
update_user_option ($user_id, "s2member_notes", $notes);
|
692 |
+
/**/
|
693 |
+
if (!$user->first_name && $fname)
|
694 |
+
update_user_meta ($user_id, "first_name", $fname);
|
695 |
+
/**/
|
696 |
+
if (!$user->last_name && $lname)
|
697 |
+
update_user_meta ($user_id, "last_name", $lname);
|
698 |
+
/**/
|
699 |
+
if (!$user->display_name || $user->display_name === $user->user_login)
|
700 |
+
{
|
701 |
+
if ($custom_reg_display_name === "full" && $name)
|
702 |
+
wp_update_user (array ("ID" => $user_id, "display_name" => $name));
|
703 |
+
else if ($custom_reg_display_name === "first" && $fname)
|
704 |
+
wp_update_user (array ("ID" => $user_id, "display_name" => $fname));
|
705 |
+
else if ($custom_reg_display_name === "last" && $lname)
|
706 |
+
wp_update_user (array ("ID" => $user_id, "display_name" => $lname));
|
707 |
+
else if ($custom_reg_display_name === "login" && $login)
|
708 |
+
wp_update_user (array ("ID" => $user_id, "display_name" => $login));
|
709 |
+
}
|
710 |
+
/**/
|
711 |
+
if (is_multisite ()) /* Should we handle Main Site permissions and Originating Blog ID#? */
|
712 |
+
{
|
713 |
+
if (!is_main_site () && strtotime ($user->user_registered) >= strtotime ("-10 seconds"))
|
714 |
+
remove_user_from_blog ($user_id, $current_site->blog_id); /* No Main Site Role. */
|
715 |
+
/**/
|
716 |
+
if (!get_user_meta ($user_id, "s2member_originating_blog", true)) /* Recorded yet? */
|
717 |
+
update_user_meta ($user_id, "s2member_originating_blog", $current_blog->blog_id);
|
718 |
+
}
|
719 |
+
/**/
|
720 |
+
if ($current_role !== $role) /* Only if NOT the current Role. */
|
721 |
+
$user->set_role ($role); /* s2Member. */
|
722 |
+
/**/
|
723 |
+
if ($ccaps && preg_match ("/^-all/", str_replace ("+", "", $ccaps)))
|
724 |
+
foreach ($user->allcaps as $cap => $cap_enabled)
|
725 |
+
if (preg_match ("/^access_s2member_ccap_/", $cap))
|
726 |
+
$user->remove_cap ($ccap = $cap);
|
727 |
+
/**/
|
728 |
+
if ($ccaps && preg_replace ("/^-all[\r\n\t\s;,]*/", "", str_replace ("+", "", $ccaps)))
|
729 |
+
foreach (preg_split ("/[\r\n\t\s;,]+/", preg_replace ("/^-all[\r\n\t\s;,]*/", "", str_replace ("+", "", $ccaps))) as $ccap)
|
730 |
+
if (strlen ($ccap = trim (strtolower (preg_replace ("/[^a-z_0-9]/i", "", $ccap)))))
|
731 |
+
$user->add_cap ("access_s2member_ccap_" . $ccap);
|
732 |
+
/**/
|
733 |
+
if (!($fields = array ()) && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"])
|
734 |
+
foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
|
735 |
+
{
|
736 |
+
$field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
|
737 |
+
$field_id_class = preg_replace ("/_/", "-", $field_var);
|
738 |
+
/**/
|
739 |
+
if (isset ($_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var]))
|
740 |
+
$fields[$field_var] = $_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var];
|
741 |
+
}
|
742 |
+
/**/
|
743 |
+
if (!empty ($fields)) /* Only if NOT empty. */
|
744 |
+
update_user_option ($user_id, "s2member_custom_fields", $fields);
|
745 |
+
/**/
|
746 |
+
if ($level > 0) /* We ONLY process this if they are higher than Level#0. */
|
747 |
+
{
|
748 |
+
$pr_times = get_user_option ("s2member_paid_registration_times", $user_id);
|
749 |
+
$pr_times["level"] = (empty ($pr_times["level"])) ? time () : $pr_times["level"];
|
750 |
+
$pr_times["level" . $level] = (empty ($pr_times["level" . $level])) ? time () : $pr_times["level" . $level];
|
751 |
+
update_user_option ($user_id, "s2member_paid_registration_times", $pr_times); /* Update now. */
|
752 |
+
}
|
753 |
+
/**/
|
754 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
755 |
+
do_action ("ws_plugin__s2member_during_configure_user_registration_front_side_free", get_defined_vars ());
|
756 |
+
do_action ("ws_plugin__s2member_during_configure_user_registration_front_side", get_defined_vars ());
|
757 |
+
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
758 |
+
}
|
759 |
+
/**/
|
760 |
+
else if ((is_blog_admin () && $pagenow === "user-new.php") || (c_ws_plugin__s2member_utils_conds::pro_is_installed () && c_ws_plugin__s2member_pro_remote_ops::is_remote_op ("create_user")))
|
761 |
+
{ /* Can only be processed through `/user-new.php` in the Admin panel, or through Remote Op: `create_user`. */
|
762 |
+
/**/
|
763 |
+
$processed = "yes"; /* Mark this as yes, to indicate that a routine was processed. */
|
764 |
+
/**/
|
765 |
+
$current_role = c_ws_plugin__s2member_user_access::user_access_role ($user);
|
766 |
+
$role = ""; /* Initialize $role to an empty string here, before processing. */
|
767 |
+
$role = (!$role && ($level = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_level"]) > 0) ? "s2member_level" . $level : $role;
|
768 |
+
$role = (!$role && ($level = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_level"]) === "0") ? "subscriber" : $role;
|
769 |
+
$role = (!$role && $current_role) ? $current_role : $role; /* Use existing Role? */
|
770 |
+
$role = (!$role) ? get_option ("default_role") : $role; /* Otherwise default. */
|
771 |
+
/**/
|
772 |
+
$level = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_level"];
|
773 |
+
$level = (!$level && preg_match ("/^(administrator|editor|author|contributor)$/i", $role)) ? "4" : $level;
|
774 |
+
$level = (!$level && preg_match ("/^s2member_level[1-9][0-9]*$/i", $role)) ? preg_replace ("/^s2member_level/", "", $role) : $level;
|
775 |
+
$level = (!$level && preg_match ("/^subscriber$/i", $role)) ? "0" : $level;
|
776 |
+
$level = (!$level) ? "0" : $level;
|
777 |
+
/**/
|
778 |
+
$ccaps = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_ccaps"];
|
779 |
+
/**/
|
780 |
+
$email = $user->user_email;
|
781 |
+
$login = $user->user_login;
|
782 |
+
$ip = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_registration_ip"];
|
783 |
+
$custom = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_custom"];
|
784 |
+
$subscr_id = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_subscr_id"];
|
785 |
+
$subscr_gateway = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_subscr_gateway"];
|
786 |
+
$cv = preg_split ("/\|/", (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_custom"]);
|
787 |
+
/**/
|
788 |
+
$auto_eot_time = ($eot = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_auto_eot_time"]) ? strtotime ($eot) : "";
|
789 |
+
$notes = (string)@$_pmr["ws_plugin__s2member_custom_reg_field_s2member_notes"];
|
790 |
+
/**/
|
791 |
+
$opt_in = (!empty ($_pmr["ws_plugin__s2member_custom_reg_field_opt_in"])) ? true : false;
|
792 |
+
/**/
|
793 |
+
if (!($fname = $user->first_name)) /* `Users -> Add New`. */
|
794 |
+
if (!empty ($_pmr["ws_plugin__s2member_custom_reg_field_first_name"]))
|
795 |
+
$fname = (string)$_pmr["ws_plugin__s2member_custom_reg_field_first_name"];
|
796 |
+
/**/
|
797 |
+
if (!($lname = $user->last_name)) /* `Users -> Add New`. */
|
798 |
+
if (!empty ($_pmr["ws_plugin__s2member_custom_reg_field_last_name"]))
|
799 |
+
$lname = (string)$_pmr["ws_plugin__s2member_custom_reg_field_last_name"];
|
800 |
+
/**/
|
801 |
+
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_names"] && !$fname)
|
802 |
+
if ($login) /* Username and empty Last Name. */
|
803 |
+
eval ('$fname = trim ($login); $lname = "";');
|
804 |
+
/**/
|
805 |
+
$name = trim ($fname . " " . $lname); /* Both names. */
|
806 |
+
/**/
|
807 |
+
if (!($pass = $password)) /* Try s2Member's generator. */
|
808 |
+
if (!empty ($GLOBALS["ws_plugin__s2member_generate_password_return"]))
|
809 |
+
$pass = (string)$GLOBALS["ws_plugin__s2member_generate_password_return"];
|
810 |
+
/**/
|
811 |
+
if (!$pass) /* Also try the `Users -> Add New` form. */
|
812 |
+
if (!empty ($_pmr["pass1"])) /* Field in `/user-new.php`. */
|
813 |
+
$pass = (string)$_pmr["pass1"];
|
814 |
+
/**/
|
815 |
+
if ($pass) /* No Password nag. Update this globally. */
|
816 |
+
{
|
817 |
+
(!headers_sent ()) ? delete_user_setting ("default_password_nag", $user_id) : null;
|
818 |
+
update_user_option ($user_id, "default_password_nag", false, true);
|
819 |
+
}
|
820 |
+
/**/
|
821 |
+
update_user_option ($user_id, "s2member_registration_ip", $ip);
|
822 |
+
update_user_option ($user_id, "s2member_auto_eot_time", $auto_eot_time);
|
823 |
+
update_user_option ($user_id, "s2member_subscr_gateway", $subscr_gateway);
|
824 |
+
update_user_option ($user_id, "s2member_subscr_id", $subscr_id);
|
825 |
+
update_user_option ($user_id, "s2member_custom", $custom);
|
826 |
+
update_user_option ($user_id, "s2member_notes", $notes);
|
827 |
+
/**/
|
828 |
+
if (!$user->first_name && $fname)
|
829 |
+
update_user_meta ($user_id, "first_name", $fname);
|
830 |
+
/**/
|
831 |
+
if (!$user->last_name && $lname)
|
832 |
+
update_user_meta ($user_id, "last_name", $lname);
|
833 |
+
/**/
|
834 |
+
if (!$user->display_name || $user->display_name === $user->user_login)
|
835 |
+
{
|
836 |
+
if ($custom_reg_display_name === "full" && $name)
|
837 |
+
wp_update_user (array ("ID" => $user_id, "display_name" => $name));
|
838 |
+
else if ($custom_reg_display_name === "first" && $fname)
|
839 |
+
wp_update_user (array ("ID" => $user_id, "display_name" => $fname));
|
840 |
+
else if ($custom_reg_display_name === "last" && $lname)
|
841 |
+
wp_update_user (array ("ID" => $user_id, "display_name" => $lname));
|
842 |
+
else if ($custom_reg_display_name === "login" && $login)
|
843 |
+
wp_update_user (array ("ID" => $user_id, "display_name" => $login));
|
844 |
+
}
|
845 |
+
/**/
|
846 |
+
if (is_multisite ()) /* Should we handle Main Site permissions and Originating Blog ID#? */
|
847 |
+
{
|
848 |
+
if (!is_main_site () && strtotime ($user->user_registered) >= strtotime ("-10 seconds"))
|
849 |
+
remove_user_from_blog ($user_id, $current_site->blog_id); /* No Main Site Role. */
|
850 |
+
/**/
|
851 |
+
if (!get_user_meta ($user_id, "s2member_originating_blog", true)) /* Recorded yet? */
|
852 |
+
update_user_meta ($user_id, "s2member_originating_blog", $current_blog->blog_id);
|
853 |
+
}
|
854 |
+
/**/
|
855 |
+
if ($current_role !== $role) /* Only if NOT the current Role. */
|
856 |
+
$user->set_role ($role); /* s2Member. */
|
857 |
+
/**/
|
858 |
+
if ($ccaps && preg_match ("/^-all/", str_replace ("+", "", $ccaps)))
|
859 |
+
foreach ($user->allcaps as $cap => $cap_enabled)
|
860 |
+
if (preg_match ("/^access_s2member_ccap_/", $cap))
|
861 |
+
$user->remove_cap ($ccap = $cap);
|
862 |
+
/**/
|
863 |
+
if ($ccaps && preg_replace ("/^-all[\r\n\t\s;,]*/", "", str_replace ("+", "", $ccaps)))
|
864 |
+
foreach (preg_split ("/[\r\n\t\s;,]+/", preg_replace ("/^-all[\r\n\t\s;,]*/", "", str_replace ("+", "", $ccaps))) as $ccap)
|
865 |
+
if (strlen ($ccap = trim (strtolower (preg_replace ("/[^a-z_0-9]/i", "", $ccap)))))
|
866 |
+
$user->add_cap ("access_s2member_ccap_" . $ccap);
|
867 |
+
/**/
|
868 |
+
if (!($fields = array ()) && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"])
|
869 |
+
foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
|
870 |
+
{
|
871 |
+
$field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
|
872 |
+
$field_id_class = preg_replace ("/_/", "-", $field_var);
|
873 |
+
/**/
|
874 |
+
if (isset ($_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var]))
|
875 |
+
$fields[$field_var] = $_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var];
|
876 |
+
}
|
877 |
+
/**/
|
878 |
+
if (!empty ($fields)) /* Only if NOT empty. */
|
879 |
+
update_user_option ($user_id, "s2member_custom_fields", $fields);
|
880 |
+
/**/
|
881 |
+
if ($level > 0) /* We ONLY process this if they are higher than Level#0. */
|
882 |
+
{
|
883 |
+
$pr_times = get_user_option ("s2member_paid_registration_times", $user_id);
|
884 |
+
$pr_times["level"] = (empty ($pr_times["level"])) ? time () : $pr_times["level"];
|
885 |
+
$pr_times["level" . $level] = (empty ($pr_times["level" . $level])) ? time () : $pr_times["level" . $level];
|
886 |
+
update_user_option ($user_id, "s2member_paid_registration_times", $pr_times); /* Update now. */
|
887 |
+
}
|
888 |
+
/**/
|
889 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
890 |
+
do_action ("ws_plugin__s2member_during_configure_user_registration_admin_side", get_defined_vars ());
|
891 |
+
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
892 |
+
}
|
893 |
+
/**/
|
894 |
+
if ($processed === "yes") /* If registration was processed by one of the routines above. */
|
895 |
+
{
|
896 |
+
if ($urls = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["registration_notification_urls"])
|
897 |
+
/**/
|
898 |
+
foreach (preg_split ("/[\r\n\t]+/", $urls) as $url) /* Notify each of the URLs. */
|
899 |
+
/**/
|
900 |
+
if (($url = preg_replace ("/%%cv([0-9]+)%%/ei", 'urlencode(trim($cv[$1]))', $url)))
|
901 |
+
if (($url = preg_replace ("/%%role%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($role)), $url)))
|
902 |
+
if (($url = preg_replace ("/%%level%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($level)), $url)))
|
903 |
+
if (($url = preg_replace ("/%%ccaps%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($ccaps)), $url)))
|
904 |
+
if (($url = preg_replace ("/%%auto_eot_time%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($auto_eot_time)), $url)))
|
905 |
+
if (($url = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($fname)), $url)))
|
906 |
+
if (($url = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($lname)), $url)))
|
907 |
+
if (($url = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($name)), $url)))
|
908 |
+
if (($url = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($email)), $url)))
|
909 |
+
if (($url = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($login)), $url)))
|
910 |
+
if (($url = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($pass)), $url)))
|
911 |
+
if (($url = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($ip)), $url)))
|
912 |
+
if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
|
913 |
+
{
|
914 |
+
foreach ($fields as $var => $val) /* Custom Fields. */
|
915 |
+
if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
|
916 |
+
break;
|
917 |
+
/**/
|
918 |
+
if (($url = trim (preg_replace ("/%%(.+?)%%/i", "", $url))))
|
919 |
+
c_ws_plugin__s2member_utils_urls::remote ($url);
|
920 |
+
}
|
921 |
+
/**/
|
922 |
+
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["registration_notification_recipients"])
|
923 |
+
{
|
924 |
+
$email_configs_were_on = c_ws_plugin__s2member_email_configs::email_config_status ();
|
925 |
+
c_ws_plugin__s2member_email_configs::email_config_release ();
|
926 |
+
/**/
|
927 |
+
$msg = $sbj = "( s2Member / API Notification Email ) - Registration";
|
928 |
+
$msg .= "\n\n"; /* Spacing in the message body. */
|
929 |
+
/**/
|
930 |
+
$msg .= "role: %%role%%\n";
|
931 |
+
$msg .= "level: %%level%%\n";
|
932 |
+
$msg .= "ccaps: %%ccaps%%\n";
|
933 |
+
$msg .= "auto_eot_time: %%auto_eot_time%%\n";
|
934 |
+
$msg .= "user_first_name: %%user_first_name%%\n";
|
935 |
+
$msg .= "user_last_name: %%user_last_name%%\n";
|
936 |
+
$msg .= "user_full_name: %%user_full_name%%\n";
|
937 |
+
$msg .= "user_email: %%user_email%%\n";
|
938 |
+
$msg .= "user_login: %%user_login%%\n";
|
939 |
+
$msg .= "user_pass: %%user_pass%%\n";
|
940 |
+
$msg .= "user_ip: %%user_ip%%\n";
|
941 |
+
$msg .= "user_id: %%user_id%%\n";
|
942 |
+
/**/
|
943 |
+
foreach ($fields as $var => $val)
|
944 |
+
$msg .= $var . ": %%" . $var . "%%\n";
|
945 |
+
/**/
|
946 |
+
$msg .= "cv0: %%cv0%%\n";
|
947 |
+
$msg .= "cv1: %%cv1%%\n";
|
948 |
+
$msg .= "cv2: %%cv2%%\n";
|
949 |
+
$msg .= "cv3: %%cv3%%\n";
|
950 |
+
$msg .= "cv4: %%cv4%%\n";
|
951 |
+
$msg .= "cv5: %%cv5%%\n";
|
952 |
+
$msg .= "cv6: %%cv6%%\n";
|
953 |
+
$msg .= "cv7: %%cv7%%\n";
|
954 |
+
$msg .= "cv8: %%cv8%%\n";
|
955 |
+
$msg .= "cv9: %%cv9%%";
|
956 |
+
/**/
|
957 |
+
if (($msg = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $msg)))
|
958 |
+
if (($msg = preg_replace ("/%%role%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($role), $msg)))
|
959 |
+
if (($msg = preg_replace ("/%%level%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($level), $msg)))
|
960 |
+
if (($msg = preg_replace ("/%%ccaps%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($ccaps), $msg)))
|
961 |
+
if (($msg = preg_replace ("/%%auto_eot_time%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($auto_eot_time), $msg)))
|
962 |
+
if (($msg = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($fname), $msg)))
|
963 |
+
if (($msg = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($lname), $msg)))
|
964 |
+
if (($msg = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($name), $msg)))
|
965 |
+
if (($msg = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($email), $msg)))
|
966 |
+
if (($msg = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($login), $msg)))
|
967 |
+
if (($msg = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($pass), $msg)))
|
968 |
+
if (($msg = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($ip), $msg)))
|
969 |
+
if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
|
970 |
+
{
|
971 |
+
foreach ($fields as $var => $val) /* Custom Fields. */
|
972 |
+
if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
|
973 |
+
break;
|
974 |
+
/**/
|
975 |
+
if ($sbj && ($msg = trim (preg_replace ("/%%(.+?)%%/i", "", $msg)))) /* Still have a ``$sbj`` and a ``$msg``? */
|
976 |
+
/**/
|
977 |
+
foreach (c_ws_plugin__s2member_utils_strings::parse_emails ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["registration_notification_recipients"]) as $recipient)
|
978 |
+
wp_mail ($recipient, apply_filters ("ws_plugin__s2member_registration_notification_email_sbj", $sbj, get_defined_vars ()), apply_filters ("ws_plugin__s2member_registration_notification_email_msg", $msg, get_defined_vars ()), "Content-Type: text/plain; charset=utf-8");
|
979 |
+
}
|
980 |
+
/**/
|
981 |
+
if ($email_configs_were_on) /* Back on? */
|
982 |
+
c_ws_plugin__s2member_email_configs::email_config ();
|
983 |
+
}
|
984 |
+
/**/
|
985 |
+
if ($url = $GLOBALS["ws_plugin__s2member_registration_return_url"])
|
986 |
+
/**/
|
987 |
+
if (($url = preg_replace ("/%%cv([0-9]+)%%/ei", 'urlencode(trim($cv[$1]))', $url)))
|
988 |
+
if (($url = preg_replace ("/%%role%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($role)), $url)))
|
989 |
+
if (($url = preg_replace ("/%%level%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($level)), $url)))
|
990 |
+
if (($url = preg_replace ("/%%ccaps%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($ccaps)), $url)))
|
991 |
+
if (($url = preg_replace ("/%%auto_eot_time%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($auto_eot_time)), $url)))
|
992 |
+
if (($url = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($fname)), $url)))
|
993 |
+
if (($url = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($lname)), $url)))
|
994 |
+
if (($url = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($name)), $url)))
|
995 |
+
if (($url = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($email)), $url)))
|
996 |
+
if (($url = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($login)), $url)))
|
997 |
+
if (($url = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($pass)), $url)))
|
998 |
+
if (($url = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($ip)), $url)))
|
999 |
+
if (($url = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode ($user_id)), $url)))
|
1000 |
+
{
|
1001 |
+
foreach ($fields as $var => $val) /* Custom Fields. */
|
1002 |
+
if (!($url = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (urlencode (maybe_serialize ($val))), $url)))
|
1003 |
+
break;
|
1004 |
+
/**/
|
1005 |
+
if (($url = trim ($url))) /* Preserve remaining Replacements; because the parent routine may perform replacements too. */
|
1006 |
+
$GLOBALS["ws_plugin__s2member_registration_return_url"] = $url;
|
1007 |
+
}
|
1008 |
+
/**/
|
1009 |
+
c_ws_plugin__s2member_list_servers::process_list_servers ($role, $level, $login, $pass, $email, $fname, $lname, $ip, $opt_in, true, $user_id);
|
1010 |
+
/*
|
1011 |
+
Suppress errors here in case this routine is fired in unexpected locations; or with odd output buffering techniques.
|
1012 |
+
@todo It may also be impossible to delete cookies when fired inside: `/wp-activate.php`.
|
1013 |
+
*/
|
1014 |
+
if (!headers_sent ()) /* Only if headers are NOT yet sent. */
|
1015 |
+
{
|
1016 |
+
@setcookie ("s2member_subscr_gateway", "", time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie ("s2member_subscr_gateway", "", time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
|
1017 |
+
@setcookie ("s2member_subscr_id", "", time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie ("s2member_subscr_id", "", time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
|
1018 |
+
@setcookie ("s2member_custom", "", time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie ("s2member_custom", "", time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
|
1019 |
+
@setcookie ("s2member_item_number", "", time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie ("s2member_item_number", "", time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
|
1020 |
+
}
|
1021 |
+
/**/
|
1022 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
1023 |
+
do_action ("ws_plugin__s2member_during_configure_user_registration", get_defined_vars ());
|
1024 |
+
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
1025 |
+
}
|
1026 |
+
}
|
1027 |
/**/
|
1028 |
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
1029 |
do_action ("ws_plugin__s2member_after_configure_user_registration", get_defined_vars ());
|
includes/classes/roles-caps.inc.php
CHANGED
@@ -132,7 +132,7 @@ if (!class_exists ("c_ws_plugin__s2member_roles_caps"))
|
|
132 |
* @package s2Member\Roles_Caps
|
133 |
* @since 110524RC
|
134 |
*
|
135 |
-
* @attaches-to
|
136 |
*
|
137 |
* @return null Exits script execution after output for AJAX caller.
|
138 |
*/
|
132 |
* @package s2Member\Roles_Caps
|
133 |
* @since 110524RC
|
134 |
*
|
135 |
+
* @attaches-to ``add_action("wp_ajax_ws_plugin__s2member_update_roles_via_ajax");``
|
136 |
*
|
137 |
* @return null Exits script execution after output for AJAX caller.
|
138 |
*/
|
includes/classes/s-badge-status-in.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_s_badge_status_in"))
|
|
33 |
* @package s2Member\Security_Badges
|
34 |
* @since 110524RC
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @return null Exits script execution after status output.
|
39 |
*/
|
33 |
* @package s2Member\Security_Badges
|
34 |
* @since 110524RC
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("init");``
|
37 |
*
|
38 |
* @return null Exits script execution after status output.
|
39 |
*/
|
includes/classes/s-badge-status.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_s_badge_status"))
|
|
33 |
* @package s2Member\Security_Badges
|
34 |
* @since 110524RC
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @return null|inner Return-value of inner routine.
|
39 |
*/
|
33 |
* @package s2Member\Security_Badges
|
34 |
* @since 110524RC
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("init");``
|
37 |
*
|
38 |
* @return null|inner Return-value of inner routine.
|
39 |
*/
|
includes/classes/sc-files-in.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_files_in"))
|
|
33 |
* @package s2Member\s2File
|
34 |
* @since 110926
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
33 |
* @package s2Member\s2File
|
34 |
* @since 110926
|
35 |
*
|
36 |
+
* @attaches-to ``add_shortcode("s2File");``
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
includes/classes/sc-files.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_files"))
|
|
33 |
* @package s2Member\s2File
|
34 |
* @since 110926
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
33 |
* @package s2Member\s2File
|
34 |
* @since 110926
|
35 |
*
|
36 |
+
* @attaches-to ``add_shortcode("s2File");``
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
includes/classes/sc-gets-in.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_gets_in"))
|
|
33 |
* @package s2Member\s2Get
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
33 |
* @package s2Member\s2Get
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_shortcode("s2Get");``
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
includes/classes/sc-gets.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_gets"))
|
|
33 |
* @package s2Member\s2Get
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
33 |
* @package s2Member\s2Get
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_shortcode("s2Get");``
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
includes/classes/sc-if-conds-in.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_sc_if_conds_in"))
|
21 |
{
|
@@ -43,7 +43,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_if_conds_in"))
|
|
43 |
* @package s2Member\s2If
|
44 |
* @since 3.5
|
45 |
*
|
46 |
-
* @attaches-to
|
47 |
*
|
48 |
* @param array $attr An array of Attributes.
|
49 |
* @param str $content Content inside the Shortcode.
|
@@ -56,7 +56,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_if_conds_in"))
|
|
56 |
*/
|
57 |
public static function sc_if_conditionals ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
|
58 |
{
|
59 |
-
eval
|
60 |
do_action ("ws_plugin__s2member_before_sc_if_conditionals", get_defined_vars ());
|
61 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
62 |
/**/
|
@@ -71,7 +71,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_if_conds_in"))
|
|
71 |
{ /* Stick with AND/OR. Ampersands are corrupted by the Visual Editor. */
|
72 |
/**/
|
73 |
$logicals[] = strtolower ($attr_value); /* Place all logicals into an array here. */
|
74 |
-
unset
|
75 |
/**/
|
76 |
if (preg_match ("/^[\!\=\<\>]+$/i", $attr_value)) /* Error on these operators. */
|
77 |
{
|
@@ -88,7 +88,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_if_conds_in"))
|
|
88 |
/**/
|
89 |
$conditional_logic = (is_array ($logicals) && !empty ($logicals) && preg_match ("/^(\|\||OR)$/i", $logicals[0])) ? "OR" : "AND";
|
90 |
/**/
|
91 |
-
eval
|
92 |
do_action ("ws_plugin__s2member_before_sc_if_conditionals_after_conditional_logic", get_defined_vars ());
|
93 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
94 |
/**/
|
@@ -98,7 +98,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_if_conds_in"))
|
|
98 |
{
|
99 |
if (preg_match ("/^(\!?)(.+?)(\()(.*?)(\))$/", $attr_value, $m) && ($exclamation = $m[1]) !== "nill" && ($conditional = $m[2]) && ($attr_args = preg_replace ("/[\r\n\t\s ]/", "", $m[4])) !== "nill")
|
100 |
{
|
101 |
-
if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site () || !preg_match ("/[
|
102 |
{
|
103 |
if (is_array ($args = preg_split ("/[;,]+/", $attr_args, 0, PREG_SPLIT_NO_EMPTY))) /* Convert all arguments into an array. And take note; possibly into an empty array. */
|
104 |
{
|
@@ -181,7 +181,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_if_conds_in"))
|
|
181 |
{
|
182 |
if (preg_match ("/^(\!?)(.+?)(\()(.*?)(\))$/", $attr_value, $m) && ($exclamation = $m[1]) !== "nill" && ($conditional = $m[2]) && ($attr_args = preg_replace ("/[\r\n\t\s ]/", "", $m[4])) !== "nill")
|
183 |
{
|
184 |
-
if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site () || !preg_match ("/[
|
185 |
{
|
186 |
if (is_array ($args = preg_split ("/[;,]+/", $attr_args, 0, PREG_SPLIT_NO_EMPTY))) /* Convert all arguments into an array. And take note; possibly into an empty array. */
|
187 |
{
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_sc_if_conds_in"))
|
21 |
{
|
43 |
* @package s2Member\s2If
|
44 |
* @since 3.5
|
45 |
*
|
46 |
+
* @attaches-to ``add_shortcode("s2If")`` + _s2If, __s2If, ___s2If for nesting.
|
47 |
*
|
48 |
* @param array $attr An array of Attributes.
|
49 |
* @param str $content Content inside the Shortcode.
|
56 |
*/
|
57 |
public static function sc_if_conditionals ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
|
58 |
{
|
59 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
60 |
do_action ("ws_plugin__s2member_before_sc_if_conditionals", get_defined_vars ());
|
61 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
62 |
/**/
|
71 |
{ /* Stick with AND/OR. Ampersands are corrupted by the Visual Editor. */
|
72 |
/**/
|
73 |
$logicals[] = strtolower ($attr_value); /* Place all logicals into an array here. */
|
74 |
+
unset($attr[$attr_key]); /* ^ Detect logic here. We'll use the first key #0. */
|
75 |
/**/
|
76 |
if (preg_match ("/^[\!\=\<\>]+$/i", $attr_value)) /* Error on these operators. */
|
77 |
{
|
88 |
/**/
|
89 |
$conditional_logic = (is_array ($logicals) && !empty ($logicals) && preg_match ("/^(\|\||OR)$/i", $logicals[0])) ? "OR" : "AND";
|
90 |
/**/
|
91 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
92 |
do_action ("ws_plugin__s2member_before_sc_if_conditionals_after_conditional_logic", get_defined_vars ());
|
93 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
94 |
/**/
|
98 |
{
|
99 |
if (preg_match ("/^(\!?)(.+?)(\()(.*?)(\))$/", $attr_value, $m) && ($exclamation = $m[1]) !== "nill" && ($conditional = $m[2]) && ($attr_args = preg_replace ("/[\r\n\t\s ]/", "", $m[4])) !== "nill")
|
100 |
{
|
101 |
+
if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site () || !(preg_match ("/[\$\(\)]/", $attr_args) || preg_match ("/new[\r\n\t\s]/i", $attr_args)))
|
102 |
{
|
103 |
if (is_array ($args = preg_split ("/[;,]+/", $attr_args, 0, PREG_SPLIT_NO_EMPTY))) /* Convert all arguments into an array. And take note; possibly into an empty array. */
|
104 |
{
|
181 |
{
|
182 |
if (preg_match ("/^(\!?)(.+?)(\()(.*?)(\))$/", $attr_value, $m) && ($exclamation = $m[1]) !== "nill" && ($conditional = $m[2]) && ($attr_args = preg_replace ("/[\r\n\t\s ]/", "", $m[4])) !== "nill")
|
183 |
{
|
184 |
+
if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site () || !(preg_match ("/[\$\(\)]/", $attr_args) || preg_match ("/new[\r\n\t\s]/i", $attr_args)))
|
185 |
{
|
186 |
if (is_array ($args = preg_split ("/[;,]+/", $attr_args, 0, PREG_SPLIT_NO_EMPTY))) /* Convert all arguments into an array. And take note; possibly into an empty array. */
|
187 |
{
|
includes/classes/sc-if-conds.inc.php
CHANGED
@@ -43,7 +43,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_if_conds"))
|
|
43 |
* @package s2Member\s2If
|
44 |
* @since 3.5
|
45 |
*
|
46 |
-
* @attaches-to
|
47 |
*
|
48 |
* @param array $attr An array of Attributes.
|
49 |
* @param str $content Content inside the Shortcode.
|
43 |
* @package s2Member\s2If
|
44 |
* @since 3.5
|
45 |
*
|
46 |
+
* @attaches-to ``add_shortcode("s2If")`` + _s2If, __s2If, ___s2If for nesting.
|
47 |
*
|
48 |
* @param array $attr An array of Attributes.
|
49 |
* @param str $content Content inside the Shortcode.
|
includes/classes/sc-keys-in.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_keys_in"))
|
|
33 |
* @package s2Member\s2Key
|
34 |
* @since 110912
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
33 |
* @package s2Member\s2Key
|
34 |
* @since 110912
|
35 |
*
|
36 |
+
* @attaches-to ``add_shortcode("s2Key");``
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
includes/classes/sc-keys.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_keys"))
|
|
33 |
* @package s2Member\s2Key
|
34 |
* @since 110912
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
33 |
* @package s2Member\s2Key
|
34 |
* @since 110912
|
35 |
*
|
36 |
+
* @attaches-to ``add_shortcode("s2Key");``
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
includes/classes/sc-paypal-button-e.inc.php
CHANGED
@@ -48,14 +48,14 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_e"))
|
|
48 |
/**/
|
49 |
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_btn_encryption"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_username"])
|
50 |
{
|
51 |
-
$cache = apply_filters ("ws_plugin__s2member_sc_paypal_button_encryption_cache", true, get_defined_vars ());
|
52 |
/**/
|
53 |
-
eval('$_code = $vars["_code"]; $attr = $vars["attr"];'); /* Let's unpack ( i.e. use shorter references ) to these two important
|
54 |
/**/
|
55 |
if ($cache && ($transient = "s2m_btn_" . md5 ($code . c_ws_plugin__s2member_utilities::ver_checksum ())) && ($cache = get_transient ($transient)))
|
56 |
-
$code =
|
57 |
/**/
|
58 |
-
else if (is_array ($inputs = c_ws_plugin__s2member_utils_forms::form_whips_2_array ($_code)) && !empty ($inputs))
|
59 |
{
|
60 |
$paypal = array ("METHOD" => "BMCreateButton", "BUTTONCODE" => "ENCRYPTED", "BUTTONTYPE" => (($attr["sp"] || $attr["rr"] === "BN") ? "BUYNOW" : "SUBSCRIBE"));
|
61 |
/**/
|
@@ -90,7 +90,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_e"))
|
|
90 |
}
|
91 |
/* No WordPress® Filters apply here. */
|
92 |
/* Instead, use: `ws_plugin__s2member_sc_paypal_button`. */
|
93 |
-
return $code; /* Button Code. Possibly w/ API encryption
|
94 |
}
|
95 |
}
|
96 |
}
|
48 |
/**/
|
49 |
if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_btn_encryption"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"] && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_username"])
|
50 |
{
|
51 |
+
$cache = /* Are we caching? */ apply_filters ("ws_plugin__s2member_sc_paypal_button_encryption_cache", true, get_defined_vars ());
|
52 |
/**/
|
53 |
+
eval('$_code = $vars["_code"]; $attr = $vars["attr"];'); /* Let's unpack ( i.e. use shorter references ) to these two important vars. */
|
54 |
/**/
|
55 |
if ($cache && ($transient = "s2m_btn_" . md5 ($code . c_ws_plugin__s2member_utilities::ver_checksum ())) && ($cache = get_transient ($transient)))
|
56 |
+
$code = /* Great, so we can use the cached version here to save processing time. The MD5 hash uses ``$code`` and NOT ``$_code``. */ $cache;
|
57 |
/**/
|
58 |
+
else if /* Are we able to parse hidden input variables? */ (is_array ($inputs = c_ws_plugin__s2member_utils_forms::form_whips_2_array ($_code)) && !empty ($inputs))
|
59 |
{
|
60 |
$paypal = array ("METHOD" => "BMCreateButton", "BUTTONCODE" => "ENCRYPTED", "BUTTONTYPE" => (($attr["sp"] || $attr["rr"] === "BN") ? "BUYNOW" : "SUBSCRIBE"));
|
61 |
/**/
|
90 |
}
|
91 |
/* No WordPress® Filters apply here. */
|
92 |
/* Instead, use: `ws_plugin__s2member_sc_paypal_button`. */
|
93 |
+
return $code; /* Button Code. Possibly w/ API encryption now. */
|
94 |
}
|
95 |
}
|
96 |
}
|
includes/classes/sc-paypal-button-in.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
|
21 |
{
|
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
|
|
33 |
* @package s2Member\PayPal
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
@@ -42,33 +42,32 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
|
|
42 |
*/
|
43 |
public static function sc_paypal_button ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
|
44 |
{
|
45 |
-
eval
|
46 |
do_action ("ws_plugin__s2member_before_sc_paypal_button", get_defined_vars ());
|
47 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
48 |
/**/
|
49 |
-
c_ws_plugin__s2member_no_cache::no_cache_constants
|
50 |
/**/
|
51 |
-
$attr =
|
52 |
/**/
|
53 |
$attr = shortcode_atts (apply_filters ("ws_plugin__s2member_sc_paypal_button_default_attrs", array ("ids" => "0", "exp" => "72", "level" => "1", "ccaps" => "", "desc" => "", "ps" => "paypal", "lc" => "", "cc" => "USD", "dg" => "0", "ns" => "1", "custom" => $_SERVER["HTTP_HOST"], "ta" => "0", "tp" => "0", "tt" => "D", "ra" => "0.01", "rp" => "1", "rt" => "M", "rr" => "1", "rrt" => "", "rra" => "1", "modify" => "0", "cancel" => "0", "sp" => "0", "image" => "default", "output" => "button"), get_defined_vars ()), $attr);
|
54 |
/**/
|
55 |
-
/* Automatically adjust to `modify="0"` ( when an Initial/Trial Period is configured ), and a User is either NOT logged-in, or has nothing to modify. */
|
56 |
$attr["modify"] = ($attr["modify"] === "1" && (!is_user_logged_in () || !get_user_option ("s2member_subscr_id")) && $attr["tp"]) ? "0" : $attr["modify"];
|
57 |
/**/
|
58 |
-
$attr["lc"] =
|
59 |
-
$attr["tt"] =
|
60 |
-
$attr["rt"] =
|
61 |
-
$attr["rr"] =
|
62 |
-
$attr["ccaps"] =
|
63 |
-
$attr["rr"] = ($attr["rt"] === "L") ? "BN" : $attr["rr"];
|
64 |
-
$attr["rr"] = ($attr["level"] === "*") ? "BN" : $attr["rr"];
|
65 |
-
$attr["ns"] = ($attr["dg"] === "1") ? "1" : $attr["ns"];
|
66 |
/**/
|
67 |
-
eval
|
68 |
do_action ("ws_plugin__s2member_before_sc_paypal_button_after_shortcode_atts", get_defined_vars ());
|
69 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
70 |
/**/
|
71 |
-
if ($attr["cancel"])
|
72 |
{
|
73 |
$default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_unsubscribe_LG.gif";
|
74 |
/**/
|
@@ -81,29 +80,31 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
|
|
81 |
/**/
|
82 |
$code = $_code = ($attr["image"] && $attr["image"] !== "default") ? preg_replace ('/ src\="(.*?)"/', ' src="' . c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($attr["image"])) . '"', $code) : preg_replace ('/ src\="(.*?)"/', ' src="' . c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($default_image)) . '"', $code);
|
83 |
/**/
|
84 |
-
$code = ($attr["output"] === "anchor") ?
|
85 |
-
|
|
|
86 |
/**/
|
87 |
-
|
|
|
|
|
88 |
do_action ("ws_plugin__s2member_during_sc_paypal_cancellation_button", get_defined_vars ());
|
89 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
90 |
}
|
91 |
-
|
92 |
-
else if ($attr["sp"]) /* This is a special routine for Specific Post/Page Buttons. */
|
93 |
{
|
94 |
$default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_xpressCheckout.gif";
|
95 |
/**/
|
96 |
$paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
|
97 |
-
$paypal_os0_input_value =
|
98 |
/**/
|
99 |
-
$paypal_on1_input_value =
|
100 |
-
$paypal_os1_input_value =
|
101 |
/**/
|
102 |
-
$paypal_invoice_input_value = uniqid () . "~" . $_SERVER["REMOTE_ADDR"];
|
103 |
/**/
|
104 |
-
$attr["sp_ids_exp"] = "sp:" . $attr["ids"] . ":" . $attr["exp"];
|
105 |
/**/
|
106 |
-
$success_return_url =
|
107 |
$success_return_url = apply_filters ("ws_plugin__s2member_during_sc_paypal_button_success_return_url", $success_return_url, get_defined_vars ());
|
108 |
/**/
|
109 |
$code = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-sp-checkout-button.php")));
|
@@ -139,26 +140,26 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
|
|
139 |
$code = ($attr["output"] === "anchor") ? '<a href="' . esc_attr (c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code)) . '"><img src="' . esc_attr (($attr["image"] && $attr["image"] !== "default") ? $attr["image"] : $default_image) . '" style="width:auto; height:auto; border:0;" alt="PayPal®" /></a>' : $code;
|
140 |
$code = ($attr["output"] === "url") ? c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code) : $code;
|
141 |
/**/
|
142 |
-
eval
|
143 |
do_action ("ws_plugin__s2member_during_sc_paypal_sp_button", get_defined_vars ());
|
144 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
145 |
}
|
146 |
-
else if ($attr["level"] === "*")
|
147 |
{
|
148 |
$default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_xpressCheckout.gif";
|
149 |
/**/
|
150 |
$paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
|
151 |
-
$paypal_os0_input_value =
|
152 |
/**/
|
153 |
-
$paypal_on1_input_value =
|
154 |
-
$paypal_os1_input_value =
|
155 |
/**/
|
156 |
-
$paypal_invoice_input_value = uniqid () . "~" . $_SERVER["REMOTE_ADDR"];
|
157 |
/**/
|
158 |
$attr["level_ccaps_eotper"] = ($attr["rr"] === "BN" && $attr["rt"] !== "L") ? $attr["level"] . ":" . $attr["ccaps"] . ":" . $attr["rp"] . " " . $attr["rt"] : $attr["level"] . ":" . $attr["ccaps"];
|
159 |
-
$attr["level_ccaps_eotper"] =
|
160 |
/**/
|
161 |
-
$success_return_url =
|
162 |
$success_return_url = apply_filters ("ws_plugin__s2member_during_sc_paypal_button_success_return_url", $success_return_url, get_defined_vars ());
|
163 |
/**/
|
164 |
$code = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-ccaps-checkout-button.php")));
|
@@ -194,30 +195,30 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
|
|
194 |
$code = ($attr["output"] === "anchor") ? '<a href="' . esc_attr (c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code)) . '"><img src="' . esc_attr (($attr["image"] && $attr["image"] !== "default") ? $attr["image"] : $default_image) . '" style="width:auto; height:auto; border:0;" alt="PayPal®" /></a>' : $code;
|
195 |
$code = ($attr["output"] === "url") ? c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code) : $code;
|
196 |
/**/
|
197 |
-
eval
|
198 |
do_action ("ws_plugin__s2member_during_sc_paypal_ccaps_button", get_defined_vars ());
|
199 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
200 |
}
|
201 |
-
else /* Otherwise, we'll process this Button normally, using
|
202 |
{
|
203 |
$default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_xpressCheckout.gif";
|
204 |
/**/
|
205 |
$paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
|
206 |
-
$paypal_os0_input_value =
|
207 |
/**/
|
208 |
-
$paypal_on1_input_value =
|
209 |
-
$paypal_os1_input_value =
|
210 |
/**/
|
211 |
-
$paypal_invoice_input_value = uniqid () . "~" . $_SERVER["REMOTE_ADDR"];
|
212 |
/**/
|
213 |
$attr["desc"] = (!$attr["desc"]) ? $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $attr["level"] . "_label"] : $attr["desc"];
|
214 |
/**/
|
215 |
$attr["level_ccaps_eotper"] = ($attr["rr"] === "BN" && $attr["rt"] !== "L") ? $attr["level"] . ":" . $attr["ccaps"] . ":" . $attr["rp"] . " " . $attr["rt"] : $attr["level"] . ":" . $attr["ccaps"];
|
216 |
-
$attr["level_ccaps_eotper"] =
|
217 |
/**/
|
218 |
$success_return_tra = array ("ta" => $attr["ta"], "tp" => $attr["tp"], "tt" => $attr["tt"], "ra" => $attr["ra"], "rp" => $attr["rp"], "rt" => $attr["rt"], "rr" => $attr["rr"], "rrt" => $attr["rrt"], "rra" => $attr["rra"], "invoice" => $paypal_invoice_input_value, "checksum" => md5 ($paypal_invoice_input_value . $_SERVER["REMOTE_ADDR"] . $attr["level_ccaps_eotper"]));
|
219 |
/**/
|
220 |
-
$success_return_url =
|
221 |
$success_return_url = add_query_arg ("s2member_paypal_return_tra", urlencode (c_ws_plugin__s2member_utils_encryption::encrypt (serialize ($success_return_tra))), $success_return_url);
|
222 |
$success_return_url = apply_filters ("ws_plugin__s2member_during_sc_paypal_button_success_return_url", $success_return_url, get_defined_vars ());
|
223 |
/**/
|
@@ -276,9 +277,8 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
|
|
276 |
$code = ($attr["output"] === "anchor") ? '<a href="' . esc_attr (c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code)) . '"><img src="' . esc_attr (($attr["image"] && $attr["image"] !== "default") ? $attr["image"] : $default_image) . '" style="width:auto; height:auto; border:0;" alt="PayPal®" /></a>' : $code;
|
277 |
$code = ($attr["output"] === "url") ? c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code) : $code;
|
278 |
/**/
|
279 |
-
eval
|
280 |
-
($attr["modify"]) ? do_action ("ws_plugin__s2member_during_sc_paypal_modification_button", get_defined_vars ())
|
281 |
-
: do_action ("ws_plugin__s2member_during_sc_paypal_button", get_defined_vars ()); /* Else, we process normally. */
|
282 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
283 |
}
|
284 |
/**/
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
|
21 |
{
|
33 |
* @package s2Member\PayPal
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_shortcode("s2Member-PayPal-Button");``
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
42 |
*/
|
43 |
public static function sc_paypal_button ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
|
44 |
{
|
45 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
46 |
do_action ("ws_plugin__s2member_before_sc_paypal_button", get_defined_vars ());
|
47 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
48 |
/**/
|
49 |
+
c_ws_plugin__s2member_no_cache::no_cache_constants /* No caching on pages that contain this Payment Button. */ (true);
|
50 |
/**/
|
51 |
+
$attr = /* Force array. Trim quote entities. */ c_ws_plugin__s2member_utils_strings::trim_qts_deep ((array)$attr);
|
52 |
/**/
|
53 |
$attr = shortcode_atts (apply_filters ("ws_plugin__s2member_sc_paypal_button_default_attrs", array ("ids" => "0", "exp" => "72", "level" => "1", "ccaps" => "", "desc" => "", "ps" => "paypal", "lc" => "", "cc" => "USD", "dg" => "0", "ns" => "1", "custom" => $_SERVER["HTTP_HOST"], "ta" => "0", "tp" => "0", "tt" => "D", "ra" => "0.01", "rp" => "1", "rt" => "M", "rr" => "1", "rrt" => "", "rra" => "1", "modify" => "0", "cancel" => "0", "sp" => "0", "image" => "default", "output" => "button"), get_defined_vars ()), $attr);
|
54 |
/**/
|
|
|
55 |
$attr["modify"] = ($attr["modify"] === "1" && (!is_user_logged_in () || !get_user_option ("s2member_subscr_id")) && $attr["tp"]) ? "0" : $attr["modify"];
|
56 |
/**/
|
57 |
+
$attr["lc"] = /* Locale code absolutely must be provided in upper-case format. Only after running shortcode_atts(). */ strtoupper ($attr["lc"]);
|
58 |
+
$attr["tt"] = /* Term lengths absolutely must be provided in upper-case format. Only after running shortcode_atts(). */ strtoupper ($attr["tt"]);
|
59 |
+
$attr["rt"] = /* Term lengths absolutely must be provided in upper-case format. Only after running shortcode_atts(). */ strtoupper ($attr["rt"]);
|
60 |
+
$attr["rr"] = /* Must be provided in upper-case format. Numerical, or BN value. Only after running shortcode_atts(). */ strtoupper ($attr["rr"]);
|
61 |
+
$attr["ccaps"] = /* Custom Capabilities must be typed in lower-case format. Only after running shortcode_atts(). */ strtolower ($attr["ccaps"]);
|
62 |
+
$attr["rr"] = /* Lifetime Subscriptions require Buy Now. Only after running shortcode_atts(). */ ($attr["rt"] === "L") ? "BN" : $attr["rr"];
|
63 |
+
$attr["rr"] = /* Independent Ccaps require Buy Now. Only after running shortcode_atts(). */ ($attr["level"] === "*") ? "BN" : $attr["rr"];
|
64 |
+
$attr["ns"] = /* No shipping directive must be 1 for digital items. After shortcode_atts(). */ ($attr["dg"] === "1") ? "1" : $attr["ns"];
|
65 |
/**/
|
66 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
67 |
do_action ("ws_plugin__s2member_before_sc_paypal_button_after_shortcode_atts", get_defined_vars ());
|
68 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
69 |
/**/
|
70 |
+
if /* Cancellation Buttons. */ ($attr["cancel"])
|
71 |
{
|
72 |
$default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_unsubscribe_LG.gif";
|
73 |
/**/
|
80 |
/**/
|
81 |
$code = $_code = ($attr["image"] && $attr["image"] !== "default") ? preg_replace ('/ src\="(.*?)"/', ' src="' . c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($attr["image"])) . '"', $code) : preg_replace ('/ src\="(.*?)"/', ' src="' . c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($default_image)) . '"', $code);
|
82 |
/**/
|
83 |
+
$code = ($attr["output"] === "anchor") ? /* Already in anchor format; `button` format is not used in Cancellations. */ $code : $code;
|
84 |
+
if ($attr["output"] === "url" && preg_match ('/ href\="(.*?)"/', $code, $m) && ($href = $m[1]))
|
85 |
+
$code = ($url = c_ws_plugin__s2member_utils_urls::n_amps ($href));
|
86 |
/**/
|
87 |
+
unset /* Just a little housekeeping */ ($href, $url, $m);
|
88 |
+
/**/
|
89 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
90 |
do_action ("ws_plugin__s2member_during_sc_paypal_cancellation_button", get_defined_vars ());
|
91 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
92 |
}
|
93 |
+
else if /* Specific Post/Page Buttons. */ ($attr["sp"])
|
|
|
94 |
{
|
95 |
$default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_xpressCheckout.gif";
|
96 |
/**/
|
97 |
$paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
|
98 |
+
$paypal_os0_input_value = /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */ ($referencing) ? $referencing : $_SERVER["HTTP_HOST"];
|
99 |
/**/
|
100 |
+
$paypal_on1_input_value = /* Identifies the Customer's IP Address for tracking purposes. */ "Customer IP Address";
|
101 |
+
$paypal_os1_input_value = /* Current User's IP Address for tracking purposes. */ $_SERVER["REMOTE_ADDR"];
|
102 |
/**/
|
103 |
+
$paypal_invoice_input_value = /* s2Member's Unique Code~IP combo. */ uniqid () . "~" . $_SERVER["REMOTE_ADDR"];
|
104 |
/**/
|
105 |
+
$attr["sp_ids_exp"] = /* Combined "sp:ids:expiration hours". */ "sp:" . $attr["ids"] . ":" . $attr["exp"];
|
106 |
/**/
|
107 |
+
$success_return_url = /* s2Member handles this all by itself. However, it can be Filtered. */ site_url ("/?s2member_paypal_return=1");
|
108 |
$success_return_url = apply_filters ("ws_plugin__s2member_during_sc_paypal_button_success_return_url", $success_return_url, get_defined_vars ());
|
109 |
/**/
|
110 |
$code = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-sp-checkout-button.php")));
|
140 |
$code = ($attr["output"] === "anchor") ? '<a href="' . esc_attr (c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code)) . '"><img src="' . esc_attr (($attr["image"] && $attr["image"] !== "default") ? $attr["image"] : $default_image) . '" style="width:auto; height:auto; border:0;" alt="PayPal®" /></a>' : $code;
|
141 |
$code = ($attr["output"] === "url") ? c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code) : $code;
|
142 |
/**/
|
143 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
144 |
do_action ("ws_plugin__s2member_during_sc_paypal_sp_button", get_defined_vars ());
|
145 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
146 |
}
|
147 |
+
else if /* Independent Custom Capabilities. */ ($attr["level"] === "*")
|
148 |
{
|
149 |
$default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_xpressCheckout.gif";
|
150 |
/**/
|
151 |
$paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
|
152 |
+
$paypal_os0_input_value = /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */ ($referencing) ? $referencing : $_SERVER["HTTP_HOST"];
|
153 |
/**/
|
154 |
+
$paypal_on1_input_value = /* Identifies the Customer's IP Address for tracking purposes. */ "Customer IP Address";
|
155 |
+
$paypal_os1_input_value = /* Current User's IP Address for tracking purposes. */ $_SERVER["REMOTE_ADDR"];
|
156 |
/**/
|
157 |
+
$paypal_invoice_input_value = /* s2Member's Unique Code~IP combo. */ uniqid () . "~" . $_SERVER["REMOTE_ADDR"];
|
158 |
/**/
|
159 |
$attr["level_ccaps_eotper"] = ($attr["rr"] === "BN" && $attr["rt"] !== "L") ? $attr["level"] . ":" . $attr["ccaps"] . ":" . $attr["rp"] . " " . $attr["rt"] : $attr["level"] . ":" . $attr["ccaps"];
|
160 |
+
$attr["level_ccaps_eotper"] = /* Clean any trailing separators from this string. */ rtrim ($attr["level_ccaps_eotper"], ":");
|
161 |
/**/
|
162 |
+
$success_return_url = /* s2Member handles this all by itself. However, it can be Filtered. */ site_url ("/?s2member_paypal_return=1");
|
163 |
$success_return_url = apply_filters ("ws_plugin__s2member_during_sc_paypal_button_success_return_url", $success_return_url, get_defined_vars ());
|
164 |
/**/
|
165 |
$code = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-ccaps-checkout-button.php")));
|
195 |
$code = ($attr["output"] === "anchor") ? '<a href="' . esc_attr (c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code)) . '"><img src="' . esc_attr (($attr["image"] && $attr["image"] !== "default") ? $attr["image"] : $default_image) . '" style="width:auto; height:auto; border:0;" alt="PayPal®" /></a>' : $code;
|
196 |
$code = ($attr["output"] === "url") ? c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code) : $code;
|
197 |
/**/
|
198 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
199 |
do_action ("ws_plugin__s2member_during_sc_paypal_ccaps_button", get_defined_vars ());
|
200 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
201 |
}
|
202 |
+
else /* Otherwise, we'll process this Button normally, using Membership routines. */
|
203 |
{
|
204 |
$default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_xpressCheckout.gif";
|
205 |
/**/
|
206 |
$paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
|
207 |
+
$paypal_os0_input_value = /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */ ($referencing) ? $referencing : $_SERVER["HTTP_HOST"];
|
208 |
/**/
|
209 |
+
$paypal_on1_input_value = /* Identifies the Customer's IP Address for tracking purposes. */ "Customer IP Address";
|
210 |
+
$paypal_os1_input_value = /* Current User's IP Address for tracking purposes. */ $_SERVER["REMOTE_ADDR"];
|
211 |
/**/
|
212 |
+
$paypal_invoice_input_value = /* s2Member's Unique Code~IP combo. */ uniqid () . "~" . $_SERVER["REMOTE_ADDR"];
|
213 |
/**/
|
214 |
$attr["desc"] = (!$attr["desc"]) ? $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $attr["level"] . "_label"] : $attr["desc"];
|
215 |
/**/
|
216 |
$attr["level_ccaps_eotper"] = ($attr["rr"] === "BN" && $attr["rt"] !== "L") ? $attr["level"] . ":" . $attr["ccaps"] . ":" . $attr["rp"] . " " . $attr["rt"] : $attr["level"] . ":" . $attr["ccaps"];
|
217 |
+
$attr["level_ccaps_eotper"] = /* Clean any trailing separators from this string. */ rtrim ($attr["level_ccaps_eotper"], ":");
|
218 |
/**/
|
219 |
$success_return_tra = array ("ta" => $attr["ta"], "tp" => $attr["tp"], "tt" => $attr["tt"], "ra" => $attr["ra"], "rp" => $attr["rp"], "rt" => $attr["rt"], "rr" => $attr["rr"], "rrt" => $attr["rrt"], "rra" => $attr["rra"], "invoice" => $paypal_invoice_input_value, "checksum" => md5 ($paypal_invoice_input_value . $_SERVER["REMOTE_ADDR"] . $attr["level_ccaps_eotper"]));
|
220 |
/**/
|
221 |
+
$success_return_url = /* s2Member handles this all by itself. However, it can be Filtered ( see below ). */ site_url ("/?s2member_paypal_return=1");
|
222 |
$success_return_url = add_query_arg ("s2member_paypal_return_tra", urlencode (c_ws_plugin__s2member_utils_encryption::encrypt (serialize ($success_return_tra))), $success_return_url);
|
223 |
$success_return_url = apply_filters ("ws_plugin__s2member_during_sc_paypal_button_success_return_url", $success_return_url, get_defined_vars ());
|
224 |
/**/
|
277 |
$code = ($attr["output"] === "anchor") ? '<a href="' . esc_attr (c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code)) . '"><img src="' . esc_attr (($attr["image"] && $attr["image"] !== "default") ? $attr["image"] : $default_image) . '" style="width:auto; height:auto; border:0;" alt="PayPal®" /></a>' : $code;
|
278 |
$code = ($attr["output"] === "url") ? c_ws_plugin__s2member_utils_forms::form_whips_2_url ($code) : $code;
|
279 |
/**/
|
280 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
281 |
+
($attr["modify"]) ? do_action ("ws_plugin__s2member_during_sc_paypal_modification_button", get_defined_vars ()) : do_action ("ws_plugin__s2member_during_sc_paypal_button", get_defined_vars ());
|
|
|
282 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
283 |
}
|
284 |
/**/
|
includes/classes/sc-paypal-button.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button"))
|
|
33 |
* @package s2Member\PayPal
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
33 |
* @package s2Member\PayPal
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_shortcode("s2Member-PayPal-Button");``
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
includes/classes/sc-profile-in.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
|
|
33 |
* @package s2Member\Profiles
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
@@ -92,7 +92,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
|
|
92 |
echo '<td>' . "\n";
|
93 |
echo '<label for="ws-plugin--s2member-profile-login">' . "\n";
|
94 |
echo '<strong>' . _x ("Username", "s2member-front", "s2member") . ' *</strong> <small>' . _x ("( cannot be changed )", "s2member-front", "s2member") . '</small><br />' . "\n";
|
95 |
-
echo '<input aria-required="true"
|
96 |
echo '</label>' . "\n";
|
97 |
echo '</td>' . "\n";
|
98 |
echo '</tr>' . "\n";
|
@@ -112,7 +112,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
|
|
112 |
echo '<td>' . "\n";
|
113 |
echo '<label for="ws-plugin--s2member-profile-email">' . "\n";
|
114 |
echo '<strong>' . _x ("Email Address", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
|
115 |
-
echo '<input aria-required="true" data-expected="email"
|
116 |
echo '</label>' . "\n";
|
117 |
echo '</td>' . "\n";
|
118 |
echo '</tr>' . "\n";
|
@@ -134,7 +134,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
|
|
134 |
echo '<td>' . "\n";
|
135 |
echo '<label for="ws-plugin--s2member-profile-first-name">' . "\n";
|
136 |
echo '<strong>' . _x ("First Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
|
137 |
-
echo '<input aria-required="true"
|
138 |
echo '</label>' . "\n";
|
139 |
echo '</td>' . "\n";
|
140 |
echo '</tr>' . "\n";
|
@@ -154,7 +154,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
|
|
154 |
echo '<td>' . "\n";
|
155 |
echo '<label for="ws-plugin--s2member-profile-last-name">' . "\n";
|
156 |
echo '<strong>' . _x ("Last Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
|
157 |
-
echo '<input aria-required="true"
|
158 |
echo '</label>' . "\n";
|
159 |
echo '</td>' . "\n";
|
160 |
echo '</tr>' . "\n";
|
@@ -174,7 +174,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
|
|
174 |
echo '<td>' . "\n";
|
175 |
echo '<label for="ws-plugin--s2member-profile-display-name">' . "\n";
|
176 |
echo '<strong>' . _x ("Display Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
|
177 |
-
echo '<input aria-required="true"
|
178 |
echo '</label>' . "\n";
|
179 |
echo '</td>' . "\n";
|
180 |
echo '</tr>' . "\n";
|
@@ -274,7 +274,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile_in"))
|
|
274 |
echo '<td>' . "\n";
|
275 |
echo '<input type="hidden" name="ws_plugin__s2member_sc_profile_save" id="ws-plugin--s2member-sc-profile-save" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-sc-profile-save")) . '" />' . "\n";
|
276 |
echo '<input type="hidden" name="ws_plugin__s2member_profile_save" id="ws-plugin--s2member-profile-save" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-profile-save")) . '" />' . "\n";
|
277 |
-
echo '<input id="ws-plugin--s2member-profile-submit"
|
278 |
echo '</td>' . "\n";
|
279 |
echo '</tr>' . "\n";
|
280 |
/**/
|
33 |
* @package s2Member\Profiles
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_shortcode("s2Member-Profile");``
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
92 |
echo '<td>' . "\n";
|
93 |
echo '<label for="ws-plugin--s2member-profile-login">' . "\n";
|
94 |
echo '<strong>' . _x ("Username", "s2member-front", "s2member") . ' *</strong> <small>' . _x ("( cannot be changed )", "s2member-front", "s2member") . '</small><br />' . "\n";
|
95 |
+
echo '<input type="text" aria-required="true" maxlength="60" autocomplete="off" name="ws_plugin__s2member_profile_login" id="ws-plugin--s2member-profile-login" class="ws-plugin--s2member-profile-field" value="' . format_to_edit ($user->user_login) . '" disabled="disabled" />' . "\n";
|
96 |
echo '</label>' . "\n";
|
97 |
echo '</td>' . "\n";
|
98 |
echo '</tr>' . "\n";
|
112 |
echo '<td>' . "\n";
|
113 |
echo '<label for="ws-plugin--s2member-profile-email">' . "\n";
|
114 |
echo '<strong>' . _x ("Email Address", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
|
115 |
+
echo '<input type="text" aria-required="true" data-expected="email" maxlength="100" autocomplete="off" name="ws_plugin__s2member_profile_email" id="ws-plugin--s2member-profile-email" class="ws-plugin--s2member-profile-field" value="' . format_to_edit ($user->user_email) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
|
116 |
echo '</label>' . "\n";
|
117 |
echo '</td>' . "\n";
|
118 |
echo '</tr>' . "\n";
|
134 |
echo '<td>' . "\n";
|
135 |
echo '<label for="ws-plugin--s2member-profile-first-name">' . "\n";
|
136 |
echo '<strong>' . _x ("First Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
|
137 |
+
echo '<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="ws_plugin__s2member_profile_first_name" id="ws-plugin--s2member-profile-first-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->first_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
|
138 |
echo '</label>' . "\n";
|
139 |
echo '</td>' . "\n";
|
140 |
echo '</tr>' . "\n";
|
154 |
echo '<td>' . "\n";
|
155 |
echo '<label for="ws-plugin--s2member-profile-last-name">' . "\n";
|
156 |
echo '<strong>' . _x ("Last Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
|
157 |
+
echo '<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="ws_plugin__s2member_profile_last_name" id="ws-plugin--s2member-profile-last-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->last_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
|
158 |
echo '</label>' . "\n";
|
159 |
echo '</td>' . "\n";
|
160 |
echo '</tr>' . "\n";
|
174 |
echo '<td>' . "\n";
|
175 |
echo '<label for="ws-plugin--s2member-profile-display-name">' . "\n";
|
176 |
echo '<strong>' . _x ("Display Name", "s2member-front", "s2member") . ' *</strong><br />' . "\n";
|
177 |
+
echo '<input type="text" aria-required="true" maxlength="100" autocomplete="off" name="ws_plugin__s2member_profile_display_name" id="ws-plugin--s2member-profile-display-name" class="ws-plugin--s2member-profile-field" value="' . esc_attr ($user->display_name) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
|
178 |
echo '</label>' . "\n";
|
179 |
echo '</td>' . "\n";
|
180 |
echo '</tr>' . "\n";
|
274 |
echo '<td>' . "\n";
|
275 |
echo '<input type="hidden" name="ws_plugin__s2member_sc_profile_save" id="ws-plugin--s2member-sc-profile-save" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-sc-profile-save")) . '" />' . "\n";
|
276 |
echo '<input type="hidden" name="ws_plugin__s2member_profile_save" id="ws-plugin--s2member-profile-save" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-profile-save")) . '" />' . "\n";
|
277 |
+
echo '<input type="submit" id="ws-plugin--s2member-profile-submit" value="' . esc_attr (_x ("Save All Changes", "s2member-front", "s2member")) . '" tabindex="' . esc_attr (($tabindex = $tabindex + 10)) . '" />' . "\n";
|
278 |
echo '</td>' . "\n";
|
279 |
echo '</tr>' . "\n";
|
280 |
/**/
|
includes/classes/sc-profile.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_profile"))
|
|
33 |
* @package s2Member\Profiles
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
33 |
* @package s2Member\Profiles
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_shortcode("s2Member-Profile");``
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
includes/classes/sc-s-badge-in.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_s_badge_in"))
|
|
33 |
* @package s2Member\Security_Badges
|
34 |
* @since 110524RC
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
33 |
* @package s2Member\Security_Badges
|
34 |
* @since 110524RC
|
35 |
*
|
36 |
+
* @attaches-to ``add_shortcode("s2Member-Security-Badge");``
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
includes/classes/sc-s-badge.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_s_badge"))
|
|
33 |
* @package s2Member\Security_Badges
|
34 |
* @since 110524RC
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
33 |
* @package s2Member\Security_Badges
|
34 |
* @since 110524RC
|
35 |
*
|
36 |
+
* @attaches-to ``add_shortcode("s2Member-Security-Badge");``
|
37 |
*
|
38 |
* @param array $attr An array of Attributes.
|
39 |
* @param str $content Content inside the Shortcode.
|
includes/classes/security.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_security"))
|
|
33 |
* @package s2Member\Security
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @return null May redirect a browser *(exiting script execution)*, when/if content is NOT available to the current User/Member.
|
39 |
*/
|
@@ -66,7 +66,7 @@ if (!class_exists ("c_ws_plugin__s2member_security"))
|
|
66 |
* @package s2Member\Security
|
67 |
* @since 3.5
|
68 |
*
|
69 |
-
* @attaches-to
|
70 |
*
|
71 |
* @param obj $wp_query Global ``$wp_query``, by reference.
|
72 |
* @return null May filter WordPress® queries, by hiding protected content which is NOT available to the current User/Member.
|
33 |
* @package s2Member\Security
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("wp");``
|
37 |
*
|
38 |
* @return null May redirect a browser *(exiting script execution)*, when/if content is NOT available to the current User/Member.
|
39 |
*/
|
66 |
* @package s2Member\Security
|
67 |
* @since 3.5
|
68 |
*
|
69 |
+
* @attaches-to ``add_action("pre_get_posts");``
|
70 |
*
|
71 |
* @param obj $wp_query Global ``$wp_query``, by reference.
|
72 |
* @return null May filter WordPress® queries, by hiding protected content which is NOT available to the current User/Member.
|
includes/classes/sp-access.inc.php
CHANGED
@@ -62,7 +62,7 @@ if (!class_exists ("c_ws_plugin__s2member_sp_access"))
|
|
62 |
* @package s2Member\SP_Access
|
63 |
* @since 3.5
|
64 |
*
|
65 |
-
* @attaches-to
|
66 |
*
|
67 |
* @return null Exits script execution after returning data for AJAX caller.
|
68 |
*/
|
62 |
* @package s2Member\SP_Access
|
63 |
* @since 3.5
|
64 |
*
|
65 |
+
* @attaches-to ``add_action("wp_ajax_ws_plugin__s2member_sp_access_link_via_ajax");``
|
66 |
*
|
67 |
* @return null Exits script execution after returning data for AJAX caller.
|
68 |
*/
|
includes/classes/ssl-in.inc.php
CHANGED
@@ -37,8 +37,8 @@ if (!class_exists ("c_ws_plugin__s2member_ssl_in"))
|
|
37 |
* @package s2Member\SSL
|
38 |
* @since 3.5
|
39 |
*
|
40 |
-
* @attaches-to
|
41 |
-
* @also-attaches-to
|
42 |
*
|
43 |
* @return null Possibly exiting script execution after redirection to SSL variation.
|
44 |
*
|
37 |
* @package s2Member\SSL
|
38 |
* @since 3.5
|
39 |
*
|
40 |
+
* @attaches-to ``add_action("init");``
|
41 |
+
* @also-attaches-to ``add_action("wp");``
|
42 |
*
|
43 |
* @return null Possibly exiting script execution after redirection to SSL variation.
|
44 |
*
|
includes/classes/ssl.inc.php
CHANGED
@@ -37,8 +37,8 @@ if (!class_exists ("c_ws_plugin__s2member_ssl"))
|
|
37 |
* @package s2Member\SSL
|
38 |
* @since 3.5
|
39 |
*
|
40 |
-
* @attaches-to
|
41 |
-
* @also-attaches-to
|
42 |
*
|
43 |
* @return null Possibly exiting script execution after redirection to SSL variation.
|
44 |
*/
|
37 |
* @package s2Member\SSL
|
38 |
* @since 3.5
|
39 |
*
|
40 |
+
* @attaches-to ``add_action("init");``
|
41 |
+
* @also-attaches-to ``add_action("wp");``
|
42 |
*
|
43 |
* @return null Possibly exiting script execution after redirection to SSL variation.
|
44 |
*/
|
includes/classes/systematics-sp.inc.php
CHANGED
@@ -28,7 +28,55 @@ if (!class_exists ("c_ws_plugin__s2member_systematics_sp"))
|
|
28 |
class c_ws_plugin__s2member_systematics_sp
|
29 |
{
|
30 |
/**
|
31 |
-
* Determines if a specific Post/Page ID, or URI, is Systematic.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
*
|
33 |
* @package s2Member\Systematics
|
34 |
* @since 3.5
|
@@ -47,67 +95,41 @@ if (!class_exists ("c_ws_plugin__s2member_systematics_sp"))
|
|
47 |
$singular_id = ($singular_id && is_numeric ($singular_id)) ? (int)$singular_id : false; /* Force types. */
|
48 |
$uri = ($uri && is_string ($uri) && ($uri = c_ws_plugin__s2member_utils_urls::parse_uri ($uri))) ? $uri : false;
|
49 |
/**/
|
50 |
-
if (c_ws_plugin__s2member_systematics_sp::
|
51 |
{
|
52 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
|
53 |
}
|
54 |
-
else if (
|
55 |
{
|
56 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
|
57 |
}
|
58 |
-
else if ($
|
59 |
{
|
60 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
|
61 |
}
|
62 |
-
else if ($
|
63 |
{
|
64 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
|
65 |
}
|
66 |
-
else if ($singular_id && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["
|
67 |
{
|
68 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
|
69 |
}
|
70 |
-
else if ($
|
71 |
{
|
72 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
|
73 |
}
|
74 |
-
else if ($
|
75 |
{
|
76 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
|
77 |
}
|
78 |
-
else if ($
|
79 |
{
|
80 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
|
81 |
}
|
82 |
-
else /* Otherwise, we return false ( i.e. it's NOT a Systematic
|
83 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", false, get_defined_vars ()));
|
84 |
}
|
85 |
-
/**
|
86 |
-
* Determines if a specific Post/Page ID, or URI, is WordPress® Systematic.
|
87 |
-
*
|
88 |
-
* @package s2Member\Systematics
|
89 |
-
* @since 111002
|
90 |
-
*
|
91 |
-
* @param int|str $singular_id Optional. A numeric Post/Page ID in WordPress®.
|
92 |
-
* @param str $uri Optional. A request URI to test against.
|
93 |
-
* @return bool True if WordPress® Systematic, else false.
|
94 |
-
*/
|
95 |
-
public static function is_wp_systematic_use_specific_page ($singular_id = FALSE, $uri = FALSE)
|
96 |
-
{
|
97 |
-
$singular_id = ($singular_id && is_numeric ($singular_id)) ? (int)$singular_id : false; /* Force types. */
|
98 |
-
$uri = ($uri && is_string ($uri) && ($uri = c_ws_plugin__s2member_utils_urls::parse_uri ($uri))) ? $uri : false;
|
99 |
-
/**/
|
100 |
-
if ($uri && preg_match ("/\/wp-admin(\/|$)/", $uri)) /* Inside a WordPress® administrative area? */
|
101 |
-
{
|
102 |
-
return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_specific_page", true, get_defined_vars ()));
|
103 |
-
}
|
104 |
-
else if ($uri && preg_match ("/^\/(?:wp-.+?|xmlrpc)\.php$/", c_ws_plugin__s2member_utils_urls::parse_url ($uri, PHP_URL_PATH)))
|
105 |
-
{
|
106 |
-
return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_specific_page", true, get_defined_vars ()));
|
107 |
-
}
|
108 |
-
else /* Otherwise, we return false ( i.e. it's NOT a WordPress® Systematic area ). */
|
109 |
-
return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_specific_page", false, get_defined_vars ()));
|
110 |
-
}
|
111 |
}
|
112 |
}
|
113 |
?>
|
28 |
class c_ws_plugin__s2member_systematics_sp
|
29 |
{
|
30 |
/**
|
31 |
+
* Determines if a specific Post/Page ID, or URI, is s2Member® Systematic.
|
32 |
+
*
|
33 |
+
* @package s2Member\Systematics
|
34 |
+
* @since 111115
|
35 |
+
*
|
36 |
+
* @param int|str $singular_id Optional. A numeric Post/Page ID in WordPress®.
|
37 |
+
* @param str $uri Optional. A request URI to test against.
|
38 |
+
* @return bool True if s2Member® Systematic, else false.
|
39 |
+
*/
|
40 |
+
public static function is_s2_systematic_use_specific_page ($singular_id = FALSE, $uri = FALSE)
|
41 |
+
{
|
42 |
+
$singular_id = ($singular_id && is_numeric ($singular_id)) ? (int)$singular_id : false; /* Force types. */
|
43 |
+
$uri = ($uri && is_string ($uri) && ($uri = c_ws_plugin__s2member_utils_urls::parse_uri ($uri))) ? $uri : false;
|
44 |
+
/**/
|
45 |
+
if ($uri && ($_q = c_ws_plugin__s2member_utils_urls::parse_url ($uri, PHP_URL_QUERY)) && preg_match ("/[\?&]s2member/", $_q) && c_ws_plugin__s2member_utils_conds::is_site_root ($uri))
|
46 |
+
{
|
47 |
+
return ($is_s2_systematic = apply_filters ("ws_plugin__s2member_is_s2_systematic_use_specific_page", true, get_defined_vars ()));
|
48 |
+
}
|
49 |
+
else /* Otherwise, we return false ( i.e. it's NOT an s2Member® Systematic Use Page ). */
|
50 |
+
return ($is_s2_systematic = apply_filters ("ws_plugin__s2member_is_s2_systematic_use_specific_page", false, get_defined_vars ()));
|
51 |
+
}
|
52 |
+
/**
|
53 |
+
* Determines if a specific Post/Page ID, or URI, is WordPress® Systematic.
|
54 |
+
*
|
55 |
+
* @package s2Member\Systematics
|
56 |
+
* @since 111002
|
57 |
+
*
|
58 |
+
* @param int|str $singular_id Optional. A numeric Post/Page ID in WordPress®.
|
59 |
+
* @param str $uri Optional. A request URI to test against.
|
60 |
+
* @return bool True if WordPress® Systematic, else false.
|
61 |
+
*/
|
62 |
+
public static function is_wp_systematic_use_specific_page ($singular_id = FALSE, $uri = FALSE)
|
63 |
+
{
|
64 |
+
$singular_id = ($singular_id && is_numeric ($singular_id)) ? (int)$singular_id : false; /* Force types. */
|
65 |
+
$uri = ($uri && is_string ($uri) && ($uri = c_ws_plugin__s2member_utils_urls::parse_uri ($uri))) ? $uri : false;
|
66 |
+
/**/
|
67 |
+
if ($uri && preg_match ("/\/wp-admin(?:\/|\?|$)/", $uri)) /* Inside a WordPress® administrative area? */
|
68 |
+
{
|
69 |
+
return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_specific_page", true, get_defined_vars ()));
|
70 |
+
}
|
71 |
+
else if ($uri && preg_match ("/^\/(?:wp-.+?|xmlrpc)\.php$/", c_ws_plugin__s2member_utils_urls::parse_url ($uri, PHP_URL_PATH)))
|
72 |
+
{
|
73 |
+
return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_specific_page", true, get_defined_vars ()));
|
74 |
+
}
|
75 |
+
else /* Otherwise, we return false ( i.e. it's NOT a WordPress® Systematic Use Page ). */
|
76 |
+
return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_specific_page", false, get_defined_vars ()));
|
77 |
+
}
|
78 |
+
/**
|
79 |
+
* Determines if a specific Post/Page ID, or URI, is Systematic in any way.
|
80 |
*
|
81 |
* @package s2Member\Systematics
|
82 |
* @since 3.5
|
95 |
$singular_id = ($singular_id && is_numeric ($singular_id)) ? (int)$singular_id : false; /* Force types. */
|
96 |
$uri = ($uri && is_string ($uri) && ($uri = c_ws_plugin__s2member_utils_urls::parse_uri ($uri))) ? $uri : false;
|
97 |
/**/
|
98 |
+
if (c_ws_plugin__s2member_systematics_sp::is_s2_systematic_use_specific_page /* An s2Member® Systematic Use Page? */ ($singular_id, $uri))
|
99 |
{
|
100 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
|
101 |
}
|
102 |
+
else if (c_ws_plugin__s2member_systematics_sp::is_wp_systematic_use_specific_page /* A WordPress® Systematic Use Page? */ ($singular_id, $uri))
|
103 |
{
|
104 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
|
105 |
}
|
106 |
+
else if ($uri && c_ws_plugin__s2member_utils_conds::bp_is_installed () && preg_match ("/\/(?:" . preg_quote (trim (((function_exists ("bp_get_signup_slug")) ? bp_get_signup_slug () : BP_REGISTER_SLUG), "/"), "/") . "|" . preg_quote (trim (((function_exists ("bp_get_activate_slug")) ? bp_get_activate_slug () : BP_ACTIVATION_SLUG), "/"), "/") . ")(?:\/|\?|$)/", $uri))
|
107 |
{
|
108 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
|
109 |
}
|
110 |
+
else if ($singular_id && c_ws_plugin__s2member_utils_conds::bp_is_installed () && ((!empty ($bp->pages->register->id) && $singular_id === (int)$bp->pages->register->id) || (!empty ($bp->pages->activate->id) && $singular_id === (int)$bp->pages->activate->id)))
|
111 |
{
|
112 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
|
113 |
}
|
114 |
+
else if ($singular_id && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"] && $singular_id === (int)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"])
|
115 |
{
|
116 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
|
117 |
}
|
118 |
+
else if ($singular_id && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"] && $singular_id === (int)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"])
|
119 |
{
|
120 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
|
121 |
}
|
122 |
+
else if ($singular_id && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"] && $singular_id === (int)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"])
|
123 |
{
|
124 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
|
125 |
}
|
126 |
+
else if ($uri && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_redirection_override"] && ($_lro = c_ws_plugin__s2member_login_redirects::login_redirection_uri (false, "root-returns-false")) && preg_match ("/^" . preg_quote ($_lro, "/") . "$/", $uri))
|
127 |
{
|
128 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", true, get_defined_vars ()));
|
129 |
}
|
130 |
+
else /* Otherwise, we return false ( i.e. it's NOT a Systematic Use Page in any way ). */
|
131 |
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_specific_page", false, get_defined_vars ()));
|
132 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
}
|
134 |
}
|
135 |
?>
|
includes/classes/systematics.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_systematics"))
|
21 |
{
|
@@ -28,54 +28,30 @@ if (!class_exists ("c_ws_plugin__s2member_systematics"))
|
|
28 |
class c_ws_plugin__s2member_systematics
|
29 |
{
|
30 |
/**
|
31 |
-
* Determines if the current page is Systematic.
|
32 |
*
|
33 |
* @package s2Member\Systematics
|
34 |
-
* @since
|
35 |
*
|
36 |
-
* @return bool True if Systematic, else false.
|
37 |
*
|
38 |
* @note The results of this function are cached staticially.
|
39 |
-
* Do NOT call upon this until the `
|
40 |
*/
|
41 |
-
public static function
|
42 |
{
|
43 |
-
static $
|
44 |
/**/
|
45 |
-
if (isset ($
|
46 |
{
|
47 |
-
return $
|
48 |
}
|
49 |
-
else if (
|
50 |
{
|
51 |
-
return ($
|
52 |
-
}
|
53 |
-
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"] && is_page ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"]))
|
54 |
-
{
|
55 |
-
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars ()));
|
56 |
}
|
57 |
-
else
|
58 |
-
|
59 |
-
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars ()));
|
60 |
-
}
|
61 |
-
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_redirection_override"] && ($login_redirection_uri = c_ws_plugin__s2member_login_redirects::login_redirection_uri (false, "root-returns-false")) && preg_match ("/^" . preg_quote ($login_redirection_uri, "/") . "$/", $_SERVER["REQUEST_URI"]))
|
62 |
-
{
|
63 |
-
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars ()));
|
64 |
-
}
|
65 |
-
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"] && is_page ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"]))
|
66 |
-
{
|
67 |
-
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars ()));
|
68 |
-
}
|
69 |
-
else if (!empty ($_SERVER["QUERY_STRING"]) && strpos ($_SERVER["QUERY_STRING"], "s2member") === 0 && c_ws_plugin__s2member_utils_conds::is_site_root ($_SERVER["REQUEST_URI"]))
|
70 |
-
{
|
71 |
-
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars ()));
|
72 |
-
}
|
73 |
-
else if (c_ws_plugin__s2member_utils_conds::bp_is_installed () && (bp_is_register_page () || bp_is_activation_page ()))
|
74 |
-
{
|
75 |
-
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars ()));
|
76 |
-
}
|
77 |
-
else /* Otherwise, we return false ( it's NOT Systematic ). */
|
78 |
-
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", false, get_defined_vars ()));
|
79 |
}
|
80 |
/**
|
81 |
* Determines if the current page is WordPress® Systematic.
|
@@ -86,15 +62,15 @@ if (!class_exists ("c_ws_plugin__s2member_systematics"))
|
|
86 |
* @return bool True if WordPress® Systematic, else false.
|
87 |
*
|
88 |
* @note The results of this function are cached staticially.
|
89 |
-
* Do NOT call upon this until the `
|
90 |
*/
|
91 |
public static function is_wp_systematic_use_page ()
|
92 |
{
|
93 |
static $is_wp_systematic; /* For optimization. */
|
94 |
/**/
|
95 |
-
if (isset ($is_wp_systematic)) /* Already cached?
|
96 |
{
|
97 |
-
return $is_wp_systematic; /* Filters will have already been applied. */
|
98 |
}
|
99 |
else if (is_admin ()) /* In the admin area? All administrational pages are considered Systematic. */
|
100 |
{
|
@@ -124,9 +100,59 @@ if (!class_exists ("c_ws_plugin__s2member_systematics"))
|
|
124 |
{
|
125 |
return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_page", true, get_defined_vars ()));
|
126 |
}
|
127 |
-
else /* Otherwise, we return false ( it's NOT WordPress® Systematic ). */
|
128 |
return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_page", false, get_defined_vars ()));
|
129 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
}
|
131 |
}
|
132 |
?>
|
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_systematics"))
|
21 |
{
|
28 |
class c_ws_plugin__s2member_systematics
|
29 |
{
|
30 |
/**
|
31 |
+
* Determines if the current page is s2Member® Systematic.
|
32 |
*
|
33 |
* @package s2Member\Systematics
|
34 |
+
* @since 111115
|
35 |
*
|
36 |
+
* @return bool True if s2Member® Systematic, else false.
|
37 |
*
|
38 |
* @note The results of this function are cached staticially.
|
39 |
+
* Do NOT call upon this until the `init` Hook is fired.
|
40 |
*/
|
41 |
+
public static function is_s2_systematic_use_page ()
|
42 |
{
|
43 |
+
static $is_s2_systematic; /* For optimization. */
|
44 |
/**/
|
45 |
+
if (isset ($is_s2_systematic)) /* Already cached statically? Saves time. */
|
46 |
{
|
47 |
+
return $is_s2_systematic; /* Filters will have already been applied here. */
|
48 |
}
|
49 |
+
else if (!empty ($_SERVER["QUERY_STRING"]) && preg_match ("/[\?&]s2member/", $_SERVER["QUERY_STRING"]) && c_ws_plugin__s2member_utils_conds::is_site_root ($_SERVER["REQUEST_URI"]))
|
50 |
{
|
51 |
+
return ($is_s2_systematic = apply_filters ("ws_plugin__s2member_is_s2_systematic_use_page", true, get_defined_vars ()));
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
+
else /* Otherwise, we return false ( it's NOT an s2Member® Systematic Use Page ). */
|
54 |
+
return ($is_s2_systematic = apply_filters ("ws_plugin__s2member_is_s2_systematic_use_page", false, get_defined_vars ()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
/**
|
57 |
* Determines if the current page is WordPress® Systematic.
|
62 |
* @return bool True if WordPress® Systematic, else false.
|
63 |
*
|
64 |
* @note The results of this function are cached staticially.
|
65 |
+
* Do NOT call upon this until the `init` Hook is fired.
|
66 |
*/
|
67 |
public static function is_wp_systematic_use_page ()
|
68 |
{
|
69 |
static $is_wp_systematic; /* For optimization. */
|
70 |
/**/
|
71 |
+
if (isset ($is_wp_systematic)) /* Already cached statically? Saves time. */
|
72 |
{
|
73 |
+
return $is_wp_systematic; /* Filters will have already been applied here. */
|
74 |
}
|
75 |
else if (is_admin ()) /* In the admin area? All administrational pages are considered Systematic. */
|
76 |
{
|
100 |
{
|
101 |
return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_page", true, get_defined_vars ()));
|
102 |
}
|
103 |
+
else /* Otherwise, we return false ( it's NOT a WordPress® Systematic Use Page ). */
|
104 |
return ($is_wp_systematic = apply_filters ("ws_plugin__s2member_is_wp_systematic_use_page", false, get_defined_vars ()));
|
105 |
}
|
106 |
+
/**
|
107 |
+
* Determines if the current page is Systematic in any way.
|
108 |
+
*
|
109 |
+
* @package s2Member\Systematics
|
110 |
+
* @since 3.5
|
111 |
+
*
|
112 |
+
* @return bool True if Systematic, else false.
|
113 |
+
*
|
114 |
+
* @note The results of this function are cached staticially.
|
115 |
+
* Do NOT call upon this until the `wp` Hook is fired.
|
116 |
+
*/
|
117 |
+
public static function is_systematic_use_page ()
|
118 |
+
{
|
119 |
+
static $is_systematic; /* For optimization. */
|
120 |
+
/**/
|
121 |
+
if (isset ($is_systematic)) /* Already cached statically? Saves time. */
|
122 |
+
{
|
123 |
+
return $is_systematic; /* Filters will have already been applied here. */
|
124 |
+
}
|
125 |
+
else if (c_ws_plugin__s2member_systematics::is_s2_systematic_use_page /* An s2Member® Systematic Use Page? */ ())
|
126 |
+
{
|
127 |
+
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars ()));
|
128 |
+
}
|
129 |
+
else if (c_ws_plugin__s2member_systematics::is_wp_systematic_use_page /* A WordPress® Systematic Use Page? */ ())
|
130 |
+
{
|
131 |
+
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars ()));
|
132 |
+
}
|
133 |
+
else if (c_ws_plugin__s2member_utils_conds::bp_is_installed () && (bp_is_register_page () || bp_is_activation_page ()))
|
134 |
+
{
|
135 |
+
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars ()));
|
136 |
+
}
|
137 |
+
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"] && is_page ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_welcome_page"]))
|
138 |
+
{
|
139 |
+
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars ()));
|
140 |
+
}
|
141 |
+
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"] && is_page ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"]))
|
142 |
+
{
|
143 |
+
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars ()));
|
144 |
+
}
|
145 |
+
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"] && is_page ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"]))
|
146 |
+
{
|
147 |
+
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars ()));
|
148 |
+
}
|
149 |
+
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_redirection_override"] && ($_lro = c_ws_plugin__s2member_login_redirects::login_redirection_uri (false, "root-returns-false")) && preg_match ("/^" . preg_quote ($_lro, "/") . "$/", $_SERVER["REQUEST_URI"]))
|
150 |
+
{
|
151 |
+
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", true, get_defined_vars ()));
|
152 |
+
}
|
153 |
+
else /* Otherwise, we return false ( it's NOT a Systematic Use Page in any way ). */
|
154 |
+
return ($is_systematic = apply_filters ("ws_plugin__s2member_is_systematic_use_page", false, get_defined_vars ()));
|
155 |
+
}
|
156 |
}
|
157 |
}
|
158 |
?>
|
includes/classes/tracking-codes.inc.php
CHANGED
@@ -43,9 +43,9 @@ if (!class_exists ("c_ws_plugin__s2member_tracking_codes"))
|
|
43 |
* @package s2Member\Tracking
|
44 |
* @since 3.5
|
45 |
*
|
46 |
-
* @attaches-to
|
47 |
-
* @attaches-to
|
48 |
-
* @also-called-by
|
49 |
*
|
50 |
* @return null After displaying possible Tracking Code(s).
|
51 |
*/
|
@@ -95,9 +95,9 @@ if (!class_exists ("c_ws_plugin__s2member_tracking_codes"))
|
|
95 |
* @package s2Member\Tracking
|
96 |
* @since 110815
|
97 |
*
|
98 |
-
* @attaches-to
|
99 |
-
* @attaches-to
|
100 |
-
* @also-called-by
|
101 |
*
|
102 |
* @return null After displaying possible Tracking Code(s).
|
103 |
*/
|
@@ -147,9 +147,9 @@ if (!class_exists ("c_ws_plugin__s2member_tracking_codes"))
|
|
147 |
* @package s2Member\Tracking
|
148 |
* @since 110815
|
149 |
*
|
150 |
-
* @attaches-to
|
151 |
-
* @attaches-to
|
152 |
-
* @also-called-by
|
153 |
*
|
154 |
* @return null After displaying possible Tracking Code(s).
|
155 |
*/
|
@@ -195,9 +195,9 @@ if (!class_exists ("c_ws_plugin__s2member_tracking_codes"))
|
|
195 |
* @package s2Member\Tracking
|
196 |
* @since 3.5
|
197 |
*
|
198 |
-
* @attaches-to
|
199 |
-
* @attaches-to
|
200 |
-
* @also-called-by
|
201 |
*
|
202 |
* @return null After displaying possible Tracking Code(s).
|
203 |
*/
|
43 |
* @package s2Member\Tracking
|
44 |
* @since 3.5
|
45 |
*
|
46 |
+
* @attaches-to ``add_action("login_footer");``
|
47 |
+
* @attaches-to ``add_action("wp_footer");``
|
48 |
+
* @also-called-by {@link s2Member\Tracking\c_ws_plugin__s2member_tracking_codes::generate_all_tracking_codes()}
|
49 |
*
|
50 |
* @return null After displaying possible Tracking Code(s).
|
51 |
*/
|
95 |
* @package s2Member\Tracking
|
96 |
* @since 110815
|
97 |
*
|
98 |
+
* @attaches-to ``add_action("login_footer");``
|
99 |
+
* @attaches-to ``add_action("wp_footer");``
|
100 |
+
* @also-called-by {@link s2Member\Tracking\c_ws_plugin__s2member_tracking_codes::generate_all_tracking_codes()}
|
101 |
*
|
102 |
* @return null After displaying possible Tracking Code(s).
|
103 |
*/
|
147 |
* @package s2Member\Tracking
|
148 |
* @since 110815
|
149 |
*
|
150 |
+
* @attaches-to ``add_action("login_footer");``
|
151 |
+
* @attaches-to ``add_action("wp_footer");``
|
152 |
+
* @also-called-by {@link s2Member\Tracking\c_ws_plugin__s2member_tracking_codes::generate_all_tracking_codes()}
|
153 |
*
|
154 |
* @return null After displaying possible Tracking Code(s).
|
155 |
*/
|
195 |
* @package s2Member\Tracking
|
196 |
* @since 3.5
|
197 |
*
|
198 |
+
* @attaches-to ``add_action("login_footer");``
|
199 |
+
* @attaches-to ``add_action("wp_footer");``
|
200 |
+
* @also-called-by {@link s2Member\Tracking\c_ws_plugin__s2member_tracking_codes::generate_all_tracking_codes()}
|
201 |
*
|
202 |
* @return null After displaying possible Tracking Code(s).
|
203 |
*/
|
includes/classes/tracking-cookies-in.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_tracking_cookies_in"))
|
|
33 |
* @package s2Member\Tracking
|
34 |
* @since 110815
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @return null Or exits script execution after deleting Cookie.
|
39 |
*/
|
@@ -65,7 +65,7 @@ if (!class_exists ("c_ws_plugin__s2member_tracking_cookies_in"))
|
|
65 |
* @package s2Member\Tracking
|
66 |
* @since 3.5
|
67 |
*
|
68 |
-
* @attaches-to
|
69 |
*
|
70 |
* @return null Or exits script execution after deleting Cookie.
|
71 |
*/
|
33 |
* @package s2Member\Tracking
|
34 |
* @since 110815
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("init");``
|
37 |
*
|
38 |
* @return null Or exits script execution after deleting Cookie.
|
39 |
*/
|
65 |
* @package s2Member\Tracking
|
66 |
* @since 3.5
|
67 |
*
|
68 |
+
* @attaches-to ``add_action("init");``
|
69 |
*
|
70 |
* @return null Or exits script execution after deleting Cookie.
|
71 |
*/
|
includes/classes/tracking-cookies.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_tracking_cookies"))
|
|
33 |
* @package s2Member\Tracking
|
34 |
* @since 110815
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @return null|inner Return-value of inner routine.
|
39 |
*/
|
@@ -50,7 +50,7 @@ if (!class_exists ("c_ws_plugin__s2member_tracking_cookies"))
|
|
50 |
* @package s2Member\Tracking
|
51 |
* @since 3.5
|
52 |
*
|
53 |
-
* @attaches-to
|
54 |
*
|
55 |
* @return null|inner Return-value of inner routine.
|
56 |
*/
|
33 |
* @package s2Member\Tracking
|
34 |
* @since 110815
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("init");``
|
37 |
*
|
38 |
* @return null|inner Return-value of inner routine.
|
39 |
*/
|
50 |
* @package s2Member\Tracking
|
51 |
* @since 3.5
|
52 |
*
|
53 |
+
* @attaches-to ``add_action("init");``
|
54 |
*
|
55 |
* @return null|inner Return-value of inner routine.
|
56 |
*/
|
includes/classes/translations.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_translations"))
|
|
33 |
* @package s2Member\Translations
|
34 |
* @since 110815
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @return null
|
39 |
*/
|
@@ -60,7 +60,7 @@ if (!class_exists ("c_ws_plugin__s2member_translations"))
|
|
60 |
* @package s2Member\Translations
|
61 |
* @since 3.5
|
62 |
*
|
63 |
-
* @attaches-to
|
64 |
*
|
65 |
* @param str $translated Expects already-translated string passed in by Filter.
|
66 |
* @param str $original Expects original text string passed in by Filter.
|
33 |
* @package s2Member\Translations
|
34 |
* @since 110815
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("init");``
|
37 |
*
|
38 |
* @return null
|
39 |
*/
|
60 |
* @package s2Member\Translations
|
61 |
* @since 3.5
|
62 |
*
|
63 |
+
* @attaches-to ``add_filter("gettext");``
|
64 |
*
|
65 |
* @param str $translated Expects already-translated string passed in by Filter.
|
66 |
* @param str $original Expects original text string passed in by Filter.
|
includes/classes/user-deletions.inc.php
CHANGED
@@ -33,7 +33,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_deletions"))
|
|
33 |
* @package s2Member\User_Deletions
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
*
|
38 |
* @param int|str $user_id Numeric WordPress® User ID.
|
39 |
* @param int|str $blog_id Numeric WordPress® Blog ID.
|
@@ -79,8 +79,8 @@ if (!class_exists ("c_ws_plugin__s2member_user_deletions"))
|
|
79 |
* @package s2Member\User_Deletions
|
80 |
* @since 3.5
|
81 |
*
|
82 |
-
* @attaches-to
|
83 |
-
* @attaches-to
|
84 |
*
|
85 |
* @param int|str $user_id Numeric WordPress® User ID.
|
86 |
* @return null
|
33 |
* @package s2Member\User_Deletions
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("remove_user_from_blog");``
|
37 |
*
|
38 |
* @param int|str $user_id Numeric WordPress® User ID.
|
39 |
* @param int|str $blog_id Numeric WordPress® Blog ID.
|
79 |
* @package s2Member\User_Deletions
|
80 |
* @since 3.5
|
81 |
*
|
82 |
+
* @attaches-to ``add_action("delete_user");``
|
83 |
+
* @attaches-to ``add_action("wpmu_delete_user");``
|
84 |
*
|
85 |
* @param int|str $user_id Numeric WordPress® User ID.
|
86 |
* @return null
|
includes/classes/user-new-in.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
|
21 |
{
|
@@ -35,7 +35,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
|
|
35 |
* @package s2Member\New_Users
|
36 |
* @since 3.5
|
37 |
*
|
38 |
-
* @attaches-to
|
39 |
*
|
40 |
* @return str Output buffer.
|
41 |
*/
|
@@ -43,7 +43,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
|
|
43 |
{
|
44 |
global $pagenow; /* The current admin page file name. */
|
45 |
/**/
|
46 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
47 |
do_action ("_ws_plugin__s2member_before_admin_user_new_fields", get_defined_vars ());
|
48 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
49 |
/**/
|
@@ -57,40 +57,40 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
|
|
57 |
/**/
|
58 |
$unfs .= '<table class="form-table">' . "\n";
|
59 |
/**/
|
60 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
61 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before", get_defined_vars ());
|
62 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
63 |
/**/
|
64 |
if (is_multisite ()) /* Multisite Networking is currently lacking these fields; we pop them in. */
|
65 |
{
|
66 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
67 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_first_name", get_defined_vars ());
|
68 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
69 |
/**/
|
70 |
$unfs .= '<tr>' . "\n";
|
71 |
$unfs .= '<th><label for="ws-plugin--s2member-user-new-first-name">First Name:</label></th>' . "\n";
|
72 |
-
$unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_first_name" id="ws-plugin--s2member-user-new-first-name" value="' . esc_attr ($_p["ws_plugin__s2member_user_new_first_name"]) . '" class="regular-text" /></td>' . "\n";
|
73 |
$unfs .= '</tr>' . "\n";
|
74 |
/**/
|
75 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
76 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_first_name", get_defined_vars ());
|
77 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
78 |
/**/
|
79 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
80 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_last_name", get_defined_vars ());
|
81 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
82 |
/**/
|
83 |
$unfs .= '<tr>' . "\n";
|
84 |
$unfs .= '<th><label for="ws-plugin--s2member-user-new-last-name">Last Name:</label></th>' . "\n";
|
85 |
-
$unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_last_name" id="ws-plugin--s2member-user-new-last-name" value="' . esc_attr ($_p["ws_plugin__s2member_user_new_last_name"]) . '" class="regular-text" /></td>' . "\n";
|
86 |
$unfs .= '</tr>' . "\n";
|
87 |
/**/
|
88 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
89 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_last_name", get_defined_vars ());
|
90 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
91 |
}
|
92 |
/**/
|
93 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
94 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_subscr_gateway", get_defined_vars ());
|
95 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
96 |
/**/
|
@@ -103,82 +103,82 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
|
|
103 |
$unfs .= '</td>' . "\n";
|
104 |
$unfs .= '</tr>' . "\n";
|
105 |
/**/
|
106 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
107 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_subscr_gateway", get_defined_vars ());
|
108 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
109 |
/**/
|
110 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
111 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_subscr_id", get_defined_vars ());
|
112 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
113 |
/**/
|
114 |
$unfs .= '<tr>' . "\n";
|
115 |
$unfs .= '<th><label for="ws-plugin--s2member-user-new-s2member-subscr-id">Paid Subscr. ID:</label> <a href="#" onclick="alert(\'A Paid Subscription ID ( or a Buy Now Transaction ID ) is only valid for paid Members. Also known as ( a Recurring Profile ID, a ClickBank® Receipt #, a Google® TID/SID ( with an s2 prefix ), an AliPay® Trade No. ). Under normal circumstances, this is filled automatically by s2Member. This field is ONLY here for Customer Service purposes; just in case you ever need to enter a Paid Subscr. Gateway/ID manually. This field will be empty for Free Subscribers, and/or anyone who is NOT paying you.\\n\\nThe value of Paid® Subscr. ID, can be a PayPal® Standard `Subscription ID`, or a PayPal® Pro `Recurring Profile ID`, or a PayPal® `Transaction ID`; depending on the type of sale. Your PayPal® account will supply this information. If you\\\'re using Google® Checkout, use the TID/SID value in the sale Description; it always starts with `s2-`. ClickBank® provides a Receipt #, ccBill® provides a Subscription ID, Authorize.Net® provides a Subscription ID, and AliPay® provides a Transaction ID. The general rule is... if there\\\'s a Subscription ID, use that! If there\\\'s NOT, use the Transaction ID.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
|
116 |
-
$unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_s2member_subscr_id" id="ws-plugin--s2member-user-new-s2member-subscr-id" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_subscr_id"]) . '" class="regular-text" /></td>' . "\n";
|
117 |
$unfs .= '</tr>' . "\n";
|
118 |
/**/
|
119 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
120 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_subscr_id", get_defined_vars ());
|
121 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
122 |
/**/
|
123 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
124 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_custom", get_defined_vars ());
|
125 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
126 |
/**/
|
127 |
$unfs .= '<tr>' . "\n";
|
128 |
$unfs .= '<th><label for="ws-plugin--s2member-user-new-s2member-custom">Custom Value:</label> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\n' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
|
129 |
-
$unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_s2member_custom" id="ws-plugin--s2member-user-new-s2member-custom" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_custom"]) . '" class="regular-text" /></td>' . "\n";
|
130 |
$unfs .= '</tr>' . "\n";
|
131 |
/**/
|
132 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
133 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_custom", get_defined_vars ());
|
134 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
135 |
/**/
|
136 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
137 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_registration_ip", get_defined_vars ());
|
138 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
139 |
/**/
|
140 |
$unfs .= '<tr>' . "\n";
|
141 |
$unfs .= '<th><label for="ws-plugin--s2member-user-new-s2member-registration-ip">Registration IP:</label> <a href="#" onclick="alert(\'This is the IP Address the User had at the time of registration. If you don\\\'t know the User\\\'s IP Address, just leave this blank. If this is left empty, s2Member will make attempts in the future to grab the User\\\'s IP Address.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
|
142 |
-
$unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_s2member_registration_ip" id="ws-plugin--s2member-user-new-s2member-registration-ip" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_registration_ip"]) . '" class="regular-text" /></td>' . "\n";
|
143 |
$unfs .= '</tr>' . "\n";
|
144 |
/**/
|
145 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
146 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_registration_ip", get_defined_vars ());
|
147 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
148 |
/**/
|
149 |
if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ())
|
150 |
/* ^ Will change once Custom Capabilities are compatible with a Blog Farm. */
|
151 |
{
|
152 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
153 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_ccaps", get_defined_vars ());
|
154 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
155 |
/**/
|
156 |
$unfs .= '<tr>' . "\n";
|
157 |
$unfs .= '<th><label for="ws-plugin--s2member-user-new-s2member-ccaps">Custom Capabilities:</label> <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.' . ((is_multisite ()) ? '\\n\\nCustom Capabilities are assigned on a per-Blog basis. So having a set of Custom Capabilities for one Blog, and having NO Custom Capabilities on another Blog - is very common. This is how permissions are designed to work.' : '') . '\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
|
158 |
-
$unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_s2member_ccaps" id="ws-plugin--s2member-user-new-s2member-ccaps" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_ccaps"]) . '" class="regular-text" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></td>' . "\n";
|
159 |
$unfs .= '</tr>' . "\n";
|
160 |
/**/
|
161 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
162 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_ccaps", get_defined_vars ());
|
163 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
164 |
}
|
165 |
/**/
|
166 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
167 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_auto_eot_time", get_defined_vars ());
|
168 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
169 |
/**/
|
170 |
$unfs .= '<tr>' . "\n";
|
171 |
$unfs .= '<th><label for="ws-plugin--s2member-user-new-auto-eot-time">Automatic EOT Time:</label> <a href="#" onclick="alert(\'EOT = End Of Term. ( i.e. Account Expiration / Termination. ).\\n\\nIf you leave this empty, s2Member will configure an EOT Time automatically, based on the paid Subscription associated with this account. In other words, if a paid Subscription expires, is cancelled, terminated, refunded, reversed, or charged back to you; s2Member will deal with the EOT automatically.\\n\\nThat being said, if you would rather take control over this, you can. If you type in a date manually, s2Member will obey the Auto-EOT Time that you\\\'ve given, no matter what. In other words, you can force certain Members to expire automatically, at a time that you specify. s2Member will obey.\\n\\nValid formats for Automatic EOT Time:\\n\\nmm/dd/yyyy\\nyyyy-mm-dd\\n+1 year\\n+2 weeks\\n+2 months\\n+10 minutes\\nnext thursday\\ntomorrow\\ntoday\\n\\n* anything compatible with PHP\\\'s strtotime() function.\'); return false;" tabindex="-1">[?]</a>' . (($auto_eot_time) ? '<br /><small>( <a href="http://www.world-time-zones.org/zones/greenwich-mean-time.htm" target="_blank" rel="external">Universal Time / GMT</a> )</small>' : '') . '</th>' . "\n";
|
172 |
-
$unfs .= '<td><input type="text" name="ws_plugin__s2member_user_new_s2member_auto_eot_time" id="ws-plugin--s2member-user-new-auto-eot-time" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_auto_eot_time"]) . '" class="regular-text" /></td>' . "\n";
|
173 |
$unfs .= '</tr>' . "\n";
|
174 |
/**/
|
175 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
176 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_auto_eot_time", get_defined_vars ());
|
177 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
178 |
/**/
|
179 |
if (c_ws_plugin__s2member_list_servers::list_servers_integrated ()) /* Only if integrated with s2Member. */
|
180 |
{
|
181 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
182 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_opt_in", get_defined_vars ());
|
183 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
184 |
/**/
|
@@ -187,7 +187,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
|
|
187 |
$unfs .= '<td><label><input type="checkbox" name="ws_plugin__s2member_user_new_opt_in" id="ws-plugin--s2member-user-new-opt-in" value="1"' . (($_p["ws_plugin__s2member_user_new_opt_in"]) ? ' checked="checked"' : '') . ' /> Yes, send a mailing list confirmation email to this new User.</label></td>' . "\n";
|
188 |
$unfs .= '</tr>' . "\n";
|
189 |
/**/
|
190 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
191 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_opt_in", get_defined_vars ());
|
192 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
193 |
}
|
@@ -201,13 +201,13 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
|
|
201 |
$unfs .= '</td>' . "\n";
|
202 |
$unfs .= '</tr>' . "\n";
|
203 |
/**/
|
204 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
205 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_custom_fields", get_defined_vars ());
|
206 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
207 |
/**/
|
208 |
foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
|
209 |
{
|
210 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
211 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_during_custom_fields_before", get_defined_vars ());
|
212 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
213 |
/**/
|
@@ -216,7 +216,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
|
|
216 |
$field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
|
217 |
$field_id_class = preg_replace ("/_/", "-", $field_var);
|
218 |
/**/
|
219 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
220 |
if (apply_filters ("_ws_plugin__s2member_during_admin_user_new_fields_during_custom_fields_display", true, get_defined_vars ()))
|
221 |
{
|
222 |
if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
|
@@ -230,12 +230,12 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
|
|
230 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
231 |
}
|
232 |
/**/
|
233 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
234 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_during_custom_fields_after", get_defined_vars ());
|
235 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
236 |
}
|
237 |
/**/
|
238 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
239 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_custom_fields", get_defined_vars ());
|
240 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
241 |
/**/
|
@@ -246,7 +246,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
|
|
246 |
$unfs .= '</tr>' . "\n";
|
247 |
}
|
248 |
/**/
|
249 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
250 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_notes", get_defined_vars ());
|
251 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
252 |
/**/
|
@@ -255,11 +255,11 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
|
|
255 |
$unfs .= '<td><textarea name="ws_plugin__s2member_user_new_s2member_notes" id="ws-plugin--s2member-user-new-s2member-notes" rows="5" wrap="off" spellcheck="false" style="width:99%;">' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_notes"]) . '</textarea></td>' . "\n";
|
256 |
$unfs .= '</tr>' . "\n";
|
257 |
/**/
|
258 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
259 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_notes", get_defined_vars ());
|
260 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
261 |
/**/
|
262 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
263 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after", get_defined_vars ());
|
264 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
265 |
/**/
|
@@ -270,7 +270,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
|
|
270 |
$buffer = preg_replace ("/(\<\/table\>)(\s*)(\<p\s+class\s*\=\s*['\"]submit['\"]\s*\>)(\s*)(\<input\s+type\s*\=\s*['\"]submit['\"]\s+name\s*\=\s*['\"]createuser['\"])/", "$1$2\n" . $unfs . "$3$4$5", $buffer);
|
271 |
}
|
272 |
/**/
|
273 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
274 |
do_action ("_ws_plugin__s2member_after_admin_user_new_fields", get_defined_vars ());
|
275 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
276 |
/**/
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit ("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_user_new_in"))
|
21 |
{
|
35 |
* @package s2Member\New_Users
|
36 |
* @since 3.5
|
37 |
*
|
38 |
+
* @attaches-to ``ob_start("c_ws_plugin__s2member_user_new_in::_admin_user_new_fields");``
|
39 |
*
|
40 |
* @return str Output buffer.
|
41 |
*/
|
43 |
{
|
44 |
global $pagenow; /* The current admin page file name. */
|
45 |
/**/
|
46 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
47 |
do_action ("_ws_plugin__s2member_before_admin_user_new_fields", get_defined_vars ());
|
48 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
49 |
/**/
|
57 |
/**/
|
58 |
$unfs .= '<table class="form-table">' . "\n";
|
59 |
/**/
|
60 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
61 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before", get_defined_vars ());
|
62 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
63 |
/**/
|
64 |
if (is_multisite ()) /* Multisite Networking is currently lacking these fields; we pop them in. */
|
65 |
{
|
66 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
67 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_first_name", get_defined_vars ());
|
68 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
69 |
/**/
|
70 |
$unfs .= '<tr>' . "\n";
|
71 |
$unfs .= '<th><label for="ws-plugin--s2member-user-new-first-name">First Name:</label></th>' . "\n";
|
72 |
+
$unfs .= '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_user_new_first_name" id="ws-plugin--s2member-user-new-first-name" value="' . esc_attr ($_p["ws_plugin__s2member_user_new_first_name"]) . '" class="regular-text" /></td>' . "\n";
|
73 |
$unfs .= '</tr>' . "\n";
|
74 |
/**/
|
75 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
76 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_first_name", get_defined_vars ());
|
77 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
78 |
/**/
|
79 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
80 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_last_name", get_defined_vars ());
|
81 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
82 |
/**/
|
83 |
$unfs .= '<tr>' . "\n";
|
84 |
$unfs .= '<th><label for="ws-plugin--s2member-user-new-last-name">Last Name:</label></th>' . "\n";
|
85 |
+
$unfs .= '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_user_new_last_name" id="ws-plugin--s2member-user-new-last-name" value="' . esc_attr ($_p["ws_plugin__s2member_user_new_last_name"]) . '" class="regular-text" /></td>' . "\n";
|
86 |
$unfs .= '</tr>' . "\n";
|
87 |
/**/
|
88 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
89 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_last_name", get_defined_vars ());
|
90 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
91 |
}
|
92 |
/**/
|
93 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
94 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_subscr_gateway", get_defined_vars ());
|
95 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
96 |
/**/
|
103 |
$unfs .= '</td>' . "\n";
|
104 |
$unfs .= '</tr>' . "\n";
|
105 |
/**/
|
106 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
107 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_subscr_gateway", get_defined_vars ());
|
108 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
109 |
/**/
|
110 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
111 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_subscr_id", get_defined_vars ());
|
112 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
113 |
/**/
|
114 |
$unfs .= '<tr>' . "\n";
|
115 |
$unfs .= '<th><label for="ws-plugin--s2member-user-new-s2member-subscr-id">Paid Subscr. ID:</label> <a href="#" onclick="alert(\'A Paid Subscription ID ( or a Buy Now Transaction ID ) is only valid for paid Members. Also known as ( a Recurring Profile ID, a ClickBank® Receipt #, a Google® TID/SID ( with an s2 prefix ), an AliPay® Trade No. ). Under normal circumstances, this is filled automatically by s2Member. This field is ONLY here for Customer Service purposes; just in case you ever need to enter a Paid Subscr. Gateway/ID manually. This field will be empty for Free Subscribers, and/or anyone who is NOT paying you.\\n\\nThe value of Paid® Subscr. ID, can be a PayPal® Standard `Subscription ID`, or a PayPal® Pro `Recurring Profile ID`, or a PayPal® `Transaction ID`; depending on the type of sale. Your PayPal® account will supply this information. If you\\\'re using Google® Checkout, use the TID/SID value in the sale Description; it always starts with `s2-`. ClickBank® provides a Receipt #, ccBill® provides a Subscription ID, Authorize.Net® provides a Subscription ID, and AliPay® provides a Transaction ID. The general rule is... if there\\\'s a Subscription ID, use that! If there\\\'s NOT, use the Transaction ID.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
|
116 |
+
$unfs .= '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_user_new_s2member_subscr_id" id="ws-plugin--s2member-user-new-s2member-subscr-id" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_subscr_id"]) . '" class="regular-text" /></td>' . "\n";
|
117 |
$unfs .= '</tr>' . "\n";
|
118 |
/**/
|
119 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
120 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_subscr_id", get_defined_vars ());
|
121 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
122 |
/**/
|
123 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
124 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_custom", get_defined_vars ());
|
125 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
126 |
/**/
|
127 |
$unfs .= '<tr>' . "\n";
|
128 |
$unfs .= '<th><label for="ws-plugin--s2member-user-new-s2member-custom">Custom Value:</label> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\n' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
|
129 |
+
$unfs .= '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_user_new_s2member_custom" id="ws-plugin--s2member-user-new-s2member-custom" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_custom"]) . '" class="regular-text" /></td>' . "\n";
|
130 |
$unfs .= '</tr>' . "\n";
|
131 |
/**/
|
132 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
133 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_custom", get_defined_vars ());
|
134 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
135 |
/**/
|
136 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
137 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_registration_ip", get_defined_vars ());
|
138 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
139 |
/**/
|
140 |
$unfs .= '<tr>' . "\n";
|
141 |
$unfs .= '<th><label for="ws-plugin--s2member-user-new-s2member-registration-ip">Registration IP:</label> <a href="#" onclick="alert(\'This is the IP Address the User had at the time of registration. If you don\\\'t know the User\\\'s IP Address, just leave this blank. If this is left empty, s2Member will make attempts in the future to grab the User\\\'s IP Address.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
|
142 |
+
$unfs .= '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_user_new_s2member_registration_ip" id="ws-plugin--s2member-user-new-s2member-registration-ip" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_registration_ip"]) . '" class="regular-text" /></td>' . "\n";
|
143 |
$unfs .= '</tr>' . "\n";
|
144 |
/**/
|
145 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
146 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_registration_ip", get_defined_vars ());
|
147 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
148 |
/**/
|
149 |
if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ())
|
150 |
/* ^ Will change once Custom Capabilities are compatible with a Blog Farm. */
|
151 |
{
|
152 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
153 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_ccaps", get_defined_vars ());
|
154 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
155 |
/**/
|
156 |
$unfs .= '<tr>' . "\n";
|
157 |
$unfs .= '<th><label for="ws-plugin--s2member-user-new-s2member-ccaps">Custom Capabilities:</label> <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.' . ((is_multisite ()) ? '\\n\\nCustom Capabilities are assigned on a per-Blog basis. So having a set of Custom Capabilities for one Blog, and having NO Custom Capabilities on another Blog - is very common. This is how permissions are designed to work.' : '') . '\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
|
158 |
+
$unfs .= '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_user_new_s2member_ccaps" id="ws-plugin--s2member-user-new-s2member-ccaps" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_ccaps"]) . '" class="regular-text" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></td>' . "\n";
|
159 |
$unfs .= '</tr>' . "\n";
|
160 |
/**/
|
161 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
162 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_ccaps", get_defined_vars ());
|
163 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
164 |
}
|
165 |
/**/
|
166 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
167 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_auto_eot_time", get_defined_vars ());
|
168 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
169 |
/**/
|
170 |
$unfs .= '<tr>' . "\n";
|
171 |
$unfs .= '<th><label for="ws-plugin--s2member-user-new-auto-eot-time">Automatic EOT Time:</label> <a href="#" onclick="alert(\'EOT = End Of Term. ( i.e. Account Expiration / Termination. ).\\n\\nIf you leave this empty, s2Member will configure an EOT Time automatically, based on the paid Subscription associated with this account. In other words, if a paid Subscription expires, is cancelled, terminated, refunded, reversed, or charged back to you; s2Member will deal with the EOT automatically.\\n\\nThat being said, if you would rather take control over this, you can. If you type in a date manually, s2Member will obey the Auto-EOT Time that you\\\'ve given, no matter what. In other words, you can force certain Members to expire automatically, at a time that you specify. s2Member will obey.\\n\\nValid formats for Automatic EOT Time:\\n\\nmm/dd/yyyy\\nyyyy-mm-dd\\n+1 year\\n+2 weeks\\n+2 months\\n+10 minutes\\nnext thursday\\ntomorrow\\ntoday\\n\\n* anything compatible with PHP\\\'s strtotime() function.\'); return false;" tabindex="-1">[?]</a>' . (($auto_eot_time) ? '<br /><small>( <a href="http://www.world-time-zones.org/zones/greenwich-mean-time.htm" target="_blank" rel="external">Universal Time / GMT</a> )</small>' : '') . '</th>' . "\n";
|
172 |
+
$unfs .= '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_user_new_s2member_auto_eot_time" id="ws-plugin--s2member-user-new-auto-eot-time" value="' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_auto_eot_time"]) . '" class="regular-text" /></td>' . "\n";
|
173 |
$unfs .= '</tr>' . "\n";
|
174 |
/**/
|
175 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
176 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_auto_eot_time", get_defined_vars ());
|
177 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
178 |
/**/
|
179 |
if (c_ws_plugin__s2member_list_servers::list_servers_integrated ()) /* Only if integrated with s2Member. */
|
180 |
{
|
181 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
182 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_opt_in", get_defined_vars ());
|
183 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
184 |
/**/
|
187 |
$unfs .= '<td><label><input type="checkbox" name="ws_plugin__s2member_user_new_opt_in" id="ws-plugin--s2member-user-new-opt-in" value="1"' . (($_p["ws_plugin__s2member_user_new_opt_in"]) ? ' checked="checked"' : '') . ' /> Yes, send a mailing list confirmation email to this new User.</label></td>' . "\n";
|
188 |
$unfs .= '</tr>' . "\n";
|
189 |
/**/
|
190 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
191 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_opt_in", get_defined_vars ());
|
192 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
193 |
}
|
201 |
$unfs .= '</td>' . "\n";
|
202 |
$unfs .= '</tr>' . "\n";
|
203 |
/**/
|
204 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
205 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_custom_fields", get_defined_vars ());
|
206 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
207 |
/**/
|
208 |
foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
|
209 |
{
|
210 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
211 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_during_custom_fields_before", get_defined_vars ());
|
212 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
213 |
/**/
|
216 |
$field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
|
217 |
$field_id_class = preg_replace ("/_/", "-", $field_var);
|
218 |
/**/
|
219 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
220 |
if (apply_filters ("_ws_plugin__s2member_during_admin_user_new_fields_during_custom_fields_display", true, get_defined_vars ()))
|
221 |
{
|
222 |
if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
|
230 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
231 |
}
|
232 |
/**/
|
233 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
234 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_during_custom_fields_after", get_defined_vars ());
|
235 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
236 |
}
|
237 |
/**/
|
238 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
239 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_custom_fields", get_defined_vars ());
|
240 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
241 |
/**/
|
246 |
$unfs .= '</tr>' . "\n";
|
247 |
}
|
248 |
/**/
|
249 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
250 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_before_notes", get_defined_vars ());
|
251 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
252 |
/**/
|
255 |
$unfs .= '<td><textarea name="ws_plugin__s2member_user_new_s2member_notes" id="ws-plugin--s2member-user-new-s2member-notes" rows="5" wrap="off" spellcheck="false" style="width:99%;">' . format_to_edit ($_p["ws_plugin__s2member_user_new_s2member_notes"]) . '</textarea></td>' . "\n";
|
256 |
$unfs .= '</tr>' . "\n";
|
257 |
/**/
|
258 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
259 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after_notes", get_defined_vars ());
|
260 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
261 |
/**/
|
262 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
263 |
do_action ("_ws_plugin__s2member_during_admin_user_new_fields_after", get_defined_vars ());
|
264 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
265 |
/**/
|
270 |
$buffer = preg_replace ("/(\<\/table\>)(\s*)(\<p\s+class\s*\=\s*['\"]submit['\"]\s*\>)(\s*)(\<input\s+type\s*\=\s*['\"]submit['\"]\s+name\s*\=\s*['\"]createuser['\"])/", "$1$2\n" . $unfs . "$3$4$5", $buffer);
|
271 |
}
|
272 |
/**/
|
273 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
274 |
do_action ("_ws_plugin__s2member_after_admin_user_new_fields", get_defined_vars ());
|
275 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
276 |
/**/
|
includes/classes/user-new.inc.php
CHANGED
@@ -35,7 +35,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_new"))
|
|
35 |
* @package s2Member\New_Users
|
36 |
* @since 3.5
|
37 |
*
|
38 |
-
* @attaches-to
|
39 |
*
|
40 |
* @return null
|
41 |
*/
|
35 |
* @package s2Member\New_Users
|
36 |
* @since 3.5
|
37 |
*
|
38 |
+
* @attaches-to ``add_action("load-user-new.php");``
|
39 |
*
|
40 |
* @return null
|
41 |
*/
|
includes/classes/user-securities.inc.php
CHANGED
@@ -37,7 +37,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_securities"))
|
|
37 |
* @package s2Member\User_Securities
|
38 |
* @since 3.5
|
39 |
*
|
40 |
-
* @attaches-to
|
41 |
*
|
42 |
* @return null
|
43 |
*/
|
@@ -51,7 +51,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_securities"))
|
|
51 |
* @package s2Member\User_Securities
|
52 |
* @since 110815
|
53 |
*
|
54 |
-
* @attaches-to
|
55 |
*
|
56 |
* @param array $capabilities Expects an array of Capabilities passed in by the Filter.
|
57 |
* This array contains all of the Capabilities that the User has *( i.e. ``$user->allcaps`` )*.
|
@@ -84,7 +84,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_securities"))
|
|
84 |
* @package s2Member\User_Securities
|
85 |
* @since 3.5
|
86 |
*
|
87 |
-
* @attaches-to
|
88 |
*
|
89 |
* @param bool $allow Expects boolean value passed through by the Filter.
|
90 |
* @return bool True if the current User is allowed to edit any User, else existing value.
|
@@ -113,7 +113,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_securities"))
|
|
113 |
* @package s2Member\User_Securities
|
114 |
* @since 3.5
|
115 |
*
|
116 |
-
* @attaches-to
|
117 |
*
|
118 |
* @param bool $show Expects boolean value passed through by the Filter.
|
119 |
* @param obj $user Expects a `WP_User` object passed through by the Filter.
|
37 |
* @package s2Member\User_Securities
|
38 |
* @since 3.5
|
39 |
*
|
40 |
+
* @attaches-to ``add_action("init");``
|
41 |
*
|
42 |
* @return null
|
43 |
*/
|
51 |
* @package s2Member\User_Securities
|
52 |
* @since 110815
|
53 |
*
|
54 |
+
* @attaches-to ``add_filter("user_has_cap");``
|
55 |
*
|
56 |
* @param array $capabilities Expects an array of Capabilities passed in by the Filter.
|
57 |
* This array contains all of the Capabilities that the User has *( i.e. ``$user->allcaps`` )*.
|
84 |
* @package s2Member\User_Securities
|
85 |
* @since 3.5
|
86 |
*
|
87 |
+
* @attaches-to ``add_filter("enable_edit_any_user_configuration");``
|
88 |
*
|
89 |
* @param bool $allow Expects boolean value passed through by the Filter.
|
90 |
* @return bool True if the current User is allowed to edit any User, else existing value.
|
113 |
* @package s2Member\User_Securities
|
114 |
* @since 3.5
|
115 |
*
|
116 |
+
* @attaches-to ``add_filter("show_password_fields");``
|
117 |
*
|
118 |
* @param bool $show Expects boolean value passed through by the Filter.
|
119 |
* @param obj $user Expects a `WP_User` object passed through by the Filter.
|
includes/classes/users-list-in.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
21 |
{
|
@@ -33,8 +33,8 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
33 |
* @package s2Member\Users_List
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
-
* @attaches-to
|
38 |
*
|
39 |
* @param obj $user Expects a `WP_User` object passed in by the Action Hook.
|
40 |
* @return null
|
@@ -43,7 +43,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
43 |
{
|
44 |
global $current_site, $current_blog; /* Multisite Networking. */
|
45 |
/**/
|
46 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
47 |
do_action ("ws_plugin__s2member_before_users_list_edit_cols", get_defined_vars ());
|
48 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
49 |
/**/
|
@@ -62,28 +62,28 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
62 |
/**/
|
63 |
echo '<table class="form-table">' . "\n";
|
64 |
/**/
|
65 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
66 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before", get_defined_vars ());
|
67 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
68 |
/**/
|
69 |
if (is_multisite () && is_super_admin ()) /* MUST be a Super Admin. */
|
70 |
/* On a Multisite Network, the Super Administrator can ALWAYS edit this. */
|
71 |
{
|
72 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
73 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_originating_blog", get_defined_vars ());
|
74 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
75 |
/**/
|
76 |
echo '<tr>' . "\n";
|
77 |
echo '<th><label for="ws-plugin--s2member-profile-s2member-originating-blog">Originating Blog ID#:</label> <a href="#" onclick="alert(\'On a Multisite Network, this is how s2Member keeps track of which Blog each User/Member originated from. So this ID#, is automatically associated with a Blog in your Network, matching the User\\\'s point of origin. ~ ONLY a Super Admin can modify this.\\n\\nOn a Multisite Blog Farm, the Originating Blog ID# for your own Customers, will ALWAYS be associated with your ( Main Site ). It is NOT likely that you\\\'ll need to modify this manually, but s2Member makes it available; just in case.\\n\\n*Tip* - If you add Users ( and/or Blogs ) with the `Super Admin` Network Administration panel inside WordPress®, then you WILL need to set everything manually. s2Member does NOT tamper with automation routines whenever YOU ( as a Super Administrator ) are working in that area.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
|
78 |
-
echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_originating_blog" id="ws-plugin--s2member-profile-s2member-originating-blog" value="' . format_to_edit (get_user_meta ($user_id, "s2member_originating_blog", true)) . '" class="regular-text" /></td>' . "\n";
|
79 |
echo '</tr>' . "\n";
|
80 |
/**/
|
81 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
82 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_originating_blog", get_defined_vars ());
|
83 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
84 |
}
|
85 |
/**/
|
86 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
87 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_subscr_gateway", get_defined_vars ());
|
88 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
89 |
/**/
|
@@ -96,46 +96,46 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
96 |
echo '</td>' . "\n";
|
97 |
echo '</tr>' . "\n";
|
98 |
/**/
|
99 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
100 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_subscr_gateway", get_defined_vars ());
|
101 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
102 |
/**/
|
103 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
104 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_subscr_id", get_defined_vars ());
|
105 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
106 |
/**/
|
107 |
echo '<tr>' . "\n";
|
108 |
echo '<th><label for="ws-plugin--s2member-profile-s2member-subscr-id">Paid Subscr. ID:</label> <a href="#" onclick="alert(\'A Paid Subscription ID ( or a Buy Now Transaction ID ) is only valid for paid Members. Also known as ( a Recurring Profile ID, a ClickBank® Receipt #, a Google® TID/SID ( with an s2 prefix ), an AliPay® Trade No. ). This will be filled automatically by s2Member.\\n\\nThis field will be empty for Free Subscribers, and/or anyone who is NOT paying you. This field is only editable for Customer Service purposes; just in case you ever need to update the Paid Subscr. Gateway/ID manually.\\n\\nThe value of Paid® Subscr. ID, can be a PayPal® Standard `Subscription ID`, or a PayPal® Pro `Recurring Profile ID`, or a PayPal® `Transaction ID`; depending on the type of sale. Your PayPal® account will supply this information. If you\\\'re using Google® Checkout, use the TID/SID value in the sale Description; it always starts with `s2-`. ClickBank® provides a Receipt #, ccBill® provides a Subscription ID, Authorize.Net® provides a Subscription ID, and AliPay® provides a Transaction ID. The general rule is... IF there\\\'s a Subscription ID, use that! If there\\\'s NOT, use the Transaction ID.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
|
109 |
-
echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_subscr_id" id="ws-plugin--s2member-profile-s2member-subscr-id" value="' . format_to_edit (get_user_option ("s2member_subscr_id", $user_id)) . '" class="regular-text" /></td>' . "\n";
|
110 |
echo '</tr>' . "\n";
|
111 |
/**/
|
112 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
113 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_subscr_id", get_defined_vars ());
|
114 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
115 |
/**/
|
116 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
117 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_custom", get_defined_vars ());
|
118 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
119 |
/**/
|
120 |
echo '<tr>' . "\n";
|
121 |
echo '<th><label for="ws-plugin--s2member-profile-s2member-custom">Custom Value:</label> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\n' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
|
122 |
-
echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_custom" id="ws-plugin--s2member-profile-s2member-custom" value="' . format_to_edit (get_user_option ("s2member_custom", $user_id)) . '" class="regular-text" /></td>' . "\n";
|
123 |
echo '</tr>' . "\n";
|
124 |
/**/
|
125 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
126 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_custom", get_defined_vars ());
|
127 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
128 |
/**/
|
129 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
130 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_registration_ip", get_defined_vars ());
|
131 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
132 |
/**/
|
133 |
echo '<tr>' . "\n";
|
134 |
echo '<th><label for="ws-plugin--s2member-profile-s2member-registration-ip">Registration IP:</label> <a href="#" onclick="alert(\'This is the IP Address the User had at the time of registration. If you don\\\'t know the User\\\'s IP Address, just leave this blank. If this is left empty, s2Member will make attempts in the future to grab the User\\\'s IP Address.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
|
135 |
-
echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_registration_ip" id="ws-plugin--s2member-profile-s2member-registration-ip" value="' . format_to_edit (get_user_option ("s2member_registration_ip", $user_id)) . '" class="regular-text" /></td>' . "\n";
|
136 |
echo '</tr>' . "\n";
|
137 |
/**/
|
138 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
139 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_registration_ip", get_defined_vars ());
|
140 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
141 |
/**/
|
@@ -146,23 +146,23 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
146 |
if (preg_match ("/^access_s2member_ccap_/", $cap))
|
147 |
$ccaps[] = preg_replace ("/^access_s2member_ccap_/", "", $cap);
|
148 |
/**/
|
149 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
150 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_ccaps", get_defined_vars ());
|
151 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
152 |
/**/
|
153 |
echo '<tr>' . "\n";
|
154 |
echo '<th><label for="ws-plugin--s2member-profile-s2member-ccaps">Custom Capabilities:</label> <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.' . ((is_multisite ()) ? '\\n\\nCustom Capabilities are assigned on a per-Blog basis. So having a set of Custom Capabilities for one Blog, and having NO Custom Capabilities on another Blog - is very common. This is how permissions are designed to work.' : '') . '\'); return false;" tabindex="-1">[?]</a>' . ((is_multisite ()) ? '<br /><small>( for this Blog )</small>' : '') . '</th>' . "\n";
|
155 |
-
echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_ccaps" id="ws-plugin--s2member-profile-s2member-ccaps" value="' . format_to_edit (((!empty ($ccaps)) ? implode (",", $ccaps) : "")) . '" class="regular-text" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></td>' . "\n";
|
156 |
echo '</tr>' . "\n";
|
157 |
/**/
|
158 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
159 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_ccaps", get_defined_vars ());
|
160 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
161 |
}
|
162 |
/**/
|
163 |
if (!$user->has_cap ("administrator")) /* Do NOT present these details for Administrator accounts. */
|
164 |
{
|
165 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
166 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_auto_eot_time", get_defined_vars ());
|
167 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
168 |
/**/
|
@@ -170,17 +170,17 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
170 |
$auto_eot_time = get_user_option ("s2member_auto_eot_time", $user_id);
|
171 |
$auto_eot_time = ($auto_eot_time) ? date ("D M j, Y g:i a T", $auto_eot_time) : "";
|
172 |
echo '<th><label for="ws-plugin--s2member-profile-s2member-auto-eot-time">Automatic EOT Time:</label> <a href="#" onclick="alert(\'EOT = End Of Term. ( i.e. Account Expiration / Termination. ).\\n\\nIf you leave this empty, s2Member will configure an EOT Time automatically, based on the paid Subscription associated with this account. In other words, if a paid Subscription expires, is cancelled, terminated, refunded, reversed, or charged back to you; s2Member will deal with the EOT automatically.\\n\\nThat being said, if you would rather take control over this, you can. If you type in a date manually, s2Member will obey the Auto-EOT Time that you\\\'ve given, no matter what. In other words, you can force certain Members to expire automatically, at a time that you specify. s2Member will obey.\\n\\nValid formats for Automatic EOT Time:\\n\\nmm/dd/yyyy\\nyyyy-mm-dd\\n+1 year\\n+2 weeks\\n+2 months\\n+10 minutes\\nnext thursday\\ntomorrow\\ntoday\\n\\n* anything compatible with PHP\\\'s strtotime() function.\'); return false;" tabindex="-1">[?]</a>' . (($auto_eot_time) ? '<br /><small>( <a href="http://www.world-time-zones.org/zones/greenwich-mean-time.htm" target="_blank" rel="external">Universal Time / GMT</a> )</small>' : '') . '</th>' . "\n";
|
173 |
-
echo '<td><input type="text" name="ws_plugin__s2member_profile_s2member_auto_eot_time" id="ws-plugin--s2member-profile-s2member-auto-eot-time" value="' . format_to_edit ($auto_eot_time) . '" class="regular-text" /></td>' . "\n";
|
174 |
echo '</tr>' . "\n";
|
175 |
/**/
|
176 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
177 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_auto_eot_time", get_defined_vars ());
|
178 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
179 |
}
|
180 |
/**/
|
181 |
if (c_ws_plugin__s2member_list_servers::list_servers_integrated ()) /* Only if integrated with s2Member. */
|
182 |
{
|
183 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
184 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_opt_in", get_defined_vars ());
|
185 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
186 |
/**/
|
@@ -189,7 +189,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
189 |
echo '<td><label><input type="checkbox" name="ws_plugin__s2member_profile_opt_in" id="ws-plugin--s2member-profile-opt-in" value="1" /> Yes, send a mailing list confirmation email to this User.</label></td>' . "\n";
|
190 |
echo '</tr>' . "\n";
|
191 |
/**/
|
192 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
193 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_opt_in", get_defined_vars ());
|
194 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
195 |
/**/
|
@@ -197,7 +197,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
197 |
if (($custom_reg_auto_op_outs = c_ws_plugin__s2member_utils_strings::wrap_deep ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_outs"], "/^", "$/i")))
|
198 |
if (c_ws_plugin__s2member_utils_arrays::in_regex_array ("user-role-change", $custom_reg_auto_op_outs) || c_ws_plugin__s2member_utils_arrays::in_regex_array ("modification", $custom_reg_auto_op_outs))
|
199 |
{
|
200 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
201 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_auto_opt_out_transitions", get_defined_vars ());
|
202 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
203 |
/**/
|
@@ -206,13 +206,13 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
206 |
echo '<td><label><input type="checkbox" name="ws_plugin__s2member_custom_reg_auto_opt_out_transitions" id="ws-plugin--s2member-custom-reg-auto-opt-out-transitions" value="1" checked="checked" /> Yes, automatically transition this User\'s mailing list subscription(s) when/if I change their Role.</label></td>' . "\n";
|
207 |
echo '</tr>' . "\n";
|
208 |
/**/
|
209 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
210 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_auto_opt_out_transitions", get_defined_vars ());
|
211 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
212 |
}
|
213 |
}
|
214 |
/**/
|
215 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
216 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_ip_restrictions", get_defined_vars ());
|
217 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
218 |
/**/
|
@@ -221,7 +221,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
221 |
echo '<td><label><input type="checkbox" name="ws_plugin__s2member_profile_ip_restrictions" id="ws-plugin--s2member-profile-ip-restrictions" value="1" /> Yes, delete/reset IP Restrictions associated with this Username.</label>' . ((c_ws_plugin__s2member_ip_restrictions::specific_ip_restriction_breached_security (strtolower ($user->user_login))) ? '<br /><em>*Note* this User HAS breached security through existing IP Restrictions.</em>' : '<br /><em>*Note* this User is NOT currently banned by any of your IP Restrictions.</em>') . '</td>' . "\n";
|
222 |
echo '</tr>' . "\n";
|
223 |
/**/
|
224 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
225 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_ip_restrictions", get_defined_vars ());
|
226 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
227 |
/**/
|
@@ -236,13 +236,13 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
236 |
/**/
|
237 |
$fields = get_user_option ("s2member_custom_fields", $user_id); /* Existing fields. */
|
238 |
/**/
|
239 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
240 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_custom_fields", get_defined_vars ());
|
241 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
242 |
/**/
|
243 |
foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
|
244 |
{
|
245 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
246 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_before", get_defined_vars ());
|
247 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
248 |
/**/
|
@@ -251,7 +251,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
251 |
$field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
|
252 |
$field_id_class = preg_replace ("/_/", "-", $field_var);
|
253 |
/**/
|
254 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
255 |
if (apply_filters ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_display", true, get_defined_vars ()))
|
256 |
{
|
257 |
if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
|
@@ -265,12 +265,12 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
265 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
266 |
}
|
267 |
/**/
|
268 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
269 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_after", get_defined_vars ());
|
270 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
271 |
}
|
272 |
/**/
|
273 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
274 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_custom_fields", get_defined_vars ());
|
275 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
276 |
/**/
|
@@ -281,7 +281,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
281 |
echo '</tr>' . "\n";
|
282 |
}
|
283 |
/**/
|
284 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
285 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_notes", get_defined_vars ());
|
286 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
287 |
/**/
|
@@ -290,11 +290,11 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
290 |
echo '<td><textarea name="ws_plugin__s2member_profile_s2member_notes" id="ws-plugin--s2member-profile-s2member-notes" rows="5" wrap="off" spellcheck="false" style="width:99%;">' . format_to_edit (get_user_option ("s2member_notes", $user_id)) . '</textarea></td>' . "\n";
|
291 |
echo '</tr>' . "\n";
|
292 |
/**/
|
293 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
294 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_notes", get_defined_vars ());
|
295 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
296 |
/**/
|
297 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
298 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after", get_defined_vars ());
|
299 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
300 |
/**/
|
@@ -314,19 +314,19 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
314 |
/**/
|
315 |
echo '<table class="form-table">' . "\n";
|
316 |
/**/
|
317 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
318 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before", get_defined_vars ());
|
319 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
320 |
/**/
|
321 |
$fields = get_user_option ("s2member_custom_fields", $user_id); /* Existing fields. */
|
322 |
/**/
|
323 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
324 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_custom_fields", get_defined_vars ());
|
325 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
326 |
/**/
|
327 |
foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
|
328 |
{
|
329 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
330 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_before", get_defined_vars ());
|
331 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
332 |
/**/
|
@@ -335,7 +335,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
335 |
$field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
|
336 |
$field_id_class = preg_replace ("/_/", "-", $field_var);
|
337 |
/**/
|
338 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
339 |
if (apply_filters ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_display", true, get_defined_vars ()))
|
340 |
{
|
341 |
if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
|
@@ -349,16 +349,16 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
349 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
350 |
}
|
351 |
/**/
|
352 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
353 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_after", get_defined_vars ());
|
354 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
355 |
}
|
356 |
/**/
|
357 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
358 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_custom_fields", get_defined_vars ());
|
359 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
360 |
/**/
|
361 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
362 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after", get_defined_vars ());
|
363 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
364 |
/**/
|
@@ -369,7 +369,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
369 |
}
|
370 |
}
|
371 |
/**/
|
372 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
373 |
do_action ("ws_plugin__s2member_after_users_list_edit_cols", get_defined_vars ());
|
374 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
375 |
/**/
|
@@ -381,8 +381,8 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
381 |
* @package s2Member\Users_List
|
382 |
* @since 3.5
|
383 |
*
|
384 |
-
* @attaches-to
|
385 |
-
* @attaches-to
|
386 |
*
|
387 |
* @param int|str $user_id Expects a numeric WordPress® User ID passed in by the Action Hook.
|
388 |
* @return null
|
@@ -391,7 +391,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
391 |
{
|
392 |
global $current_site, $current_blog; /* Multisite Networking. */
|
393 |
/**/
|
394 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
395 |
do_action ("ws_plugin__s2member_before_users_list_update_cols", get_defined_vars ());
|
396 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
397 |
/**/
|
@@ -465,10 +465,10 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
465 |
if ((is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && !empty ($_p["ws_plugin__s2member_profile_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_" . $field_var]) && strlen ($_p["ws_plugin__s2member_profile_" . $field_var])))
|
466 |
$fields[$field_var] = $_p["ws_plugin__s2member_profile_" . $field_var];
|
467 |
else /* Else unset. */
|
468 |
-
unset($fields[$field_var]);
|
469 |
}
|
470 |
else /* Else ``unset()``. */
|
471 |
-
unset($fields[$field_var]);
|
472 |
}
|
473 |
}
|
474 |
/**/
|
@@ -491,7 +491,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
491 |
if (!empty ($_p["ws_plugin__s2member_profile_ip_restrictions"])) /* Delete/reset IP Restrictions? */
|
492 |
c_ws_plugin__s2member_ip_restrictions::delete_reset_specific_ip_restrictions (strtolower ($user->user_login));
|
493 |
/**/
|
494 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
495 |
do_action ("ws_plugin__s2member_during_users_list_update_cols", get_defined_vars ());
|
496 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
497 |
}
|
@@ -519,24 +519,24 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
519 |
if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || (is_string ($_existing_fields[$field_var]) && strlen ($_existing_fields[$field_var]))))
|
520 |
$fields[$field_var] = $_existing_fields[$field_var];
|
521 |
else /* Else ``unset()``. */
|
522 |
-
unset($fields[$field_var]);
|
523 |
}
|
524 |
else if ($field["required"] === "yes" && (!isset ($_p["ws_plugin__s2member_profile_" . $field_var]) || (!is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && !is_string ($_p["ws_plugin__s2member_profile_" . $field_var])) || (is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && empty ($_p["ws_plugin__s2member_profile_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_" . $field_var]) && !strlen ($_p["ws_plugin__s2member_profile_" . $field_var]))))
|
525 |
{
|
526 |
if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || (is_string ($_existing_fields[$field_var]) && strlen ($_existing_fields[$field_var]))))
|
527 |
$fields[$field_var] = $_existing_fields[$field_var];
|
528 |
else /* Else ``unset()``. */
|
529 |
-
unset($fields[$field_var]);
|
530 |
}
|
531 |
else if (isset ($_p["ws_plugin__s2member_profile_" . $field_var]))
|
532 |
{
|
533 |
if ((is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && !empty ($_p["ws_plugin__s2member_profile_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_" . $field_var]) && strlen ($_p["ws_plugin__s2member_profile_" . $field_var])))
|
534 |
$fields[$field_var] = $_p["ws_plugin__s2member_profile_" . $field_var];
|
535 |
else /* Else ``unset()``. */
|
536 |
-
unset($fields[$field_var]);
|
537 |
}
|
538 |
else /* Else ``unset()``. */
|
539 |
-
unset($fields[$field_var]);
|
540 |
}
|
541 |
/**/
|
542 |
if (!empty ($fields))
|
@@ -545,14 +545,14 @@ if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
|
545 |
delete_user_option ($user_id, "s2member_custom_fields");
|
546 |
}
|
547 |
/**/
|
548 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
549 |
do_action ("ws_plugin__s2member_during_users_list_update_cols", get_defined_vars ());
|
550 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
551 |
}
|
552 |
}
|
553 |
}
|
554 |
/**/
|
555 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
556 |
do_action ("ws_plugin__s2member_after_users_list_update_cols", get_defined_vars ());
|
557 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
558 |
/**/
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit ("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_users_list_in"))
|
21 |
{
|
33 |
* @package s2Member\Users_List
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("edit_user_profile");``
|
37 |
+
* @attaches-to ``add_action("show_user_profile");``
|
38 |
*
|
39 |
* @param obj $user Expects a `WP_User` object passed in by the Action Hook.
|
40 |
* @return null
|
43 |
{
|
44 |
global $current_site, $current_blog; /* Multisite Networking. */
|
45 |
/**/
|
46 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
47 |
do_action ("ws_plugin__s2member_before_users_list_edit_cols", get_defined_vars ());
|
48 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
49 |
/**/
|
62 |
/**/
|
63 |
echo '<table class="form-table">' . "\n";
|
64 |
/**/
|
65 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
66 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before", get_defined_vars ());
|
67 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
68 |
/**/
|
69 |
if (is_multisite () && is_super_admin ()) /* MUST be a Super Admin. */
|
70 |
/* On a Multisite Network, the Super Administrator can ALWAYS edit this. */
|
71 |
{
|
72 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
73 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_originating_blog", get_defined_vars ());
|
74 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
75 |
/**/
|
76 |
echo '<tr>' . "\n";
|
77 |
echo '<th><label for="ws-plugin--s2member-profile-s2member-originating-blog">Originating Blog ID#:</label> <a href="#" onclick="alert(\'On a Multisite Network, this is how s2Member keeps track of which Blog each User/Member originated from. So this ID#, is automatically associated with a Blog in your Network, matching the User\\\'s point of origin. ~ ONLY a Super Admin can modify this.\\n\\nOn a Multisite Blog Farm, the Originating Blog ID# for your own Customers, will ALWAYS be associated with your ( Main Site ). It is NOT likely that you\\\'ll need to modify this manually, but s2Member makes it available; just in case.\\n\\n*Tip* - If you add Users ( and/or Blogs ) with the `Super Admin` Network Administration panel inside WordPress®, then you WILL need to set everything manually. s2Member does NOT tamper with automation routines whenever YOU ( as a Super Administrator ) are working in that area.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
|
78 |
+
echo '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_profile_s2member_originating_blog" id="ws-plugin--s2member-profile-s2member-originating-blog" value="' . format_to_edit (get_user_meta ($user_id, "s2member_originating_blog", true)) . '" class="regular-text" /></td>' . "\n";
|
79 |
echo '</tr>' . "\n";
|
80 |
/**/
|
81 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
82 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_originating_blog", get_defined_vars ());
|
83 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
84 |
}
|
85 |
/**/
|
86 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
87 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_subscr_gateway", get_defined_vars ());
|
88 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
89 |
/**/
|
96 |
echo '</td>' . "\n";
|
97 |
echo '</tr>' . "\n";
|
98 |
/**/
|
99 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
100 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_subscr_gateway", get_defined_vars ());
|
101 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
102 |
/**/
|
103 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
104 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_subscr_id", get_defined_vars ());
|
105 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
106 |
/**/
|
107 |
echo '<tr>' . "\n";
|
108 |
echo '<th><label for="ws-plugin--s2member-profile-s2member-subscr-id">Paid Subscr. ID:</label> <a href="#" onclick="alert(\'A Paid Subscription ID ( or a Buy Now Transaction ID ) is only valid for paid Members. Also known as ( a Recurring Profile ID, a ClickBank® Receipt #, a Google® TID/SID ( with an s2 prefix ), an AliPay® Trade No. ). This will be filled automatically by s2Member.\\n\\nThis field will be empty for Free Subscribers, and/or anyone who is NOT paying you. This field is only editable for Customer Service purposes; just in case you ever need to update the Paid Subscr. Gateway/ID manually.\\n\\nThe value of Paid® Subscr. ID, can be a PayPal® Standard `Subscription ID`, or a PayPal® Pro `Recurring Profile ID`, or a PayPal® `Transaction ID`; depending on the type of sale. Your PayPal® account will supply this information. If you\\\'re using Google® Checkout, use the TID/SID value in the sale Description; it always starts with `s2-`. ClickBank® provides a Receipt #, ccBill® provides a Subscription ID, Authorize.Net® provides a Subscription ID, and AliPay® provides a Transaction ID. The general rule is... IF there\\\'s a Subscription ID, use that! If there\\\'s NOT, use the Transaction ID.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
|
109 |
+
echo '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_profile_s2member_subscr_id" id="ws-plugin--s2member-profile-s2member-subscr-id" value="' . format_to_edit (get_user_option ("s2member_subscr_id", $user_id)) . '" class="regular-text" /></td>' . "\n";
|
110 |
echo '</tr>' . "\n";
|
111 |
/**/
|
112 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
113 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_subscr_id", get_defined_vars ());
|
114 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
115 |
/**/
|
116 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
117 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_custom", get_defined_vars ());
|
118 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
119 |
/**/
|
120 |
echo '<tr>' . "\n";
|
121 |
echo '<th><label for="ws-plugin--s2member-profile-s2member-custom">Custom Value:</label> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\n' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
|
122 |
+
echo '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_profile_s2member_custom" id="ws-plugin--s2member-profile-s2member-custom" value="' . format_to_edit (get_user_option ("s2member_custom", $user_id)) . '" class="regular-text" /></td>' . "\n";
|
123 |
echo '</tr>' . "\n";
|
124 |
/**/
|
125 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
126 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_custom", get_defined_vars ());
|
127 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
128 |
/**/
|
129 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
130 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_registration_ip", get_defined_vars ());
|
131 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
132 |
/**/
|
133 |
echo '<tr>' . "\n";
|
134 |
echo '<th><label for="ws-plugin--s2member-profile-s2member-registration-ip">Registration IP:</label> <a href="#" onclick="alert(\'This is the IP Address the User had at the time of registration. If you don\\\'t know the User\\\'s IP Address, just leave this blank. If this is left empty, s2Member will make attempts in the future to grab the User\\\'s IP Address.\'); return false;" tabindex="-1">[?]</a></th>' . "\n";
|
135 |
+
echo '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_profile_s2member_registration_ip" id="ws-plugin--s2member-profile-s2member-registration-ip" value="' . format_to_edit (get_user_option ("s2member_registration_ip", $user_id)) . '" class="regular-text" /></td>' . "\n";
|
136 |
echo '</tr>' . "\n";
|
137 |
/**/
|
138 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
139 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_registration_ip", get_defined_vars ());
|
140 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
141 |
/**/
|
146 |
if (preg_match ("/^access_s2member_ccap_/", $cap))
|
147 |
$ccaps[] = preg_replace ("/^access_s2member_ccap_/", "", $cap);
|
148 |
/**/
|
149 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
150 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_ccaps", get_defined_vars ());
|
151 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
152 |
/**/
|
153 |
echo '<tr>' . "\n";
|
154 |
echo '<th><label for="ws-plugin--s2member-profile-s2member-ccaps">Custom Capabilities:</label> <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.' . ((is_multisite ()) ? '\\n\\nCustom Capabilities are assigned on a per-Blog basis. So having a set of Custom Capabilities for one Blog, and having NO Custom Capabilities on another Blog - is very common. This is how permissions are designed to work.' : '') . '\'); return false;" tabindex="-1">[?]</a>' . ((is_multisite ()) ? '<br /><small>( for this Blog )</small>' : '') . '</th>' . "\n";
|
155 |
+
echo '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_profile_s2member_ccaps" id="ws-plugin--s2member-profile-s2member-ccaps" value="' . format_to_edit (((!empty ($ccaps)) ? implode (",", $ccaps) : "")) . '" class="regular-text" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></td>' . "\n";
|
156 |
echo '</tr>' . "\n";
|
157 |
/**/
|
158 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
159 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_ccaps", get_defined_vars ());
|
160 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
161 |
}
|
162 |
/**/
|
163 |
if (!$user->has_cap ("administrator")) /* Do NOT present these details for Administrator accounts. */
|
164 |
{
|
165 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
166 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_auto_eot_time", get_defined_vars ());
|
167 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
168 |
/**/
|
170 |
$auto_eot_time = get_user_option ("s2member_auto_eot_time", $user_id);
|
171 |
$auto_eot_time = ($auto_eot_time) ? date ("D M j, Y g:i a T", $auto_eot_time) : "";
|
172 |
echo '<th><label for="ws-plugin--s2member-profile-s2member-auto-eot-time">Automatic EOT Time:</label> <a href="#" onclick="alert(\'EOT = End Of Term. ( i.e. Account Expiration / Termination. ).\\n\\nIf you leave this empty, s2Member will configure an EOT Time automatically, based on the paid Subscription associated with this account. In other words, if a paid Subscription expires, is cancelled, terminated, refunded, reversed, or charged back to you; s2Member will deal with the EOT automatically.\\n\\nThat being said, if you would rather take control over this, you can. If you type in a date manually, s2Member will obey the Auto-EOT Time that you\\\'ve given, no matter what. In other words, you can force certain Members to expire automatically, at a time that you specify. s2Member will obey.\\n\\nValid formats for Automatic EOT Time:\\n\\nmm/dd/yyyy\\nyyyy-mm-dd\\n+1 year\\n+2 weeks\\n+2 months\\n+10 minutes\\nnext thursday\\ntomorrow\\ntoday\\n\\n* anything compatible with PHP\\\'s strtotime() function.\'); return false;" tabindex="-1">[?]</a>' . (($auto_eot_time) ? '<br /><small>( <a href="http://www.world-time-zones.org/zones/greenwich-mean-time.htm" target="_blank" rel="external">Universal Time / GMT</a> )</small>' : '') . '</th>' . "\n";
|
173 |
+
echo '<td><input type="text" autocomplete="off" name="ws_plugin__s2member_profile_s2member_auto_eot_time" id="ws-plugin--s2member-profile-s2member-auto-eot-time" value="' . format_to_edit ($auto_eot_time) . '" class="regular-text" /></td>' . "\n";
|
174 |
echo '</tr>' . "\n";
|
175 |
/**/
|
176 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
177 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_auto_eot_time", get_defined_vars ());
|
178 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
179 |
}
|
180 |
/**/
|
181 |
if (c_ws_plugin__s2member_list_servers::list_servers_integrated ()) /* Only if integrated with s2Member. */
|
182 |
{
|
183 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
184 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_opt_in", get_defined_vars ());
|
185 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
186 |
/**/
|
189 |
echo '<td><label><input type="checkbox" name="ws_plugin__s2member_profile_opt_in" id="ws-plugin--s2member-profile-opt-in" value="1" /> Yes, send a mailing list confirmation email to this User.</label></td>' . "\n";
|
190 |
echo '</tr>' . "\n";
|
191 |
/**/
|
192 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
193 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_opt_in", get_defined_vars ());
|
194 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
195 |
/**/
|
197 |
if (($custom_reg_auto_op_outs = c_ws_plugin__s2member_utils_strings::wrap_deep ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_auto_opt_outs"], "/^", "$/i")))
|
198 |
if (c_ws_plugin__s2member_utils_arrays::in_regex_array ("user-role-change", $custom_reg_auto_op_outs) || c_ws_plugin__s2member_utils_arrays::in_regex_array ("modification", $custom_reg_auto_op_outs))
|
199 |
{
|
200 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
201 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_auto_opt_out_transitions", get_defined_vars ());
|
202 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
203 |
/**/
|
206 |
echo '<td><label><input type="checkbox" name="ws_plugin__s2member_custom_reg_auto_opt_out_transitions" id="ws-plugin--s2member-custom-reg-auto-opt-out-transitions" value="1" checked="checked" /> Yes, automatically transition this User\'s mailing list subscription(s) when/if I change their Role.</label></td>' . "\n";
|
207 |
echo '</tr>' . "\n";
|
208 |
/**/
|
209 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
210 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_auto_opt_out_transitions", get_defined_vars ());
|
211 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
212 |
}
|
213 |
}
|
214 |
/**/
|
215 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
216 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_ip_restrictions", get_defined_vars ());
|
217 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
218 |
/**/
|
221 |
echo '<td><label><input type="checkbox" name="ws_plugin__s2member_profile_ip_restrictions" id="ws-plugin--s2member-profile-ip-restrictions" value="1" /> Yes, delete/reset IP Restrictions associated with this Username.</label>' . ((c_ws_plugin__s2member_ip_restrictions::specific_ip_restriction_breached_security (strtolower ($user->user_login))) ? '<br /><em>*Note* this User HAS breached security through existing IP Restrictions.</em>' : '<br /><em>*Note* this User is NOT currently banned by any of your IP Restrictions.</em>') . '</td>' . "\n";
|
222 |
echo '</tr>' . "\n";
|
223 |
/**/
|
224 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
225 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_ip_restrictions", get_defined_vars ());
|
226 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
227 |
/**/
|
236 |
/**/
|
237 |
$fields = get_user_option ("s2member_custom_fields", $user_id); /* Existing fields. */
|
238 |
/**/
|
239 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
240 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_custom_fields", get_defined_vars ());
|
241 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
242 |
/**/
|
243 |
foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
|
244 |
{
|
245 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
246 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_before", get_defined_vars ());
|
247 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
248 |
/**/
|
251 |
$field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
|
252 |
$field_id_class = preg_replace ("/_/", "-", $field_var);
|
253 |
/**/
|
254 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
255 |
if (apply_filters ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_display", true, get_defined_vars ()))
|
256 |
{
|
257 |
if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
|
265 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
266 |
}
|
267 |
/**/
|
268 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
269 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_after", get_defined_vars ());
|
270 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
271 |
}
|
272 |
/**/
|
273 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
274 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_custom_fields", get_defined_vars ());
|
275 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
276 |
/**/
|
281 |
echo '</tr>' . "\n";
|
282 |
}
|
283 |
/**/
|
284 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
285 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_notes", get_defined_vars ());
|
286 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
287 |
/**/
|
290 |
echo '<td><textarea name="ws_plugin__s2member_profile_s2member_notes" id="ws-plugin--s2member-profile-s2member-notes" rows="5" wrap="off" spellcheck="false" style="width:99%;">' . format_to_edit (get_user_option ("s2member_notes", $user_id)) . '</textarea></td>' . "\n";
|
291 |
echo '</tr>' . "\n";
|
292 |
/**/
|
293 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
294 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_notes", get_defined_vars ());
|
295 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
296 |
/**/
|
297 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
298 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after", get_defined_vars ());
|
299 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
300 |
/**/
|
314 |
/**/
|
315 |
echo '<table class="form-table">' . "\n";
|
316 |
/**/
|
317 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
318 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before", get_defined_vars ());
|
319 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
320 |
/**/
|
321 |
$fields = get_user_option ("s2member_custom_fields", $user_id); /* Existing fields. */
|
322 |
/**/
|
323 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
324 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_before_custom_fields", get_defined_vars ());
|
325 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
326 |
/**/
|
327 |
foreach (json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true) as $field)
|
328 |
{
|
329 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
330 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_before", get_defined_vars ());
|
331 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
332 |
/**/
|
335 |
$field_var = preg_replace ("/[^a-z0-9]/i", "_", strtolower ($field["id"]));
|
336 |
$field_id_class = preg_replace ("/_/", "-", $field_var);
|
337 |
/**/
|
338 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
339 |
if (apply_filters ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_display", true, get_defined_vars ()))
|
340 |
{
|
341 |
if (!empty ($field["section"]) && $field["section"] === "yes") /* Starts a new section? */
|
349 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
350 |
}
|
351 |
/**/
|
352 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
353 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_during_custom_fields_after", get_defined_vars ());
|
354 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
355 |
}
|
356 |
/**/
|
357 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
358 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after_custom_fields", get_defined_vars ());
|
359 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
360 |
/**/
|
361 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
362 |
do_action ("ws_plugin__s2member_during_users_list_edit_cols_after", get_defined_vars ());
|
363 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
364 |
/**/
|
369 |
}
|
370 |
}
|
371 |
/**/
|
372 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
373 |
do_action ("ws_plugin__s2member_after_users_list_edit_cols", get_defined_vars ());
|
374 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
375 |
/**/
|
381 |
* @package s2Member\Users_List
|
382 |
* @since 3.5
|
383 |
*
|
384 |
+
* @attaches-to ``add_action("edit_user_profile_update");``
|
385 |
+
* @attaches-to ``add_action("personal_options_update");``
|
386 |
*
|
387 |
* @param int|str $user_id Expects a numeric WordPress® User ID passed in by the Action Hook.
|
388 |
* @return null
|
391 |
{
|
392 |
global $current_site, $current_blog; /* Multisite Networking. */
|
393 |
/**/
|
394 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
395 |
do_action ("ws_plugin__s2member_before_users_list_update_cols", get_defined_vars ());
|
396 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
397 |
/**/
|
465 |
if ((is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && !empty ($_p["ws_plugin__s2member_profile_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_" . $field_var]) && strlen ($_p["ws_plugin__s2member_profile_" . $field_var])))
|
466 |
$fields[$field_var] = $_p["ws_plugin__s2member_profile_" . $field_var];
|
467 |
else /* Else unset. */
|
468 |
+
unset ($fields[$field_var]);
|
469 |
}
|
470 |
else /* Else ``unset()``. */
|
471 |
+
unset ($fields[$field_var]);
|
472 |
}
|
473 |
}
|
474 |
/**/
|
491 |
if (!empty ($_p["ws_plugin__s2member_profile_ip_restrictions"])) /* Delete/reset IP Restrictions? */
|
492 |
c_ws_plugin__s2member_ip_restrictions::delete_reset_specific_ip_restrictions (strtolower ($user->user_login));
|
493 |
/**/
|
494 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
495 |
do_action ("ws_plugin__s2member_during_users_list_update_cols", get_defined_vars ());
|
496 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
497 |
}
|
519 |
if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || (is_string ($_existing_fields[$field_var]) && strlen ($_existing_fields[$field_var]))))
|
520 |
$fields[$field_var] = $_existing_fields[$field_var];
|
521 |
else /* Else ``unset()``. */
|
522 |
+
unset ($fields[$field_var]);
|
523 |
}
|
524 |
else if ($field["required"] === "yes" && (!isset ($_p["ws_plugin__s2member_profile_" . $field_var]) || (!is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && !is_string ($_p["ws_plugin__s2member_profile_" . $field_var])) || (is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && empty ($_p["ws_plugin__s2member_profile_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_" . $field_var]) && !strlen ($_p["ws_plugin__s2member_profile_" . $field_var]))))
|
525 |
{
|
526 |
if (isset ($_existing_fields[$field_var]) && ((is_array ($_existing_fields[$field_var]) && !empty ($_existing_fields[$field_var])) || (is_string ($_existing_fields[$field_var]) && strlen ($_existing_fields[$field_var]))))
|
527 |
$fields[$field_var] = $_existing_fields[$field_var];
|
528 |
else /* Else ``unset()``. */
|
529 |
+
unset ($fields[$field_var]);
|
530 |
}
|
531 |
else if (isset ($_p["ws_plugin__s2member_profile_" . $field_var]))
|
532 |
{
|
533 |
if ((is_array ($_p["ws_plugin__s2member_profile_" . $field_var]) && !empty ($_p["ws_plugin__s2member_profile_" . $field_var])) || (is_string ($_p["ws_plugin__s2member_profile_" . $field_var]) && strlen ($_p["ws_plugin__s2member_profile_" . $field_var])))
|
534 |
$fields[$field_var] = $_p["ws_plugin__s2member_profile_" . $field_var];
|
535 |
else /* Else ``unset()``. */
|
536 |
+
unset ($fields[$field_var]);
|
537 |
}
|
538 |
else /* Else ``unset()``. */
|
539 |
+
unset ($fields[$field_var]);
|
540 |
}
|
541 |
/**/
|
542 |
if (!empty ($fields))
|
545 |
delete_user_option ($user_id, "s2member_custom_fields");
|
546 |
}
|
547 |
/**/
|
548 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
549 |
do_action ("ws_plugin__s2member_during_users_list_update_cols", get_defined_vars ());
|
550 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
551 |
}
|
552 |
}
|
553 |
}
|
554 |
/**/
|
555 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
556 |
do_action ("ws_plugin__s2member_after_users_list_update_cols", get_defined_vars ());
|
557 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
558 |
/**/
|
includes/classes/users-list.inc.php
CHANGED
@@ -33,8 +33,8 @@ if (!class_exists ("c_ws_plugin__s2member_users_list"))
|
|
33 |
* @package s2Member\Users_List
|
34 |
* @since 3.5
|
35 |
*
|
36 |
-
* @attaches-to
|
37 |
-
* @attaches-to
|
38 |
*
|
39 |
* @param obj $user Expects a `WP_User` object passed in by the Action Hook.
|
40 |
* @return inner Return-value of inner routine.
|
@@ -49,8 +49,8 @@ if (!class_exists ("c_ws_plugin__s2member_users_list"))
|
|
49 |
* @package s2Member\Users_List
|
50 |
* @since 3.5
|
51 |
*
|
52 |
-
* @attaches-to
|
53 |
-
* @attaches-to
|
54 |
*
|
55 |
* @param int|str $user_id Expects a numeric WordPress® User ID passed in by the Action Hook.
|
56 |
* @return inner Return-value of inner routine.
|
@@ -67,7 +67,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list"))
|
|
67 |
* @package s2Member\Users_List
|
68 |
* @since 3.5
|
69 |
*
|
70 |
-
* @attaches-to
|
71 |
*
|
72 |
* @param obj $query Expects a `WP_User_Query` object, by reference.
|
73 |
* @return null After possibly modifying the ``$query`` object.
|
@@ -110,7 +110,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list"))
|
|
110 |
* @package s2Member\Users_List
|
111 |
* @since 3.5
|
112 |
*
|
113 |
-
* @attaches-to
|
114 |
*
|
115 |
* @param array $columns Expects an array of columns to be passed through by the Filter.
|
116 |
* @return array Array of columns, merged with columns introduced by this routine.
|
@@ -155,7 +155,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list"))
|
|
155 |
* @package s2Member\Users_List
|
156 |
* @since 3.5
|
157 |
*
|
158 |
-
* @attaches-to
|
159 |
*
|
160 |
* @param str $val A value for this column, passed through by the Filter.
|
161 |
* @param str $col The name of the column for which we might need to supply data for.
|
33 |
* @package s2Member\Users_List
|
34 |
* @since 3.5
|
35 |
*
|
36 |
+
* @attaches-to ``add_action("edit_user_profile");``
|
37 |
+
* @attaches-to ``add_action("show_user_profile");``
|
38 |
*
|
39 |
* @param obj $user Expects a `WP_User` object passed in by the Action Hook.
|
40 |
* @return inner Return-value of inner routine.
|
49 |
* @package s2Member\Users_List
|
50 |
* @since 3.5
|
51 |
*
|
52 |
+
* @attaches-to ``add_action("edit_user_profile_update");``
|
53 |
+
* @attaches-to ``add_action("personal_options_update");``
|
54 |
*
|
55 |
* @param int|str $user_id Expects a numeric WordPress® User ID passed in by the Action Hook.
|
56 |
* @return inner Return-value of inner routine.
|
67 |
* @package s2Member\Users_List
|
68 |
* @since 3.5
|
69 |
*
|
70 |
+
* @attaches-to ``add_action("pre_user_query");``
|
71 |
*
|
72 |
* @param obj $query Expects a `WP_User_Query` object, by reference.
|
73 |
* @return null After possibly modifying the ``$query`` object.
|
110 |
* @package s2Member\Users_List
|
111 |
* @since 3.5
|
112 |
*
|
113 |
+
* @attaches-to ``add_filter ("manage_users_columns");``
|
114 |
*
|
115 |
* @param array $columns Expects an array of columns to be passed through by the Filter.
|
116 |
* @return array Array of columns, merged with columns introduced by this routine.
|
155 |
* @package s2Member\Users_List
|
156 |
* @since 3.5
|
157 |
*
|
158 |
+
* @attaches-to ``add_filter ("manage_users_custom_column");``
|
159 |
*
|
160 |
* @param str $val A value for this column, passed through by the Filter.
|
161 |
* @param str $col The name of the column for which we might need to supply data for.
|
includes/classes/utils-arrays.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_utils_arrays"))
|
21 |
{
|
@@ -65,18 +65,17 @@ if (!class_exists ("c_ws_plugin__s2member_utils_arrays"))
|
|
65 |
{
|
66 |
foreach ($array as $value)
|
67 |
{
|
68 |
-
if (is_array ($value)
|
69 |
{
|
70 |
if (c_ws_plugin__s2member_utils_arrays::regex_in_array ($regex, $value))
|
71 |
return true;
|
72 |
}
|
73 |
-
else if (is_string ($value)
|
74 |
{
|
75 |
if (@preg_match ($regex, $value))
|
76 |
return true;
|
77 |
}
|
78 |
}
|
79 |
-
/**/
|
80 |
return false;
|
81 |
}
|
82 |
else /* False. */
|
@@ -98,18 +97,17 @@ if (!class_exists ("c_ws_plugin__s2member_utils_arrays"))
|
|
98 |
{
|
99 |
foreach ($array as $value)
|
100 |
{
|
101 |
-
if (is_array ($value)
|
102 |
{
|
103 |
if (c_ws_plugin__s2member_utils_arrays::in_regex_array ($string, $value))
|
104 |
return true;
|
105 |
}
|
106 |
-
else if (is_string ($value)
|
107 |
{
|
108 |
if (@preg_match ($value, $string))
|
109 |
return true;
|
110 |
}
|
111 |
}
|
112 |
-
/**/
|
113 |
return false;
|
114 |
}
|
115 |
else /* False. */
|
@@ -130,11 +128,11 @@ if (!class_exists ("c_ws_plugin__s2member_utils_arrays"))
|
|
130 |
/**/
|
131 |
foreach ($array as $key => &$value)
|
132 |
{
|
133 |
-
if (is_array ($value)
|
134 |
$value = c_ws_plugin__s2member_utils_arrays::remove_null_keys ($value);
|
135 |
/**/
|
136 |
-
else if (is_null ($value)
|
137 |
-
unset
|
138 |
}
|
139 |
return $array;
|
140 |
}
|
@@ -153,10 +151,10 @@ if (!class_exists ("c_ws_plugin__s2member_utils_arrays"))
|
|
153 |
/**/
|
154 |
foreach ($array as &$value)
|
155 |
{
|
156 |
-
if (is_array ($value)
|
157 |
$value = c_ws_plugin__s2member_utils_arrays::force_strings ($value);
|
158 |
/**/
|
159 |
-
else if (!is_string ($value)
|
160 |
$value = (string)$value;
|
161 |
}
|
162 |
return $array;
|
@@ -176,14 +174,36 @@ if (!class_exists ("c_ws_plugin__s2member_utils_arrays"))
|
|
176 |
/**/
|
177 |
foreach ($array as &$value)
|
178 |
{
|
179 |
-
if (is_array ($value)
|
180 |
$value = c_ws_plugin__s2member_utils_arrays::force_integers ($value);
|
181 |
/**/
|
182 |
-
else if (!is_integer ($value)
|
183 |
$value = (int)$value;
|
184 |
}
|
185 |
return $array;
|
186 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
}
|
188 |
}
|
189 |
?>
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_utils_arrays"))
|
21 |
{
|
65 |
{
|
66 |
foreach ($array as $value)
|
67 |
{
|
68 |
+
if (is_array ($value) /* Recursive function call? */)
|
69 |
{
|
70 |
if (c_ws_plugin__s2member_utils_arrays::regex_in_array ($regex, $value))
|
71 |
return true;
|
72 |
}
|
73 |
+
else if (is_string ($value) /* Must be a string. */)
|
74 |
{
|
75 |
if (@preg_match ($regex, $value))
|
76 |
return true;
|
77 |
}
|
78 |
}
|
|
|
79 |
return false;
|
80 |
}
|
81 |
else /* False. */
|
97 |
{
|
98 |
foreach ($array as $value)
|
99 |
{
|
100 |
+
if (is_array ($value) /* Recursive function call. */)
|
101 |
{
|
102 |
if (c_ws_plugin__s2member_utils_arrays::in_regex_array ($string, $value))
|
103 |
return true;
|
104 |
}
|
105 |
+
else if (is_string ($value) /* Must be a string. */)
|
106 |
{
|
107 |
if (@preg_match ($value, $string))
|
108 |
return true;
|
109 |
}
|
110 |
}
|
|
|
111 |
return false;
|
112 |
}
|
113 |
else /* False. */
|
128 |
/**/
|
129 |
foreach ($array as $key => &$value)
|
130 |
{
|
131 |
+
if (is_array ($value) /* Recursive function call here. */)
|
132 |
$value = c_ws_plugin__s2member_utils_arrays::remove_null_keys ($value);
|
133 |
/**/
|
134 |
+
else if (is_null ($value) /* Is it null? */)
|
135 |
+
unset($array[$key]);
|
136 |
}
|
137 |
return $array;
|
138 |
}
|
151 |
/**/
|
152 |
foreach ($array as &$value)
|
153 |
{
|
154 |
+
if (is_array ($value) /* Recursive function call here. */)
|
155 |
$value = c_ws_plugin__s2member_utils_arrays::force_strings ($value);
|
156 |
/**/
|
157 |
+
else if (!is_string ($value) /* String? */)
|
158 |
$value = (string)$value;
|
159 |
}
|
160 |
return $array;
|
174 |
/**/
|
175 |
foreach ($array as &$value)
|
176 |
{
|
177 |
+
if (is_array ($value) /* Recursive function call here. */)
|
178 |
$value = c_ws_plugin__s2member_utils_arrays::force_integers ($value);
|
179 |
/**/
|
180 |
+
else if (!is_integer ($value) /* Integer? */)
|
181 |
$value = (int)$value;
|
182 |
}
|
183 |
return $array;
|
184 |
}
|
185 |
+
/**
|
186 |
+
* Sorts arrays *( also supports multi-dimensional arrays )* by key, low to high.
|
187 |
+
*
|
188 |
+
* @package s2Member\Utilities
|
189 |
+
* @since 111205
|
190 |
+
*
|
191 |
+
* @param array $array An input array.
|
192 |
+
* @param int $flags Optional. Can be used to modify the sorting behavior.
|
193 |
+
* See: {@link http://www.php.net/manual/en/function.ksort.php}
|
194 |
+
* @return Unlike PHP's ``ksort()``, this function returns the array, and does NOT work on a reference.
|
195 |
+
*/
|
196 |
+
function ksort_deep ($array = FALSE, $flags = SORT_REGULAR)
|
197 |
+
{
|
198 |
+
$array = (array)$array;
|
199 |
+
ksort /* Sort by key. */ ($array, $flags);
|
200 |
+
/**/
|
201 |
+
foreach ($array as &$value)
|
202 |
+
if (is_array ($value) /* Recursive function call here. */)
|
203 |
+
$value = c_ws_plugin__s2member_utils_arrays::ksort_deep ($value, $flags);
|
204 |
+
/**/
|
205 |
+
return /* Now return the array. */ $array;
|
206 |
+
}
|
207 |
}
|
208 |
}
|
209 |
?>
|
includes/classes/utils-captchas.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_utils_captchas"))
|
21 |
{
|
@@ -28,7 +28,22 @@ if (!class_exists ("c_ws_plugin__s2member_utils_captchas"))
|
|
28 |
class c_ws_plugin__s2member_utils_captchas
|
29 |
{
|
30 |
/**
|
31 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
*
|
33 |
* @package s2Member\Utilities
|
34 |
* @since 3.5
|
@@ -39,12 +54,13 @@ if (!class_exists ("c_ws_plugin__s2member_utils_captchas"))
|
|
39 |
*/
|
40 |
public static function recaptcha_code_validates ($challenge = FALSE, $response = FALSE)
|
41 |
{
|
42 |
-
$
|
|
|
43 |
/**/
|
44 |
return preg_match ("/^true/i", trim (c_ws_plugin__s2member_utils_urls::remote ("http://www.google.com/recaptcha/api/verify", $post_vars)));
|
45 |
}
|
46 |
/**
|
47 |
-
* Builds a
|
48 |
*
|
49 |
* @package s2Member\Utilities
|
50 |
* @since 3.5
|
@@ -56,14 +72,15 @@ if (!class_exists ("c_ws_plugin__s2member_utils_captchas"))
|
|
56 |
*/
|
57 |
public static function recaptcha_script_tag ($theme = FALSE, $tabindex = FALSE, $error = FALSE)
|
58 |
{
|
59 |
-
$theme = ($theme) ? $theme : "clean";
|
60 |
-
$tabindex = (strlen ($tabindex)) ? (int)$tabindex : -1;
|
|
|
61 |
/**/
|
62 |
$options = '<script type="text/javascript">' . "if(typeof RecaptchaOptions !== 'object'){ var RecaptchaOptions = {theme: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq ($theme) . "', lang: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["recaptcha"]["lang"]) . "', tabindex: " . $tabindex . " }; }" . '</script>' . "\n";
|
63 |
$no_tabindex_icons = '<script type="text/javascript">' . "if(typeof jQuery === 'function'){ jQuery('td a[id^=\"recaptcha\"]').removeAttr('tabindex'); }" . '</script>';
|
64 |
$adjustments = (!apply_filters ("c_ws_plugin__s2member_utils_tabindex_recaptcha_icons", false, get_defined_vars ())) ? $no_tabindex_icons : "";
|
65 |
/**/
|
66 |
-
return $options . '<script type="text/javascript" src="' . esc_attr ('https://www.google.com/recaptcha/api/challenge?k=' . urlencode ($
|
67 |
}
|
68 |
}
|
69 |
}
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit ("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_utils_captchas"))
|
21 |
{
|
28 |
class c_ws_plugin__s2member_utils_captchas
|
29 |
{
|
30 |
/**
|
31 |
+
* Public/private keys to use for reCAPTCHA™.
|
32 |
+
*
|
33 |
+
* @package s2Member\Utilities
|
34 |
+
* @since 111203
|
35 |
+
*
|
36 |
+
* @return array An array with with two elements: `public` and `private`.
|
37 |
+
*/
|
38 |
+
public static function recaptcha_keys ()
|
39 |
+
{
|
40 |
+
$public = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["recaptcha"]["public_key"];
|
41 |
+
$private = /* Private key. */ $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["recaptcha"]["private_key"];
|
42 |
+
/**/
|
43 |
+
return apply_filters ("ws_plugin__s2member_recaptcha_keys", array ("public" => $public, "private" => $private), get_defined_vars ());
|
44 |
+
}
|
45 |
+
/**
|
46 |
+
* Verifies a reCAPTCHA™ code via Google®.
|
47 |
*
|
48 |
* @package s2Member\Utilities
|
49 |
* @since 3.5
|
54 |
*/
|
55 |
public static function recaptcha_code_validates ($challenge = FALSE, $response = FALSE)
|
56 |
{
|
57 |
+
$keys = c_ws_plugin__s2member_utils_captchas::recaptcha_keys ();
|
58 |
+
$post_vars = array ("privatekey" => $keys["private"], "remoteip" => $_SERVER["REMOTE_ADDR"], "challenge" => $challenge, "response" => $response);
|
59 |
/**/
|
60 |
return preg_match ("/^true/i", trim (c_ws_plugin__s2member_utils_urls::remote ("http://www.google.com/recaptcha/api/verify", $post_vars)));
|
61 |
}
|
62 |
/**
|
63 |
+
* Builds a reCAPTCHA™ JavaScript `script` tag for display.
|
64 |
*
|
65 |
* @package s2Member\Utilities
|
66 |
* @since 3.5
|
72 |
*/
|
73 |
public static function recaptcha_script_tag ($theme = FALSE, $tabindex = FALSE, $error = FALSE)
|
74 |
{
|
75 |
+
$theme = ($theme) ? $theme : "clean";
|
76 |
+
$tabindex = (strlen ($tabindex)) ? (int)$tabindex : -1;
|
77 |
+
$keys = c_ws_plugin__s2member_utils_captchas::recaptcha_keys ();
|
78 |
/**/
|
79 |
$options = '<script type="text/javascript">' . "if(typeof RecaptchaOptions !== 'object'){ var RecaptchaOptions = {theme: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq ($theme) . "', lang: '" . c_ws_plugin__s2member_utils_strings::esc_js_sq ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["recaptcha"]["lang"]) . "', tabindex: " . $tabindex . " }; }" . '</script>' . "\n";
|
80 |
$no_tabindex_icons = '<script type="text/javascript">' . "if(typeof jQuery === 'function'){ jQuery('td a[id^=\"recaptcha\"]').removeAttr('tabindex'); }" . '</script>';
|
81 |
$adjustments = (!apply_filters ("c_ws_plugin__s2member_utils_tabindex_recaptcha_icons", false, get_defined_vars ())) ? $no_tabindex_icons : "";
|
82 |
/**/
|
83 |
+
return $options . '<script type="text/javascript" src="' . esc_attr ('https://www.google.com/recaptcha/api/challenge?k=' . urlencode ($keys["public"])) . '' . (($error) ? '&error=' . urlencode ($error) : '') . '"></script>' . $adjustments;
|
84 |
}
|
85 |
}
|
86 |
}
|
includes/classes/utils-conds.inc.php
CHANGED
@@ -37,8 +37,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
|
|
37 |
*/
|
38 |
public static function pro_is_installed ()
|
39 |
{
|
40 |
-
return (defined ("WS_PLUGIN__S2MEMBER_PRO_VERSION")
|
41 |
-
/* And loaded? */ && did_action ("ws_plugin__s2member_pro_after_loaded"));
|
42 |
}
|
43 |
/**
|
44 |
* Determines whether or not BuddyPress is installed.
|
@@ -67,7 +66,6 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
|
|
67 |
if (plugin_basename ($active_plugin) === $buddypress)
|
68 |
return true; /* BuddyPress active. */
|
69 |
}
|
70 |
-
/**/
|
71 |
return false; /* Default return false. */
|
72 |
}
|
73 |
/**
|
@@ -104,8 +102,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
|
|
104 |
if ($descendants && in_category ($descendants, $post_id))
|
105 |
return true;
|
106 |
}
|
107 |
-
|
108 |
-
return false;
|
109 |
}
|
110 |
/**
|
111 |
* Checks to see if a URL/URI leads to the site root.
|
@@ -113,12 +110,12 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
|
|
113 |
* @package s2Member\Utilities
|
114 |
* @since 3.5
|
115 |
*
|
116 |
-
* @param str $
|
117 |
* @return bool True if the URL or URI leads to the site root, else false.
|
118 |
*/
|
119 |
-
public static function is_site_root ($
|
120 |
{
|
121 |
-
if (is_array ($parse = c_ws_plugin__s2member_utils_urls::parse_url ($
|
122 |
{
|
123 |
$parse["path"] = (!empty ($parse["path"])) ? ((strpos ($parse["path"], "/") === 0) ? $parse["path"] : "/" . $parse["path"]) : "/";
|
124 |
/**/
|
@@ -126,8 +123,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
|
|
126 |
if ($parse["path"] === "/" || rtrim ($parse["path"], "/") === rtrim (c_ws_plugin__s2member_utils_urls::parse_url (site_url (), PHP_URL_PATH), "/"))
|
127 |
return true;
|
128 |
}
|
129 |
-
|
130 |
-
return false;
|
131 |
}
|
132 |
/**
|
133 |
* Checks to see if we're in a localhost environment.
|
@@ -142,7 +138,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
|
|
142 |
if ((defined ("LOCALHOST") && LOCALHOST) || stripos ($_SERVER["HTTP_HOST"], "localhost") !== false || strpos ($_SERVER["HTTP_HOST"], "127.0.0.1") !== false)
|
143 |
return true;
|
144 |
/**/
|
145 |
-
return false;
|
146 |
}
|
147 |
/**
|
148 |
* Checks to see if we're using Amazon® S3.
|
@@ -163,8 +159,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
|
|
163 |
if ($s3c["bucket"] && $s3c["access_key"] && $s3c["secret_key"])
|
164 |
return true;
|
165 |
}
|
166 |
-
|
167 |
-
return false;
|
168 |
}
|
169 |
/**
|
170 |
* Checks to see if we're using Amazon® CloudFront.
|
@@ -188,7 +183,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
|
|
188 |
if ($cfc["private_key"] && $cfc["private_key_id"] && $cfc["distros_access_id"] && $cfc["distros_s3_access_id"] && $cfc["distro_downloads_id"] && $cfc["distro_downloads_dname"] && $cfc["distro_streaming_id"] && $cfc["distro_streaming_dname"])
|
189 |
return true;
|
190 |
/**/
|
191 |
-
return false;
|
192 |
}
|
193 |
}
|
194 |
}
|
37 |
*/
|
38 |
public static function pro_is_installed ()
|
39 |
{
|
40 |
+
return (defined ("WS_PLUGIN__S2MEMBER_PRO_VERSION") && did_action ("ws_plugin__s2member_pro_loaded"));
|
|
|
41 |
}
|
42 |
/**
|
43 |
* Determines whether or not BuddyPress is installed.
|
66 |
if (plugin_basename ($active_plugin) === $buddypress)
|
67 |
return true; /* BuddyPress active. */
|
68 |
}
|
|
|
69 |
return false; /* Default return false. */
|
70 |
}
|
71 |
/**
|
102 |
if ($descendants && in_category ($descendants, $post_id))
|
103 |
return true;
|
104 |
}
|
105 |
+
return false; /* Default return false. */
|
|
|
106 |
}
|
107 |
/**
|
108 |
* Checks to see if a URL/URI leads to the site root.
|
110 |
* @package s2Member\Utilities
|
111 |
* @since 3.5
|
112 |
*
|
113 |
+
* @param str $url_uri Either a full URL, or a partial URI to test.
|
114 |
* @return bool True if the URL or URI leads to the site root, else false.
|
115 |
*/
|
116 |
+
public static function is_site_root ($url_uri = FALSE)
|
117 |
{
|
118 |
+
if (is_array ($parse = c_ws_plugin__s2member_utils_urls::parse_url ($url_uri)))
|
119 |
{
|
120 |
$parse["path"] = (!empty ($parse["path"])) ? ((strpos ($parse["path"], "/") === 0) ? $parse["path"] : "/" . $parse["path"]) : "/";
|
121 |
/**/
|
123 |
if ($parse["path"] === "/" || rtrim ($parse["path"], "/") === rtrim (c_ws_plugin__s2member_utils_urls::parse_url (site_url (), PHP_URL_PATH), "/"))
|
124 |
return true;
|
125 |
}
|
126 |
+
return false; /* Default return false. */
|
|
|
127 |
}
|
128 |
/**
|
129 |
* Checks to see if we're in a localhost environment.
|
138 |
if ((defined ("LOCALHOST") && LOCALHOST) || stripos ($_SERVER["HTTP_HOST"], "localhost") !== false || strpos ($_SERVER["HTTP_HOST"], "127.0.0.1") !== false)
|
139 |
return true;
|
140 |
/**/
|
141 |
+
return false; /* Default return false. */
|
142 |
}
|
143 |
/**
|
144 |
* Checks to see if we're using Amazon® S3.
|
159 |
if ($s3c["bucket"] && $s3c["access_key"] && $s3c["secret_key"])
|
160 |
return true;
|
161 |
}
|
162 |
+
return false; /* Default return false. */
|
|
|
163 |
}
|
164 |
/**
|
165 |
* Checks to see if we're using Amazon® CloudFront.
|
183 |
if ($cfc["private_key"] && $cfc["private_key_id"] && $cfc["distros_access_id"] && $cfc["distros_s3_access_id"] && $cfc["distro_downloads_id"] && $cfc["distro_downloads_dname"] && $cfc["distro_streaming_id"] && $cfc["distro_streaming_dname"])
|
184 |
return true;
|
185 |
/**/
|
186 |
+
return false; /* Default return false. */
|
187 |
}
|
188 |
}
|
189 |
}
|
includes/classes/utils-dirs.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_utils_dirs"))
|
21 |
{
|
@@ -28,7 +28,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_dirs"))
|
|
28 |
class c_ws_plugin__s2member_utils_dirs
|
29 |
{
|
30 |
/**
|
31 |
-
* Normalizes directory separators.
|
32 |
*
|
33 |
* @package s2Member\Utilities
|
34 |
* @since 111017
|
@@ -122,7 +122,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_dirs"))
|
|
122 |
/**/
|
123 |
if (($_from_drive_jctn_exists = (is_dir ($_from_drive_jctn)) ? true : false) || c_ws_plugin__s2member_utils_dirs::create_win_jctn ($_jctn, $_to_drive . ":/"))
|
124 |
{
|
125 |
-
array_shift /* Shift drive off and use junction now. */($to);
|
126 |
foreach (array_reverse (preg_split ("/\//", (($_from_drive_jctn_exists) ? $_from_drive_jctn : $_jctn))) as $_jctn_dir)
|
127 |
array_unshift ($to, $_jctn_dir);
|
128 |
}
|
@@ -140,7 +140,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_dirs"))
|
|
140 |
foreach (array_keys ($from) as $_depth) /* Each ``$from`` directory ``$_depth``. */
|
141 |
{
|
142 |
if (isset ($from[$_depth], $to[$_depth]) && $from[$_depth] === $to[$_depth])
|
143 |
-
array_shift($rel_path);
|
144 |
/**/
|
145 |
else if (($_remaining = count ($from) - $_depth) > 1)
|
146 |
{
|
@@ -177,7 +177,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_dirs"))
|
|
177 |
/**/
|
178 |
else if ( /* Possible? */function_exists ("shell_exec") && ($esa = "escapeshellarg"))
|
179 |
{
|
180 |
-
@shell_exec("mklink /J " . $esa ($jctn) . " " . $esa ($target));
|
181 |
/**/
|
182 |
clearstatcache (); /* Clear ``stat()`` cache now. */
|
183 |
if (is_dir ($jctn)) /* Created successfully? */
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit ("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_utils_dirs"))
|
21 |
{
|
28 |
class c_ws_plugin__s2member_utils_dirs
|
29 |
{
|
30 |
/**
|
31 |
+
* Normalizes directory separators in dir/file paths.
|
32 |
*
|
33 |
* @package s2Member\Utilities
|
34 |
* @since 111017
|
122 |
/**/
|
123 |
if (($_from_drive_jctn_exists = (is_dir ($_from_drive_jctn)) ? true : false) || c_ws_plugin__s2member_utils_dirs::create_win_jctn ($_jctn, $_to_drive . ":/"))
|
124 |
{
|
125 |
+
array_shift /* Shift drive off and use junction now. */ ($to);
|
126 |
foreach (array_reverse (preg_split ("/\//", (($_from_drive_jctn_exists) ? $_from_drive_jctn : $_jctn))) as $_jctn_dir)
|
127 |
array_unshift ($to, $_jctn_dir);
|
128 |
}
|
140 |
foreach (array_keys ($from) as $_depth) /* Each ``$from`` directory ``$_depth``. */
|
141 |
{
|
142 |
if (isset ($from[$_depth], $to[$_depth]) && $from[$_depth] === $to[$_depth])
|
143 |
+
array_shift ($rel_path);
|
144 |
/**/
|
145 |
else if (($_remaining = count ($from) - $_depth) > 1)
|
146 |
{
|
177 |
/**/
|
178 |
else if ( /* Possible? */function_exists ("shell_exec") && ($esa = "escapeshellarg"))
|
179 |
{
|
180 |
+
@shell_exec ("mklink /J " . $esa ($jctn) . " " . $esa ($target));
|
181 |
/**/
|
182 |
clearstatcache (); /* Clear ``stat()`` cache now. */
|
183 |
if (is_dir ($jctn)) /* Created successfully? */
|
includes/classes/utils-encryption.inc.php
CHANGED
@@ -28,72 +28,88 @@ if (!class_exists ("c_ws_plugin__s2member_utils_encryption"))
|
|
28 |
class c_ws_plugin__s2member_utils_encryption
|
29 |
{
|
30 |
/**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
* RIJNDAEL 256: two-way encryption/decryption, with a URL-safe base64 wrapper.
|
32 |
*
|
33 |
-
*
|
34 |
*
|
35 |
* @package s2Member\Utilities
|
36 |
* @since 3.5
|
37 |
*
|
38 |
* @param str $string A string of data to encrypt.
|
39 |
-
* @param str $key Optional. Key used for encryption.
|
40 |
-
*
|
41 |
-
* Short of that, defaults to: ``wp_salt()``.
|
42 |
* @return str Encrypted string.
|
43 |
*/
|
44 |
-
public static function encrypt ($string = FALSE, $key = FALSE)
|
45 |
{
|
46 |
-
$string = (is_string ($string)) ? $string : "";
|
47 |
-
/**/
|
48 |
-
$key = (!is_string ($key) || !strlen ($key)) ? $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"] : $key;
|
49 |
-
$key = (!is_string ($key) || !strlen ($key)) ? wp_salt () : $key;
|
50 |
-
/**/
|
51 |
if (function_exists ("mcrypt_encrypt") && in_array ("rijndael-256", mcrypt_list_algorithms ()) && in_array ("cbc", mcrypt_list_modes ()))
|
52 |
{
|
53 |
-
$string = (
|
54 |
-
$
|
|
|
|
|
|
|
|
|
55 |
$iv = c_ws_plugin__s2member_utils_strings::random_str_gen (mcrypt_get_iv_size (MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC), false);
|
56 |
-
$encrypted = mcrypt_encrypt (MCRYPT_RIJNDAEL_256, $key, $string, MCRYPT_MODE_CBC, $iv);
|
57 |
-
$encrypted = (strlen ($encrypted)) ? "~r2:" . $iv . "|" . $encrypted : "";
|
58 |
/**/
|
59 |
-
|
|
|
|
|
|
|
60 |
}
|
61 |
else /* Fallback on XOR encryption. */
|
62 |
-
return c_ws_plugin__s2member_utils_encryption::xencrypt ($string, $key);
|
63 |
}
|
64 |
/**
|
65 |
* RIJNDAEL 256: two-way encryption/decryption, with a URL-safe base64 wrapper.
|
66 |
*
|
67 |
-
*
|
68 |
*
|
69 |
* @package s2Member\Utilities
|
70 |
* @since 3.5
|
71 |
*
|
72 |
* @param str $base64 A string of data to decrypt. Should still be base64 encoded.
|
73 |
-
* @param str $key Optional. Key used originally for encryption.
|
74 |
-
* Defaults to the one configured for s2Member.
|
75 |
-
* Short of that, defaults to: ``wp_salt()``.
|
76 |
* @return str Decrypted string.
|
77 |
*/
|
78 |
public static function decrypt ($base64 = FALSE, $key = FALSE)
|
79 |
{
|
80 |
-
$base64 = (is_string ($base64)) ? $base64 : "";
|
81 |
-
|
82 |
-
$key = (!is_string ($key) || !strlen ($key)) ? $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"] : $key;
|
83 |
-
$key = (!is_string ($key) || !strlen ($key)) ? wp_salt () : $key;
|
84 |
/**/
|
85 |
-
|
86 |
-
|
87 |
-
if (function_exists ("mcrypt_decrypt") && in_array ("rijndael-256", mcrypt_list_algorithms ()) && in_array ("cbc", mcrypt_list_modes ()) && preg_match ("/^~r2\:(.+?)\|/", $encrypted, $v1))
|
88 |
{
|
89 |
-
$
|
90 |
-
$key = substr ($key, 0, mcrypt_get_key_size (MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC));
|
91 |
-
|
92 |
-
$
|
93 |
-
|
94 |
-
$decrypted = rtrim ($decrypted, "\0\4"); /* Nulls/EOTs. */
|
95 |
/**/
|
96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
}
|
98 |
else /* Fallback on XOR decryption. */
|
99 |
return c_ws_plugin__s2member_utils_encryption::xdecrypt ($base64, $key);
|
@@ -105,30 +121,26 @@ if (!class_exists ("c_ws_plugin__s2member_utils_encryption"))
|
|
105 |
* @since 3.5
|
106 |
*
|
107 |
* @param str $string A string of data to encrypt.
|
108 |
-
* @param str $key Optional. Key used for encryption.
|
109 |
-
*
|
110 |
-
* Short of that, defaults to: ``wp_salt()``.
|
111 |
* @return str Encrypted string.
|
112 |
*/
|
113 |
-
public static function xencrypt ($string = FALSE, $key = FALSE)
|
114 |
{
|
115 |
-
$string = (is_string ($string)) ? $string : "";
|
116 |
-
|
117 |
-
$key = (!is_string ($key) || !strlen ($key)) ? $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"] : $key;
|
118 |
-
$key = (!is_string ($key) || !strlen ($key)) ? wp_salt () : $key;
|
119 |
/**/
|
120 |
-
$
|
121 |
/**/
|
122 |
-
for ($i = 1, $
|
123 |
{
|
124 |
$char = substr ($string, $i - 1, 1);
|
125 |
$keychar = substr ($key, ($i % strlen ($key)) - 1, 1);
|
126 |
-
$
|
127 |
}
|
|
|
128 |
/**/
|
129 |
-
|
130 |
-
/**/
|
131 |
-
return ($base64 = c_ws_plugin__s2member_utils_strings::base64_url_safe_encode ($encrypted));
|
132 |
}
|
133 |
/**
|
134 |
* XOR two-way encryption/decryption, with a base64 wrapper.
|
@@ -137,34 +149,37 @@ if (!class_exists ("c_ws_plugin__s2member_utils_encryption"))
|
|
137 |
* @since 3.5
|
138 |
*
|
139 |
* @param str $base64 A string of data to decrypt. Should still be base64 encoded.
|
140 |
-
* @param str $key Optional. Key used originally for encryption.
|
141 |
-
* Defaults to the one configured for s2Member.
|
142 |
-
* Short of that, defaults to: ``wp_salt()``.
|
143 |
* @return str Decrypted string.
|
144 |
*/
|
145 |
public static function xdecrypt ($base64 = FALSE, $key = FALSE)
|
146 |
{
|
147 |
-
$base64 = (is_string ($base64)) ? $base64 : "";
|
148 |
-
|
149 |
-
$key = (!is_string ($key) || !strlen ($key)) ? $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"] : $key;
|
150 |
-
$key = (!is_string ($key) || !strlen ($key)) ? wp_salt () : $key;
|
151 |
/**/
|
152 |
-
$encrypted
|
153 |
-
/**/
|
154 |
-
$encrypted = preg_replace ("/^~xe\|/", "", $encrypted, 1, $v1);
|
155 |
-
$encrypted = ($v1) ? $encrypted : ""; /* Check validity. */
|
156 |
-
/**/
|
157 |
-
for ($i = 1, $decrypted = ""; $i <= strlen ($encrypted); $i++)
|
158 |
{
|
159 |
-
$
|
160 |
-
|
161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
}
|
163 |
-
|
164 |
-
|
165 |
-
$decrypted = ($v2) ? $decrypted : ""; /* Check validity. */
|
166 |
-
/**/
|
167 |
-
return ($string = $decrypted);
|
168 |
}
|
169 |
}
|
170 |
}
|
28 |
class c_ws_plugin__s2member_utils_encryption
|
29 |
{
|
30 |
/**
|
31 |
+
* Determines the proper encryption/decryption Key to use.
|
32 |
+
*
|
33 |
+
* @package s2Member\Utilities
|
34 |
+
* @since 111106
|
35 |
+
*
|
36 |
+
* @param str $key Optional. Attempt to force a specific Key. Defaults to the one configured for s2Member. Short of that, defaults to: ``wp_salt()``.
|
37 |
+
* @return str Proper encryption/decryption Key. If ``$key`` is passed in, and it validates, we'll return that. Otherwise use a default Key.
|
38 |
+
*/
|
39 |
+
public static function key ($key = FALSE)
|
40 |
+
{
|
41 |
+
$key = (!is_string ($key) || !strlen ($key)) ? $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"] : $key;
|
42 |
+
$key = (!is_string ($key) || !strlen ($key)) ? /* Use the installed WordPress® salt. */ wp_salt () : $key;
|
43 |
+
$key = (!is_string ($key) || !strlen ($key)) ? /* Default/backup. */ md5 ($_SERVER["HTTP_HOST"]) : $key;
|
44 |
+
return /* Proper encryption/decryption key. */ $key;
|
45 |
+
}
|
46 |
+
/**
|
47 |
* RIJNDAEL 256: two-way encryption/decryption, with a URL-safe base64 wrapper.
|
48 |
*
|
49 |
+
* Falls back on XOR encryption/decryption when/if mcrypt is not possible.
|
50 |
*
|
51 |
* @package s2Member\Utilities
|
52 |
* @since 3.5
|
53 |
*
|
54 |
* @param str $string A string of data to encrypt.
|
55 |
+
* @param str $key Optional. Key used for encryption. Defaults to the one configured for s2Member. Short of that, defaults to: ``wp_salt()``.
|
56 |
+
* @param bool $w_md5_cs Optional. Defaults to true. When true, an MD5 checksum is used in the encrypted string *( recommended )*.
|
|
|
57 |
* @return str Encrypted string.
|
58 |
*/
|
59 |
+
public static function encrypt ($string = FALSE, $key = FALSE, $w_md5_cs = TRUE)
|
60 |
{
|
|
|
|
|
|
|
|
|
|
|
61 |
if (function_exists ("mcrypt_encrypt") && in_array ("rijndael-256", mcrypt_list_algorithms ()) && in_array ("cbc", mcrypt_list_modes ()))
|
62 |
{
|
63 |
+
$string = /* Force a valid string value here. */ (is_string ($string)) ? $string : "";
|
64 |
+
$string = /* Indicating this is an RIJNDAEL 256 encrypted string. */ (strlen ($string)) ? "~r2|" . $string : "";
|
65 |
+
/**/
|
66 |
+
$key = /* Obtain encryption/decryption key. */ c_ws_plugin__s2member_utils_encryption::key ($key);
|
67 |
+
$key = /* Proper key length. */ substr ($key, 0, mcrypt_get_key_size (MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC));
|
68 |
+
/**/
|
69 |
$iv = c_ws_plugin__s2member_utils_strings::random_str_gen (mcrypt_get_iv_size (MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC), false);
|
|
|
|
|
70 |
/**/
|
71 |
+
if (strlen ($string) && is_string ($e = mcrypt_encrypt /* Encrypt the string. */ (MCRYPT_RIJNDAEL_256, $key, $string, MCRYPT_MODE_CBC, $iv)) && strlen ($e))
|
72 |
+
$e = /* RIJNDAEL 256 encrypted string with IV and checksum built into itself. */ "~r2:" . $iv . (($w_md5_cs) ? ":" . md5 ($e) : "") . "|" . $e;
|
73 |
+
/**/
|
74 |
+
return (isset ($e) && is_string ($e) && strlen ($e)) ? ($base64 = c_ws_plugin__s2member_utils_strings::base64_url_safe_encode ($e)) : "";
|
75 |
}
|
76 |
else /* Fallback on XOR encryption. */
|
77 |
+
return c_ws_plugin__s2member_utils_encryption::xencrypt ($string, $key, $w_md5_cs);
|
78 |
}
|
79 |
/**
|
80 |
* RIJNDAEL 256: two-way encryption/decryption, with a URL-safe base64 wrapper.
|
81 |
*
|
82 |
+
* Falls back on XOR encryption/decryption when mcrypt is not available.
|
83 |
*
|
84 |
* @package s2Member\Utilities
|
85 |
* @since 3.5
|
86 |
*
|
87 |
* @param str $base64 A string of data to decrypt. Should still be base64 encoded.
|
88 |
+
* @param str $key Optional. Key used originally for encryption. Defaults to the one configured for s2Member. Short of that, defaults to: ``wp_salt()``.
|
|
|
|
|
89 |
* @return str Decrypted string.
|
90 |
*/
|
91 |
public static function decrypt ($base64 = FALSE, $key = FALSE)
|
92 |
{
|
93 |
+
$base64 = /* Force a valid string value here. */ (is_string ($base64)) ? $base64 : "";
|
94 |
+
$e = (strlen ($base64)) ? c_ws_plugin__s2member_utils_strings::base64_url_safe_decode ($base64) : "";
|
|
|
|
|
95 |
/**/
|
96 |
+
if (function_exists ("mcrypt_decrypt") && in_array ("rijndael-256", mcrypt_list_algorithms ()) && in_array ("cbc", mcrypt_list_modes ()) #
|
97 |
+
&& strlen ($e) /* And, is this an RIJNDAEL 256 encrypted string? */ && preg_match ("/^~r2\:([a-zA-Z0-9]+)(?:\:([a-zA-Z0-9]+))?\|(.*?)$/s", $e, $iv_md5_e))
|
|
|
98 |
{
|
99 |
+
$key = /* Obtain encryption/decryption key. */ c_ws_plugin__s2member_utils_encryption::key ($key);
|
100 |
+
$key = /* Proper key length. */ substr ($key, 0, mcrypt_get_key_size (MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC));
|
101 |
+
/**/
|
102 |
+
if (strlen ($iv_md5_e[3]) && ( /* No checksum? */!$iv_md5_e[2] || /* Or, a matching checksum? */ $iv_md5_e[2] === md5 ($iv_md5_e[3])))
|
103 |
+
$d = /* Decrypt the string. */ mcrypt_decrypt (MCRYPT_RIJNDAEL_256, $key, $iv_md5_e[3], MCRYPT_MODE_CBC, $iv_md5_e[1]);
|
|
|
104 |
/**/
|
105 |
+
if (isset ($d) && /* Was ``$iv_md5_e[3]`` decrypted successfully? */ is_string ($d) && strlen ($d))
|
106 |
+
/**/
|
107 |
+
if (strlen ($d = preg_replace ("/^~r2\|/", "", $d, 1, $r2)) && $r2)
|
108 |
+
$d = rtrim /* Right-trim NULLS and EOTs. */ ($d, "\0\4");
|
109 |
+
else /* Else we need to empty this out. */
|
110 |
+
$d = /* Empty string. Invalid. */ "";
|
111 |
+
/**/
|
112 |
+
return (isset ($d) && is_string ($d) && strlen ($d)) ? ($string = $d) : "";
|
113 |
}
|
114 |
else /* Fallback on XOR decryption. */
|
115 |
return c_ws_plugin__s2member_utils_encryption::xdecrypt ($base64, $key);
|
121 |
* @since 3.5
|
122 |
*
|
123 |
* @param str $string A string of data to encrypt.
|
124 |
+
* @param str $key Optional. Key used for encryption. Defaults to the one configured for s2Member. Short of that, defaults to: ``wp_salt()``.
|
125 |
+
* @param bool $w_md5_cs Optional. Defaults to true. When true, an MD5 checksum is used in the encrypted string *( recommended )*.
|
|
|
126 |
* @return str Encrypted string.
|
127 |
*/
|
128 |
+
public static function xencrypt ($string = FALSE, $key = FALSE, $w_md5_cs = TRUE)
|
129 |
{
|
130 |
+
$string = /* Force a valid string value here. */ (is_string ($string)) ? $string : "";
|
131 |
+
$string = /* Indicating this is an XOR encrypted string. */ (strlen ($string)) ? "~xe|" . $string : "";
|
|
|
|
|
132 |
/**/
|
133 |
+
$key = /* Obtain encryption/decryption key. */ c_ws_plugin__s2member_utils_encryption::key ($key);
|
134 |
/**/
|
135 |
+
for ($i = 1, $e = ""; $i <= /* Will NOT run if ``$string`` has no length. */ strlen ($string); $i++)
|
136 |
{
|
137 |
$char = substr ($string, $i - 1, 1);
|
138 |
$keychar = substr ($key, ($i % strlen ($key)) - 1, 1);
|
139 |
+
$e .= chr (ord ($char) + ord ($keychar));
|
140 |
}
|
141 |
+
$e = /* XOR encrypted? */ (strlen ($e)) ? "~xe" . (($w_md5_cs) ? ":" . md5 ($e) : "") . "|" . $e : "";
|
142 |
/**/
|
143 |
+
return (strlen ($e)) ? ($base64 = c_ws_plugin__s2member_utils_strings::base64_url_safe_encode ($e)) : "";
|
|
|
|
|
144 |
}
|
145 |
/**
|
146 |
* XOR two-way encryption/decryption, with a base64 wrapper.
|
149 |
* @since 3.5
|
150 |
*
|
151 |
* @param str $base64 A string of data to decrypt. Should still be base64 encoded.
|
152 |
+
* @param str $key Optional. Key used originally for encryption. Defaults to the one configured for s2Member. Short of that, defaults to: ``wp_salt()``.
|
|
|
|
|
153 |
* @return str Decrypted string.
|
154 |
*/
|
155 |
public static function xdecrypt ($base64 = FALSE, $key = FALSE)
|
156 |
{
|
157 |
+
$base64 = /* Force a valid string value here. */ (is_string ($base64)) ? $base64 : "";
|
158 |
+
$e = (strlen ($base64)) ? c_ws_plugin__s2member_utils_strings::base64_url_safe_decode ($base64) : "";
|
|
|
|
|
159 |
/**/
|
160 |
+
if (strlen ($e) /* And, is this an XOR encrypted string? */ && preg_match ("/^~xe(?:\:([a-zA-Z0-9]+))?\|(.*?)$/s", $e, $md5_e))
|
|
|
|
|
|
|
|
|
|
|
161 |
{
|
162 |
+
$key = /* Obtain encryption/decryption key. */ c_ws_plugin__s2member_utils_encryption::key ($key);
|
163 |
+
/**/
|
164 |
+
if (strlen ($md5_e[2]) && ( /* No checksum? */!$md5_e[1] || /* Or a matching checksum? */ $md5_e[1] === md5 ($md5_e[2])))
|
165 |
+
/**/
|
166 |
+
for ($i = 1, $d = ""; $i <= /* Will NOT run if ``$md5_e[2]`` has no length. */ strlen ($md5_e[2]); $i++)
|
167 |
+
{
|
168 |
+
$char = substr ($md5_e[2], $i - 1, 1);
|
169 |
+
$keychar = substr ($key, ($i % strlen ($key)) - 1, 1);
|
170 |
+
$d .= chr (ord ($char) - ord ($keychar));
|
171 |
+
}
|
172 |
+
if (isset ($d) && /* Was ``$md5_e[2]`` decrypted successfully? */ is_string ($d) && strlen ($d))
|
173 |
+
/**/
|
174 |
+
if (strlen ($d = preg_replace ("/^~xe\|/", "", $d, 1, $xe)) && $xe)
|
175 |
+
$d = /* Just re-assign this here. Nothing more to do. */ $d;
|
176 |
+
else /* Else we need to empty this out. */
|
177 |
+
$d = /* Empty string. Invalid. */ "";
|
178 |
+
/**/
|
179 |
+
return (isset ($d) && is_string ($d) && strlen ($d)) ? ($string = $d) : "";
|
180 |
}
|
181 |
+
else /* Otherwise we must fail here with an empty string value. */
|
182 |
+
return /* Just return an empty string in this case. */ "";
|
|
|
|
|
|
|
183 |
}
|
184 |
}
|
185 |
}
|
includes/classes/utils-strings.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
21 |
{
|
@@ -27,6 +27,28 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
|
27 |
*/
|
28 |
class c_ws_plugin__s2member_utils_strings
|
29 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
/**
|
31 |
* Escapes double quotes.
|
32 |
*
|
@@ -40,6 +62,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
|
40 |
public static function esc_dq ($string = FALSE, $times = FALSE)
|
41 |
{
|
42 |
$times = (is_numeric ($times) && $times >= 0) ? (int)$times : 1;
|
|
|
43 |
return str_replace ('"', str_repeat ("\\", $times) . '"', (string)$string);
|
44 |
}
|
45 |
/**
|
@@ -55,6 +78,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
|
55 |
public static function esc_sq ($string = FALSE, $times = FALSE)
|
56 |
{
|
57 |
$times = (is_numeric ($times) && $times >= 0) ? (int)$times : 1;
|
|
|
58 |
return str_replace ("'", str_repeat ("\\", $times) . "'", (string)$string);
|
59 |
}
|
60 |
/**
|
@@ -70,6 +94,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
|
70 |
public static function esc_js_sq ($string = FALSE, $times = FALSE)
|
71 |
{
|
72 |
$times = (is_numeric ($times) && $times >= 0) ? (int)$times : 1;
|
|
|
73 |
return str_replace ("'", str_repeat ("\\", $times) . "'", str_replace (array ("\r", "\n"), array ("", '\\n'), str_replace ("\'", "'", (string)$string)));
|
74 |
}
|
75 |
/**
|
@@ -85,25 +110,71 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
|
85 |
public static function esc_ds ($string = FALSE, $times = FALSE)
|
86 |
{
|
87 |
$times = (is_numeric ($times) && $times >= 0) ? (int)$times : 1;
|
|
|
88 |
return str_replace ('$', str_repeat ("\\", $times) . '$', (string)$string);
|
89 |
}
|
90 |
/**
|
91 |
-
* Sanitizes a string; by
|
92 |
-
*
|
93 |
-
* This allows all characters that appears on a standard U.S. keyboard.
|
94 |
*
|
95 |
* @package s2Member\Utilities
|
96 |
-
* @since
|
97 |
*
|
98 |
* @param str $string Input string.
|
99 |
-
* @return str Output string after
|
100 |
*/
|
101 |
-
public static function
|
102 |
{
|
103 |
return preg_replace ("/[^0-9A-Z\r\n\t\s`\=\[\]\\\;',\.\/~\!@#\$%\^&\*\(\)_\+\|\}\{\:\"\?\>\<\-]/i", "", remove_accents ((string)$string));
|
104 |
}
|
105 |
/**
|
106 |
-
* Trims deeply
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
*
|
108 |
* @package s2Member\Utilities
|
109 |
* @since 3.5
|
@@ -111,40 +182,52 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
|
111 |
* @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values.
|
112 |
* @return str|array Either the input string, or the input array; after all data is trimmed up.
|
113 |
*/
|
114 |
-
public static function
|
115 |
{
|
116 |
-
return
|
117 |
}
|
118 |
/**
|
119 |
-
* Trims
|
120 |
*
|
121 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
*
|
123 |
* @package s2Member\Utilities
|
124 |
-
* @since
|
125 |
*
|
126 |
* @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values.
|
127 |
* @return str|array Either the input string, or the input array; after all data is trimmed up.
|
128 |
*/
|
129 |
-
public static function
|
130 |
{
|
131 |
-
|
132 |
-
return is_array ($value) ? array_map ("c_ws_plugin__s2member_utils_strings::trim_qts_deep", $value) : preg_replace ("/^(?:" . $qts . ")+|(?:" . $qts . ")+$/", "", (string)$value);
|
133 |
}
|
134 |
/**
|
135 |
-
* Trims double
|
136 |
*
|
137 |
-
* This is useful on
|
138 |
*
|
139 |
* @package s2Member\Utilities
|
140 |
-
* @since
|
141 |
*
|
142 |
* @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values.
|
143 |
* @return str|array Either the input string, or the input array; after all data is trimmed up.
|
144 |
*/
|
145 |
-
public static function
|
146 |
{
|
147 |
-
|
|
|
|
|
148 |
}
|
149 |
/**
|
150 |
* Wraps a string with the characters provided.
|
@@ -157,19 +240,20 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
|
157 |
* @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values.
|
158 |
* @param str $beg Optional. A string value to wrap at the beginning of each value.
|
159 |
* @param str $end Optional. A string value to wrap at the ending of each value.
|
|
|
160 |
* @return str|array Either the input string, or the input array; after all data is wrapped up.
|
161 |
*/
|
162 |
-
public static function wrap_deep ($value = FALSE, $beg = FALSE, $end = FALSE)
|
163 |
{
|
164 |
if (is_array ($value)) /* Handles all types of arrays.
|
165 |
Note, we do NOT use ``array_map()`` here, because multiple args to ``array_map()`` causes a loss of string keys.
|
166 |
For further details, see: <http://php.net/manual/en/function.array-map.php>. */
|
167 |
{
|
168 |
foreach ($value as &$r) /* Reference. */
|
169 |
-
$r = c_ws_plugin__s2member_utils_strings::wrap_deep ($r, $beg, $end);
|
170 |
return $value; /* Return modified array. */
|
171 |
}
|
172 |
-
return (strlen ((string)$value)) ? (string)$beg . (string)$value . (string)$end : (string)$value;
|
173 |
}
|
174 |
/**
|
175 |
* Escapes meta characters with ``preg_quote()`` deeply.
|
@@ -199,13 +283,15 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
|
199 |
* @package s2Member\Utilities
|
200 |
* @since 3.5
|
201 |
*
|
202 |
-
* @param int $length Length of the
|
203 |
* @param bool $special_chars Defaults to true. If false, special chars are NOT included.
|
204 |
* @param bool $extra_special_chars Defaults to false. If true, extra special chars are included.
|
205 |
* @return str A randomly generated string, based on parameter configuration.
|
206 |
*/
|
207 |
-
public static function random_str_gen ($length =
|
208 |
{
|
|
|
|
|
209 |
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
210 |
$chars .= ($extra_special_chars) ? "-_ []{}<>~`+=,.;:/?|" : "";
|
211 |
$chars .= ($special_chars) ? "!@#$%^&*()" : "";
|
@@ -213,7 +299,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
|
213 |
for ($i = 0, $random_str = ""; $i < $length; $i++)
|
214 |
$random_str .= substr ($chars, mt_rand (0, strlen ($chars) - 1), 1);
|
215 |
/**/
|
216 |
-
return $random_str;
|
217 |
}
|
218 |
/**
|
219 |
* Highlights PHP, and also Shortcodes.
|
@@ -226,22 +312,9 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
|
226 |
*/
|
227 |
public static function highlight_php ($string = FALSE)
|
228 |
{
|
229 |
-
$string = highlight_string ((string)$string, true); /* Start with PHP syntax
|
230 |
/**/
|
231 |
-
return
|
232 |
-
}
|
233 |
-
/**
|
234 |
-
* Highlights Shortcodes.
|
235 |
-
*
|
236 |
-
* @package s2Member\Utilities
|
237 |
-
* @since 3.5
|
238 |
-
*
|
239 |
-
* @param array $m Array passed in from `preg_replace_callback()`.
|
240 |
-
* @return str The highlighted string.
|
241 |
-
*/
|
242 |
-
public static function _highlight_php ($m = FALSE)
|
243 |
-
{
|
244 |
-
return '<span style="color:#164A61;">' . $m[0] . '</span>';
|
245 |
}
|
246 |
/**
|
247 |
* Parses email addresses from a string or array.
|
@@ -258,23 +331,21 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
|
258 |
Note, we do NOT use ``array_map()`` here, because multiple args to ``array_map()`` causes a loss of string keys.
|
259 |
For further details, see: <http://php.net/manual/en/function.array-map.php>. */
|
260 |
{
|
261 |
-
$emails = array (); /* Initialize array
|
262 |
-
foreach
|
263 |
-
$emails = array_merge ($emails, c_ws_plugin__s2member_utils_strings::parse_emails ($
|
264 |
-
return $emails; /* Return array
|
265 |
}
|
266 |
-
|
267 |
-
|
268 |
-
foreach (($sections = c_ws_plugin__s2member_utils_strings::trim_deep (preg_split ("/" . preg_quote ($delimiter, "/") . "+/", (string)$value))) as $section)
|
269 |
{
|
270 |
if (preg_match ("/\<(.+?)\>/", $section, $m) && strpos ($m[1], "@") !== false)
|
271 |
-
$emails[] = $m[1]; /* Email inside brackets
|
272 |
/**/
|
273 |
else if (strpos ($section, "@") !== false)
|
274 |
$emails[] = $section;
|
275 |
}
|
276 |
-
|
277 |
-
return (!empty ($emails)) ? $emails : array ();
|
278 |
}
|
279 |
/**
|
280 |
* Base64 URL-safe encoding.
|
@@ -293,7 +364,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
|
293 |
$string = (string)$string; /* Force string values here. String MUST be a string. */
|
294 |
$trim_padding_chars = (string)$trim_padding_chars; /* And force this one too. */
|
295 |
/**/
|
296 |
-
$base64_url_safe = str_replace ((array)$url_unsafe_chars, (array)$url_safe_chars, base64_encode ($string));
|
297 |
$base64_url_safe = (strlen ($trim_padding_chars)) ? rtrim ($base64_url_safe, $trim_padding_chars) : $base64_url_safe;
|
298 |
/**/
|
299 |
return $base64_url_safe; /* Base64 encoded, with URL-safe replacements. */
|
@@ -320,7 +391,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
|
320 |
/**/
|
321 |
$string = (strlen ($trim_padding_chars)) ? rtrim ($base64_url_safe, $trim_padding_chars) : $base64_url_safe;
|
322 |
$string = (strlen ($trim_padding_chars)) ? str_pad ($string, strlen ($string) % 4, "=", STR_PAD_RIGHT) : $string;
|
323 |
-
$string = base64_decode (str_replace ((array)$url_safe_chars, (array)$url_unsafe_chars, $string));
|
324 |
/**/
|
325 |
return $string; /* Base64 decoded, with URL-safe replacements. */
|
326 |
}
|
@@ -377,11 +448,10 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
|
377 |
file_put_contents (($private_key_file = $temp_dir . "/" . md5 (uniqid ("", true) . "rsa-sha1-private-key") . ".tmp"), (string)$key);
|
378 |
file_put_contents (($rsa_sha1_sig_file = $temp_dir . "/" . md5 (uniqid ("", true) . "rsa-sha1-sig") . ".tmp"), "");
|
379 |
/**/
|
380 |
-
@shell_exec
|
381 |
$signature = /* Do NOT trim here. */ file_get_contents ($rsa_sha1_sig_file); /* Was the signature was written? */
|
382 |
-
unlink
|
383 |
}
|
384 |
-
/**/
|
385 |
return (!empty ($signature)) ? $signature : false;
|
386 |
}
|
387 |
/**
|
@@ -405,7 +475,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
|
405 |
if (strpos ($value, "-") === 0) /* Begins with a boundary identifying character ( a hyphen `-` )? */
|
406 |
{
|
407 |
$boundaries = (empty ($boundaries)) ? 1 : $boundaries + 1; /* Counter. */
|
408 |
-
unset
|
409 |
}
|
410 |
if (empty ($boundaries) || $boundaries <= 2) /* Do NOT modify keys with more than 2 boundaries. */
|
411 |
$key = "-----BEGIN RSA PRIVATE KEY-----\n" . implode ("\n", $lines) . "\n-----END RSA PRIVATE KEY-----";
|
@@ -436,6 +506,8 @@ if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
|
436 |
* @package s2Member\Utilities
|
437 |
* @since 111017
|
438 |
*
|
|
|
|
|
439 |
* @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values.
|
440 |
* @return str|array Either the input string, or the input array; after all unreserved chars are decoded properly.
|
441 |
*/
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_utils_strings"))
|
21 |
{
|
27 |
*/
|
28 |
class c_ws_plugin__s2member_utils_strings
|
29 |
{
|
30 |
+
/**
|
31 |
+
* Array of all ampersand entities.
|
32 |
+
*
|
33 |
+
* Array keys are actually regex patterns *( very useful )*.
|
34 |
+
*
|
35 |
+
* @package s2Member\Utilities
|
36 |
+
* @since 111106
|
37 |
+
*
|
38 |
+
* @var array
|
39 |
+
*/
|
40 |
+
public static /* Array keys are actually regex patterns. */ $ampersand_entities = array ("&" => "&", "�*38;" => "&", "&#[xX]0*26;" => "&");
|
41 |
+
/**
|
42 |
+
* Array of all quote entities *( and entities for quote variations )*.
|
43 |
+
*
|
44 |
+
* Array keys are actually regex patterns *( very useful )*.
|
45 |
+
*
|
46 |
+
* @package s2Member\Utilities
|
47 |
+
* @since 111106
|
48 |
+
*
|
49 |
+
* @var array
|
50 |
+
*/
|
51 |
+
public static $quote_entities_w_variations = array ("'" => "'", "�*39;" => "'", "&#[xX]0*27;" => "'", "‘" => "‘", "�*8216;" => "‘", "&#[xX]0*2018;" => "‘", "’" => "’", "�*8217;" => "’", "&#[xX]0*2019;" => "’", """ => """, "�*34;" => """, "&#[xX]0*22;" => """, "“" => "“", "�*8220;" => "“", "&#[xX]0*201[cC];" => "“", "”" => "”", "�*8221;" => "”", "&#[xX]0*201[dD];" => "”");
|
52 |
/**
|
53 |
* Escapes double quotes.
|
54 |
*
|
62 |
public static function esc_dq ($string = FALSE, $times = FALSE)
|
63 |
{
|
64 |
$times = (is_numeric ($times) && $times >= 0) ? (int)$times : 1;
|
65 |
+
/**/
|
66 |
return str_replace ('"', str_repeat ("\\", $times) . '"', (string)$string);
|
67 |
}
|
68 |
/**
|
78 |
public static function esc_sq ($string = FALSE, $times = FALSE)
|
79 |
{
|
80 |
$times = (is_numeric ($times) && $times >= 0) ? (int)$times : 1;
|
81 |
+
/**/
|
82 |
return str_replace ("'", str_repeat ("\\", $times) . "'", (string)$string);
|
83 |
}
|
84 |
/**
|
94 |
public static function esc_js_sq ($string = FALSE, $times = FALSE)
|
95 |
{
|
96 |
$times = (is_numeric ($times) && $times >= 0) ? (int)$times : 1;
|
97 |
+
/**/
|
98 |
return str_replace ("'", str_repeat ("\\", $times) . "'", str_replace (array ("\r", "\n"), array ("", '\\n'), str_replace ("\'", "'", (string)$string)));
|
99 |
}
|
100 |
/**
|
110 |
public static function esc_ds ($string = FALSE, $times = FALSE)
|
111 |
{
|
112 |
$times = (is_numeric ($times) && $times >= 0) ? (int)$times : 1;
|
113 |
+
/**/
|
114 |
return str_replace ('$', str_repeat ("\\", $times) . '$', (string)$string);
|
115 |
}
|
116 |
/**
|
117 |
+
* Sanitizes a string; by stripping characters NOT on a standard U.S. keyboard.
|
|
|
|
|
118 |
*
|
119 |
* @package s2Member\Utilities
|
120 |
+
* @since 111106
|
121 |
*
|
122 |
* @param str $string Input string.
|
123 |
+
* @return str Output string, after characters NOT on a standard U.S. keyboard have been stripped.
|
124 |
*/
|
125 |
+
public static function strip_2_kb_chars ($string = FALSE)
|
126 |
{
|
127 |
return preg_replace ("/[^0-9A-Z\r\n\t\s`\=\[\]\\\;',\.\/~\!@#\$%\^&\*\(\)_\+\|\}\{\:\"\?\>\<\-]/i", "", remove_accents ((string)$string));
|
128 |
}
|
129 |
/**
|
130 |
+
* Trims deeply; alias of ``trim_deep``.
|
131 |
+
*
|
132 |
+
* @package s2Member\Utilities
|
133 |
+
* @since 111106
|
134 |
+
*
|
135 |
+
* @see s2Member\Utilities\c_ws_plugin__s2member_utils_strings::trim_deep()
|
136 |
+
* @see http://php.net/manual/en/function.trim.php
|
137 |
+
*
|
138 |
+
* @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values.
|
139 |
+
* @param str|bool $chars Optional. Defaults to false, indicating the default trim chars ` \t\n\r\0\x0B`. Or, set to a specific string of chars.
|
140 |
+
* @param str|bool $extra_chars Optional. This is NOT possible with PHP alone, but here you can specify extra chars; in addition to ``$chars``.
|
141 |
+
* @return str|array Either the input string, or the input array; after all data is trimmed up according to arguments passed in.
|
142 |
+
*/
|
143 |
+
public static function trim ($value = FALSE, $chars = FALSE, $extra_chars = FALSE)
|
144 |
+
{
|
145 |
+
return c_ws_plugin__s2member_utils_strings::trim_deep ($value, $chars, $extra_chars);
|
146 |
+
}
|
147 |
+
/**
|
148 |
+
* Trims deeply; or use {@link s2Member\Utilities\c_ws_plugin__s2member_utils_strings::trim()}.
|
149 |
+
*
|
150 |
+
* @package s2Member\Utilities
|
151 |
+
* @since 3.5
|
152 |
+
*
|
153 |
+
* @see s2Member\Utilities\c_ws_plugin__s2member_utils_strings::trim()
|
154 |
+
* @see http://php.net/manual/en/function.trim.php
|
155 |
+
*
|
156 |
+
* @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values.
|
157 |
+
* @param str|bool $chars Optional. Defaults to false, indicating the default trim chars ` \t\n\r\0\x0B`. Or, set to a specific string of chars.
|
158 |
+
* @param str|bool $extra_chars Optional. This is NOT possible with PHP alone, but here you can specify extra chars; in addition to ``$chars``.
|
159 |
+
* @return str|array Either the input string, or the input array; after all data is trimmed up according to arguments passed in.
|
160 |
+
*/
|
161 |
+
public static function trim_deep ($value = FALSE, $chars = FALSE, $extra_chars = FALSE)
|
162 |
+
{
|
163 |
+
$chars = /* List of chars to be trimmed by this routine. */ (is_string ($chars)) ? $chars : " \t\n\r\0\x0B";
|
164 |
+
$chars = (is_string ($extra_chars) /* Adding additional chars? */) ? $chars . $extra_chars : $chars;
|
165 |
+
/**/
|
166 |
+
if (is_array ($value)) /* Handles all types of arrays.
|
167 |
+
Note, we do NOT use ``array_map()`` here, because multiple args to ``array_map()`` causes a loss of string keys.
|
168 |
+
For further details, see: <http://php.net/manual/en/function.array-map.php>. */
|
169 |
+
{
|
170 |
+
foreach ($value as &$r) /* Reference. */
|
171 |
+
$r = c_ws_plugin__s2member_utils_strings::trim_deep ($r, $chars);
|
172 |
+
return $value; /* Return modified array. */
|
173 |
+
}
|
174 |
+
return trim ((string)$value, $chars);
|
175 |
+
}
|
176 |
+
/**
|
177 |
+
* Trims double quotes deeply.
|
178 |
*
|
179 |
* @package s2Member\Utilities
|
180 |
* @since 3.5
|
182 |
* @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values.
|
183 |
* @return str|array Either the input string, or the input array; after all data is trimmed up.
|
184 |
*/
|
185 |
+
public static function trim_dq_deep ($value = FALSE)
|
186 |
{
|
187 |
+
return c_ws_plugin__s2member_utils_strings::trim_deep ($value, false, '"');
|
188 |
}
|
189 |
/**
|
190 |
+
* Trims single quotes deeply.
|
191 |
*
|
192 |
+
* @package s2Member\Utilities
|
193 |
+
* @since 111106
|
194 |
+
*
|
195 |
+
* @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values.
|
196 |
+
* @return str|array Either the input string, or the input array; after all data is trimmed up.
|
197 |
+
*/
|
198 |
+
public static function trim_sq_deep ($value = FALSE)
|
199 |
+
{
|
200 |
+
return c_ws_plugin__s2member_utils_strings::trim_deep ($value, false, "'");
|
201 |
+
}
|
202 |
+
/**
|
203 |
+
* Trims double and single quotes deeply.
|
204 |
*
|
205 |
* @package s2Member\Utilities
|
206 |
+
* @since 111106
|
207 |
*
|
208 |
* @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values.
|
209 |
* @return str|array Either the input string, or the input array; after all data is trimmed up.
|
210 |
*/
|
211 |
+
public static function trim_dsq_deep ($value = FALSE)
|
212 |
{
|
213 |
+
return c_ws_plugin__s2member_utils_strings::trim_deep ($value, false, "'" . '"');
|
|
|
214 |
}
|
215 |
/**
|
216 |
+
* Trims all single/double quote entity variations deeply.
|
217 |
*
|
218 |
+
* This is useful on Shortcode attributes mangled by a Visual Editor.
|
219 |
*
|
220 |
* @package s2Member\Utilities
|
221 |
+
* @since 111011
|
222 |
*
|
223 |
* @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values.
|
224 |
* @return str|array Either the input string, or the input array; after all data is trimmed up.
|
225 |
*/
|
226 |
+
public static function trim_qts_deep ($value = FALSE)
|
227 |
{
|
228 |
+
$qts = implode ("|", array_keys /* Keys are regex patterns. */ (c_ws_plugin__s2member_utils_strings::$quote_entities_w_variations));
|
229 |
+
/**/
|
230 |
+
return is_array ($value) ? array_map ("c_ws_plugin__s2member_utils_strings::trim_qts_deep", $value) : preg_replace ("/^(?:" . $qts . ")+|(?:" . $qts . ")+$/", "", (string)$value);
|
231 |
}
|
232 |
/**
|
233 |
* Wraps a string with the characters provided.
|
240 |
* @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values.
|
241 |
* @param str $beg Optional. A string value to wrap at the beginning of each value.
|
242 |
* @param str $end Optional. A string value to wrap at the ending of each value.
|
243 |
+
* @param bool $wrap_e Optional. Defaults to false. Should empty strings be wrapped too?
|
244 |
* @return str|array Either the input string, or the input array; after all data is wrapped up.
|
245 |
*/
|
246 |
+
public static function wrap_deep ($value = FALSE, $beg = FALSE, $end = FALSE, $wrap_e = FALSE)
|
247 |
{
|
248 |
if (is_array ($value)) /* Handles all types of arrays.
|
249 |
Note, we do NOT use ``array_map()`` here, because multiple args to ``array_map()`` causes a loss of string keys.
|
250 |
For further details, see: <http://php.net/manual/en/function.array-map.php>. */
|
251 |
{
|
252 |
foreach ($value as &$r) /* Reference. */
|
253 |
+
$r = c_ws_plugin__s2member_utils_strings::wrap_deep ($r, $beg, $end, $wrap_e);
|
254 |
return $value; /* Return modified array. */
|
255 |
}
|
256 |
+
return (strlen ((string)$value) || $wrap_e) ? (string)$beg . (string)$value . (string)$end : (string)$value;
|
257 |
}
|
258 |
/**
|
259 |
* Escapes meta characters with ``preg_quote()`` deeply.
|
283 |
* @package s2Member\Utilities
|
284 |
* @since 3.5
|
285 |
*
|
286 |
+
* @param int $length Optional. Defaults to `12`. Length of the random string.
|
287 |
* @param bool $special_chars Defaults to true. If false, special chars are NOT included.
|
288 |
* @param bool $extra_special_chars Defaults to false. If true, extra special chars are included.
|
289 |
* @return str A randomly generated string, based on parameter configuration.
|
290 |
*/
|
291 |
+
public static function random_str_gen ($length = FALSE, $special_chars = TRUE, $extra_special_chars = FALSE)
|
292 |
{
|
293 |
+
$length = (is_numeric ($length) && $length >= 0) ? (int)$length : 12;
|
294 |
+
/**/
|
295 |
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
296 |
$chars .= ($extra_special_chars) ? "-_ []{}<>~`+=,.;:/?|" : "";
|
297 |
$chars .= ($special_chars) ? "!@#$%^&*()" : "";
|
299 |
for ($i = 0, $random_str = ""; $i < $length; $i++)
|
300 |
$random_str .= substr ($chars, mt_rand (0, strlen ($chars) - 1), 1);
|
301 |
/**/
|
302 |
+
return /* Randomly generated string of chars. */ $random_str;
|
303 |
}
|
304 |
/**
|
305 |
* Highlights PHP, and also Shortcodes.
|
312 |
*/
|
313 |
public static function highlight_php ($string = FALSE)
|
314 |
{
|
315 |
+
$string = highlight_string ((string)$string, true); /* Start with PHP syntax, then Shortcodes. */
|
316 |
/**/
|
317 |
+
return preg_replace ("/\[\/?_*s2[a-z0-9_\-]+.*?\]/i", '<span style="color:#164A61;">$0</span>', $string);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
}
|
319 |
/**
|
320 |
* Parses email addresses from a string or array.
|
331 |
Note, we do NOT use ``array_map()`` here, because multiple args to ``array_map()`` causes a loss of string keys.
|
332 |
For further details, see: <http://php.net/manual/en/function.array-map.php>. */
|
333 |
{
|
334 |
+
$emails = array (); /* Initialize array. */
|
335 |
+
foreach /* Loop through array. */ ($value as $v)
|
336 |
+
$emails = array_merge ($emails, c_ws_plugin__s2member_utils_strings::parse_emails ($v));
|
337 |
+
return $emails; /* Return array. */
|
338 |
}
|
339 |
+
$delimiter = /* Supports semicolons or commas. */ (strpos ((string)$value, ";") !== false) ? ";" : ",";
|
340 |
+
foreach (c_ws_plugin__s2member_utils_strings::trim_deep (preg_split ("/" . preg_quote ($delimiter, "/") . "+/", (string)$value)) as $section)
|
|
|
341 |
{
|
342 |
if (preg_match ("/\<(.+?)\>/", $section, $m) && strpos ($m[1], "@") !== false)
|
343 |
+
$emails[] = $m[1]; /* Email inside <brackets>. */
|
344 |
/**/
|
345 |
else if (strpos ($section, "@") !== false)
|
346 |
$emails[] = $section;
|
347 |
}
|
348 |
+
return /* Array. */ (!empty ($emails)) ? $emails : array ();
|
|
|
349 |
}
|
350 |
/**
|
351 |
* Base64 URL-safe encoding.
|
364 |
$string = (string)$string; /* Force string values here. String MUST be a string. */
|
365 |
$trim_padding_chars = (string)$trim_padding_chars; /* And force this one too. */
|
366 |
/**/
|
367 |
+
$base64_url_safe = str_replace ((array)$url_unsafe_chars, (array)$url_safe_chars, (string)base64_encode ($string));
|
368 |
$base64_url_safe = (strlen ($trim_padding_chars)) ? rtrim ($base64_url_safe, $trim_padding_chars) : $base64_url_safe;
|
369 |
/**/
|
370 |
return $base64_url_safe; /* Base64 encoded, with URL-safe replacements. */
|
391 |
/**/
|
392 |
$string = (strlen ($trim_padding_chars)) ? rtrim ($base64_url_safe, $trim_padding_chars) : $base64_url_safe;
|
393 |
$string = (strlen ($trim_padding_chars)) ? str_pad ($string, strlen ($string) % 4, "=", STR_PAD_RIGHT) : $string;
|
394 |
+
$string = (string)base64_decode (str_replace ((array)$url_safe_chars, (array)$url_unsafe_chars, $string));
|
395 |
/**/
|
396 |
return $string; /* Base64 decoded, with URL-safe replacements. */
|
397 |
}
|
448 |
file_put_contents (($private_key_file = $temp_dir . "/" . md5 (uniqid ("", true) . "rsa-sha1-private-key") . ".tmp"), (string)$key);
|
449 |
file_put_contents (($rsa_sha1_sig_file = $temp_dir . "/" . md5 (uniqid ("", true) . "rsa-sha1-sig") . ".tmp"), "");
|
450 |
/**/
|
451 |
+
@shell_exec($esa ($openssl) . " sha1 -sign " . $esa ($private_key_file) . " -out " . $esa ($rsa_sha1_sig_file) . " " . $esa ($string_file));
|
452 |
$signature = /* Do NOT trim here. */ file_get_contents ($rsa_sha1_sig_file); /* Was the signature was written? */
|
453 |
+
unlink($rsa_sha1_sig_file) . unlink ($private_key_file) . unlink ($string_file); /* Cleanup. */
|
454 |
}
|
|
|
455 |
return (!empty ($signature)) ? $signature : false;
|
456 |
}
|
457 |
/**
|
475 |
if (strpos ($value, "-") === 0) /* Begins with a boundary identifying character ( a hyphen `-` )? */
|
476 |
{
|
477 |
$boundaries = (empty ($boundaries)) ? 1 : $boundaries + 1; /* Counter. */
|
478 |
+
unset($lines[$line]); /* Remove this boundary line. We'll fix these below. */
|
479 |
}
|
480 |
if (empty ($boundaries) || $boundaries <= 2) /* Do NOT modify keys with more than 2 boundaries. */
|
481 |
$key = "-----BEGIN RSA PRIVATE KEY-----\n" . implode ("\n", $lines) . "\n-----END RSA PRIVATE KEY-----";
|
506 |
* @package s2Member\Utilities
|
507 |
* @since 111017
|
508 |
*
|
509 |
+
* @see http://www.faqs.org/rfcs/rfc3986.html
|
510 |
+
*
|
511 |
* @param str|array $value Either a string, an array, or a multi-dimensional array, filled with integer and/or string values.
|
512 |
* @return str|array Either the input string, or the input array; after all unreserved chars are decoded properly.
|
513 |
*/
|
includes/classes/utils-urls.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_utils_urls"))
|
21 |
{
|
@@ -35,7 +35,7 @@ if (!class_exists ("c_ws_plugin__s2member_utils_urls"))
|
|
35 |
*
|
36 |
* @return str Full URL to `/wp-signup.php`.
|
37 |
*/
|
38 |
-
public static function wp_signup_url ()
|
39 |
{
|
40 |
return apply_filters ("wp_signup_location", site_url ("/wp-signup.php"));
|
41 |
}
|
@@ -45,9 +45,9 @@ if (!class_exists ("c_ws_plugin__s2member_utils_urls"))
|
|
45 |
* @package s2Member\Utilities
|
46 |
* @since 3.5
|
47 |
*
|
48 |
-
* @return str
|
49 |
*/
|
50 |
-
public static function wp_register_url ()
|
51 |
{
|
52 |
return apply_filters ("wp_register_location", add_query_arg ("action", urlencode ("register"), wp_login_url ()), get_defined_vars ());
|
53 |
}
|
@@ -57,12 +57,14 @@ if (!class_exists ("c_ws_plugin__s2member_utils_urls"))
|
|
57 |
* @package s2Member\Utilities
|
58 |
* @since 111009
|
59 |
*
|
60 |
-
* @return str
|
61 |
*/
|
62 |
-
public static function bp_register_url ()
|
63 |
{
|
64 |
-
if (
|
65 |
return site_url (((function_exists ("bp_get_signup_slug")) ? bp_get_signup_slug () . "/" : BP_REGISTER_SLUG . "/"));
|
|
|
|
|
66 |
}
|
67 |
/**
|
68 |
* Filters content redirection status *( uses 302s for browsers )*.
|
@@ -70,22 +72,52 @@ if (!class_exists ("c_ws_plugin__s2member_utils_urls"))
|
|
70 |
* @package s2Member\Utilities
|
71 |
* @since 3.5
|
72 |
*
|
73 |
-
* @attaches-to
|
74 |
*
|
75 |
* @param int|str $status A numeric redirection status code.
|
76 |
* @return int|str A numeric status redirection code, possibly modified to a value of `302`.
|
77 |
*
|
78 |
* @see http://en.wikipedia.org/wiki/Web_browser_engine
|
79 |
*/
|
80 |
-
public static function redirect_browsers_using_302_status ($status =
|
81 |
{
|
82 |
$engines = "msie|trident|gecko|webkit|presto|konqueror|playstation";
|
83 |
/**/
|
84 |
-
if ((int)$status === 301 && !empty ($_SERVER["HTTP_USER_AGENT"]))
|
85 |
if (($is_browser = preg_match ("/(" . $engines . ")[\/ ]([0-9\.]+)/i", $_SERVER["HTTP_USER_AGENT"])))
|
86 |
-
return 302;
|
87 |
/**/
|
88 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
}
|
90 |
/**
|
91 |
* Parses out a full valid URI, from either a full URL, or a partial URI.
|
@@ -95,58 +127,56 @@ if (!class_exists ("c_ws_plugin__s2member_utils_urls"))
|
|
95 |
* @package s2Member\Utilities
|
96 |
* @since 3.5
|
97 |
*
|
98 |
-
* @param str $
|
99 |
* @return str A valid URI, starting with `/` on success, else an empty string.
|
100 |
*/
|
101 |
-
public static function parse_uri ($
|
102 |
{
|
103 |
-
if (is_string ($
|
104 |
{
|
105 |
$parse["path"] = (!empty ($parse["path"])) ? ((strpos ($parse["path"], "/") === 0) ? $parse["path"] : "/" . $parse["path"]) : "/";
|
106 |
/**/
|
107 |
return (!empty ($parse["query"])) ? $parse["path"] . "?" . $parse["query"] : $parse["path"];
|
108 |
}
|
109 |
else /* Force a string return value here. */
|
110 |
-
return
|
111 |
}
|
112 |
/**
|
113 |
-
* Parses a URL with same args as PHP's ``parse_url()`` function.
|
114 |
*
|
115 |
* This works around issues with this PHP function in versions prior to 5.3.8.
|
116 |
*
|
117 |
* @package s2Member\Utilities
|
118 |
* @since 111017
|
119 |
*
|
120 |
-
* @param str $
|
121 |
* @param bool|int $component Optional. See PHP documentation on ``parse_url()`` function.
|
122 |
* @param bool $clean_path Defaults to true. s2Member will cleanup any return array `path`.
|
123 |
* @return str|array|bool The return value from PHP's ``parse_url()`` function.
|
124 |
* However, if ``$component`` is passed, s2Member forces a string return.
|
125 |
*/
|
126 |
-
public static function parse_url ($
|
127 |
{
|
128 |
$component = ($component === false || $component === -1) ? -1 : $component;
|
129 |
/**/
|
130 |
-
if (is_string ($
|
131 |
{
|
132 |
-
list ($_, $query) = preg_split ("/\?/", $
|
133 |
-
|
134 |
-
$
|
135 |
-
|
136 |
}
|
137 |
-
|
138 |
-
$parse = @parse_url ($url_or_uri, $component); /* Let PHP work its magic now. */
|
139 |
/**/
|
140 |
if ($clean_path && isset ($parse["path"]) && is_string ($parse["path"]) && !empty ($parse["path"]))
|
141 |
-
$parse["path"] = preg_replace ("/\/+/", "/", $parse["path"]);
|
142 |
/**/
|
143 |
-
return ($component !== -1) ? /* Force a string return value
|
144 |
}
|
145 |
/**
|
146 |
* Responsible for all remote communications processed by s2Member.
|
147 |
*
|
148 |
* Uses ``wp_remote_request()`` through the `WP_Http` class.
|
149 |
-
* This function will try to use cURL first, and then fall back on FOPEN and/or other supported transports.
|
150 |
*
|
151 |
* @package s2Member\Utilities
|
152 |
* @since 3.5
|
@@ -154,101 +184,65 @@ if (!class_exists ("c_ws_plugin__s2member_utils_urls"))
|
|
154 |
* @param str $url Full URL with possible query string parameters.
|
155 |
* @param str|array $post_vars Optional. Either a string of POST vars, or an array.
|
156 |
* @param array $args Optional. An array of additional arguments used by ``wp_remote_request()``.
|
157 |
-
* @param bool $return Optional. One of: `body|array`. Defaults to `body`. If `array`, an array with the following elements
|
158 |
-
* `
|
159 |
* @return str|array|bool Requested response data from the remote location *(see ``$return`` parameter )*, else false on failure.
|
160 |
*/
|
161 |
public static function remote ($url = FALSE, $post_vars = FALSE, $args = FALSE, $return = FALSE)
|
162 |
{
|
163 |
-
if ($url && is_string ($url)
|
164 |
{
|
165 |
-
$args = (!is_array ($args)) ? array (): $args; /* Force array
|
166 |
$args["sslverify"] = (!isset ($args["sslverify"])) ? /* Off. */ false : $args["sslverify"];
|
167 |
/**/
|
168 |
if ((is_array ($post_vars) || is_string ($post_vars)) && !empty ($post_vars))
|
169 |
$args = array_merge ($args, array ("method" => "POST", "body" => $post_vars));
|
170 |
/**/
|
171 |
-
|
172 |
-
add_filter ("use_curl_transport", "__return_false", ($curl_disabled = 1352));
|
173 |
-
/**/
|
174 |
-
if (!has_filter ("http_response", "c_ws_plugin__s2member_utils_urls::_remote_gz_variations"))
|
175 |
-
add_filter ("http_response", "c_ws_plugin__s2member_utils_urls::_remote_gz_variations");
|
176 |
/**/
|
177 |
-
|
178 |
-
/**/
|
179 |
-
if ($return === "array" /* Return array? */ && !is_wp_error ($response) && is_array ($response))
|
180 |
{
|
181 |
-
$
|
182 |
-
|
183 |
-
$
|
184 |
-
|
185 |
-
|
186 |
/**/
|
187 |
-
|
188 |
}
|
|
|
|
|
189 |
/**/
|
190 |
-
else
|
191 |
-
|
192 |
-
/**/
|
193 |
-
else /* Else this remote request has failed completely. We must return a `false` value. */
|
194 |
-
$r = false; /* Remote request failed, return false. */
|
195 |
-
/**/
|
196 |
-
if (isset ($curl_disabled) && $curl_disabled === 1352) /* Remove this Filter now? */
|
197 |
-
remove_filter ("use_curl_transport", "__return_false", 1352);
|
198 |
-
/**/
|
199 |
-
return $r; /* The ``$r`` return value. */
|
200 |
}
|
201 |
-
/**/
|
202 |
else /* Else, return false. */
|
203 |
return false;
|
204 |
}
|
205 |
/**
|
206 |
-
* Filters the `WP_Http` response for additional gzinflate variations.
|
207 |
-
*
|
208 |
-
* @package s2Member\Utilities
|
209 |
-
* @since 3.5
|
210 |
-
*
|
211 |
-
* @attaches-to: ``add_filter("http_response");``
|
212 |
-
*
|
213 |
-
* @param array $response An array of response details.
|
214 |
-
* @return array of ``$response`` details, with possible body modifications.
|
215 |
-
*/
|
216 |
-
public static function _remote_gz_variations ($response = array ())
|
217 |
-
{
|
218 |
-
if (!isset ($response["ws__gz_variations"]) && ($response["ws__gz_variations"] = 1))
|
219 |
-
{
|
220 |
-
if (!empty ($response["headers"]["content-encoding"]))
|
221 |
-
if (!empty ($response["body"]) && substr ($response["body"], 0, 2) === "\x78\x9c")
|
222 |
-
if (($gz = @gzinflate (substr ($response["body"], 2))))
|
223 |
-
$response["body"] = $gz;
|
224 |
-
}
|
225 |
-
/**/
|
226 |
-
return $response; /* Return response. */
|
227 |
-
}
|
228 |
-
/**
|
229 |
* Shortens a long URL, based on s2Member configuration.
|
230 |
*
|
231 |
* @package s2Member\Utilities
|
232 |
* @since 111002
|
233 |
*
|
234 |
* @param str $url A full/long URL to be shortened.
|
235 |
-
* @param str $api_sp Optional. A specific URL shortening API to use. Defaults to that which is configured in the s2Member Dashboard. Normally `tiny_url
|
236 |
* @param bool $try_backups Defaults to true. If a failure occurs with the first API, we'll try others until we have success.
|
237 |
* @return str|bool The shortened URL on success, else false on failure.
|
238 |
*/
|
239 |
public static function shorten ($url = FALSE, $api_sp = FALSE, $try_backups = TRUE)
|
240 |
{
|
241 |
-
$url = ($url && is_string ($url)) ? $url : false;
|
242 |
-
$api_sp = ($api_sp && is_string ($api_sp)) ? $api_sp : false;
|
243 |
/**/
|
244 |
$default_url_shortener = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["default_url_shortener"];
|
245 |
$default_custom_str_url_shortener = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["default_custom_str_url_shortener"];
|
246 |
/**/
|
247 |
-
$apis = array ("tiny_url", "goo_gl"); /* The shortening APIs integrated
|
248 |
/**/
|
249 |
-
if ($url && ($api =
|
250 |
{
|
251 |
-
if (!$api_sp && ($custom_url = apply_filters ("ws_plugin__s2member_url_shorten", false, get_defined_vars ())) && stripos ($custom_url, "http") === 0)
|
252 |
return ($shorter_url = $custom_url); /* Using whatever other shortener API you prefer, over the ones available by default with s2Member. */
|
253 |
/**/
|
254 |
else if (!$api_sp && stripos ($default_custom_str_url_shortener, "http") === 0 && ($custom_url = trim (c_ws_plugin__s2member_utils_urls::remote (str_ireplace (array ("%%s2_long_url%%", "%%s2_long_url_md5%%"), array (rawurlencode ($url), urlencode (md5 ($url))), $default_custom_str_url_shortener)))) && stripos ($custom_url, "http") === 0)
|
@@ -257,17 +251,108 @@ if (!class_exists ("c_ws_plugin__s2member_utils_urls"))
|
|
257 |
else if ($api === "tiny_url" && ($tiny_url = trim (c_ws_plugin__s2member_utils_urls::remote ("http://tinyurl.com/api-create.php?url=" . rawurlencode ($url)))) && stripos ($tiny_url, "http") === 0)
|
258 |
return ($shorter_url = $tiny_url); /* The default tinyURL API: <http://tinyurl.com/api-create.php?url=http://www.example.com/>.
|
259 |
/**/
|
260 |
-
else if ($api === "goo_gl" && ($goo_gl = json_decode (trim (c_ws_plugin__s2member_utils_urls::remote ("https://www.googleapis.com/urlshortener/v1/url" . ((($goo_gl_key = apply_filters ("ws_plugin__s2member_url_shorten_api_goo_gl_key", false))) ? "?key=" . urlencode ($goo_gl_key) : ""), json_encode (array ("longUrl" => $url)), array ("headers" => array ("Content-Type" => "application/json")))), true)) && !empty ($goo_gl["id"]) && ($goo_gl_url = $goo_gl["id"]) && stripos ($goo_gl_url, "http") === 0)
|
261 |
return ($shorter_url = $goo_gl_url); /* Google® API: <http://code.google.com/apis/urlshortener/v1/getting_started.html>.
|
262 |
/**/
|
263 |
-
else if ($try_backups && count ($apis) > 1) /* Try backups? This way we can still
|
264 |
/**/
|
265 |
-
foreach (array_diff ($apis, array ($api)) as $backup)
|
266 |
if (($backup = c_ws_plugin__s2member_utils_urls::shorten ($url, $backup, false)))
|
267 |
-
return ($shorter_url = $backup);
|
268 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
/**/
|
270 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
}
|
272 |
}
|
273 |
}
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit ("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_utils_urls"))
|
21 |
{
|
35 |
*
|
36 |
* @return str Full URL to `/wp-signup.php`.
|
37 |
*/
|
38 |
+
public static function wp_signup_url ()
|
39 |
{
|
40 |
return apply_filters ("wp_signup_location", site_url ("/wp-signup.php"));
|
41 |
}
|
45 |
* @package s2Member\Utilities
|
46 |
* @since 3.5
|
47 |
*
|
48 |
+
* @return str Full URL to `/wp-login.php?action=register`.
|
49 |
*/
|
50 |
+
public static function wp_register_url ()
|
51 |
{
|
52 |
return apply_filters ("wp_register_location", add_query_arg ("action", urlencode ("register"), wp_login_url ()), get_defined_vars ());
|
53 |
}
|
57 |
* @package s2Member\Utilities
|
58 |
* @since 111009
|
59 |
*
|
60 |
+
* @return str|bool Full URL to `/register`, if BuddyPress is installed; else false.
|
61 |
*/
|
62 |
+
public static function bp_register_url ()
|
63 |
{
|
64 |
+
if ( /* If BuddyPress is installed. */c_ws_plugin__s2member_utils_conds::bp_is_installed ())
|
65 |
return site_url (((function_exists ("bp_get_signup_slug")) ? bp_get_signup_slug () . "/" : BP_REGISTER_SLUG . "/"));
|
66 |
+
/**/
|
67 |
+
return false; /* Default return false. */
|
68 |
}
|
69 |
/**
|
70 |
* Filters content redirection status *( uses 302s for browsers )*.
|
72 |
* @package s2Member\Utilities
|
73 |
* @since 3.5
|
74 |
*
|
75 |
+
* @attaches-to ``add_filter("ws_plugin__s2member_content_redirect_status");``
|
76 |
*
|
77 |
* @param int|str $status A numeric redirection status code.
|
78 |
* @return int|str A numeric status redirection code, possibly modified to a value of `302`.
|
79 |
*
|
80 |
* @see http://en.wikipedia.org/wiki/Web_browser_engine
|
81 |
*/
|
82 |
+
public static function redirect_browsers_using_302_status ($status = FALSE)
|
83 |
{
|
84 |
$engines = "msie|trident|gecko|webkit|presto|konqueror|playstation";
|
85 |
/**/
|
86 |
+
if ( /* Default `301` status? */(int)$status === 301 && /* Have User-Agent? */ !empty ($_SERVER["HTTP_USER_AGENT"]))
|
87 |
if (($is_browser = preg_match ("/(" . $engines . ")[\/ ]([0-9\.]+)/i", $_SERVER["HTTP_USER_AGENT"])))
|
88 |
+
return /* Use 302 status. */ ($status = 302);
|
89 |
/**/
|
90 |
+
return /* Else use existing status. */ $status;
|
91 |
+
}
|
92 |
+
/**
|
93 |
+
* Encodes all types of amperands to `amp;`, for use in XHTML code.
|
94 |
+
*
|
95 |
+
* Note however, this is usually NOT necessary. Just use WordPress® ``esc_html()`` or ``esc_attr()``.
|
96 |
+
*
|
97 |
+
* @package s2Member\Utilities
|
98 |
+
* @since 111106
|
99 |
+
*
|
100 |
+
* @param str $url_uri_query A full URL, a partial URI, or just the query string.
|
101 |
+
* @return str A full URL, a partial URI, or just the query string; after having been encoded by this routine.
|
102 |
+
*/
|
103 |
+
public static function e_amps ($url_uri_query = FALSE)
|
104 |
+
{
|
105 |
+
return str_replace ("&", "&", c_ws_plugin__s2member_utils_urls::n_amps ((string)$url_uri_query));
|
106 |
+
}
|
107 |
+
/**
|
108 |
+
* Normalizes amperands to `&` when working with URLs, URIs, and/or query strings.
|
109 |
+
*
|
110 |
+
* @package s2Member\Utilities
|
111 |
+
* @since 111106
|
112 |
+
*
|
113 |
+
* @param str $url_uri_query A full URL, a partial URI, or just the query string.
|
114 |
+
* @return str A full URL, a partial URI, or just the query string; after having been normalized by this routine.
|
115 |
+
*/
|
116 |
+
public static function n_amps ($url_uri_query = FALSE)
|
117 |
+
{
|
118 |
+
$amps = implode ("|", array_keys /* Keys are regex patterns. */ (c_ws_plugin__s2member_utils_strings::$ampersand_entities));
|
119 |
+
/**/
|
120 |
+
return /* Normalizes amperands to `&`. */ preg_replace ("/(?:" . $amps . ")/", "&", (string)$url_uri_query);
|
121 |
}
|
122 |
/**
|
123 |
* Parses out a full valid URI, from either a full URL, or a partial URI.
|
127 |
* @package s2Member\Utilities
|
128 |
* @since 3.5
|
129 |
*
|
130 |
+
* @param str $url_uri Either a full URL, or a partial URI.
|
131 |
* @return str A valid URI, starting with `/` on success, else an empty string.
|
132 |
*/
|
133 |
+
public static function parse_uri ($url_uri = FALSE)
|
134 |
{
|
135 |
+
if (is_string ($url_uri) && is_array ($parse = c_ws_plugin__s2member_utils_urls::parse_url ($url_uri)))
|
136 |
{
|
137 |
$parse["path"] = (!empty ($parse["path"])) ? ((strpos ($parse["path"], "/") === 0) ? $parse["path"] : "/" . $parse["path"]) : "/";
|
138 |
/**/
|
139 |
return (!empty ($parse["query"])) ? $parse["path"] . "?" . $parse["query"] : $parse["path"];
|
140 |
}
|
141 |
else /* Force a string return value here. */
|
142 |
+
return /* Empty string. */ "";
|
143 |
}
|
144 |
/**
|
145 |
+
* Parses a URL/URI with same args as PHP's ``parse_url()`` function.
|
146 |
*
|
147 |
* This works around issues with this PHP function in versions prior to 5.3.8.
|
148 |
*
|
149 |
* @package s2Member\Utilities
|
150 |
* @since 111017
|
151 |
*
|
152 |
+
* @param str $url_uri Either a full URL, or a partial URI to parse.
|
153 |
* @param bool|int $component Optional. See PHP documentation on ``parse_url()`` function.
|
154 |
* @param bool $clean_path Defaults to true. s2Member will cleanup any return array `path`.
|
155 |
* @return str|array|bool The return value from PHP's ``parse_url()`` function.
|
156 |
* However, if ``$component`` is passed, s2Member forces a string return.
|
157 |
*/
|
158 |
+
public static function parse_url ($url_uri = FALSE, $component = FALSE, $clean_path = TRUE)
|
159 |
{
|
160 |
$component = ($component === false || $component === -1) ? -1 : $component;
|
161 |
/**/
|
162 |
+
if (is_string ($url_uri) && /* And, there is a query string? */ strpos ($url_uri, "?") !== false)
|
163 |
{
|
164 |
+
list ($_, $query) = preg_split ("/\?/", $url_uri, 2); /* Split @ query string marker. */
|
165 |
+
$query = /* See: <https://bugs.php.net/bug.php?id=38143>. */ str_replace ("://", urlencode ("://"), $query);
|
166 |
+
$url_uri = /* Put it all back together again, after the above modifications. */ $_ . "?" . $query;
|
167 |
+
unset /* A little housekeeping here. Unset these vars. */ ($_, $query);
|
168 |
}
|
169 |
+
$parse = /* Let PHP work its magic via ``parse_url()``. */ @parse_url ($url_uri, $component);
|
|
|
170 |
/**/
|
171 |
if ($clean_path && isset ($parse["path"]) && is_string ($parse["path"]) && !empty ($parse["path"]))
|
172 |
+
$parse["path"] = /* Clean up the path now. */ preg_replace ("/\/+/", "/", $parse["path"]);
|
173 |
/**/
|
174 |
+
return ($component !== -1) ? /* Force a string return value? */ (string)$parse : $parse;
|
175 |
}
|
176 |
/**
|
177 |
* Responsible for all remote communications processed by s2Member.
|
178 |
*
|
179 |
* Uses ``wp_remote_request()`` through the `WP_Http` class.
|
|
|
180 |
*
|
181 |
* @package s2Member\Utilities
|
182 |
* @since 3.5
|
184 |
* @param str $url Full URL with possible query string parameters.
|
185 |
* @param str|array $post_vars Optional. Either a string of POST vars, or an array.
|
186 |
* @param array $args Optional. An array of additional arguments used by ``wp_remote_request()``.
|
187 |
+
* @param bool $return Optional. One of: `body|array`. Defaults to `body`. If `array`, an array with the following elements:
|
188 |
+
* `code` *(http response code)*, `message` *(http response message)*, `headers` *(an array of lowercase headers)*, `body` *(the response body string)*, `response` *(response array)*.
|
189 |
* @return str|array|bool Requested response data from the remote location *(see ``$return`` parameter )*, else false on failure.
|
190 |
*/
|
191 |
public static function remote ($url = FALSE, $post_vars = FALSE, $args = FALSE, $return = FALSE)
|
192 |
{
|
193 |
+
if ($url && is_string ($url) /* We MUST have a valid full URL (string) before we do anything in this routine. */)
|
194 |
{
|
195 |
+
$args = (!is_array ($args)) ? array (): $args; /* Force array, and disable SSL verification. */
|
196 |
$args["sslverify"] = (!isset ($args["sslverify"])) ? /* Off. */ false : $args["sslverify"];
|
197 |
/**/
|
198 |
if ((is_array ($post_vars) || is_string ($post_vars)) && !empty ($post_vars))
|
199 |
$args = array_merge ($args, array ("method" => "POST", "body" => $post_vars));
|
200 |
/**/
|
201 |
+
$response = wp_remote_request ($url, $args); /* Process the remote request now. */
|
|
|
|
|
|
|
|
|
202 |
/**/
|
203 |
+
if (strcasecmp ((string)$return, "array") === 0 && !is_wp_error ($response) && is_array ($response))
|
|
|
|
|
204 |
{
|
205 |
+
$a = array ("code" => (int)wp_remote_retrieve_response_code ($response));
|
206 |
+
$a = array_merge ($a, array ("message" => wp_remote_retrieve_response_message ($response)));
|
207 |
+
$a = array_merge ($a, array ("headers" => wp_remote_retrieve_headers ($response)));
|
208 |
+
$a = array_merge ($a, array ("body" => wp_remote_retrieve_body ($response)));
|
209 |
+
$a = array_merge ($a, array ("response" => $response));
|
210 |
/**/
|
211 |
+
return /* Return array w/ ``$response`` too. */ $a;
|
212 |
}
|
213 |
+
else if (!is_wp_error ($response) && is_array ($response) /* Return body only. */)
|
214 |
+
return /* Return ``$response`` body only. */ wp_remote_retrieve_body ($response);
|
215 |
/**/
|
216 |
+
else /* Else this remote request has failed completely. Return false. */
|
217 |
+
return false; /* Remote request failed, return false. */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
}
|
|
|
219 |
else /* Else, return false. */
|
220 |
return false;
|
221 |
}
|
222 |
/**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
* Shortens a long URL, based on s2Member configuration.
|
224 |
*
|
225 |
* @package s2Member\Utilities
|
226 |
* @since 111002
|
227 |
*
|
228 |
* @param str $url A full/long URL to be shortened.
|
229 |
+
* @param str $api_sp Optional. A specific URL shortening API to use. Defaults to that which is configured in the s2Member Dashboard. Normally `tiny_url`, by default.
|
230 |
* @param bool $try_backups Defaults to true. If a failure occurs with the first API, we'll try others until we have success.
|
231 |
* @return str|bool The shortened URL on success, else false on failure.
|
232 |
*/
|
233 |
public static function shorten ($url = FALSE, $api_sp = FALSE, $try_backups = TRUE)
|
234 |
{
|
235 |
+
$url = /* Force strings, else false. */ ($url && is_string ($url)) ? $url : false;
|
236 |
+
$api_sp = ($api_sp && is_string ($api_sp)) ? strtolower ($api_sp) : false;
|
237 |
/**/
|
238 |
$default_url_shortener = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["default_url_shortener"];
|
239 |
$default_custom_str_url_shortener = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["default_custom_str_url_shortener"];
|
240 |
/**/
|
241 |
+
$apis = array ("tiny_url", "goo_gl"); /* The shortening APIs currently pre-integrated in this release of s2Member. */
|
242 |
/**/
|
243 |
+
if ($url && ($api = /* If specific, use it. Otherwise, use the default shortening API. */ ($api_sp) ? $api_sp : $default_url_shortener))
|
244 |
{
|
245 |
+
if (!$api_sp && ($custom_url = trim (apply_filters ("ws_plugin__s2member_url_shorten", false, get_defined_vars ()))) && stripos ($custom_url, "http") === 0)
|
246 |
return ($shorter_url = $custom_url); /* Using whatever other shortener API you prefer, over the ones available by default with s2Member. */
|
247 |
/**/
|
248 |
else if (!$api_sp && stripos ($default_custom_str_url_shortener, "http") === 0 && ($custom_url = trim (c_ws_plugin__s2member_utils_urls::remote (str_ireplace (array ("%%s2_long_url%%", "%%s2_long_url_md5%%"), array (rawurlencode ($url), urlencode (md5 ($url))), $default_custom_str_url_shortener)))) && stripos ($custom_url, "http") === 0)
|
251 |
else if ($api === "tiny_url" && ($tiny_url = trim (c_ws_plugin__s2member_utils_urls::remote ("http://tinyurl.com/api-create.php?url=" . rawurlencode ($url)))) && stripos ($tiny_url, "http") === 0)
|
252 |
return ($shorter_url = $tiny_url); /* The default tinyURL API: <http://tinyurl.com/api-create.php?url=http://www.example.com/>.
|
253 |
/**/
|
254 |
+
else if ($api === "goo_gl" && ($goo_gl = json_decode (trim (c_ws_plugin__s2member_utils_urls::remote ("https://www.googleapis.com/urlshortener/v1/url" . ((($goo_gl_key = apply_filters ("ws_plugin__s2member_url_shorten_api_goo_gl_key", false))) ? "?key=" . urlencode ($goo_gl_key) : ""), json_encode (array ("longUrl" => $url)), array ("headers" => array ("Content-Type" => "application/json")))), true)) && !empty ($goo_gl["id"]) && is_string ($goo_gl_url = $goo_gl["id"]) && stripos ($goo_gl_url, "http") === 0)
|
255 |
return ($shorter_url = $goo_gl_url); /* Google® API: <http://code.google.com/apis/urlshortener/v1/getting_started.html>.
|
256 |
/**/
|
257 |
+
else if ($try_backups && count ($apis) > 1) /* Try backups? This way we can still shorten the URL with a backup. */
|
258 |
/**/
|
259 |
+
foreach /* Try other backup APIs now. */ (array_diff ($apis, array ($api)) as $backup)
|
260 |
if (($backup = c_ws_plugin__s2member_utils_urls::shorten ($url, $backup, false)))
|
261 |
+
return /* Success, we can return now. */ ($shorter_url = $backup);
|
262 |
}
|
263 |
+
return /* Default return value. */ false;
|
264 |
+
}
|
265 |
+
/**
|
266 |
+
* Removes all s2Member-generated signatures from a full URL, a partial URI, or just a query string.
|
267 |
+
*
|
268 |
+
* @package s2Member\Utilities
|
269 |
+
* @since 111106
|
270 |
+
*
|
271 |
+
* @param str $url_uri_query A full URL, a partial URI, or just the query string; to remove s2Member-generated signatures from.
|
272 |
+
* @param str $sig_var Optional. The name of the s2Member-generated signature variable. Defaults to `_s2member_sig`.
|
273 |
+
* @return str A full URL, a partial URI, or just the query string; without any s2Member-generated signatures.
|
274 |
+
*/
|
275 |
+
public static function remove_s2member_sigs ($url_uri_query = FALSE, $sig_var = FALSE)
|
276 |
+
{
|
277 |
+
$url_uri_query = c_ws_plugin__s2member_utils_strings::trim ((string)$url_uri_query, false, "?&=");
|
278 |
+
$sig_var = ($sig_var && is_string ($sig_var)) ? $sig_var : /* Use default. */ "_s2member_sig";
|
279 |
+
$sigs = /* Remove all signatures. */ array_unique (array ($sig_var, "_s2member_sig"));
|
280 |
/**/
|
281 |
+
return trim (remove_query_arg ($sigs, $url_uri_query), "?&=");
|
282 |
+
}
|
283 |
+
/**
|
284 |
+
* Adds an s2Member-generated signature onto a full URL, a partial URI, or just a query string.
|
285 |
+
*
|
286 |
+
* @package s2Member\Utilities
|
287 |
+
* @since 111106
|
288 |
+
*
|
289 |
+
* @param str $url_uri_query A full URL, a partial URI, or just a query string; to append the s2Member-generated signature onto.
|
290 |
+
* @param str $sig_var Optional. The name of the s2Member-generated signature variable. Defaults to `_s2member_sig`.
|
291 |
+
* @return str A full URL, a partial URI, or just a query string; with an s2Member-generated signature.
|
292 |
+
*/
|
293 |
+
public static function add_s2member_sig ($url_uri_query = FALSE, $sig_var = FALSE)
|
294 |
+
{
|
295 |
+
$url_uri_query = $query = c_ws_plugin__s2member_utils_strings::trim ((string)$url_uri_query, false, "?&=");
|
296 |
+
$sig_var = ($sig_var && is_string ($sig_var)) ? $sig_var : /* Use default. */ "_s2member_sig";
|
297 |
+
/**/
|
298 |
+
$url_uri_query = $query = c_ws_plugin__s2member_utils_urls::remove_s2member_sigs ($url_uri_query, $sig_var);
|
299 |
+
if ( /* Is this a full URL, or a partial URI? */preg_match ("/^(?:[a-z]+\:\/\/|\/)/i", ($url_uri_query)))
|
300 |
+
$query = trim (c_ws_plugin__s2member_utils_urls::parse_url ($url_uri_query, PHP_URL_QUERY), "?&=");
|
301 |
+
/**/
|
302 |
+
$key = /* Obtain the proper encryption/decryption key. */ c_ws_plugin__s2member_utils_encryption::key ();
|
303 |
+
/**/
|
304 |
+
if ($url_uri_query && is_string /* We DO allow empty query strings. So we can sign a URL without one. */ ($query))
|
305 |
+
{
|
306 |
+
wp_parse_str /* Parse the query string into an array of ``$vars``. Then sort & serialize them into a string. */ ($query, $vars);
|
307 |
+
$vars = serialize (c_ws_plugin__s2member_utils_arrays::ksort_deep (c_ws_plugin__s2member_utils_strings::trim_deep ($vars)));
|
308 |
+
/**/
|
309 |
+
$sig = /* The s2Member-generated signature. */ ($time = time ()) . "-" . md5 ($key . $time . $vars);
|
310 |
+
/**/
|
311 |
+
$url_uri_query = add_query_arg ($sig_var, urlencode ($sig), $url_uri_query);
|
312 |
+
}
|
313 |
+
return /* Possibly with a ``$sig_var`` variable. */ $url_uri_query;
|
314 |
+
}
|
315 |
+
/**
|
316 |
+
* Verifies an s2Member-generated signature; in a full URL, a partial URI, or in just a query string.
|
317 |
+
*
|
318 |
+
* @package s2Member\Utilities
|
319 |
+
* @since 111106
|
320 |
+
*
|
321 |
+
* @param str $url_uri_query A full URL, a partial URI, or just a query string. Must have an s2Member-generated signature to validate.
|
322 |
+
* @param bool $check_time Optional. Defaults to false. If true, s2Member will also check if the signature has expired, based on ``$exp_secs``.
|
323 |
+
* @param str|int $exp_secs Optional. Defaults to (int)10. If ``$check_time`` is true, s2Member will check if the signature has expired, based on ``$exp_secs``.
|
324 |
+
* @param str $sig_var Optional. The name of the s2Member-generated signature variable. Defaults to `_s2member_sig`.
|
325 |
+
* @return bool True if the s2Member-generated signature is OK, else false.
|
326 |
+
*/
|
327 |
+
public static function s2member_sig_ok ($url_uri_query = FALSE, $check_time = FALSE, $exp_secs = FALSE, $sig_var = FALSE)
|
328 |
+
{
|
329 |
+
$url_uri_query = $query = c_ws_plugin__s2member_utils_strings::trim ((string)$url_uri_query, false, "?&=");
|
330 |
+
if ( /* Is this a full URL, or a partial URI? */preg_match ("/^(?:[a-z]+\:\/\/|\/)/i", ($url_uri_query)))
|
331 |
+
$query = trim (c_ws_plugin__s2member_utils_urls::parse_url ($url_uri_query, PHP_URL_QUERY), "?&=");
|
332 |
+
/**/
|
333 |
+
$check_time = /* Are we checking time? Force a boolean value here. */ ($check_time) ? true : false;
|
334 |
+
$exp_secs = (is_numeric ($exp_secs)) ? (int)$exp_secs : /* Else 10 seconds by default here. */ 10;
|
335 |
+
$sig_var = ($sig_var && is_string ($sig_var)) ? $sig_var : /* Use default. */ "_s2member_sig";
|
336 |
+
/**/
|
337 |
+
$key = /* Obtain the proper encryption/decryption key. */ c_ws_plugin__s2member_utils_encryption::key ();
|
338 |
+
/**/
|
339 |
+
if (preg_match_all /* Does ``$query`` have an s2Member-generated signature? */ ("/" . preg_quote ($sig_var, "/") . "\=([0-9]+)-([^&$]+)/", $query, $sigs))
|
340 |
+
{
|
341 |
+
$query = /* Remove existing s2Member-generated signatures. */ c_ws_plugin__s2member_utils_urls::remove_s2member_sigs ($query, $sig_var);
|
342 |
+
/**/
|
343 |
+
wp_parse_str /* Parse the query string into an array of ``$vars``. Then sort & serialize them into a string. */ ($query, $vars);
|
344 |
+
$vars = serialize (c_ws_plugin__s2member_utils_arrays::ksort_deep (c_ws_plugin__s2member_utils_strings::trim_deep ($vars)));
|
345 |
+
/**/
|
346 |
+
($time = $sigs[1][($i = count ($sigs[1]) - 1)]) . ($sig = $sigs[2][$i]) . ($valid_sig = md5 ($key . $time . $vars));
|
347 |
+
/**/
|
348 |
+
if /* Checking time? This must NOT be older than ``$exp_secs`` seconds ago. */ ($check_time)
|
349 |
+
return ($sig === $valid_sig && $time >= strtotime ("-" . $exp_secs . " seconds"));
|
350 |
+
/**/
|
351 |
+
else /* Ignoring time? Just need to compare signatures in this case. */
|
352 |
+
return /* Do they match up? */ ($sig === $valid_sig);
|
353 |
+
}
|
354 |
+
else /* Return false. No ``$query``, or no ``$sigs``. */
|
355 |
+
return /* False, it's NOT ok. */ false;
|
356 |
}
|
357 |
}
|
358 |
}
|
includes/functions/api-functions.inc.php
CHANGED
@@ -2494,4 +2494,142 @@ if (!function_exists ("s2member_shorten_url"))
|
|
2494 |
return c_ws_plugin__s2member_utils_urls::shorten ($url, $api_sp, $try_backups);
|
2495 |
}
|
2496 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2497 |
?>
|
2494 |
return c_ws_plugin__s2member_utils_urls::shorten ($url, $api_sp, $try_backups);
|
2495 |
}
|
2496 |
}
|
2497 |
+
/**
|
2498 |
+
* Two-way RIJNDAEL 256 encryption/decryption, with a URL-safe base64 wrapper.
|
2499 |
+
*
|
2500 |
+
* Falls back on XOR encryption/decryption when/if mcrypt is not available.
|
2501 |
+
*
|
2502 |
+
* ———— PHP Code Samples ————
|
2503 |
+
* ```
|
2504 |
+
* <!php $encrypted = s2member_encrypt("hello"); !>
|
2505 |
+
* <!php $decrypted = s2member_decrypt($encrypted); !>
|
2506 |
+
* ```
|
2507 |
+
* ———— Shortcode Equivalent ————
|
2508 |
+
* ```
|
2509 |
+
* There is NO Shortcode equivalent for this ( yet ).
|
2510 |
+
* ```
|
2511 |
+
*
|
2512 |
+
* @package s2Member\API_Functions
|
2513 |
+
* @since 111106
|
2514 |
+
*
|
2515 |
+
* @param str $string A string of data to encrypt.
|
2516 |
+
* @param str $key Optional. Key used for encryption. Defaults to the one configured for s2Member. Short of that, defaults to: ``wp_salt()``.
|
2517 |
+
* @param bool $w_md5_cs Optional. Defaults to true. When true, an MD5 checksum is used in the encrypted string *( recommended )*.
|
2518 |
+
* @return str Encrypted string.
|
2519 |
+
*
|
2520 |
+
* @see s2Member\API_Functions\s2member_decrypt()
|
2521 |
+
* @see s2Member\API_Functions\s2member_xencrypt()
|
2522 |
+
* @see s2Member\API_Functions\s2member_xdecrypt()
|
2523 |
+
*
|
2524 |
+
* @todo Create a Shortcode equivalent for this function.
|
2525 |
+
*/
|
2526 |
+
if (!function_exists ("s2member_encrypt"))
|
2527 |
+
{
|
2528 |
+
function s2member_encrypt ($string = FALSE, $key = FALSE, $w_md5_cs = TRUE)
|
2529 |
+
{
|
2530 |
+
return c_ws_plugin__s2member_utils_encryption::encrypt ($string, $key, $w_md5_cs);
|
2531 |
+
}
|
2532 |
+
}
|
2533 |
+
/**
|
2534 |
+
* Two-way RIJNDAEL 256 encryption/decryption, with a URL-safe base64 wrapper.
|
2535 |
+
*
|
2536 |
+
* Falls back on XOR encryption/decryption when/if mcrypt is not available.
|
2537 |
+
*
|
2538 |
+
* ———— PHP Code Samples ————
|
2539 |
+
* ```
|
2540 |
+
* <!php $encrypted = s2member_encrypt("hello"); !>
|
2541 |
+
* <!php $decrypted = s2member_decrypt($encrypted); !>
|
2542 |
+
* ```
|
2543 |
+
* ———— Shortcode Equivalent ————
|
2544 |
+
* ```
|
2545 |
+
* There is NO Shortcode equivalent for this ( yet ).
|
2546 |
+
* ```
|
2547 |
+
*
|
2548 |
+
* @package s2Member\API_Functions
|
2549 |
+
* @since 111106
|
2550 |
+
*
|
2551 |
+
* @param str $base64 A string of data to decrypt. Should still be base64 encoded.
|
2552 |
+
* @param str $key Optional. Key used originally for encryption. Defaults to the one configured for s2Member. Short of that, defaults to: ``wp_salt()``.
|
2553 |
+
* @return str Decrypted string.
|
2554 |
+
*
|
2555 |
+
* @see s2Member\API_Functions\s2member_encrypt()
|
2556 |
+
* @see s2Member\API_Functions\s2member_xencrypt()
|
2557 |
+
* @see s2Member\API_Functions\s2member_xdecrypt()
|
2558 |
+
*
|
2559 |
+
* @todo Create a Shortcode equivalent for this function.
|
2560 |
+
*/
|
2561 |
+
if (!function_exists ("s2member_decrypt"))
|
2562 |
+
{
|
2563 |
+
function s2member_decrypt ($base64 = FALSE, $key = FALSE)
|
2564 |
+
{
|
2565 |
+
return c_ws_plugin__s2member_utils_encryption::decrypt ($base64, $key);
|
2566 |
+
}
|
2567 |
+
}
|
2568 |
+
/**
|
2569 |
+
* Two-way XOR encryption/decryption, with a URL-safe base64 wrapper.
|
2570 |
+
*
|
2571 |
+
* ———— PHP Code Samples ————
|
2572 |
+
* ```
|
2573 |
+
* <!php $encrypted = s2member_xencrypt("hello"); !>
|
2574 |
+
* <!php $decrypted = s2member_xdecrypt($encrypted); !>
|
2575 |
+
* ```
|
2576 |
+
* ———— Shortcode Equivalent ————
|
2577 |
+
* ```
|
2578 |
+
* There is NO Shortcode equivalent for this ( yet ).
|
2579 |
+
* ```
|
2580 |
+
*
|
2581 |
+
* @package s2Member\API_Functions
|
2582 |
+
* @since 111106
|
2583 |
+
*
|
2584 |
+
* @param str $string A string of data to encrypt.
|
2585 |
+
* @param str $key Optional. Key used for encryption. Defaults to the one configured for s2Member. Short of that, defaults to: ``wp_salt()``.
|
2586 |
+
* @param bool $w_md5_cs Optional. Defaults to true. When true, an MD5 checksum is used in the encrypted string *( recommended )*.
|
2587 |
+
* @return str Encrypted string.
|
2588 |
+
*
|
2589 |
+
* @see s2Member\API_Functions\s2member_xdecrypt()
|
2590 |
+
* @see s2Member\API_Functions\s2member_encrypt()
|
2591 |
+
* @see s2Member\API_Functions\s2member_decrypt()
|
2592 |
+
*
|
2593 |
+
* @todo Create a Shortcode equivalent for this function.
|
2594 |
+
*/
|
2595 |
+
if (!function_exists ("s2member_xencrypt"))
|
2596 |
+
{
|
2597 |
+
function s2member_xencrypt ($string = FALSE, $key = FALSE, $w_md5_cs = TRUE)
|
2598 |
+
{
|
2599 |
+
return c_ws_plugin__s2member_utils_encryption::xencrypt ($string, $key, $w_md5_cs);
|
2600 |
+
}
|
2601 |
+
}
|
2602 |
+
/**
|
2603 |
+
* Two-way XOR encryption/decryption, with a URL-safe base64 wrapper.
|
2604 |
+
*
|
2605 |
+
* ———— PHP Code Samples ————
|
2606 |
+
* ```
|
2607 |
+
* <!php $encrypted = s2member_xencrypt("hello"); !>
|
2608 |
+
* <!php $decrypted = s2member_xdecrypt($encrypted); !>
|
2609 |
+
* ```
|
2610 |
+
* ———— Shortcode Equivalent ————
|
2611 |
+
* ```
|
2612 |
+
* There is NO Shortcode equivalent for this ( yet ).
|
2613 |
+
* ```
|
2614 |
+
*
|
2615 |
+
* @package s2Member\API_Functions
|
2616 |
+
* @since 111106
|
2617 |
+
*
|
2618 |
+
* @param str $base64 A string of data to decrypt. Should still be base64 encoded.
|
2619 |
+
* @param str $key Optional. Key used originally for encryption. Defaults to the one configured for s2Member. Short of that, defaults to: ``wp_salt()``.
|
2620 |
+
* @return str Decrypted string.
|
2621 |
+
*
|
2622 |
+
* @see s2Member\API_Functions\s2member_xencrypt()
|
2623 |
+
* @see s2Member\API_Functions\s2member_encrypt()
|
2624 |
+
* @see s2Member\API_Functions\s2member_decrypt()
|
2625 |
+
*
|
2626 |
+
* @todo Create a Shortcode equivalent for this function.
|
2627 |
+
*/
|
2628 |
+
if (!function_exists ("s2member_xdecrypt"))
|
2629 |
+
{
|
2630 |
+
function s2member_xdecrypt ($base64 = FALSE, $key = FALSE)
|
2631 |
+
{
|
2632 |
+
return c_ws_plugin__s2member_utils_encryption::xdecrypt ($base64, $key);
|
2633 |
+
}
|
2634 |
+
}
|
2635 |
?>
|
includes/menu-pages/api-ops.inc.php
CHANGED
@@ -123,7 +123,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
|
|
123 |
echo '<tr>' . "\n";
|
124 |
/**/
|
125 |
echo '<td>' . "\n";
|
126 |
-
echo '<input type="text" name="ws_plugin__s2member_signup_notification_recipients" id="ws-plugin--s2member-signup-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_notification_recipients"]) . '" /><br />' . "\n";
|
127 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
128 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
129 |
echo '</td>' . "\n";
|
@@ -221,7 +221,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
|
|
221 |
echo '<tr>' . "\n";
|
222 |
/**/
|
223 |
echo '<td>' . "\n";
|
224 |
-
echo '<input type="text" name="ws_plugin__s2member_registration_notification_recipients" id="ws-plugin--s2member-registration-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["registration_notification_recipients"]) . '" /><br />' . "\n";
|
225 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
226 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
227 |
echo '</td>' . "\n";
|
@@ -326,7 +326,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
|
|
326 |
echo '<tr>' . "\n";
|
327 |
/**/
|
328 |
echo '<td>' . "\n";
|
329 |
-
echo '<input type="text" name="ws_plugin__s2member_payment_notification_recipients" id="ws-plugin--s2member-payment-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["payment_notification_recipients"]) . '" /><br />' . "\n";
|
330 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
331 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
332 |
echo '</td>' . "\n";
|
@@ -434,7 +434,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
|
|
434 |
echo '<tr>' . "\n";
|
435 |
/**/
|
436 |
echo '<td>' . "\n";
|
437 |
-
echo '<input type="text" name="ws_plugin__s2member_modification_notification_recipients" id="ws-plugin--s2member-modification-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["modification_notification_recipients"]) . '" /><br />' . "\n";
|
438 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
439 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
440 |
echo '</td>' . "\n";
|
@@ -532,7 +532,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
|
|
532 |
echo '<tr>' . "\n";
|
533 |
/**/
|
534 |
echo '<td>' . "\n";
|
535 |
-
echo '<input type="text" name="ws_plugin__s2member_cancellation_notification_recipients" id="ws-plugin--s2member-cancellation-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["cancellation_notification_recipients"]) . '" /><br />' . "\n";
|
536 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
537 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
538 |
echo '</td>' . "\n";
|
@@ -632,7 +632,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
|
|
632 |
echo '<tr>' . "\n";
|
633 |
/**/
|
634 |
echo '<td>' . "\n";
|
635 |
-
echo '<input type="text" name="ws_plugin__s2member_eot_del_notification_recipients" id="ws-plugin--s2member-eot-del-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_del_notification_recipients"]) . '" /><br />' . "\n";
|
636 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
637 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
638 |
echo '</td>' . "\n";
|
@@ -733,7 +733,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
|
|
733 |
echo '<tr>' . "\n";
|
734 |
/**/
|
735 |
echo '<td>' . "\n";
|
736 |
-
echo '<input type="text" name="ws_plugin__s2member_ref_rev_notification_recipients" id="ws-plugin--s2member-ref-rev-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["ref_rev_notification_recipients"]) . '" /><br />' . "\n";
|
737 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
738 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
739 |
echo '</td>' . "\n";
|
@@ -824,7 +824,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
|
|
824 |
echo '<tr>' . "\n";
|
825 |
/**/
|
826 |
echo '<td>' . "\n";
|
827 |
-
echo '<input type="text" name="ws_plugin__s2member_sp_sale_notification_recipients" id="ws-plugin--s2member-sp-sale-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_sale_notification_recipients"]) . '" /><br />' . "\n";
|
828 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
829 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
830 |
echo '</td>' . "\n";
|
@@ -914,7 +914,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_api_ops"))
|
|
914 |
echo '<tr>' . "\n";
|
915 |
/**/
|
916 |
echo '<td>' . "\n";
|
917 |
-
echo '<input type="text" name="ws_plugin__s2member_sp_ref_rev_notification_recipients" id="ws-plugin--s2member-sp-ref-rev-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_ref_rev_notification_recipients"]) . '" /><br />' . "\n";
|
918 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
919 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
920 |
echo '</td>' . "\n";
|
123 |
echo '<tr>' . "\n";
|
124 |
/**/
|
125 |
echo '<td>' . "\n";
|
126 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_signup_notification_recipients" id="ws-plugin--s2member-signup-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_notification_recipients"]) . '" /><br />' . "\n";
|
127 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
128 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
129 |
echo '</td>' . "\n";
|
221 |
echo '<tr>' . "\n";
|
222 |
/**/
|
223 |
echo '<td>' . "\n";
|
224 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_registration_notification_recipients" id="ws-plugin--s2member-registration-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["registration_notification_recipients"]) . '" /><br />' . "\n";
|
225 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
226 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
227 |
echo '</td>' . "\n";
|
326 |
echo '<tr>' . "\n";
|
327 |
/**/
|
328 |
echo '<td>' . "\n";
|
329 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_payment_notification_recipients" id="ws-plugin--s2member-payment-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["payment_notification_recipients"]) . '" /><br />' . "\n";
|
330 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
331 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
332 |
echo '</td>' . "\n";
|
434 |
echo '<tr>' . "\n";
|
435 |
/**/
|
436 |
echo '<td>' . "\n";
|
437 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_modification_notification_recipients" id="ws-plugin--s2member-modification-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["modification_notification_recipients"]) . '" /><br />' . "\n";
|
438 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
439 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
440 |
echo '</td>' . "\n";
|
532 |
echo '<tr>' . "\n";
|
533 |
/**/
|
534 |
echo '<td>' . "\n";
|
535 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_cancellation_notification_recipients" id="ws-plugin--s2member-cancellation-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["cancellation_notification_recipients"]) . '" /><br />' . "\n";
|
536 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
537 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
538 |
echo '</td>' . "\n";
|
632 |
echo '<tr>' . "\n";
|
633 |
/**/
|
634 |
echo '<td>' . "\n";
|
635 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_eot_del_notification_recipients" id="ws-plugin--s2member-eot-del-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_del_notification_recipients"]) . '" /><br />' . "\n";
|
636 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
637 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
638 |
echo '</td>' . "\n";
|
733 |
echo '<tr>' . "\n";
|
734 |
/**/
|
735 |
echo '<td>' . "\n";
|
736 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_ref_rev_notification_recipients" id="ws-plugin--s2member-ref-rev-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["ref_rev_notification_recipients"]) . '" /><br />' . "\n";
|
737 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
738 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
739 |
echo '</td>' . "\n";
|
824 |
echo '<tr>' . "\n";
|
825 |
/**/
|
826 |
echo '<td>' . "\n";
|
827 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_sp_sale_notification_recipients" id="ws-plugin--s2member-sp-sale-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_sale_notification_recipients"]) . '" /><br />' . "\n";
|
828 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
829 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
830 |
echo '</td>' . "\n";
|
914 |
echo '<tr>' . "\n";
|
915 |
/**/
|
916 |
echo '<td>' . "\n";
|
917 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_sp_ref_rev_notification_recipients" id="ws-plugin--s2member-sp-ref-rev-notification-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_ref_rev_notification_recipients"]) . '" /><br />' . "\n";
|
918 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
919 |
echo '<code>"John" <john@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
920 |
echo '</td>' . "\n";
|
includes/menu-pages/down-ops.inc.php
CHANGED
@@ -88,7 +88,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
|
|
88 |
echo '<tr>' . "\n";
|
89 |
/**/
|
90 |
echo '<td>' . "\n";
|
91 |
-
echo '<input type="text" name="ws_plugin__s2member_level' . $n . '_file_downloads_allowed" id="ws-plugin--s2member-level' . $n . '-file-downloads-allowed" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed"]) . '" style="width:200px;"
|
92 |
echo 'Only this many unique downloads will be permitted every X day(s), at ' . (($n === $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]) ? 'highest Level #' . $n : 'Level #' . $n . ' or higher') . '.<br />' . "\n";
|
93 |
echo '<em>* To allow UNLIMITED downloads, use: <code>999999999</code> ( i.e. <code>999999999</code> = unlimited ).</em>' . "\n";
|
94 |
echo '</td>' . "\n";
|
@@ -212,7 +212,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
|
|
212 |
echo '<tr>' . "\n";
|
213 |
/**/
|
214 |
echo '<td>' . "\n";
|
215 |
-
echo '<input type="text" name="ws_plugin__s2member_file_download_inline_extensions" id="ws-plugin--s2member-file-download-inline-extensions" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_inline_extensions"]) . '" /><br />' . "\n";
|
216 |
echo 'Inline extensions, comma-delimited. Ex: <code>htm,html,pdf,jpg,jpeg,jpe,gif,png,mp3,mp4,flv,ogg,webm</code>' . "\n";
|
217 |
echo '</td>' . "\n";
|
218 |
/**/
|
@@ -281,7 +281,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
|
|
281 |
echo '<tr>' . "\n";
|
282 |
/**/
|
283 |
echo '<td>' . "\n";
|
284 |
-
echo '<input type="text" name="ws_plugin__s2member_amazon_s3_files_bucket" id="ws-plugin--s2member-amazon-s3-files-bucket" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"]) . '" /><br />' . "\n";
|
285 |
echo 'Your Amazon® S3 Bucket will be used, instead of the <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory.' . "\n";
|
286 |
echo '</td>' . "\n";
|
287 |
/**/
|
@@ -298,7 +298,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
|
|
298 |
echo '<tr>' . "\n";
|
299 |
/**/
|
300 |
echo '<td>' . "\n";
|
301 |
-
echo '<input type="text" name="ws_plugin__s2member_amazon_s3_files_access_key" id="ws-plugin--s2member-amazon-s3-files-access-key" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_access_key"]) . '" /><br />' . "\n";
|
302 |
echo 'See: <code>Amazon® Web Services Account -> Security Credentials -> Access Credentials</code>.' . "\n";
|
303 |
echo '</td>' . "\n";
|
304 |
/**/
|
@@ -315,7 +315,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
|
|
315 |
echo '<tr>' . "\n";
|
316 |
/**/
|
317 |
echo '<td>' . "\n";
|
318 |
-
echo '<input type="password" name="ws_plugin__s2member_amazon_s3_files_secret_key" id="ws-plugin--s2member-amazon-s3-files-secret-key" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_secret_key"]) . '" /><br />' . "\n";
|
319 |
echo 'See: <code>Amazon® Web Services Account -> Security Credentials -> Access Credentials</code>.' . "\n";
|
320 |
echo '</td>' . "\n";
|
321 |
/**/
|
@@ -374,7 +374,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
|
|
374 |
echo '<tr>' . "\n";
|
375 |
/**/
|
376 |
echo '<td>' . "\n";
|
377 |
-
echo '<input type="text" name="ws_plugin__s2member_amazon_cf_files_private_key_id" id="ws-plugin--s2member-amazon-cf-files-private-key-id" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_cf_files_private_key_id"]) . '" data-s-prev-config-value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_cf_files_private_key_id"]) . '" /><br />' . "\n";
|
378 |
echo 'See: <code>Amazon® Web Services Account -> Security Credentials -> Key Pairs</code>.' . "\n";
|
379 |
echo '</td>' . "\n";
|
380 |
/**/
|
@@ -441,7 +441,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
|
|
441 |
echo '<tr>' . "\n";
|
442 |
/**/
|
443 |
echo '<td>' . "\n";
|
444 |
-
echo '<input type="text" name="ws_plugin__s2member_amazon_cf_files_distro_downloads_cname" id="ws-plugin--s2member-amazon-cf-files-downloads-distro-cname" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_cf_files_distro_downloads_cname"]) . '" /><br />' . "\n";
|
445 |
echo 'Example: <code>s2-file-downloads.' . esc_html (c_ws_plugin__s2member_utils_urls::parse_url (site_url (), PHP_URL_HOST)) . '</code>.<br />' . "\n";
|
446 |
echo '<em>* Optional, do NOT fill this in unless you know what you\'re doing. This requires DNS changes.</em>' . "\n";
|
447 |
echo '</td>' . "\n";
|
@@ -459,7 +459,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
|
|
459 |
echo '<tr>' . "\n";
|
460 |
/**/
|
461 |
echo '<td>' . "\n";
|
462 |
-
echo '<input type="text" name="ws_plugin__s2member_amazon_cf_files_distro_streaming_cname" id="ws-plugin--s2member-amazon-cf-files-streaming-distro-cname" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_cf_files_distro_streaming_cname"]) . '" /><br />' . "\n";
|
463 |
echo 'Example: <code>s2-streaming-files.' . esc_html (c_ws_plugin__s2member_utils_urls::parse_url (site_url (), PHP_URL_HOST)) . '</code>.<br />' . "\n";
|
464 |
echo '<em>* Optional, do NOT fill this in unless you know what you\'re doing. This requires DNS changes.</em>' . "\n";
|
465 |
echo '</td>' . "\n";
|
88 |
echo '<tr>' . "\n";
|
89 |
/**/
|
90 |
echo '<td>' . "\n";
|
91 |
+
echo '<input type="text" maxlength="9" autocomplete="off" name="ws_plugin__s2member_level' . $n . '_file_downloads_allowed" id="ws-plugin--s2member-level' . $n . '-file-downloads-allowed" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed"]) . '" style="width:200px;" /> every <input type="text" maxlength="3" autocomplete="off" name="ws_plugin__s2member_level' . $n . '_file_downloads_allowed_days" id="ws-plugin--s2member-level' . $n . '-file-downloads-allowed-days" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_file_downloads_allowed_days"]) . '" style="width:200px;" onkeyup="if(this.value > 365){ alert(\'( 365 days is the maximum ).\\nThis keeps the logs optimized.\'); this.value = 365; }" /> day(s).<br />' . "\n";
|
92 |
echo 'Only this many unique downloads will be permitted every X day(s), at ' . (($n === $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]) ? 'highest Level #' . $n : 'Level #' . $n . ' or higher') . '.<br />' . "\n";
|
93 |
echo '<em>* To allow UNLIMITED downloads, use: <code>999999999</code> ( i.e. <code>999999999</code> = unlimited ).</em>' . "\n";
|
94 |
echo '</td>' . "\n";
|
212 |
echo '<tr>' . "\n";
|
213 |
/**/
|
214 |
echo '<td>' . "\n";
|
215 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_file_download_inline_extensions" id="ws-plugin--s2member-file-download-inline-extensions" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_inline_extensions"]) . '" /><br />' . "\n";
|
216 |
echo 'Inline extensions, comma-delimited. Ex: <code>htm,html,pdf,jpg,jpeg,jpe,gif,png,mp3,mp4,flv,ogg,webm</code>' . "\n";
|
217 |
echo '</td>' . "\n";
|
218 |
/**/
|
281 |
echo '<tr>' . "\n";
|
282 |
/**/
|
283 |
echo '<td>' . "\n";
|
284 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_amazon_s3_files_bucket" id="ws-plugin--s2member-amazon-s3-files-bucket" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_bucket"]) . '" /><br />' . "\n";
|
285 |
echo 'Your Amazon® S3 Bucket will be used, instead of the <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory.' . "\n";
|
286 |
echo '</td>' . "\n";
|
287 |
/**/
|
298 |
echo '<tr>' . "\n";
|
299 |
/**/
|
300 |
echo '<td>' . "\n";
|
301 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_amazon_s3_files_access_key" id="ws-plugin--s2member-amazon-s3-files-access-key" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_access_key"]) . '" /><br />' . "\n";
|
302 |
echo 'See: <code>Amazon® Web Services Account -> Security Credentials -> Access Credentials</code>.' . "\n";
|
303 |
echo '</td>' . "\n";
|
304 |
/**/
|
315 |
echo '<tr>' . "\n";
|
316 |
/**/
|
317 |
echo '<td>' . "\n";
|
318 |
+
echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_amazon_s3_files_secret_key" id="ws-plugin--s2member-amazon-s3-files-secret-key" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_s3_files_secret_key"]) . '" /><br />' . "\n";
|
319 |
echo 'See: <code>Amazon® Web Services Account -> Security Credentials -> Access Credentials</code>.' . "\n";
|
320 |
echo '</td>' . "\n";
|
321 |
/**/
|
374 |
echo '<tr>' . "\n";
|
375 |
/**/
|
376 |
echo '<td>' . "\n";
|
377 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_amazon_cf_files_private_key_id" id="ws-plugin--s2member-amazon-cf-files-private-key-id" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_cf_files_private_key_id"]) . '" data-s-prev-config-value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_cf_files_private_key_id"]) . '" /><br />' . "\n";
|
378 |
echo 'See: <code>Amazon® Web Services Account -> Security Credentials -> Key Pairs</code>.' . "\n";
|
379 |
echo '</td>' . "\n";
|
380 |
/**/
|
441 |
echo '<tr>' . "\n";
|
442 |
/**/
|
443 |
echo '<td>' . "\n";
|
444 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_amazon_cf_files_distro_downloads_cname" id="ws-plugin--s2member-amazon-cf-files-downloads-distro-cname" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_cf_files_distro_downloads_cname"]) . '" /><br />' . "\n";
|
445 |
echo 'Example: <code>s2-file-downloads.' . esc_html (c_ws_plugin__s2member_utils_urls::parse_url (site_url (), PHP_URL_HOST)) . '</code>.<br />' . "\n";
|
446 |
echo '<em>* Optional, do NOT fill this in unless you know what you\'re doing. This requires DNS changes.</em>' . "\n";
|
447 |
echo '</td>' . "\n";
|
459 |
echo '<tr>' . "\n";
|
460 |
/**/
|
461 |
echo '<td>' . "\n";
|
462 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_amazon_cf_files_distro_streaming_cname" id="ws-plugin--s2member-amazon-cf-files-streaming-distro-cname" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["amazon_cf_files_distro_streaming_cname"]) . '" /><br />' . "\n";
|
463 |
echo 'Example: <code>s2-streaming-files.' . esc_html (c_ws_plugin__s2member_utils_urls::parse_url (site_url (), PHP_URL_HOST)) . '</code>.<br />' . "\n";
|
464 |
echo '<em>* Optional, do NOT fill this in unless you know what you\'re doing. This requires DNS changes.</em>' . "\n";
|
465 |
echo '</td>' . "\n";
|
includes/menu-pages/els-ops.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 3.0
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_menu_page_els_ops"))
|
21 |
{
|
@@ -71,7 +71,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_els_ops"))
|
|
71 |
echo '<tr>' . "\n";
|
72 |
/**/
|
73 |
echo '<td>' . "\n";
|
74 |
-
echo '<input type="password" name="ws_plugin__s2member_mailchimp_api_key" id="ws-plugin--s2member-mailchimp-api-key" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mailchimp_api_key"]) . '" /><br />' . "\n";
|
75 |
echo 'Once you have a MailChimp® account, you\'ll need to <a href="http://www.s2member.com/mailchimp-api-key" target="_blank" rel="external">add an API Key</a>.' . "\n";
|
76 |
echo '</td>' . "\n";
|
77 |
/**/
|
@@ -91,7 +91,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_els_ops"))
|
|
91 |
echo '<tr>' . "\n";
|
92 |
/**/
|
93 |
echo '<td>' . "\n";
|
94 |
-
echo '<input type="text" name="ws_plugin__s2member_level' . $n . '_mailchimp_list_ids" id="ws-plugin--s2member-level' . $n . '-mailchimp-list-ids" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_mailchimp_list_ids"]) . '" /><br />' . "\n";
|
95 |
echo 'New ' . (($n === 0) ? 'Free Subscribers' : 'Level #' . $n . ' Members') . ' will be subscribed to these List IDs.<br />' . "\n";
|
96 |
echo 'Ex: <code>4a44fRio5d, 434ksvviEdf, 8834jsdf923, ee9djfs4jel3</code><br />' . "\n";
|
97 |
echo 'Or: <code>4a44fRio5d::Group Title::Group|Another Group</code>' . "\n";
|
@@ -140,7 +140,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_els_ops"))
|
|
140 |
echo '<tr>' . "\n";
|
141 |
/**/
|
142 |
echo '<td>' . "\n";
|
143 |
-
echo '<input type="text" name="ws_plugin__s2member_level' . $n . '_aweber_list_ids" id="ws-plugin--s2member-level' . $n . '-aweber-list-ids" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_aweber_list_ids"]) . '" /><br />' . "\n";
|
144 |
echo 'New ' . (($n === 0) ? 'Free Subscribers' : 'Level #' . $n . ' Members') . ' will be subscribed to these List IDs.<br />' . "\n";
|
145 |
echo 'Ex: <code>mylist, myotherlist, anotherlist</code>' . "\n";
|
146 |
echo '</td>' . "\n";
|
@@ -182,7 +182,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_els_ops"))
|
|
182 |
echo '<tr class="ws-plugin--s2member-custom-reg-opt-in-label-row"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"]) ? ' style="display:none;"' : '') . '>' . "\n";
|
183 |
/**/
|
184 |
echo '<td>' . "\n";
|
185 |
-
echo '<input type="text" name="ws_plugin__s2member_custom_reg_opt_in_label" id="ws-plugin--s2member-custom-reg-opt-in-label" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in_label"]) . '" /><br />' . "\n";
|
186 |
echo 'Example: <code><img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"] == 1) ? 'checked' : 'unchecked') . '.png" class="ws-plugin--s2member-custom-reg-opt-in-label-prev-img ws-menu-page-img-16" style="vertical-align:middle;" alt="" /> Your Label will appear next to a Checkbox.</code>' . "\n";
|
187 |
echo '</td>' . "\n";
|
188 |
/**/
|
15 |
* @since 3.0
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_menu_page_els_ops"))
|
21 |
{
|
71 |
echo '<tr>' . "\n";
|
72 |
/**/
|
73 |
echo '<td>' . "\n";
|
74 |
+
echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_mailchimp_api_key" id="ws-plugin--s2member-mailchimp-api-key" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mailchimp_api_key"]) . '" /><br />' . "\n";
|
75 |
echo 'Once you have a MailChimp® account, you\'ll need to <a href="http://www.s2member.com/mailchimp-api-key" target="_blank" rel="external">add an API Key</a>.' . "\n";
|
76 |
echo '</td>' . "\n";
|
77 |
/**/
|
91 |
echo '<tr>' . "\n";
|
92 |
/**/
|
93 |
echo '<td>' . "\n";
|
94 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_level' . $n . '_mailchimp_list_ids" id="ws-plugin--s2member-level' . $n . '-mailchimp-list-ids" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_mailchimp_list_ids"]) . '" /><br />' . "\n";
|
95 |
echo 'New ' . (($n === 0) ? 'Free Subscribers' : 'Level #' . $n . ' Members') . ' will be subscribed to these List IDs.<br />' . "\n";
|
96 |
echo 'Ex: <code>4a44fRio5d, 434ksvviEdf, 8834jsdf923, ee9djfs4jel3</code><br />' . "\n";
|
97 |
echo 'Or: <code>4a44fRio5d::Group Title::Group|Another Group</code>' . "\n";
|
140 |
echo '<tr>' . "\n";
|
141 |
/**/
|
142 |
echo '<td>' . "\n";
|
143 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_level' . $n . '_aweber_list_ids" id="ws-plugin--s2member-level' . $n . '-aweber-list-ids" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_aweber_list_ids"]) . '" /><br />' . "\n";
|
144 |
echo 'New ' . (($n === 0) ? 'Free Subscribers' : 'Level #' . $n . ' Members') . ' will be subscribed to these List IDs.<br />' . "\n";
|
145 |
echo 'Ex: <code>mylist, myotherlist, anotherlist</code>' . "\n";
|
146 |
echo '</td>' . "\n";
|
182 |
echo '<tr class="ws-plugin--s2member-custom-reg-opt-in-label-row"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"]) ? ' style="display:none;"' : '') . '>' . "\n";
|
183 |
/**/
|
184 |
echo '<td>' . "\n";
|
185 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_custom_reg_opt_in_label" id="ws-plugin--s2member-custom-reg-opt-in-label" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in_label"]) . '" /><br />' . "\n";
|
186 |
echo 'Example: <code><img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_opt_in"] == 1) ? 'checked' : 'unchecked') . '.png" class="ws-plugin--s2member-custom-reg-opt-in-label-prev-img ws-menu-page-img-16" style="vertical-align:middle;" alt="" /> Your Label will appear next to a Checkbox.</code>' . "\n";
|
187 |
echo '</td>' . "\n";
|
188 |
/**/
|
includes/menu-pages/gen-ops.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 3.0
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
21 |
{
|
@@ -114,7 +114,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
114 |
echo '<tr>' . "\n";
|
115 |
/**/
|
116 |
echo '<td>' . "\n";
|
117 |
-
echo '<input type="text" name="ws_plugin__s2member_sec_encryption_key" id="ws-plugin--s2member-sec-encryption-key" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"]) . '"
|
118 |
echo (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"]) ? '<br />This may contain letters, numbers, spaces; even punctuation. Up to 256 characters.<br /><em>Ex: <code>' . esc_html (strtoupper (c_ws_plugin__s2member_utils_strings::random_str_gen (64))) . '</code></em>' . "\n" : '';
|
119 |
echo (count ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key_history"]) > 1) ? '<br /><a href="#" onclick="ws_plugin__s2member_securityKeyHistory(); return false;">Click here</a> for a history of your last 10 Encryption Keys.<div id="ws-plugin--s2member-sec-encryption-key-history" style="display:none;"><code>' . implode ('</code><br /><code>', $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key_history"]) . '</code></div>' . "\n" : '';
|
120 |
echo '</td>' . "\n";
|
@@ -236,7 +236,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
236 |
echo '<tr>' . "\n";
|
237 |
/**/
|
238 |
echo '<td>' . "\n";
|
239 |
-
echo '<input type="text" name="ws_plugin__s2member_reg_email_from_name" id="ws-plugin--s2member-reg-email-from-name" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . '" /><br />' . "\n";
|
240 |
echo 'We recommend that you use the name of your site here.' . "\n";
|
241 |
echo '</td>' . "\n";
|
242 |
/**/
|
@@ -253,7 +253,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
253 |
echo '<tr>' . "\n";
|
254 |
/**/
|
255 |
echo '<td>' . "\n";
|
256 |
-
echo '<input type="text" name="ws_plugin__s2member_reg_email_from_email" id="ws-plugin--s2member-reg-email-from-email" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"]) . '" /><br />' . "\n";
|
257 |
echo 'Example: support@your-domain.com. <em class="ws-menu-page-hilite">Please read <a href="#" onclick="alert(\'Running WordPress® with an SMTP mail plugin?\\n\\nPlease be advised. If you run an SMTP mail plugin with WordPress®, be sure to configure s2Member with a valid `From:` address ( i.e. one matching your SMTP configuration perhaps ). Most free SMTP servers, such as Gmail® and Yahoo®, require that your `From:` header match the email address associated with your account. Please check with your SMTP service provider before attempting to configure plugins like s2Member to use a different `From:` address when sending email messages.\'); return false;">this IMPORTANT note</a></em>.' . "\n";
|
258 |
echo '</td>' . "\n";
|
259 |
/**/
|
@@ -270,7 +270,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
270 |
echo '<tr>' . "\n";
|
271 |
/**/
|
272 |
echo '<td>' . "\n";
|
273 |
-
echo '<input type="text" name="ws_plugin__s2member_reg_email_support_link" id="ws-plugin--s2member-reg-email-support-link" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_support_link"]) . '" /><br />' . "\n";
|
274 |
echo 'Ex: <code>mailto:support@your-domain.com</code> ( <em>mailto link</em> ).<br />' . "\n";
|
275 |
echo 'Or: <code>' . esc_html (site_url ("/contact-us/")) . '</code>.' . "\n";
|
276 |
echo '</td>' . "\n";
|
@@ -325,7 +325,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
325 |
echo '<tr>' . "\n";
|
326 |
/**/
|
327 |
echo '<td>' . "\n";
|
328 |
-
echo '<input type="text" name="ws_plugin__s2member_new_user_email_subject" id="ws-plugin--s2member-new-user-email-subject" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_email_subject"]) . '" /><br />' . "\n";
|
329 |
echo 'Subject Line used in the email sent to new Users/Members.' . "\n";
|
330 |
echo '</td>' . "\n";
|
331 |
/**/
|
@@ -402,7 +402,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
402 |
echo '<tr>' . "\n";
|
403 |
/**/
|
404 |
echo '<td>' . "\n";
|
405 |
-
echo '<input type="text" name="ws_plugin__s2member_new_user_admin_email_recipients" id="ws-plugin--s2member-new-user-admin-email-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_recipients"]) . '" /><br />' . "\n";
|
406 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
407 |
echo '<code>"Name" <user@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
408 |
echo '</td>' . "\n";
|
@@ -420,7 +420,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
420 |
echo '<tr>' . "\n";
|
421 |
/**/
|
422 |
echo '<td>' . "\n";
|
423 |
-
echo '<input type="text" name="ws_plugin__s2member_new_user_admin_email_subject" id="ws-plugin--s2member-new-user-admin-email-subject" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_subject"]) . '" /><br />' . "\n";
|
424 |
echo 'Subject Line used in the email notification sent to Administrator.' . "\n";
|
425 |
echo '</td>' . "\n";
|
426 |
/**/
|
@@ -571,7 +571,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
571 |
echo '<tr>' . "\n";
|
572 |
/**/
|
573 |
echo '<td>' . "\n";
|
574 |
-
echo '<input type="text" name="ws_plugin__s2member_level' . $n . '_label" id="ws-plugin--s2member-level' . $n . '-label" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"]) . '" /><br />' . "\n";
|
575 |
echo 'This is the Label for Level #' . $n . (($n === 0) ? ' ( Free Subscribers )' : ' Members') . '.<br />' . "\n";
|
576 |
echo '</td>' . "\n";
|
577 |
/**/
|
@@ -652,7 +652,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
652 |
echo '<tr>' . "\n";
|
653 |
/**/
|
654 |
echo '<td>' . "\n";
|
655 |
-
echo '<input type="text" name="ws_plugin__s2member_login_reg_font_size" id="ws-plugin--s2member-login-reg-font-size" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_size"]) . '" /><br />' . "\n";
|
656 |
echo 'Set this to a numeric value, calculated in pixels.' . "\n";
|
657 |
echo '</td>' . "\n";
|
658 |
/**/
|
@@ -669,7 +669,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
669 |
echo '<tr>' . "\n";
|
670 |
/**/
|
671 |
echo '<td>' . "\n";
|
672 |
-
echo '<input type="text" name="ws_plugin__s2member_login_reg_font_family" id="ws-plugin--s2member-login-reg-font-family" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_family"]) . '" /><br />' . "\n";
|
673 |
echo 'Set this to a web-safe font family.' . "\n";
|
674 |
echo '</td>' . "\n";
|
675 |
/**/
|
@@ -686,7 +686,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
686 |
echo '<tr>' . "\n";
|
687 |
/**/
|
688 |
echo '<td>' . "\n";
|
689 |
-
echo '<input type="text" name="ws_plugin__s2member_login_reg_font_field_size" id="ws-plugin--s2member-login-reg-font-field-size" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_field_size"]) . '" /><br />' . "\n";
|
690 |
echo 'Set this to a numeric value, calculated in pixels.' . "\n";
|
691 |
echo '</td>' . "\n";
|
692 |
/**/
|
@@ -718,7 +718,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
718 |
echo '<tr>' . "\n";
|
719 |
/**/
|
720 |
echo '<td>' . "\n";
|
721 |
-
echo '<input type="text" name="ws_plugin__s2member_login_reg_background_color" id="ws-plugin--s2member-login-reg-background-color" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_color"]) . '" /><br />' . "\n";
|
722 |
echo 'Set this to a 6-digit hex color code.' . "\n";
|
723 |
echo '</td>' . "\n";
|
724 |
/**/
|
@@ -735,7 +735,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
735 |
echo '<tr>' . "\n";
|
736 |
/**/
|
737 |
echo '<td>' . "\n";
|
738 |
-
echo '<input type="text" name="ws_plugin__s2member_login_reg_background_image" id="ws-plugin--s2member-login-reg-background-image" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_image"]) . '" /><br />' . "\n";
|
739 |
echo '<input type="button" id="ws-plugin--s2member-login-reg-background-image-media-btn" value="Open Media Library" class="ws-menu-page-media-btn" rel="ws-plugin--s2member-login-reg-background-image" />' . "\n";
|
740 |
echo 'Set this to the URL of your Background Image. ( this is optional )<br />';
|
741 |
echo 'If supplied, your Background Image will be tiled.' . "\n";
|
@@ -776,7 +776,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
776 |
echo '<tr>' . "\n";
|
777 |
/**/
|
778 |
echo '<td>' . "\n";
|
779 |
-
echo '<input type="text" name="ws_plugin__s2member_login_reg_background_text_color" id="ws-plugin--s2member-login-reg-background-text-color" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_text_color"]) . '" /><br />' . "\n";
|
780 |
echo 'Set this to a 6-digit hex color code.' . "\n";
|
781 |
echo '</td>' . "\n";
|
782 |
/**/
|
@@ -793,7 +793,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
793 |
echo '<tr>' . "\n";
|
794 |
/**/
|
795 |
echo '<td>' . "\n";
|
796 |
-
echo '<input type="text" name="ws_plugin__s2member_login_reg_background_text_shadow_color" id="ws-plugin--s2member-login-reg-background-text-shadow-color" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_text_shadow_color"]) . '" /><br />' . "\n";
|
797 |
echo 'Set this to a 6-digit hex color code.' . "\n";
|
798 |
echo '</td>' . "\n";
|
799 |
/**/
|
@@ -810,7 +810,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
810 |
echo '<tr>' . "\n";
|
811 |
/**/
|
812 |
echo '<td>' . "\n";
|
813 |
-
echo '<input type="text" name="ws_plugin__s2member_login_reg_background_box_shadow_color" id="ws-plugin--s2member-login-reg-background-box-shadow-color" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_box_shadow_color"]) . '" /><br />' . "\n";
|
814 |
echo 'Set this to a 6-digit hex color code.' . "\n";
|
815 |
echo '</td>' . "\n";
|
816 |
/**/
|
@@ -842,7 +842,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
842 |
echo '<tr>' . "\n";
|
843 |
/**/
|
844 |
echo '<td>' . "\n";
|
845 |
-
echo '<input type="text" name="ws_plugin__s2member_login_reg_logo_src" id="ws-plugin--s2member-login-reg-logo-src" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src"]) . '" /><br />' . "\n";
|
846 |
echo '<input type="button" id="ws-plugin--s2member-login-reg-logo-src-media-btn" value="Open Media Library" class="ws-menu-page-media-btn" rel="ws-plugin--s2member-login-reg-logo-src" />' . "\n";
|
847 |
echo 'Set this to the URL of your Logo Image.<br />' . "\n";
|
848 |
echo 'Suggested size is around 500 x 100.' . "\n";
|
@@ -861,7 +861,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
861 |
echo '<tr>' . "\n";
|
862 |
/**/
|
863 |
echo '<td>' . "\n";
|
864 |
-
echo '<input type="text" name="ws_plugin__s2member_login_reg_logo_src_width" id="ws-plugin--s2member-login-reg-logo-src-width" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src_width"]) . '" /><br />' . "\n";
|
865 |
echo 'The pixel Width of your Logo Image. <em>* This ALSO affects the overall width of your Login/Registration forms. If you want wider form fields, use a wider Logo.</em>' . "\n";
|
866 |
echo '</td>' . "\n";
|
867 |
/**/
|
@@ -878,7 +878,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
878 |
echo '<tr>' . "\n";
|
879 |
/**/
|
880 |
echo '<td>' . "\n";
|
881 |
-
echo '<input type="text" name="ws_plugin__s2member_login_reg_logo_src_height" id="ws-plugin--s2member-login-reg-logo-src-height" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src_height"]) . '" /><br />' . "\n";
|
882 |
echo 'The pixel Height of your Logo Image.' . "\n";
|
883 |
echo '</td>' . "\n";
|
884 |
/**/
|
@@ -895,7 +895,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
895 |
echo '<tr>' . "\n";
|
896 |
/**/
|
897 |
echo '<td>' . "\n";
|
898 |
-
echo '<input type="text" name="ws_plugin__s2member_login_reg_logo_url" id="ws-plugin--s2member-login-reg-logo-url" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_url"]) . '" /><br />' . "\n";
|
899 |
echo 'Set this to the Click URL for your Logo Image.' . "\n";
|
900 |
echo '</td>' . "\n";
|
901 |
/**/
|
@@ -912,7 +912,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
912 |
echo '<tr>' . "\n";
|
913 |
/**/
|
914 |
echo '<td>' . "\n";
|
915 |
-
echo '<input type="text" name="ws_plugin__s2member_login_reg_logo_title" id="ws-plugin--s2member-login-reg-logo-title" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_title"]) . '" /><br />' . "\n";
|
916 |
echo 'Used as the <code>title=""</code> attribute for your Logo Image.' . "\n";
|
917 |
echo '</td>' . "\n";
|
918 |
/**/
|
@@ -1072,7 +1072,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
1072 |
echo '<tr>' . "\n";
|
1073 |
/**/
|
1074 |
echo '<td>' . "\n";
|
1075 |
-
echo '<input type="text" name="ws_plugin__s2member_custom_reg_force_personal_emails" id="ws-plugin--s2member-custom-reg-force-personal-emails" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"]) . '" /><br />' . "\n";
|
1076 |
echo 'To force personal email addresses, provide a comma-delimited list of email users to reject. <a href="#" onclick="alert(\'s2Member will reject [user]@ ( based on your configuration here ). A JavaScript alert message will be issued, asking the User to, `please use a personal email address`.\'); return false;" tabindex="-1">[?]</a><br />' . "\n";
|
1077 |
echo 'Ex: <code>info,help,admin,webmaster,hostmaster,sales,support,spam</code><br />' . "\n";
|
1078 |
echo 'See: <a href="http://kb.mailchimp.com/article/what-role-addresses-does-mailchimp-specifically-block-from-bulk-importing/" target="_blank" rel="external">this article</a> for a more complete list.' . "\n";
|
@@ -1144,7 +1144,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
1144 |
echo '</select><br />' . "\n";
|
1145 |
echo 'Please choose a Page to be used as the first page Members will see after logging in. This Page can contain anything you like. We recommend the following title: <code>Welcome To Our Members Area</code>.<br /><br />' . "\n";
|
1146 |
echo '↓ Or, you may configure a Special Redirection URL, if you prefer. You\'ll need to type in the full URL, starting with: <code>http://</code>. <em>A few <a href="#" onclick="alert(\'Replacement Codes:\\n\\n%%current_user_login%% = The current User\\\'s Username, lowercase.\\n%%current_user_id%% = The current User\\\'s ID.\\n%%current_user_level%% = The current User\\\'s s2Member Level.\\n%%current_user_role%% = The current User\\\'s WordPress® Role.' . ((!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? '\\n%%current_user_ccaps%% = The current User\\\'s Custom Capabilities.' : '') . '\\n%%current_user_logins%% = Number of times the current User has logged in.\\n\\nFor example, if you\\\'re using BuddyPress, and you want to redirect Members to their BuddyPress Profile page after logging in, you would setup a Special Redirection URL, like this: ' . site_url ("/members/%%current_user_login%%/profile/") . '\\n\\nOr ... using %%current_user_level%%, you could have a separate Login Welcome Page for each Membership Level that you plan to offer. BuddyPress not required.\'); return false;">Replacement Codes</a> are also supported here.</em>' . "\n";
|
1147 |
-
echo '<input type="text" name="ws_plugin__s2member_login_redirection_override" id="ws-plugin--s2member-login-redirection-override" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_redirection_override"]) . '" /><br />' . "\n";
|
1148 |
echo '</td>' . "\n";
|
1149 |
/**/
|
1150 |
echo '</tr>' . "\n";
|
@@ -1246,10 +1246,10 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
1246 |
echo '<div class="ws-menu-page-hr"></div>' . "\n";
|
1247 |
/**/
|
1248 |
echo '<p><strong>Shortcode ( copy/paste )</strong>, for an Inline Profile Modification Form:<br />' . "\n";
|
1249 |
-
echo '<p><input type="text" value="' . format_to_edit ('[s2Member-Profile /]') . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" onclick="this.select ();" /></p>' . "\n";
|
1250 |
/**/
|
1251 |
echo '<p style="margin-top:20px;"><strong>Stand-Alone ( copy/paste )</strong>, for popup window:</p>' . "\n";
|
1252 |
-
echo '<p><input type="text" value="' . format_to_edit (preg_replace ("/\<\?php echo S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL; \?\>/", c_ws_plugin__s2member_utils_strings::esc_ds (site_url ("/?s2member_profile=1")), file_get_contents (dirname (__FILE__) . "/code-samples/current-user-profile-modification-page-url-2-ops.x-php"))) . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" onclick="this.select ();" /></p>' . "\n";
|
1253 |
echo '</div>' . "\n";
|
1254 |
/**/
|
1255 |
echo '</div>' . "\n";
|
@@ -1301,7 +1301,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
|
1301 |
echo '<tr>' . "\n";
|
1302 |
/**/
|
1303 |
echo '<td>' . "\n";
|
1304 |
-
echo '<input type="text" name="ws_plugin__s2member_default_custom_str_url_shortener" id="ws-plugin--s2member-default-custom-str-url-shortener" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["default_custom_str_url_shortener"]) . '" /><br />' . "\n";
|
1305 |
echo 'Your own custom URL <code>( i.e. GET request )</code>, with <code>%%s2_long_url%%</code> Replacement Code. [ <a href="#" onclick="alert(\'s2Member makes it possible for advanced site owners to use a custom URL shortening service they prefer, over the ones currently pre-integrated with s2Member. In order for this to work, your URL shortening service MUST support basic GET requests through its API ( sometimes referred to as a REST or NVP API ). In addition, your URL shortening service MUST be capable of returning a simple URL in the response that s2Member receives, as a result of s2Member processing the GET request you formulate. See example below.\\n\\nBitly example GET request with format=txt:\nhttp://api.bitly.com/v3/shorten?login=demo&apiKey=2d71bf07&format=txt&longUrl=%%s2_long_url%%\\n( s2Member expects a shortened URL in the response from Bitly )\\n\\n* If you configure s2Member to use your own custom URL shortening service, s2Member will try your configuration first, and if anything fails, it will fall back on its own pre-integrated backups. When configuring your URL for the GET request, s2Member makes two Replacement Codes available:\\n\\n%%s2_long_url%% = The full URL that needs to be shortened ( raw URL-encoded ).\\n%%s2_long_url_md5%% = An MD5 hash of the full URL ( might be useful in some APIs ).\\n\\n* If you have any trouble getting your URL shortening service integrated with s2Member in this way, you might take a look at this WordPress® Filter ( `ws_plugin__s2member_url_shorten` ), which s2Member makes available for advanced circumstances. Search s2Member\\\'s source code for `ws_plugin__s2member_url_shorten`.\'); return false;" tabindex="-1">click for details</a> ]<br />' . "\n";
|
1306 |
echo '</td>' . "\n";
|
1307 |
/**/
|
15 |
* @since 3.0
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
|
21 |
{
|
114 |
echo '<tr>' . "\n";
|
115 |
/**/
|
116 |
echo '<td>' . "\n";
|
117 |
+
echo '<input type="text" maxlength="256" autocomplete="off" name="ws_plugin__s2member_sec_encryption_key" id="ws-plugin--s2member-sec-encryption-key" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"]) . '"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"]) ? ' disabled="disabled"' : '') . ' />' . "\n";
|
118 |
echo (!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"]) ? '<br />This may contain letters, numbers, spaces; even punctuation. Up to 256 characters.<br /><em>Ex: <code>' . esc_html (strtoupper (c_ws_plugin__s2member_utils_strings::random_str_gen (64))) . '</code></em>' . "\n" : '';
|
119 |
echo (count ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key_history"]) > 1) ? '<br /><a href="#" onclick="ws_plugin__s2member_securityKeyHistory(); return false;">Click here</a> for a history of your last 10 Encryption Keys.<div id="ws-plugin--s2member-sec-encryption-key-history" style="display:none;"><code>' . implode ('</code><br /><code>', $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key_history"]) . '</code></div>' . "\n" : '';
|
120 |
echo '</td>' . "\n";
|
236 |
echo '<tr>' . "\n";
|
237 |
/**/
|
238 |
echo '<td>' . "\n";
|
239 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_reg_email_from_name" id="ws-plugin--s2member-reg-email-from-name" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . '" /><br />' . "\n";
|
240 |
echo 'We recommend that you use the name of your site here.' . "\n";
|
241 |
echo '</td>' . "\n";
|
242 |
/**/
|
253 |
echo '<tr>' . "\n";
|
254 |
/**/
|
255 |
echo '<td>' . "\n";
|
256 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_reg_email_from_email" id="ws-plugin--s2member-reg-email-from-email" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"]) . '" /><br />' . "\n";
|
257 |
echo 'Example: support@your-domain.com. <em class="ws-menu-page-hilite">Please read <a href="#" onclick="alert(\'Running WordPress® with an SMTP mail plugin?\\n\\nPlease be advised. If you run an SMTP mail plugin with WordPress®, be sure to configure s2Member with a valid `From:` address ( i.e. one matching your SMTP configuration perhaps ). Most free SMTP servers, such as Gmail® and Yahoo®, require that your `From:` header match the email address associated with your account. Please check with your SMTP service provider before attempting to configure plugins like s2Member to use a different `From:` address when sending email messages.\'); return false;">this IMPORTANT note</a></em>.' . "\n";
|
258 |
echo '</td>' . "\n";
|
259 |
/**/
|
270 |
echo '<tr>' . "\n";
|
271 |
/**/
|
272 |
echo '<td>' . "\n";
|
273 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_reg_email_support_link" id="ws-plugin--s2member-reg-email-support-link" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_support_link"]) . '" /><br />' . "\n";
|
274 |
echo 'Ex: <code>mailto:support@your-domain.com</code> ( <em>mailto link</em> ).<br />' . "\n";
|
275 |
echo 'Or: <code>' . esc_html (site_url ("/contact-us/")) . '</code>.' . "\n";
|
276 |
echo '</td>' . "\n";
|
325 |
echo '<tr>' . "\n";
|
326 |
/**/
|
327 |
echo '<td>' . "\n";
|
328 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_new_user_email_subject" id="ws-plugin--s2member-new-user-email-subject" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_email_subject"]) . '" /><br />' . "\n";
|
329 |
echo 'Subject Line used in the email sent to new Users/Members.' . "\n";
|
330 |
echo '</td>' . "\n";
|
331 |
/**/
|
402 |
echo '<tr>' . "\n";
|
403 |
/**/
|
404 |
echo '<td>' . "\n";
|
405 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_new_user_admin_email_recipients" id="ws-plugin--s2member-new-user-admin-email-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_recipients"]) . '" /><br />' . "\n";
|
406 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
407 |
echo '<code>"Name" <user@example.com>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
408 |
echo '</td>' . "\n";
|
420 |
echo '<tr>' . "\n";
|
421 |
/**/
|
422 |
echo '<td>' . "\n";
|
423 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_new_user_admin_email_subject" id="ws-plugin--s2member-new-user-admin-email-subject" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_subject"]) . '" /><br />' . "\n";
|
424 |
echo 'Subject Line used in the email notification sent to Administrator.' . "\n";
|
425 |
echo '</td>' . "\n";
|
426 |
/**/
|
571 |
echo '<tr>' . "\n";
|
572 |
/**/
|
573 |
echo '<td>' . "\n";
|
574 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_level' . $n . '_label" id="ws-plugin--s2member-level' . $n . '-label" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"]) . '" /><br />' . "\n";
|
575 |
echo 'This is the Label for Level #' . $n . (($n === 0) ? ' ( Free Subscribers )' : ' Members') . '.<br />' . "\n";
|
576 |
echo '</td>' . "\n";
|
577 |
/**/
|
652 |
echo '<tr>' . "\n";
|
653 |
/**/
|
654 |
echo '<td>' . "\n";
|
655 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_font_size" id="ws-plugin--s2member-login-reg-font-size" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_size"]) . '" /><br />' . "\n";
|
656 |
echo 'Set this to a numeric value, calculated in pixels.' . "\n";
|
657 |
echo '</td>' . "\n";
|
658 |
/**/
|
669 |
echo '<tr>' . "\n";
|
670 |
/**/
|
671 |
echo '<td>' . "\n";
|
672 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_font_family" id="ws-plugin--s2member-login-reg-font-family" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_family"]) . '" /><br />' . "\n";
|
673 |
echo 'Set this to a web-safe font family.' . "\n";
|
674 |
echo '</td>' . "\n";
|
675 |
/**/
|
686 |
echo '<tr>' . "\n";
|
687 |
/**/
|
688 |
echo '<td>' . "\n";
|
689 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_font_field_size" id="ws-plugin--s2member-login-reg-font-field-size" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_font_field_size"]) . '" /><br />' . "\n";
|
690 |
echo 'Set this to a numeric value, calculated in pixels.' . "\n";
|
691 |
echo '</td>' . "\n";
|
692 |
/**/
|
718 |
echo '<tr>' . "\n";
|
719 |
/**/
|
720 |
echo '<td>' . "\n";
|
721 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_background_color" id="ws-plugin--s2member-login-reg-background-color" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_color"]) . '" /><br />' . "\n";
|
722 |
echo 'Set this to a 6-digit hex color code.' . "\n";
|
723 |
echo '</td>' . "\n";
|
724 |
/**/
|
735 |
echo '<tr>' . "\n";
|
736 |
/**/
|
737 |
echo '<td>' . "\n";
|
738 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_background_image" id="ws-plugin--s2member-login-reg-background-image" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_image"]) . '" /><br />' . "\n";
|
739 |
echo '<input type="button" id="ws-plugin--s2member-login-reg-background-image-media-btn" value="Open Media Library" class="ws-menu-page-media-btn" rel="ws-plugin--s2member-login-reg-background-image" />' . "\n";
|
740 |
echo 'Set this to the URL of your Background Image. ( this is optional )<br />';
|
741 |
echo 'If supplied, your Background Image will be tiled.' . "\n";
|
776 |
echo '<tr>' . "\n";
|
777 |
/**/
|
778 |
echo '<td>' . "\n";
|
779 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_background_text_color" id="ws-plugin--s2member-login-reg-background-text-color" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_text_color"]) . '" /><br />' . "\n";
|
780 |
echo 'Set this to a 6-digit hex color code.' . "\n";
|
781 |
echo '</td>' . "\n";
|
782 |
/**/
|
793 |
echo '<tr>' . "\n";
|
794 |
/**/
|
795 |
echo '<td>' . "\n";
|
796 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_background_text_shadow_color" id="ws-plugin--s2member-login-reg-background-text-shadow-color" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_text_shadow_color"]) . '" /><br />' . "\n";
|
797 |
echo 'Set this to a 6-digit hex color code.' . "\n";
|
798 |
echo '</td>' . "\n";
|
799 |
/**/
|
810 |
echo '<tr>' . "\n";
|
811 |
/**/
|
812 |
echo '<td>' . "\n";
|
813 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_background_box_shadow_color" id="ws-plugin--s2member-login-reg-background-box-shadow-color" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_box_shadow_color"]) . '" /><br />' . "\n";
|
814 |
echo 'Set this to a 6-digit hex color code.' . "\n";
|
815 |
echo '</td>' . "\n";
|
816 |
/**/
|
842 |
echo '<tr>' . "\n";
|
843 |
/**/
|
844 |
echo '<td>' . "\n";
|
845 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_logo_src" id="ws-plugin--s2member-login-reg-logo-src" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src"]) . '" /><br />' . "\n";
|
846 |
echo '<input type="button" id="ws-plugin--s2member-login-reg-logo-src-media-btn" value="Open Media Library" class="ws-menu-page-media-btn" rel="ws-plugin--s2member-login-reg-logo-src" />' . "\n";
|
847 |
echo 'Set this to the URL of your Logo Image.<br />' . "\n";
|
848 |
echo 'Suggested size is around 500 x 100.' . "\n";
|
861 |
echo '<tr>' . "\n";
|
862 |
/**/
|
863 |
echo '<td>' . "\n";
|
864 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_logo_src_width" id="ws-plugin--s2member-login-reg-logo-src-width" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src_width"]) . '" /><br />' . "\n";
|
865 |
echo 'The pixel Width of your Logo Image. <em>* This ALSO affects the overall width of your Login/Registration forms. If you want wider form fields, use a wider Logo.</em>' . "\n";
|
866 |
echo '</td>' . "\n";
|
867 |
/**/
|
878 |
echo '<tr>' . "\n";
|
879 |
/**/
|
880 |
echo '<td>' . "\n";
|
881 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_logo_src_height" id="ws-plugin--s2member-login-reg-logo-src-height" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_src_height"]) . '" /><br />' . "\n";
|
882 |
echo 'The pixel Height of your Logo Image.' . "\n";
|
883 |
echo '</td>' . "\n";
|
884 |
/**/
|
895 |
echo '<tr>' . "\n";
|
896 |
/**/
|
897 |
echo '<td>' . "\n";
|
898 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_logo_url" id="ws-plugin--s2member-login-reg-logo-url" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_url"]) . '" /><br />' . "\n";
|
899 |
echo 'Set this to the Click URL for your Logo Image.' . "\n";
|
900 |
echo '</td>' . "\n";
|
901 |
/**/
|
912 |
echo '<tr>' . "\n";
|
913 |
/**/
|
914 |
echo '<td>' . "\n";
|
915 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_reg_logo_title" id="ws-plugin--s2member-login-reg-logo-title" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_logo_title"]) . '" /><br />' . "\n";
|
916 |
echo 'Used as the <code>title=""</code> attribute for your Logo Image.' . "\n";
|
917 |
echo '</td>' . "\n";
|
918 |
/**/
|
1072 |
echo '<tr>' . "\n";
|
1073 |
/**/
|
1074 |
echo '<td>' . "\n";
|
1075 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_custom_reg_force_personal_emails" id="ws-plugin--s2member-custom-reg-force-personal-emails" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"]) . '" /><br />' . "\n";
|
1076 |
echo 'To force personal email addresses, provide a comma-delimited list of email users to reject. <a href="#" onclick="alert(\'s2Member will reject [user]@ ( based on your configuration here ). A JavaScript alert message will be issued, asking the User to, `please use a personal email address`.\'); return false;" tabindex="-1">[?]</a><br />' . "\n";
|
1077 |
echo 'Ex: <code>info,help,admin,webmaster,hostmaster,sales,support,spam</code><br />' . "\n";
|
1078 |
echo 'See: <a href="http://kb.mailchimp.com/article/what-role-addresses-does-mailchimp-specifically-block-from-bulk-importing/" target="_blank" rel="external">this article</a> for a more complete list.' . "\n";
|
1144 |
echo '</select><br />' . "\n";
|
1145 |
echo 'Please choose a Page to be used as the first page Members will see after logging in. This Page can contain anything you like. We recommend the following title: <code>Welcome To Our Members Area</code>.<br /><br />' . "\n";
|
1146 |
echo '↓ Or, you may configure a Special Redirection URL, if you prefer. You\'ll need to type in the full URL, starting with: <code>http://</code>. <em>A few <a href="#" onclick="alert(\'Replacement Codes:\\n\\n%%current_user_login%% = The current User\\\'s Username, lowercase.\\n%%current_user_id%% = The current User\\\'s ID.\\n%%current_user_level%% = The current User\\\'s s2Member Level.\\n%%current_user_role%% = The current User\\\'s WordPress® Role.' . ((!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? '\\n%%current_user_ccaps%% = The current User\\\'s Custom Capabilities.' : '') . '\\n%%current_user_logins%% = Number of times the current User has logged in.\\n\\nFor example, if you\\\'re using BuddyPress, and you want to redirect Members to their BuddyPress Profile page after logging in, you would setup a Special Redirection URL, like this: ' . site_url ("/members/%%current_user_login%%/profile/") . '\\n\\nOr ... using %%current_user_level%%, you could have a separate Login Welcome Page for each Membership Level that you plan to offer. BuddyPress not required.\'); return false;">Replacement Codes</a> are also supported here.</em>' . "\n";
|
1147 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_login_redirection_override" id="ws-plugin--s2member-login-redirection-override" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_redirection_override"]) . '" /><br />' . "\n";
|
1148 |
echo '</td>' . "\n";
|
1149 |
/**/
|
1150 |
echo '</tr>' . "\n";
|
1246 |
echo '<div class="ws-menu-page-hr"></div>' . "\n";
|
1247 |
/**/
|
1248 |
echo '<p><strong>Shortcode ( copy/paste )</strong>, for an Inline Profile Modification Form:<br />' . "\n";
|
1249 |
+
echo '<p><input type="text" autocomplete="off" value="' . format_to_edit ('[s2Member-Profile /]') . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" onclick="this.select ();" /></p>' . "\n";
|
1250 |
/**/
|
1251 |
echo '<p style="margin-top:20px;"><strong>Stand-Alone ( copy/paste )</strong>, for popup window:</p>' . "\n";
|
1252 |
+
echo '<p><input type="text" autocomplete="off" value="' . format_to_edit (preg_replace ("/\<\?php echo S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL; \?\>/", c_ws_plugin__s2member_utils_strings::esc_ds (site_url ("/?s2member_profile=1")), file_get_contents (dirname (__FILE__) . "/code-samples/current-user-profile-modification-page-url-2-ops.x-php"))) . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" onclick="this.select ();" /></p>' . "\n";
|
1253 |
echo '</div>' . "\n";
|
1254 |
/**/
|
1255 |
echo '</div>' . "\n";
|
1301 |
echo '<tr>' . "\n";
|
1302 |
/**/
|
1303 |
echo '<td>' . "\n";
|
1304 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_default_custom_str_url_shortener" id="ws-plugin--s2member-default-custom-str-url-shortener" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["default_custom_str_url_shortener"]) . '" /><br />' . "\n";
|
1305 |
echo 'Your own custom URL <code>( i.e. GET request )</code>, with <code>%%s2_long_url%%</code> Replacement Code. [ <a href="#" onclick="alert(\'s2Member makes it possible for advanced site owners to use a custom URL shortening service they prefer, over the ones currently pre-integrated with s2Member. In order for this to work, your URL shortening service MUST support basic GET requests through its API ( sometimes referred to as a REST or NVP API ). In addition, your URL shortening service MUST be capable of returning a simple URL in the response that s2Member receives, as a result of s2Member processing the GET request you formulate. See example below.\\n\\nBitly example GET request with format=txt:\nhttp://api.bitly.com/v3/shorten?login=demo&apiKey=2d71bf07&format=txt&longUrl=%%s2_long_url%%\\n( s2Member expects a shortened URL in the response from Bitly )\\n\\n* If you configure s2Member to use your own custom URL shortening service, s2Member will try your configuration first, and if anything fails, it will fall back on its own pre-integrated backups. When configuring your URL for the GET request, s2Member makes two Replacement Codes available:\\n\\n%%s2_long_url%% = The full URL that needs to be shortened ( raw URL-encoded ).\\n%%s2_long_url_md5%% = An MD5 hash of the full URL ( might be useful in some APIs ).\\n\\n* If you have any trouble getting your URL shortening service integrated with s2Member in this way, you might take a look at this WordPress® Filter ( `ws_plugin__s2member_url_shorten` ), which s2Member makes available for advanced circumstances. Search s2Member\\\'s source code for `ws_plugin__s2member_url_shorten`.\'); return false;" tabindex="-1">click for details</a> ]<br />' . "\n";
|
1306 |
echo '</td>' . "\n";
|
1307 |
/**/
|
includes/menu-pages/menu-pages-min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(b){b("div#ws-menu-page-js-c-w").hide();b(window).resize(tb_position=function(){var c=(b(window).width()>720)?720:b(window).width(),e=b(window).height(),d=(b("body.admin-bar").length)?28:0;b("#TB_window").css({width:c-50+"px",height:e-45-d+"px",top:25+d+"px","margin-top":0,"margin-left":"-"+parseInt(((c-50)/2),10)+"px"});b("#TB_ajaxContent").css({width:c-50+"px",height:e-75-d+"px",margin:0,padding:0})});var a=b("div.ws-menu-page-group");a.each(function(e){var g=b(this),d="<ins>+</ins>",f=g,h=b.trim(f.attr("title"));var c=b('<div class="ws-menu-page-group-header">'+d+h+"</div>");c.css({"z-index":100-e});c.insertBefore(f),f.hide(),c.click(function(){var k=b(this),j=b("ins",k),i=k.next();if(i.css("display")==="none"){k.addClass("open"),j.html("-"),i.show()}else{k.removeClass("open"),j.html("+"),i.hide()}return false});if(a.length>1&&e===0){b('<div class="ws-menu-page-groups-show">+</div>').insertBefore(c).click(function(){b("div.ws-menu-page-group-header").each(function(){var k=b(this),j=b("ins",k),i=k.next();k.addClass("open"),j.html("-"),i.show();return});return false});b('<div class="ws-menu-page-groups-hide">-</div>').insertBefore(c).click(function(){b("div.ws-menu-page-group-header").each(function(){var k=b(this),j=b("ins",k),i=k.next();k.removeClass("open"),j.html("+"),i.hide();return});return false})}if(f.attr("default-state")==="open"){c.trigger("click")}return});if(a.length>1){b("div.ws-menu-page-group-header:first").css({"margin-right":"140px"});b("div.ws-menu-page-group:first").css({"margin-right":"145px"})}b("div.ws-menu-page-r-group-header").click(function(){var d=b(this),c=d.next("div.ws-menu-page-r-group");if(c.css("display")==="none"){b("ins",d).html("-"),d.addClass("open"),c.show()}else{b("ins",d).html("+"),d.removeClass("open");c.hide()}return false});b("div.ws-menu-page-group-header:first, div.ws-menu-page-r-group-header:first").css({"margin-top":"0"});b("div.ws-menu-page-group > div.ws-menu-page-section:first-child > h3").css({"margin-top":"0"});b("div.ws-menu-page-readme > div.readme > div.section:last-child").css({"border-bottom-width":"0"});b("input.ws-menu-page-media-btn").filter(function(){return(b(this).attr("rel"))?true:false}).click(function(){var c=b(this);window.send_to_editor=function(g){var h,f,d=b.trim(c.attr("rel"));if(d&&(h=b("input#"+d)).length>0){var e=h.css("background-color"),i=b.trim(b(g).attr("src"));i=(!i)?b.trim(b("img",g).attr("src")):i;h.val(i),h.css({"background-color":"#FFFFCC"}),setTimeout(function(){h.css({"background-color":e})},2000);tb_remove();return}else{if(d&&(f=b("textarea#"+d)).length>0){var e=f.css("background-color"),i=b.trim(b(g).attr("src"));i=(!i)?b.trim(b("img",g).attr("src")):i;f.val(b.trim(f.val())+"\n"+i),f.css({"background-color":"#FFFFCC"}),setTimeout(function(){f.css({"background-color":e})},2000);tb_remove();return}}};tb_show("","./media-upload.php?type=image&TB_iframe=true");return false});b("form#ws-
|
1 |
+
jQuery(document).ready(function(b){b("div#ws-menu-page-js-c-w").hide();b(window).resize(tb_position=function(){var c=(b(window).width()>720)?720:b(window).width(),e=b(window).height(),d=(b("body.admin-bar").length)?28:0;b("#TB_window").css({width:c-50+"px",height:e-45-d+"px",top:25+d+"px","margin-top":0,"margin-left":"-"+parseInt(((c-50)/2),10)+"px"});b("#TB_ajaxContent").css({width:c-50+"px",height:e-75-d+"px",margin:0,padding:0})});var a=b("div.ws-menu-page-group");a.each(function(e){var g=b(this),d="<ins>+</ins>",f=g,h=b.trim(f.attr("title"));var c=b('<div class="ws-menu-page-group-header">'+d+h+"</div>");c.css({"z-index":100-e});c.insertBefore(f),f.hide(),c.click(function(){var k=b(this),j=b("ins",k),i=k.next();if(i.css("display")==="none"){k.addClass("open"),j.html("-"),i.show()}else{k.removeClass("open"),j.html("+"),i.hide()}return false});if(a.length>1&&e===0){b('<div class="ws-menu-page-groups-show">+</div>').insertBefore(c).click(function(){b("div.ws-menu-page-group-header").each(function(){var k=b(this),j=b("ins",k),i=k.next();k.addClass("open"),j.html("-"),i.show();return});return false});b('<div class="ws-menu-page-groups-hide">-</div>').insertBefore(c).click(function(){b("div.ws-menu-page-group-header").each(function(){var k=b(this),j=b("ins",k),i=k.next();k.removeClass("open"),j.html("+"),i.hide();return});return false})}if(f.attr("default-state")==="open"){c.trigger("click")}return});if(a.length>1){b("div.ws-menu-page-group-header:first").css({"margin-right":"140px"});b("div.ws-menu-page-group:first").css({"margin-right":"145px"})}b("div.ws-menu-page-r-group-header").click(function(){var d=b(this),c=d.next("div.ws-menu-page-r-group");if(c.css("display")==="none"){b("ins",d).html("-"),d.addClass("open"),c.show()}else{b("ins",d).html("+"),d.removeClass("open");c.hide()}return false});b("div.ws-menu-page-group-header:first, div.ws-menu-page-r-group-header:first").css({"margin-top":"0"});b("div.ws-menu-page-group > div.ws-menu-page-section:first-child > h3").css({"margin-top":"0"});b("div.ws-menu-page-readme > div.readme > div.section:last-child").css({"border-bottom-width":"0"});b("input.ws-menu-page-media-btn").filter(function(){return(b(this).attr("rel"))?true:false}).click(function(){var c=b(this);window.send_to_editor=function(g){var h,f,d=b.trim(c.attr("rel"));if(d&&(h=b("input#"+d)).length>0){var e=h.css("background-color"),i=b.trim(b(g).attr("src"));i=(!i)?b.trim(b("img",g).attr("src")):i;h.val(i),h.css({"background-color":"#FFFFCC"}),setTimeout(function(){h.css({"background-color":e})},2000);tb_remove();return}else{if(d&&(f=b("textarea#"+d)).length>0){var e=f.css("background-color"),i=b.trim(b(g).attr("src"));i=(!i)?b.trim(b("img",g).attr("src")):i;f.val(b.trim(f.val())+"\n"+i),f.css({"background-color":"#FFFFCC"}),setTimeout(function(){f.css({"background-color":e})},2000);tb_remove();return}}};tb_show("","./media-upload.php?type=image&TB_iframe=true");return false});b("form#ws-updates-form").submit(function(){var c="";if(!b.trim(b("input#ws-updates-fname").val())){c+="First Name missing, please try again.\n\n"}if(!b.trim(b("input#ws-updates-lname").val())){c+="Last Name missing, please try again.\n\n"}if(!b.trim(b("input#ws-updates-email").val())){c+="Email missing, please try again.\n\n"}else{if(!b("input#ws-updates-email").val().match(/^([a-z_~0-9\+\-]+)(((\.?)([a-z_~0-9\+\-]+))*)(@)([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){c+="Invalid email address, please try again.\n\n"}}if(c=b.trim(c)){alert("— Oops, you missed something: —\n\n"+c);return false}return true})});
|
includes/menu-pages/menu-pages-s-min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function($){var esc_attr=esc_html=function(str){return String(str).replace(/"/g,""").replace(/\</g,"<").replace(/\>/g,">")};if(location.href.match(/page\=ws-plugin--s2member/)){$("input.ws-plugin--s2member-update-roles-button, input.ws-plugin--s2member-reset-roles-button").click(function(){var $this=$(this);$this.val("one moment please ...");var levels='<?php echo (int)$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; ?>';var resetUpdate=($this.hasClass("ws-plugin--s2member-reset-roles-button"))?"Reset":"Update";$.post(ajaxurl,{action:"ws_plugin__s2member_update_roles_via_ajax",ws_plugin__s2member_update_roles_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-update-roles-via-ajax")); ?>'},function(response){if(response==="1"){alert("s2Member's Roles/Capabilities "+((resetUpdate.toLowerCase()==="reset")?"have been successfully reset":"updated successfully")+".\nYour installation of s2Member has Membership Levels 0-"+levels+"."),$this.val(resetUpdate+" Roles/Capabilities")}else{if(response==="l"){alert("Sorry, your request failed.\ns2Member's Roles/Capabilities are locked by Filter:\nws_plugin__s2member_lock_roles_caps"),$this.val(resetUpdate+" Roles/Capabilities")}else{alert("Sorry, your request failed.\nAccess denied. Do you have the ability to `create_users`?"),$this.val(resetUpdate+" Roles/Capabilities")}}});return false})}if(location.href.match(/page\=ws-plugin--s2member-mms-ops/)){$("select#ws-plugin--s2member-mms-registration-file").change(function(){if($(this).val()==="wp-signup"){var gv=$("select#ws-plugin--s2member-mms-registration-grants").val(),l0v=$("input#ws-plugin--s2member-mms-registration-blogs-level0").val();$("div#ws-plugin--s2member-mms-registration-support-package-details-wrapper").show(),$("div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login").hide(),$("div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup").show();$("div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0")[((gv==="all")?"show":"hide")]();$("input#ws-plugin--s2member-mms-registration-blogs-level0").val(((gv==="all")?((l0v>0)?l0v:"1"):"0"))}else{if($(this).val()==="wp-login"){var gv=$("select#ws-plugin--s2member-mms-registration-grants").val(),l0v=$("input#ws-plugin--s2member-mms-registration-blogs-level0").val();$("div#ws-plugin--s2member-mms-registration-support-package-details-wrapper").hide(),$("div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login").show(),$("div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup").hide();$("div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0").hide();$("input#ws-plugin--s2member-mms-registration-blogs-level0").val("0")}}}).trigger("change");$("select#ws-plugin--s2member-mms-registration-grants").change(function(){$("select#ws-plugin--s2member-mms-registration-file").trigger("change")})}if(location.href.match(/page\=ws-plugin--s2member-gen-ops/)){ws_plugin__s2member_generateSecurityKey=function(){var mt_rand=function(min,max){min=(arguments.length<1)?0:min;max=(arguments.length<2)?2147483647:max;return Math.floor(Math.random()*(max-min+1))+min};var chars="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()";for(var i=0,key="";i<64;i++){key+=chars.substr(mt_rand(0,chars.length-1),1)}$("input#ws-plugin--s2member-sec-encryption-key").val(key);return false};ws_plugin__s2member_enableSecurityKey=function(){if(confirm("Edit Key? Are you sure?\nThis could break your installation!\n\n*Note* If you've been testing s2Member, feel free to change this Key before you go live. Just don't go live, and then change it. You'll have unhappy Customers. Data corruption WILL occur! For your safety, s2Member keeps a history of the last 10 Keys that you've used. If you get yourself into a real situation, s2Member will let you revert back to a previous Key.")){$("input#ws-plugin--s2member-sec-encryption-key").removeAttr("disabled")}return false};ws_plugin__s2member_securityKeyHistory=function(){$("div#ws-plugin--s2member-sec-encryption-key-history").toggle();return false};$("select#ws-plugin--s2member-new-user-emails-enabled").change(function(){var $pluggable=$("input#ws-plugin--s2member-pluggables-wp-new-user-notification"),$this=$(this),$newUserEmails=$("div#ws-plugin--s2member-new-user-emails");if($pluggable.val()==="0"||$this.val()==="0"){($pluggable.val()==="0")?$this.attr("disabled","disabled"):$this.removeAttr("disabled");$(":input",$newUserEmails).attr("disabled","disabled"),$newUserEmails.css("opacity","0.5")}else{$this.removeAttr("disabled"),$(":input",$newUserEmails).removeAttr("disabled"),$newUserEmails.css("opacity","")}}).trigger("change");if($("input#ws-plugin--s2member-custom-reg-fields").length&&$("div#ws-plugin--s2member-custom-reg-field-configuration").length){(function(){var i,fieldDefaults,tools,table,$tools,$table;var $fields=$("input#ws-plugin--s2member-custom-reg-fields");var $configuration=$("div#ws-plugin--s2member-custom-reg-field-configuration");var fields=($fields.val())?$.JSON.parse($fields.val()):[];fields=(fields instanceof Array)?fields:[];fieldDefaults={section:"no",sectitle:"",id:"",label:"",type:"text",deflt:"",options:"",expected:"",required:"yes",levels:"all",editable:"yes",classes:"",styles:"",attrs:""};for(i=0;i<fields.length;i++){fields[i]=$.extend(true,{},fieldDefaults,fields[i])}tools='<div id="ws-plugin--s2member-custom-reg-field-configuration-tools"></div>',table='<table id="ws-plugin--s2member-custom-reg-field-configuration-table"></table>';$configuration.html(tools+table);$tools=$("div#ws-plugin--s2member-custom-reg-field-configuration-tools"),$table=$("table#ws-plugin--s2member-custom-reg-field-configuration-table");ws_plugin__s2member_customRegFieldSectionChange=function(select){var section=$(select).val();var sectitle_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle";(section==="yes")?$(sectitle_trs).css("display",""):$(sectitle_trs).css("display","none")};ws_plugin__s2member_customRegFieldTypeChange=function(select){var type=$(select).val();var deflt_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt",options_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-options",expected_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected";(type.match(/^(text|textarea)$/))?$(deflt_trs).css("display",""):$(deflt_trs).css("display","none");(type.match(/^(select|selects|checkboxes|radios)$/))?$(options_trs).css("display",""):$(options_trs).css("display","none");(type.match(/^(text|textarea)$/))?$(expected_trs).css("display",""):$(expected_trs).css("display","none")};ws_plugin__s2member_customRegFieldDelete=function(index){var newFields=new Array();for(var i=0;i<fields.length;i++){if(i!==index){newFields.push(fields[i])}}fields=newFields,updateFields(),buildTable()};ws_plugin__s2member_customRegFieldMoveUp=function(index){if(typeof fields[index]==="object"&&typeof fields[index-1]==="object"){var prevFieldObj=fields[index-1],thisFieldObj=fields[index];fields[index-1]=thisFieldObj,fields[index]=prevFieldObj;updateFields(),buildTable()}};ws_plugin__s2member_customRegFieldMoveDown=function(index){if(typeof fields[index]==="object"&&typeof fields[index+1]==="object"){var nextFieldObj=fields[index+1],thisFieldObj=fields[index];fields[index+1]=thisFieldObj,fields[index]=nextFieldObj;updateFields(),buildTable()}};ws_plugin__s2member_customRegFieldCreate=function(){var $table=$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form"),field={};$(":input[property]",$table).each(function(){var $this=$(this),property=$this.attr("property"),val=$.trim($this.val());field[property]=val});if((field=validateField(field))){fields.push(field),updateFields(),buildTools(),buildTable(),scrollReset();setTimeout(function(){var row="tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-"+(fields.length-1);alert('Field created successfully.\n* Remember to "Save All Changes".');$(row).effect("highlight",1500)},500)}};ws_plugin__s2member_customRegFieldUpdate=function(index){var $table=$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form"),field={};$(":input[property]",$table).each(function(){var $this=$(this),property=$this.attr("property"),val=$.trim($this.val());field[property]=val});if((field=validateField(field,index))){fields[index]=field,updateFields(),buildTools(),buildTable(),scrollReset();setTimeout(function(){var row="tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-"+index;alert('Field updated successfully.\n* Remember to "Save All Changes".');$(row).effect("highlight",1500)},500)}};ws_plugin__s2member_customRegFieldAdd=function(){buildTools(true)};ws_plugin__s2member_customRegFieldEdit=function(index){buildTools(false,index),scrollReset()};ws_plugin__s2member_customRegFieldCancel=function(){buildTools(),scrollReset()};var validateField=function(field,index){var editing=(typeof index==="number"&&typeof fields[index]==="object")?true:false,errors=[],options,i;if(typeof field!=="object"||typeof(field=$.extend(true,{},fieldDefaults,field))!=="object"){alert("Invalid field object. Please try again.");return false}field.sectitle=(field.section==="yes")?field.sectitle:"";field.deflt=(field.type.match(/^(text|textarea)$/))?field.deflt:"";field.deflt=(field.type.match(/^(text)$/))?field.deflt.replace(/[\r\n\t ]+/g," "):field.deflt;field.options=(field.type.match(/^(select|selects|checkboxes|radios)$/))?field.options:"";field.expected=(field.type.match(/^(text|textarea)$/))?field.expected:"";if(!field.id){errors.push("Unique Field ID:\nThis is required. Please try again.")}else{if(fieldIdExists(field.id)&&(!editing||field.id!==fields[index].id)){errors.push("Unique Field ID:\nThat Field ID already exists. Please try again.")}}if(!field.label){errors.push("Field Label/Description:\nThis is required. Please try again.")}if(field.type.match(/^(select|selects|checkboxes|radios)$/)&&!field.options){errors.push("Option Configuration File:\nThis is required. Please try again.")}else{if(field.type.match(/^(select|selects|checkboxes|radios)$/)){for(i=0;i<(options=field.options.split(/[\r\n]+/)).length;i++){if(!(options[i]=$.trim(options[i])).match(/^([^\|]*)(\|)([^\|]*)(\|default)?$/)){errors.push("Option Configuration File:\nInvalid configuration at line #"+(i+1)+".");break}}field.options=$.trim(options.join("\n"))}}if(!(field.levels=field.levels.replace(/ /g,""))){errors.push("Applicable Levels:\nThis is required. Please try again.")}else{if(!field.levels.match(/^(all|[0-9,]+)$/)){errors.push("Applicable Levels:\nShould be comma-delimited Levels, or just type: all.\n( examples: 0,1,2,3,4 or type the word: all )")}}if(field.classes&&field.classes.match(/[^a-z 0-9 _ \-]/i)){errors.push("CSS Classes:\nContains invalid characters. Please try again.\n( only: alphanumerics, underscores, hyphens, spaces )")}if(field.styles&&field.styles.match(/["\=\>\<]/)){errors.push('CSS Styles:\nContains invalid characters. Please try again.\n( do NOT use these characters: = " < > )')}if(field.attrs&&field.attrs.match(/[\>\<]/)){errors.push("Other Attributes:\nContains invalid characters. Please try again.\n( do NOT use these characters: < > )")}if(errors.length>0){alert(errors.join("\n\n"));return false}else{return field}};var updateFields=function(){$fields.val(((fields.length>0)?$.JSON.stringify(fields):""))};var fieldId2Var=function(fieldId){return(typeof fieldId==="string")?$.trim(fieldId).toLowerCase().replace(/[^a-z0-9]/g,"_"):""};var fieldTypeDesc=function(type){var types={text:"Text ( single line )",textarea:"Textarea ( multi-line )",select:"Select Menu ( drop-down )",selects:"Select Menu ( multi-option )",checkbox:"Checkbox ( single )",pre_checkbox:"Checkbox ( pre-checked )",checkboxes:"Checkboxes ( multi-option )",radios:"Radio Buttons ( multi-option )"};if(typeof types[type]==="string"){return types[type]}return""};var fieldIdExists=function(fieldId){for(var i=0;i<fields.length;i++){if(fields[i].id===fieldId){return true}}};var scrollReset=function(){scrollTo(0,$("div.ws-plugin--s2member-custom-reg-fields-section").offset()["top"]-100)};var buildTools=function(adding,index){var i=0,html="",form="",w=0,h=0,editing=(typeof index==="number"&&typeof fields[index]==="object")?true:false,displayForm=(adding||editing)?true:false,field=(editing)?$.extend(true,{},fieldDefaults,fields[index]):fieldDefaults;html+='<a href="#" onclick="ws_plugin__s2member_customRegFieldAdd(); return false;">Add New Field</a>';tb_remove(),$("div#ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form").remove();if(displayForm){form+='<div id="ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form">';form+='<table id="ws-plugin--s2member-custom-reg-field-configuration-tools-form">';form+="<tbody>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">Starts A New Section?</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<td colspan="2">';form+='<select property="section" onchange="ws_plugin__s2member_customRegFieldSectionChange(this);" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<option value="no"'+((field.section==="no")?' selected="selected"':"")+'">No ( this Field flows normally )</option>';form+='<option value="yes"'+((field.section==="yes")?' selected="selected"':"")+'">Yes ( this Field begins a new section )</option>';form+="</select><br />";form+="<small>Optional. Allows Fields to be grouped into sections.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"'+((field.section==="yes")?"":' style="display:none;"')+'><td colspan="2"><hr /></td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"'+((field.section==="yes")?"":' style="display:none;"')+">";form+='<td colspan="2">';form+="Title for this new section? ( optional )<br />";form+='<input type="text" property="sectitle" value="'+esc_attr(field.sectitle)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle" /><br />';form+="<small>If empty, a simple divider will be used by default.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-type"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">Form Field Type: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<td colspan="2">';form+='<select property="type" onchange="ws_plugin__s2member_customRegFieldTypeChange(this);" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<option value="text"'+((field.type==="text")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("text"))+"</option>";form+='<option value="textarea"'+((field.type==="textarea")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("textarea"))+"</option>";form+='<option value="select"'+((field.type==="select")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("select"))+"</option>";form+='<option value="selects"'+((field.type==="selects")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("selects"))+"</option>";form+='<option value="checkbox"'+((field.type==="checkbox")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("checkbox"))+"</option>";form+='<option value="pre_checkbox"'+((field.type==="pre_checkbox")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("pre_checkbox"))+"</option>";form+='<option value="checkboxes"'+((field.type==="checkboxes")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("checkboxes"))+"</option>";form+='<option value="radios"'+((field.type==="radios")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("radios"))+"</option>";form+="</select><br />";form+="<small>The options below may change, based on the Field Type you choose here.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-label"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">Field Label/Desc: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">';form+='<td colspan="2">';form+='<input type="text" property="label" value="'+esc_attr(field.label)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label" /><br />';form+="<small>Examples: <code>Choose Country</code>, <code>Street Address</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-id"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">Unique Field ID: *</label></label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">';form+='<td colspan="2">';form+='<input type="text" property="id" value="'+esc_attr(field.id)+'" maxlength="25" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id" /><br />';form+="<small>Examples: <code>country_code</code>, <code>street_address</code></small><br />";form+='<small>e.g. <code>[s2Get user_field="country_code" /]</code></small>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-required"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">Field Required: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<td colspan="2">';form+='<select property="required" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<option value="yes"'+((field.required==="yes")?' selected="selected"':"")+'">Yes ( required )</option>';form+='<option value="no"'+((field.required==="no")?' selected="selected"':"")+'">No ( optional )</option>';form+="</select><br />";form+='<small>If <code>yes</code>, only Users/Members will be "required" to enter this field.</small><br />';form+="<small>* Administrators are exempt from this requirement.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+'><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt">Default Text Value: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<textarea property="deflt" rows="1" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt">'+esc_html(field.deflt)+"</textarea><br />";form+="<small>Default value before user input is received.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+'><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options">Option Configuration File: * ( one option per line )</label><br />';form+="<small>Use a pipe <code>|</code> delimited format: <code>option value|option label</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<textarea property="options" rows="3" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options">'+esc_html(field.options)+"</textarea><br />";form+="Here is a quick example:<br />";form+="<small>You can also specify a <em>default</em> option:</small><br />";form+="<code>US|United States|default</code><br />";form+="<code>CA|Canada</code><br />";form+="<code>VI|Virgin Islands (U.S.)</code>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+'><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected">Expected Format: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<select property="expected" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected">';form+='<option value=""'+((field.expected==="")?' selected="selected"':"")+'">Anything Goes</option>';form+='<option disabled="disabled"></option>';form+='<optgroup label="Specific Input Types">';form+='<option value="numeric-wp-commas"'+((field.expected==="numeric-wp-commas")?' selected="selected"':"")+'">Numeric ( with or without decimals, commas allowed )</option>';form+='<option value="numeric"'+((field.expected==="numeric")?' selected="selected"':"")+'">Numeric ( with or without decimals, no commas )</option>';form+='<option value="integer"'+((field.expected==="integer")?' selected="selected"':"")+'">Integer ( whole number, without any decimals )</option>';form+='<option value="integer-gt-0"'+((field.expected==="integer-gt-0")?' selected="selected"':"")+'">Integer > 0 ( whole number, no decimals, greater than 0 )</option>';form+='<option value="float"'+((field.expected==="float")?' selected="selected"':"")+'">Float ( floating point number, decimals required )</option>';form+='<option value="float-gt-0"'+((field.expected==="float-gt-0")?' selected="selected"':"")+'">Float > 0 ( floating point number, decimals required, greater than 0 )</option>';form+='<option value="date"'+((field.expected==="date")?' selected="selected"':"")+'">Date ( required date format: dd/mm/yyyy )</option>';form+='<option value="email"'+((field.expected==="email")?' selected="selected"':"")+'">Email ( require valid email )</option>';form+='<option value="url"'+((field.expected==="url")?' selected="selected"':"")+'">Full URL ( starting with http or https )</option>';form+='<option value="domain"'+((field.expected==="domain")?' selected="selected"':"")+'">Domain Name ( domain name only, without http )</option>';form+='<option value="phone"'+((field.expected==="phone")?' selected="selected"':"")+'">Phone # ( 10 digits w/possible hyphens,spaces,brackets )</option>';form+='<option value="uszip"'+((field.expected==="uszip")?' selected="selected"':"")+'">US Zipcode ( 5-9 digits w/possible hyphen )</option>';form+='<option value="cazip"'+((field.expected==="cazip")?' selected="selected"':"")+'">Canadian Zipcode ( 6 alpha-numerics w/possible space )</option>';form+='<option value="uczip"'+((field.expected==="uczip")?' selected="selected"':"")+'">US/Canadian Zipcode ( either a US or Canadian zipcode )</option>';form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Any Character Combination">';for(i=1;i<=25;i++){form+='<option value="any-'+i+'"'+((field.expected==="any-"+i)?' selected="selected"':"")+'">Any Character Combination ( '+i+" character minimum )</option>";form+='<option value="any-'+i+'-e"'+((field.expected==="any-"+i+"-e")?' selected="selected"':"")+'">Any Character Combination ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics, Spaces & Punctuation Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-spaces-punctuation-'+i+'"'+((field.expected==="alphanumerics-spaces-punctuation-"+i)?' selected="selected"':"")+'">Alphanumerics, Spaces & Punctuation ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-spaces-punctuation-'+i+'-e"'+((field.expected==="alphanumerics-spaces-punctuation-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics, Spaces & Punctuation ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics & Spaces Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-spaces-'+i+'"'+((field.expected==="alphanumerics-spaces-"+i)?' selected="selected"':"")+'">Alphanumerics & Spaces ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-spaces-'+i+'-e"'+((field.expected==="alphanumerics-spaces-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics & Spaces ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics & Punctuation Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-punctuation-'+i+'"'+((field.expected==="alphanumerics-punctuation-"+i)?' selected="selected"':"")+'">Alphanumerics & Punctuation ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-punctuation-'+i+'-e"'+((field.expected==="alphanumerics-punctuation-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics & Punctuation ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-'+i+'"'+((field.expected==="alphanumerics-"+i)?' selected="selected"':"")+'">Alphanumerics ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-'+i+'-e"'+((field.expected==="alphanumerics-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphabetics Only">';for(i=1;i<=25;i++){form+='<option value="alphabetics-'+i+'"'+((field.expected==="alphabetics-"+i)?' selected="selected"':"")+'">Alphabetics ( '+i+" character minimum )</option>";form+='<option value="alphabetics-'+i+'-e"'+((field.expected==="alphabetics-"+i+"-e")?' selected="selected"':"")+'">Alphabetics ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Numeric Digits Only">';for(i=1;i<=25;i++){form+='<option value="numerics-'+i+'"'+((field.expected==="numerics-"+i)?' selected="selected"':"")+'">Numeric Digits ( '+i+" digit minimum )</option>";form+='<option value="numerics-'+i+'-e"'+((field.expected==="numerics-"+i+"-e")?' selected="selected"':"")+'">Numeric Digits ( exactly '+i+" digit"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+="</select><br />";form+="<small>Only Users/Members will be required to meet this criteria.</small><br />";form+="<small>* Administrators are exempt from this.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">Applicable Membership Levels: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">';form+='<td colspan="2">';form+='<input type="text" property="levels" value="'+esc_attr(field.levels)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels" /><br />';form+="<small>Please use comma-delimited Level #'s: <code>0,1,2,3,4</code> or type: <code>all</code>.</small><br />";form+="<small>This allows you to enable this field - only at specific Membership Levels.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">Allow Profile Edits: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<td colspan="2">';form+='<select property="editable" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<option value="yes"'+((field.editable==="yes")?' selected="selected"':"")+'">Yes ( editable )</option>';form+='<option value="no"'+((field.editable==="no")?' selected="selected"':"")+'">No ( uneditable after registration )</option>';form+='<option value="no-invisible"'+((field.editable==="no-invisible")?' selected="selected"':"")+'">No ( uneditable & totally invisible after registration )</option>';form+='<option value="yes-invisible"'+((field.editable==="yes-invisible")?' selected="selected"':"")+'">Yes ( editable after registration / invisible during registration )</option>';form+="</select><br />";form+="<small>If <code>No</code>, this field will be un-editable after registration.</small><br />";form+="<small>* Administrators are exempt from this.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">CSS Classes: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">';form+='<td colspan="2">';form+='<input type="text" property="classes" value="'+esc_attr(field.classes)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes" /><br />';form+="<small>Example: <code>my-style-1 my-style-2</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">CSS Styles: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">';form+='<td colspan="2">';form+='<input type="text" property="styles" value="'+esc_attr(field.styles)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles" /><br />';form+="<small>Example: <code>color:#000000; background:#FFFFFF;</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">Other Attributes: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">';form+='<td colspan="2">';form+='<input type="text" property="attrs" value="'+esc_attr(field.attrs)+'" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs" /><br />';form+='<small>Example: <code>onkeyup="" onblur=""</code></small>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-buttons"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-buttons">';form+='<td align="left">';form+='<input type="button" value="Cancel" onclick="ws_plugin__s2member_customRegFieldCancel();" />';form+="</td>";form+='<td align="right">';form+='<input type="button" value="'+((editing)?"Update This Field":"Create Registration Field")+'" onclick="'+((editing)?"ws_plugin__s2member_customRegFieldUpdate("+index+");":"ws_plugin__s2member_customRegFieldCreate();")+'" />';form+="</td>";form+="</tr>";form+="</tbody>";form+="</table>";form+="<div>";$("body").append(form);tb_show(((editing)?"Editing Registration/Profile Field":"New Custom Registration/Profile Field"),"#TB_inline?inlineId=ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form");$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form").show()}$tools.html(html)};var buildTable=function(){var l=fields.length,i=0,html="",eo="o";html+="<tbody>";html+="<tr>";html+="<th>Order</th>";html+="<th>Field Type</th>";html+="<th>Unique ID</th>";html+="<th>Required</th>";html+="<th>Levels</th>";html+="<th>- Tools -</th>";html+="</tr>";if(fields.length>0){for(i=0;i<fields.length;i++){html+='<tr class="'+esc_attr((eo=(eo==="o")?"e":"o"))+((fields[i].section==="yes")?" s":"")+" ws-plugin--s2member-custom-reg-field-configuration-table-row-"+i+'">';html+='<td nowrap="nowrap"><a class="ws-plugin--s2member-custom-reg-field-configuration-move-up" href="#" onclick="ws_plugin__s2member_customRegFieldMoveUp('+i+'); return false;"></a><a class="ws-plugin--s2member-custom-reg-field-configuration-move-down" href="#" onclick="ws_plugin__s2member_customRegFieldMoveDown('+i+'); return false;"></a></td>';html+='<td nowrap="nowrap">'+esc_html(fieldTypeDesc(fields[i].type))+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].id)+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].required)+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].levels)+"</td>";html+='<td nowrap="nowrap"><a class="ws-plugin--s2member-custom-reg-field-configuration-edit" href="#" onclick="ws_plugin__s2member_customRegFieldEdit('+i+'); return false;"></a><a class="ws-plugin--s2member-custom-reg-field-configuration-delete" href="#" onclick="ws_plugin__s2member_customRegFieldDelete('+i+'); return false;"></a></td>';html+="</tr>"}}else{html+="<tr>";html+='<td colspan="6">No Custom Fields are configured.</td>';html+="</tr>"}html+="</tbody>";$table.html(html)};buildTools(),buildTable()})()}}if(location.href.match(/page\=ws-plugin--s2member-res-ops/)){$("input#ws-plugin--s2member-brute-force-restrictions-reset-button").click(function(){var $this=$(this);$this.val("one moment please ...");$.post(ajaxurl,{action:"ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax",ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'},function(response){alert("s2Member's Brute Force Restriction Logs have all been reset."),$this.val("Reset Brute Force Logs")});return false});$("input#ws-plugin--s2member-ip-restrictions-reset-button").click(function(){var $this=$(this);$this.val("one moment please ...");$.post(ajaxurl,{action:"ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax",ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'},function(response){alert("s2Member's IP Restriction Logs have all been reset."),$this.val("Reset IP Restriction Logs")});return false});$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query[]"]').change(function(){var thisChange=$(this).val();$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query[]"]').each(function(){var $this=$(this),val=$this.val(),checkboxes='input[type="checkbox"]';if(val==="all"&&this.checked){$this.nextAll(checkboxes).attr({checked:"checked",disabled:"disabled"})}else{if(val==="all"&&!this.checked){$this.nextAll(checkboxes).removeAttr("disabled");(thisChange==="all")?$this.nextAll(checkboxes).removeAttr("checked"):null}}})}).last().trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-down-ops/)){var updateCloudFrontPrivateKey=function(){var $hiddenPrivateKey=$("input#ws-plugin--s2member-amazon-cf-files-private-key");var $visiblePrivateKeyEntry=$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry");var hiddenPrivateKeyValue=$.trim($hiddenPrivateKey.val()),visiblePrivateKeyEntryValue=$.trim($visiblePrivateKeyEntry.val());if((hiddenPrivateKeyValue&&!visiblePrivateKeyEntryValue)||visiblePrivateKeyEntryValue.match(/[^\r\n\u25CF]/)){$hiddenPrivateKey.val(visiblePrivateKeyEntryValue),$visiblePrivateKeyEntry.val(visiblePrivateKeyEntryValue.replace(/[^\r\n]/g,String.fromCharCode(9679)))}};$("form#ws-plugin--s2member-options-form").submit(updateCloudFrontPrivateKey);$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry").change(updateCloudFrontPrivateKey).trigger("change");var updateCloudFrontDistroCfgs=function(){var $hiddenPrivateKey=$("input#ws-plugin--s2member-amazon-cf-files-private-key");var $visiblePrivateKeyId=$("input#ws-plugin--s2member-amazon-cf-files-private-key-id");var $autoConfigDistros=$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros");var $autoConfigDistrosStatus=$("input#ws-plugin--s2member-amazon-cf-files-distros-auto-config-status");var autoConfigDistrosStatusValue=$.trim($autoConfigDistrosStatus.val());var hiddenPrivateKeyValue=$.trim($hiddenPrivateKey.val()),visiblePrivateKeyIdValue=$.trim($visiblePrivateKeyId.val());var hiddenPrivateKeyPrevConfigValue=$.trim($hiddenPrivateKey.attr("data-s-prev-config-value")),visiblePrivateKeyIdPrevConfigValue=$.trim($visiblePrivateKeyId.attr("data-s-prev-config-value"));if(autoConfigDistrosStatusValue==="configured"&&((visiblePrivateKeyIdPrevConfigValue&&visiblePrivateKeyIdValue!==visiblePrivateKeyIdPrevConfigValue)||(hiddenPrivateKeyPrevConfigValue&&hiddenPrivateKeyValue!==hiddenPrivateKeyPrevConfigValue))){alert("s2Member will need to delete and re-configure your Amazon® CloudFront distributions if you change this. When you're done editing, click (Save All Changes) below.");$autoConfigDistros.attr("checked","checked")}else{if(autoConfigDistrosStatusValue!=="configured"&&visiblePrivateKeyIdValue&&hiddenPrivateKeyValue){alert("s2Member will need to auto-configure your Amazon® CloudFront distributions for you. When you're done editing, click (Save All Changes) below.");$autoConfigDistros.attr("checked","checked")}}};$("input#ws-plugin--s2member-amazon-cf-files-private-key-id").change(updateCloudFrontDistroCfgs);$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry").change(updateCloudFrontDistroCfgs);$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros-w-cnames").change(function(){var $this=$(this),thisChecked=(this.checked)?true:false;var $autoConfigDistros=$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros");var $autoConfigDistroCnames=$("div#ws-plugin--s2member-amazon-cf-files-auto-configure-distro-cnames");(thisChecked)?$autoConfigDistroCnames.show():$autoConfigDistroCnames.hide();(thisChecked)?$autoConfigDistros.attr("checked","checked"):null}).trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-paypal-ops/)){$("select#ws-plugin--s2member-auto-eot-system-enabled").change(function(){var $this=$(this),val=$this.val();var $viaCron=$("p#ws-plugin--s2member-auto-eot-system-enabled-via-cron");if(val==2){$viaCron.show()}else{$viaCron.hide()}})}if(location.href.match(/page\=ws-plugin--s2member-paypal-buttons/)){$("div.ws-menu-page select[id]").filter(function(){return this.id.match(/^ws-plugin--s2member-(level[1-9][0-9]*|modification)-term$/)}).change(function(){var button=this.id.replace(/^ws-plugin--s2member-(.+?)-term$/g,"$1");var trialDisabled=($(this).val().split("-")[2].replace(/[^0-1BN]/g,"")==="BN")?1:0;$("p#ws-plugin--s2member-"+button+"-trial-line").css("display",(trialDisabled?"none":""));$("span#ws-plugin--s2member-"+button+"-trial-then").css("display",(trialDisabled?"none":""));$("span#ws-plugin--s2member-"+button+"-20p-rule").css("display",(trialDisabled?"none":""));(trialDisabled)?$("input#ws-plugin--s2member-"+button+"-trial-period").val(0):null;(trialDisabled)?$("input#ws-plugin--s2member-"+button+"-trial-amount").val("0.00"):null});$("div.ws-menu-page input[id]").filter(function(){return this.id.match(/^ws-plugin--s2member-(level[1-9][0-9]*|modification|ccap)-ccaps$/)}).keyup(function(){var value=this.value.replace(/^(-all|-al|-a|-)[;,]*/gi,""),_all=(this.value.match(/^(-all|-al|-a|-)[;,]*/i))?"-all,":"";if(value.match(/[^a-z_0-9,]/)){this.value=_all+$.trim($.trim(value).replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase())}});ws_plugin__s2member_paypalButtonGenerate=function(button){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="",labels={};eval("<?php echo c_ws_plugin__s2member_utils_strings::esc_dq($labels); ?>");var shortCode=$("input#ws-plugin--s2member-"+button+"-shortcode");var code=$("textarea#ws-plugin--s2member-"+button+"-button");var modLevel=$("select#ws-plugin--s2member-modification-level");var level=(button==="modification")?modLevel.val().split(":",2)[1]:button.replace(/^level/,"");var label=labels["level"+level].replace(/"/g,"");var desc=$.trim($("input#ws-plugin--s2member-"+button+"-desc").val().replace(/"/g,""));var trialAmount=$("input#ws-plugin--s2member-"+button+"-trial-amount").val().replace(/[^0-9\.]/g,"");var trialPeriod=$("input#ws-plugin--s2member-"+button+"-trial-period").val().replace(/[^0-9]/g,"");var trialTerm=$("select#ws-plugin--s2member-"+button+"-trial-term").val().replace(/[^A-Z]/g,"");var regAmount=$("input#ws-plugin--s2member-"+button+"-amount").val().replace(/[^0-9\.]/g,"");var regPeriod=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[0].replace(/[^0-9]/g,"");var regTerm=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[1].replace(/[^A-Z]/g,"");var regRecur=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[2].replace(/[^0-1BN]/g,"");var regRecurTimes="",regRecurRetry="1";var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-"+button+"-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-"+button+"-currency").val().replace(/[^A-Z]/g,"");var cCaps=$.trim($.trim($("input#ws-plugin--s2member-"+button+"-ccaps").val()).replace(/^(-all|-al|-a|-)[;,]*/gi,"").replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());cCaps=($.trim($("input#ws-plugin--s2member-"+button+"-ccaps").val()).match(/^(-all|-al|-a|-)[;,]*/i))?((cCaps)?"-all,":"-all")+cCaps.toLowerCase():cCaps.toLowerCase();trialPeriod=(regRecur==="BN")?"0":trialPeriod;trialAmount=(!trialAmount||isNaN(trialAmount)||trialAmount<0.01||trialPeriod<=0)?"0":trialAmount;var levelCcapsPer=(regRecur==="BN"&®Term!=="L")?level+":"+cCaps+":"+regPeriod+" "+regTerm:level+":"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(trialAmount!=="0"&&(isNaN(trialAmount)||trialAmount<0)){alert("— Oops, a slight problem: —\n\nWhen provided, Trial Amount must be >= 0.00");return false}else{if(trialAmount!=="0"&&trialAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Trial Amount is: 10000.00");return false}else{if(trialTerm==="D"&&trialPeriod>7){alert("— Oops, a slight problem: —\n\nMaximum Trial Days is: 7.\nIf you want to offer more than 7 days, please choose Weeks or Months from the drop-down.");return false}else{if(trialTerm==="W"&&trialPeriod>52){alert("— Oops, a slight problem: —\n\nMaximum Trial Weeks is: 52.\nIf you want to offer more than 52 weeks, please choose Months from the drop-down.");return false}else{if(trialTerm==="M"&&trialPeriod>12){alert("— Oops, a slight problem: —\n\nMaximum Trial Months is: 12.\nIf you want to offer more than 12 months, please choose Years from the drop-down.");return false}else{if(trialTerm==="Y"&&trialPeriod>1){alert("— Oops, a slight problem: —\n\nMax Trial Period Years is: 1.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}}}}}}code.html(code.val().replace(/ \<\!--(\<input type\="hidden" name\="(amount|src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\>)--\>/g," $1"));(parseInt(trialPeriod)<=0)?code.html(code.val().replace(/ (\<input type\="hidden" name\="(a1|p1|t1)" value\="(.*?)" \/\>)/g," <!--$1-->")):null;(regRecur==="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g," $1_xclick$3")):null;(regRecur==="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="(src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\>)/g," <!--$1-->")):null;(regRecur!=="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g," $1_xclick-subscriptions$3")):null;(regRecur!=="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="amount" value\="(.*?)" \/\>)/g," <!--$1-->")):null;shortCodeTemplateAttrs+=(button==="modification")?'modify="1" ':"";shortCodeTemplateAttrs+='level="'+esc_attr(level)+'" ccaps="'+esc_attr(cCaps)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'" custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"';shortCodeTemplateAttrs+=' ta="'+esc_attr(trialAmount)+'" tp="'+esc_attr(trialPeriod)+'" tt="'+esc_attr(trialTerm)+'" ra="'+esc_attr(regAmount)+'" rp="'+esc_attr(regPeriod)+'" rt="'+esc_attr(regTerm)+'" rr="'+esc_attr(regRecur)+'" rrt="'+esc_attr(regRecurTimes)+'" rra="'+esc_attr(regRecurRetry)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(levelCcapsPer)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="modify" value\="(.*?)"/,' name="modify" value="'+((button==="modification")?"1":"0")+'"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));code.html(code.val().replace(/ name\="src" value\="(.*?)"/,' name="src" value="'+esc_attr(regRecur)+'"'));code.html(code.val().replace(/ name\="srt" value\="(.*?)"/,' name="srt" value="'+esc_attr(regRecurTimes)+'"'));code.html(code.val().replace(/ name\="sra" value\="(.*?)"/,' name="sra" value="'+esc_attr(regRecurRetry)+'"'));code.html(code.val().replace(/ name\="a1" value\="(.*?)"/,' name="a1" value="'+esc_attr(trialAmount)+'"'));code.html(code.val().replace(/ name\="p1" value\="(.*?)"/,' name="p1" value="'+esc_attr(trialPeriod)+'"'));code.html(code.val().replace(/ name\="t1" value\="(.*?)"/,' name="t1" value="'+esc_attr(trialTerm)+'"'));code.html(code.val().replace(/ name\="a3" value\="(.*?)"/,' name="a3" value="'+esc_attr(regAmount)+'"'));code.html(code.val().replace(/ name\="p3" value\="(.*?)"/,' name="p3" value="'+esc_attr(regPeriod)+'"'));code.html(code.val().replace(/ name\="t3" value\="(.*?)"/,' name="t3" value="'+esc_attr(regTerm)+'"'));$("div#ws-plugin--s2member-"+button+"-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));(button==="modification")?alert("Your Modification Button has been generated.\nPlease copy/paste the Shortcode Format into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Modification Buttons should be displayed to existing Users/Members, and they should be logged-in, BEFORE clicking this Button."):alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Membership Options Page.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalCcapButtonGenerate=function(){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="";var shortCode=$("input#ws-plugin--s2member-ccap-shortcode");var code=$("textarea#ws-plugin--s2member-ccap-button");var desc=$.trim($("input#ws-plugin--s2member-ccap-desc").val().replace(/"/g,""));var regAmount=$("input#ws-plugin--s2member-ccap-amount").val().replace(/[^0-9\.]/g,"");var regPeriod=$("select#ws-plugin--s2member-ccap-term").val().split("-")[0].replace(/[^0-9]/g,"");var regTerm=$("select#ws-plugin--s2member-ccap-term").val().split("-")[1].replace(/[^A-Z]/g,"");var regRecur=$("select#ws-plugin--s2member-ccap-term").val().split("-")[2].replace(/[^0-1BN]/g,"");var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-ccap-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-ccap-currency").val().replace(/[^A-Z]/g,"");var cCaps=$.trim($.trim($("input#ws-plugin--s2member-ccap-ccaps").val()).replace(/^(-all|-al|-a|-)[;,]*/gi,"").replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());cCaps=($.trim($("input#ws-plugin--s2member-ccap-ccaps").val()).match(/^(-all|-al|-a|-)[;,]*/i))?((cCaps)?"-all,":"-all")+cCaps.toLowerCase():cCaps.toLowerCase();var levelCcapsPer=(regRecur==="BN"&®Term!=="L")?"*:"+cCaps+":"+regPeriod+" "+regTerm:"*:"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(!cCaps||cCaps==="-all"){alert("— Oops, a slight problem: —\n\nPlease provide at least one Custom Capability.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}shortCodeTemplateAttrs+='level="*" ccaps="'+esc_attr(cCaps)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'"';shortCodeTemplateAttrs+=' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="'+esc_attr(regAmount)+'" rp="'+esc_attr(regPeriod)+'" rt="'+esc_attr(regTerm)+'" rr="'+esc_attr(regRecur)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(levelCcapsPer)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));$("div#ws-plugin--s2member-ccap-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Independent Custom Capability Buttons should ONLY be displayed to existing Users/Members, and they MUST be logged-in, BEFORE clicking this Button.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalSpButtonGenerate=function(){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="";var shortCode=$("input#ws-plugin--s2member-sp-shortcode");var code=$("textarea#ws-plugin--s2member-sp-button");var leading=$("select#ws-plugin--s2member-sp-leading-id").val().replace(/[^0-9]/g,"");var additionals=$("select#ws-plugin--s2member-sp-additional-ids").val()||[];var hours=$("select#ws-plugin--s2member-sp-hours").val().replace(/[^0-9]/g,"");var regAmount=$("input#ws-plugin--s2member-sp-amount").val().replace(/[^0-9\.]/g,"");var desc=$.trim($("input#ws-plugin--s2member-sp-desc").val().replace(/"/g,""));var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-sp-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-sp-currency").val().replace(/[^A-Z]/g,"");if(!leading){alert("— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it's because you've not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}for(var i=0,ids=leading;i<additionals.length;i++){if(additionals[i]&&additionals[i]!==leading){ids+=","+additionals[i]}}var spIdsHours="sp:"+ids+":"+hours;shortCodeTemplateAttrs+='sp="1" ids="'+esc_attr(ids)+'" exp="'+esc_attr(hours)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'"';shortCodeTemplateAttrs+=' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="'+esc_attr(regAmount)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(spIdsHours)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));$("div#ws-plugin--s2member-sp-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your WordPress® Editor.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalRegLinkGenerate=function(){var level=$("select#ws-plugin--s2member-reg-link-level").val().replace(/[^0-9]/g,"");var subscrID=$.trim($("input#ws-plugin--s2member-reg-link-subscr-id").val());var custom=$.trim($("input#ws-plugin--s2member-reg-link-custom").val());var cCaps=$.trim($.trim($("input#ws-plugin--s2member-reg-link-ccaps").val()).replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());var fixedTerm=$.trim($("input#ws-plugin--s2member-reg-link-fixed-term").val().replace(/[^A-Z 0-9]/gi,"").toUpperCase());var $link=$("p#ws-plugin--s2member-reg-link"),$loading=$("img#ws-plugin--s2member-reg-link-loading");var levelCcapsPer=(fixedTerm&&!fixedTerm.match(/L$/))?level+":"+cCaps+":"+fixedTerm:level+":"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(!subscrID){alert("— Oops, a slight problem: —\n\nPaid Subscr. ID is a required value.");return false}else{if(!custom||custom.indexOf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq ($_SERVER["HTTP_HOST"]); ?>')!==0){alert("— Oops, a slight problem: —\n\nThe Custom Value MUST start with your domain name.");return false}else{if(fixedTerm&&!fixedTerm.match(/^[1-9]+ (D|W|M|Y|L)$/)){alert("— Oops, a slight problem: —\n\nThe Fixed Term Length is not formatted properly.");return false}}}$link.hide(),$loading.show(),$.post(ajaxurl,{action:"ws_plugin__s2member_reg_access_link_via_ajax",ws_plugin__s2member_reg_access_link_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-reg-access-link-via-ajax")); ?>',s2member_reg_access_link_subscr_gateway:"paypal",s2member_reg_access_link_subscr_id:subscrID,s2member_reg_access_link_custom:custom,s2member_reg_access_link_item_number:levelCcapsPer},function(response){$link.show().html('<a href="'+esc_attr(response)+'" target="_blank" rel="external">'+esc_html(response)+"</a>"),$loading.hide()});return false};ws_plugin__s2member_paypalSpLinkGenerate=function(){var leading=$("select#ws-plugin--s2member-sp-link-leading-id").val().replace(/[^0-9]/g,"");var additionals=$("select#ws-plugin--s2member-sp-link-additional-ids").val()||[];var hours=$("select#ws-plugin--s2member-sp-link-hours").val().replace(/[^0-9]/g,"");var $link=$("p#ws-plugin--s2member-sp-link"),$loading=$("img#ws-plugin--s2member-sp-link-loading");if(!leading){alert("— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it's because you've not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.");return false}for(var i=0,ids=leading;i<additionals.length;i++){if(additionals[i]&&additionals[i]!==leading){ids+=","+additionals[i]}}$link.hide(),$loading.show(),$.post(ajaxurl,{action:"ws_plugin__s2member_sp_access_link_via_ajax",ws_plugin__s2member_sp_access_link_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-sp-access-link-via-ajax")); ?>',s2member_sp_access_link_ids:ids,s2member_sp_access_link_hours:hours},function(response){$link.show().html('<a href="'+esc_attr(response)+'" target="_blank" rel="external">'+esc_html(response)+"</a>"),$loading.hide()});return false}}if(location.href.match(/page\=ws-plugin--s2member-els-ops/)){$("select#ws-plugin--s2member-custom-reg-opt-in").change(function(){var $this=$(this),val=$this.val();var $rows=$("tr.ws-plugin--s2member-custom-reg-opt-in-label-row");var $prevImg=$("img.ws-plugin--s2member-custom-reg-opt-in-label-prev-img");if(val<=0){$rows.css("display","none"),$prevImg.attr("src",$prevImg.attr("src").replace(/\/checked\.png$/,"/unchecked.png"))}else{if(val==1){$rows.css("display",""),$prevImg.attr("src",$prevImg.attr("src").replace(/\/unchecked\.png$/,"/checked.png"))}else{if(val==2){$rows.css("display",""),$prevImg.attr("src",$prevImg.attr("src").replace(/\/checked\.png$/,"/unchecked.png"))}}}});$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs[]"]').change(function(){var thisChange=$(this).val(),checkedIndexes=[];$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs[]"]').each(function(){var $this=$(this),val=$this.val(),checkboxes='input[type="checkbox"]';if(val==="removal-deletion"&&this.checked){$this.nextAll(checkboxes).slice(0,2).attr({checked:"checked",disabled:"disabled"})}else{if(val==="removal-deletion"&&!this.checked){$this.nextAll(checkboxes).slice(0,2).removeAttr("disabled");(thisChange==="removal-deletion")?$this.nextAll(checkboxes).slice(0,2).removeAttr("checked"):null}else{if(val==="modification"&&this.checked){$this.nextAll(checkboxes).slice(0,3).attr({checked:"checked",disabled:"disabled"})}else{if(val==="modification"&&!this.checked){(thisChange==="modification")?$this.nextAll(checkboxes).slice(0,3).removeAttr("checked"):null;$this.nextAll(checkboxes).slice(0,3).removeAttr("disabled")}}}}}).each(function(index){(this.checked)?checkedIndexes.push(index):null});$("select#ws-plugin--s2member-custom-reg-auto-opt-out-transitions").removeAttr("disabled");if($.inArray(3,checkedIndexes)===-1&&$.inArray(4,checkedIndexes)===-1&&$.inArray(5,checkedIndexes)===-1&&$.inArray(6,checkedIndexes)===-1){$("select#ws-plugin--s2member-custom-reg-auto-opt-out-transitions").attr("disabled","disabled")}}).last().trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-integrations/)){$("select#ws-plugin--s2member-bbpress-ovg").change(function(){if($(this).val()==="0"){$("span#ws-plugin--s2member-bbpress-ovg-off-note").css("display","inline");var l='form#ws-plugin--s2member-bridge-bbpress-form label[for="ws_plugin--s2member-bridge-bbpress-min-level"]';$(l).text($(l).text().replace(/to (read\/)?participate/i,"to read/participate")),$("select#ws-plugin--s2member-bbpress-min-level option").each(function(){$(this).text($(this).text().replace(/\( to( read and)? participate \)/i,"( to read and participate )"))})}else{if($(this).val()==="1"){$("span#ws-plugin--s2member-bbpress-ovg-off-note").css("display","none");var l='form#ws-plugin--s2member-bridge-bbpress-form label[for="ws_plugin--s2member-bridge-bbpress-min-level"]';$(l).text($(l).text().replace(/to (read\/)?participate/i,"to participate")),$("select#ws-plugin--s2member-bbpress-min-level option").each(function(){$(this).text($(this).text().replace(/\( to( read and)? participate \)/i,"( to participate )"))})}}}).trigger("change")}});
|
1 |
+
jQuery(document).ready(function($){var esc_attr=esc_html=function(str){return String(str).replace(/"/g,""").replace(/\</g,"<").replace(/\>/g,">")};if(location.href.match(/page\=ws-plugin--s2member/)){$("input.ws-plugin--s2member-update-roles-button, input.ws-plugin--s2member-reset-roles-button").click(function(){var $this=$(this);$this.val("one moment please ...");var levels='<?php echo (int)$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; ?>';var resetUpdate=($this.hasClass("ws-plugin--s2member-reset-roles-button"))?"Reset":"Update";$.post(ajaxurl,{action:"ws_plugin__s2member_update_roles_via_ajax",ws_plugin__s2member_update_roles_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-update-roles-via-ajax")); ?>'},function(response){if(response==="1"){alert("s2Member's Roles/Capabilities "+((resetUpdate.toLowerCase()==="reset")?"have been successfully reset":"updated successfully")+".\nYour installation of s2Member has Membership Levels 0-"+levels+"."),$this.val(resetUpdate+" Roles/Capabilities")}else{if(response==="l"){alert("Sorry, your request failed.\ns2Member's Roles/Capabilities are locked by Filter:\nws_plugin__s2member_lock_roles_caps"),$this.val(resetUpdate+" Roles/Capabilities")}else{alert("Sorry, your request failed.\nAccess denied. Do you have the ability to `create_users`?"),$this.val(resetUpdate+" Roles/Capabilities")}}});return false})}if(location.href.match(/page\=ws-plugin--s2member-mms-ops/)){$("select#ws-plugin--s2member-mms-registration-file").change(function(){if($(this).val()==="wp-signup"){var gv=$("select#ws-plugin--s2member-mms-registration-grants").val(),l0v=$("input#ws-plugin--s2member-mms-registration-blogs-level0").val();$("div#ws-plugin--s2member-mms-registration-support-package-details-wrapper").show(),$("div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login").hide(),$("div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup").show();$("div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0")[((gv==="all")?"show":"hide")]();$("input#ws-plugin--s2member-mms-registration-blogs-level0").val(((gv==="all")?((l0v>0)?l0v:"1"):"0"))}else{if($(this).val()==="wp-login"){var gv=$("select#ws-plugin--s2member-mms-registration-grants").val(),l0v=$("input#ws-plugin--s2member-mms-registration-blogs-level0").val();$("div#ws-plugin--s2member-mms-registration-support-package-details-wrapper").hide(),$("div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login").show(),$("div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup").hide();$("div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0").hide();$("input#ws-plugin--s2member-mms-registration-blogs-level0").val("0")}}}).trigger("change");$("select#ws-plugin--s2member-mms-registration-grants").change(function(){$("select#ws-plugin--s2member-mms-registration-file").trigger("change")})}if(location.href.match(/page\=ws-plugin--s2member-gen-ops/)){ws_plugin__s2member_generateSecurityKey=function(){var mt_rand=function(min,max){min=(arguments.length<1)?0:min;max=(arguments.length<2)?2147483647:max;return Math.floor(Math.random()*(max-min+1))+min};var chars="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()";for(var i=0,key="";i<64;i++){key+=chars.substr(mt_rand(0,chars.length-1),1)}$("input#ws-plugin--s2member-sec-encryption-key").val(key);return false};ws_plugin__s2member_enableSecurityKey=function(){if(confirm("Edit Key? Are you sure?\nThis could break your installation!\n\n*Note* If you've been testing s2Member, feel free to change this Key before you go live. Just don't go live, and then change it. You'll have unhappy Customers. Data corruption WILL occur! For your safety, s2Member keeps a history of the last 10 Keys that you've used. If you get yourself into a real situation, s2Member will let you revert back to a previous Key.")){$("input#ws-plugin--s2member-sec-encryption-key").removeAttr("disabled")}return false};ws_plugin__s2member_securityKeyHistory=function(){$("div#ws-plugin--s2member-sec-encryption-key-history").toggle();return false};$("select#ws-plugin--s2member-new-user-emails-enabled").change(function(){var $pluggable=$("input#ws-plugin--s2member-pluggables-wp-new-user-notification"),$this=$(this),$newUserEmails=$("div#ws-plugin--s2member-new-user-emails");if($pluggable.val()==="0"||$this.val()==="0"){($pluggable.val()==="0")?$this.attr("disabled","disabled"):$this.removeAttr("disabled");$(":input",$newUserEmails).attr("disabled","disabled"),$newUserEmails.css("opacity","0.5")}else{$this.removeAttr("disabled"),$(":input",$newUserEmails).removeAttr("disabled"),$newUserEmails.css("opacity","")}}).trigger("change");if($("input#ws-plugin--s2member-custom-reg-fields").length&&$("div#ws-plugin--s2member-custom-reg-field-configuration").length){(function(){var i,fieldDefaults,tools,table,$tools,$table;var $fields=$("input#ws-plugin--s2member-custom-reg-fields");var $configuration=$("div#ws-plugin--s2member-custom-reg-field-configuration");var fields=($fields.val())?$.JSON.parse($fields.val()):[];fields=(fields instanceof Array)?fields:[];fieldDefaults={section:"no",sectitle:"",id:"",label:"",type:"text",deflt:"",options:"",expected:"",required:"yes",levels:"all",editable:"yes",classes:"",styles:"",attrs:""};for(i=0;i<fields.length;i++){fields[i]=$.extend(true,{},fieldDefaults,fields[i])}tools='<div id="ws-plugin--s2member-custom-reg-field-configuration-tools"></div>',table='<table id="ws-plugin--s2member-custom-reg-field-configuration-table"></table>';$configuration.html(tools+table);$tools=$("div#ws-plugin--s2member-custom-reg-field-configuration-tools"),$table=$("table#ws-plugin--s2member-custom-reg-field-configuration-table");ws_plugin__s2member_customRegFieldSectionChange=function(select){var section=$(select).val();var sectitle_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle";(section==="yes")?$(sectitle_trs).css("display",""):$(sectitle_trs).css("display","none")};ws_plugin__s2member_customRegFieldTypeChange=function(select){var type=$(select).val();var deflt_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt",options_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-options",expected_trs="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected";(type.match(/^(text|textarea)$/))?$(deflt_trs).css("display",""):$(deflt_trs).css("display","none");(type.match(/^(select|selects|checkboxes|radios)$/))?$(options_trs).css("display",""):$(options_trs).css("display","none");(type.match(/^(text|textarea)$/))?$(expected_trs).css("display",""):$(expected_trs).css("display","none")};ws_plugin__s2member_customRegFieldDelete=function(index){var newFields=new Array();for(var i=0;i<fields.length;i++){if(i!==index){newFields.push(fields[i])}}fields=newFields,updateFields(),buildTable()};ws_plugin__s2member_customRegFieldMoveUp=function(index){if(typeof fields[index]==="object"&&typeof fields[index-1]==="object"){var prevFieldObj=fields[index-1],thisFieldObj=fields[index];fields[index-1]=thisFieldObj,fields[index]=prevFieldObj;updateFields(),buildTable()}};ws_plugin__s2member_customRegFieldMoveDown=function(index){if(typeof fields[index]==="object"&&typeof fields[index+1]==="object"){var nextFieldObj=fields[index+1],thisFieldObj=fields[index];fields[index+1]=thisFieldObj,fields[index]=nextFieldObj;updateFields(),buildTable()}};ws_plugin__s2member_customRegFieldCreate=function(){var $table=$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form"),field={};$(":input[property]",$table).each(function(){var $this=$(this),property=$this.attr("property"),val=$.trim($this.val());field[property]=val});if((field=validateField(field))){fields.push(field),updateFields(),buildTools(),buildTable(),scrollReset();setTimeout(function(){var row="tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-"+(fields.length-1);alert('Field created successfully.\n* Remember to "Save All Changes".');$(row).effect("highlight",1500)},500)}};ws_plugin__s2member_customRegFieldUpdate=function(index){var $table=$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form"),field={};$(":input[property]",$table).each(function(){var $this=$(this),property=$this.attr("property"),val=$.trim($this.val());field[property]=val});if((field=validateField(field,index))){fields[index]=field,updateFields(),buildTools(),buildTable(),scrollReset();setTimeout(function(){var row="tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-"+index;alert('Field updated successfully.\n* Remember to "Save All Changes".');$(row).effect("highlight",1500)},500)}};ws_plugin__s2member_customRegFieldAdd=function(){buildTools(true)};ws_plugin__s2member_customRegFieldEdit=function(index){buildTools(false,index),scrollReset()};ws_plugin__s2member_customRegFieldCancel=function(){buildTools(),scrollReset()};var validateField=function(field,index){var editing=(typeof index==="number"&&typeof fields[index]==="object")?true:false,errors=[],options,i;if(typeof field!=="object"||typeof(field=$.extend(true,{},fieldDefaults,field))!=="object"){alert("Invalid field object. Please try again.");return false}field.sectitle=(field.section==="yes")?field.sectitle:"";field.deflt=(field.type.match(/^(text|textarea)$/))?field.deflt:"";field.deflt=(field.type.match(/^(text)$/))?field.deflt.replace(/[\r\n\t ]+/g," "):field.deflt;field.options=(field.type.match(/^(select|selects|checkboxes|radios)$/))?field.options:"";field.expected=(field.type.match(/^(text|textarea)$/))?field.expected:"";if(!field.id){errors.push("Unique Field ID:\nThis is required. Please try again.")}else{if(fieldIdExists(field.id)&&(!editing||field.id!==fields[index].id)){errors.push("Unique Field ID:\nThat Field ID already exists. Please try again.")}}if(!field.label){errors.push("Field Label/Description:\nThis is required. Please try again.")}if(field.type.match(/^(select|selects|checkboxes|radios)$/)&&!field.options){errors.push("Option Configuration File:\nThis is required. Please try again.")}else{if(field.type.match(/^(select|selects|checkboxes|radios)$/)){for(i=0;i<(options=field.options.split(/[\r\n]+/)).length;i++){if(!(options[i]=$.trim(options[i])).match(/^([^\|]*)(\|)([^\|]*)(\|default)?$/)){errors.push("Option Configuration File:\nInvalid configuration at line #"+(i+1)+".");break}}field.options=$.trim(options.join("\n"))}}if(!(field.levels=field.levels.replace(/ /g,""))){errors.push("Applicable Levels:\nThis is required. Please try again.")}else{if(!field.levels.match(/^(all|[0-9,]+)$/)){errors.push("Applicable Levels:\nShould be comma-delimited Levels, or just type: all.\n( examples: 0,1,2,3,4 or type the word: all )")}}if(field.classes&&field.classes.match(/[^a-z 0-9 _ \-]/i)){errors.push("CSS Classes:\nContains invalid characters. Please try again.\n( only: alphanumerics, underscores, hyphens, spaces )")}if(field.styles&&field.styles.match(/["\=\>\<]/)){errors.push('CSS Styles:\nContains invalid characters. Please try again.\n( do NOT use these characters: = " < > )')}if(field.attrs&&field.attrs.match(/[\>\<]/)){errors.push("Other Attributes:\nContains invalid characters. Please try again.\n( do NOT use these characters: < > )")}if(errors.length>0){alert(errors.join("\n\n"));return false}else{return field}};var updateFields=function(){$fields.val(((fields.length>0)?$.JSON.stringify(fields):""))};var fieldId2Var=function(fieldId){return(typeof fieldId==="string")?$.trim(fieldId).toLowerCase().replace(/[^a-z0-9]/g,"_"):""};var fieldTypeDesc=function(type){var types={text:"Text ( single line )",textarea:"Textarea ( multi-line )",select:"Select Menu ( drop-down )",selects:"Select Menu ( multi-option )",checkbox:"Checkbox ( single )",pre_checkbox:"Checkbox ( pre-checked )",checkboxes:"Checkboxes ( multi-option )",radios:"Radio Buttons ( multi-option )"};if(typeof types[type]==="string"){return types[type]}return""};var fieldIdExists=function(fieldId){for(var i=0;i<fields.length;i++){if(fields[i].id===fieldId){return true}}};var scrollReset=function(){scrollTo(0,$("div.ws-plugin--s2member-custom-reg-fields-section").offset()["top"]-100)};var buildTools=function(adding,index){var i=0,html="",form="",w=0,h=0,editing=(typeof index==="number"&&typeof fields[index]==="object")?true:false,displayForm=(adding||editing)?true:false,field=(editing)?$.extend(true,{},fieldDefaults,fields[index]):fieldDefaults;html+='<a href="#" onclick="ws_plugin__s2member_customRegFieldAdd(); return false;">Add New Field</a>';tb_remove(),$("div#ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form").remove();if(displayForm){form+='<div id="ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form">';form+='<table id="ws-plugin--s2member-custom-reg-field-configuration-tools-form">';form+="<tbody>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">Starts A New Section?</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';form+='<td colspan="2">';form+='<select property="section" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section" onchange="ws_plugin__s2member_customRegFieldSectionChange(this);">';form+='<option value="no"'+((field.section==="no")?' selected="selected"':"")+'">No ( this Field flows normally )</option>';form+='<option value="yes"'+((field.section==="yes")?' selected="selected"':"")+'">Yes ( this Field begins a new section )</option>';form+="</select><br />";form+="<small>Optional. Allows Fields to be grouped into sections.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"'+((field.section==="yes")?"":' style="display:none;"')+'><td colspan="2"><hr /></td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"'+((field.section==="yes")?"":' style="display:none;"')+">";form+='<td colspan="2">';form+="Title for this new section? ( optional )<br />";form+='<input type="text" property="sectitle" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle" value="'+esc_attr(field.sectitle)+'" /><br />';form+="<small>If empty, a simple divider will be used by default.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-type"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">Form Field Type: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';form+='<td colspan="2">';form+='<select property="type" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type" onchange="ws_plugin__s2member_customRegFieldTypeChange(this);">';form+='<option value="text"'+((field.type==="text")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("text"))+"</option>";form+='<option value="textarea"'+((field.type==="textarea")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("textarea"))+"</option>";form+='<option value="select"'+((field.type==="select")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("select"))+"</option>";form+='<option value="selects"'+((field.type==="selects")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("selects"))+"</option>";form+='<option value="checkbox"'+((field.type==="checkbox")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("checkbox"))+"</option>";form+='<option value="pre_checkbox"'+((field.type==="pre_checkbox")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("pre_checkbox"))+"</option>";form+='<option value="checkboxes"'+((field.type==="checkboxes")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("checkboxes"))+"</option>";form+='<option value="radios"'+((field.type==="radios")?' selected="selected"':"")+'">'+esc_html(fieldTypeDesc("radios"))+"</option>";form+="</select><br />";form+="<small>The options below may change, based on the Field Type you choose here.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-label"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">Field Label/Desc: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">';form+='<td colspan="2">';form+='<input type="text" property="label" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label" value="'+esc_attr(field.label)+'" /><br />';form+="<small>Examples: <code>Choose Country</code>, <code>Street Address</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-id"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">Unique Field ID: *</label></label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">';form+='<td colspan="2">';form+='<input type="text" property="id" maxlength="25" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id" value="'+esc_attr(field.id)+'" /><br />';form+="<small>Examples: <code>country_code</code>, <code>street_address</code></small><br />";form+='<small>e.g. <code>[s2Get user_field="country_code" /]</code></small>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-required"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">Field Required: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<td colspan="2">';form+='<select property="required" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">';form+='<option value="yes"'+((field.required==="yes")?' selected="selected"':"")+'">Yes ( required )</option>';form+='<option value="no"'+((field.required==="no")?' selected="selected"':"")+'">No ( optional )</option>';form+="</select><br />";form+='<small>If <code>yes</code>, only Users/Members will be "required" to enter this field.</small><br />';form+="<small>* Administrators are exempt from this requirement.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+'><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt">Default Text Value: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<textarea property="deflt" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt" rows="1">'+esc_html(field.deflt)+"</textarea><br />";form+="<small>Default value before user input is received.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+'><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options">Option Configuration File: * ( one option per line )</label><br />';form+="<small>Use a pipe <code>|</code> delimited format: <code>option value|option label</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+((field.type.match(/^(select|selects|checkboxes|radios)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<textarea property="options" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options" rows="3">'+esc_html(field.options)+"</textarea><br />";form+="Here is a quick example:<br />";form+="<small>You can also specify a <em>default</em> option:</small><br />";form+="<code>US|United States|default</code><br />";form+="<code>CA|Canada</code><br />";form+="<code>VI|Virgin Islands (U.S.)</code>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+'><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected">Expected Format: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+((field.type.match(/^(text|textarea)$/))?"":' style="display:none;"')+">";form+='<td colspan="2">';form+='<select property="expected" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected">';form+='<option value=""'+((field.expected==="")?' selected="selected"':"")+'">Anything Goes</option>';form+='<option disabled="disabled"></option>';form+='<optgroup label="Specific Input Types">';form+='<option value="numeric-wp-commas"'+((field.expected==="numeric-wp-commas")?' selected="selected"':"")+'">Numeric ( with or without decimals, commas allowed )</option>';form+='<option value="numeric"'+((field.expected==="numeric")?' selected="selected"':"")+'">Numeric ( with or without decimals, no commas )</option>';form+='<option value="integer"'+((field.expected==="integer")?' selected="selected"':"")+'">Integer ( whole number, without any decimals )</option>';form+='<option value="integer-gt-0"'+((field.expected==="integer-gt-0")?' selected="selected"':"")+'">Integer > 0 ( whole number, no decimals, greater than 0 )</option>';form+='<option value="float"'+((field.expected==="float")?' selected="selected"':"")+'">Float ( floating point number, decimals required )</option>';form+='<option value="float-gt-0"'+((field.expected==="float-gt-0")?' selected="selected"':"")+'">Float > 0 ( floating point number, decimals required, greater than 0 )</option>';form+='<option value="date"'+((field.expected==="date")?' selected="selected"':"")+'">Date ( required date format: dd/mm/yyyy )</option>';form+='<option value="email"'+((field.expected==="email")?' selected="selected"':"")+'">Email ( require valid email )</option>';form+='<option value="url"'+((field.expected==="url")?' selected="selected"':"")+'">Full URL ( starting with http or https )</option>';form+='<option value="domain"'+((field.expected==="domain")?' selected="selected"':"")+'">Domain Name ( domain name only, without http )</option>';form+='<option value="phone"'+((field.expected==="phone")?' selected="selected"':"")+'">Phone # ( 10 digits w/possible hyphens,spaces,brackets )</option>';form+='<option value="uszip"'+((field.expected==="uszip")?' selected="selected"':"")+'">US Zipcode ( 5-9 digits w/possible hyphen )</option>';form+='<option value="cazip"'+((field.expected==="cazip")?' selected="selected"':"")+'">Canadian Zipcode ( 6 alpha-numerics w/possible space )</option>';form+='<option value="uczip"'+((field.expected==="uczip")?' selected="selected"':"")+'">US/Canadian Zipcode ( either a US or Canadian zipcode )</option>';form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Any Character Combination">';for(i=1;i<=25;i++){form+='<option value="any-'+i+'"'+((field.expected==="any-"+i)?' selected="selected"':"")+'">Any Character Combination ( '+i+" character minimum )</option>";form+='<option value="any-'+i+'-e"'+((field.expected==="any-"+i+"-e")?' selected="selected"':"")+'">Any Character Combination ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics, Spaces & Punctuation Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-spaces-punctuation-'+i+'"'+((field.expected==="alphanumerics-spaces-punctuation-"+i)?' selected="selected"':"")+'">Alphanumerics, Spaces & Punctuation ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-spaces-punctuation-'+i+'-e"'+((field.expected==="alphanumerics-spaces-punctuation-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics, Spaces & Punctuation ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics & Spaces Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-spaces-'+i+'"'+((field.expected==="alphanumerics-spaces-"+i)?' selected="selected"':"")+'">Alphanumerics & Spaces ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-spaces-'+i+'-e"'+((field.expected==="alphanumerics-spaces-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics & Spaces ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics & Punctuation Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-punctuation-'+i+'"'+((field.expected==="alphanumerics-punctuation-"+i)?' selected="selected"':"")+'">Alphanumerics & Punctuation ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-punctuation-'+i+'-e"'+((field.expected==="alphanumerics-punctuation-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics & Punctuation ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphanumerics Only">';for(i=1;i<=25;i++){form+='<option value="alphanumerics-'+i+'"'+((field.expected==="alphanumerics-"+i)?' selected="selected"':"")+'">Alphanumerics ( '+i+" character minimum )</option>";form+='<option value="alphanumerics-'+i+'-e"'+((field.expected==="alphanumerics-"+i+"-e")?' selected="selected"':"")+'">Alphanumerics ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Alphabetics Only">';for(i=1;i<=25;i++){form+='<option value="alphabetics-'+i+'"'+((field.expected==="alphabetics-"+i)?' selected="selected"':"")+'">Alphabetics ( '+i+" character minimum )</option>";form+='<option value="alphabetics-'+i+'-e"'+((field.expected==="alphabetics-"+i+"-e")?' selected="selected"':"")+'">Alphabetics ( exactly '+i+" character"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+='<option disabled="disabled"></option>';form+='<optgroup label="Numeric Digits Only">';for(i=1;i<=25;i++){form+='<option value="numerics-'+i+'"'+((field.expected==="numerics-"+i)?' selected="selected"':"")+'">Numeric Digits ( '+i+" digit minimum )</option>";form+='<option value="numerics-'+i+'-e"'+((field.expected==="numerics-"+i+"-e")?' selected="selected"':"")+'">Numeric Digits ( exactly '+i+" digit"+((i>1)?"s":"")+" )</option>"}form+="</optgroup>";form+="</select><br />";form+="<small>Only Users/Members will be required to meet this criteria.</small><br />";form+="<small>* Administrators are exempt from this.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">Applicable Membership Levels: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">';form+='<td colspan="2">';form+='<input type="text" property="levels" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels" value="'+esc_attr(field.levels)+'" /><br />';form+="<small>Please use comma-delimited Level #'s: <code>0,1,2,3,4</code> or type: <code>all</code>.</small><br />";form+="<small>This allows you to enable this field - only at specific Membership Levels.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">Allow Profile Edits: *</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<td colspan="2">';form+='<select property="editable" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">';form+='<option value="yes"'+((field.editable==="yes")?' selected="selected"':"")+'">Yes ( editable )</option>';form+='<option value="no"'+((field.editable==="no")?' selected="selected"':"")+'">No ( uneditable after registration )</option>';form+='<option value="no-invisible"'+((field.editable==="no-invisible")?' selected="selected"':"")+'">No ( uneditable & totally invisible after registration )</option>';form+='<option value="yes-invisible"'+((field.editable==="yes-invisible")?' selected="selected"':"")+'">Yes ( editable after registration / invisible during registration )</option>';form+="</select><br />";form+="<small>If <code>No</code>, this field will be un-editable after registration.</small><br />";form+="<small>* Administrators are exempt from this.</small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">CSS Classes: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">';form+='<td colspan="2">';form+='<input type="text" property="classes" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes" value="'+esc_attr(field.classes)+'" /><br />';form+="<small>Example: <code>my-style-1 my-style-2</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">CSS Styles: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">';form+='<td colspan="2">';form+='<input type="text" property="styles" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles" value="'+esc_attr(field.styles)+'" /><br />';form+="<small>Example: <code>color:#000000; background:#FFFFFF;</code></small>";form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">';form+='<td colspan="2">';form+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">Other Attributes: ( optional )</label>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">';form+='<td colspan="2">';form+='<input type="text" property="attrs" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs" value="'+esc_attr(field.attrs)+'" /><br />';form+='<small>Example: <code>onkeyup="" onblur=""</code></small>';form+="</td>";form+="</tr>";form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-buttons"><td colspan="2"> </td></tr>';form+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-buttons">';form+='<td align="left">';form+='<input type="button" value="Cancel" onclick="ws_plugin__s2member_customRegFieldCancel();" />';form+="</td>";form+='<td align="right">';form+='<input type="button" value="'+((editing)?"Update This Field":"Create Registration Field")+'" onclick="'+((editing)?"ws_plugin__s2member_customRegFieldUpdate("+index+");":"ws_plugin__s2member_customRegFieldCreate();")+'" />';form+="</td>";form+="</tr>";form+="</tbody>";form+="</table>";form+="<div>";$("body").append(form);tb_show(((editing)?"Editing Registration/Profile Field":"New Custom Registration/Profile Field"),"#TB_inline?inlineId=ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form");$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form").show()}$tools.html(html)};var buildTable=function(){var l=fields.length,i=0,html="",eo="o";html+="<tbody>";html+="<tr>";html+="<th>Order</th>";html+="<th>Field Type</th>";html+="<th>Unique ID</th>";html+="<th>Required</th>";html+="<th>Levels</th>";html+="<th>- Tools -</th>";html+="</tr>";if(fields.length>0){for(i=0;i<fields.length;i++){html+='<tr class="'+esc_attr((eo=(eo==="o")?"e":"o"))+((fields[i].section==="yes")?" s":"")+" ws-plugin--s2member-custom-reg-field-configuration-table-row-"+i+'">';html+='<td nowrap="nowrap"><a class="ws-plugin--s2member-custom-reg-field-configuration-move-up" href="#" onclick="ws_plugin__s2member_customRegFieldMoveUp('+i+'); return false;"></a><a class="ws-plugin--s2member-custom-reg-field-configuration-move-down" href="#" onclick="ws_plugin__s2member_customRegFieldMoveDown('+i+'); return false;"></a></td>';html+='<td nowrap="nowrap">'+esc_html(fieldTypeDesc(fields[i].type))+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].id)+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].required)+"</td>";html+='<td nowrap="nowrap">'+esc_html(fields[i].levels)+"</td>";html+='<td nowrap="nowrap"><a class="ws-plugin--s2member-custom-reg-field-configuration-edit" href="#" onclick="ws_plugin__s2member_customRegFieldEdit('+i+'); return false;"></a><a class="ws-plugin--s2member-custom-reg-field-configuration-delete" href="#" onclick="ws_plugin__s2member_customRegFieldDelete('+i+'); return false;"></a></td>';html+="</tr>"}}else{html+="<tr>";html+='<td colspan="6">No Custom Fields are configured.</td>';html+="</tr>"}html+="</tbody>";$table.html(html)};buildTools(),buildTable()})()}}if(location.href.match(/page\=ws-plugin--s2member-res-ops/)){$("input#ws-plugin--s2member-brute-force-restrictions-reset-button").click(function(){var $this=$(this);$this.val("one moment please ...");$.post(ajaxurl,{action:"ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax",ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'},function(response){alert("s2Member's Brute Force Restriction Logs have all been reset."),$this.val("Reset Brute Force Logs")});return false});$("input#ws-plugin--s2member-ip-restrictions-reset-button").click(function(){var $this=$(this);$this.val("one moment please ...");$.post(ajaxurl,{action:"ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax",ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'},function(response){alert("s2Member's IP Restriction Logs have all been reset."),$this.val("Reset IP Restriction Logs")});return false});$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query[]"]').change(function(){var thisChange=$(this).val();$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query[]"]').each(function(){var $this=$(this),val=$this.val(),checkboxes='input[type="checkbox"]';if(val==="all"&&this.checked){$this.nextAll(checkboxes).attr({checked:"checked",disabled:"disabled"})}else{if(val==="all"&&!this.checked){$this.nextAll(checkboxes).removeAttr("disabled");(thisChange==="all")?$this.nextAll(checkboxes).removeAttr("checked"):null}}})}).last().trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-down-ops/)){var updateCloudFrontPrivateKey=function(){var $hiddenPrivateKey=$("input#ws-plugin--s2member-amazon-cf-files-private-key");var $visiblePrivateKeyEntry=$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry");var hiddenPrivateKeyValue=$.trim($hiddenPrivateKey.val()),visiblePrivateKeyEntryValue=$.trim($visiblePrivateKeyEntry.val());if((hiddenPrivateKeyValue&&!visiblePrivateKeyEntryValue)||visiblePrivateKeyEntryValue.match(/[^\r\n\u25CF]/)){$hiddenPrivateKey.val(visiblePrivateKeyEntryValue),$visiblePrivateKeyEntry.val(visiblePrivateKeyEntryValue.replace(/[^\r\n]/g,String.fromCharCode(9679)))}};$("form#ws-plugin--s2member-options-form").submit(updateCloudFrontPrivateKey);$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry").change(updateCloudFrontPrivateKey).trigger("change");var updateCloudFrontDistroCfgs=function(){var $hiddenPrivateKey=$("input#ws-plugin--s2member-amazon-cf-files-private-key");var $visiblePrivateKeyId=$("input#ws-plugin--s2member-amazon-cf-files-private-key-id");var $autoConfigDistros=$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros");var $autoConfigDistrosStatus=$("input#ws-plugin--s2member-amazon-cf-files-distros-auto-config-status");var autoConfigDistrosStatusValue=$.trim($autoConfigDistrosStatus.val());var hiddenPrivateKeyValue=$.trim($hiddenPrivateKey.val()),visiblePrivateKeyIdValue=$.trim($visiblePrivateKeyId.val());var hiddenPrivateKeyPrevConfigValue=$.trim($hiddenPrivateKey.attr("data-s-prev-config-value")),visiblePrivateKeyIdPrevConfigValue=$.trim($visiblePrivateKeyId.attr("data-s-prev-config-value"));if(autoConfigDistrosStatusValue==="configured"&&((visiblePrivateKeyIdPrevConfigValue&&visiblePrivateKeyIdValue!==visiblePrivateKeyIdPrevConfigValue)||(hiddenPrivateKeyPrevConfigValue&&hiddenPrivateKeyValue!==hiddenPrivateKeyPrevConfigValue))){alert("s2Member will need to delete and re-configure your Amazon® CloudFront distributions if you change this. When you're done editing, click (Save All Changes) below.");$autoConfigDistros.attr("checked","checked")}else{if(autoConfigDistrosStatusValue!=="configured"&&visiblePrivateKeyIdValue&&hiddenPrivateKeyValue){alert("s2Member will need to auto-configure your Amazon® CloudFront distributions for you. When you're done editing, click (Save All Changes) below.");$autoConfigDistros.attr("checked","checked")}}};$("input#ws-plugin--s2member-amazon-cf-files-private-key-id").change(updateCloudFrontDistroCfgs);$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry").change(updateCloudFrontDistroCfgs);$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros-w-cnames").change(function(){var $this=$(this),thisChecked=(this.checked)?true:false;var $autoConfigDistros=$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros");var $autoConfigDistroCnames=$("div#ws-plugin--s2member-amazon-cf-files-auto-configure-distro-cnames");(thisChecked)?$autoConfigDistroCnames.show():$autoConfigDistroCnames.hide();(thisChecked)?$autoConfigDistros.attr("checked","checked"):null}).trigger("change")}if(location.href.match(/page\=ws-plugin--s2member-paypal-ops/)){$("select#ws-plugin--s2member-auto-eot-system-enabled").change(function(){var $this=$(this),val=$this.val();var $viaCron=$("p#ws-plugin--s2member-auto-eot-system-enabled-via-cron");if(val==2){$viaCron.show()}else{$viaCron.hide()}})}if(location.href.match(/page\=ws-plugin--s2member-paypal-buttons/)){$("div.ws-menu-page select[id]").filter(function(){return this.id.match(/^ws-plugin--s2member-(level[1-9][0-9]*|modification)-term$/)}).change(function(){var button=this.id.replace(/^ws-plugin--s2member-(.+?)-term$/g,"$1");var trialDisabled=($(this).val().split("-")[2].replace(/[^0-1BN]/g,"")==="BN")?1:0;$("p#ws-plugin--s2member-"+button+"-trial-line").css("display",(trialDisabled?"none":""));$("span#ws-plugin--s2member-"+button+"-trial-then").css("display",(trialDisabled?"none":""));$("span#ws-plugin--s2member-"+button+"-20p-rule").css("display",(trialDisabled?"none":""));(trialDisabled)?$("input#ws-plugin--s2member-"+button+"-trial-period").val(0):null;(trialDisabled)?$("input#ws-plugin--s2member-"+button+"-trial-amount").val("0.00"):null});$("div.ws-menu-page input[id]").filter(function(){return this.id.match(/^ws-plugin--s2member-(level[1-9][0-9]*|modification|ccap)-ccaps$/)}).keyup(function(){var value=this.value.replace(/^(-all|-al|-a|-)[;,]*/gi,""),_all=(this.value.match(/^(-all|-al|-a|-)[;,]*/i))?"-all,":"";if(value.match(/[^a-z_0-9,]/)){this.value=_all+$.trim($.trim(value).replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase())}});ws_plugin__s2member_paypalButtonGenerate=function(button){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="",labels={};eval("<?php echo c_ws_plugin__s2member_utils_strings::esc_dq($labels); ?>");var shortCode=$("input#ws-plugin--s2member-"+button+"-shortcode");var code=$("textarea#ws-plugin--s2member-"+button+"-button");var modLevel=$("select#ws-plugin--s2member-modification-level");var level=(button==="modification")?modLevel.val().split(":",2)[1]:button.replace(/^level/,"");var label=labels["level"+level].replace(/"/g,"");var desc=$.trim($("input#ws-plugin--s2member-"+button+"-desc").val().replace(/"/g,""));var trialAmount=$("input#ws-plugin--s2member-"+button+"-trial-amount").val().replace(/[^0-9\.]/g,"");var trialPeriod=$("input#ws-plugin--s2member-"+button+"-trial-period").val().replace(/[^0-9]/g,"");var trialTerm=$("select#ws-plugin--s2member-"+button+"-trial-term").val().replace(/[^A-Z]/g,"");var regAmount=$("input#ws-plugin--s2member-"+button+"-amount").val().replace(/[^0-9\.]/g,"");var regPeriod=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[0].replace(/[^0-9]/g,"");var regTerm=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[1].replace(/[^A-Z]/g,"");var regRecur=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[2].replace(/[^0-1BN]/g,"");var regRecurTimes="",regRecurRetry="1";var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-"+button+"-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-"+button+"-currency").val().replace(/[^A-Z]/g,"");var cCaps=$.trim($.trim($("input#ws-plugin--s2member-"+button+"-ccaps").val()).replace(/^(-all|-al|-a|-)[;,]*/gi,"").replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());cCaps=($.trim($("input#ws-plugin--s2member-"+button+"-ccaps").val()).match(/^(-all|-al|-a|-)[;,]*/i))?((cCaps)?"-all,":"-all")+cCaps.toLowerCase():cCaps.toLowerCase();trialPeriod=(regRecur==="BN")?"0":trialPeriod;trialAmount=(!trialAmount||isNaN(trialAmount)||trialAmount<0.01||trialPeriod<=0)?"0":trialAmount;var levelCcapsPer=(regRecur==="BN"&®Term!=="L")?level+":"+cCaps+":"+regPeriod+" "+regTerm:level+":"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(trialAmount!=="0"&&(isNaN(trialAmount)||trialAmount<0)){alert("— Oops, a slight problem: —\n\nWhen provided, Trial Amount must be >= 0.00");return false}else{if(trialAmount!=="0"&&trialAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Trial Amount is: 10000.00");return false}else{if(trialTerm==="D"&&trialPeriod>7){alert("— Oops, a slight problem: —\n\nMaximum Trial Days is: 7.\nIf you want to offer more than 7 days, please choose Weeks or Months from the drop-down.");return false}else{if(trialTerm==="W"&&trialPeriod>52){alert("— Oops, a slight problem: —\n\nMaximum Trial Weeks is: 52.\nIf you want to offer more than 52 weeks, please choose Months from the drop-down.");return false}else{if(trialTerm==="M"&&trialPeriod>12){alert("— Oops, a slight problem: —\n\nMaximum Trial Months is: 12.\nIf you want to offer more than 12 months, please choose Years from the drop-down.");return false}else{if(trialTerm==="Y"&&trialPeriod>1){alert("— Oops, a slight problem: —\n\nMax Trial Period Years is: 1.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}}}}}}code.html(code.val().replace(/ \<\!--(\<input type\="hidden" name\="(amount|src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\>)--\>/g," $1"));(parseInt(trialPeriod)<=0)?code.html(code.val().replace(/ (\<input type\="hidden" name\="(a1|p1|t1)" value\="(.*?)" \/\>)/g," <!--$1-->")):null;(regRecur==="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g," $1_xclick$3")):null;(regRecur==="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="(src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\>)/g," <!--$1-->")):null;(regRecur!=="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g," $1_xclick-subscriptions$3")):null;(regRecur!=="BN")?code.html(code.val().replace(/ (\<input type\="hidden" name\="amount" value\="(.*?)" \/\>)/g," <!--$1-->")):null;shortCodeTemplateAttrs+=(button==="modification")?'modify="1" ':"";shortCodeTemplateAttrs+='level="'+esc_attr(level)+'" ccaps="'+esc_attr(cCaps)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'" custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"';shortCodeTemplateAttrs+=' ta="'+esc_attr(trialAmount)+'" tp="'+esc_attr(trialPeriod)+'" tt="'+esc_attr(trialTerm)+'" ra="'+esc_attr(regAmount)+'" rp="'+esc_attr(regPeriod)+'" rt="'+esc_attr(regTerm)+'" rr="'+esc_attr(regRecur)+'" rrt="'+esc_attr(regRecurTimes)+'" rra="'+esc_attr(regRecurRetry)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(levelCcapsPer)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="modify" value\="(.*?)"/,' name="modify" value="'+((button==="modification")?"1":"0")+'"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));code.html(code.val().replace(/ name\="src" value\="(.*?)"/,' name="src" value="'+esc_attr(regRecur)+'"'));code.html(code.val().replace(/ name\="srt" value\="(.*?)"/,' name="srt" value="'+esc_attr(regRecurTimes)+'"'));code.html(code.val().replace(/ name\="sra" value\="(.*?)"/,' name="sra" value="'+esc_attr(regRecurRetry)+'"'));code.html(code.val().replace(/ name\="a1" value\="(.*?)"/,' name="a1" value="'+esc_attr(trialAmount)+'"'));code.html(code.val().replace(/ name\="p1" value\="(.*?)"/,' name="p1" value="'+esc_attr(trialPeriod)+'"'));code.html(code.val().replace(/ name\="t1" value\="(.*?)"/,' name="t1" value="'+esc_attr(trialTerm)+'"'));code.html(code.val().replace(/ name\="a3" value\="(.*?)"/,' name="a3" value="'+esc_attr(regAmount)+'"'));code.html(code.val().replace(/ name\="p3" value\="(.*?)"/,' name="p3" value="'+esc_attr(regPeriod)+'"'));code.html(code.val().replace(/ name\="t3" value\="(.*?)"/,' name="t3" value="'+esc_attr(regTerm)+'"'));$("div#ws-plugin--s2member-"+button+"-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));(button==="modification")?alert("Your Modification Button has been generated.\nPlease copy/paste the Shortcode into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Modification Buttons should be displayed to existing Users/Members, and they should be logged-in, BEFORE clicking this Button."):alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Membership Options Page.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalCcapButtonGenerate=function(){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="";var shortCode=$("input#ws-plugin--s2member-ccap-shortcode");var code=$("textarea#ws-plugin--s2member-ccap-button");var desc=$.trim($("input#ws-plugin--s2member-ccap-desc").val().replace(/"/g,""));var regAmount=$("input#ws-plugin--s2member-ccap-amount").val().replace(/[^0-9\.]/g,"");var regPeriod=$("select#ws-plugin--s2member-ccap-term").val().split("-")[0].replace(/[^0-9]/g,"");var regTerm=$("select#ws-plugin--s2member-ccap-term").val().split("-")[1].replace(/[^A-Z]/g,"");var regRecur=$("select#ws-plugin--s2member-ccap-term").val().split("-")[2].replace(/[^0-1BN]/g,"");var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-ccap-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-ccap-currency").val().replace(/[^A-Z]/g,"");var cCaps=$.trim($.trim($("input#ws-plugin--s2member-ccap-ccaps").val()).replace(/^(-all|-al|-a|-)[;,]*/gi,"").replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());cCaps=($.trim($("input#ws-plugin--s2member-ccap-ccaps").val()).match(/^(-all|-al|-a|-)[;,]*/i))?((cCaps)?"-all,":"-all")+cCaps.toLowerCase():cCaps.toLowerCase();var levelCcapsPer=(regRecur==="BN"&®Term!=="L")?"*:"+cCaps+":"+regPeriod+" "+regTerm:"*:"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(!cCaps||cCaps==="-all"){alert("— Oops, a slight problem: —\n\nPlease provide at least one Custom Capability.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}shortCodeTemplateAttrs+='level="*" ccaps="'+esc_attr(cCaps)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'"';shortCodeTemplateAttrs+=' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="'+esc_attr(regAmount)+'" rp="'+esc_attr(regPeriod)+'" rt="'+esc_attr(regTerm)+'" rr="'+esc_attr(regRecur)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(levelCcapsPer)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));$("div#ws-plugin--s2member-ccap-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));alert("Your Button has been generated.\nPlease copy/paste the Shortcode into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Independent Custom Capability Buttons should ONLY be displayed to existing Users/Members, and they MUST be logged-in, BEFORE clicking this Button.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalSpButtonGenerate=function(){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="";var shortCode=$("input#ws-plugin--s2member-sp-shortcode");var code=$("textarea#ws-plugin--s2member-sp-button");var leading=$("select#ws-plugin--s2member-sp-leading-id").val().replace(/[^0-9]/g,"");var additionals=$("select#ws-plugin--s2member-sp-additional-ids").val()||[];var hours=$("select#ws-plugin--s2member-sp-hours").val().replace(/[^0-9]/g,"");var regAmount=$("input#ws-plugin--s2member-sp-amount").val().replace(/[^0-9\.]/g,"");var desc=$.trim($("input#ws-plugin--s2member-sp-desc").val().replace(/"/g,""));var localeCode="",digital="0",noShipping="1";var pageStyle=$.trim($("input#ws-plugin--s2member-sp-page-style").val().replace(/"/g,""));var currencyCode=$("select#ws-plugin--s2member-sp-currency").val().replace(/[^A-Z]/g,"");if(!leading){alert("— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it's because you've not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.");return false}else{if(!regAmount||isNaN(regAmount)||regAmount<0.01){alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01");return false}else{if(regAmount>10000){alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00");return false}else{if(!desc){alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button.");return false}}}}for(var i=0,ids=leading;i<additionals.length;i++){if(additionals[i]&&additionals[i]!==leading){ids+=","+additionals[i]}}var spIdsHours="sp:"+ids+":"+hours;shortCodeTemplateAttrs+='sp="1" ids="'+esc_attr(ids)+'" exp="'+esc_attr(hours)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'"';shortCodeTemplateAttrs+=' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="'+esc_attr(regAmount)+'"';shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs));code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"'));code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"'));code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"'));code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(spIdsHours)+'"'));code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"'));code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"'));code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"'));code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"'));$("div#ws-plugin--s2member-sp-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round(new Date().getTime())+'~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,""));alert("Your Button has been generated.\nPlease copy/paste the Shortcode into your WordPress® Editor.");shortCode.each(function(){this.focus(),this.select()});return false};ws_plugin__s2member_paypalRegLinkGenerate=function(){var level=$("select#ws-plugin--s2member-reg-link-level").val().replace(/[^0-9]/g,"");var subscrID=$.trim($("input#ws-plugin--s2member-reg-link-subscr-id").val());var custom=$.trim($("input#ws-plugin--s2member-reg-link-custom").val());var cCaps=$.trim($.trim($("input#ws-plugin--s2member-reg-link-ccaps").val()).replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());var fixedTerm=$.trim($("input#ws-plugin--s2member-reg-link-fixed-term").val().replace(/[^A-Z 0-9]/gi,"").toUpperCase());var $link=$("p#ws-plugin--s2member-reg-link"),$loading=$("img#ws-plugin--s2member-reg-link-loading");var levelCcapsPer=(fixedTerm&&!fixedTerm.match(/L$/))?level+":"+cCaps+":"+fixedTerm:level+":"+cCaps;levelCcapsPer=levelCcapsPer.replace(/\:+$/g,"");if(!subscrID){alert("— Oops, a slight problem: —\n\nPaid Subscr. ID is a required value.");return false}else{if(!custom||custom.indexOf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq ($_SERVER["HTTP_HOST"]); ?>')!==0){alert("— Oops, a slight problem: —\n\nThe Custom Value MUST start with your domain name.");return false}else{if(fixedTerm&&!fixedTerm.match(/^[1-9]+ (D|W|M|Y|L)$/)){alert("— Oops, a slight problem: —\n\nThe Fixed Term Length is not formatted properly.");return false}}}$link.hide(),$loading.show(),$.post(ajaxurl,{action:"ws_plugin__s2member_reg_access_link_via_ajax",ws_plugin__s2member_reg_access_link_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-reg-access-link-via-ajax")); ?>',s2member_reg_access_link_subscr_gateway:"paypal",s2member_reg_access_link_subscr_id:subscrID,s2member_reg_access_link_custom:custom,s2member_reg_access_link_item_number:levelCcapsPer},function(response){$link.show().html('<a href="'+esc_attr(response)+'" target="_blank" rel="external">'+esc_html(response)+"</a>"),$loading.hide()});return false};ws_plugin__s2member_paypalSpLinkGenerate=function(){var leading=$("select#ws-plugin--s2member-sp-link-leading-id").val().replace(/[^0-9]/g,"");var additionals=$("select#ws-plugin--s2member-sp-link-additional-ids").val()||[];var hours=$("select#ws-plugin--s2member-sp-link-hours").val().replace(/[^0-9]/g,"");var $link=$("p#ws-plugin--s2member-sp-link"),$loading=$("img#ws-plugin--s2member-sp-link-loading");if(!leading){alert("— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it's because you've not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.");return false}for(var i=0,ids=leading;i<additionals.length;i++){if(additionals[i]&&additionals[i]!==leading){ids+=","+additionals[i]}}$link.hide(),$loading.show(),$.post(ajaxurl,{action:"ws_plugin__s2member_sp_access_link_via_ajax",ws_plugin__s2member_sp_access_link_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-sp-access-link-via-ajax")); ?>',s2member_sp_access_link_ids:ids,s2member_sp_access_link_hours:hours},function(response){$link.show().html('<a href="'+esc_attr(response)+'" target="_blank" rel="external">'+esc_html(response)+"</a>"),$loading.hide()});return false}}if(location.href.match(/page\=ws-plugin--s2member-els-ops/)){$("select#ws-plugin--s2member-custom-reg-opt-in").change(function(){var $this=$(this),val=$this.val();var $rows=$("tr.ws-plugin--s2member-custom-reg-opt-in-label-row");var $prevImg=$("img.ws-plugin--s2member-custom-reg-opt-in-label-prev-img");if(val<=0){$rows.css("display","none"),$prevImg.attr("src",$prevImg.attr("src").replace(/\/checked\.png$/,"/unchecked.png"))}else{if(val==1){$rows.css("display",""),$prevImg.attr("src",$prevImg.attr("src").replace(/\/unchecked\.png$/,"/checked.png"))}else{if(val==2){$rows.css("display",""),$prevImg.attr("src",$prevImg.attr("src").replace(/\/checked\.png$/,"/unchecked.png"))}}}});$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs[]"]').change(function(){var thisChange=$(this).val(),checkedIndexes=[];$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs[]"]').each(function(){var $this=$(this),val=$this.val(),checkboxes='input[type="checkbox"]';if(val==="removal-deletion"&&this.checked){$this.nextAll(checkboxes).slice(0,2).attr({checked:"checked",disabled:"disabled"})}else{if(val==="removal-deletion"&&!this.checked){$this.nextAll(checkboxes).slice(0,2).removeAttr("disabled");(thisChange==="removal-deletion")?$this.nextAll(checkboxes).slice(0,2).removeAttr("checked"):null}else{if(val==="modification"&&this.checked){$this.nextAll(checkboxes).slice(0,3).attr({checked:"checked",disabled:"disabled"})}else{if(val==="modification"&&!this.checked){(thisChange==="modification")?$this.nextAll(checkboxes).slice(0,3).removeAttr("checked"):null;$this.nextAll(checkboxes).slice(0,3).removeAttr("disabled")}}}}}).each(function(index){(this.checked)?checkedIndexes.push(index):null});$("select#ws-plugin--s2member-custom-reg-auto-opt-out-transitions").removeAttr("disabled");if($.inArray(3,checkedIndexes)===-1&&$.inArray(4,checkedIndexes)===-1&&$.inArray(5,checkedIndexes)===-1&&$.inArray(6,checkedIndexes)===-1){$("select#ws-plugin--s2member-custom-reg-auto-opt-out-transitions").attr("disabled","disabled")}}).last().trigger("change")}});
|
includes/menu-pages/menu-pages-s.js
CHANGED
@@ -13,22 +13,19 @@
|
|
13 |
* @package s2Member\Menu_Pages
|
14 |
* @since 3.0
|
15 |
*/
|
16 |
-
/*
|
17 |
-
These JavaScript routines are all specific to this software.
|
18 |
-
*/
|
19 |
jQuery(document).ready (function($)
|
20 |
{
|
21 |
-
var esc_attr = esc_html =
|
22 |
{
|
23 |
return String(str).replace (/"/g, '"').replace (/\</g, '<').replace (/\>/g, '>');
|
24 |
};
|
25 |
/**/
|
26 |
-
if (location.href.match (/page\=ws-plugin--s2member/))
|
27 |
{
|
28 |
$('input.ws-plugin--s2member-update-roles-button, input.ws-plugin--s2member-reset-roles-button').click (function()
|
29 |
{
|
30 |
-
var $this =
|
31 |
-
$this.val
|
32 |
/**/
|
33 |
var levels = '<?php echo (int)$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; ?>';
|
34 |
var resetUpdate = ($this.hasClass ('ws-plugin--s2member-reset-roles-button')) ? 'Reset' : 'Update';
|
@@ -53,14 +50,14 @@ jQuery(document).ready (function($)
|
|
53 |
{
|
54 |
$('select#ws-plugin--s2member-mms-registration-file').change (function()
|
55 |
{
|
56 |
-
if
|
57 |
{
|
58 |
var gv = $('select#ws-plugin--s2member-mms-registration-grants').val (), l0v = $('input#ws-plugin--s2member-mms-registration-blogs-level0').val ();
|
59 |
$('div#ws-plugin--s2member-mms-registration-support-package-details-wrapper').show (), $('div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login').hide (), $('div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup').show ();
|
60 |
$('div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0')[((gv === 'all') ? 'show' : 'hide')] ();
|
61 |
$('input#ws-plugin--s2member-mms-registration-blogs-level0').val (((gv === 'all') ? ((l0v > 0) ? l0v : '1') : '0'));
|
62 |
}
|
63 |
-
else if ($(this).val () === 'wp-login')
|
64 |
{
|
65 |
var gv = $('select#ws-plugin--s2member-mms-registration-grants').val (), l0v = $('input#ws-plugin--s2member-mms-registration-blogs-level0').val ();
|
66 |
$('div#ws-plugin--s2member-mms-registration-support-package-details-wrapper').hide (), $('div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login').show (), $('div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup').hide ();
|
@@ -68,7 +65,7 @@ jQuery(document).ready (function($)
|
|
68 |
$('input#ws-plugin--s2member-mms-registration-blogs-level0').val ('0');
|
69 |
}
|
70 |
/**/
|
71 |
-
}).trigger
|
72 |
/**/
|
73 |
$('select#ws-plugin--s2member-mms-registration-grants').change (function()
|
74 |
{
|
@@ -78,9 +75,9 @@ jQuery(document).ready (function($)
|
|
78 |
/**/
|
79 |
if (location.href.match (/page\=ws-plugin--s2member-gen-ops/))
|
80 |
{
|
81 |
-
ws_plugin__s2member_generateSecurityKey =
|
82 |
{
|
83 |
-
var mt_rand =
|
84 |
{
|
85 |
min = (arguments.length < 1) ? 0 : min;
|
86 |
max = (arguments.length < 2) ? 2147483647 : max;
|
@@ -96,7 +93,7 @@ jQuery(document).ready (function($)
|
|
96 |
return false;
|
97 |
};
|
98 |
/**/
|
99 |
-
ws_plugin__s2member_enableSecurityKey =
|
100 |
{
|
101 |
if (confirm('Edit Key? Are you sure?\nThis could break your installation!\n\n*Note* If you\'ve been testing s2Member, feel free to change this Key before you go live. Just don\'t go live, and then change it. You\'ll have unhappy Customers. Data corruption WILL occur! For your safety, s2Member keeps a history of the last 10 Keys that you\'ve used. If you get yourself into a real situation, s2Member will let you revert back to a previous Key.'))
|
102 |
$('input#ws-plugin--s2member-sec-encryption-key').removeAttr ('disabled');
|
@@ -104,7 +101,7 @@ jQuery(document).ready (function($)
|
|
104 |
return false;
|
105 |
};
|
106 |
/**/
|
107 |
-
ws_plugin__s2member_securityKeyHistory =
|
108 |
{
|
109 |
$('div#ws-plugin--s2member-sec-encryption-key-history').toggle ();
|
110 |
/**/
|
@@ -123,41 +120,41 @@ jQuery(document).ready (function($)
|
|
123 |
else /* Else we allow the emails to be customized. */
|
124 |
$this.removeAttr ('disabled'), $(':input', $newUserEmails).removeAttr ('disabled'), $newUserEmails.css ('opacity', '');
|
125 |
/**/
|
126 |
-
}).trigger
|
127 |
/**/
|
128 |
if ($('input#ws-plugin--s2member-custom-reg-fields').length && $('div#ws-plugin--s2member-custom-reg-field-configuration').length)
|
129 |
{
|
130 |
-
(
|
131 |
{
|
132 |
var i, fieldDefaults, tools, table, $tools, $table;
|
133 |
var $fields = $('input#ws-plugin--s2member-custom-reg-fields');
|
134 |
var $configuration = $('div#ws-plugin--s2member-custom-reg-field-configuration');
|
135 |
var fields = ($fields.val ()) ? $.JSON.parse ($fields.val ()) : [];
|
136 |
/**/
|
137 |
-
fields = (fields instanceof Array) ? fields : [];
|
138 |
/**/
|
139 |
fieldDefaults = {section: 'no', sectitle: '', id: '', label: '', type: 'text', deflt: '', options: '', expected: '', required: 'yes', levels: 'all', editable: 'yes', classes: '', styles: '', attrs: ''};
|
140 |
/**/
|
141 |
-
for (i = 0; i < fields.length; i++) fields[i] =
|
142 |
/**/
|
143 |
tools = '<div id="ws-plugin--s2member-custom-reg-field-configuration-tools"></div>', table = '<table id="ws-plugin--s2member-custom-reg-field-configuration-table"></table>';
|
144 |
/**/
|
145 |
-
$configuration.html
|
146 |
/**/
|
147 |
$tools = $('div#ws-plugin--s2member-custom-reg-field-configuration-tools'), $table = $('table#ws-plugin--s2member-custom-reg-field-configuration-table');
|
148 |
/**/
|
149 |
ws_plugin__s2member_customRegFieldSectionChange = function(select)
|
150 |
{
|
151 |
-
var section =
|
152 |
/**/
|
153 |
var sectitle_trs = 'tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle';
|
154 |
/**/
|
155 |
(section === 'yes') ? $(sectitle_trs).css ('display', '') : $(sectitle_trs).css ('display', 'none');
|
156 |
};
|
157 |
/**/
|
158 |
-
ws_plugin__s2member_customRegFieldTypeChange =
|
159 |
{
|
160 |
-
var type =
|
161 |
/**/
|
162 |
var deflt_trs = 'tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt', options_trs = 'tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-options', expected_trs = 'tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected';
|
163 |
/**/
|
@@ -168,10 +165,10 @@ jQuery(document).ready (function($)
|
|
168 |
/**/
|
169 |
ws_plugin__s2member_customRegFieldDelete = function(index)
|
170 |
{
|
171 |
-
var newFields =
|
172 |
/**/
|
173 |
for (var i = 0; i < fields.length; i++)
|
174 |
-
if
|
175 |
newFields.push (fields[i]);
|
176 |
/**/
|
177 |
fields = newFields, updateFields (), buildTable ();
|
@@ -205,18 +202,18 @@ jQuery(document).ready (function($)
|
|
205 |
{
|
206 |
var $table = $('table#ws-plugin--s2member-custom-reg-field-configuration-tools-form'), field = {};
|
207 |
/**/
|
208 |
-
$(':input[property]', $table).each (
|
209 |
{
|
210 |
var $this = $(this), property = $this.attr ('property'), val = $.trim ($this.val ());
|
211 |
/**/
|
212 |
field[property] = val;
|
213 |
});
|
214 |
/**/
|
215 |
-
if
|
216 |
{
|
217 |
fields.push (field), updateFields (), buildTools (), buildTable (), scrollReset ();
|
218 |
/**/
|
219 |
-
setTimeout(
|
220 |
{
|
221 |
var row = 'tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-' + (fields.length - 1);
|
222 |
alert('Field created successfully.\n* Remember to "Save All Changes".');
|
@@ -229,18 +226,18 @@ jQuery(document).ready (function($)
|
|
229 |
{
|
230 |
var $table = $('table#ws-plugin--s2member-custom-reg-field-configuration-tools-form'), field = {};
|
231 |
/**/
|
232 |
-
$(':input[property]', $table).each (
|
233 |
{
|
234 |
var $this = $(this), property = $this.attr ('property'), val = $.trim ($this.val ());
|
235 |
/**/
|
236 |
field[property] = val;
|
237 |
});
|
238 |
/**/
|
239 |
-
if ((field = validateField(field, index)))
|
240 |
{
|
241 |
fields[index] = field, updateFields (), buildTools (), buildTable (), scrollReset ();
|
242 |
/**/
|
243 |
-
setTimeout(
|
244 |
{
|
245 |
var row = 'tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-' + index;
|
246 |
alert('Field updated successfully.\n* Remember to "Save All Changes".');
|
@@ -249,19 +246,19 @@ jQuery(document).ready (function($)
|
|
249 |
}
|
250 |
};
|
251 |
/**/
|
252 |
-
ws_plugin__s2member_customRegFieldAdd =
|
253 |
{
|
254 |
-
buildTools
|
255 |
};
|
256 |
/**/
|
257 |
-
ws_plugin__s2member_customRegFieldEdit =
|
258 |
{
|
259 |
-
buildTools(false, index), scrollReset ();
|
260 |
};
|
261 |
/**/
|
262 |
-
ws_plugin__s2member_customRegFieldCancel =
|
263 |
{
|
264 |
-
buildTools (), scrollReset ();
|
265 |
};
|
266 |
/**/
|
267 |
var validateField = function(field, index)
|
@@ -280,7 +277,7 @@ jQuery(document).ready (function($)
|
|
280 |
field.options = (field.type.match (/^(select|selects|checkboxes|radios)$/)) ? field.options : '';
|
281 |
field.expected = (field.type.match (/^(text|textarea)$/)) ? field.expected : '';
|
282 |
/**/
|
283 |
-
if
|
284 |
{
|
285 |
errors.push ('Unique Field ID:\nThis is required. Please try again.');
|
286 |
}
|
@@ -289,7 +286,7 @@ jQuery(document).ready (function($)
|
|
289 |
errors.push ('Unique Field ID:\nThat Field ID already exists. Please try again.');
|
290 |
}
|
291 |
/**/
|
292 |
-
if
|
293 |
{
|
294 |
errors.push ('Field Label/Description:\nThis is required. Please try again.');
|
295 |
}
|
@@ -305,11 +302,11 @@ jQuery(document).ready (function($)
|
|
305 |
if (!(options[i] = $.trim (options[i])).match (/^([^\|]*)(\|)([^\|]*)(\|default)?$/))
|
306 |
{
|
307 |
errors.push ('Option Configuration File:\nInvalid configuration at line #' + (i + 1) + '.');
|
308 |
-
break; /* Break now. There could potentially be lots of lines with errors
|
309 |
}
|
310 |
}
|
311 |
/**/
|
312 |
-
field.options = $.trim (options.join ('\n'));
|
313 |
}
|
314 |
/**/
|
315 |
if (!(field.levels = field.levels.replace (/ /g, '')))
|
@@ -336,7 +333,7 @@ jQuery(document).ready (function($)
|
|
336 |
errors.push ('Other Attributes:\nContains invalid characters. Please try again.\n( do NOT use these characters: < > )');
|
337 |
}
|
338 |
/**/
|
339 |
-
if (errors.length > 0)
|
340 |
{
|
341 |
alert(errors.join ('\n\n'));
|
342 |
return false;
|
@@ -345,14 +342,14 @@ jQuery(document).ready (function($)
|
|
345 |
return field;
|
346 |
};
|
347 |
/**/
|
348 |
-
var updateFields =
|
349 |
{
|
350 |
$fields.val (((fields.length > 0) ? $.JSON.stringify (fields) : ''));
|
351 |
};
|
352 |
/**/
|
353 |
-
var fieldId2Var =
|
354 |
{
|
355 |
-
return( typeof fieldId === 'string') ? $.trim (fieldId).toLowerCase ().replace (/[^a-z0-9]/g, '_') : '';
|
356 |
};
|
357 |
/**/
|
358 |
var fieldTypeDesc = function(type)
|
@@ -362,31 +359,30 @@ jQuery(document).ready (function($)
|
|
362 |
if (typeof types[type] === 'string')
|
363 |
return types[type];
|
364 |
/**/
|
365 |
-
return
|
366 |
};
|
367 |
/**/
|
368 |
-
var fieldIdExists =
|
369 |
{
|
370 |
for (var i = 0; i < fields.length; i++)
|
371 |
if (fields[i].id === fieldId)
|
372 |
return true;
|
373 |
};
|
374 |
/**/
|
375 |
-
var scrollReset =
|
376 |
{
|
377 |
scrollTo(0, $('div.ws-plugin--s2member-custom-reg-fields-section').offset ()['top'] - 100);
|
378 |
};
|
379 |
/**/
|
380 |
-
var buildTools =
|
381 |
{
|
382 |
var i = 0, html = '', form = '', w = 0, h = 0, editing = ( typeof index === 'number' && typeof fields[index] === 'object') ? true : false, displayForm = (adding || editing) ? true : false, field = (editing) ? $.extend (true, {}, fieldDefaults, fields[index]) : fieldDefaults;
|
383 |
/**/
|
384 |
-
html += '<a href="#" onclick="ws_plugin__s2member_customRegFieldAdd(); return false;">Add New Field</a>';
|
385 |
/**/
|
386 |
-
tb_remove (), $('div#ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form').remove ();
|
387 |
/**/
|
388 |
-
if
|
389 |
-
*NOTE* This is NOT an actual <form>, because we're already inside another form tag. */
|
390 |
{
|
391 |
form += '<div id="ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form">';
|
392 |
/**/
|
@@ -401,7 +397,7 @@ jQuery(document).ready (function($)
|
|
401 |
/**/
|
402 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';
|
403 |
form += '<td colspan="2">';
|
404 |
-
form += '<select property="section"
|
405 |
form += '<option value="no"' + ((field.section === 'no') ? ' selected="selected"' : '') + '">No ( this Field flows normally )</option>';
|
406 |
form += '<option value="yes"' + ((field.section === 'yes') ? ' selected="selected"' : '') + '">Yes ( this Field begins a new section )</option>';
|
407 |
form += '</select><br />';
|
@@ -414,7 +410,7 @@ jQuery(document).ready (function($)
|
|
414 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"' + ((field.section === 'yes') ? '' : ' style="display:none;"') + '>';
|
415 |
form += '<td colspan="2">';
|
416 |
form += 'Title for this new section? ( optional )<br />';
|
417 |
-
form += '<input type="text" property="sectitle"
|
418 |
form += '<small>If empty, a simple divider will be used by default.</small>';
|
419 |
form += '</td>';
|
420 |
form += '</tr>';
|
@@ -429,7 +425,7 @@ jQuery(document).ready (function($)
|
|
429 |
/**/
|
430 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';
|
431 |
form += '<td colspan="2">';
|
432 |
-
form += '<select property="type"
|
433 |
form += '<option value="text"' + ((field.type === 'text') ? ' selected="selected"' : '') + '">' + esc_html(fieldTypeDesc('text')) + '</option>';
|
434 |
form += '<option value="textarea"' + ((field.type === 'textarea') ? ' selected="selected"' : '') + '">' + esc_html(fieldTypeDesc('textarea')) + '</option>';
|
435 |
form += '<option value="select"' + ((field.type === 'select') ? ' selected="selected"' : '') + '">' + esc_html(fieldTypeDesc('select')) + '</option>';
|
@@ -453,7 +449,7 @@ jQuery(document).ready (function($)
|
|
453 |
/**/
|
454 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">';
|
455 |
form += '<td colspan="2">';
|
456 |
-
form += '<input type="text" property="label"
|
457 |
form += '<small>Examples: <code>Choose Country</code>, <code>Street Address</code></small>';
|
458 |
form += '</td>';
|
459 |
form += '</tr>';
|
@@ -468,7 +464,7 @@ jQuery(document).ready (function($)
|
|
468 |
/**/
|
469 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">';
|
470 |
form += '<td colspan="2">';
|
471 |
-
form += '<input type="text" property="id"
|
472 |
form += '<small>Examples: <code>country_code</code>, <code>street_address</code></small><br />';
|
473 |
form += '<small>e.g. <code>[s2Get user_field="country_code" /]</code></small>';
|
474 |
form += '</td>';
|
@@ -503,7 +499,7 @@ jQuery(document).ready (function($)
|
|
503 |
/**/
|
504 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"' + ((field.type.match (/^(text|textarea)$/)) ? '' : ' style="display:none;"') + '>';
|
505 |
form += '<td colspan="2">';
|
506 |
-
form += '<textarea property="deflt"
|
507 |
form += '<small>Default value before user input is received.</small>';
|
508 |
form += '</td>';
|
509 |
form += '</tr>';
|
@@ -519,7 +515,7 @@ jQuery(document).ready (function($)
|
|
519 |
/**/
|
520 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"' + ((field.type.match (/^(select|selects|checkboxes|radios)$/)) ? '' : ' style="display:none;"') + '>';
|
521 |
form += '<td colspan="2">';
|
522 |
-
form += '<textarea property="options"
|
523 |
form += 'Here is a quick example:<br />';
|
524 |
form += '<small>You can also specify a <em>default</em> option:</small><br />';
|
525 |
form += '<code>US|United States|default</code><br />';
|
@@ -646,7 +642,7 @@ jQuery(document).ready (function($)
|
|
646 |
/**/
|
647 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">';
|
648 |
form += '<td colspan="2">';
|
649 |
-
form += '<input type="text" property="levels"
|
650 |
form += '<small>Please use comma-delimited Level #\'s: <code>0,1,2,3,4</code> or type: <code>all</code>.</small><br />';
|
651 |
form += '<small>This allows you to enable this field - only at specific Membership Levels.</small>';
|
652 |
form += '</td>';
|
@@ -683,7 +679,7 @@ jQuery(document).ready (function($)
|
|
683 |
/**/
|
684 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">';
|
685 |
form += '<td colspan="2">';
|
686 |
-
form += '<input type="text" property="classes"
|
687 |
form += '<small>Example: <code>my-style-1 my-style-2</code></small>';
|
688 |
form += '</td>';
|
689 |
form += '</tr>';
|
@@ -698,7 +694,7 @@ jQuery(document).ready (function($)
|
|
698 |
/**/
|
699 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">';
|
700 |
form += '<td colspan="2">';
|
701 |
-
form += '<input type="text" property="styles"
|
702 |
form += '<small>Example: <code>color:#000000; background:#FFFFFF;</code></small>';
|
703 |
form += '</td>';
|
704 |
form += '</tr>';
|
@@ -713,7 +709,7 @@ jQuery(document).ready (function($)
|
|
713 |
/**/
|
714 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">';
|
715 |
form += '<td colspan="2">';
|
716 |
-
form += '<input type="text" property="attrs"
|
717 |
form += '<small>Example: <code>onkeyup="" onblur=""</code></small>';
|
718 |
form += '</td>';
|
719 |
form += '</tr>';
|
@@ -744,7 +740,7 @@ jQuery(document).ready (function($)
|
|
744 |
$tools.html (html);
|
745 |
};
|
746 |
/**/
|
747 |
-
var buildTable =
|
748 |
{
|
749 |
var l = fields.length, i = 0, html = '', eo = 'o';
|
750 |
/**/
|
@@ -759,7 +755,7 @@ jQuery(document).ready (function($)
|
|
759 |
html += '<th>- Tools -</th>';
|
760 |
html += '</tr>';
|
761 |
/**/
|
762 |
-
if (fields.length > 0)
|
763 |
{
|
764 |
for (i = 0; i < fields.length; i++)
|
765 |
{
|
@@ -775,7 +771,7 @@ jQuery(document).ready (function($)
|
|
775 |
}
|
776 |
else /* Otherwise, there are no fields configured yet. */
|
777 |
{
|
778 |
-
html +=
|
779 |
html += '<td colspan="6">No Custom Fields are configured.</td>';
|
780 |
html += '</tr>';
|
781 |
}
|
@@ -795,8 +791,8 @@ jQuery(document).ready (function($)
|
|
795 |
{
|
796 |
$('input#ws-plugin--s2member-brute-force-restrictions-reset-button').click (function()
|
797 |
{
|
798 |
-
var $this =
|
799 |
-
$this.val
|
800 |
/**/
|
801 |
$.post (ajaxurl, {action: 'ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax', ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax: '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'}, function(response)
|
802 |
{
|
@@ -808,8 +804,8 @@ jQuery(document).ready (function($)
|
|
808 |
/**/
|
809 |
$('input#ws-plugin--s2member-ip-restrictions-reset-button').click (function()
|
810 |
{
|
811 |
-
var $this =
|
812 |
-
$this.val
|
813 |
/**/
|
814 |
$.post (ajaxurl, {action: 'ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax', ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax: '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'}, function(response)
|
815 |
{
|
@@ -821,13 +817,13 @@ jQuery(document).ready (function($)
|
|
821 |
/**/
|
822 |
$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query\[\]"]').change (function()
|
823 |
{
|
824 |
-
var thisChange =
|
825 |
/**/
|
826 |
$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query\[\]"]').each (function()
|
827 |
{
|
828 |
var $this = $(this), val = $this.val (), checkboxes = 'input[type="checkbox"]';
|
829 |
/**/
|
830 |
-
if
|
831 |
$this.nextAll (checkboxes).attr ({'checked': 'checked', 'disabled': 'disabled'});
|
832 |
/**/
|
833 |
else if (val === 'all' && !this.checked)
|
@@ -842,20 +838,20 @@ jQuery(document).ready (function($)
|
|
842 |
/**/
|
843 |
if (location.href.match (/page\=ws-plugin--s2member-down-ops/))
|
844 |
{
|
845 |
-
var updateCloudFrontPrivateKey =
|
846 |
{
|
847 |
var $hiddenPrivateKey = $('input#ws-plugin--s2member-amazon-cf-files-private-key');
|
848 |
var $visiblePrivateKeyEntry = $('textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry');
|
849 |
var hiddenPrivateKeyValue = $.trim ($hiddenPrivateKey.val ()), visiblePrivateKeyEntryValue = $.trim ($visiblePrivateKeyEntry.val ());
|
850 |
/**/
|
851 |
-
if ((hiddenPrivateKeyValue && !visiblePrivateKeyEntryValue) || visiblePrivateKeyEntryValue.match
|
852 |
$hiddenPrivateKey.val (visiblePrivateKeyEntryValue), $visiblePrivateKeyEntry.val (visiblePrivateKeyEntryValue.replace (/[^\r\n]/g, String.fromCharCode (9679)));
|
853 |
};
|
854 |
/**/
|
855 |
$('form#ws-plugin--s2member-options-form').submit (updateCloudFrontPrivateKey);
|
856 |
$('textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry').change (updateCloudFrontPrivateKey).trigger ('change');
|
857 |
/**/
|
858 |
-
var updateCloudFrontDistroCfgs =
|
859 |
{
|
860 |
var $hiddenPrivateKey = $('input#ws-plugin--s2member-amazon-cf-files-private-key');
|
861 |
var $visiblePrivateKeyId = $('input#ws-plugin--s2member-amazon-cf-files-private-key-id');
|
@@ -870,12 +866,12 @@ jQuery(document).ready (function($)
|
|
870 |
if (autoConfigDistrosStatusValue === 'configured' && ((visiblePrivateKeyIdPrevConfigValue && visiblePrivateKeyIdValue !== visiblePrivateKeyIdPrevConfigValue) || (hiddenPrivateKeyPrevConfigValue && hiddenPrivateKeyValue !== hiddenPrivateKeyPrevConfigValue)))
|
871 |
{
|
872 |
alert('s2Member will need to delete and re-configure your Amazon® CloudFront distributions if you change this. When you\'re done editing, click (Save All Changes) below.');
|
873 |
-
$autoConfigDistros.attr ('checked', 'checked');
|
874 |
}
|
875 |
else if (autoConfigDistrosStatusValue !== 'configured' && visiblePrivateKeyIdValue && hiddenPrivateKeyValue)
|
876 |
{
|
877 |
alert('s2Member will need to auto-configure your Amazon® CloudFront distributions for you. When you\'re done editing, click (Save All Changes) below.');
|
878 |
-
$autoConfigDistros.attr ('checked', 'checked');
|
879 |
}
|
880 |
};
|
881 |
/**/
|
@@ -901,7 +897,7 @@ jQuery(document).ready (function($)
|
|
901 |
var $this = $(this), val = $this.val ();
|
902 |
var $viaCron = $('p#ws-plugin--s2member-auto-eot-system-enabled-via-cron');
|
903 |
/**/
|
904 |
-
if
|
905 |
$viaCron.show ()
|
906 |
else /* Hide instructions. */
|
907 |
$viaCron.hide ();
|
@@ -910,7 +906,7 @@ jQuery(document).ready (function($)
|
|
910 |
/**/
|
911 |
if (location.href.match (/page\=ws-plugin--s2member-paypal-buttons/))
|
912 |
{
|
913 |
-
$('div.ws-menu-page select[id]').filter (
|
914 |
{
|
915 |
return this.id.match (/^ws-plugin--s2member-(level[1-9][0-9]*|modification)-term$/);
|
916 |
}).change (function()
|
@@ -926,17 +922,17 @@ jQuery(document).ready (function($)
|
|
926 |
(trialDisabled) ? $('input#ws-plugin--s2member-' + button + '-trial-amount').val ('0.00') : null;
|
927 |
});
|
928 |
/**/
|
929 |
-
$('div.ws-menu-page input[id]').filter (
|
930 |
{
|
931 |
return this.id.match (/^ws-plugin--s2member-(level[1-9][0-9]*|modification|ccap)-ccaps$/);
|
932 |
}).keyup (function()
|
933 |
{
|
934 |
var value = this.value.replace (/^(-all|-al|-a|-)[;,]*/gi, ''), _all = (this.value.match (/^(-all|-al|-a|-)[;,]*/i)) ? '-all,' : '';
|
935 |
-
if
|
936 |
this.value = _all + $.trim ($.trim (value).replace (/[ \-]/g, '_').replace (/[^a-z_0-9,]/gi, '').toLowerCase ());
|
937 |
});
|
938 |
/**/
|
939 |
-
ws_plugin__s2member_paypalButtonGenerate =
|
940 |
{
|
941 |
var shortCodeTemplate = '[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]', shortCodeTemplateAttrs = '', labels = {};
|
942 |
/**/
|
@@ -947,7 +943,7 @@ jQuery(document).ready (function($)
|
|
947 |
var modLevel = $('select#ws-plugin--s2member-modification-level');
|
948 |
/**/
|
949 |
var level = (button === 'modification') ? modLevel.val ().split (':', 2)[1] : button.replace (/^level/, '');
|
950 |
-
var label = labels['level' + level].replace (/"/g, '');
|
951 |
var desc = $.trim ($('input#ws-plugin--s2member-' + button + '-desc').val ().replace (/"/g, ""));
|
952 |
/**/
|
953 |
var trialAmount = $('input#ws-plugin--s2member-' + button + '-trial-amount').val ().replace (/[^0-9\.]/g, '');
|
@@ -958,47 +954,47 @@ jQuery(document).ready (function($)
|
|
958 |
var regPeriod = $('select#ws-plugin--s2member-' + button + '-term').val ().split ('-')[0].replace (/[^0-9]/g, '');
|
959 |
var regTerm = $('select#ws-plugin--s2member-' + button + '-term').val ().split ('-')[1].replace (/[^A-Z]/g, '');
|
960 |
var regRecur = $('select#ws-plugin--s2member-' + button + '-term').val ().split ('-')[2].replace (/[^0-1BN]/g, '');
|
961 |
-
var regRecurTimes = '', regRecurRetry = '1';
|
962 |
/**/
|
963 |
-
var localeCode = '', digital = '0', noShipping = '1';
|
964 |
var pageStyle = $.trim ($('input#ws-plugin--s2member-' + button + '-page-style').val ().replace (/"/g, ''));
|
965 |
var currencyCode = $('select#ws-plugin--s2member-' + button + '-currency').val ().replace (/[^A-Z]/g, '');
|
966 |
/**/
|
967 |
var cCaps = $.trim ($.trim ($('input#ws-plugin--s2member-' + button + '-ccaps').val ()).replace (/^(-all|-al|-a|-)[;,]*/gi, '').replace (/[ \-]/g, '_').replace (/[^a-z_0-9,]/gi, '').toLowerCase ());
|
968 |
cCaps = ($.trim ($('input#ws-plugin--s2member-' + button + '-ccaps').val ()).match (/^(-all|-al|-a|-)[;,]*/i)) ? ((cCaps) ? '-all,' : '-all') + cCaps.toLowerCase () : cCaps.toLowerCase ();
|
969 |
/**/
|
970 |
-
trialPeriod =
|
971 |
-
trialAmount = (!trialAmount || isNaN(trialAmount) || trialAmount < 0.01 || trialPeriod <= 0) ? '0' : trialAmount;
|
972 |
/**/
|
973 |
var levelCcapsPer = (regRecur === 'BN' && regTerm !== 'L') ? level + ':' + cCaps + ':' + regPeriod + ' ' + regTerm : level + ':' + cCaps;
|
974 |
-
levelCcapsPer =
|
975 |
/**/
|
976 |
if (trialAmount !== '0' && (isNaN(trialAmount) || trialAmount < 0.00))
|
977 |
{
|
978 |
alert('— Oops, a slight problem: —\n\nWhen provided, Trial Amount must be >= 0.00');
|
979 |
return false;
|
980 |
}
|
981 |
-
else if (trialAmount !== '0' && trialAmount > 10000.00)
|
982 |
{
|
983 |
alert('— Oops, a slight problem: —\n\nMaximum Trial Amount is: 10000.00');
|
984 |
return false;
|
985 |
}
|
986 |
-
else if (trialTerm === 'D' &&
|
987 |
{
|
988 |
alert('— Oops, a slight problem: —\n\nMaximum Trial Days is: 7.\nIf you want to offer more than 7 days, please choose Weeks or Months from the drop-down.');
|
989 |
return false;
|
990 |
}
|
991 |
-
else if (trialTerm === 'W' &&
|
992 |
{
|
993 |
alert('— Oops, a slight problem: —\n\nMaximum Trial Weeks is: 52.\nIf you want to offer more than 52 weeks, please choose Months from the drop-down.');
|
994 |
return false;
|
995 |
}
|
996 |
-
else if (trialTerm === 'M' &&
|
997 |
{
|
998 |
alert('— Oops, a slight problem: —\n\nMaximum Trial Months is: 12.\nIf you want to offer more than 12 months, please choose Years from the drop-down.');
|
999 |
return false;
|
1000 |
}
|
1001 |
-
else if (trialTerm === 'Y' &&
|
1002 |
{
|
1003 |
alert('— Oops, a slight problem: —\n\nMax Trial Period Years is: 1.');
|
1004 |
return false;
|
@@ -1008,12 +1004,12 @@ jQuery(document).ready (function($)
|
|
1008 |
alert('— Oops, a slight problem: —\n\nAmount must be >= 0.01');
|
1009 |
return false;
|
1010 |
}
|
1011 |
-
else if (regAmount >
|
1012 |
{
|
1013 |
alert('— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00');
|
1014 |
return false;
|
1015 |
}
|
1016 |
-
else if
|
1017 |
{
|
1018 |
alert('— Oops, a slight problem: —\n\nPlease type a Description for this Button.');
|
1019 |
return false;
|
@@ -1026,7 +1022,7 @@ jQuery(document).ready (function($)
|
|
1026 |
(regRecur !== 'BN') ? code.html (code.val ().replace (/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g, " $1_xclick-subscriptions$3")) : null;
|
1027 |
(regRecur !== 'BN') ? code.html (code.val ().replace (/ (\<input type\="hidden" name\="amount" value\="(.*?)" \/\>)/g, " <!--$1-->")) : null;
|
1028 |
/**/
|
1029 |
-
shortCodeTemplateAttrs += (button === 'modification') ? 'modify="1" ' : '';
|
1030 |
shortCodeTemplateAttrs += 'level="' + esc_attr(level) + '" ccaps="' + esc_attr(cCaps) + '" desc="' + esc_attr(desc) + '" ps="' + esc_attr(pageStyle) + '" lc="' + esc_attr(localeCode) + '" cc="' + esc_attr(currencyCode) + '" dg="' + esc_attr(digital) + '" ns="' + esc_attr(noShipping) + '" custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"';
|
1031 |
shortCodeTemplateAttrs += ' ta="' + esc_attr(trialAmount) + '" tp="' + esc_attr(trialPeriod) + '" tt="' + esc_attr(trialTerm) + '" ra="' + esc_attr(regAmount) + '" rp="' + esc_attr(regPeriod) + '" rt="' + esc_attr(regTerm) + '" rr="' + esc_attr(regRecur) + '" rrt="' + esc_attr(regRecurTimes) + '" rra="' + esc_attr(regRecurRetry) + '"';
|
1032 |
shortCode.val (shortCodeTemplate.replace (/%%attrs%%/, shortCodeTemplateAttrs));
|
@@ -1056,9 +1052,9 @@ jQuery(document).ready (function($)
|
|
1056 |
/**/
|
1057 |
$('div#ws-plugin--s2member-' + button + '-button-prev').html (code.val ().replace (/\<form/, '<form target="_blank"').replace (/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g, Math.round (new Date ().getTime ()) + '~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace (/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g, ''));
|
1058 |
/**/
|
1059 |
-
(button === 'modification') ? alert('Your Modification Button has been generated.\nPlease copy/paste the Shortcode
|
1060 |
/**/
|
1061 |
-
shortCode.each (
|
1062 |
{
|
1063 |
this.focus (), this.select ();
|
1064 |
});
|
@@ -1066,7 +1062,7 @@ jQuery(document).ready (function($)
|
|
1066 |
return false;
|
1067 |
};
|
1068 |
/**/
|
1069 |
-
ws_plugin__s2member_paypalCcapButtonGenerate =
|
1070 |
{
|
1071 |
var shortCodeTemplate = '[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]', shortCodeTemplateAttrs = '';
|
1072 |
/**/
|
@@ -1080,7 +1076,7 @@ jQuery(document).ready (function($)
|
|
1080 |
var regTerm = $('select#ws-plugin--s2member-ccap-term').val ().split ('-')[1].replace (/[^A-Z]/g, '');
|
1081 |
var regRecur = $('select#ws-plugin--s2member-ccap-term').val ().split ('-')[2].replace (/[^0-1BN]/g, '');
|
1082 |
/**/
|
1083 |
-
var localeCode = '', digital = '0', noShipping = '1';
|
1084 |
var pageStyle = $.trim ($('input#ws-plugin--s2member-ccap-page-style').val ().replace (/"/g, ''));
|
1085 |
var currencyCode = $('select#ws-plugin--s2member-ccap-currency').val ().replace (/[^A-Z]/g, '');
|
1086 |
/**/
|
@@ -1088,9 +1084,9 @@ jQuery(document).ready (function($)
|
|
1088 |
cCaps = ($.trim ($('input#ws-plugin--s2member-ccap-ccaps').val ()).match (/^(-all|-al|-a|-)[;,]*/i)) ? ((cCaps) ? '-all,' : '-all') + cCaps.toLowerCase () : cCaps.toLowerCase ();
|
1089 |
/**/
|
1090 |
var levelCcapsPer = (regRecur === 'BN' && regTerm !== 'L') ? '*:' + cCaps + ':' + regPeriod + ' ' + regTerm : '*:' + cCaps;
|
1091 |
-
levelCcapsPer =
|
1092 |
/**/
|
1093 |
-
if
|
1094 |
{
|
1095 |
alert('— Oops, a slight problem: —\n\nPlease provide at least one Custom Capability.');
|
1096 |
return false;
|
@@ -1100,12 +1096,12 @@ jQuery(document).ready (function($)
|
|
1100 |
alert('— Oops, a slight problem: —\n\nAmount must be >= 0.01');
|
1101 |
return false;
|
1102 |
}
|
1103 |
-
else if
|
1104 |
{
|
1105 |
alert('— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00');
|
1106 |
return false;
|
1107 |
}
|
1108 |
-
else if
|
1109 |
{
|
1110 |
alert('— Oops, a slight problem: —\n\nPlease type a Description for this Button.');
|
1111 |
return false;
|
@@ -1127,9 +1123,9 @@ jQuery(document).ready (function($)
|
|
1127 |
/**/
|
1128 |
$('div#ws-plugin--s2member-ccap-button-prev').html (code.val ().replace (/\<form/, '<form target="_blank"').replace (/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g, Math.round (new Date ().getTime ()) + '~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace (/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g, ''));
|
1129 |
/**/
|
1130 |
-
alert('Your Button has been generated.\nPlease copy/paste the Shortcode
|
1131 |
/**/
|
1132 |
-
shortCode.each
|
1133 |
{
|
1134 |
this.focus (), this.select ();
|
1135 |
});
|
@@ -1137,7 +1133,7 @@ jQuery(document).ready (function($)
|
|
1137 |
return false;
|
1138 |
};
|
1139 |
/**/
|
1140 |
-
ws_plugin__s2member_paypalSpButtonGenerate =
|
1141 |
{
|
1142 |
var shortCodeTemplate = '[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]', shortCodeTemplateAttrs = '';
|
1143 |
/**/
|
@@ -1151,11 +1147,11 @@ jQuery(document).ready (function($)
|
|
1151 |
var regAmount = $('input#ws-plugin--s2member-sp-amount').val ().replace (/[^0-9\.]/g, '');
|
1152 |
var desc = $.trim ($('input#ws-plugin--s2member-sp-desc').val ().replace (/"/g, ''));
|
1153 |
/**/
|
1154 |
-
var localeCode = '', digital = '0', noShipping = '1';
|
1155 |
var pageStyle = $.trim ($('input#ws-plugin--s2member-sp-page-style').val ().replace (/"/g, ''));
|
1156 |
var currencyCode = $('select#ws-plugin--s2member-sp-currency').val ().replace (/[^A-Z]/g, '');
|
1157 |
/**/
|
1158 |
-
if
|
1159 |
{
|
1160 |
alert('— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it\'s because you\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.');
|
1161 |
return false;
|
@@ -1165,12 +1161,12 @@ jQuery(document).ready (function($)
|
|
1165 |
alert('— Oops, a slight problem: —\n\nAmount must be >= 0.01');
|
1166 |
return false;
|
1167 |
}
|
1168 |
-
else if
|
1169 |
{
|
1170 |
alert('— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00');
|
1171 |
return false;
|
1172 |
}
|
1173 |
-
else if
|
1174 |
{
|
1175 |
alert('— Oops, a slight problem: —\n\nPlease type a Description for this Button.');
|
1176 |
return false;
|
@@ -1180,7 +1176,7 @@ jQuery(document).ready (function($)
|
|
1180 |
if (additionals[i] && additionals[i] !== leading)
|
1181 |
ids += ',' + additionals[i];
|
1182 |
/**/
|
1183 |
-
var spIdsHours = 'sp:' + ids + ':' + hours;
|
1184 |
/**/
|
1185 |
shortCodeTemplateAttrs += 'sp="1" ids="' + esc_attr(ids) + '" exp="' + esc_attr(hours) + '" desc="' + esc_attr(desc) + '" ps="' + esc_attr(pageStyle) + '" lc="' + esc_attr(localeCode) + '" cc="' + esc_attr(currencyCode) + '" dg="' + esc_attr(digital) + '" ns="' + esc_attr(noShipping) + '"';
|
1186 |
shortCodeTemplateAttrs += ' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="' + esc_attr(regAmount) + '"';
|
@@ -1198,9 +1194,9 @@ jQuery(document).ready (function($)
|
|
1198 |
/**/
|
1199 |
$('div#ws-plugin--s2member-sp-button-prev').html (code.val ().replace (/\<form/, '<form target="_blank"').replace (/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g, Math.round (new Date ().getTime ()) + '~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace (/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g, ''));
|
1200 |
/**/
|
1201 |
-
alert('Your Button has been generated.\nPlease copy/paste the Shortcode
|
1202 |
/**/
|
1203 |
-
shortCode.each (
|
1204 |
{
|
1205 |
this.focus (), this.select ();
|
1206 |
});
|
@@ -1208,7 +1204,7 @@ jQuery(document).ready (function($)
|
|
1208 |
return false;
|
1209 |
};
|
1210 |
/**/
|
1211 |
-
ws_plugin__s2member_paypalRegLinkGenerate =
|
1212 |
{
|
1213 |
var level = $('select#ws-plugin--s2member-reg-link-level').val ().replace (/[^0-9]/g, '');
|
1214 |
var subscrID = $.trim ($('input#ws-plugin--s2member-reg-link-subscr-id').val ());
|
@@ -1218,9 +1214,9 @@ jQuery(document).ready (function($)
|
|
1218 |
var $link = $('p#ws-plugin--s2member-reg-link'), $loading = $('img#ws-plugin--s2member-reg-link-loading');
|
1219 |
/**/
|
1220 |
var levelCcapsPer = (fixedTerm && !fixedTerm.match (/L$/)) ? level + ':' + cCaps + ':' + fixedTerm : level + ':' + cCaps;
|
1221 |
-
levelCcapsPer =
|
1222 |
/**/
|
1223 |
-
if
|
1224 |
{
|
1225 |
alert('— Oops, a slight problem: —\n\nPaid Subscr. ID is a required value.');
|
1226 |
return false;
|
@@ -1230,7 +1226,7 @@ jQuery(document).ready (function($)
|
|
1230 |
alert('— Oops, a slight problem: —\n\nThe Custom Value MUST start with your domain name.');
|
1231 |
return false;
|
1232 |
}
|
1233 |
-
else if (fixedTerm && !fixedTerm.match (/^[1-9]+ (D|W|M|Y|L)$/))
|
1234 |
{
|
1235 |
alert('— Oops, a slight problem: —\n\nThe Fixed Term Length is not formatted properly.');
|
1236 |
return false;
|
@@ -1244,14 +1240,14 @@ jQuery(document).ready (function($)
|
|
1244 |
return false;
|
1245 |
};
|
1246 |
/**/
|
1247 |
-
ws_plugin__s2member_paypalSpLinkGenerate =
|
1248 |
{
|
1249 |
var leading = $('select#ws-plugin--s2member-sp-link-leading-id').val ().replace (/[^0-9]/g, '');
|
1250 |
var additionals = $('select#ws-plugin--s2member-sp-link-additional-ids').val () || [];
|
1251 |
var hours = $('select#ws-plugin--s2member-sp-link-hours').val ().replace (/[^0-9]/g, '');
|
1252 |
var $link = $('p#ws-plugin--s2member-sp-link'), $loading = $('img#ws-plugin--s2member-sp-link-loading');
|
1253 |
/**/
|
1254 |
-
if
|
1255 |
{
|
1256 |
alert('— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it\'s because you\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.');
|
1257 |
return false;
|
@@ -1278,25 +1274,25 @@ jQuery(document).ready (function($)
|
|
1278 |
var $rows = $('tr.ws-plugin--s2member-custom-reg-opt-in-label-row');
|
1279 |
var $prevImg = $('img.ws-plugin--s2member-custom-reg-opt-in-label-prev-img');
|
1280 |
/**/
|
1281 |
-
if
|
1282 |
$rows.css ('display', 'none'), $prevImg.attr ('src', $prevImg.attr ('src').replace (/\/checked\.png$/, '/unchecked.png'));
|
1283 |
/**/
|
1284 |
-
else if
|
1285 |
$rows.css ('display', ''), $prevImg.attr ('src', $prevImg.attr ('src').replace (/\/unchecked\.png$/, '/checked.png'));
|
1286 |
/**/
|
1287 |
-
else if
|
1288 |
$rows.css ('display', ''), $prevImg.attr ('src', $prevImg.attr ('src').replace (/\/checked\.png$/, '/unchecked.png'));
|
1289 |
});
|
1290 |
/**/
|
1291 |
$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs\[\]"]').change (function()
|
1292 |
{
|
1293 |
-
var
|
1294 |
/**/
|
1295 |
$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs\[\]"]').each (function()
|
1296 |
{
|
1297 |
var $this = $(this), val = $this.val (), checkboxes = 'input[type="checkbox"]';
|
1298 |
/**/
|
1299 |
-
if
|
1300 |
$this.nextAll (checkboxes).slice (0, 2).attr ({'checked': 'checked', 'disabled': 'disabled'});
|
1301 |
/**/
|
1302 |
else if (val === 'removal-deletion' && !this.checked)
|
@@ -1305,7 +1301,7 @@ jQuery(document).ready (function($)
|
|
1305 |
(thisChange === 'removal-deletion') ? $this.nextAll (checkboxes).slice (0, 2).removeAttr ('checked') : null;
|
1306 |
}
|
1307 |
/**/
|
1308 |
-
else if
|
1309 |
$this.nextAll (checkboxes).slice (0, 3).attr ({'checked': 'checked', 'disabled': 'disabled'});
|
1310 |
/**/
|
1311 |
else if (val === 'modification' && !this.checked)
|
@@ -1315,7 +1311,7 @@ jQuery(document).ready (function($)
|
|
1315 |
}
|
1316 |
})
|
1317 |
/**/
|
1318 |
-
.each (
|
1319 |
{
|
1320 |
(this.checked) ? checkedIndexes.push (index) : null;
|
1321 |
});
|
@@ -1326,34 +1322,4 @@ jQuery(document).ready (function($)
|
|
1326 |
/**/
|
1327 |
}).last ().trigger ('change');
|
1328 |
}
|
1329 |
-
/**/
|
1330 |
-
if (location.href.match (/page\=ws-plugin--s2member-integrations/))
|
1331 |
-
{
|
1332 |
-
$('select#ws-plugin--s2member-bbpress-ovg').change (function()
|
1333 |
-
{
|
1334 |
-
if ($(this).val () === '0') /* Expand/collapse notation; based on selection. */
|
1335 |
-
{
|
1336 |
-
$('span#ws-plugin--s2member-bbpress-ovg-off-note').css ('display', 'inline');
|
1337 |
-
/**/
|
1338 |
-
var l = 'form#ws-plugin--s2member-bridge-bbpress-form label[for="ws_plugin--s2member-bridge-bbpress-min-level"]';
|
1339 |
-
/**/
|
1340 |
-
$(l).text ($(l).text ().replace (/to (read\/)?participate/i, 'to read/participate')), $('select#ws-plugin--s2member-bbpress-min-level option').each (function()
|
1341 |
-
{
|
1342 |
-
$(this).text ($(this).text ().replace (/\( to( read and)? participate \)/i, '( to read and participate )'));
|
1343 |
-
});
|
1344 |
-
}
|
1345 |
-
else if ($(this).val () === '1') /* Expand/collapse notation. */
|
1346 |
-
{
|
1347 |
-
$('span#ws-plugin--s2member-bbpress-ovg-off-note').css ('display', 'none');
|
1348 |
-
/**/
|
1349 |
-
var l = 'form#ws-plugin--s2member-bridge-bbpress-form label[for="ws_plugin--s2member-bridge-bbpress-min-level"]';
|
1350 |
-
/**/
|
1351 |
-
$(l).text ($(l).text ().replace (/to (read\/)?participate/i, 'to participate')), $('select#ws-plugin--s2member-bbpress-min-level option').each (function()
|
1352 |
-
{
|
1353 |
-
$(this).text ($(this).text ().replace (/\( to( read and)? participate \)/i, '( to participate )'));
|
1354 |
-
});
|
1355 |
-
}
|
1356 |
-
/**/
|
1357 |
-
}).trigger ('change'); /* Fire on ready too. */
|
1358 |
-
}
|
1359 |
});
|
13 |
* @package s2Member\Menu_Pages
|
14 |
* @since 3.0
|
15 |
*/
|
|
|
|
|
|
|
16 |
jQuery(document).ready (function($)
|
17 |
{
|
18 |
+
var esc_attr = esc_html = /* Convert special characters. */ function(str)
|
19 |
{
|
20 |
return String(str).replace (/"/g, '"').replace (/\</g, '<').replace (/\>/g, '>');
|
21 |
};
|
22 |
/**/
|
23 |
+
if (location.href.match /* Any/all s2Member® pages. */ (/page\=ws-plugin--s2member/))
|
24 |
{
|
25 |
$('input.ws-plugin--s2member-update-roles-button, input.ws-plugin--s2member-reset-roles-button').click (function()
|
26 |
{
|
27 |
+
var $this = /* Save $(this) into $this. */ $(this);
|
28 |
+
$this.val /* Indicate loading status ( please wait ). */ ('one moment please ...');
|
29 |
/**/
|
30 |
var levels = '<?php echo (int)$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; ?>';
|
31 |
var resetUpdate = ($this.hasClass ('ws-plugin--s2member-reset-roles-button')) ? 'Reset' : 'Update';
|
50 |
{
|
51 |
$('select#ws-plugin--s2member-mms-registration-file').change (function()
|
52 |
{
|
53 |
+
if /* Expand/collapse relevant options; based on file selection. */ ($(this).val () === 'wp-signup')
|
54 |
{
|
55 |
var gv = $('select#ws-plugin--s2member-mms-registration-grants').val (), l0v = $('input#ws-plugin--s2member-mms-registration-blogs-level0').val ();
|
56 |
$('div#ws-plugin--s2member-mms-registration-support-package-details-wrapper').show (), $('div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login').hide (), $('div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup').show ();
|
57 |
$('div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0')[((gv === 'all') ? 'show' : 'hide')] ();
|
58 |
$('input#ws-plugin--s2member-mms-registration-blogs-level0').val (((gv === 'all') ? ((l0v > 0) ? l0v : '1') : '0'));
|
59 |
}
|
60 |
+
else if /* Expand/collapse relevant options. */ ($(this).val () === 'wp-login')
|
61 |
{
|
62 |
var gv = $('select#ws-plugin--s2member-mms-registration-grants').val (), l0v = $('input#ws-plugin--s2member-mms-registration-blogs-level0').val ();
|
63 |
$('div#ws-plugin--s2member-mms-registration-support-package-details-wrapper').hide (), $('div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login').show (), $('div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup').hide ();
|
65 |
$('input#ws-plugin--s2member-mms-registration-blogs-level0').val ('0');
|
66 |
}
|
67 |
/**/
|
68 |
+
}).trigger /* Fire on ready too. */ ('change');
|
69 |
/**/
|
70 |
$('select#ws-plugin--s2member-mms-registration-grants').change (function()
|
71 |
{
|
75 |
/**/
|
76 |
if (location.href.match (/page\=ws-plugin--s2member-gen-ops/))
|
77 |
{
|
78 |
+
ws_plugin__s2member_generateSecurityKey = /* Generates a unique Security Key. */ function()
|
79 |
{
|
80 |
+
var mt_rand = /* The JS equivalent to mt_rand(). */ function(min, max)
|
81 |
{
|
82 |
min = (arguments.length < 1) ? 0 : min;
|
83 |
max = (arguments.length < 2) ? 2147483647 : max;
|
93 |
return false;
|
94 |
};
|
95 |
/**/
|
96 |
+
ws_plugin__s2member_enableSecurityKey = /* Allow Security Key editing?? */ function()
|
97 |
{
|
98 |
if (confirm('Edit Key? Are you sure?\nThis could break your installation!\n\n*Note* If you\'ve been testing s2Member, feel free to change this Key before you go live. Just don\'t go live, and then change it. You\'ll have unhappy Customers. Data corruption WILL occur! For your safety, s2Member keeps a history of the last 10 Keys that you\'ve used. If you get yourself into a real situation, s2Member will let you revert back to a previous Key.'))
|
99 |
$('input#ws-plugin--s2member-sec-encryption-key').removeAttr ('disabled');
|
101 |
return false;
|
102 |
};
|
103 |
/**/
|
104 |
+
ws_plugin__s2member_securityKeyHistory = /* Displays history of Keys. */ function()
|
105 |
{
|
106 |
$('div#ws-plugin--s2member-sec-encryption-key-history').toggle ();
|
107 |
/**/
|
120 |
else /* Else we allow the emails to be customized. */
|
121 |
$this.removeAttr ('disabled'), $(':input', $newUserEmails).removeAttr ('disabled'), $newUserEmails.css ('opacity', '');
|
122 |
/**/
|
123 |
+
}).trigger /* Fire on ready too. */ ('change');
|
124 |
/**/
|
125 |
if ($('input#ws-plugin--s2member-custom-reg-fields').length && $('div#ws-plugin--s2member-custom-reg-field-configuration').length)
|
126 |
{
|
127 |
+
( /* Wrap these routines inside a function to keep variables within relative scope. */function()
|
128 |
{
|
129 |
var i, fieldDefaults, tools, table, $tools, $table;
|
130 |
var $fields = $('input#ws-plugin--s2member-custom-reg-fields');
|
131 |
var $configuration = $('div#ws-plugin--s2member-custom-reg-field-configuration');
|
132 |
var fields = ($fields.val ()) ? $.JSON.parse ($fields.val ()) : [];
|
133 |
/**/
|
134 |
+
fields = /* Force fields to an array. */ (fields instanceof Array) ? fields : [];
|
135 |
/**/
|
136 |
fieldDefaults = {section: 'no', sectitle: '', id: '', label: '', type: 'text', deflt: '', options: '', expected: '', required: 'yes', levels: 'all', editable: 'yes', classes: '', styles: '', attrs: ''};
|
137 |
/**/
|
138 |
+
for (i = 0; i < fields.length; i++) fields[i] = /* Extend, based on defaults ( for future proofing ). */ $.extend (true, {}, fieldDefaults, fields[i]);
|
139 |
/**/
|
140 |
tools = '<div id="ws-plugin--s2member-custom-reg-field-configuration-tools"></div>', table = '<table id="ws-plugin--s2member-custom-reg-field-configuration-table"></table>';
|
141 |
/**/
|
142 |
+
$configuration.html /* Add tools div & table div to configuration div ( i.e. div#ws-plugin--s2member-custom-reg-field-configuration ). */ (tools + table);
|
143 |
/**/
|
144 |
$tools = $('div#ws-plugin--s2member-custom-reg-field-configuration-tools'), $table = $('table#ws-plugin--s2member-custom-reg-field-configuration-table');
|
145 |
/**/
|
146 |
ws_plugin__s2member_customRegFieldSectionChange = function(select)
|
147 |
{
|
148 |
+
var section = /* Current selection ( no|yes, selected by site owner ). */ $(select).val ();
|
149 |
/**/
|
150 |
var sectitle_trs = 'tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle';
|
151 |
/**/
|
152 |
(section === 'yes') ? $(sectitle_trs).css ('display', '') : $(sectitle_trs).css ('display', 'none');
|
153 |
};
|
154 |
/**/
|
155 |
+
ws_plugin__s2member_customRegFieldTypeChange = /* Handle change events here. */ function(select)
|
156 |
{
|
157 |
+
var type = /* Current selection ( type of Field, selected by site owner ). */ $(select).val ();
|
158 |
/**/
|
159 |
var deflt_trs = 'tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt', options_trs = 'tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-options', expected_trs = 'tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected';
|
160 |
/**/
|
165 |
/**/
|
166 |
ws_plugin__s2member_customRegFieldDelete = function(index)
|
167 |
{
|
168 |
+
var newFields = /* Build array. */ new Array ();
|
169 |
/**/
|
170 |
for (var i = 0; i < fields.length; i++)
|
171 |
+
if /* Omit index. */ (i !== index)
|
172 |
newFields.push (fields[i]);
|
173 |
/**/
|
174 |
fields = newFields, updateFields (), buildTable ();
|
202 |
{
|
203 |
var $table = $('table#ws-plugin--s2member-custom-reg-field-configuration-tools-form'), field = {};
|
204 |
/**/
|
205 |
+
$(':input[property]', $table).each ( /* Go through each property value. */function()
|
206 |
{
|
207 |
var $this = $(this), property = $this.attr ('property'), val = $.trim ($this.val ());
|
208 |
/**/
|
209 |
field[property] = val;
|
210 |
});
|
211 |
/**/
|
212 |
+
if /* If it can be validated. */ ((field = validateField(field)))
|
213 |
{
|
214 |
fields.push (field), updateFields (), buildTools (), buildTable (), scrollReset ();
|
215 |
/**/
|
216 |
+
setTimeout( /* A momentary delay here for usability. */function()
|
217 |
{
|
218 |
var row = 'tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-' + (fields.length - 1);
|
219 |
alert('Field created successfully.\n* Remember to "Save All Changes".');
|
226 |
{
|
227 |
var $table = $('table#ws-plugin--s2member-custom-reg-field-configuration-tools-form'), field = {};
|
228 |
/**/
|
229 |
+
$(':input[property]', $table).each ( /* Go through each property value. */function()
|
230 |
{
|
231 |
var $this = $(this), property = $this.attr ('property'), val = $.trim ($this.val ());
|
232 |
/**/
|
233 |
field[property] = val;
|
234 |
});
|
235 |
/**/
|
236 |
+
if /* If it validates. */ ((field = validateField(field, index)))
|
237 |
{
|
238 |
fields[index] = field, updateFields (), buildTools (), buildTable (), scrollReset ();
|
239 |
/**/
|
240 |
+
setTimeout( /* A momentary delay here for usability. */function()
|
241 |
{
|
242 |
var row = 'tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-' + index;
|
243 |
alert('Field updated successfully.\n* Remember to "Save All Changes".');
|
246 |
}
|
247 |
};
|
248 |
/**/
|
249 |
+
ws_plugin__s2member_customRegFieldAdd = /* Add new field links. */ function()
|
250 |
{
|
251 |
+
buildTools /* No need to reset scroll position. */(true);
|
252 |
};
|
253 |
/**/
|
254 |
+
ws_plugin__s2member_customRegFieldEdit = /* Edit links. */ function(index)
|
255 |
{
|
256 |
+
buildTools(false, index), scrollReset ();
|
257 |
};
|
258 |
/**/
|
259 |
+
ws_plugin__s2member_customRegFieldCancel = /* Cancel form. */ function()
|
260 |
{
|
261 |
+
buildTools (), scrollReset ();
|
262 |
};
|
263 |
/**/
|
264 |
var validateField = function(field, index)
|
277 |
field.options = (field.type.match (/^(select|selects|checkboxes|radios)$/)) ? field.options : '';
|
278 |
field.expected = (field.type.match (/^(text|textarea)$/)) ? field.expected : '';
|
279 |
/**/
|
280 |
+
if /* Every Field must have a unique ID. */ (!field.id)
|
281 |
{
|
282 |
errors.push ('Unique Field ID:\nThis is required. Please try again.');
|
283 |
}
|
286 |
errors.push ('Unique Field ID:\nThat Field ID already exists. Please try again.');
|
287 |
}
|
288 |
/**/
|
289 |
+
if /* Every Field must have a label. */ (!field.label)
|
290 |
{
|
291 |
errors.push ('Field Label/Description:\nThis is required. Please try again.');
|
292 |
}
|
302 |
if (!(options[i] = $.trim (options[i])).match (/^([^\|]*)(\|)([^\|]*)(\|default)?$/))
|
303 |
{
|
304 |
errors.push ('Option Configuration File:\nInvalid configuration at line #' + (i + 1) + '.');
|
305 |
+
break; /* Break now. There could potentially be lots of lines with errors. */
|
306 |
}
|
307 |
}
|
308 |
/**/
|
309 |
+
field.options = /* Clean up. */ $.trim (options.join ('\n'));
|
310 |
}
|
311 |
/**/
|
312 |
if (!(field.levels = field.levels.replace (/ /g, '')))
|
333 |
errors.push ('Other Attributes:\nContains invalid characters. Please try again.\n( do NOT use these characters: < > )');
|
334 |
}
|
335 |
/**/
|
336 |
+
if /* Errors? */ (errors.length > 0)
|
337 |
{
|
338 |
alert(errors.join ('\n\n'));
|
339 |
return false;
|
342 |
return field;
|
343 |
};
|
344 |
/**/
|
345 |
+
var updateFields = /* Update hidden input value. */ function()
|
346 |
{
|
347 |
$fields.val (((fields.length > 0) ? $.JSON.stringify (fields) : ''));
|
348 |
};
|
349 |
/**/
|
350 |
+
var fieldId2Var = /* Convert ids to variables. */ function(fieldId)
|
351 |
{
|
352 |
+
return ( typeof fieldId === 'string') ? $.trim (fieldId).toLowerCase ().replace (/[^a-z0-9]/g, '_') : '';
|
353 |
};
|
354 |
/**/
|
355 |
var fieldTypeDesc = function(type)
|
359 |
if (typeof types[type] === 'string')
|
360 |
return types[type];
|
361 |
/**/
|
362 |
+
return /* Default. */ '';
|
363 |
};
|
364 |
/**/
|
365 |
+
var fieldIdExists = /* Already exists? */ function(fieldId)
|
366 |
{
|
367 |
for (var i = 0; i < fields.length; i++)
|
368 |
if (fields[i].id === fieldId)
|
369 |
return true;
|
370 |
};
|
371 |
/**/
|
372 |
+
var scrollReset = /* Return to Custom Fields section. */ function()
|
373 |
{
|
374 |
scrollTo(0, $('div.ws-plugin--s2member-custom-reg-fields-section').offset ()['top'] - 100);
|
375 |
};
|
376 |
/**/
|
377 |
+
var buildTools = /* This builds tools into the configuration. */ function(adding, index)
|
378 |
{
|
379 |
var i = 0, html = '', form = '', w = 0, h = 0, editing = ( typeof index === 'number' && typeof fields[index] === 'object') ? true : false, displayForm = (adding || editing) ? true : false, field = (editing) ? $.extend (true, {}, fieldDefaults, fields[index]) : fieldDefaults;
|
380 |
/**/
|
381 |
+
html += /* Click to add a new Custom Registration/Profile Field. */ '<a href="#" onclick="ws_plugin__s2member_customRegFieldAdd(); return false;">Add New Field</a>';
|
382 |
/**/
|
383 |
+
tb_remove /* Remove an existing thickbox. */ (), $('div#ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form').remove ();
|
384 |
/**/
|
385 |
+
if /* Do we need to display the adding/editing form at all? */ (displayForm)
|
|
|
386 |
{
|
387 |
form += '<div id="ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form">';
|
388 |
/**/
|
397 |
/**/
|
398 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">';
|
399 |
form += '<td colspan="2">';
|
400 |
+
form += '<select property="section" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section" onchange="ws_plugin__s2member_customRegFieldSectionChange(this);">';
|
401 |
form += '<option value="no"' + ((field.section === 'no') ? ' selected="selected"' : '') + '">No ( this Field flows normally )</option>';
|
402 |
form += '<option value="yes"' + ((field.section === 'yes') ? ' selected="selected"' : '') + '">Yes ( this Field begins a new section )</option>';
|
403 |
form += '</select><br />';
|
410 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"' + ((field.section === 'yes') ? '' : ' style="display:none;"') + '>';
|
411 |
form += '<td colspan="2">';
|
412 |
form += 'Title for this new section? ( optional )<br />';
|
413 |
+
form += '<input type="text" property="sectitle" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle" value="' + esc_attr(field.sectitle) + '" /><br />';
|
414 |
form += '<small>If empty, a simple divider will be used by default.</small>';
|
415 |
form += '</td>';
|
416 |
form += '</tr>';
|
425 |
/**/
|
426 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">';
|
427 |
form += '<td colspan="2">';
|
428 |
+
form += '<select property="type" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type" onchange="ws_plugin__s2member_customRegFieldTypeChange(this);">';
|
429 |
form += '<option value="text"' + ((field.type === 'text') ? ' selected="selected"' : '') + '">' + esc_html(fieldTypeDesc('text')) + '</option>';
|
430 |
form += '<option value="textarea"' + ((field.type === 'textarea') ? ' selected="selected"' : '') + '">' + esc_html(fieldTypeDesc('textarea')) + '</option>';
|
431 |
form += '<option value="select"' + ((field.type === 'select') ? ' selected="selected"' : '') + '">' + esc_html(fieldTypeDesc('select')) + '</option>';
|
449 |
/**/
|
450 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">';
|
451 |
form += '<td colspan="2">';
|
452 |
+
form += '<input type="text" property="label" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label" value="' + esc_attr(field.label) + '" /><br />';
|
453 |
form += '<small>Examples: <code>Choose Country</code>, <code>Street Address</code></small>';
|
454 |
form += '</td>';
|
455 |
form += '</tr>';
|
464 |
/**/
|
465 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">';
|
466 |
form += '<td colspan="2">';
|
467 |
+
form += '<input type="text" property="id" maxlength="25" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id" value="' + esc_attr(field.id) + '" /><br />';
|
468 |
form += '<small>Examples: <code>country_code</code>, <code>street_address</code></small><br />';
|
469 |
form += '<small>e.g. <code>[s2Get user_field="country_code" /]</code></small>';
|
470 |
form += '</td>';
|
499 |
/**/
|
500 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"' + ((field.type.match (/^(text|textarea)$/)) ? '' : ' style="display:none;"') + '>';
|
501 |
form += '<td colspan="2">';
|
502 |
+
form += '<textarea property="deflt" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt" rows="1">' + esc_html(field.deflt) + '</textarea><br />';
|
503 |
form += '<small>Default value before user input is received.</small>';
|
504 |
form += '</td>';
|
505 |
form += '</tr>';
|
515 |
/**/
|
516 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"' + ((field.type.match (/^(select|selects|checkboxes|radios)$/)) ? '' : ' style="display:none;"') + '>';
|
517 |
form += '<td colspan="2">';
|
518 |
+
form += '<textarea property="options" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options" rows="3">' + esc_html(field.options) + '</textarea><br />';
|
519 |
form += 'Here is a quick example:<br />';
|
520 |
form += '<small>You can also specify a <em>default</em> option:</small><br />';
|
521 |
form += '<code>US|United States|default</code><br />';
|
642 |
/**/
|
643 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">';
|
644 |
form += '<td colspan="2">';
|
645 |
+
form += '<input type="text" property="levels" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels" value="' + esc_attr(field.levels) + '" /><br />';
|
646 |
form += '<small>Please use comma-delimited Level #\'s: <code>0,1,2,3,4</code> or type: <code>all</code>.</small><br />';
|
647 |
form += '<small>This allows you to enable this field - only at specific Membership Levels.</small>';
|
648 |
form += '</td>';
|
679 |
/**/
|
680 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">';
|
681 |
form += '<td colspan="2">';
|
682 |
+
form += '<input type="text" property="classes" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes" value="' + esc_attr(field.classes) + '" /><br />';
|
683 |
form += '<small>Example: <code>my-style-1 my-style-2</code></small>';
|
684 |
form += '</td>';
|
685 |
form += '</tr>';
|
694 |
/**/
|
695 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">';
|
696 |
form += '<td colspan="2">';
|
697 |
+
form += '<input type="text" property="styles" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles" value="' + esc_attr(field.styles) + '" /><br />';
|
698 |
form += '<small>Example: <code>color:#000000; background:#FFFFFF;</code></small>';
|
699 |
form += '</td>';
|
700 |
form += '</tr>';
|
709 |
/**/
|
710 |
form += '<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">';
|
711 |
form += '<td colspan="2">';
|
712 |
+
form += '<input type="text" property="attrs" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs" value="' + esc_attr(field.attrs) + '" /><br />';
|
713 |
form += '<small>Example: <code>onkeyup="" onblur=""</code></small>';
|
714 |
form += '</td>';
|
715 |
form += '</tr>';
|
740 |
$tools.html (html);
|
741 |
};
|
742 |
/**/
|
743 |
+
var buildTable = /* This builds the table of existing fields. */ function()
|
744 |
{
|
745 |
var l = fields.length, i = 0, html = '', eo = 'o';
|
746 |
/**/
|
755 |
html += '<th>- Tools -</th>';
|
756 |
html += '</tr>';
|
757 |
/**/
|
758 |
+
if /* Any fields? */ (fields.length > 0)
|
759 |
{
|
760 |
for (i = 0; i < fields.length; i++)
|
761 |
{
|
771 |
}
|
772 |
else /* Otherwise, there are no fields configured yet. */
|
773 |
{
|
774 |
+
html += /* There are no fields yet. */ '<tr>';
|
775 |
html += '<td colspan="6">No Custom Fields are configured.</td>';
|
776 |
html += '</tr>';
|
777 |
}
|
791 |
{
|
792 |
$('input#ws-plugin--s2member-brute-force-restrictions-reset-button').click (function()
|
793 |
{
|
794 |
+
var $this = /* Save $(this) into $this. */ $(this);
|
795 |
+
$this.val /* Indicate loading status ( please wait ). */ ('one moment please ...');
|
796 |
/**/
|
797 |
$.post (ajaxurl, {action: 'ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax', ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax: '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'}, function(response)
|
798 |
{
|
804 |
/**/
|
805 |
$('input#ws-plugin--s2member-ip-restrictions-reset-button').click (function()
|
806 |
{
|
807 |
+
var $this = /* Save $(this) into $this. */ $(this);
|
808 |
+
$this.val /* Indicate loading status ( please wait ). */ ('one moment please ...');
|
809 |
/**/
|
810 |
$.post (ajaxurl, {action: 'ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax', ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax: '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'}, function(response)
|
811 |
{
|
817 |
/**/
|
818 |
$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query\[\]"]').change (function()
|
819 |
{
|
820 |
+
var thisChange = /* Record value associated with change event. Allows for intutitive unchecking. */ $(this).val ();
|
821 |
/**/
|
822 |
$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query\[\]"]').each (function()
|
823 |
{
|
824 |
var $this = $(this), val = $this.val (), checkboxes = 'input[type="checkbox"]';
|
825 |
/**/
|
826 |
+
if /* All sub-items get checked/disabled. */ (val === 'all' && this.checked)
|
827 |
$this.nextAll (checkboxes).attr ({'checked': 'checked', 'disabled': 'disabled'});
|
828 |
/**/
|
829 |
else if (val === 'all' && !this.checked)
|
838 |
/**/
|
839 |
if (location.href.match (/page\=ws-plugin--s2member-down-ops/))
|
840 |
{
|
841 |
+
var updateCloudFrontPrivateKey = /* Attaches to events below. */ function()
|
842 |
{
|
843 |
var $hiddenPrivateKey = $('input#ws-plugin--s2member-amazon-cf-files-private-key');
|
844 |
var $visiblePrivateKeyEntry = $('textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry');
|
845 |
var hiddenPrivateKeyValue = $.trim ($hiddenPrivateKey.val ()), visiblePrivateKeyEntryValue = $.trim ($visiblePrivateKeyEntry.val ());
|
846 |
/**/
|
847 |
+
if ((hiddenPrivateKeyValue && !visiblePrivateKeyEntryValue) || visiblePrivateKeyEntryValue.match /* 9679.toString(16).toUpperCase() = 25CF. */ (/[^\r\n\u25CF]/))
|
848 |
$hiddenPrivateKey.val (visiblePrivateKeyEntryValue), $visiblePrivateKeyEntry.val (visiblePrivateKeyEntryValue.replace (/[^\r\n]/g, String.fromCharCode (9679)));
|
849 |
};
|
850 |
/**/
|
851 |
$('form#ws-plugin--s2member-options-form').submit (updateCloudFrontPrivateKey);
|
852 |
$('textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry').change (updateCloudFrontPrivateKey).trigger ('change');
|
853 |
/**/
|
854 |
+
var updateCloudFrontDistroCfgs = /* Attaches to events below. */ function()
|
855 |
{
|
856 |
var $hiddenPrivateKey = $('input#ws-plugin--s2member-amazon-cf-files-private-key');
|
857 |
var $visiblePrivateKeyId = $('input#ws-plugin--s2member-amazon-cf-files-private-key-id');
|
866 |
if (autoConfigDistrosStatusValue === 'configured' && ((visiblePrivateKeyIdPrevConfigValue && visiblePrivateKeyIdValue !== visiblePrivateKeyIdPrevConfigValue) || (hiddenPrivateKeyPrevConfigValue && hiddenPrivateKeyValue !== hiddenPrivateKeyPrevConfigValue)))
|
867 |
{
|
868 |
alert('s2Member will need to delete and re-configure your Amazon® CloudFront distributions if you change this. When you\'re done editing, click (Save All Changes) below.');
|
869 |
+
$autoConfigDistros.attr /* Forcibly check. */ ('checked', 'checked');
|
870 |
}
|
871 |
else if (autoConfigDistrosStatusValue !== 'configured' && visiblePrivateKeyIdValue && hiddenPrivateKeyValue)
|
872 |
{
|
873 |
alert('s2Member will need to auto-configure your Amazon® CloudFront distributions for you. When you\'re done editing, click (Save All Changes) below.');
|
874 |
+
$autoConfigDistros.attr /* Forcibly check. */ ('checked', 'checked');
|
875 |
}
|
876 |
};
|
877 |
/**/
|
897 |
var $this = $(this), val = $this.val ();
|
898 |
var $viaCron = $('p#ws-plugin--s2member-auto-eot-system-enabled-via-cron');
|
899 |
/**/
|
900 |
+
if /* Display Cron instructions. */ (val == 2)
|
901 |
$viaCron.show ()
|
902 |
else /* Hide instructions. */
|
903 |
$viaCron.hide ();
|
906 |
/**/
|
907 |
if (location.href.match (/page\=ws-plugin--s2member-paypal-buttons/))
|
908 |
{
|
909 |
+
$('div.ws-menu-page select[id]').filter ( /* Filter all select elements with an id. */function()
|
910 |
{
|
911 |
return this.id.match (/^ws-plugin--s2member-(level[1-9][0-9]*|modification)-term$/);
|
912 |
}).change (function()
|
922 |
(trialDisabled) ? $('input#ws-plugin--s2member-' + button + '-trial-amount').val ('0.00') : null;
|
923 |
});
|
924 |
/**/
|
925 |
+
$('div.ws-menu-page input[id]').filter ( /* Filter all input elements with an id. */function()
|
926 |
{
|
927 |
return this.id.match (/^ws-plugin--s2member-(level[1-9][0-9]*|modification|ccap)-ccaps$/);
|
928 |
}).keyup (function()
|
929 |
{
|
930 |
var value = this.value.replace (/^(-all|-al|-a|-)[;,]*/gi, ''), _all = (this.value.match (/^(-all|-al|-a|-)[;,]*/i)) ? '-all,' : '';
|
931 |
+
if /* Only if there is a problem with the actual values; because this causes interruptions. */ (value.match (/[^a-z_0-9,]/))
|
932 |
this.value = _all + $.trim ($.trim (value).replace (/[ \-]/g, '_').replace (/[^a-z_0-9,]/gi, '').toLowerCase ());
|
933 |
});
|
934 |
/**/
|
935 |
+
ws_plugin__s2member_paypalButtonGenerate = /* Handles PayPal® Button Generation. */ function(button)
|
936 |
{
|
937 |
var shortCodeTemplate = '[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]', shortCodeTemplateAttrs = '', labels = {};
|
938 |
/**/
|
943 |
var modLevel = $('select#ws-plugin--s2member-modification-level');
|
944 |
/**/
|
945 |
var level = (button === 'modification') ? modLevel.val ().split (':', 2)[1] : button.replace (/^level/, '');
|
946 |
+
var label = /* Labels may NOT contain double-quotes. */ labels['level' + level].replace (/"/g, '');
|
947 |
var desc = $.trim ($('input#ws-plugin--s2member-' + button + '-desc').val ().replace (/"/g, ""));
|
948 |
/**/
|
949 |
var trialAmount = $('input#ws-plugin--s2member-' + button + '-trial-amount').val ().replace (/[^0-9\.]/g, '');
|
954 |
var regPeriod = $('select#ws-plugin--s2member-' + button + '-term').val ().split ('-')[0].replace (/[^0-9]/g, '');
|
955 |
var regTerm = $('select#ws-plugin--s2member-' + button + '-term').val ().split ('-')[1].replace (/[^A-Z]/g, '');
|
956 |
var regRecur = $('select#ws-plugin--s2member-' + button + '-term').val ().split ('-')[2].replace (/[^0-1BN]/g, '');
|
957 |
+
var /* These options are NOT yet configurable. */ regRecurTimes = '', regRecurRetry = '1';
|
958 |
/**/
|
959 |
+
var /* NOT yet configurable. */ localeCode = '', digital = '0', noShipping = '1';
|
960 |
var pageStyle = $.trim ($('input#ws-plugin--s2member-' + button + '-page-style').val ().replace (/"/g, ''));
|
961 |
var currencyCode = $('select#ws-plugin--s2member-' + button + '-currency').val ().replace (/[^A-Z]/g, '');
|
962 |
/**/
|
963 |
var cCaps = $.trim ($.trim ($('input#ws-plugin--s2member-' + button + '-ccaps').val ()).replace (/^(-all|-al|-a|-)[;,]*/gi, '').replace (/[ \-]/g, '_').replace (/[^a-z_0-9,]/gi, '').toLowerCase ());
|
964 |
cCaps = ($.trim ($('input#ws-plugin--s2member-' + button + '-ccaps').val ()).match (/^(-all|-al|-a|-)[;,]*/i)) ? ((cCaps) ? '-all,' : '-all') + cCaps.toLowerCase () : cCaps.toLowerCase ();
|
965 |
/**/
|
966 |
+
trialPeriod = /* Lifetime ( 1-L-BN ) and Buy Now ( BN ) access is absolutely NOT compatible w/ Trial Periods. */ (regRecur === 'BN') ? '0' : trialPeriod;
|
967 |
+
trialAmount = /* Validate Trial Amount. */ (!trialAmount || isNaN(trialAmount) || trialAmount < 0.01 || trialPeriod <= 0) ? '0' : trialAmount;
|
968 |
/**/
|
969 |
var levelCcapsPer = (regRecur === 'BN' && regTerm !== 'L') ? level + ':' + cCaps + ':' + regPeriod + ' ' + regTerm : level + ':' + cCaps;
|
970 |
+
levelCcapsPer = /* Clean any trailing separators from this string. */ levelCcapsPer.replace (/\:+$/g, '');
|
971 |
/**/
|
972 |
if (trialAmount !== '0' && (isNaN(trialAmount) || trialAmount < 0.00))
|
973 |
{
|
974 |
alert('— Oops, a slight problem: —\n\nWhen provided, Trial Amount must be >= 0.00');
|
975 |
return false;
|
976 |
}
|
977 |
+
else if (trialAmount !== '0' && /* Maximum. */ trialAmount > 10000.00)
|
978 |
{
|
979 |
alert('— Oops, a slight problem: —\n\nMaximum Trial Amount is: 10000.00');
|
980 |
return false;
|
981 |
}
|
982 |
+
else if (trialTerm === 'D' && /* Some validation on the Trial Period. Max days: 7. */ trialPeriod > 7)
|
983 |
{
|
984 |
alert('— Oops, a slight problem: —\n\nMaximum Trial Days is: 7.\nIf you want to offer more than 7 days, please choose Weeks or Months from the drop-down.');
|
985 |
return false;
|
986 |
}
|
987 |
+
else if (trialTerm === 'W' && /* Some validation on the Trial Period. 52 max. */ trialPeriod > 52)
|
988 |
{
|
989 |
alert('— Oops, a slight problem: —\n\nMaximum Trial Weeks is: 52.\nIf you want to offer more than 52 weeks, please choose Months from the drop-down.');
|
990 |
return false;
|
991 |
}
|
992 |
+
else if (trialTerm === 'M' && /* Some validation on the Trial Period. 12 max. */ trialPeriod > 12)
|
993 |
{
|
994 |
alert('— Oops, a slight problem: —\n\nMaximum Trial Months is: 12.\nIf you want to offer more than 12 months, please choose Years from the drop-down.');
|
995 |
return false;
|
996 |
}
|
997 |
+
else if (trialTerm === 'Y' && /* 1 year max. */ trialPeriod > 1)
|
998 |
{
|
999 |
alert('— Oops, a slight problem: —\n\nMax Trial Period Years is: 1.');
|
1000 |
return false;
|
1004 |
alert('— Oops, a slight problem: —\n\nAmount must be >= 0.01');
|
1005 |
return false;
|
1006 |
}
|
1007 |
+
else if (regAmount > /* $10,000.00 maximum. */ 10000.00)
|
1008 |
{
|
1009 |
alert('— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00');
|
1010 |
return false;
|
1011 |
}
|
1012 |
+
else if /* Each Button should have a Description. */ (!desc)
|
1013 |
{
|
1014 |
alert('— Oops, a slight problem: —\n\nPlease type a Description for this Button.');
|
1015 |
return false;
|
1022 |
(regRecur !== 'BN') ? code.html (code.val ().replace (/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g, " $1_xclick-subscriptions$3")) : null;
|
1023 |
(regRecur !== 'BN') ? code.html (code.val ().replace (/ (\<input type\="hidden" name\="amount" value\="(.*?)" \/\>)/g, " <!--$1-->")) : null;
|
1024 |
/**/
|
1025 |
+
shortCodeTemplateAttrs += /* For Modification Buttons. */ (button === 'modification') ? 'modify="1" ' : '';
|
1026 |
shortCodeTemplateAttrs += 'level="' + esc_attr(level) + '" ccaps="' + esc_attr(cCaps) + '" desc="' + esc_attr(desc) + '" ps="' + esc_attr(pageStyle) + '" lc="' + esc_attr(localeCode) + '" cc="' + esc_attr(currencyCode) + '" dg="' + esc_attr(digital) + '" ns="' + esc_attr(noShipping) + '" custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"';
|
1027 |
shortCodeTemplateAttrs += ' ta="' + esc_attr(trialAmount) + '" tp="' + esc_attr(trialPeriod) + '" tt="' + esc_attr(trialTerm) + '" ra="' + esc_attr(regAmount) + '" rp="' + esc_attr(regPeriod) + '" rt="' + esc_attr(regTerm) + '" rr="' + esc_attr(regRecur) + '" rrt="' + esc_attr(regRecurTimes) + '" rra="' + esc_attr(regRecurRetry) + '"';
|
1028 |
shortCode.val (shortCodeTemplate.replace (/%%attrs%%/, shortCodeTemplateAttrs));
|
1052 |
/**/
|
1053 |
$('div#ws-plugin--s2member-' + button + '-button-prev').html (code.val ().replace (/\<form/, '<form target="_blank"').replace (/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g, Math.round (new Date ().getTime ()) + '~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace (/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g, ''));
|
1054 |
/**/
|
1055 |
+
(button === 'modification') ? alert('Your Modification Button has been generated.\nPlease copy/paste the Shortcode into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Modification Buttons should be displayed to existing Users/Members, and they should be logged-in, BEFORE clicking this Button.') : alert('Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Membership Options Page.');
|
1056 |
/**/
|
1057 |
+
shortCode.each ( /* Focus and select the Shortcode. */function()
|
1058 |
{
|
1059 |
this.focus (), this.select ();
|
1060 |
});
|
1062 |
return false;
|
1063 |
};
|
1064 |
/**/
|
1065 |
+
ws_plugin__s2member_paypalCcapButtonGenerate = /* Handles PayPal® Button Generation for Independent Capabilities. */ function()
|
1066 |
{
|
1067 |
var shortCodeTemplate = '[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]', shortCodeTemplateAttrs = '';
|
1068 |
/**/
|
1076 |
var regTerm = $('select#ws-plugin--s2member-ccap-term').val ().split ('-')[1].replace (/[^A-Z]/g, '');
|
1077 |
var regRecur = $('select#ws-plugin--s2member-ccap-term').val ().split ('-')[2].replace (/[^0-1BN]/g, '');
|
1078 |
/**/
|
1079 |
+
var /* NOT yet configurable. */ localeCode = '', digital = '0', noShipping = '1';
|
1080 |
var pageStyle = $.trim ($('input#ws-plugin--s2member-ccap-page-style').val ().replace (/"/g, ''));
|
1081 |
var currencyCode = $('select#ws-plugin--s2member-ccap-currency').val ().replace (/[^A-Z]/g, '');
|
1082 |
/**/
|
1084 |
cCaps = ($.trim ($('input#ws-plugin--s2member-ccap-ccaps').val ()).match (/^(-all|-al|-a|-)[;,]*/i)) ? ((cCaps) ? '-all,' : '-all') + cCaps.toLowerCase () : cCaps.toLowerCase ();
|
1085 |
/**/
|
1086 |
var levelCcapsPer = (regRecur === 'BN' && regTerm !== 'L') ? '*:' + cCaps + ':' + regPeriod + ' ' + regTerm : '*:' + cCaps;
|
1087 |
+
levelCcapsPer = /* Clean any trailing separators from this string. */ levelCcapsPer.replace (/\:+$/g, '');
|
1088 |
/**/
|
1089 |
+
if /* Must have some Independent Custom Capabilities. */ (!cCaps || cCaps === '-all')
|
1090 |
{
|
1091 |
alert('— Oops, a slight problem: —\n\nPlease provide at least one Custom Capability.');
|
1092 |
return false;
|
1096 |
alert('— Oops, a slight problem: —\n\nAmount must be >= 0.01');
|
1097 |
return false;
|
1098 |
}
|
1099 |
+
else if /* $10,000.00 maximum. */ (regAmount > 10000.00)
|
1100 |
{
|
1101 |
alert('— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00');
|
1102 |
return false;
|
1103 |
}
|
1104 |
+
else if /* Each Button should have a Description. */ (!desc)
|
1105 |
{
|
1106 |
alert('— Oops, a slight problem: —\n\nPlease type a Description for this Button.');
|
1107 |
return false;
|
1123 |
/**/
|
1124 |
$('div#ws-plugin--s2member-ccap-button-prev').html (code.val ().replace (/\<form/, '<form target="_blank"').replace (/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g, Math.round (new Date ().getTime ()) + '~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace (/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g, ''));
|
1125 |
/**/
|
1126 |
+
alert('Your Button has been generated.\nPlease copy/paste the Shortcode into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Independent Custom Capability Buttons should ONLY be displayed to existing Users/Members, and they MUST be logged-in, BEFORE clicking this Button.');
|
1127 |
/**/
|
1128 |
+
shortCode.each /* Focus and select the Shortcode. */ (function()
|
1129 |
{
|
1130 |
this.focus (), this.select ();
|
1131 |
});
|
1133 |
return false;
|
1134 |
};
|
1135 |
/**/
|
1136 |
+
ws_plugin__s2member_paypalSpButtonGenerate = /* Handles PayPal® Button Generation for Specific Post/Page Access. */ function()
|
1137 |
{
|
1138 |
var shortCodeTemplate = '[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]', shortCodeTemplateAttrs = '';
|
1139 |
/**/
|
1147 |
var regAmount = $('input#ws-plugin--s2member-sp-amount').val ().replace (/[^0-9\.]/g, '');
|
1148 |
var desc = $.trim ($('input#ws-plugin--s2member-sp-desc').val ().replace (/"/g, ''));
|
1149 |
/**/
|
1150 |
+
var /* NOT yet configurable. */ localeCode = '', digital = '0', noShipping = '1';
|
1151 |
var pageStyle = $.trim ($('input#ws-plugin--s2member-sp-page-style').val ().replace (/"/g, ''));
|
1152 |
var currencyCode = $('select#ws-plugin--s2member-sp-currency').val ().replace (/[^A-Z]/g, '');
|
1153 |
/**/
|
1154 |
+
if /* Must have a Leading Post/Page ID to work with. Otherwise, Link generation will fail. */ (!leading)
|
1155 |
{
|
1156 |
alert('— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it\'s because you\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.');
|
1157 |
return false;
|
1161 |
alert('— Oops, a slight problem: —\n\nAmount must be >= 0.01');
|
1162 |
return false;
|
1163 |
}
|
1164 |
+
else if /* $10,000.00 maximum. */ (regAmount > 10000.00)
|
1165 |
{
|
1166 |
alert('— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00');
|
1167 |
return false;
|
1168 |
}
|
1169 |
+
else if /* Each Button should have a Description. */ (!desc)
|
1170 |
{
|
1171 |
alert('— Oops, a slight problem: —\n\nPlease type a Description for this Button.');
|
1172 |
return false;
|
1176 |
if (additionals[i] && additionals[i] !== leading)
|
1177 |
ids += ',' + additionals[i];
|
1178 |
/**/
|
1179 |
+
var /* Combined sp:ids:expiration hours. */ spIdsHours = 'sp:' + ids + ':' + hours;
|
1180 |
/**/
|
1181 |
shortCodeTemplateAttrs += 'sp="1" ids="' + esc_attr(ids) + '" exp="' + esc_attr(hours) + '" desc="' + esc_attr(desc) + '" ps="' + esc_attr(pageStyle) + '" lc="' + esc_attr(localeCode) + '" cc="' + esc_attr(currencyCode) + '" dg="' + esc_attr(digital) + '" ns="' + esc_attr(noShipping) + '"';
|
1182 |
shortCodeTemplateAttrs += ' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="' + esc_attr(regAmount) + '"';
|
1194 |
/**/
|
1195 |
$('div#ws-plugin--s2member-sp-button-prev').html (code.val ().replace (/\<form/, '<form target="_blank"').replace (/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g, Math.round (new Date ().getTime ()) + '~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["REMOTE_ADDR"])); ?>').replace (/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g, ''));
|
1196 |
/**/
|
1197 |
+
alert('Your Button has been generated.\nPlease copy/paste the Shortcode into your WordPress® Editor.');
|
1198 |
/**/
|
1199 |
+
shortCode.each ( /* Focus and select the Shortcode. */function()
|
1200 |
{
|
1201 |
this.focus (), this.select ();
|
1202 |
});
|
1204 |
return false;
|
1205 |
};
|
1206 |
/**/
|
1207 |
+
ws_plugin__s2member_paypalRegLinkGenerate = /* Handles PayPal® Link Generation. */ function()
|
1208 |
{
|
1209 |
var level = $('select#ws-plugin--s2member-reg-link-level').val ().replace (/[^0-9]/g, '');
|
1210 |
var subscrID = $.trim ($('input#ws-plugin--s2member-reg-link-subscr-id').val ());
|
1214 |
var $link = $('p#ws-plugin--s2member-reg-link'), $loading = $('img#ws-plugin--s2member-reg-link-loading');
|
1215 |
/**/
|
1216 |
var levelCcapsPer = (fixedTerm && !fixedTerm.match (/L$/)) ? level + ':' + cCaps + ':' + fixedTerm : level + ':' + cCaps;
|
1217 |
+
levelCcapsPer = /* Clean any trailing separators from this string. */ levelCcapsPer.replace (/\:+$/g, '');
|
1218 |
/**/
|
1219 |
+
if /* We must have a Paid Subscr. ID value. */ (!subscrID)
|
1220 |
{
|
1221 |
alert('— Oops, a slight problem: —\n\nPaid Subscr. ID is a required value.');
|
1222 |
return false;
|
1226 |
alert('— Oops, a slight problem: —\n\nThe Custom Value MUST start with your domain name.');
|
1227 |
return false;
|
1228 |
}
|
1229 |
+
else if /* Check format. */ (fixedTerm && !fixedTerm.match (/^[1-9]+ (D|W|M|Y|L)$/))
|
1230 |
{
|
1231 |
alert('— Oops, a slight problem: —\n\nThe Fixed Term Length is not formatted properly.');
|
1232 |
return false;
|
1240 |
return false;
|
1241 |
};
|
1242 |
/**/
|
1243 |
+
ws_plugin__s2member_paypalSpLinkGenerate = /* Handles PayPal® Link Generation. */ function()
|
1244 |
{
|
1245 |
var leading = $('select#ws-plugin--s2member-sp-link-leading-id').val ().replace (/[^0-9]/g, '');
|
1246 |
var additionals = $('select#ws-plugin--s2member-sp-link-additional-ids').val () || [];
|
1247 |
var hours = $('select#ws-plugin--s2member-sp-link-hours').val ().replace (/[^0-9]/g, '');
|
1248 |
var $link = $('p#ws-plugin--s2member-sp-link'), $loading = $('img#ws-plugin--s2member-sp-link-loading');
|
1249 |
/**/
|
1250 |
+
if /* Must have a Leading Post/Page ID to work with. Otherwise, Link generation will fail. */ (!leading)
|
1251 |
{
|
1252 |
alert('— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it\'s because you\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.');
|
1253 |
return false;
|
1274 |
var $rows = $('tr.ws-plugin--s2member-custom-reg-opt-in-label-row');
|
1275 |
var $prevImg = $('img.ws-plugin--s2member-custom-reg-opt-in-label-prev-img');
|
1276 |
/**/
|
1277 |
+
if /* Checkbox disabled. */ (val <= 0)
|
1278 |
$rows.css ('display', 'none'), $prevImg.attr ('src', $prevImg.attr ('src').replace (/\/checked\.png$/, '/unchecked.png'));
|
1279 |
/**/
|
1280 |
+
else if /* Enabled, checked by default. */ (val == 1)
|
1281 |
$rows.css ('display', ''), $prevImg.attr ('src', $prevImg.attr ('src').replace (/\/unchecked\.png$/, '/checked.png'));
|
1282 |
/**/
|
1283 |
+
else if /* Enabled, unchecked by default. */ (val == 2)
|
1284 |
$rows.css ('display', ''), $prevImg.attr ('src', $prevImg.attr ('src').replace (/\/checked\.png$/, '/unchecked.png'));
|
1285 |
});
|
1286 |
/**/
|
1287 |
$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs\[\]"]').change (function()
|
1288 |
{
|
1289 |
+
var /* Record value associated with change event. Also initialize checkedIndexes array. */ thisChange = $(this).val (), checkedIndexes = [];
|
1290 |
/**/
|
1291 |
$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs\[\]"]').each (function()
|
1292 |
{
|
1293 |
var $this = $(this), val = $this.val (), checkboxes = 'input[type="checkbox"]';
|
1294 |
/**/
|
1295 |
+
if /* All sub-items get checked/disabled too. */ (val === 'removal-deletion' && this.checked)
|
1296 |
$this.nextAll (checkboxes).slice (0, 2).attr ({'checked': 'checked', 'disabled': 'disabled'});
|
1297 |
/**/
|
1298 |
else if (val === 'removal-deletion' && !this.checked)
|
1301 |
(thisChange === 'removal-deletion') ? $this.nextAll (checkboxes).slice (0, 2).removeAttr ('checked') : null;
|
1302 |
}
|
1303 |
/**/
|
1304 |
+
else if /* All sub-items get checked/disabled too. */ (val === 'modification' && this.checked)
|
1305 |
$this.nextAll (checkboxes).slice (0, 3).attr ({'checked': 'checked', 'disabled': 'disabled'});
|
1306 |
/**/
|
1307 |
else if (val === 'modification' && !this.checked)
|
1311 |
}
|
1312 |
})
|
1313 |
/**/
|
1314 |
+
.each ( /* Now, which ones are checked? */function(index)
|
1315 |
{
|
1316 |
(this.checked) ? checkedIndexes.push (index) : null;
|
1317 |
});
|
1322 |
/**/
|
1323 |
}).last ().trigger ('change');
|
1324 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1325 |
});
|
includes/menu-pages/menu-pages.css
CHANGED
@@ -139,6 +139,19 @@ table.ws-menu-page-table
|
|
139 |
border: 0;
|
140 |
width: 100%;
|
141 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
table.ws-menu-page-table > tbody > tr
|
143 |
{
|
144 |
vertical-align: top;
|
@@ -304,15 +317,15 @@ table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr >
|
|
304 |
padding: 10px 10px 0 0;
|
305 |
font-family: 'Georgia', serif;
|
306 |
}
|
307 |
-
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > th.ws-menu-page-th-side
|
308 |
-
{
|
309 |
-
width: 200px;
|
310 |
-
}
|
311 |
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td
|
312 |
{
|
313 |
width: auto;
|
314 |
padding: 8px 10px 8px 0;
|
315 |
}
|
|
|
|
|
|
|
|
|
316 |
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > input[type = "text"],
|
317 |
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > input[type = "password"],
|
318 |
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > textarea,
|
@@ -325,6 +338,14 @@ table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr >
|
|
325 |
-moz-box-sizing: border-box;
|
326 |
-webkit-box-sizing: border-box;
|
327 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > input[type = "checkbox"],
|
329 |
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > input[type = "radio"]
|
330 |
{
|
@@ -336,27 +357,6 @@ table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr >
|
|
336 |
float: left;
|
337 |
margin: 5px 25px 0 0;
|
338 |
}
|
339 |
-
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > textarea
|
340 |
-
{
|
341 |
-
font-family: 'Courier New', monospace;
|
342 |
-
}
|
343 |
-
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > select
|
344 |
-
{
|
345 |
-
width: 99.5% !ie<8; /* Required in IE < 8. */
|
346 |
-
}
|
347 |
-
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > ul,
|
348 |
-
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > ol
|
349 |
-
{
|
350 |
-
margin: 10px 0 10px 20px;
|
351 |
-
}
|
352 |
-
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > ul > li
|
353 |
-
{
|
354 |
-
list-style: disc outside;
|
355 |
-
}
|
356 |
-
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > ol > li
|
357 |
-
{
|
358 |
-
list-style: decimal outside;
|
359 |
-
}
|
360 |
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > div.ws-menu-page-scrollbox
|
361 |
{
|
362 |
margin: 1px;
|
@@ -406,7 +406,7 @@ Specifically for the right sidebar panel.
|
|
406 |
These CSS selectors address common layout styles.
|
407 |
*/
|
408 |
td.ws-menu-page-table-r div.ws-menu-page-js-c-w,
|
409 |
-
td.ws-menu-page-table-r div.ws-menu-page-
|
410 |
td.ws-menu-page-table-r div.ws-menu-page-installation,
|
411 |
td.ws-menu-page-table-r div.ws-menu-page-tools,
|
412 |
td.ws-menu-page-table-r div.ws-menu-page-videos,
|
@@ -441,15 +441,15 @@ td.ws-menu-page-table-r div.ws-menu-page-js-c-w
|
|
441 |
}
|
442 |
/*
|
443 |
Specifically for the right sidebar panel.
|
444 |
-
- Specifically for the
|
445 |
These CSS selectors address common layout styles.
|
446 |
*/
|
447 |
-
div.ws-menu-page-
|
448 |
{
|
449 |
padding: 0;
|
450 |
margin: 0 0 0 12px;
|
451 |
}
|
452 |
-
div.ws-menu-page-
|
453 |
{
|
454 |
padding: 0;
|
455 |
margin: 5px 0 5px 0;
|
@@ -458,37 +458,41 @@ div.ws-menu-page-mlist ul > li
|
|
458 |
-webkit-user-select: none;
|
459 |
user-select: none;
|
460 |
}
|
461 |
-
div.ws-menu-page-
|
462 |
{
|
463 |
margin-top: 0;
|
464 |
}
|
465 |
-
div.ws-menu-page-
|
466 |
{
|
467 |
padding-right: 18px;
|
468 |
background: url('<?php echo $i; ?>/brand-xlink.png') no-repeat center right;
|
469 |
}
|
470 |
-
div.ws-menu-page-
|
471 |
{
|
472 |
display: none;
|
473 |
}
|
474 |
-
div.ws-menu-page-
|
475 |
-
div.ws-menu-page-
|
476 |
-
div.ws-menu-page-
|
477 |
-
div.ws-menu-page-
|
478 |
-
div.ws-menu-page-
|
479 |
-
div.ws-menu-page-mlist div#ws-mlist-div-priv
|
480 |
{
|
481 |
margin: 0 0 10px 0;
|
482 |
}
|
483 |
-
div.ws-menu-page-
|
484 |
{
|
485 |
margin: 15px 0 0 0;
|
486 |
}
|
487 |
-
div.ws-menu-page-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
|
|
|
|
|
|
|
|
|
|
492 |
{
|
493 |
width: 100%; /* 100% does not work across all browsers. */
|
494 |
width: 98% !ie<8; /* 100% does not work in IE browsers < 8. */
|
@@ -497,29 +501,17 @@ div.ws-menu-page-mlist select
|
|
497 |
-moz-box-sizing: border-box;
|
498 |
-webkit-box-sizing: border-box;
|
499 |
}
|
500 |
-
div.ws-menu-page-
|
501 |
-
div.ws-menu-page-
|
502 |
{
|
503 |
margin-right: 3px;
|
504 |
vertical-align: middle;
|
505 |
}
|
506 |
-
div.ws-menu-page-
|
507 |
{
|
508 |
width: 100% !ie<8; /* This width required in IE < 8. */
|
509 |
}
|
510 |
-
div.ws-menu-page-
|
511 |
{
|
512 |
width: 99.5% !ie<8; /* Required in IE < 8. */
|
513 |
-
}
|
514 |
-
div.ws-menu-page-mlist div#ws-mlist-div-groups > ul,
|
515 |
-
div.ws-menu-page-mlist div#ws-mlist-div-groups > ul > li
|
516 |
-
{
|
517 |
-
margin: 0;
|
518 |
-
font-size: 90%;
|
519 |
-
list-style: none;
|
520 |
-
}
|
521 |
-
div.ws-menu-page-mlist div#ws-mlist-div-priv
|
522 |
-
{
|
523 |
-
font-size: 80%;
|
524 |
-
margin: 0 0 5px 0;
|
525 |
}
|
139 |
border: 0;
|
140 |
width: 100%;
|
141 |
}
|
142 |
+
table.ws-menu-page-table ul,
|
143 |
+
table.ws-menu-page-table ol
|
144 |
+
{
|
145 |
+
margin: 10px 0 10px 20px;
|
146 |
+
}
|
147 |
+
table.ws-menu-page-table ul > li
|
148 |
+
{
|
149 |
+
list-style: disc outside;
|
150 |
+
}
|
151 |
+
table.ws-menu-page-table ol > li
|
152 |
+
{
|
153 |
+
list-style: decimal outside;
|
154 |
+
}
|
155 |
table.ws-menu-page-table > tbody > tr
|
156 |
{
|
157 |
vertical-align: top;
|
317 |
padding: 10px 10px 0 0;
|
318 |
font-family: 'Georgia', serif;
|
319 |
}
|
|
|
|
|
|
|
|
|
320 |
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td
|
321 |
{
|
322 |
width: auto;
|
323 |
padding: 8px 10px 8px 0;
|
324 |
}
|
325 |
+
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > th.ws-menu-page-th-side
|
326 |
+
{
|
327 |
+
width: 200px;
|
328 |
+
}
|
329 |
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > input[type = "text"],
|
330 |
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > input[type = "password"],
|
331 |
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > textarea,
|
338 |
-moz-box-sizing: border-box;
|
339 |
-webkit-box-sizing: border-box;
|
340 |
}
|
341 |
+
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > select
|
342 |
+
{
|
343 |
+
width: 99.5% !ie<8; /* Required in IE < 8. */
|
344 |
+
}
|
345 |
+
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > textarea
|
346 |
+
{
|
347 |
+
font-family: 'Courier New', monospace;
|
348 |
+
}
|
349 |
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > input[type = "checkbox"],
|
350 |
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > input[type = "radio"]
|
351 |
{
|
357 |
float: left;
|
358 |
margin: 5px 25px 0 0;
|
359 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
360 |
table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > div.ws-menu-page-scrollbox
|
361 |
{
|
362 |
margin: 1px;
|
406 |
These CSS selectors address common layout styles.
|
407 |
*/
|
408 |
td.ws-menu-page-table-r div.ws-menu-page-js-c-w,
|
409 |
+
td.ws-menu-page-table-r div.ws-menu-page-updates,
|
410 |
td.ws-menu-page-table-r div.ws-menu-page-installation,
|
411 |
td.ws-menu-page-table-r div.ws-menu-page-tools,
|
412 |
td.ws-menu-page-table-r div.ws-menu-page-videos,
|
441 |
}
|
442 |
/*
|
443 |
Specifically for the right sidebar panel.
|
444 |
+
- Specifically for the updates box.
|
445 |
These CSS selectors address common layout styles.
|
446 |
*/
|
447 |
+
div.ws-menu-page-updates ul
|
448 |
{
|
449 |
padding: 0;
|
450 |
margin: 0 0 0 12px;
|
451 |
}
|
452 |
+
div.ws-menu-page-updates ul > li
|
453 |
{
|
454 |
padding: 0;
|
455 |
margin: 5px 0 5px 0;
|
458 |
-webkit-user-select: none;
|
459 |
user-select: none;
|
460 |
}
|
461 |
+
div.ws-menu-page-updates ul > li:first-child
|
462 |
{
|
463 |
margin-top: 0;
|
464 |
}
|
465 |
+
div.ws-menu-page-updates a[target = "_blank"]
|
466 |
{
|
467 |
padding-right: 18px;
|
468 |
background: url('<?php echo $i; ?>/brand-xlink.png') no-repeat center right;
|
469 |
}
|
470 |
+
div.ws-menu-page-updates div#creditfooter
|
471 |
{
|
472 |
display: none;
|
473 |
}
|
474 |
+
div.ws-menu-page-updates div#ws-updates-div-fname,
|
475 |
+
div.ws-menu-page-updates div#ws-updates-div-lname,
|
476 |
+
div.ws-menu-page-updates div#ws-updates-div-email,
|
477 |
+
div.ws-menu-page-updates div#ws-updates-div-subs,
|
478 |
+
div.ws-menu-page-updates div#ws-updates-div-priv
|
|
|
479 |
{
|
480 |
margin: 0 0 10px 0;
|
481 |
}
|
482 |
+
div.ws-menu-page-updates div#ws-updates-div-subs
|
483 |
{
|
484 |
margin: 15px 0 0 0;
|
485 |
}
|
486 |
+
div.ws-menu-page-updates div#ws-updates-div-priv
|
487 |
+
{
|
488 |
+
font-size: 80%;
|
489 |
+
margin: 0 0 5px 0;
|
490 |
+
}
|
491 |
+
div.ws-menu-page-updates input[type = "text"],
|
492 |
+
div.ws-menu-page-updates input[type = "password"],
|
493 |
+
div.ws-menu-page-updates input[type = "submit"],
|
494 |
+
div.ws-menu-page-updates textarea,
|
495 |
+
div.ws-menu-page-updates select
|
496 |
{
|
497 |
width: 100%; /* 100% does not work across all browsers. */
|
498 |
width: 98% !ie<8; /* 100% does not work in IE browsers < 8. */
|
501 |
-moz-box-sizing: border-box;
|
502 |
-webkit-box-sizing: border-box;
|
503 |
}
|
504 |
+
div.ws-menu-page-updates input[type = "checkbox"],
|
505 |
+
div.ws-menu-page-updates input[type = "radio"]
|
506 |
{
|
507 |
margin-right: 3px;
|
508 |
vertical-align: middle;
|
509 |
}
|
510 |
+
div.ws-menu-page-updates input[type = "submit"]
|
511 |
{
|
512 |
width: 100% !ie<8; /* This width required in IE < 8. */
|
513 |
}
|
514 |
+
div.ws-menu-page-updates select
|
515 |
{
|
516 |
width: 99.5% !ie<8; /* Required in IE < 8. */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
517 |
}
|
includes/menu-pages/menu-pages.js
CHANGED
@@ -18,12 +18,9 @@
|
|
18 |
* @package WebSharks\Menu Pages
|
19 |
* @since x.xx
|
20 |
*/
|
21 |
-
/*
|
22 |
-
These routines address common layout styles for menu pages.
|
23 |
-
*/
|
24 |
jQuery(document).ready (function($)
|
25 |
{
|
26 |
-
$('div#ws-menu-page-js-c-w').hide
|
27 |
/**/
|
28 |
$(window).resize ( /* Global function. */tb_position /* Thickbox resizer/positioner. */ = function()
|
29 |
{
|
@@ -32,14 +29,14 @@ jQuery(document).ready (function($)
|
|
32 |
$('#TB_ajaxContent').css ({'width': w - 50 + 'px', 'height': h - 75 - admin_bar_h + 'px', 'margin': 0, 'padding': 0});
|
33 |
});
|
34 |
/**/
|
35 |
-
var $groups = $('div.ws-menu-page-group');
|
36 |
-
$groups.each (
|
37 |
{
|
38 |
var $this = $(this), ins = '<ins>+</ins>', $group = $this, title = $.trim ($group.attr ('title'));
|
39 |
/**/
|
40 |
var $header = $('<div class="ws-menu-page-group-header">' + ins + title + '</div>');
|
41 |
/**/
|
42 |
-
$header.css ({'z-index': 100 - index});
|
43 |
/**/
|
44 |
$header.insertBefore ($group), $group.hide (), $header.click (function()
|
45 |
{
|
@@ -48,13 +45,13 @@ jQuery(document).ready (function($)
|
|
48 |
if ($group.css ('display') === 'none')
|
49 |
$this.addClass ('open'), $ins.html ('-'), $group.show ();
|
50 |
/**/
|
51 |
-
else /* Else remove open class and hide
|
52 |
$this.removeClass ('open'), $ins.html ('+'), $group.hide ();
|
53 |
/**/
|
54 |
-
return false;
|
55 |
});
|
56 |
/**/
|
57 |
-
if
|
58 |
{
|
59 |
$('<div class="ws-menu-page-groups-show">+</div>').insertBefore ($header).click (function()
|
60 |
{
|
@@ -64,10 +61,10 @@ jQuery(document).ready (function($)
|
|
64 |
/**/
|
65 |
$this.addClass ('open'), $ins.html ('-'), $group.show ();
|
66 |
/**/
|
67 |
-
return; /* Return
|
68 |
});
|
69 |
/**/
|
70 |
-
return false;
|
71 |
});
|
72 |
/**/
|
73 |
$('<div class="ws-menu-page-groups-hide">-</div>').insertBefore ($header).click (function()
|
@@ -78,20 +75,20 @@ jQuery(document).ready (function($)
|
|
78 |
/**/
|
79 |
$this.removeClass ('open'), $ins.html ('+'), $group.hide ();
|
80 |
/**/
|
81 |
-
return; /* Return
|
82 |
});
|
83 |
/**/
|
84 |
-
return false;
|
85 |
});
|
86 |
}
|
87 |
/**/
|
88 |
if ($group.attr ('default-state') === 'open')
|
89 |
$header.trigger ('click');
|
90 |
/**/
|
91 |
-
return; /* Return
|
92 |
});
|
93 |
/**/
|
94 |
-
if
|
95 |
{
|
96 |
$('div.ws-menu-page-group-header:first').css ({'margin-right': '140px'});
|
97 |
$('div.ws-menu-page-group:first').css ({'margin-right': '145px'});
|
@@ -104,32 +101,32 @@ jQuery(document).ready (function($)
|
|
104 |
if ($group.css ('display') === 'none')
|
105 |
$('ins', $this).html ('-'), $this.addClass ('open'), $group.show ();
|
106 |
/**/
|
107 |
-
else /* Otherwise, we hide
|
108 |
{
|
109 |
$('ins', $this).html ('+'), $this.removeClass ('open');
|
110 |
$group.hide ();
|
111 |
}
|
112 |
/**/
|
113 |
-
return false;
|
114 |
});
|
115 |
/**/
|
116 |
$('div.ws-menu-page-group-header:first, div.ws-menu-page-r-group-header:first').css ({'margin-top': '0'});
|
117 |
$('div.ws-menu-page-group > div.ws-menu-page-section:first-child > h3').css ({'margin-top': '0'});
|
118 |
$('div.ws-menu-page-readme > div.readme > div.section:last-child').css ({'border-bottom-width': '0'});
|
119 |
/**/
|
120 |
-
$('input.ws-menu-page-media-btn').filter (
|
121 |
{
|
122 |
-
return ($(this).attr ('rel')) ? true : false;
|
123 |
})/**/
|
124 |
-
.click (
|
125 |
{
|
126 |
-
var $this =
|
127 |
/**/
|
128 |
-
window.send_to_editor =
|
129 |
{
|
130 |
var $inp, $txt, rel = $.trim ($this.attr ('rel'));
|
131 |
/**/
|
132 |
-
if (rel && ($inp = $('input#' + rel)).length > 0)
|
133 |
{
|
134 |
var oBg = $inp.css ('background-color'), src = $.trim ($(html).attr ('src'));
|
135 |
src = (!src) ? $.trim ($('img', html).attr ('src')) : src;
|
@@ -139,11 +136,11 @@ jQuery(document).ready (function($)
|
|
139 |
$inp.css ({'background-color': oBg});
|
140 |
}, 2000);
|
141 |
/**/
|
142 |
-
tb_remove
|
143 |
/**/
|
144 |
-
return; /* Return
|
145 |
}
|
146 |
-
else if (rel && ($txt = $('textarea#' + rel)).length > 0)
|
147 |
{
|
148 |
var oBg = $txt.css ('background-color'), src = $.trim ($(html).attr ('src'));
|
149 |
src = (!src) ? $.trim ($('img', html).attr ('src')) : src;
|
@@ -153,31 +150,31 @@ jQuery(document).ready (function($)
|
|
153 |
$txt.css ({'background-color': oBg});
|
154 |
}, 2000);
|
155 |
/**/
|
156 |
-
tb_remove
|
157 |
/**/
|
158 |
-
return; /* Return
|
159 |
}
|
160 |
};
|
161 |
/**/
|
162 |
tb_show('', './media-upload.php?type=image&TB_iframe=true');
|
163 |
/**/
|
164 |
-
return false;
|
165 |
});
|
166 |
/**/
|
167 |
-
$('form#ws-
|
168 |
{
|
169 |
-
var errors =
|
170 |
/**/
|
171 |
-
if (!$.trim ($('input#ws-
|
172 |
errors += 'First Name missing, please try again.\n\n';
|
173 |
/**/
|
174 |
-
if (!$.trim ($('input#ws-
|
175 |
errors += 'Last Name missing, please try again.\n\n';
|
176 |
/**/
|
177 |
-
if (!$.trim ($('input#ws-
|
178 |
errors += 'Email missing, please try again.\n\n';
|
179 |
/**/
|
180 |
-
else if (!$('input#ws-
|
181 |
errors += 'Invalid email address, please try again.\n\n';
|
182 |
/**/
|
183 |
if (errors = $.trim (errors))
|
18 |
* @package WebSharks\Menu Pages
|
19 |
* @since x.xx
|
20 |
*/
|
|
|
|
|
|
|
21 |
jQuery(document).ready (function($)
|
22 |
{
|
23 |
+
$('div#ws-menu-page-js-c-w').hide /* Hide JavaScript conflict warning. */ ();
|
24 |
/**/
|
25 |
$(window).resize ( /* Global function. */tb_position /* Thickbox resizer/positioner. */ = function()
|
26 |
{
|
29 |
$('#TB_ajaxContent').css ({'width': w - 50 + 'px', 'height': h - 75 - admin_bar_h + 'px', 'margin': 0, 'padding': 0});
|
30 |
});
|
31 |
/**/
|
32 |
+
var $groups = /* Query groups. */ $('div.ws-menu-page-group');
|
33 |
+
$groups.each ( /* Go through each group, one at a time. */function(index)
|
34 |
{
|
35 |
var $this = $(this), ins = '<ins>+</ins>', $group = $this, title = $.trim ($group.attr ('title'));
|
36 |
/**/
|
37 |
var $header = $('<div class="ws-menu-page-group-header">' + ins + title + '</div>');
|
38 |
/**/
|
39 |
+
$header.css /* Stack them sequentially, top to bottom. */ ({'z-index': 100 - index});
|
40 |
/**/
|
41 |
$header.insertBefore ($group), $group.hide (), $header.click (function()
|
42 |
{
|
45 |
if ($group.css ('display') === 'none')
|
46 |
$this.addClass ('open'), $ins.html ('-'), $group.show ();
|
47 |
/**/
|
48 |
+
else /* Else remove open class and hide group. */
|
49 |
$this.removeClass ('open'), $ins.html ('+'), $group.hide ();
|
50 |
/**/
|
51 |
+
return /* Return. */ false;
|
52 |
});
|
53 |
/**/
|
54 |
+
if /* These are the buttons for showing/hiding all groups. */ ($groups.length > 1 && index === 0)
|
55 |
{
|
56 |
$('<div class="ws-menu-page-groups-show">+</div>').insertBefore ($header).click (function()
|
57 |
{
|
61 |
/**/
|
62 |
$this.addClass ('open'), $ins.html ('-'), $group.show ();
|
63 |
/**/
|
64 |
+
return; /* Return. */
|
65 |
});
|
66 |
/**/
|
67 |
+
return /* Return. */ false;
|
68 |
});
|
69 |
/**/
|
70 |
$('<div class="ws-menu-page-groups-hide">-</div>').insertBefore ($header).click (function()
|
75 |
/**/
|
76 |
$this.removeClass ('open'), $ins.html ('+'), $group.hide ();
|
77 |
/**/
|
78 |
+
return; /* Return. */
|
79 |
});
|
80 |
/**/
|
81 |
+
return /* Return. */ false;
|
82 |
});
|
83 |
}
|
84 |
/**/
|
85 |
if ($group.attr ('default-state') === 'open')
|
86 |
$header.trigger ('click');
|
87 |
/**/
|
88 |
+
return; /* Return. */
|
89 |
});
|
90 |
/**/
|
91 |
+
if /* We only apply these special margins when there are multiple groups. */ ($groups.length > 1)
|
92 |
{
|
93 |
$('div.ws-menu-page-group-header:first').css ({'margin-right': '140px'});
|
94 |
$('div.ws-menu-page-group:first').css ({'margin-right': '145px'});
|
101 |
if ($group.css ('display') === 'none')
|
102 |
$('ins', $this).html ('-'), $this.addClass ('open'), $group.show ();
|
103 |
/**/
|
104 |
+
else /* Otherwise, we hide this group. */
|
105 |
{
|
106 |
$('ins', $this).html ('+'), $this.removeClass ('open');
|
107 |
$group.hide ();
|
108 |
}
|
109 |
/**/
|
110 |
+
return /* Return. */ false;
|
111 |
});
|
112 |
/**/
|
113 |
$('div.ws-menu-page-group-header:first, div.ws-menu-page-r-group-header:first').css ({'margin-top': '0'});
|
114 |
$('div.ws-menu-page-group > div.ws-menu-page-section:first-child > h3').css ({'margin-top': '0'});
|
115 |
$('div.ws-menu-page-readme > div.readme > div.section:last-child').css ({'border-bottom-width': '0'});
|
116 |
/**/
|
117 |
+
$('input.ws-menu-page-media-btn').filter ( /* Only those that have a rel attribute. */function()
|
118 |
{
|
119 |
+
return /* Must have rel targeting an input id. */ ($(this).attr ('rel')) ? true : false;
|
120 |
})/**/
|
121 |
+
.click ( /* Attach click events to media buttons with send_to_editor(). */function()
|
122 |
{
|
123 |
+
var $this = /* Record a reference to the media button here. */ $(this);
|
124 |
/**/
|
125 |
+
window.send_to_editor = /* Works with Thickbox. */ function(html)
|
126 |
{
|
127 |
var $inp, $txt, rel = $.trim ($this.attr ('rel'));
|
128 |
/**/
|
129 |
+
if /* An input field? */ (rel && ($inp = $('input#' + rel)).length > 0)
|
130 |
{
|
131 |
var oBg = $inp.css ('background-color'), src = $.trim ($(html).attr ('src'));
|
132 |
src = (!src) ? $.trim ($('img', html).attr ('src')) : src;
|
136 |
$inp.css ({'background-color': oBg});
|
137 |
}, 2000);
|
138 |
/**/
|
139 |
+
tb_remove /* Close. */ ();
|
140 |
/**/
|
141 |
+
return; /* Return. */
|
142 |
}
|
143 |
+
else if /* Textarea? */ (rel && ($txt = $('textarea#' + rel)).length > 0)
|
144 |
{
|
145 |
var oBg = $txt.css ('background-color'), src = $.trim ($(html).attr ('src'));
|
146 |
src = (!src) ? $.trim ($('img', html).attr ('src')) : src;
|
150 |
$txt.css ({'background-color': oBg});
|
151 |
}, 2000);
|
152 |
/**/
|
153 |
+
tb_remove /* Close. */ ();
|
154 |
/**/
|
155 |
+
return; /* Return. */
|
156 |
}
|
157 |
};
|
158 |
/**/
|
159 |
tb_show('', './media-upload.php?type=image&TB_iframe=true');
|
160 |
/**/
|
161 |
+
return /* Return. */ false;
|
162 |
});
|
163 |
/**/
|
164 |
+
$('form#ws-updates-form').submit (function()
|
165 |
{
|
166 |
+
var errors = /* Intialize string of errors. */ '';
|
167 |
/**/
|
168 |
+
if (!$.trim ($('input#ws-updates-fname').val ()))
|
169 |
errors += 'First Name missing, please try again.\n\n';
|
170 |
/**/
|
171 |
+
if (!$.trim ($('input#ws-updates-lname').val ()))
|
172 |
errors += 'Last Name missing, please try again.\n\n';
|
173 |
/**/
|
174 |
+
if (!$.trim ($('input#ws-updates-email').val ()))
|
175 |
errors += 'Email missing, please try again.\n\n';
|
176 |
/**/
|
177 |
+
else if (!$('input#ws-updates-email').val ().match (/^([a-z_~0-9\+\-]+)(((\.?)([a-z_~0-9\+\-]+))*)(@)([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i))
|
178 |
errors += 'Invalid email address, please try again.\n\n';
|
179 |
/**/
|
180 |
if (errors = $.trim (errors))
|
includes/menu-pages/mms-ops.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 3.0
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_menu_page_mms_ops"))
|
21 |
{
|
@@ -251,7 +251,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_mms_ops"))
|
|
251 |
echo '<tr>' . "\n";
|
252 |
/**/
|
253 |
echo '<td style="padding-bottom:0;">' . "\n";
|
254 |
-
echo '<input type="text" name="ws_plugin__s2member_mms_registration_blogs_level0" id="ws-plugin--s2member-mms-registration-blogs-level0" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_blogs_level0"]) . '" /><br />' . "\n";
|
255 |
echo 'How many blogs can a Free Subscriber create?' . "\n";
|
256 |
echo '</td>' . "\n";
|
257 |
/**/
|
@@ -278,7 +278,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_mms_ops"))
|
|
278 |
echo '<tr>' . "\n";
|
279 |
/**/
|
280 |
echo '<td>' . "\n";
|
281 |
-
echo '<input type="text" name="ws_plugin__s2member_mms_registration_blogs_level' . $n . '" id="ws-plugin--s2member-mms-registration-blogs-level' . $n . '" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_blogs_level" . $n]) . '" /><br />' . "\n";
|
282 |
echo 'How many blogs can a Member ( at Level #' . $n . ' ) create?' . "\n";
|
283 |
echo '</td>' . "\n";
|
284 |
/**/
|
15 |
* @since 3.0
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_menu_page_mms_ops"))
|
21 |
{
|
251 |
echo '<tr>' . "\n";
|
252 |
/**/
|
253 |
echo '<td style="padding-bottom:0;">' . "\n";
|
254 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_mms_registration_blogs_level0" id="ws-plugin--s2member-mms-registration-blogs-level0" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_blogs_level0"]) . '" /><br />' . "\n";
|
255 |
echo 'How many blogs can a Free Subscriber create?' . "\n";
|
256 |
echo '</td>' . "\n";
|
257 |
/**/
|
278 |
echo '<tr>' . "\n";
|
279 |
/**/
|
280 |
echo '<td>' . "\n";
|
281 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_mms_registration_blogs_level' . $n . '" id="ws-plugin--s2member-mms-registration-blogs-level' . $n . '" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_blogs_level" . $n]) . '" /><br />' . "\n";
|
282 |
echo 'How many blogs can a Member ( at Level #' . $n . ' ) create?' . "\n";
|
283 |
echo '</td>' . "\n";
|
284 |
/**/
|
includes/menu-pages/paypal-buttons.inc.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* @since 3.0
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
21 |
{
|
@@ -71,11 +71,11 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
|
71 |
/**/
|
72 |
echo '<td>' . "\n";
|
73 |
echo '<form onsubmit="return false;">' . "\n";
|
74 |
-
echo '<p id="ws-plugin--s2member-level' . $n . '-trial-line">I\'ll offer the first <input type="text" id="ws-plugin--s2member-level' . $n . '-trial-period" value="0" size="6" /> <select id="ws-plugin--s2member-level' . $n . '-trial-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-trial-terms.php"))) . '</select> @ $<input type="text" id="ws-plugin--s2member-level' . $n . '-trial-amount" value="0.00" size="4" /></p>' . "\n";
|
75 |
-
echo '<p><span id="ws-plugin--s2member-level' . $n . '-trial-then">Then, </span>I want to charge: $<input type="text" id="ws-plugin--s2member-level' . $n . '-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-level' . $n . '-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-regular-terms.php"))) . '</select></p>' . "\n";
|
76 |
-
echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal® account. PayPal® allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal®, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal® Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" id="ws-plugin--s2member-level' . $n . '-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-level' . $n . '-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalButtonGenerate(\'level' . $n . '\');" class="button-primary" /></p>' . "\n";
|
77 |
-
echo '<p>Description: <input type="text" id="ws-plugin--s2member-level' . $n . '-desc" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"]) . ' / description and pricing details here." size="73" /></p>' . "\n";
|
78 |
-
echo '<p' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" id="ws-plugin--s2member-level' . $n . '-ccaps" size="40"
|
79 |
echo '</form>' . "\n";
|
80 |
echo '</td>' . "\n";
|
81 |
/**/
|
@@ -93,7 +93,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
|
93 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%level%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($n)), $ws_plugin__s2member_temp_s);
|
94 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%level_label%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"])), $ws_plugin__s2member_temp_s);
|
95 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_temp_s);
|
96 |
-
echo '<input id="ws-plugin--s2member-level' . $n . '-shortcode"
|
97 |
/**/
|
98 |
echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
|
99 |
echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
|
@@ -111,7 +111,6 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
|
111 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $ws_plugin__s2member_temp_s);
|
112 |
echo format_to_edit ($ws_plugin__s2member_temp_s);
|
113 |
echo '</textarea><br />' . "\n";
|
114 |
-
echo '↑ Use this more advanced Code if you\'re building a theme or plugin that integrates with s2Member.<br />' . "\n";
|
115 |
echo '↑ <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
|
116 |
echo '</div>' . "\n";
|
117 |
/**/
|
@@ -175,11 +174,11 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
|
175 |
/**/
|
176 |
echo '</select></p>' . "\n";
|
177 |
/**/
|
178 |
-
echo '<p id="ws-plugin--s2member-modification-trial-line">I\'ll offer the first <input type="text" id="ws-plugin--s2member-modification-trial-period" value="0" size="6" /> <select id="ws-plugin--s2member-modification-trial-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-trial-terms.php"))) . '</select> @ $<input type="text" id="ws-plugin--s2member-modification-trial-amount" value="0.00" size="4" /></p>' . "\n";
|
179 |
-
echo '<p><span id="ws-plugin--s2member-modification-trial-then">Then, </span>I want to charge: $<input type="text" id="ws-plugin--s2member-modification-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-modification-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-regular-terms.php"))) . '</select><span id="ws-plugin--s2member-modification-20p-rule"><br /><small>* Watch out for <a href="https://www.x.com/thread/41748" target="_blank" rel="external">the 20% rule</a>. Additional details are <a href="http://www.s2member.com/paypal-20p-rule" target="_blank" rel="external">documented here</a>.<br />* <strong>Tip</strong> <a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Pro Module / Prices")) . '" target="_blank" rel="external">s2Member Pro Forms</a> are NOT subjected to this ridiculous 20% rule.</small></span></p>' . "\n";
|
180 |
-
echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal® account. PayPal® allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal®, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal® Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" id="ws-plugin--s2member-modification-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-modification-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalButtonGenerate(\'modification\');" class="button-primary" /></p>' . "\n";
|
181 |
-
echo '<p>Description: <input type="text" id="ws-plugin--s2member-modification-desc" value="Description and pricing details here." size="73" /></p>' . "\n";
|
182 |
-
echo '<p' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" id="ws-plugin--s2member-modification-ccaps" size="40"
|
183 |
echo '</form>' . "\n";
|
184 |
echo '</td>' . "\n";
|
185 |
/**/
|
@@ -195,7 +194,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
|
195 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%level_label%% /", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level1_label"])), $ws_plugin__s2member_temp_s);
|
196 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_temp_s);
|
197 |
$ws_plugin__s2member_temp_s = preg_replace ("/\/]$/", 'modify="1" /]', $ws_plugin__s2member_temp_s); /* Adds modify="1" to the end of the Shortcode. */
|
198 |
-
echo '<input id="ws-plugin--s2member-modification-shortcode"
|
199 |
/**/
|
200 |
echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
|
201 |
echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
|
@@ -214,7 +213,6 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
|
214 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $ws_plugin__s2member_temp_s);
|
215 |
echo format_to_edit ($ws_plugin__s2member_temp_s);
|
216 |
echo '</textarea><br />' . "\n";
|
217 |
-
echo '↑ Use this more advanced Code if you\'re building a theme or plugin that integrates with s2Member.<br />' . "\n";
|
218 |
echo '↑ <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
|
219 |
echo '</div>' . "\n";
|
220 |
/**/
|
@@ -260,10 +258,10 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
|
260 |
/**/
|
261 |
echo '<td>' . "\n";
|
262 |
echo '<form onsubmit="return false;">' . "\n";
|
263 |
-
echo '<p>I want to charge: $<input type="text" id="ws-plugin--s2member-ccap-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-ccap-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-ccap-terms.php"))) . '</select></p>' . "\n";
|
264 |
-
echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal® account. PayPal® allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal®, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal® Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" id="ws-plugin--s2member-ccap-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-ccap-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalCcapButtonGenerate();" class="button-primary" /></p>' . "\n";
|
265 |
-
echo '<p>Description: <input type="text" id="ws-plugin--s2member-ccap-desc" value="Description and pricing details here." size="73" /></p>' . "\n";
|
266 |
-
echo '<p>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\'); return false;" tabindex="-1">[?]</a> <input type="text" id="ws-plugin--s2member-ccap-ccaps" size="40"
|
267 |
echo '</form>' . "\n";
|
268 |
echo '</td>' . "\n";
|
269 |
/**/
|
@@ -276,7 +274,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
|
276 |
echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual & HTML Editors )<br />' . "\n";
|
277 |
$ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/shortcodes/paypal-ccaps-checkout-button-shortcode.php")));
|
278 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_temp_s);
|
279 |
-
echo '<input id="ws-plugin--s2member-ccap-shortcode"
|
280 |
/**/
|
281 |
echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
|
282 |
echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
|
@@ -292,7 +290,6 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
|
292 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $ws_plugin__s2member_temp_s);
|
293 |
echo format_to_edit ($ws_plugin__s2member_temp_s);
|
294 |
echo '</textarea><br />' . "\n";
|
295 |
-
echo '↑ Use this more advanced Code if you\'re building a theme or plugin that integrates with s2Member.<br />' . "\n";
|
296 |
echo '↑ <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
|
297 |
echo '</div>' . "\n";
|
298 |
/**/
|
@@ -356,7 +353,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
|
356 |
do_action ("ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_during_cancellation_buttons_before_shortcode", get_defined_vars ());
|
357 |
echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual & HTML Editors )<br />' . "\n";
|
358 |
$ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/shortcodes/paypal-cancellation-button-shortcode.php")));
|
359 |
-
echo '<input id="ws-plugin--s2member-cancellation-shortcode"
|
360 |
/**/
|
361 |
echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
|
362 |
echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
|
@@ -368,7 +365,6 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
|
368 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $ws_plugin__s2member_temp_s);
|
369 |
echo format_to_edit ($ws_plugin__s2member_temp_s);
|
370 |
echo '</textarea><br />' . "\n";
|
371 |
-
echo '↑ Use this more advanced Code if you\'re building a theme or plugin that integrates with s2Member.<br />' . "\n";
|
372 |
echo '↑ <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
|
373 |
echo '</div>' . "\n";
|
374 |
/**/
|
@@ -406,10 +402,10 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
|
406 |
for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
|
407 |
echo '<option value="' . $n . '">s2Member Level #' . $n . '</option>' . "\n";
|
408 |
echo '</select></p>' . "\n";
|
409 |
-
echo '<p>Paid Subscr. ID: <input id="ws-plugin--s2member-reg-link-subscr-id"
|
410 |
-
echo '<p>Custom String Value: <input id="ws-plugin--s2member-reg-link-custom"
|
411 |
-
echo '<p' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\'); return false;" tabindex="-1">[?]</a> <input type="text" id="ws-plugin--s2member-reg-link-ccaps" size="40"
|
412 |
-
echo '<p>Fixed Term Length ( for Buy Now transactions ): <input id="ws-plugin--s2member-reg-link-fixed-term"
|
413 |
echo '<p id="ws-plugin--s2member-reg-link" style="font-family:Consolas, monospace; display:none;"></p>' . "\n";
|
414 |
echo '</form>' . "\n";
|
415 |
echo '</td>' . "\n";
|
@@ -471,9 +467,9 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
|
471 |
/**/
|
472 |
echo '</optgroup></select> <a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page ( they\\\'ll land on your Leading Post/Page after checkout ), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically ( e.g. only one Access Link is needed, and s2Member generates this automatically ). However, you will STILL need to design your Leading Post/Page ( which is what a Customer will actually land on ), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* s2Member sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this menu, it\\\'s because you\\\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
|
473 |
/**/
|
474 |
-
echo '<p>I want to charge: $<input type="text" id="ws-plugin--s2member-sp-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-sp-hours">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-sp-hours.php"))) . '</select></p>' . "\n";
|
475 |
-
echo '<p>Description: <input type="text" id="ws-plugin--s2member-sp-desc" value="Description and pricing details here." size="68" /></p>' . "\n";
|
476 |
-
echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal® account. PayPal® allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal®, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal® Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" id="ws-plugin--s2member-sp-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-sp-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalSpButtonGenerate();" class="button-primary" /></p>' . "\n";
|
477 |
echo '</form>' . "\n";
|
478 |
echo '</td>' . "\n";
|
479 |
/**/
|
@@ -486,7 +482,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
|
486 |
echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual & HTML Editors )<br />' . "\n";
|
487 |
$ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/shortcodes/paypal-sp-checkout-button-shortcode.php")));
|
488 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_temp_s);
|
489 |
-
echo '<input id="ws-plugin--s2member-sp-shortcode"
|
490 |
/**/
|
491 |
echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
|
492 |
echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
|
@@ -502,7 +498,6 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
|
502 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $ws_plugin__s2member_temp_s);
|
503 |
echo format_to_edit ($ws_plugin__s2member_temp_s);
|
504 |
echo '</textarea><br />' . "\n";
|
505 |
-
echo '↑ Use this more advanced Code if you\'re building a theme or plugin that integrates with s2Member.<br />' . "\n";
|
506 |
echo '↑ <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
|
507 |
echo '</div>' . "\n";
|
508 |
/**/
|
15 |
* @since 3.0
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
+
exit ("Do not access this file directly.");
|
19 |
/**/
|
20 |
if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
|
21 |
{
|
71 |
/**/
|
72 |
echo '<td>' . "\n";
|
73 |
echo '<form onsubmit="return false;">' . "\n";
|
74 |
+
echo '<p id="ws-plugin--s2member-level' . $n . '-trial-line">I\'ll offer the first <input type="text" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-trial-period" value="0" size="6" /> <select id="ws-plugin--s2member-level' . $n . '-trial-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-trial-terms.php"))) . '</select> @ $<input type="text" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-trial-amount" value="0.00" size="4" /></p>' . "\n";
|
75 |
+
echo '<p><span id="ws-plugin--s2member-level' . $n . '-trial-then">Then, </span>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-level' . $n . '-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-regular-terms.php"))) . '</select></p>' . "\n";
|
76 |
+
echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal® account. PayPal® allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal®, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal® Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-level' . $n . '-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalButtonGenerate(\'level' . $n . '\');" class="button-primary" /></p>' . "\n";
|
77 |
+
echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-desc" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"]) . ' / description and pricing details here." size="73" /></p>' . "\n";
|
78 |
+
echo '<p' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-ccaps" size="40" /></p>' . "\n";
|
79 |
echo '</form>' . "\n";
|
80 |
echo '</td>' . "\n";
|
81 |
/**/
|
93 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%level%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($n)), $ws_plugin__s2member_temp_s);
|
94 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%level_label%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"])), $ws_plugin__s2member_temp_s);
|
95 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_temp_s);
|
96 |
+
echo '<input type="text" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-shortcode" value="' . format_to_edit ($ws_plugin__s2member_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
|
97 |
/**/
|
98 |
echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
|
99 |
echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
|
111 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $ws_plugin__s2member_temp_s);
|
112 |
echo format_to_edit ($ws_plugin__s2member_temp_s);
|
113 |
echo '</textarea><br />' . "\n";
|
|
|
114 |
echo '↑ <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
|
115 |
echo '</div>' . "\n";
|
116 |
/**/
|
174 |
/**/
|
175 |
echo '</select></p>' . "\n";
|
176 |
/**/
|
177 |
+
echo '<p id="ws-plugin--s2member-modification-trial-line">I\'ll offer the first <input type="text" autocomplete="off" id="ws-plugin--s2member-modification-trial-period" value="0" size="6" /> <select id="ws-plugin--s2member-modification-trial-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-trial-terms.php"))) . '</select> @ $<input type="text" autocomplete="off" id="ws-plugin--s2member-modification-trial-amount" value="0.00" size="4" /></p>' . "\n";
|
178 |
+
echo '<p><span id="ws-plugin--s2member-modification-trial-then">Then, </span>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--s2member-modification-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-modification-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-regular-terms.php"))) . '</select><span id="ws-plugin--s2member-modification-20p-rule"><br /><small>* Watch out for <a href="https://www.x.com/thread/41748" target="_blank" rel="external">the 20% rule</a>. Additional details are <a href="http://www.s2member.com/paypal-20p-rule" target="_blank" rel="external">documented here</a>.<br />* <strong>Tip</strong> <a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Pro Module / Prices")) . '" target="_blank" rel="external">s2Member Pro Forms</a> are NOT subjected to this ridiculous 20% rule.</small></span></p>' . "\n";
|
179 |
+
echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal® account. PayPal® allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal®, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal® Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--s2member-modification-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-modification-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalButtonGenerate(\'modification\');" class="button-primary" /></p>' . "\n";
|
180 |
+
echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--s2member-modification-desc" value="Description and pricing details here." size="73" /></p>' . "\n";
|
181 |
+
echo '<p' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-modification-ccaps" size="40" /></p>' . "\n";
|
182 |
echo '</form>' . "\n";
|
183 |
echo '</td>' . "\n";
|
184 |
/**/
|
194 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%level_label%% /", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level1_label"])), $ws_plugin__s2member_temp_s);
|
195 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_temp_s);
|
196 |
$ws_plugin__s2member_temp_s = preg_replace ("/\/]$/", 'modify="1" /]', $ws_plugin__s2member_temp_s); /* Adds modify="1" to the end of the Shortcode. */
|
197 |
+
echo '<input type="text" autocomplete="off" id="ws-plugin--s2member-modification-shortcode" value="' . format_to_edit ($ws_plugin__s2member_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
|
198 |
/**/
|
199 |
echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
|
200 |
echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
|
213 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $ws_plugin__s2member_temp_s);
|
214 |
echo format_to_edit ($ws_plugin__s2member_temp_s);
|
215 |
echo '</textarea><br />' . "\n";
|
|
|
216 |
echo '↑ <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
|
217 |
echo '</div>' . "\n";
|
218 |
/**/
|
258 |
/**/
|
259 |
echo '<td>' . "\n";
|
260 |
echo '<form onsubmit="return false;">' . "\n";
|
261 |
+
echo '<p>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--s2member-ccap-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-ccap-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-ccap-terms.php"))) . '</select></p>' . "\n";
|
262 |
+
echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal® account. PayPal® allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal®, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal® Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--s2member-ccap-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-ccap-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalCcapButtonGenerate();" class="button-primary" /></p>' . "\n";
|
263 |
+
echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--s2member-ccap-desc" value="Description and pricing details here." size="73" /></p>' . "\n";
|
264 |
+
echo '<p>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-ccap-ccaps" size="40" /></p>' . "\n";
|
265 |
echo '</form>' . "\n";
|
266 |
echo '</td>' . "\n";
|
267 |
/**/
|
274 |
echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual & HTML Editors )<br />' . "\n";
|
275 |
$ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/shortcodes/paypal-ccaps-checkout-button-shortcode.php")));
|
276 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_temp_s);
|
277 |
+
echo '<input type="text" autocomplete="off" id="ws-plugin--s2member-ccap-shortcode" value="' . format_to_edit ($ws_plugin__s2member_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
|
278 |
/**/
|
279 |
echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
|
280 |
echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
|
290 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $ws_plugin__s2member_temp_s);
|
291 |
echo format_to_edit ($ws_plugin__s2member_temp_s);
|
292 |
echo '</textarea><br />' . "\n";
|
|
|
293 |
echo '↑ <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
|
294 |
echo '</div>' . "\n";
|
295 |
/**/
|
353 |
do_action ("ws_plugin__s2member_during_paypal_buttons_page_during_left_sections_during_cancellation_buttons_before_shortcode", get_defined_vars ());
|
354 |
echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual & HTML Editors )<br />' . "\n";
|
355 |
$ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/shortcodes/paypal-cancellation-button-shortcode.php")));
|
356 |
+
echo '<input type="text" autocomplete="off" id="ws-plugin--s2member-cancellation-shortcode" value="' . format_to_edit ($ws_plugin__s2member_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
|
357 |
/**/
|
358 |
echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
|
359 |
echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
|
365 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $ws_plugin__s2member_temp_s);
|
366 |
echo format_to_edit ($ws_plugin__s2member_temp_s);
|
367 |
echo '</textarea><br />' . "\n";
|
|
|
368 |
echo '↑ <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
|
369 |
echo '</div>' . "\n";
|
370 |
/**/
|
402 |
for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
|
403 |
echo '<option value="' . $n . '">s2Member Level #' . $n . '</option>' . "\n";
|
404 |
echo '</select></p>' . "\n";
|
405 |
+
echo '<p>Paid Subscr. ID: <input type="text" autocomplete="off" id="ws-plugin--s2member-reg-link-subscr-id" value="" size="50" /> <a href="#" onclick="alert(\'The Customer\\\'s Paid Subscr. ID ( aka: Recurring Profile ID, Transaction ID ) must be unique. This value can be obtained from inside your PayPal® account under the History tab. Each paying Customer MUST be associated with a unique Paid Subscr. ID. If the Customer is NOT associated with a Paid Subscr. ID, you will need to generate a unique value for this field on your own. But keep in mind, s2Member will be unable to maintain future communication with the PayPal® IPN ( i.e. Notification ) service if this value does not reflect a real Paid Subscr. ID that exists in your PayPal® History log.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
|
406 |
+
echo '<p>Custom String Value: <input type="text" autocomplete="off" id="ws-plugin--s2member-reg-link-custom" value="' . esc_attr ($_SERVER["HTTP_HOST"]) . '" size="30" /> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\n' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a> <input type="button" value="Generate Access Link" onclick="ws_plugin__s2member_paypalRegLinkGenerate();" class="button-primary" /> <img id="ws-plugin--s2member-reg-link-loading" src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
|
407 |
+
echo '<p' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities ( comma-delimited ) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member -> API Scripting -> Custom Capabilities.\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-reg-link-ccaps" size="40" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></p>' . "\n";
|
408 |
+
echo '<p>Fixed Term Length ( for Buy Now transactions ): <input type="text" autocomplete="off" id="ws-plugin--s2member-reg-link-fixed-term" value="" size="10" /> <a href="#" onclick="alert(\'If the Customer purchased Membership through a Buy Now transaction ( i.e. there is no Initial/Trial Period and no recurring charges for ongoing access ), you may configure a Fixed Term Length in this field. This way the Customer\\\'s Membership Access is automatically revoked by s2Member at the appropriate time. This will be a numeric value, followed by a space, then a single letter.\\n\\nHere are some examples:\\n\\n1 D ( this means 1 Day )\\n1 W ( this means 1 Week )\\n1 M ( this means 1 Month )\\n1 Y ( this means 1 Year )\\n1 L ( this means 1 Lifetime )\'); return false;">[?]</a></p>' . "\n";
|
409 |
echo '<p id="ws-plugin--s2member-reg-link" style="font-family:Consolas, monospace; display:none;"></p>' . "\n";
|
410 |
echo '</form>' . "\n";
|
411 |
echo '</td>' . "\n";
|
467 |
/**/
|
468 |
echo '</optgroup></select> <a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page ( they\\\'ll land on your Leading Post/Page after checkout ), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically ( e.g. only one Access Link is needed, and s2Member generates this automatically ). However, you will STILL need to design your Leading Post/Page ( which is what a Customer will actually land on ), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* s2Member sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this menu, it\\\'s because you\\\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member -> Restriction Options -> Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
|
469 |
/**/
|
470 |
+
echo '<p>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--s2member-sp-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-sp-hours">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-sp-hours.php"))) . '</select></p>' . "\n";
|
471 |
+
echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--s2member-sp-desc" value="Description and pricing details here." size="68" /></p>' . "\n";
|
472 |
+
echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal® account. PayPal® allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal®, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal® Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--s2member-sp-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-sp-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalSpButtonGenerate();" class="button-primary" /></p>' . "\n";
|
473 |
echo '</form>' . "\n";
|
474 |
echo '</td>' . "\n";
|
475 |
/**/
|
482 |
echo '<strong>WordPress® Shortcode:</strong> ( recommended for both the WordPress® Visual & HTML Editors )<br />' . "\n";
|
483 |
$ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/shortcodes/paypal-sp-checkout-button-shortcode.php")));
|
484 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%custom%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($_SERVER["HTTP_HOST"])), $ws_plugin__s2member_temp_s);
|
485 |
+
echo '<input type="text" autocomplete="off" id="ws-plugin--s2member-sp-shortcode" value="' . format_to_edit ($ws_plugin__s2member_temp_s) . '" onclick="this.select ();" style="font-family:Consolas, monospace; width:99%;" />' . "\n";
|
486 |
/**/
|
487 |
echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
|
488 |
echo '<strong>Resulting PayPal® Button Code:</strong> ( ultimately, your Shortcode will produce this snippet )<br />' . "\n";
|
498 |
$ws_plugin__s2member_temp_s = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr (site_url ())), $ws_plugin__s2member_temp_s);
|
499 |
echo format_to_edit ($ws_plugin__s2member_temp_s);
|
500 |
echo '</textarea><br />' . "\n";
|
|
|
501 |
echo '↑ <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
|
502 |
echo '</div>' . "\n";
|
503 |
/**/
|
includes/menu-pages/paypal-ops.inc.php
CHANGED
@@ -72,7 +72,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_ops"))
|
|
72 |
echo '<tr>' . "\n";
|
73 |
/**/
|
74 |
echo '<td>' . "\n";
|
75 |
-
echo '<input type="text" name="ws_plugin__s2member_paypal_business" id="ws-plugin--s2member-paypal-business" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"]) . '" /><br />' . "\n";
|
76 |
echo 'Enter the email address you\'ve associated with your PayPal® Business account.' . "\n";
|
77 |
echo '</td>' . "\n";
|
78 |
/**/
|
@@ -89,7 +89,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_ops"))
|
|
89 |
echo '<tr>' . "\n";
|
90 |
/**/
|
91 |
echo '<td>' . "\n";
|
92 |
-
echo '<input type="text" name="ws_plugin__s2member_paypal_api_username" id="ws-plugin--s2member-paypal-api-username" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_username"]) . '" /><br />' . "\n";
|
93 |
echo 'At PayPal®, see: <code>Profile -> API Access (or Request API Credentials)</code>.' . "\n";
|
94 |
echo '</td>' . "\n";
|
95 |
/**/
|
@@ -106,7 +106,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_ops"))
|
|
106 |
echo '<tr>' . "\n";
|
107 |
/**/
|
108 |
echo '<td>' . "\n";
|
109 |
-
echo '<input type="password" name="ws_plugin__s2member_paypal_api_password" id="ws-plugin--s2member-paypal-api-password" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_password"]) . '" /><br />' . "\n";
|
110 |
echo 'At PayPal®, see: <code>Profile -> API Access (or Request API Credentials)</code>.' . "\n";
|
111 |
echo '</td>' . "\n";
|
112 |
/**/
|
@@ -123,7 +123,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_ops"))
|
|
123 |
echo '<tr>' . "\n";
|
124 |
/**/
|
125 |
echo '<td>' . "\n";
|
126 |
-
echo '<input type="password" name="ws_plugin__s2member_paypal_api_signature" id="ws-plugin--s2member-paypal-api-signature" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_signature"]) . '" /><br />' . "\n";
|
127 |
echo 'At PayPal®, see: <code>Profile -> API Access (or Request API Credentials)</code>.' . "\n";
|
128 |
echo '</td>' . "\n";
|
129 |
/**/
|
@@ -231,7 +231,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_ops"))
|
|
231 |
echo '<h3>IPN w/ Proxy Key ( <a href="#" onclick="jQuery(\'div#ws-plugin--s2member-paypal-ipn-proxy-details\').toggle(); return false;" class="ws-dotted-link">optional, for 3rd-party integrations</a> )</h3>' . "\n";
|
232 |
echo '<div id="ws-plugin--s2member-paypal-ipn-proxy-details" style="display:none;">' . "\n";
|
233 |
echo '<p>If you\'re using a 3rd-party application that needs to POST simulated IPN transactions to your s2Member installation, you can use this alternate IPN URL, which includes a Proxy Key. This encrypted Proxy Key verifies incoming data being received by s2Member\'s IPN processor. You can change <em>[proxy-gateway]</em> to whatever you like. The <em>[proxy-gateway]</em> value is required. It will be stored by s2Member as the Customer\'s Paid Subscr. Gateway. Your [proxy-gateway] value will also be reflected in s2Member\'s IPN log.</p>' . "\n";
|
234 |
-
echo '<input type="text" value="' . format_to_edit (site_url ("/?s2member_paypal_notify=1&s2member_paypal_proxy=[proxy-gateway]&s2member_paypal_proxy_verification=" . urlencode (c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen ()))) . '" style="width:99%;" />' . "\n";
|
235 |
echo '<p><em>Any 3rd-party application that is sending IPN transactions to your s2Member installation, must ALWAYS include the <code>custom</code> POST variable, and that variable must always start with your installation domain ( i.e. custom=<code>' . esc_html ($_SERVER["HTTP_HOST"]) . '</code> ). In addition, the <code>item_number</code> variable, must always match a format that s2Member looks for. Generally speaking, the <code>item_number</code> should be <code>1, 2, 3, or 4</code>, indicating a specific s2Member Level #. However, s2Member also uses some advanced formats in this field. Just to be sure, we suggest creating a PayPal® Button with the s2Member Button Generator, and then taking a look at the Full Button Code to see how s2Member expects <code>item_number</code> to be formatted. Other than the aforementioned exceptions; all other POST variables should follow PayPal® standards. Please see: <a href="http://www.s2member.com/paypal-ipn-pdt-vars" target="_blank" rel="external">PayPal\'s IPN/PDT reference guide</a> for full documentation.</em></p>' . "\n";
|
236 |
do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_ipn_after_proxy", get_defined_vars ());
|
237 |
echo '</div>' . "\n";
|
@@ -270,7 +270,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_ops"))
|
|
270 |
echo '<tr>' . "\n";
|
271 |
/**/
|
272 |
echo '<td>' . "\n";
|
273 |
-
echo '<input type="password" name="ws_plugin__s2member_paypal_identity_token" id="ws-plugin--s2member-paypal-identity-token" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_identity_token"]) . '" /><br />' . "\n";
|
274 |
echo 'Your PDT Identity Token will appear under <em>Profile -> Website Payment Preferences</em> in your PayPal® account.' . "\n";
|
275 |
echo '</td>' . "\n";
|
276 |
/**/
|
@@ -320,7 +320,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_ops"))
|
|
320 |
echo '<tr>' . "\n";
|
321 |
/**/
|
322 |
echo '<td>' . "\n";
|
323 |
-
echo '<input type="text" name="ws_plugin__s2member_signup_email_recipients" id="ws-plugin--s2member-signup-email-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_email_recipients"]) . '" /><br />' . "\n";
|
324 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
325 |
echo '<code>"%%full_name%%" <%%payer_email%%>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
326 |
echo '</td>' . "\n";
|
@@ -338,7 +338,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_ops"))
|
|
338 |
echo '<tr>' . "\n";
|
339 |
/**/
|
340 |
echo '<td>' . "\n";
|
341 |
-
echo '<input type="text" name="ws_plugin__s2member_signup_email_subject" id="ws-plugin--s2member-signup-email-subject" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_email_subject"]) . '" /><br />' . "\n";
|
342 |
echo 'Subject Line used in the email sent to a Customer after a successful signup has occurred through PayPal®.' . "\n";
|
343 |
echo '</td>' . "\n";
|
344 |
/**/
|
@@ -424,7 +424,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_ops"))
|
|
424 |
echo '<tr>' . "\n";
|
425 |
/**/
|
426 |
echo '<td>' . "\n";
|
427 |
-
echo '<input type="text" name="ws_plugin__s2member_sp_email_recipients" id="ws-plugin--s2member-sp-email-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_email_recipients"]) . '" /><br />' . "\n";
|
428 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
429 |
echo '<code>"%%full_name%%" <%%payer_email%%>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
430 |
echo '</td>' . "\n";
|
@@ -442,7 +442,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_ops"))
|
|
442 |
echo '<tr>' . "\n";
|
443 |
/**/
|
444 |
echo '<td>' . "\n";
|
445 |
-
echo '<input type="text" name="ws_plugin__s2member_sp_email_subject" id="ws-plugin--s2member-sp-email-subject" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_email_subject"]) . '" /><br />' . "\n";
|
446 |
echo 'Subject Line used in the email sent to a Customer after a successful purchase has occurred through PayPal®, for Specific Post/Page Access.' . "\n";
|
447 |
echo '</td>' . "\n";
|
448 |
/**/
|
72 |
echo '<tr>' . "\n";
|
73 |
/**/
|
74 |
echo '<td>' . "\n";
|
75 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_paypal_business" id="ws-plugin--s2member-paypal-business" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"]) . '" /><br />' . "\n";
|
76 |
echo 'Enter the email address you\'ve associated with your PayPal® Business account.' . "\n";
|
77 |
echo '</td>' . "\n";
|
78 |
/**/
|
89 |
echo '<tr>' . "\n";
|
90 |
/**/
|
91 |
echo '<td>' . "\n";
|
92 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_paypal_api_username" id="ws-plugin--s2member-paypal-api-username" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_username"]) . '" /><br />' . "\n";
|
93 |
echo 'At PayPal®, see: <code>Profile -> API Access (or Request API Credentials)</code>.' . "\n";
|
94 |
echo '</td>' . "\n";
|
95 |
/**/
|
106 |
echo '<tr>' . "\n";
|
107 |
/**/
|
108 |
echo '<td>' . "\n";
|
109 |
+
echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_paypal_api_password" id="ws-plugin--s2member-paypal-api-password" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_password"]) . '" /><br />' . "\n";
|
110 |
echo 'At PayPal®, see: <code>Profile -> API Access (or Request API Credentials)</code>.' . "\n";
|
111 |
echo '</td>' . "\n";
|
112 |
/**/
|
123 |
echo '<tr>' . "\n";
|
124 |
/**/
|
125 |
echo '<td>' . "\n";
|
126 |
+
echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_paypal_api_signature" id="ws-plugin--s2member-paypal-api-signature" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_api_signature"]) . '" /><br />' . "\n";
|
127 |
echo 'At PayPal®, see: <code>Profile -> API Access (or Request API Credentials)</code>.' . "\n";
|
128 |
echo '</td>' . "\n";
|
129 |
/**/
|
231 |
echo '<h3>IPN w/ Proxy Key ( <a href="#" onclick="jQuery(\'div#ws-plugin--s2member-paypal-ipn-proxy-details\').toggle(); return false;" class="ws-dotted-link">optional, for 3rd-party integrations</a> )</h3>' . "\n";
|
232 |
echo '<div id="ws-plugin--s2member-paypal-ipn-proxy-details" style="display:none;">' . "\n";
|
233 |
echo '<p>If you\'re using a 3rd-party application that needs to POST simulated IPN transactions to your s2Member installation, you can use this alternate IPN URL, which includes a Proxy Key. This encrypted Proxy Key verifies incoming data being received by s2Member\'s IPN processor. You can change <em>[proxy-gateway]</em> to whatever you like. The <em>[proxy-gateway]</em> value is required. It will be stored by s2Member as the Customer\'s Paid Subscr. Gateway. Your [proxy-gateway] value will also be reflected in s2Member\'s IPN log.</p>' . "\n";
|
234 |
+
echo '<input type="text" autocomplete="off" value="' . format_to_edit (site_url ("/?s2member_paypal_notify=1&s2member_paypal_proxy=[proxy-gateway]&s2member_paypal_proxy_verification=" . urlencode (c_ws_plugin__s2member_paypal_utilities::paypal_proxy_key_gen ()))) . '" style="width:99%;" />' . "\n";
|
235 |
echo '<p><em>Any 3rd-party application that is sending IPN transactions to your s2Member installation, must ALWAYS include the <code>custom</code> POST variable, and that variable must always start with your installation domain ( i.e. custom=<code>' . esc_html ($_SERVER["HTTP_HOST"]) . '</code> ). In addition, the <code>item_number</code> variable, must always match a format that s2Member looks for. Generally speaking, the <code>item_number</code> should be <code>1, 2, 3, or 4</code>, indicating a specific s2Member Level #. However, s2Member also uses some advanced formats in this field. Just to be sure, we suggest creating a PayPal® Button with the s2Member Button Generator, and then taking a look at the Full Button Code to see how s2Member expects <code>item_number</code> to be formatted. Other than the aforementioned exceptions; all other POST variables should follow PayPal® standards. Please see: <a href="http://www.s2member.com/paypal-ipn-pdt-vars" target="_blank" rel="external">PayPal\'s IPN/PDT reference guide</a> for full documentation.</em></p>' . "\n";
|
236 |
do_action ("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_paypal_ipn_after_proxy", get_defined_vars ());
|
237 |
echo '</div>' . "\n";
|
270 |
echo '<tr>' . "\n";
|
271 |
/**/
|
272 |
echo '<td>' . "\n";
|
273 |
+
echo '<input type="password" autocomplete="off" name="ws_plugin__s2member_paypal_identity_token" id="ws-plugin--s2member-paypal-identity-token" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_identity_token"]) . '" /><br />' . "\n";
|
274 |
echo 'Your PDT Identity Token will appear under <em>Profile -> Website Payment Preferences</em> in your PayPal® account.' . "\n";
|
275 |
echo '</td>' . "\n";
|
276 |
/**/
|
320 |
echo '<tr>' . "\n";
|
321 |
/**/
|
322 |
echo '<td>' . "\n";
|
323 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_signup_email_recipients" id="ws-plugin--s2member-signup-email-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_email_recipients"]) . '" /><br />' . "\n";
|
324 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
325 |
echo '<code>"%%full_name%%" <%%payer_email%%>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
326 |
echo '</td>' . "\n";
|
338 |
echo '<tr>' . "\n";
|
339 |
/**/
|
340 |
echo '<td>' . "\n";
|
341 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_signup_email_subject" id="ws-plugin--s2member-signup-email-subject" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["signup_email_subject"]) . '" /><br />' . "\n";
|
342 |
echo 'Subject Line used in the email sent to a Customer after a successful signup has occurred through PayPal®.' . "\n";
|
343 |
echo '</td>' . "\n";
|
344 |
/**/
|
424 |
echo '<tr>' . "\n";
|
425 |
/**/
|
426 |
echo '<td>' . "\n";
|
427 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_sp_email_recipients" id="ws-plugin--s2member-sp-email-recipients" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_email_recipients"]) . '" /><br />' . "\n";
|
428 |
echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
|
429 |
echo '<code>"%%full_name%%" <%%payer_email%%>; admin@example.com; "Webmaster" <webmaster@example.com></code>' . "\n";
|
430 |
echo '</td>' . "\n";
|
442 |
echo '<tr>' . "\n";
|
443 |
/**/
|
444 |
echo '<td>' . "\n";
|
445 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_sp_email_subject" id="ws-plugin--s2member-sp-email-subject" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sp_email_subject"]) . '" /><br />' . "\n";
|
446 |
echo 'Subject Line used in the email sent to a Customer after a successful purchase has occurred through PayPal®, for Specific Post/Page Access.' . "\n";
|
447 |
echo '</td>' . "\n";
|
448 |
/**/
|
includes/menu-pages/res-ops.inc.php
CHANGED
@@ -76,7 +76,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_res_ops"))
|
|
76 |
echo '<tr>' . "\n";
|
77 |
/**/
|
78 |
echo '<td>' . "\n";
|
79 |
-
echo '<input type="text" name="ws_plugin__s2member_level' . $n . '_posts" id="ws-plugin--s2member-level' . $n . '-posts" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"]) . '" /><br />' . "\n";
|
80 |
echo 'Post IDs in comma-delimited format. Example: <code>1,2,3,34,8,21</code> — or you can type: <code>all</code>.<br />' . "\n";
|
81 |
echo 'You can also include all Post IDs of a specific <a href="http://codex.wordpress.org/Post_Types" target="_blank" rel="external">Post Type</a>. Ex: <code>1,2,3,34,all-newspapers</code>.<br />' . "\n";
|
82 |
echo '<em>( which protects several Post IDs, and <code>all</code> Posts of type: <code>newspaper</code> )</em>' . "\n";
|
@@ -123,7 +123,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_res_ops"))
|
|
123 |
echo '<tr>' . "\n";
|
124 |
/**/
|
125 |
echo '<td>' . "\n";
|
126 |
-
echo '<input type="text" name="ws_plugin__s2member_level' . $n . '_pages" id="ws-plugin--s2member-level' . $n . '-pages" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"]) . '" /><br />' . "\n";
|
127 |
echo 'Page IDs in comma-delimited format. Example: <code>1,2,3,34,8,21</code> — or you can type: <code>all</code>.' . "\n";
|
128 |
echo '</td>' . "\n";
|
129 |
/**/
|
@@ -168,7 +168,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_res_ops"))
|
|
168 |
echo '<tr>' . "\n";
|
169 |
/**/
|
170 |
echo '<td>' . "\n";
|
171 |
-
echo '<input type="text" name="ws_plugin__s2member_level' . $n . '_ptags" id="ws-plugin--s2member-level' . $n . '-ptags" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_ptags"]) . '" /><br />' . "\n";
|
172 |
echo 'Tags in comma-delimited format. Example: ' . (($n === 0) ? '<code>free,subscribers only</code>' : '<code>members,members only</code>') . ' — or you can type: <code>all</code>.' . "\n";
|
173 |
echo '</td>' . "\n";
|
174 |
/**/
|
@@ -213,7 +213,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_res_ops"))
|
|
213 |
echo '<tr>' . "\n";
|
214 |
/**/
|
215 |
echo '<td>' . "\n";
|
216 |
-
echo '<input type="text" name="ws_plugin__s2member_level' . $n . '_catgs" id="ws-plugin--s2member-level' . $n . '-catgs" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_catgs"]) . '" /><br />' . "\n";
|
217 |
echo 'Category IDs in comma-delimited format. Example: <code>1,2,3,34,8,21</code> — or you can type: <code>all</code>.' . "\n";
|
218 |
echo '</td>' . "\n";
|
219 |
/**/
|
@@ -353,7 +353,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_res_ops"))
|
|
353 |
echo '<tr>' . "\n";
|
354 |
/**/
|
355 |
echo '<td>' . "\n";
|
356 |
-
echo '<input type="text" name="ws_plugin__s2member_specific_ids" id="ws-plugin--s2member-specific-ids" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["specific_ids"]) . '" /><br />' . "\n";
|
357 |
echo 'Post/Page IDs in comma-delimited format. Example: <code>1,2,3,34,8,21</code> * Note... the word <code>all</code> does NOT work here. Also, please be careful not to create a conflict with other Access Restrictions. If you are going to sell Specific Post/Page Access, you should enter specific Post/Page IDs here; and <strong>make SURE that you\'ve NOT already protected any of these Posts/Pages with Member Level Access Restrictions</strong>. In other words, if you configure s2Member, in such as a way, that a Post/Page requires Membership Level Access, you cannot sell that same Post/Page through Specific Post/Page Access. Doing so, would create a conflict. Customers that purchased Specific Post/Page Access, would be unable to access the Post/Page - without also having a Membership. Not good. So please be careful.' . "\n";
|
358 |
echo '</td>' . "\n";
|
359 |
/**/
|
76 |
echo '<tr>' . "\n";
|
77 |
/**/
|
78 |
echo '<td>' . "\n";
|
79 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_level' . $n . '_posts" id="ws-plugin--s2member-level' . $n . '-posts" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"]) . '" /><br />' . "\n";
|
80 |
echo 'Post IDs in comma-delimited format. Example: <code>1,2,3,34,8,21</code> — or you can type: <code>all</code>.<br />' . "\n";
|
81 |
echo 'You can also include all Post IDs of a specific <a href="http://codex.wordpress.org/Post_Types" target="_blank" rel="external">Post Type</a>. Ex: <code>1,2,3,34,all-newspapers</code>.<br />' . "\n";
|
82 |
echo '<em>( which protects several Post IDs, and <code>all</code> Posts of type: <code>newspaper</code> )</em>' . "\n";
|
123 |
echo '<tr>' . "\n";
|
124 |
/**/
|
125 |
echo '<td>' . "\n";
|
126 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_level' . $n . '_pages" id="ws-plugin--s2member-level' . $n . '-pages" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"]) . '" /><br />' . "\n";
|
127 |
echo 'Page IDs in comma-delimited format. Example: <code>1,2,3,34,8,21</code> — or you can type: <code>all</code>.' . "\n";
|
128 |
echo '</td>' . "\n";
|
129 |
/**/
|
168 |
echo '<tr>' . "\n";
|
169 |
/**/
|
170 |
echo '<td>' . "\n";
|
171 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_level' . $n . '_ptags" id="ws-plugin--s2member-level' . $n . '-ptags" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_ptags"]) . '" /><br />' . "\n";
|
172 |
echo 'Tags in comma-delimited format. Example: ' . (($n === 0) ? '<code>free,subscribers only</code>' : '<code>members,members only</code>') . ' — or you can type: <code>all</code>.' . "\n";
|
173 |
echo '</td>' . "\n";
|
174 |
/**/
|
213 |
echo '<tr>' . "\n";
|
214 |
/**/
|
215 |
echo '<td>' . "\n";
|
216 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_level' . $n . '_catgs" id="ws-plugin--s2member-level' . $n . '-catgs" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_catgs"]) . '" /><br />' . "\n";
|
217 |
echo 'Category IDs in comma-delimited format. Example: <code>1,2,3,34,8,21</code> — or you can type: <code>all</code>.' . "\n";
|
218 |
echo '</td>' . "\n";
|
219 |
/**/
|
353 |
echo '<tr>' . "\n";
|
354 |
/**/
|
355 |
echo '<td>' . "\n";
|
356 |
+
echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_specific_ids" id="ws-plugin--s2member-specific-ids" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["specific_ids"]) . '" /><br />' . "\n";
|
357 |
echo 'Post/Page IDs in comma-delimited format. Example: <code>1,2,3,34,8,21</code> * Note... the word <code>all</code> does NOT work here. Also, please be careful not to create a conflict with other Access Restrictions. If you are going to sell Specific Post/Page Access, you should enter specific Post/Page IDs here; and <strong>make SURE that you\'ve NOT already protected any of these Posts/Pages with Member Level Access Restrictions</strong>. In other words, if you configure s2Member, in such as a way, that a Post/Page requires Membership Level Access, you cannot sell that same Post/Page through Specific Post/Page Access. Doing so, would create a conflict. Customers that purchased Specific Post/Page Access, would be unable to access the Post/Page - without also having a Membership. Not good. So please be careful.' . "\n";
|
358 |
echo '</td>' . "\n";
|
359 |
/**/
|
includes/menu-pages/scripting.inc.php
CHANGED
@@ -449,16 +449,16 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_scripting"))
|
|
449 |
echo '<div class="ws-menu-page-hr"></div>' . "\n";
|
450 |
/**/
|
451 |
echo '<p><strong>Shortcode:</strong> for an Inline Profile Modification Form:<br />' . "\n";
|
452 |
-
echo '<p><input type="text" value="' . format_to_edit ('[s2Member-Profile /]') . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" onclick="this.select ();" /></p>' . "\n";
|
453 |
/**/
|
454 |
echo '<p style="margin-top:20px;"><strong>Stand-Alone / Code Sample</strong> ( standard link tag ):</p>' . "\n";
|
455 |
-
echo '<p><input type="text" value="' . format_to_edit (preg_replace ("/\<\?php echo S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL; \?\>/", c_ws_plugin__s2member_utils_strings::esc_ds (site_url ("/?s2member_profile=1")), file_get_contents (dirname (__FILE__) . "/code-samples/current-user-profile-modification-page-url-1-ops.x-php"))) . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" onclick="this.select ();" /></p>' . "\n";
|
456 |
/**/
|
457 |
echo '<p style="margin-top:20px;"><strong>Stand-Alone / Code Sample</strong> ( open the link in a popup window ):</p>' . "\n";
|
458 |
-
echo '<p><input type="text" value="' . format_to_edit (preg_replace ("/\<\?php echo S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL; \?\>/", c_ws_plugin__s2member_utils_strings::esc_ds (site_url ("/?s2member_profile=1")), file_get_contents (dirname (__FILE__) . "/code-samples/current-user-profile-modification-page-url-2-ops.x-php"))) . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" onclick="this.select ();" /></p>' . "\n";
|
459 |
/**/
|
460 |
echo '<p style="margin-top:20px;"><strong>Stand-Alone / Code Sample</strong> ( embed the Form with an IFRAME tag ):</p>' . "\n";
|
461 |
-
echo '<p><input type="text" value="' . format_to_edit (preg_replace ("/\<\?php echo S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL; \?\>/", c_ws_plugin__s2member_utils_strings::esc_ds (site_url ("/?s2member_profile=1")), file_get_contents (dirname (__FILE__) . "/code-samples/current-user-profile-modification-page-url-3-ops.x-php"))) . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" onclick="this.select ();" /></p>' . "\n";
|
462 |
echo '</div>' . "\n";
|
463 |
/**/
|
464 |
echo '</div>' . "\n";
|
449 |
echo '<div class="ws-menu-page-hr"></div>' . "\n";
|
450 |
/**/
|
451 |
echo '<p><strong>Shortcode:</strong> for an Inline Profile Modification Form:<br />' . "\n";
|
452 |
+
echo '<p><input type="text" autocomplete="off" value="' . format_to_edit ('[s2Member-Profile /]') . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" onclick="this.select ();" /></p>' . "\n";
|
453 |
/**/
|
454 |
echo '<p style="margin-top:20px;"><strong>Stand-Alone / Code Sample</strong> ( standard link tag ):</p>' . "\n";
|
455 |
+
echo '<p><input type="text" autocomplete="off" value="' . format_to_edit (preg_replace ("/\<\?php echo S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL; \?\>/", c_ws_plugin__s2member_utils_strings::esc_ds (site_url ("/?s2member_profile=1")), file_get_contents (dirname (__FILE__) . "/code-samples/current-user-profile-modification-page-url-1-ops.x-php"))) . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" onclick="this.select ();" /></p>' . "\n";
|
456 |
/**/
|
457 |
echo '<p style="margin-top:20px;"><strong>Stand-Alone / Code Sample</strong> ( open the link in a popup window ):</p>' . "\n";
|
458 |
+
echo '<p><input type="text" autocomplete="off" value="' . format_to_edit (preg_replace ("/\<\?php echo S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL; \?\>/", c_ws_plugin__s2member_utils_strings::esc_ds (site_url ("/?s2member_profile=1")), file_get_contents (dirname (__FILE__) . "/code-samples/current-user-profile-modification-page-url-2-ops.x-php"))) . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" onclick="this.select ();" /></p>' . "\n";
|
459 |
/**/
|
460 |
echo '<p style="margin-top:20px;"><strong>Stand-Alone / Code Sample</strong> ( embed the Form with an IFRAME tag ):</p>' . "\n";
|
461 |
+
echo '<p><input type="text" autocomplete="off" value="' . format_to_edit (preg_replace ("/\<\?php echo S2MEMBER_CURRENT_USER_PROFILE_MODIFICATION_PAGE_URL; \?\>/", c_ws_plugin__s2member_utils_strings::esc_ds (site_url ("/?s2member_profile=1")), file_get_contents (dirname (__FILE__) . "/code-samples/current-user-profile-modification-page-url-3-ops.x-php"))) . '" style="font-size:90%; font-family:Consolas, monospace; width:99%;" onclick="this.select ();" /></p>' . "\n";
|
462 |
echo '</div>' . "\n";
|
463 |
/**/
|
464 |
echo '</div>' . "\n";
|
includes/menu-pages/{ws-mlist.inc.php → updates.inc.php}
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Newsletter/
|
4 |
*
|
5 |
* Copyright: © 2009-2011
|
6 |
* {@link http://www.websharks-inc.com/ WebSharks, Inc.}
|
@@ -12,26 +12,27 @@
|
|
12 |
* If not, see: {@link http://www.gnu.org/licenses/}.
|
13 |
*
|
14 |
* @package s2Member\Menu_Pages
|
15 |
-
* @since
|
16 |
*/
|
17 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
18 |
-
exit
|
19 |
/**/
|
20 |
-
if (!class_exists ("
|
21 |
{
|
22 |
/**
|
23 |
-
* Newsletter/
|
24 |
*
|
25 |
* @package s2Member\Menu_Pages
|
26 |
-
* @since
|
27 |
*/
|
28 |
-
class
|
29 |
{
|
30 |
public function __construct ()
|
31 |
{
|
32 |
if (is_object ($user = wp_get_current_user ()) && ($user_id = $user->ID))
|
33 |
{
|
34 |
-
echo '<form id="ws-
|
|
|
35 |
/**/
|
36 |
if (!is_ssl () && /* Don't require remote connections when running on `localhost`. */ !c_ws_plugin__s2member_utils_conds::is_localhost ())
|
37 |
{
|
@@ -50,42 +51,33 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages_ws_mlist"))
|
|
50 |
/**/
|
51 |
echo '<div class="ws-menu-page-r-group">' . "\n";
|
52 |
/**/
|
53 |
-
echo '<div id="ws-
|
54 |
-
echo '<label for="ws-
|
55 |
-
echo '<input type="text" name="FNAME" id="ws-
|
56 |
echo '</div>' . "\n";
|
57 |
/**/
|
58 |
-
echo '<div id="ws-
|
59 |
-
echo '<label for="ws-
|
60 |
-
echo '<input type="text" name="LNAME" id="ws-
|
61 |
echo '</div>' . "\n";
|
62 |
/**/
|
63 |
-
echo '<div id="ws-
|
64 |
-
echo '<label for="ws-
|
65 |
-
echo '<input type="text" name="EMAIL" id="ws-
|
66 |
-
echo '</div>' . "\n";
|
67 |
-
/**/
|
68 |
-
echo '<div id="ws-mlist-div-groups">' . "\n";
|
69 |
-
echo '<label>Interest Group(s):</label>' . "\n";
|
70 |
-
echo '<ul>' . "\n";
|
71 |
-
echo '<li><input type="checkbox" value="1" name="group[1][1]" id="ws-mlist-group-1-1"><label for="ws-mlist-group-1-1">WordPress® Themes</label></li>' . "\n";
|
72 |
-
echo '<li><input type="checkbox" value="2" name="group[1][2]" id="ws-mlist-group-1-2"><label for="ws-mlist-group-1-2">All WordPress® Plugins</label></li>' . "\n";
|
73 |
-
echo '<li><input type="checkbox" value="4" name="group[1][4]" id="ws-mlist-group-1-4" checked="checked"><label for="ws-mlist-group-1-4">s2Member®/s2Member Pro</label></li>' . "\n";
|
74 |
-
echo '</ul>' . "\n";
|
75 |
echo '</div>' . "\n";
|
76 |
/**/
|
77 |
if (!is_ssl () && /* Don't require remote connections when running on `localhost`. */ !c_ws_plugin__s2member_utils_conds::is_localhost ())
|
78 |
{
|
79 |
-
echo '<div id="ws-
|
80 |
echo '<script type="text/javascript" src="http://websharks-inc.us1.list-manage.com/subscriber-count?b=31&u=8c67d547-edf6-41c5-807d-2d2d0e6cffd1&id=19e9d213bc"></script>' . "\n";
|
81 |
echo '</div>' . "\n";
|
82 |
}
|
83 |
/**/
|
84 |
-
echo '<div id="ws-
|
85 |
echo '( <a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Privacy URI")) . '" target="_blank">we DO respect your privacy</a> )' . "\n";
|
86 |
echo '</div>' . "\n";
|
87 |
/**/
|
88 |
-
echo '<div id="ws-
|
89 |
echo '<input type="submit" value="Subscribe" name="subscribe" />' . "\n";
|
90 |
echo '</div>' . "\n";
|
91 |
/**/
|
@@ -97,5 +89,5 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages_ws_mlist"))
|
|
97 |
}
|
98 |
}
|
99 |
/**/
|
100 |
-
new
|
101 |
?>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Newsletter/Updates for Menu Pages.
|
4 |
*
|
5 |
* Copyright: © 2009-2011
|
6 |
* {@link http://www.websharks-inc.com/ WebSharks, Inc.}
|
12 |
* If not, see: {@link http://www.gnu.org/licenses/}.
|
13 |
*
|
14 |
* @package s2Member\Menu_Pages
|
15 |
+
* @since 111205
|
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_updates"))
|
21 |
{
|
22 |
/**
|
23 |
+
* Newsletter/Updates for Menu Pages.
|
24 |
*
|
25 |
* @package s2Member\Menu_Pages
|
26 |
+
* @since 111205
|
27 |
*/
|
28 |
+
class c_ws_plugin__s2member_menu_pages_updates
|
29 |
{
|
30 |
public function __construct ()
|
31 |
{
|
32 |
if (is_object ($user = wp_get_current_user ()) && ($user_id = $user->ID))
|
33 |
{
|
34 |
+
echo '<form id="ws-updates-form" action="http://websharks-inc.us1.list-manage1.com/subscribe/post?u=8f347da54d66b5298d13237d9&id=19e9d213bc" method="post" target="_blank">' . "\n";
|
35 |
+
echo '<input type="hidden" name="group[1][4]" id="ws-updates-group" value="4" />' . "\n";
|
36 |
/**/
|
37 |
if (!is_ssl () && /* Don't require remote connections when running on `localhost`. */ !c_ws_plugin__s2member_utils_conds::is_localhost ())
|
38 |
{
|
51 |
/**/
|
52 |
echo '<div class="ws-menu-page-r-group">' . "\n";
|
53 |
/**/
|
54 |
+
echo '<div id="ws-updates-div-fname">' . "\n";
|
55 |
+
echo '<label for="ws-updates-fname">First Name: *</label><br />' . "\n";
|
56 |
+
echo '<input type="text" aria-required="true" autocomplete="off" name="FNAME" id="ws-updates-fname" value="' . esc_attr ($user->first_name) . '" />' . "\n";
|
57 |
echo '</div>' . "\n";
|
58 |
/**/
|
59 |
+
echo '<div id="ws-updates-div-lname">' . "\n";
|
60 |
+
echo '<label for="ws-updates-lname">Last Name: *</label><br />' . "\n";
|
61 |
+
echo '<input type="text" aria-required="true" autocomplete="off" name="LNAME" id="ws-updates-lname" value="' . esc_attr ($user->last_name) . '" />' . "\n";
|
62 |
echo '</div>' . "\n";
|
63 |
/**/
|
64 |
+
echo '<div id="ws-updates-div-email">' . "\n";
|
65 |
+
echo '<label for="ws-updates-email">Email Address: *</label><br />' . "\n";
|
66 |
+
echo '<input type="text" aria-required="true" autocomplete="off" name="EMAIL" id="ws-updates-email" value="' . format_to_edit ($user->user_email) . '" />' . "\n";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
echo '</div>' . "\n";
|
68 |
/**/
|
69 |
if (!is_ssl () && /* Don't require remote connections when running on `localhost`. */ !c_ws_plugin__s2member_utils_conds::is_localhost ())
|
70 |
{
|
71 |
+
echo '<div id="ws-updates-div-subs">' . "\n";
|
72 |
echo '<script type="text/javascript" src="http://websharks-inc.us1.list-manage.com/subscriber-count?b=31&u=8c67d547-edf6-41c5-807d-2d2d0e6cffd1&id=19e9d213bc"></script>' . "\n";
|
73 |
echo '</div>' . "\n";
|
74 |
}
|
75 |
/**/
|
76 |
+
echo '<div id="ws-updates-div-priv">' . "\n";
|
77 |
echo '( <a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Privacy URI")) . '" target="_blank">we DO respect your privacy</a> )' . "\n";
|
78 |
echo '</div>' . "\n";
|
79 |
/**/
|
80 |
+
echo '<div id="ws-updates-div-submit">' . "\n";
|
81 |
echo '<input type="submit" value="Subscribe" name="subscribe" />' . "\n";
|
82 |
echo '</div>' . "\n";
|
83 |
/**/
|
89 |
}
|
90 |
}
|
91 |
/**/
|
92 |
+
new c_ws_plugin__s2member_menu_pages_updates ();
|
93 |
?>
|
includes/s2member-min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(b){ws_plugin__s2member_uniqueFilesDownloaded=[];var a='<?php echo c_ws_plugin__s2member_utils_conds::bp_is_installed ("query-active-plugins") ? "1" : ""; ?>';if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN&&S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY<S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED){b('a[href*="s2member_file_download"], a[href*="s2member-file"').click(function(){if(!this.href.match(/s2member_file_download_key\=(.+)/i)){var d='<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Confirm File Download —", "s2member-front", "s2member")); ?>\n\n';d+=b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`ve downloaded %s protected %s in the last %s.", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY,((S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("file", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("files", "s2member-front", "s2member")); ?>'),((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("24 hours", "s2member-front", "s2member")); ?>':b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("%s days", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS)))+"\n\n";d+=(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`re entitled to UNLIMITED downloads though ( so, no worries ).", "s2member-front", "s2member")); ?>':b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`re entitled to %s unique %s %s.", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED,((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("download", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("downloads", "s2member-front", "s2member")); ?>'),((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("each day", "s2member-front", "s2member")); ?>':b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("every %s-day period", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS)));if(this.href.match(/s2member[_\-]skip[_\-]confirmation/i)&&!this.href.match(/s2member[_\-]skip[_\-]confirmation[\=\-](0|no|false)/i)||confirm(d)){if(b.inArray(this.href,ws_plugin__s2member_uniqueFilesDownloaded)===-1){ws_plugin__s2member_uniqueFilesDownloaded.push(this.href),S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY++}return true}else{return false}}else{return true}})}if(!location.href.match(/\/wp-admin(\/|$)/)){b("input#ws-plugin--s2member-profile-password1, input#ws-plugin--s2member-profile-password2").keyup(function(){ws_plugin__s2member_passwordStrength(b("input#ws-plugin--s2member-profile-login"),b("input#ws-plugin--s2member-profile-password1"),b("input#ws-plugin--s2member-profile-password2"),b("div#ws-plugin--s2member-profile-password-strength"))});b("form#ws-plugin--s2member-profile").submit(function(){var e=this,d="",c="",i="";var g=b("input#ws-plugin--s2member-profile-password1",e);var f=b("input#ws-plugin--s2member-profile-password2",e);var h=b("input#ws-plugin--s2member-profile-submit",e);b(":input",e).each(function(){var j=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(j&&(d=b.trim(b('label[for="'+j+'"]',e).first().children("strong").first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){i+=c+"\n\n"}}});if(i=b.trim(i)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+i);return false}else{if(b.trim(g.val())&&b.trim(g.val())!==b.trim(f.val())){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Passwords do not match up. Please try again.", "s2member-front", "s2member")); ?>');return false}else{if(b.trim(g.val())&&b.trim(g.val()).length<6){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Password MUST be at least 6 characters. Please try again.", "s2member-front", "s2member")); ?>');return false}}}ws_plugin__s2member_animateProcessing(h);return true})}if(location.href.match(/\/wp-signup\.php/)){b("div#content > div.mu_register > form#setupform").submit(function(){var e=this,d="",c="",g="";b("input#user_email",e).attr("data-expected","email");var f=b('p.submit input[type="submit"]',e);b("input#user_name, input#user_email, input#blogname, input#blog_title, input#captcha_code",e).attr({"aria-required":"true"});b(":input",e).each(function(){var h=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(h&&(d=b.trim(b('label[for="'+h+'"]',e).first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){g+=c+"\n\n"}}});if(g=b.trim(g)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+g);return false}ws_plugin__s2member_animateProcessing(f);return true})}if(location.href.match(/\/wp-login\.php/)){b("input#ws-plugin--s2member-custom-reg-field-user-pass1, input#ws-plugin--s2member-custom-reg-field-user-pass2").keyup(function(){ws_plugin__s2member_passwordStrength(b("input#user_login"),b("input#ws-plugin--s2member-custom-reg-field-user-pass1"),b("input#ws-plugin--s2member-custom-reg-field-user-pass2"),b("div#ws-plugin--s2member-custom-reg-field-user-pass-strength"))});b("div#login > form#registerform input#wp-submit").attr("tabindex","1000");b("div#login > form#registerform").submit(function(){var e=this,d="",c="",i="";b("input#user_email",e).attr("data-expected","email");var h=b('input#ws-plugin--s2member-custom-reg-field-user-pass1[aria-required="true"]',e);var f=b("input#ws-plugin--s2member-custom-reg-field-user-pass2",e);var g=b("input#wp-submit",e);b("input#user_login, input#user_email, input#captcha_code",e).attr({"aria-required":"true"});b(":input",e).each(function(){var j=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(b.inArray(j,["user_login","user_email","captcha_code"])!==-1){if((d=b.trim(b(this).parent("label").text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){i+=c+"\n\n"}}}else{if(j&&(d=b.trim(b('label[for="'+j+'"]',e).first().children("span").first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){i+=c+"\n\n"}}}});if(i=b.trim(i)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+i);return false}else{if(h.length&&b.trim(h.val())!==b.trim(f.val())){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Passwords do not match up. Please try again.", "s2member-front", "s2member")); ?>');return false}else{if(h.length&&b.trim(h.val()).length<6){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Password MUST be at least 6 characters. Please try again.", "s2member-front", "s2member")); ?>');return false}}}ws_plugin__s2member_animateProcessing(g);return true})}if(location.href.match(/\/wp-admin\/(user\/)?profile\.php/)){b("form#your-profile").submit(function(){var e=this,d="",c="",f="";b("input#email",e).attr("data-expected","email");b(':input[id^="ws-plugin--s2member-profile-"]',e).each(function(){var g=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(g&&(d=b.trim(b('label[for="'+g+'"]',e).first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){f+=c+"\n\n"}}});if(f=b.trim(f)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+f);return false}return true})}if(a){b("body.registration form div#ws-plugin--s2member-custom-reg-fields-4bp-section").closest("form").submit(function(){var e=this,d="",c="",f="";b("input#signup_email",e).attr("data-expected","email");b("input#signup_username, input#signup_email, input#signup_password, input#field_1",e).attr({"aria-required":"true"});b(":input",e).each(function(){var g=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(g&&(d=b.trim(b('label[for="'+g+'"]',e).first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){f+=c+"\n\n"}}});if(f=b.trim(f)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+f);return false}return true});b("body.logged-in.profile.profile-edit :input.ws-plugin--s2member-profile-field-4bp").closest("form").submit(function(){var e=this,d="",c="",f="";b("input#field_1",e).attr({"aria-required":"true"});b(":input",e).each(function(){var g=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(g&&(d=b.trim(b('label[for="'+g+'"]',e).first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){f+=c+"\n\n"}}});if(f=b.trim(f)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+f);return false}return true})}ws_plugin__s2member_passwordStrength=function(d,f,e,c){if(d instanceof jQuery&&f instanceof jQuery&&e instanceof jQuery&&c instanceof jQuery&&typeof passwordStrength==="function"&&typeof pwsL10n==="object"){c.removeClass("ws-plugin--s2member-password-strength-short ws-plugin--s2member-password-strength-bad ws-plugin--s2member-password-strength-good ws-plugin--s2member-password-strength-strong ws-plugin--s2member-password-strength-mismatch");switch(passwordStrength(f.val(),d.val(),e.val())){case 1:c.addClass("ws-plugin--s2member-password-strength-short").html(pwsL10n["short"]);break;case 2:c.addClass("ws-plugin--s2member-password-strength-bad").html(pwsL10n.bad);break;case 3:c.addClass("ws-plugin--s2member-password-strength-good").html(pwsL10n.good);break;case 4:c.addClass("ws-plugin--s2member-password-strength-strong").html(pwsL10n.strong);break;case 5:c.addClass("ws-plugin--s2member-password-strength-mismatch").html(pwsL10n.mismatch);break;default:c.addClass("ws-plugin--s2member-password-strength-short").html(pwsL10n["short"])}}return};ws_plugin__s2member_validationErrors=function(o,n,d,j,i){if(typeof o==="string"&&o&&typeof n==="object"&&typeof d==="object"){if(typeof n.tagName==="string"&&n.tagName.match(/^(input|textarea|select)$/i)&&!n.disabled){var q=n.tagName.toLowerCase(),m=b(n),l=b.trim(m.attr("type")).toLowerCase(),c=b.trim(m.attr("name")),p=m.val();var j=(typeof j==="boolean")?j:(m.attr("aria-required")==="true"),i=(typeof i==="string")?i:b.trim(m.attr("data-expected"));var h=('<?php echo strlen($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"]); ?>'>0)?true:false;var f=new RegExp('^(<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (implode ("|", preg_split ("/[\r\n\t ;,]+/", preg_quote ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"], "/")))); ?>)@',"i");if(q==="input"&&l==="checkbox"&&c.match(/\[\]$/)){if(typeof n.id==="string"&&n.id.match(/-0$/)){if(j&&!b('input[name="'+c.replace(/([\[\]])/g,"$1")+'"]:checked',d).length){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please check at least one of the boxes.", "s2member-front", "s2member")); ?>'}}}else{if(q==="input"&&l==="checkbox"){if(j&&!n.checked){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Required. This box must be checked.", "s2member-front", "s2member")); ?>'}}else{if(q==="input"&&l==="radio"){if(typeof n.id==="string"&&n.id.match(/-0$/)){if(j&&!b('input[name="'+c.replace(/([\[\]])/g,"$1")+'"]:checked',d).length){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please select one of the options.", "s2member-front", "s2member")); ?>'}}}else{if(q==="select"&&m.attr("multiple")){if(j&&(!(p instanceof Array)||!p.length)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please select at least one of the options.", "s2member-front", "s2member")); ?>'}}else{if(typeof p!=="string"||(j&&!(p=b.trim(p)).length)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("This is a required field, please try again.", "s2member-front", "s2member")); ?>'}else{if((p=b.trim(p)).length&&((q==="input"&&l.match(/^(text|password)$/i))||q==="textarea")&&typeof i==="string"&&i.length){if(i==="numeric-wp-commas"&&(!p.match(/^[0-9\.,]+$/)||isNaN(p.replace(/,/g,"")))){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be numeric ( with or without decimals, commas allowed ).", "s2member-front", "s2member")); ?>'}else{if(i==="numeric"&&(!p.match(/^[0-9\.]+$/)||isNaN(p))){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be numeric ( with or without decimals, no commas ).", "s2member-front", "s2member")); ?>'}else{if(i==="integer"&&(!p.match(/^[0-9]+$/)||isNaN(p))){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be an integer ( a whole number, without any decimals ).", "s2member-front", "s2member")); ?>'}else{if(i==="integer-gt-0"&&(!p.match(/^[0-9]+$/)||isNaN(p)||p<=0)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be an integer > 0 ( whole number, no decimals, greater than 0 ).", "s2member-front", "s2member")); ?>'}else{if(i==="float"&&(!p.match(/^[0-9\.]+$/)||!p.match(/[0-9]/)||!p.match(/\./)||isNaN(p))){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a float ( floating point number, decimals required ).", "s2member-front", "s2member")); ?>'}else{if(i==="float-gt-0"&&(!p.match(/^[0-9\.]+$/)||!p.match(/[0-9]/)||!p.match(/\./)||isNaN(p)||p<=0)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a float > 0 ( floating point number, decimals required, greater than 0 ).", "s2member-front", "s2member")); ?>'}else{if(i==="date"&&!p.match(/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}$/)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a date ( required date format: dd/mm/yyyy ).", "s2member-front", "s2member")); ?>'}else{if(i==="email"&&!p.match(/^([a-z_~0-9\+\-]+)(((\.?)([a-z_~0-9\+\-]+))*)(@)([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a valid email address.", "s2member-front", "s2member")); ?>'}else{if(i==="email"&&h&&p.match(f)){return o+"\n"+b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use a personal email address.\nAddresses like <%s@> are problematic.", "s2member-front", "s2member")); ?>',p.split("@")[0])}else{if(i==="url"&&!p.match(/^http(s?)\:\/\/(.{5,})$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a full URL ( starting with http or https ).", "s2member-front", "s2member")); ?>'}else{if(i==="domain"&&!p.match(/^([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a domain name ( domain name only, without http ).", "s2member-front", "s2member")); ?>'}else{if(i==="phone"&&(!p.match(/^[0-9 \(\)\-]+$/)||p.replace(/[^0-9]/g,"").length!==10)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a phone # ( 10 digits w/possible hyphens,spaces,brackets ).", "s2member-front", "s2member")); ?>'}else{if(i==="uszip"&&!p.match(/^[0-9]{5}(-[0-9]{4})?$/)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a US zipcode ( 5-9 digits w/possible hyphen ).", "s2member-front", "s2member")); ?>'}else{if(i==="cazip"&&!p.match(/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a Canadian zipcode ( 6 alpha-numerics w/possible space ).", "s2member-front", "s2member")); ?>'}else{if(i==="uczip"&&!p.match(/^[0-9]{5}(-[0-9]{4})?$/)&&!p.match(/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a zipcode ( either a US or Canadian zipcode ).", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphanumerics-spaces-punctuation-([0-9]+)(-e)?$/)&&!p.match(/^[a-z 0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics, spaces & punctuation only.", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphanumerics-spaces-([0-9]+)(-e)?$/)&&!p.match(/^[a-z 0-9]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics & spaces only.", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphanumerics-punctuation-([0-9]+)(-e)?$/)&&!p.match(/^[a-z0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics & punctuation only ( no spaces ).", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphanumerics-([0-9]+)(-e)?$/)&&!p.match(/^[a-z0-9]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics only ( no spaces/punctuation ).", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphabetics-([0-9]+)(-e)?$/)&&!p.match(/^[a-z]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphabetics only ( no digits/spaces/punctuation ).", "s2member-front", "s2member")); ?>'}else{if(i.match(/^numerics-([0-9]+)(-e)?$/)&&!p.match(/^[0-9]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use numeric digits only.", "s2member-front", "s2member")); ?>'}else{if(i.match(/^(any|alphanumerics-spaces-punctuation|alphanumerics-spaces|alphanumerics-punctuation|alphanumerics|alphabetics|numerics)-([0-9]+)(-e)?$/)){var k=i.split("-"),e=Number(k[1]),g=(k.length>2&&k[2]==="e")?true:false;if(g&&p.length!==e){return o+"\n"+b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be exactly %s %s.", "s2member-front", "s2member")); ?>',e,((k[0]==="numerics")?((e===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digit", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digits", "s2member-front", "s2member")); ?>'):((e===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("character", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("characters", "s2member-front", "s2member")); ?>')))}else{if(p.length<e){return o+"\n"+b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be at least %s %s.", "s2member-front", "s2member")); ?>',e,((k[0]==="numerics")?((e===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digit", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digits", "s2member-front", "s2member")); ?>'):((e===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("character", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("characters", "s2member-front", "s2member")); ?>')))}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}return""};ws_plugin__s2member_animateProcessingConfig={originalText:"",interval:null,speed:100},ws_plugin__s2member_animateProcessing=function(d,c){if(d instanceof jQuery){if(c){clearInterval(ws_plugin__s2member_animateProcessingConfig.interval);if(ws_plugin__s2member_animateProcessingConfig.originalText){d.val(ws_plugin__s2member_animateProcessingConfig.originalText)}return}d.first().each(function(){var g=b(this),f=0,e="r",h=[".","..","..."];ws_plugin__s2member_animateProcessingConfig.originalText=g.val();clearInterval(ws_plugin__s2member_animateProcessingConfig.interval);ws_plugin__s2member_animateProcessingConfig.interval=setInterval(function(){if(e==="r"){if(f+1<=h.length-1){f=f+1,e="r"}else{f=f-1,e="l"}}else{if(e==="l"){if(f-1>=0){f=f-1,e="l"}else{f=f+1,e="r"}}}for(var j=h[f],i=h[f].length;i<h.length;i++){j+=" "}g.val('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Processing", "s2member-front", "s2member")); ?>'+j)},ws_plugin__s2member_animateProcessingConfig.speed)})}}});
|
1 |
+
jQuery(document).ready(function(b){ws_plugin__s2member_uniqueFilesDownloaded=[];var a='<?php echo c_ws_plugin__s2member_utils_conds::bp_is_installed ("query-active-plugins") ? "1" : ""; ?>';if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN&&S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY<S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED){b('a[href*="s2member_file_download"], a[href*="s2member-file"').click(function(){if(!this.href.match(/s2member_file_download_key\=(.+)/i)){var d='<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Confirm File Download —", "s2member-front", "s2member")); ?>\n\n';d+=b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`ve downloaded %s protected %s in the last %s.", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY,((S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("file", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("files", "s2member-front", "s2member")); ?>'),((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("24 hours", "s2member-front", "s2member")); ?>':b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("%s days", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS)))+"\n\n";d+=(S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_IS_UNLIMITED)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`re entitled to UNLIMITED downloads though ( so, no worries ).", "s2member-front", "s2member")); ?>':b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("You`re entitled to %s unique %s %s.", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED,((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("download", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("downloads", "s2member-front", "s2member")); ?>'),((S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("each day", "s2member-front", "s2member")); ?>':b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("every %s-day period", "s2member-front", "s2member")); ?>',S2MEMBER_CURRENT_USER_DOWNLOADS_ALLOWED_DAYS)));if(this.href.match(/s2member[_\-]skip[_\-]confirmation/i)&&!this.href.match(/s2member[_\-]skip[_\-]confirmation[\=\-](0|no|false)/i)||confirm(d)){if(b.inArray(this.href,ws_plugin__s2member_uniqueFilesDownloaded)===-1){ws_plugin__s2member_uniqueFilesDownloaded.push(this.href),S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY++}return true}else{return false}}else{return true}})}if(!location.href.match(/\/wp-admin(\/|\?|$)/)){b("input#ws-plugin--s2member-profile-password1, input#ws-plugin--s2member-profile-password2").keyup(function(){ws_plugin__s2member_passwordStrength(b("input#ws-plugin--s2member-profile-login"),b("input#ws-plugin--s2member-profile-password1"),b("input#ws-plugin--s2member-profile-password2"),b("div#ws-plugin--s2member-profile-password-strength"))});b("form#ws-plugin--s2member-profile").submit(function(){var e=this,d="",c="",i="";var g=b("input#ws-plugin--s2member-profile-password1",e);var f=b("input#ws-plugin--s2member-profile-password2",e);var h=b("input#ws-plugin--s2member-profile-submit",e);b(":input",e).each(function(){var j=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(j&&(d=b.trim(b('label[for="'+j+'"]',e).first().children("strong").first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){i+=c+"\n\n"}}});if(i=b.trim(i)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+i);return false}else{if(b.trim(g.val())&&b.trim(g.val())!==b.trim(f.val())){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Passwords do not match up. Please try again.", "s2member-front", "s2member")); ?>');return false}else{if(b.trim(g.val())&&b.trim(g.val()).length<6){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Password MUST be at least 6 characters. Please try again.", "s2member-front", "s2member")); ?>');return false}}}ws_plugin__s2member_animateProcessing(h);return true})}if(location.href.match(/\/wp-signup\.php/)){b("div#content > div.mu_register > form#setupform").submit(function(){var e=this,d="",c="",g="";b("input#user_email",e).attr("data-expected","email");var f=b('p.submit input[type="submit"]',e);b("input#user_name, input#user_email, input#blogname, input#blog_title, input#captcha_code",e).attr({"aria-required":"true"});b(":input",e).each(function(){var h=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(h&&(d=b.trim(b('label[for="'+h+'"]',e).first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){g+=c+"\n\n"}}});if(g=b.trim(g)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+g);return false}ws_plugin__s2member_animateProcessing(f);return true})}if(location.href.match(/\/wp-login\.php/)){b("input#ws-plugin--s2member-custom-reg-field-user-pass1, input#ws-plugin--s2member-custom-reg-field-user-pass2").keyup(function(){ws_plugin__s2member_passwordStrength(b("input#user_login"),b("input#ws-plugin--s2member-custom-reg-field-user-pass1"),b("input#ws-plugin--s2member-custom-reg-field-user-pass2"),b("div#ws-plugin--s2member-custom-reg-field-user-pass-strength"))});b("div#login > form#registerform input#wp-submit").attr("tabindex","1000");b("div#login > form#registerform").submit(function(){var e=this,d="",c="",i="";b("input#user_email",e).attr("data-expected","email");var h=b('input#ws-plugin--s2member-custom-reg-field-user-pass1[aria-required="true"]',e);var f=b("input#ws-plugin--s2member-custom-reg-field-user-pass2",e);var g=b("input#wp-submit",e);b("input#user_login, input#user_email, input#captcha_code",e).attr({"aria-required":"true"});b(":input",e).each(function(){var j=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(b.inArray(j,["user_login","user_email","captcha_code"])!==-1){if((d=b.trim(b(this).parent("label").text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){i+=c+"\n\n"}}}else{if(j&&(d=b.trim(b('label[for="'+j+'"]',e).first().children("span").first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){i+=c+"\n\n"}}}});if(i=b.trim(i)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+i);return false}else{if(h.length&&b.trim(h.val())!==b.trim(f.val())){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Passwords do not match up. Please try again.", "s2member-front", "s2member")); ?>');return false}else{if(h.length&&b.trim(h.val()).length<6){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Password MUST be at least 6 characters. Please try again.", "s2member-front", "s2member")); ?>');return false}}}ws_plugin__s2member_animateProcessing(g);return true})}if(location.href.match(/\/wp-admin\/(user\/)?profile\.php/)){b("form#your-profile").submit(function(){var e=this,d="",c="",f="";b("input#email",e).attr("data-expected","email");b(':input[id^="ws-plugin--s2member-profile-"]',e).each(function(){var g=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(g&&(d=b.trim(b('label[for="'+g+'"]',e).first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){f+=c+"\n\n"}}});if(f=b.trim(f)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+f);return false}return true})}if(a){b("body.registration form div#ws-plugin--s2member-custom-reg-fields-4bp-section").closest("form").submit(function(){var e=this,d="",c="",f="";b("input#signup_email",e).attr("data-expected","email");b("input#signup_username, input#signup_email, input#signup_password, input#field_1",e).attr({"aria-required":"true"});b(":input",e).each(function(){var g=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(g&&(d=b.trim(b('label[for="'+g+'"]',e).first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){f+=c+"\n\n"}}});if(f=b.trim(f)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+f);return false}return true});b("body.logged-in.profile.profile-edit :input.ws-plugin--s2member-profile-field-4bp").closest("form").submit(function(){var e=this,d="",c="",f="";b("input#field_1",e).attr({"aria-required":"true"});b(":input",e).each(function(){var g=b.trim(b(this).attr("id")).replace(/-[0-9]+$/g,"");if(g&&(d=b.trim(b('label[for="'+g+'"]',e).first().text().replace(/[\r\n\t]+/g," ")))){if(c=ws_plugin__s2member_validationErrors(d,this,e)){f+=c+"\n\n"}}});if(f=b.trim(f)){alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>\n\n'+f);return false}return true})}ws_plugin__s2member_passwordStrength=function(d,f,e,c){if(d instanceof jQuery&&f instanceof jQuery&&e instanceof jQuery&&c instanceof jQuery&&typeof passwordStrength==="function"&&typeof pwsL10n==="object"){c.removeClass("ws-plugin--s2member-password-strength-short ws-plugin--s2member-password-strength-bad ws-plugin--s2member-password-strength-good ws-plugin--s2member-password-strength-strong ws-plugin--s2member-password-strength-mismatch");switch(passwordStrength(f.val(),d.val(),e.val())){case 1:c.addClass("ws-plugin--s2member-password-strength-short").html(pwsL10n["short"]);break;case 2:c.addClass("ws-plugin--s2member-password-strength-bad").html(pwsL10n.bad);break;case 3:c.addClass("ws-plugin--s2member-password-strength-good").html(pwsL10n.good);break;case 4:c.addClass("ws-plugin--s2member-password-strength-strong").html(pwsL10n.strong);break;case 5:c.addClass("ws-plugin--s2member-password-strength-mismatch").html(pwsL10n.mismatch);break;default:c.addClass("ws-plugin--s2member-password-strength-short").html(pwsL10n["short"])}}return};ws_plugin__s2member_validationErrors=function(o,n,d,j,i){if(typeof o==="string"&&o&&typeof n==="object"&&typeof d==="object"){if(typeof n.tagName==="string"&&n.tagName.match(/^(input|textarea|select)$/i)&&!n.disabled){var q=n.tagName.toLowerCase(),m=b(n),l=b.trim(m.attr("type")).toLowerCase(),c=b.trim(m.attr("name")),p=m.val();var j=(typeof j==="boolean")?j:(m.attr("aria-required")==="true"),i=(typeof i==="string")?i:b.trim(m.attr("data-expected"));var h=('<?php echo strlen($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"]); ?>'>0)?true:false;var f=new RegExp('^(<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (implode ("|", preg_split ("/[\r\n\t ;,]+/", preg_quote ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_force_personal_emails"], "/")))); ?>)@',"i");if(q==="input"&&l==="checkbox"&&c.match(/\[\]$/)){if(typeof n.id==="string"&&n.id.match(/-0$/)){if(j&&!b('input[name="'+c.replace(/([\[\]])/g,"$1")+'"]:checked',d).length){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please check at least one of the boxes.", "s2member-front", "s2member")); ?>'}}}else{if(q==="input"&&l==="checkbox"){if(j&&!n.checked){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Required. This box must be checked.", "s2member-front", "s2member")); ?>'}}else{if(q==="input"&&l==="radio"){if(typeof n.id==="string"&&n.id.match(/-0$/)){if(j&&!b('input[name="'+c.replace(/([\[\]])/g,"$1")+'"]:checked',d).length){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please select one of the options.", "s2member-front", "s2member")); ?>'}}}else{if(q==="select"&&m.attr("multiple")){if(j&&(!(p instanceof Array)||!p.length)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please select at least one of the options.", "s2member-front", "s2member")); ?>'}}else{if(typeof p!=="string"||(j&&!(p=b.trim(p)).length)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("This is a required field, please try again.", "s2member-front", "s2member")); ?>'}else{if((p=b.trim(p)).length&&((q==="input"&&l.match(/^(text|password)$/i))||q==="textarea")&&typeof i==="string"&&i.length){if(i==="numeric-wp-commas"&&(!p.match(/^[0-9\.,]+$/)||isNaN(p.replace(/,/g,"")))){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be numeric ( with or without decimals, commas allowed ).", "s2member-front", "s2member")); ?>'}else{if(i==="numeric"&&(!p.match(/^[0-9\.]+$/)||isNaN(p))){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be numeric ( with or without decimals, no commas ).", "s2member-front", "s2member")); ?>'}else{if(i==="integer"&&(!p.match(/^[0-9]+$/)||isNaN(p))){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be an integer ( a whole number, without any decimals ).", "s2member-front", "s2member")); ?>'}else{if(i==="integer-gt-0"&&(!p.match(/^[0-9]+$/)||isNaN(p)||p<=0)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be an integer > 0 ( whole number, no decimals, greater than 0 ).", "s2member-front", "s2member")); ?>'}else{if(i==="float"&&(!p.match(/^[0-9\.]+$/)||!p.match(/[0-9]/)||!p.match(/\./)||isNaN(p))){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a float ( floating point number, decimals required ).", "s2member-front", "s2member")); ?>'}else{if(i==="float-gt-0"&&(!p.match(/^[0-9\.]+$/)||!p.match(/[0-9]/)||!p.match(/\./)||isNaN(p)||p<=0)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a float > 0 ( floating point number, decimals required, greater than 0 ).", "s2member-front", "s2member")); ?>'}else{if(i==="date"&&!p.match(/^[0-9]{2}\/[0-9]{2}\/[0-9]{4}$/)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a date ( required date format: dd/mm/yyyy ).", "s2member-front", "s2member")); ?>'}else{if(i==="email"&&!p.match(/^([a-z_~0-9\+\-]+)(((\.?)([a-z_~0-9\+\-]+))*)(@)([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a valid email address.", "s2member-front", "s2member")); ?>'}else{if(i==="email"&&h&&p.match(f)){return o+"\n"+b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use a personal email address.\nAddresses like <%s@> are problematic.", "s2member-front", "s2member")); ?>',p.split("@")[0])}else{if(i==="url"&&!p.match(/^http(s?)\:\/\/(.{5,})$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a full URL ( starting with http or https ).", "s2member-front", "s2member")); ?>'}else{if(i==="domain"&&!p.match(/^([a-z0-9]+)(((-*)([a-z0-9]+))*)(((\.)([a-z0-9]+)(((-*)([a-z0-9]+))*))*)(\.)([a-z]{2,6})$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a domain name ( domain name only, without http ).", "s2member-front", "s2member")); ?>'}else{if(i==="phone"&&(!p.match(/^[0-9 \(\)\-]+$/)||p.replace(/[^0-9]/g,"").length!==10)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a phone # ( 10 digits w/possible hyphens,spaces,brackets ).", "s2member-front", "s2member")); ?>'}else{if(i==="uszip"&&!p.match(/^[0-9]{5}(-[0-9]{4})?$/)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a US zipcode ( 5-9 digits w/possible hyphen ).", "s2member-front", "s2member")); ?>'}else{if(i==="cazip"&&!p.match(/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a Canadian zipcode ( 6 alpha-numerics w/possible space ).", "s2member-front", "s2member")); ?>'}else{if(i==="uczip"&&!p.match(/^[0-9]{5}(-[0-9]{4})?$/)&&!p.match(/^[0-9A-Z]{3}( ?)[0-9A-Z]{3}$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be a zipcode ( either a US or Canadian zipcode ).", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphanumerics-spaces-punctuation-([0-9]+)(-e)?$/)&&!p.match(/^[a-z 0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics, spaces & punctuation only.", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphanumerics-spaces-([0-9]+)(-e)?$/)&&!p.match(/^[a-z 0-9]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics & spaces only.", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphanumerics-punctuation-([0-9]+)(-e)?$/)&&!p.match(/^[a-z0-9,\.\/\?\:;"'\{\}\[\]\|\\\+\=_\-\(\)\*&\^%\$#@\!`~]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics & punctuation only ( no spaces ).", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphanumerics-([0-9]+)(-e)?$/)&&!p.match(/^[a-z0-9]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphanumerics only ( no spaces/punctuation ).", "s2member-front", "s2member")); ?>'}else{if(i.match(/^alphabetics-([0-9]+)(-e)?$/)&&!p.match(/^[a-z]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use alphabetics only ( no digits/spaces/punctuation ).", "s2member-front", "s2member")); ?>'}else{if(i.match(/^numerics-([0-9]+)(-e)?$/)&&!p.match(/^[0-9]+$/i)){return o+'\n<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Please use numeric digits only.", "s2member-front", "s2member")); ?>'}else{if(i.match(/^(any|alphanumerics-spaces-punctuation|alphanumerics-spaces|alphanumerics-punctuation|alphanumerics|alphabetics|numerics)-([0-9]+)(-e)?$/)){var k=i.split("-"),e=Number(k[1]),g=(k.length>2&&k[2]==="e")?true:false;if(g&&p.length!==e){return o+"\n"+b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be exactly %s %s.", "s2member-front", "s2member")); ?>',e,((k[0]==="numerics")?((e===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digit", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digits", "s2member-front", "s2member")); ?>'):((e===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("character", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("characters", "s2member-front", "s2member")); ?>')))}else{if(p.length<e){return o+"\n"+b.sprintf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be at least %s %s.", "s2member-front", "s2member")); ?>',e,((k[0]==="numerics")?((e===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digit", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digits", "s2member-front", "s2member")); ?>'):((e===1)?'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("character", "s2member-front", "s2member")); ?>':'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("characters", "s2member-front", "s2member")); ?>')))}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}return""};ws_plugin__s2member_animateProcessingConfig={originalText:"",interval:null,speed:100},ws_plugin__s2member_animateProcessing=function(d,c){if(d instanceof jQuery){if(c){clearInterval(ws_plugin__s2member_animateProcessingConfig.interval);if(ws_plugin__s2member_animateProcessingConfig.originalText){d.val(ws_plugin__s2member_animateProcessingConfig.originalText)}return}d.first().each(function(){var g=b(this),f=0,e="r",h=[".","..","..."];ws_plugin__s2member_animateProcessingConfig.originalText=g.val();clearInterval(ws_plugin__s2member_animateProcessingConfig.interval);ws_plugin__s2member_animateProcessingConfig.interval=setInterval(function(){if(e==="r"){if(f+1<=h.length-1){f=f+1,e="r"}else{f=f-1,e="l"}}else{if(e==="l"){if(f-1>=0){f=f-1,e="l"}else{f=f+1,e="r"}}}for(var j=h[f],i=h[f].length;i<h.length;i++){j+=" "}g.val('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Processing", "s2member-front", "s2member")); ?>'+j)},ws_plugin__s2member_animateProcessingConfig.speed)})}}});
|
includes/s2member.js
CHANGED
@@ -16,13 +16,9 @@
|
|
16 |
* @package s2Member
|
17 |
* @since 3.0
|
18 |
*/
|
19 |
-
/*
|
20 |
-
Scripting routines handled on document ready state.
|
21 |
-
*/
|
22 |
jQuery(document).ready (function($)
|
23 |
{
|
24 |
-
ws_plugin__s2member_uniqueFilesDownloaded =
|
25 |
-
/* This is used in case a user downloads multiple files from a single page. */
|
26 |
/**/
|
27 |
var runningBuddyPress = '<?php echo c_ws_plugin__s2member_utils_conds::bp_is_installed ("query-active-plugins") ? "1" : ""; ?>';
|
28 |
/**/
|
@@ -40,7 +36,7 @@ jQuery(document).ready (function($)
|
|
40 |
{
|
41 |
if ($.inArray (this.href, ws_plugin__s2member_uniqueFilesDownloaded) === -1)
|
42 |
ws_plugin__s2member_uniqueFilesDownloaded.push (this.href), S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY++;
|
43 |
-
return
|
44 |
}
|
45 |
else /* Disallow. */
|
46 |
return false;
|
@@ -49,18 +45,15 @@ jQuery(document).ready (function($)
|
|
49 |
return true;
|
50 |
});
|
51 |
}
|
52 |
-
|
53 |
-
|
54 |
-
`[s2Member-Profile /]` could appear on any Post/Page/Widget.
|
55 |
-
*/
|
56 |
-
if (!location.href.match (/\/wp-admin(\/|$)/))
|
57 |
{
|
58 |
$('input#ws-plugin--s2member-profile-password1, input#ws-plugin--s2member-profile-password2').keyup (function()
|
59 |
{
|
60 |
ws_plugin__s2member_passwordStrength($('input#ws-plugin--s2member-profile-login'), $('input#ws-plugin--s2member-profile-password1'), $('input#ws-plugin--s2member-profile-password2'), $('div#ws-plugin--s2member-profile-password-strength'));
|
61 |
});
|
62 |
/**/
|
63 |
-
$('form#ws-plugin--s2member-profile').submit (function()
|
64 |
{
|
65 |
var context = this, label = '', error = '', errors = '';
|
66 |
/**/
|
@@ -69,14 +62,14 @@ jQuery(document).ready (function($)
|
|
69 |
/**/
|
70 |
var $submissionButton = $('input#ws-plugin--s2member-profile-submit', context);
|
71 |
/**/
|
72 |
-
$(':input', context).each (
|
73 |
{
|
74 |
-
var id = $.trim ($(this).attr ('id')).replace (/-[0-9]+$/g, '');
|
75 |
/**/
|
76 |
if (id && (label = $.trim ($('label[for="' + id + '"]', context).first ().children ('strong').first ().text ().replace (/[\r\n\t]+/g, ' '))))
|
77 |
{
|
78 |
if (error = ws_plugin__s2member_validationErrors(label, this, context))
|
79 |
-
errors += error + '\n\n';
|
80 |
}
|
81 |
});
|
82 |
/**/
|
@@ -94,7 +87,7 @@ jQuery(document).ready (function($)
|
|
94 |
return false;
|
95 |
}
|
96 |
/**/
|
97 |
-
else if ($.trim ($password1.val ()) && $.trim ($password1.val ()).length < 6)
|
98 |
{
|
99 |
alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>' + '\n\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Password MUST be at least 6 characters. Please try again.", "s2member-front", "s2member")); ?>');
|
100 |
/**/
|
@@ -106,9 +99,7 @@ jQuery(document).ready (function($)
|
|
106 |
return true;
|
107 |
});
|
108 |
}
|
109 |
-
|
110 |
-
Attach form submission handler to `/wp-signup.php`.
|
111 |
-
*/
|
112 |
if (location.href.match (/\/wp-signup\.php/))
|
113 |
{
|
114 |
$('div#content > div.mu_register > form#setupform').submit (function()
|
@@ -121,14 +112,14 @@ jQuery(document).ready (function($)
|
|
121 |
/**/
|
122 |
$('input#user_name, input#user_email, input#blogname, input#blog_title, input#captcha_code', context).attr ({'aria-required': 'true'});
|
123 |
/**/
|
124 |
-
$(':input', context).each (
|
125 |
{
|
126 |
-
var id = $.trim ($(this).attr ('id')).replace (/-[0-9]+$/g, '');
|
127 |
/**/
|
128 |
if (id && (label = $.trim ($('label[for="' + id + '"]', context).first ().text ().replace (/[\r\n\t]+/g, ' '))))
|
129 |
{
|
130 |
if (error = ws_plugin__s2member_validationErrors(label, this, context))
|
131 |
-
errors += error + '\n\n';
|
132 |
}
|
133 |
});
|
134 |
/**/
|
@@ -144,9 +135,7 @@ jQuery(document).ready (function($)
|
|
144 |
return true;
|
145 |
});
|
146 |
}
|
147 |
-
|
148 |
-
Attach form submission handler to `/wp-login.php?action=register`.
|
149 |
-
*/
|
150 |
if (location.href.match (/\/wp-login\.php/))
|
151 |
{
|
152 |
$('input#ws-plugin--s2member-custom-reg-field-user-pass1, input#ws-plugin--s2member-custom-reg-field-user-pass2').keyup (function()
|
@@ -154,7 +143,7 @@ jQuery(document).ready (function($)
|
|
154 |
ws_plugin__s2member_passwordStrength($('input#user_login'), $('input#ws-plugin--s2member-custom-reg-field-user-pass1'), $('input#ws-plugin--s2member-custom-reg-field-user-pass2'), $('div#ws-plugin--s2member-custom-reg-field-user-pass-strength'));
|
155 |
});
|
156 |
/**/
|
157 |
-
$('div#login > form#registerform input#wp-submit').attr
|
158 |
/**/
|
159 |
$('div#login > form#registerform').submit (function()
|
160 |
{
|
@@ -165,26 +154,26 @@ jQuery(document).ready (function($)
|
|
165 |
var $pass1 = $('input#ws-plugin--s2member-custom-reg-field-user-pass1[aria-required="true"]', context);
|
166 |
var $pass2 = $('input#ws-plugin--s2member-custom-reg-field-user-pass2', context);
|
167 |
/**/
|
168 |
-
var $submissionButton = $('input#wp-submit', context);
|
169 |
/**/
|
170 |
$('input#user_login, input#user_email, input#captcha_code', context).attr ({'aria-required': 'true'});
|
171 |
/**/
|
172 |
-
$(':input', context).each (
|
173 |
{
|
174 |
-
var id = $.trim ($(this).attr ('id')).replace (/-[0-9]+$/g, '');
|
175 |
/**/
|
176 |
-
if ($.inArray (id, ['user_login', 'user_email', 'captcha_code']) !== -1)
|
177 |
{
|
178 |
-
if ((label = $.trim ($(this).parent ('label').text ().replace (/[\r\n\t]+/g, ' '))))
|
179 |
{
|
180 |
if (error = ws_plugin__s2member_validationErrors(label, this, context))
|
181 |
-
errors += error + '\n\n';
|
182 |
}
|
183 |
}
|
184 |
else if (id && (label = $.trim ($('label[for="' + id + '"]', context).first ().children ('span').first ().text ().replace (/[\r\n\t]+/g, ' '))))
|
185 |
{
|
186 |
if (error = ws_plugin__s2member_validationErrors(label, this, context))
|
187 |
-
errors += error + '\n\n';
|
188 |
}
|
189 |
});
|
190 |
/**/
|
@@ -202,7 +191,7 @@ jQuery(document).ready (function($)
|
|
202 |
return false;
|
203 |
}
|
204 |
/**/
|
205 |
-
else if ($pass1.length && $.trim ($pass1.val ()).length < 6)
|
206 |
{
|
207 |
alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>' + '\n\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Password MUST be at least 6 characters. Please try again.", "s2member-front", "s2member")); ?>');
|
208 |
/**/
|
@@ -214,25 +203,23 @@ jQuery(document).ready (function($)
|
|
214 |
return true;
|
215 |
});
|
216 |
}
|
217 |
-
|
218 |
-
Attach form submission handler to `/wp-admin/(user/)?profile.php`.
|
219 |
-
*/
|
220 |
if (location.href.match (/\/wp-admin\/(user\/)?profile\.php/))
|
221 |
{
|
222 |
-
$('form#your-profile').submit (
|
223 |
{
|
224 |
var context = this, label = '', error = '', errors = '';
|
225 |
/**/
|
226 |
$('input#email', context).attr ('data-expected', 'email');
|
227 |
/**/
|
228 |
-
$(':input[id^="ws-plugin--s2member-profile-"]', context).each (
|
229 |
{
|
230 |
-
var id = $.trim ($(this).attr ('id')).replace (/-[0-9]+$/g, '');
|
231 |
/**/
|
232 |
if (id && (label = $.trim ($('label[for="' + id + '"]', context).first ().text ().replace (/[\r\n\t]+/g, ' '))))
|
233 |
{
|
234 |
if (error = ws_plugin__s2member_validationErrors(label, this, context))
|
235 |
-
errors += error + '\n\n';
|
236 |
}
|
237 |
});
|
238 |
/**/
|
@@ -246,10 +233,8 @@ jQuery(document).ready (function($)
|
|
246 |
return true;
|
247 |
});
|
248 |
}
|
249 |
-
|
250 |
-
|
251 |
-
*/
|
252 |
-
if (runningBuddyPress) /* Attach form submission handler to `/register` for BuddyPress. */
|
253 |
{
|
254 |
$('body.registration form div#ws-plugin--s2member-custom-reg-fields-4bp-section').closest ('form').submit (function()
|
255 |
{
|
@@ -259,14 +244,14 @@ jQuery(document).ready (function($)
|
|
259 |
/**/
|
260 |
$('input#signup_username, input#signup_email, input#signup_password, input#field_1', context).attr ({'aria-required': 'true'});
|
261 |
/**/
|
262 |
-
$(':input', context).each (
|
263 |
{
|
264 |
-
var id = $.trim ($(this).attr ('id')).replace (/-[0-9]+$/g, '');
|
265 |
/**/
|
266 |
if (id && (label = $.trim ($('label[for="' + id + '"]', context).first ().text ().replace (/[\r\n\t]+/g, ' '))))
|
267 |
{
|
268 |
if (error = ws_plugin__s2member_validationErrors(label, this, context))
|
269 |
-
errors += error + '\n\n';
|
270 |
}
|
271 |
});
|
272 |
/**/
|
@@ -279,23 +264,21 @@ jQuery(document).ready (function($)
|
|
279 |
/**/
|
280 |
return true;
|
281 |
});
|
282 |
-
|
283 |
-
Attach form submission handler to `/profile/edit/` for BuddyPress.
|
284 |
-
*/
|
285 |
$('body.logged-in.profile.profile-edit :input.ws-plugin--s2member-profile-field-4bp').closest ('form').submit (function()
|
286 |
{
|
287 |
var context = this, label = '', error = '', errors = '';
|
288 |
/**/
|
289 |
$('input#field_1', context).attr ({'aria-required': 'true'});
|
290 |
/**/
|
291 |
-
$(':input', context).each (
|
292 |
{
|
293 |
-
var id = $.trim ($(this).attr ('id')).replace (/-[0-9]+$/g, '');
|
294 |
/**/
|
295 |
if (id && (label = $.trim ($('label[for="' + id + '"]', context).first ().text ().replace (/[\r\n\t]+/g, ' '))))
|
296 |
{
|
297 |
if (error = ws_plugin__s2member_validationErrors(label, this, context))
|
298 |
-
errors += error + '\n\n';
|
299 |
}
|
300 |
});
|
301 |
/**/
|
@@ -309,16 +292,14 @@ jQuery(document).ready (function($)
|
|
309 |
return true;
|
310 |
});
|
311 |
}
|
312 |
-
|
313 |
-
Password strength. Accecpts jQuery objects.
|
314 |
-
*/
|
315 |
ws_plugin__s2member_passwordStrength = function($username, $pass1, $pass2, $result)
|
316 |
{
|
317 |
if ($username instanceof jQuery && $pass1 instanceof jQuery && $pass2 instanceof jQuery && $result instanceof jQuery && typeof passwordStrength === 'function' && typeof pwsL10n === 'object')
|
318 |
{
|
319 |
$result.removeClass ('ws-plugin--s2member-password-strength-short ws-plugin--s2member-password-strength-bad ws-plugin--s2member-password-strength-good ws-plugin--s2member-password-strength-strong ws-plugin--s2member-password-strength-mismatch');
|
320 |
/**/
|
321 |
-
switch (passwordStrength($pass1.val (), $username.val (), $pass2.val ()))
|
322 |
{
|
323 |
case 1:
|
324 |
$result.addClass ('ws-plugin--s2member-password-strength-short').html (pwsL10n['short']);
|
@@ -340,11 +321,9 @@ jQuery(document).ready (function($)
|
|
340 |
}
|
341 |
}
|
342 |
/**/
|
343 |
-
return;
|
344 |
};
|
345 |
-
|
346 |
-
Handles JavaScript validation errors.
|
347 |
-
*/
|
348 |
ws_plugin__s2member_validationErrors = function(label, field, context, required, expected)
|
349 |
{
|
350 |
if (typeof label === 'string' && label && typeof field === 'object' && typeof context === 'object')
|
@@ -472,10 +451,10 @@ jQuery(document).ready (function($)
|
|
472 |
{
|
473 |
var split = expected.split ('-'), length = Number(split[1]), exactLength = (split.length > 2 && split[2] === 'e') ? true : false;
|
474 |
/**/
|
475 |
-
if
|
476 |
return label + '\n' + $.sprintf ('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be exactly %s %s.", "s2member-front", "s2member")); ?>', length, ((split[0] === 'numerics') ? ((length === 1) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digit", "s2member-front", "s2member")); ?>' : '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digits", "s2member-front", "s2member")); ?>') : ((length === 1) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("character", "s2member-front", "s2member")); ?>' : '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("characters", "s2member-front", "s2member")); ?>')));
|
477 |
/**/
|
478 |
-
else if
|
479 |
return label + '\n' + $.sprintf ('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be at least %s %s.", "s2member-front", "s2member")); ?>', length, ((split[0] === 'numerics') ? ((length === 1) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digit", "s2member-front", "s2member")); ?>' : '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digits", "s2member-front", "s2member")); ?>') : ((length === 1) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("character", "s2member-front", "s2member")); ?>' : '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("characters", "s2member-front", "s2member")); ?>')));
|
480 |
}
|
481 |
}
|
@@ -486,19 +465,19 @@ jQuery(document).ready (function($)
|
|
486 |
/**/
|
487 |
ws_plugin__s2member_animateProcessingConfig = {originalText: '', interval: null, speed: 100}, ws_plugin__s2member_animateProcessing = function($obj, reset)
|
488 |
{
|
489 |
-
if
|
490 |
{
|
491 |
-
if
|
492 |
{
|
493 |
clearInterval(ws_plugin__s2member_animateProcessingConfig.interval);
|
494 |
/**/
|
495 |
if (ws_plugin__s2member_animateProcessingConfig.originalText) /* ? */
|
496 |
$obj.val (ws_plugin__s2member_animateProcessingConfig.originalText);
|
497 |
/**/
|
498 |
-
return; /* No need to proceed any further.
|
499 |
}
|
500 |
/**/
|
501 |
-
$obj.first ().each (
|
502 |
{
|
503 |
var $this = $(this), i = 0, dir = 'r', dots = ['.', '..', '...'];
|
504 |
/**/
|
@@ -508,7 +487,7 @@ jQuery(document).ready (function($)
|
|
508 |
/**/
|
509 |
ws_plugin__s2member_animateProcessingConfig.interval = setInterval(function()
|
510 |
{
|
511 |
-
if (dir === 'r')
|
512 |
{
|
513 |
if (i + 1 <= dots.length - 1)
|
514 |
i = i + 1, dir = 'r';
|
@@ -516,7 +495,7 @@ jQuery(document).ready (function($)
|
|
516 |
i = i - 1, dir = 'l';
|
517 |
}
|
518 |
/**/
|
519 |
-
else if (dir === 'l')
|
520 |
{
|
521 |
if (i - 1 >= 0)
|
522 |
i = i - 1, dir = 'l';
|
@@ -526,7 +505,7 @@ jQuery(document).ready (function($)
|
|
526 |
/**/
|
527 |
for (var _dots = dots[i], l = dots[i].length; l < dots.length; l++)
|
528 |
{
|
529 |
-
_dots +=
|
530 |
}
|
531 |
/**/
|
532 |
$this.val ('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Processing", "s2member-front", "s2member")); ?>' + _dots);
|
16 |
* @package s2Member
|
17 |
* @since 3.0
|
18 |
*/
|
|
|
|
|
|
|
19 |
jQuery(document).ready (function($)
|
20 |
{
|
21 |
+
ws_plugin__s2member_uniqueFilesDownloaded = /* Real-time counts. */ [];
|
|
|
22 |
/**/
|
23 |
var runningBuddyPress = '<?php echo c_ws_plugin__s2member_utils_conds::bp_is_installed ("query-active-plugins") ? "1" : ""; ?>';
|
24 |
/**/
|
36 |
{
|
37 |
if ($.inArray (this.href, ws_plugin__s2member_uniqueFilesDownloaded) === -1)
|
38 |
ws_plugin__s2member_uniqueFilesDownloaded.push (this.href), S2MEMBER_CURRENT_USER_DOWNLOADS_CURRENTLY++;
|
39 |
+
return /* Allow. */ true;
|
40 |
}
|
41 |
else /* Disallow. */
|
42 |
return false;
|
45 |
return true;
|
46 |
});
|
47 |
}
|
48 |
+
/**/
|
49 |
+
if (!location.href.match (/\/wp-admin(\/|\?|$)/))
|
|
|
|
|
|
|
50 |
{
|
51 |
$('input#ws-plugin--s2member-profile-password1, input#ws-plugin--s2member-profile-password2').keyup (function()
|
52 |
{
|
53 |
ws_plugin__s2member_passwordStrength($('input#ws-plugin--s2member-profile-login'), $('input#ws-plugin--s2member-profile-password1'), $('input#ws-plugin--s2member-profile-password2'), $('div#ws-plugin--s2member-profile-password-strength'));
|
54 |
});
|
55 |
/**/
|
56 |
+
$('form#ws-plugin--s2member-profile').submit ( /* Validate Profile. */function()
|
57 |
{
|
58 |
var context = this, label = '', error = '', errors = '';
|
59 |
/**/
|
62 |
/**/
|
63 |
var $submissionButton = $('input#ws-plugin--s2member-profile-submit', context);
|
64 |
/**/
|
65 |
+
$(':input', context).each ( /* Go through them all together. */function()
|
66 |
{
|
67 |
+
var id = /* Remove numeric suffixes. */ $.trim ($(this).attr ('id')).replace (/-[0-9]+$/g, '');
|
68 |
/**/
|
69 |
if (id && (label = $.trim ($('label[for="' + id + '"]', context).first ().children ('strong').first ().text ().replace (/[\r\n\t]+/g, ' '))))
|
70 |
{
|
71 |
if (error = ws_plugin__s2member_validationErrors(label, this, context))
|
72 |
+
errors += /* Collect errors. */ error + '\n\n';
|
73 |
}
|
74 |
});
|
75 |
/**/
|
87 |
return false;
|
88 |
}
|
89 |
/**/
|
90 |
+
else if ($.trim ($password1.val ()) && /* Enforce minimum length requirement here. */ $.trim ($password1.val ()).length < 6)
|
91 |
{
|
92 |
alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>' + '\n\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Password MUST be at least 6 characters. Please try again.", "s2member-front", "s2member")); ?>');
|
93 |
/**/
|
99 |
return true;
|
100 |
});
|
101 |
}
|
102 |
+
/**/
|
|
|
|
|
103 |
if (location.href.match (/\/wp-signup\.php/))
|
104 |
{
|
105 |
$('div#content > div.mu_register > form#setupform').submit (function()
|
112 |
/**/
|
113 |
$('input#user_name, input#user_email, input#blogname, input#blog_title, input#captcha_code', context).attr ({'aria-required': 'true'});
|
114 |
/**/
|
115 |
+
$(':input', context).each ( /* Go through them all together. */function()
|
116 |
{
|
117 |
+
var id = /* Remove numeric suffixes. */ $.trim ($(this).attr ('id')).replace (/-[0-9]+$/g, '');
|
118 |
/**/
|
119 |
if (id && (label = $.trim ($('label[for="' + id + '"]', context).first ().text ().replace (/[\r\n\t]+/g, ' '))))
|
120 |
{
|
121 |
if (error = ws_plugin__s2member_validationErrors(label, this, context))
|
122 |
+
errors += /* Collect errors. */ error + '\n\n';
|
123 |
}
|
124 |
});
|
125 |
/**/
|
135 |
return true;
|
136 |
});
|
137 |
}
|
138 |
+
/**/
|
|
|
|
|
139 |
if (location.href.match (/\/wp-login\.php/))
|
140 |
{
|
141 |
$('input#ws-plugin--s2member-custom-reg-field-user-pass1, input#ws-plugin--s2member-custom-reg-field-user-pass2').keyup (function()
|
143 |
ws_plugin__s2member_passwordStrength($('input#user_login'), $('input#ws-plugin--s2member-custom-reg-field-user-pass1'), $('input#ws-plugin--s2member-custom-reg-field-user-pass2'), $('div#ws-plugin--s2member-custom-reg-field-user-pass-strength'));
|
144 |
});
|
145 |
/**/
|
146 |
+
$('div#login > form#registerform input#wp-submit').attr /* Makes plenty of room ( i.e. tab indexes ) for Custom Registration Fields. */ ('tabindex', '1000');
|
147 |
/**/
|
148 |
$('div#login > form#registerform').submit (function()
|
149 |
{
|
154 |
var $pass1 = $('input#ws-plugin--s2member-custom-reg-field-user-pass1[aria-required="true"]', context);
|
155 |
var $pass2 = $('input#ws-plugin--s2member-custom-reg-field-user-pass2', context);
|
156 |
/**/
|
157 |
+
var $submissionButton = /* Registration submission button. */ $('input#wp-submit', context);
|
158 |
/**/
|
159 |
$('input#user_login, input#user_email, input#captcha_code', context).attr ({'aria-required': 'true'});
|
160 |
/**/
|
161 |
+
$(':input', context).each ( /* Go through them all together. */function()
|
162 |
{
|
163 |
+
var id = /* Remove numeric suffixes. */ $.trim ($(this).attr ('id')).replace (/-[0-9]+$/g, '');
|
164 |
/**/
|
165 |
+
if /* No for="" attribute on these fields. */ ($.inArray (id, ['user_login', 'user_email', 'captcha_code']) !== -1)
|
166 |
{
|
167 |
+
if /* Use label. */ ((label = $.trim ($(this).parent ('label').text ().replace (/[\r\n\t]+/g, ' '))))
|
168 |
{
|
169 |
if (error = ws_plugin__s2member_validationErrors(label, this, context))
|
170 |
+
errors += /* Collect errors. */ error + '\n\n';
|
171 |
}
|
172 |
}
|
173 |
else if (id && (label = $.trim ($('label[for="' + id + '"]', context).first ().children ('span').first ().text ().replace (/[\r\n\t]+/g, ' '))))
|
174 |
{
|
175 |
if (error = ws_plugin__s2member_validationErrors(label, this, context))
|
176 |
+
errors += /* Collect errors. */ error + '\n\n';
|
177 |
}
|
178 |
});
|
179 |
/**/
|
191 |
return false;
|
192 |
}
|
193 |
/**/
|
194 |
+
else if /* Enforce minimum length requirement here. */ ($pass1.length && $.trim ($pass1.val ()).length < 6)
|
195 |
{
|
196 |
alert('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("— Oops, you missed something: —", "s2member-front", "s2member")); ?>' + '\n\n' + '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Password MUST be at least 6 characters. Please try again.", "s2member-front", "s2member")); ?>');
|
197 |
/**/
|
203 |
return true;
|
204 |
});
|
205 |
}
|
206 |
+
/**/
|
|
|
|
|
207 |
if (location.href.match (/\/wp-admin\/(user\/)?profile\.php/))
|
208 |
{
|
209 |
+
$('form#your-profile').submit ( /* Validation. */function()
|
210 |
{
|
211 |
var context = this, label = '', error = '', errors = '';
|
212 |
/**/
|
213 |
$('input#email', context).attr ('data-expected', 'email');
|
214 |
/**/
|
215 |
+
$(':input[id^="ws-plugin--s2member-profile-"]', context).each ( /* Go through them all together. */function()
|
216 |
{
|
217 |
+
var id = /* Remove numeric suffixes. */ $.trim ($(this).attr ('id')).replace (/-[0-9]+$/g, '');
|
218 |
/**/
|
219 |
if (id && (label = $.trim ($('label[for="' + id + '"]', context).first ().text ().replace (/[\r\n\t]+/g, ' '))))
|
220 |
{
|
221 |
if (error = ws_plugin__s2member_validationErrors(label, this, context))
|
222 |
+
errors += /* Collect errors. */ error + '\n\n';
|
223 |
}
|
224 |
});
|
225 |
/**/
|
233 |
return true;
|
234 |
});
|
235 |
}
|
236 |
+
/**/
|
237 |
+
if /* Attach form submission handler to `/register` for BuddyPress. */ (runningBuddyPress)
|
|
|
|
|
238 |
{
|
239 |
$('body.registration form div#ws-plugin--s2member-custom-reg-fields-4bp-section').closest ('form').submit (function()
|
240 |
{
|
244 |
/**/
|
245 |
$('input#signup_username, input#signup_email, input#signup_password, input#field_1', context).attr ({'aria-required': 'true'});
|
246 |
/**/
|
247 |
+
$(':input', context).each ( /* Go through them all together. */function()
|
248 |
{
|
249 |
+
var id = /* Remove numeric suffixes. */ $.trim ($(this).attr ('id')).replace (/-[0-9]+$/g, '');
|
250 |
/**/
|
251 |
if (id && (label = $.trim ($('label[for="' + id + '"]', context).first ().text ().replace (/[\r\n\t]+/g, ' '))))
|
252 |
{
|
253 |
if (error = ws_plugin__s2member_validationErrors(label, this, context))
|
254 |
+
errors += /* Collect errors. */ error + '\n\n';
|
255 |
}
|
256 |
});
|
257 |
/**/
|
264 |
/**/
|
265 |
return true;
|
266 |
});
|
267 |
+
/**/
|
|
|
|
|
268 |
$('body.logged-in.profile.profile-edit :input.ws-plugin--s2member-profile-field-4bp').closest ('form').submit (function()
|
269 |
{
|
270 |
var context = this, label = '', error = '', errors = '';
|
271 |
/**/
|
272 |
$('input#field_1', context).attr ({'aria-required': 'true'});
|
273 |
/**/
|
274 |
+
$(':input', context).each ( /* Go through them all together. */function()
|
275 |
{
|
276 |
+
var id = /* Remove numeric suffixes. */ $.trim ($(this).attr ('id')).replace (/-[0-9]+$/g, '');
|
277 |
/**/
|
278 |
if (id && (label = $.trim ($('label[for="' + id + '"]', context).first ().text ().replace (/[\r\n\t]+/g, ' '))))
|
279 |
{
|
280 |
if (error = ws_plugin__s2member_validationErrors(label, this, context))
|
281 |
+
errors += /* Collect errors. */ error + '\n\n';
|
282 |
}
|
283 |
});
|
284 |
/**/
|
292 |
return true;
|
293 |
});
|
294 |
}
|
295 |
+
/**/
|
|
|
|
|
296 |
ws_plugin__s2member_passwordStrength = function($username, $pass1, $pass2, $result)
|
297 |
{
|
298 |
if ($username instanceof jQuery && $pass1 instanceof jQuery && $pass2 instanceof jQuery && $result instanceof jQuery && typeof passwordStrength === 'function' && typeof pwsL10n === 'object')
|
299 |
{
|
300 |
$result.removeClass ('ws-plugin--s2member-password-strength-short ws-plugin--s2member-password-strength-bad ws-plugin--s2member-password-strength-good ws-plugin--s2member-password-strength-strong ws-plugin--s2member-password-strength-mismatch');
|
301 |
/**/
|
302 |
+
switch /* Uses WordPress® script: `password-strength-meter` and `pwsL10n`. */ (passwordStrength($pass1.val (), $username.val (), $pass2.val ()))
|
303 |
{
|
304 |
case 1:
|
305 |
$result.addClass ('ws-plugin--s2member-password-strength-short').html (pwsL10n['short']);
|
321 |
}
|
322 |
}
|
323 |
/**/
|
324 |
+
return;
|
325 |
};
|
326 |
+
/**/
|
|
|
|
|
327 |
ws_plugin__s2member_validationErrors = function(label, field, context, required, expected)
|
328 |
{
|
329 |
if (typeof label === 'string' && label && typeof field === 'object' && typeof context === 'object')
|
451 |
{
|
452 |
var split = expected.split ('-'), length = Number(split[1]), exactLength = (split.length > 2 && split[2] === 'e') ? true : false;
|
453 |
/**/
|
454 |
+
if /* An exact length is required? */ (exactLength && value.length !== length)
|
455 |
return label + '\n' + $.sprintf ('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be exactly %s %s.", "s2member-front", "s2member")); ?>', length, ((split[0] === 'numerics') ? ((length === 1) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digit", "s2member-front", "s2member")); ?>' : '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digits", "s2member-front", "s2member")); ?>') : ((length === 1) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("character", "s2member-front", "s2member")); ?>' : '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("characters", "s2member-front", "s2member")); ?>')));
|
456 |
/**/
|
457 |
+
else if /* Otherwise, we interpret as the minimum length. */ (value.length < length)
|
458 |
return label + '\n' + $.sprintf ('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Must be at least %s %s.", "s2member-front", "s2member")); ?>', length, ((split[0] === 'numerics') ? ((length === 1) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digit", "s2member-front", "s2member")); ?>' : '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("digits", "s2member-front", "s2member")); ?>') : ((length === 1) ? '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("character", "s2member-front", "s2member")); ?>' : '<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("characters", "s2member-front", "s2member")); ?>')));
|
459 |
}
|
460 |
}
|
465 |
/**/
|
466 |
ws_plugin__s2member_animateProcessingConfig = {originalText: '', interval: null, speed: 100}, ws_plugin__s2member_animateProcessing = function($obj, reset)
|
467 |
{
|
468 |
+
if /* This function expects a valid jQuery object. */ ($obj instanceof jQuery)
|
469 |
{
|
470 |
+
if /* Resets back to originalText value ( also clears interval ). */ (reset)
|
471 |
{
|
472 |
clearInterval(ws_plugin__s2member_animateProcessingConfig.interval);
|
473 |
/**/
|
474 |
if (ws_plugin__s2member_animateProcessingConfig.originalText) /* ? */
|
475 |
$obj.val (ws_plugin__s2member_animateProcessingConfig.originalText);
|
476 |
/**/
|
477 |
+
return; /* No need to proceed any further. */
|
478 |
}
|
479 |
/**/
|
480 |
+
$obj.first ().each ( /* Interval routine configured here. */function()
|
481 |
{
|
482 |
var $this = $(this), i = 0, dir = 'r', dots = ['.', '..', '...'];
|
483 |
/**/
|
487 |
/**/
|
488 |
ws_plugin__s2member_animateProcessingConfig.interval = setInterval(function()
|
489 |
{
|
490 |
+
if /* Right... */ (dir === 'r')
|
491 |
{
|
492 |
if (i + 1 <= dots.length - 1)
|
493 |
i = i + 1, dir = 'r';
|
495 |
i = i - 1, dir = 'l';
|
496 |
}
|
497 |
/**/
|
498 |
+
else if /* Left.. */ (dir === 'l')
|
499 |
{
|
500 |
if (i - 1 >= 0)
|
501 |
i = i - 1, dir = 'l';
|
505 |
/**/
|
506 |
for (var _dots = dots[i], l = dots[i].length; l < dots.length; l++)
|
507 |
{
|
508 |
+
_dots += /* Prevents jumping. */ ' ';
|
509 |
}
|
510 |
/**/
|
511 |
$this.val ('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (_x ("Processing", "s2member-front", "s2member")); ?>' + _dots);
|
includes/syscon.inc.php
CHANGED
@@ -76,13 +76,13 @@ Configure the directory for logs protected by s2Member.
|
|
76 |
$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"] = apply_filters ("ws_plugin__s2member_logs_dir", dirname (dirname (__FILE__)) . "-logs" . ((stripos (PHP_OS, "win") === 0 && stripos ($_SERVER["SERVER_SOFTWARE"], "apache") === false) ? "/app_data" : ""));
|
77 |
$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir_htaccess"] = dirname (__FILE__) . "/templates/cfg-files/s2member-logs.php";
|
78 |
/*
|
79 |
-
Configure the global reCaptcha
|
80 |
*/
|
81 |
-
$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["recaptcha"] = array ("public_key" => "
|
82 |
/*
|
83 |
Configure the right menu options panel for s2Member.
|
84 |
*/
|
85 |
-
$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["menu_pages"] = array ("
|
86 |
/*
|
87 |
Check if s2Member has been configured *should be set after the first config via options panel*.
|
88 |
*/
|
76 |
$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"] = apply_filters ("ws_plugin__s2member_logs_dir", dirname (dirname (__FILE__)) . "-logs" . ((stripos (PHP_OS, "win") === 0 && stripos ($_SERVER["SERVER_SOFTWARE"], "apache") === false) ? "/app_data" : ""));
|
77 |
$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir_htaccess"] = dirname (__FILE__) . "/templates/cfg-files/s2member-logs.php";
|
78 |
/*
|
79 |
+
Configure the global reCaptcha ( www.websharks-inc.net / or any domain ). These public/private keys work on any installation.
|
80 |
*/
|
81 |
+
$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["recaptcha"] = array ("public_key" => "6LeEOsoSAAAAALTKvUpMQMONdBOwG1UVXiFon96F", "private_key" => "6LeEOsoSAAAAAF8gycva4_0cpVr2KHlnnGzAfocd", "lang" => _x ("en", "s2member-front recaptcha-lang-code", "s2member"));
|
82 |
/*
|
83 |
Configure the right menu options panel for s2Member.
|
84 |
*/
|
85 |
+
$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["menu_pages"] = array ("updates" => true, "upsell-pro" => true, "installation" => false, "tools" => false, "videos" => true, "support" => true, "donations" => true);
|
86 |
/*
|
87 |
Check if s2Member has been configured *should be set after the first config via options panel*.
|
88 |
*/
|
includes/translations/s2member.pot
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
# Copyright (C) 2010
|
2 |
-
# This file is distributed under the same license as the
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version:
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/.__s2member\n"
|
7 |
-
"POT-Creation-Date: 2011-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -71,7 +71,7 @@ msgctxt "s2member-front"
|
|
71 |
msgid "password strength indicator"
|
72 |
msgstr ""
|
73 |
|
74 |
-
#: s2member/includes/classes/email-configs.inc.php:
|
75 |
msgctxt "s2member-front"
|
76 |
msgid "as a Member"
|
77 |
msgstr ""
|
@@ -508,8 +508,8 @@ msgstr ""
|
|
508 |
|
509 |
#: s2member/includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php:131
|
510 |
#: s2member/includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php:159
|
511 |
-
#: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:
|
512 |
-
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:
|
513 |
msgctxt "s2member-front"
|
514 |
msgid "Thank you! You've been updated to:"
|
515 |
msgstr ""
|
@@ -546,12 +546,12 @@ msgid "Check Your Email ( Then Click Here )"
|
|
546 |
msgstr ""
|
547 |
|
548 |
#: s2member/includes/classes/paypal-return-in-no-tx-data.inc.php:63
|
549 |
-
#: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:
|
550 |
-
#: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:
|
551 |
-
#: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:
|
552 |
-
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:
|
553 |
-
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:
|
554 |
-
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:
|
555 |
#: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:158
|
556 |
#: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:169
|
557 |
#: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:180
|
@@ -576,41 +576,41 @@ msgctxt "s2member-front"
|
|
576 |
msgid "Continue ( Click Here )"
|
577 |
msgstr ""
|
578 |
|
579 |
-
#: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:
|
580 |
-
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:
|
581 |
#: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:147
|
582 |
msgctxt "s2member-front"
|
583 |
msgid "Please Log Back In ( Click Here )"
|
584 |
msgstr ""
|
585 |
|
586 |
-
#: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:
|
587 |
-
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:
|
588 |
msgctxt "s2member-front"
|
589 |
msgid "<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access. Please make sure that you are NOT logged in as an Administrator while testing."
|
590 |
msgstr ""
|
591 |
|
592 |
-
#: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:
|
593 |
-
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:
|
594 |
msgctxt "s2member-front"
|
595 |
msgid "<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />Could not get the existing User ID from the DB."
|
596 |
msgstr ""
|
597 |
|
598 |
-
#: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:
|
599 |
-
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:
|
600 |
#: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:190
|
601 |
#: s2member/includes/classes/paypal-return-in-web-accept-sp.inc.php:131
|
602 |
msgctxt "s2member-front"
|
603 |
msgid "<strong>Page Expired:</strong> Duplicate Return-Data.<br />Please contact Support if you need any assistance."
|
604 |
msgstr ""
|
605 |
|
606 |
-
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:
|
607 |
-
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:
|
608 |
msgctxt "s2member-front"
|
609 |
msgid "<strong>Thank you! Your account has been approved.<br />The next step is to Register a Username for immediate access.</strong>"
|
610 |
msgstr ""
|
611 |
|
612 |
-
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:
|
613 |
-
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:
|
614 |
msgctxt "s2member-front"
|
615 |
msgid "Please Register Now ( Click Here )"
|
616 |
msgstr ""
|
@@ -660,12 +660,12 @@ msgstr ""
|
|
660 |
#. again`, or something to that affect. Or, if you prefer, you could Filter
|
661 |
#. ``$response["__error"]`` with `ws_plugin__s2member_paypal_api_response`.
|
662 |
|
663 |
-
#: s2member/includes/classes/paypal-utilities.inc.php:
|
664 |
msgctxt "s2member-front"
|
665 |
msgid "Error #%1$s. %2$s. %3$s."
|
666 |
msgstr ""
|
667 |
|
668 |
-
#: s2member/includes/classes/paypal-utilities.inc.php:
|
669 |
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:96
|
670 |
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:318
|
671 |
msgctxt "s2member-front"
|
@@ -778,17 +778,17 @@ msgid "If you need assistance, please <a href=\"%s\" target=\"_blank\">contact s
|
|
778 |
msgstr ""
|
779 |
|
780 |
#: s2member/includes/classes/sc-paypal-button-e.inc.php:77
|
781 |
-
#: s2member/includes/classes/sc-paypal-button-in.inc.php:
|
782 |
-
#: s2member/includes/classes/sc-paypal-button-in.inc.php:
|
783 |
-
#: s2member/includes/classes/sc-paypal-button-in.inc.php:
|
784 |
-
#: s2member/includes/classes/sc-paypal-button-in.inc.php:
|
785 |
#: s2member/includes/templates/buttons/paypal-cancellation-button.php:7
|
786 |
#: s2member/includes/templates/buttons/paypal-ccaps-checkout-button.php:34
|
787 |
#: s2member/includes/templates/buttons/paypal-checkout-button.php:46
|
788 |
#: s2member/includes/templates/buttons/paypal-sp-checkout-button.php:34
|
789 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
790 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
791 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
792 |
msgctxt "s2member-front paypal-button-lang-code"
|
793 |
msgid "en_US"
|
794 |
msgstr ""
|
@@ -1115,297 +1115,297 @@ msgid_plural "for %1$s %3$s"
|
|
1115 |
msgstr[0] ""
|
1116 |
msgstr[1] ""
|
1117 |
|
1118 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1119 |
msgctxt "s2member-front"
|
1120 |
msgid "— Confirm File Download —"
|
1121 |
msgstr ""
|
1122 |
|
1123 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1124 |
msgctxt "s2member-front"
|
1125 |
msgid "You`ve downloaded %s protected %s in the last %s."
|
1126 |
msgstr ""
|
1127 |
|
1128 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1129 |
msgctxt "s2member-front"
|
1130 |
msgid "file"
|
1131 |
msgstr ""
|
1132 |
|
1133 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1134 |
msgctxt "s2member-front"
|
1135 |
msgid "files"
|
1136 |
msgstr ""
|
1137 |
|
1138 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1139 |
msgctxt "s2member-front"
|
1140 |
msgid "24 hours"
|
1141 |
msgstr ""
|
1142 |
|
1143 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1144 |
msgctxt "s2member-front"
|
1145 |
msgid "%s days"
|
1146 |
msgstr ""
|
1147 |
|
1148 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1149 |
msgctxt "s2member-front"
|
1150 |
msgid "You`re entitled to UNLIMITED downloads though ( so, no worries )."
|
1151 |
msgstr ""
|
1152 |
|
1153 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1154 |
msgctxt "s2member-front"
|
1155 |
msgid "You`re entitled to %s unique %s %s."
|
1156 |
msgstr ""
|
1157 |
|
1158 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1159 |
msgctxt "s2member-front"
|
1160 |
msgid "download"
|
1161 |
msgstr ""
|
1162 |
|
1163 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1164 |
msgctxt "s2member-front"
|
1165 |
msgid "downloads"
|
1166 |
msgstr ""
|
1167 |
|
1168 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1169 |
msgctxt "s2member-front"
|
1170 |
msgid "each day"
|
1171 |
msgstr ""
|
1172 |
|
1173 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1174 |
msgctxt "s2member-front"
|
1175 |
msgid "every %s-day period"
|
1176 |
msgstr ""
|
1177 |
|
1178 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1179 |
-
#: s2member/includes/s2member.js:
|
1180 |
-
#: s2member/includes/s2member.js:
|
1181 |
-
#: s2member/includes/s2member.js:
|
1182 |
-
#: s2member/includes/s2member.js:
|
1183 |
-
#: s2member/includes/s2member.js:
|
1184 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
1185 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1186 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1187 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1188 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1189 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1190 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1191 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1192 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1193 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1194 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1195 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1196 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1197 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1198 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1199 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
1200 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1201 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1202 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1203 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1204 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1205 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1206 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1207 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1208 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1209 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1210 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1211 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1212 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1213 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1214 |
msgctxt "s2member-front"
|
1215 |
msgid "— Oops, you missed something: —"
|
1216 |
msgstr ""
|
1217 |
|
1218 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1219 |
-
#: s2member/includes/s2member.js:
|
1220 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
1221 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1222 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1223 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
1224 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1225 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1226 |
msgctxt "s2member-front"
|
1227 |
msgid "Passwords do not match up. Please try again."
|
1228 |
msgstr ""
|
1229 |
|
1230 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1231 |
-
#: s2member/includes/s2member.js:
|
1232 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
1233 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1234 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
1235 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
1236 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1237 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
1238 |
msgctxt "s2member-front"
|
1239 |
msgid "Password MUST be at least 6 characters. Please try again."
|
1240 |
msgstr ""
|
1241 |
|
1242 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1243 |
msgctxt "s2member-front"
|
1244 |
msgid "Please check at least one of the boxes."
|
1245 |
msgstr ""
|
1246 |
|
1247 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1248 |
msgctxt "s2member-front"
|
1249 |
msgid "Required. This box must be checked."
|
1250 |
msgstr ""
|
1251 |
|
1252 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1253 |
msgctxt "s2member-front"
|
1254 |
msgid "Please select one of the options."
|
1255 |
msgstr ""
|
1256 |
|
1257 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1258 |
msgctxt "s2member-front"
|
1259 |
msgid "Please select at least one of the options."
|
1260 |
msgstr ""
|
1261 |
|
1262 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1263 |
msgctxt "s2member-front"
|
1264 |
msgid "This is a required field, please try again."
|
1265 |
msgstr ""
|
1266 |
|
1267 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1268 |
msgctxt "s2member-front"
|
1269 |
msgid "Must be numeric ( with or without decimals, commas allowed )."
|
1270 |
msgstr ""
|
1271 |
|
1272 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1273 |
msgctxt "s2member-front"
|
1274 |
msgid "Must be numeric ( with or without decimals, no commas )."
|
1275 |
msgstr ""
|
1276 |
|
1277 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1278 |
msgctxt "s2member-front"
|
1279 |
msgid "Must be an integer ( a whole number, without any decimals )."
|
1280 |
msgstr ""
|
1281 |
|
1282 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1283 |
msgctxt "s2member-front"
|
1284 |
msgid "Must be an integer > 0 ( whole number, no decimals, greater than 0 )."
|
1285 |
msgstr ""
|
1286 |
|
1287 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1288 |
msgctxt "s2member-front"
|
1289 |
msgid "Must be a float ( floating point number, decimals required )."
|
1290 |
msgstr ""
|
1291 |
|
1292 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1293 |
msgctxt "s2member-front"
|
1294 |
msgid "Must be a float > 0 ( floating point number, decimals required, greater than 0 )."
|
1295 |
msgstr ""
|
1296 |
|
1297 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1298 |
msgctxt "s2member-front"
|
1299 |
msgid "Must be a date ( required date format: dd/mm/yyyy )."
|
1300 |
msgstr ""
|
1301 |
|
1302 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1303 |
msgctxt "s2member-front"
|
1304 |
msgid "Must be a valid email address."
|
1305 |
msgstr ""
|
1306 |
|
1307 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1308 |
msgctxt "s2member-front"
|
1309 |
msgid ""
|
1310 |
"Please use a personal email address.\n"
|
1311 |
"Addresses like <%s@> are problematic."
|
1312 |
msgstr ""
|
1313 |
|
1314 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1315 |
msgctxt "s2member-front"
|
1316 |
msgid "Must be a full URL ( starting with http or https )."
|
1317 |
msgstr ""
|
1318 |
|
1319 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1320 |
msgctxt "s2member-front"
|
1321 |
msgid "Must be a domain name ( domain name only, without http )."
|
1322 |
msgstr ""
|
1323 |
|
1324 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1325 |
msgctxt "s2member-front"
|
1326 |
msgid "Must be a phone # ( 10 digits w/possible hyphens,spaces,brackets )."
|
1327 |
msgstr ""
|
1328 |
|
1329 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1330 |
msgctxt "s2member-front"
|
1331 |
msgid "Must be a US zipcode ( 5-9 digits w/possible hyphen )."
|
1332 |
msgstr ""
|
1333 |
|
1334 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1335 |
msgctxt "s2member-front"
|
1336 |
msgid "Must be a Canadian zipcode ( 6 alpha-numerics w/possible space )."
|
1337 |
msgstr ""
|
1338 |
|
1339 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1340 |
msgctxt "s2member-front"
|
1341 |
msgid "Must be a zipcode ( either a US or Canadian zipcode )."
|
1342 |
msgstr ""
|
1343 |
|
1344 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1345 |
msgctxt "s2member-front"
|
1346 |
msgid "Please use alphanumerics, spaces & punctuation only."
|
1347 |
msgstr ""
|
1348 |
|
1349 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1350 |
msgctxt "s2member-front"
|
1351 |
msgid "Please use alphanumerics & spaces only."
|
1352 |
msgstr ""
|
1353 |
|
1354 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1355 |
msgctxt "s2member-front"
|
1356 |
msgid "Please use alphanumerics & punctuation only ( no spaces )."
|
1357 |
msgstr ""
|
1358 |
|
1359 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1360 |
msgctxt "s2member-front"
|
1361 |
msgid "Please use alphanumerics only ( no spaces/punctuation )."
|
1362 |
msgstr ""
|
1363 |
|
1364 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1365 |
msgctxt "s2member-front"
|
1366 |
msgid "Please use alphabetics only ( no digits/spaces/punctuation )."
|
1367 |
msgstr ""
|
1368 |
|
1369 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1370 |
msgctxt "s2member-front"
|
1371 |
msgid "Please use numeric digits only."
|
1372 |
msgstr ""
|
1373 |
|
1374 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1375 |
msgctxt "s2member-front"
|
1376 |
msgid "Must be exactly %s %s."
|
1377 |
msgstr ""
|
1378 |
|
1379 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1380 |
-
#: s2member/includes/s2member.js:
|
1381 |
msgctxt "s2member-front"
|
1382 |
msgid "digit"
|
1383 |
msgstr ""
|
1384 |
|
1385 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1386 |
-
#: s2member/includes/s2member.js:
|
1387 |
msgctxt "s2member-front"
|
1388 |
msgid "digits"
|
1389 |
msgstr ""
|
1390 |
|
1391 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1392 |
-
#: s2member/includes/s2member.js:
|
1393 |
msgctxt "s2member-front"
|
1394 |
msgid "character"
|
1395 |
msgstr ""
|
1396 |
|
1397 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1398 |
-
#: s2member/includes/s2member.js:
|
1399 |
msgctxt "s2member-front"
|
1400 |
msgid "characters"
|
1401 |
msgstr ""
|
1402 |
|
1403 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1404 |
msgctxt "s2member-front"
|
1405 |
msgid "Must be at least %s %s."
|
1406 |
msgstr ""
|
1407 |
|
1408 |
-
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:
|
1409 |
msgctxt "s2member-front"
|
1410 |
msgid "Processing"
|
1411 |
msgstr ""
|
@@ -2346,7 +2346,7 @@ msgctxt "s2member-admin"
|
|
2346 |
msgid "Buy Now ( Specific Post/Page, link valid for 5 years )"
|
2347 |
msgstr ""
|
2348 |
|
2349 |
-
#: s2member-pro/includes/classes/gateways/alipay/alipay-return-in.inc.php:
|
2350 |
msgctxt "s2member-front"
|
2351 |
msgid ""
|
2352 |
"ERROR: Unexpected status. Please contact Support for assistance.\n"
|
@@ -2354,7 +2354,7 @@ msgid ""
|
|
2354 |
"The AliPay® status did NOT match a required action."
|
2355 |
msgstr ""
|
2356 |
|
2357 |
-
#: s2member-pro/includes/classes/gateways/alipay/alipay-return-in.inc.php:
|
2358 |
msgctxt "s2member-front"
|
2359 |
msgid ""
|
2360 |
"ERROR: Unable to verify POST vars. Please contact Support for assistance.\n"
|
@@ -2368,139 +2368,139 @@ msgctxt "s2member-front"
|
|
2368 |
msgid "<strong>Billing termination confirmed.</strong> Your account has been cancelled."
|
2369 |
msgstr ""
|
2370 |
|
2371 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-cancellation-in.inc.php:
|
2372 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-cancellation-in.inc.php:
|
2373 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-cancellation-in.inc.php:
|
2374 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:
|
2375 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:
|
2376 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:
|
2377 |
msgctxt "s2member-front"
|
2378 |
msgid "<strong>Billing terminated.</strong> Your account has been cancelled."
|
2379 |
msgstr ""
|
2380 |
|
2381 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-cancellation-in.inc.php:
|
2382 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-update-in.inc.php:
|
2383 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:
|
2384 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:
|
2385 |
msgctxt "s2member-front"
|
2386 |
msgid "You're <strong>NOT</strong> logged in."
|
2387 |
msgstr ""
|
2388 |
|
2389 |
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:248
|
2390 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:
|
2391 |
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:289
|
2392 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:
|
2393 |
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:420
|
2394 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:
|
2395 |
msgctxt "s2member-front"
|
2396 |
msgid "<strong>Thank you.</strong> Your account has been updated.<br />— Please <a href=\"%s\" rel=\"nofollow\">log back in</a> now."
|
2397 |
msgstr ""
|
2398 |
|
2399 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:
|
2400 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:
|
2401 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:
|
2402 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:
|
2403 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:
|
2404 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:
|
2405 |
msgctxt "s2member-front"
|
2406 |
msgid "<strong>Thank you.</strong> Your account has been approved.<br />— Please <a href=\"%s\" rel=\"nofollow\">login</a>."
|
2407 |
msgstr ""
|
2408 |
|
2409 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:
|
2410 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:
|
2411 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:
|
2412 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:
|
2413 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-registration-in.inc.php:
|
2414 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-registration-in.inc.php:
|
2415 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:
|
2416 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:
|
2417 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:
|
2418 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:
|
2419 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:
|
2420 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:
|
2421 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:
|
2422 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:
|
2423 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-registration-in.inc.php:
|
2424 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-registration-in.inc.php:
|
2425 |
msgctxt "s2member-front"
|
2426 |
msgid "<strong>Oops.</strong> A slight problem. Please contact Support for assistance."
|
2427 |
msgstr ""
|
2428 |
|
2429 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:
|
2430 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:
|
2431 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:
|
2432 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:
|
2433 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:
|
2434 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:
|
2435 |
msgctxt "s2member-front"
|
2436 |
msgid "<strong>Thank you.</strong> Your account has been approved.<br />— You'll receive an email momentarily."
|
2437 |
msgstr ""
|
2438 |
|
2439 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:
|
2440 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:
|
2441 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:
|
2442 |
msgctxt "s2member-front"
|
2443 |
msgid "<strong>Unknown error.</strong> Please contact Support for assistance."
|
2444 |
msgstr ""
|
2445 |
|
2446 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2447 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2448 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2449 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2450 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2451 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2452 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2453 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2454 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2455 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2456 |
msgctxt "s2member-front"
|
2457 |
msgid "Security Code"
|
2458 |
msgstr ""
|
2459 |
|
2460 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2461 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2462 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2463 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2464 |
msgctxt "s2member-front"
|
2465 |
msgid "Additional Info"
|
2466 |
msgstr ""
|
2467 |
|
2468 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2469 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2470 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2471 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2472 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2473 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2474 |
msgctxt "s2member-front"
|
2475 |
msgid "Visa®"
|
2476 |
msgstr ""
|
2477 |
|
2478 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2479 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2480 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2481 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2482 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2483 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2484 |
msgctxt "s2member-front"
|
2485 |
msgid "MasterCard®"
|
2486 |
msgstr ""
|
2487 |
|
2488 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2489 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2490 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2491 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2492 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2493 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2494 |
msgctxt "s2member-front"
|
2495 |
msgid "Discover®"
|
2496 |
msgstr ""
|
2497 |
|
2498 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2499 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2500 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:
|
2501 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2502 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2503 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
2504 |
msgctxt "s2member-front"
|
2505 |
msgid "American Express®"
|
2506 |
msgstr ""
|
@@ -2511,8 +2511,8 @@ msgctxt "s2member-front"
|
|
2511 |
msgid "<strong>Thank you.</strong> Please <a href=\"%s\" rel=\"nofollow\">login</a>."
|
2512 |
msgstr ""
|
2513 |
|
2514 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-registration-in.inc.php:
|
2515 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-registration-in.inc.php:
|
2516 |
msgctxt "s2member-front"
|
2517 |
msgid "<strong>Thank you.</strong> You'll receive an email momentarily."
|
2518 |
msgstr ""
|
@@ -3225,8 +3225,8 @@ msgctxt "s2member-front"
|
|
3225 |
msgid "<strong>Thank you.</strong> Your purchase has been approved.<br />— Please <a href=\"%s\" rel=\"nofollow\">click here</a> to proceed."
|
3226 |
msgstr ""
|
3227 |
|
3228 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-sp-checkout-in.inc.php:
|
3229 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-sp-checkout-in.inc.php:
|
3230 |
msgctxt "s2member-front"
|
3231 |
msgid "<strong>Oops.</strong> Unable to generate Access Link. Please contact Support for assistance."
|
3232 |
msgstr ""
|
@@ -3237,14 +3237,14 @@ msgctxt "s2member-front"
|
|
3237 |
msgid "<strong>Confirmed.</strong> Your billing information has been updated."
|
3238 |
msgstr ""
|
3239 |
|
3240 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-update-in.inc.php:
|
3241 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:
|
3242 |
msgctxt "s2member-front"
|
3243 |
msgid "<strong>Unable to update.</strong> You have NO recurring fees. Or, your billing profile is no longer active. Please contact Support if you need assistance."
|
3244 |
msgstr ""
|
3245 |
|
3246 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-update-in.inc.php:
|
3247 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:
|
3248 |
msgctxt "s2member-front"
|
3249 |
msgid "<strong>Oops.</strong> No Subscr. ID. Please contact Support for assistance."
|
3250 |
msgstr ""
|
@@ -3266,106 +3266,106 @@ msgctxt "s2member-front"
|
|
3266 |
msgid "Error #%1$s. %2$s."
|
3267 |
msgstr ""
|
3268 |
|
3269 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3270 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3271 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3272 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3273 |
msgctxt "s2member-front percentage-symbol"
|
3274 |
msgid "%"
|
3275 |
msgstr ""
|
3276 |
|
3277 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3278 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3279 |
msgctxt "s2member-front"
|
3280 |
msgid " + tax"
|
3281 |
msgstr ""
|
3282 |
|
3283 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3284 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3285 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3286 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3287 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3288 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3289 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3290 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3291 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3292 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3293 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3294 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3295 |
msgctxt "s2member-front"
|
3296 |
msgid "COUPON %s off. ( Now: %s )"
|
3297 |
msgstr ""
|
3298 |
|
3299 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3300 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3301 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3302 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3303 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3304 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3305 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3306 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3307 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3308 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3309 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3310 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3311 |
msgctxt "s2member-front"
|
3312 |
msgid "<div>Coupon: <strong>%s off</strong>. ( Now: <strong>%s</strong> )</div>"
|
3313 |
msgstr ""
|
3314 |
|
3315 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3316 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3317 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3318 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3319 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3320 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3321 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3322 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3323 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3324 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3325 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3326 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3327 |
msgctxt "s2member-front"
|
3328 |
msgid "COUPON %s off. ( Now: %s, then %s )"
|
3329 |
msgstr ""
|
3330 |
|
3331 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3332 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3333 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3334 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3335 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3336 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3337 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3338 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3339 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3340 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3341 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3342 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3343 |
msgctxt "s2member-front"
|
3344 |
msgid "<div>Coupon: <strong>%s off</strong>. ( Now: <strong>%s, then %s</strong> )</div>"
|
3345 |
msgstr ""
|
3346 |
|
3347 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3348 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3349 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3350 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3351 |
msgctxt "s2member-front"
|
3352 |
msgid "<div>Sorry, your Coupon is not applicable.</div>"
|
3353 |
msgstr ""
|
3354 |
|
3355 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3356 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3357 |
msgctxt "s2member-front"
|
3358 |
msgid "<div>Coupon: <strong>%s0.00 off</strong>.</div>"
|
3359 |
msgstr ""
|
3360 |
|
3361 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3362 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3363 |
msgctxt "s2member-front"
|
3364 |
msgid "<div>Sorry, your Coupon cannot be applied to this particular purchase.</div>"
|
3365 |
msgstr ""
|
3366 |
|
3367 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3368 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3369 |
msgctxt "s2member-front"
|
3370 |
msgid "<div>Sorry, your Coupon <strong>expired</strong>: <em>%s</em>.</div>"
|
3371 |
msgstr ""
|
@@ -3373,16 +3373,16 @@ msgstr ""
|
|
3373 |
#. translators: `%1$s` is new price/description, after coupon applied. `%2$s`
|
3374 |
#. is original description.
|
3375 |
|
3376 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3377 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3378 |
msgctxt "s2member-front"
|
3379 |
msgid "%1$s ~ ORIGINALLY: %2$s"
|
3380 |
msgstr ""
|
3381 |
|
3382 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3383 |
-
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:
|
3384 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3385 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:
|
3386 |
msgctxt "s2member-front"
|
3387 |
msgid "<div>Sorry, your Coupon is N/A, invalid or expired.</div>"
|
3388 |
msgstr ""
|
@@ -3395,7 +3395,7 @@ msgid ""
|
|
3395 |
"The ClickBank® txnType did not match a required action."
|
3396 |
msgstr ""
|
3397 |
|
3398 |
-
#: s2member-pro/includes/classes/gateways/clickbank/clickbank-return-in.inc.php:
|
3399 |
msgctxt "s2member-front"
|
3400 |
msgid ""
|
3401 |
"ERROR: Unable to verify POST vars. Please contact Support for assistance.\n"
|
@@ -3403,14 +3403,14 @@ msgid ""
|
|
3403 |
"This is most likely related to an invalid ClickBank® configuration. If you are the site owner, please check: s2Member -> ClickBank® Options."
|
3404 |
msgstr ""
|
3405 |
|
3406 |
-
#: s2member-pro/includes/classes/gateways/clickbank/clickbank-utilities.inc.php:
|
3407 |
msgctxt "s2member-front"
|
3408 |
msgid "<strong>Reminder:</strong> Purchases at this site will appear on your credit card or bank statement as: <code>ClickBank®</code> or <code>CLKBANK*COM</code>."
|
3409 |
msgstr ""
|
3410 |
|
3411 |
-
#: s2member-pro/includes/classes/gateways/google/google-button-in.inc.php:
|
3412 |
-
#: s2member-pro/includes/classes/gateways/google/google-button-in.inc.php:
|
3413 |
-
#: s2member-pro/includes/classes/gateways/google/google-button-in.inc.php:
|
3414 |
#: s2member-pro/includes/templates/buttons/google-ccaps-checkout-button.php:7
|
3415 |
#: s2member-pro/includes/templates/buttons/google-checkout-button.php:7
|
3416 |
#: s2member-pro/includes/templates/buttons/google-sp-checkout-button.php:7
|
@@ -3487,42 +3487,42 @@ msgctxt "s2member-front"
|
|
3487 |
msgid "Cancel at any time to avoid charges."
|
3488 |
msgstr ""
|
3489 |
|
3490 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:
|
3491 |
#: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:258
|
3492 |
msgctxt "s2member-front"
|
3493 |
msgid "<strong>Unable to cancel at this time.</strong> Your account is pending other changes. Please try again in 15 minutes."
|
3494 |
msgstr ""
|
3495 |
|
3496 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:
|
3497 |
#: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:251
|
3498 |
msgctxt "s2member-front"
|
3499 |
msgid "Please <a href=\"%s\" rel=\"nofollow\">log in at PayPal®</a> to cancel your Subscription."
|
3500 |
msgstr ""
|
3501 |
|
3502 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:
|
3503 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:
|
3504 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:
|
3505 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:
|
3506 |
msgctxt "s2member-front"
|
3507 |
msgid "<strong>Sorry.</strong> Your account is pending other changes. Please try again in 15 minutes."
|
3508 |
msgstr ""
|
3509 |
|
3510 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
3511 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
3512 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
3513 |
msgctxt "s2member-front"
|
3514 |
msgid "Maestro®"
|
3515 |
msgstr ""
|
3516 |
|
3517 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
3518 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
3519 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
3520 |
msgctxt "s2member-front"
|
3521 |
msgid "Solo®"
|
3522 |
msgstr ""
|
3523 |
|
3524 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
3525 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:
|
3526 |
msgctxt "s2member-front"
|
3527 |
msgid "PayPal®"
|
3528 |
msgstr ""
|
@@ -3550,14 +3550,14 @@ msgstr ""
|
|
3550 |
#: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:278
|
3551 |
#: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:281
|
3552 |
#: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:76
|
3553 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:
|
3554 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:
|
3555 |
msgctxt "s2member-front"
|
3556 |
msgid "Please <a href=\"%s\" rel=\"nofollow\">log in at PayPal®</a> to update your billing information."
|
3557 |
msgstr ""
|
3558 |
|
3559 |
#: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:288
|
3560 |
-
#: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:
|
3561 |
msgctxt "s2member-front"
|
3562 |
msgid "<strong>Unable to update at this time.</strong> Your account is pending other changes. Please try again in 15 minutes."
|
3563 |
msgstr ""
|
@@ -3679,75 +3679,75 @@ msgid "My Profile Summary"
|
|
3679 |
msgstr ""
|
3680 |
|
3681 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
3682 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3683 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3684 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3685 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3686 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3687 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3688 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3689 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3690 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3691 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3692 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3693 |
msgctxt "s2member-front"
|
3694 |
msgid "Security Code missing. Please try again."
|
3695 |
msgstr ""
|
3696 |
|
3697 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
3698 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3699 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3700 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3701 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3702 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3703 |
msgctxt "s2member-front"
|
3704 |
msgid "Please choose a Billing Method."
|
3705 |
msgstr ""
|
3706 |
|
3707 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
3708 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3709 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3710 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3711 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3712 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3713 |
msgctxt "s2member-front"
|
3714 |
msgid "Calculating Sales Tax..."
|
3715 |
msgstr ""
|
3716 |
|
3717 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
3718 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3719 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3720 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3721 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3722 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3723 |
msgctxt "s2member-front"
|
3724 |
msgid "calculating sales tax..."
|
3725 |
msgstr ""
|
3726 |
|
3727 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
3728 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3729 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3730 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3731 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3732 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3733 |
msgctxt "s2member-front"
|
3734 |
msgid "<strong>Sales Tax%s:</strong> %s<br /><strong>— Total%s:</strong> %s"
|
3735 |
msgstr ""
|
3736 |
|
3737 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
3738 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3739 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3740 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3741 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3742 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3743 |
msgctxt "s2member-front"
|
3744 |
msgid "Today"
|
3745 |
msgstr ""
|
3746 |
|
3747 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
3748 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3749 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3750 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3751 |
#: s2member-pro/includes/templates/forms/authnet-checkout-form.php:47
|
3752 |
#: s2member-pro/includes/templates/forms/authnet-registration-form.php:28
|
3753 |
#: s2member-pro/includes/templates/forms/paypal-checkout-form.php:47
|
@@ -3757,18 +3757,18 @@ msgid "Create Profile"
|
|
3757 |
msgstr ""
|
3758 |
|
3759 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
3760 |
-
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:
|
3761 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3762 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3763 |
msgctxt "s2member-front"
|
3764 |
msgid "Your Profile"
|
3765 |
msgstr ""
|
3766 |
|
3767 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3768 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3769 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3770 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3771 |
-
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:
|
3772 |
#: s2member-pro/includes/templates/forms/authnet-cancellation-form.php:34
|
3773 |
#: s2member-pro/includes/templates/forms/authnet-checkout-form.php:178
|
3774 |
#: s2member-pro/includes/templates/forms/authnet-registration-form.php:79
|
1 |
+
# Copyright (C) 2010
|
2 |
+
# This file is distributed under the same license as the package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/.__s2member\n"
|
7 |
+
"POT-Creation-Date: 2011-12-06 11:47:21+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
71 |
msgid "password strength indicator"
|
72 |
msgstr ""
|
73 |
|
74 |
+
#: s2member/includes/classes/email-configs.inc.php:150
|
75 |
msgctxt "s2member-front"
|
76 |
msgid "as a Member"
|
77 |
msgstr ""
|
508 |
|
509 |
#: s2member/includes/classes/paypal-notify-in-subscr-modify-w-level.inc.php:131
|
510 |
#: s2member/includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php:159
|
511 |
+
#: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:183
|
512 |
+
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:232
|
513 |
msgctxt "s2member-front"
|
514 |
msgid "Thank you! You've been updated to:"
|
515 |
msgstr ""
|
546 |
msgstr ""
|
547 |
|
548 |
#: s2member/includes/classes/paypal-return-in-no-tx-data.inc.php:63
|
549 |
+
#: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:195
|
550 |
+
#: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:206
|
551 |
+
#: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:217
|
552 |
+
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:244
|
553 |
+
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:255
|
554 |
+
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:368
|
555 |
#: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:158
|
556 |
#: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:169
|
557 |
#: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:180
|
576 |
msgid "Continue ( Click Here )"
|
577 |
msgstr ""
|
578 |
|
579 |
+
#: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:184
|
580 |
+
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:233
|
581 |
#: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:147
|
582 |
msgctxt "s2member-front"
|
583 |
msgid "Please Log Back In ( Click Here )"
|
584 |
msgstr ""
|
585 |
|
586 |
+
#: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:194
|
587 |
+
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:243
|
588 |
msgctxt "s2member-front"
|
589 |
msgid "<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access. Please make sure that you are NOT logged in as an Administrator while testing."
|
590 |
msgstr ""
|
591 |
|
592 |
+
#: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:205
|
593 |
+
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:254
|
594 |
msgctxt "s2member-front"
|
595 |
msgid "<strong>ERROR:</strong> Unable to modify Subscription.<br />Please contact Support for assistance.<br /><br />Could not get the existing User ID from the DB."
|
596 |
msgstr ""
|
597 |
|
598 |
+
#: s2member/includes/classes/paypal-return-in-subscr-modify-w-level.inc.php:216
|
599 |
+
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:367
|
600 |
#: s2member/includes/classes/paypal-return-in-wa-ccaps-wo-level.inc.php:190
|
601 |
#: s2member/includes/classes/paypal-return-in-web-accept-sp.inc.php:131
|
602 |
msgctxt "s2member-front"
|
603 |
msgid "<strong>Page Expired:</strong> Duplicate Return-Data.<br />Please contact Support if you need any assistance."
|
604 |
msgstr ""
|
605 |
|
606 |
+
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:327
|
607 |
+
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:350
|
608 |
msgctxt "s2member-front"
|
609 |
msgid "<strong>Thank you! Your account has been approved.<br />The next step is to Register a Username for immediate access.</strong>"
|
610 |
msgstr ""
|
611 |
|
612 |
+
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:328
|
613 |
+
#: s2member/includes/classes/paypal-return-in-subscr-or-wa-w-level.inc.php:351
|
614 |
msgctxt "s2member-front"
|
615 |
msgid "Please Register Now ( Click Here )"
|
616 |
msgstr ""
|
660 |
#. again`, or something to that affect. Or, if you prefer, you could Filter
|
661 |
#. ``$response["__error"]`` with `ws_plugin__s2member_paypal_api_response`.
|
662 |
|
663 |
+
#: s2member/includes/classes/paypal-utilities.inc.php:175
|
664 |
msgctxt "s2member-front"
|
665 |
msgid "Error #%1$s. %2$s. %3$s."
|
666 |
msgstr ""
|
667 |
|
668 |
+
#: s2member/includes/classes/paypal-utilities.inc.php:178
|
669 |
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:96
|
670 |
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:318
|
671 |
msgctxt "s2member-front"
|
778 |
msgstr ""
|
779 |
|
780 |
#: s2member/includes/classes/sc-paypal-button-e.inc.php:77
|
781 |
+
#: s2member/includes/classes/sc-paypal-button-in.inc.php:72
|
782 |
+
#: s2member/includes/classes/sc-paypal-button-in.inc.php:95
|
783 |
+
#: s2member/includes/classes/sc-paypal-button-in.inc.php:149
|
784 |
+
#: s2member/includes/classes/sc-paypal-button-in.inc.php:204
|
785 |
#: s2member/includes/templates/buttons/paypal-cancellation-button.php:7
|
786 |
#: s2member/includes/templates/buttons/paypal-ccaps-checkout-button.php:34
|
787 |
#: s2member/includes/templates/buttons/paypal-checkout-button.php:46
|
788 |
#: s2member/includes/templates/buttons/paypal-sp-checkout-button.php:34
|
789 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
790 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:266
|
791 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:509
|
792 |
msgctxt "s2member-front paypal-button-lang-code"
|
793 |
msgid "en_US"
|
794 |
msgstr ""
|
1115 |
msgstr[0] ""
|
1116 |
msgstr[1] ""
|
1117 |
|
1118 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:31
|
1119 |
msgctxt "s2member-front"
|
1120 |
msgid "— Confirm File Download —"
|
1121 |
msgstr ""
|
1122 |
|
1123 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:32
|
1124 |
msgctxt "s2member-front"
|
1125 |
msgid "You`ve downloaded %s protected %s in the last %s."
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:32
|
1129 |
msgctxt "s2member-front"
|
1130 |
msgid "file"
|
1131 |
msgstr ""
|
1132 |
|
1133 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:32
|
1134 |
msgctxt "s2member-front"
|
1135 |
msgid "files"
|
1136 |
msgstr ""
|
1137 |
|
1138 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:32
|
1139 |
msgctxt "s2member-front"
|
1140 |
msgid "24 hours"
|
1141 |
msgstr ""
|
1142 |
|
1143 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:32
|
1144 |
msgctxt "s2member-front"
|
1145 |
msgid "%s days"
|
1146 |
msgstr ""
|
1147 |
|
1148 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:33
|
1149 |
msgctxt "s2member-front"
|
1150 |
msgid "You`re entitled to UNLIMITED downloads though ( so, no worries )."
|
1151 |
msgstr ""
|
1152 |
|
1153 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:33
|
1154 |
msgctxt "s2member-front"
|
1155 |
msgid "You`re entitled to %s unique %s %s."
|
1156 |
msgstr ""
|
1157 |
|
1158 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:33
|
1159 |
msgctxt "s2member-front"
|
1160 |
msgid "download"
|
1161 |
msgstr ""
|
1162 |
|
1163 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:33
|
1164 |
msgctxt "s2member-front"
|
1165 |
msgid "downloads"
|
1166 |
msgstr ""
|
1167 |
|
1168 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:33
|
1169 |
msgctxt "s2member-front"
|
1170 |
msgid "each day"
|
1171 |
msgstr ""
|
1172 |
|
1173 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:33
|
1174 |
msgctxt "s2member-front"
|
1175 |
msgid "every %s-day period"
|
1176 |
msgstr ""
|
1177 |
|
1178 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:78
|
1179 |
+
#: s2member/includes/s2member.js:85 s2member/includes/s2member.js:92
|
1180 |
+
#: s2member/includes/s2member.js:128 s2member/includes/s2member.js:182
|
1181 |
+
#: s2member/includes/s2member.js:189 s2member/includes/s2member.js:196
|
1182 |
+
#: s2member/includes/s2member.js:228 s2member/includes/s2member.js:260
|
1183 |
+
#: s2member/includes/s2member.js:287
|
1184 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
1185 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:63
|
1186 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:70
|
1187 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:157
|
1188 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:164
|
1189 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:229
|
1190 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:236
|
1191 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:243
|
1192 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:250
|
1193 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:450
|
1194 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:457
|
1195 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:678
|
1196 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:685
|
1197 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:692
|
1198 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:699
|
1199 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
1200 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:63
|
1201 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:70
|
1202 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:157
|
1203 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:164
|
1204 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:229
|
1205 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:236
|
1206 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:243
|
1207 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:250
|
1208 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:485
|
1209 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:492
|
1210 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:748
|
1211 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:755
|
1212 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:762
|
1213 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:769
|
1214 |
msgctxt "s2member-front"
|
1215 |
msgid "— Oops, you missed something: —"
|
1216 |
msgstr ""
|
1217 |
|
1218 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:85
|
1219 |
+
#: s2member/includes/s2member.js:189
|
1220 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
1221 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:236
|
1222 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:685
|
1223 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
1224 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:236
|
1225 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:755
|
1226 |
msgctxt "s2member-front"
|
1227 |
msgid "Passwords do not match up. Please try again."
|
1228 |
msgstr ""
|
1229 |
|
1230 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:92
|
1231 |
+
#: s2member/includes/s2member.js:196
|
1232 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
1233 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:243
|
1234 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:692
|
1235 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
1236 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:243
|
1237 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:762
|
1238 |
msgctxt "s2member-front"
|
1239 |
msgid "Password MUST be at least 6 characters. Please try again."
|
1240 |
msgstr ""
|
1241 |
|
1242 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:342
|
1243 |
msgctxt "s2member-front"
|
1244 |
msgid "Please check at least one of the boxes."
|
1245 |
msgstr ""
|
1246 |
|
1247 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:347
|
1248 |
msgctxt "s2member-front"
|
1249 |
msgid "Required. This box must be checked."
|
1250 |
msgstr ""
|
1251 |
|
1252 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:353
|
1253 |
msgctxt "s2member-front"
|
1254 |
msgid "Please select one of the options."
|
1255 |
msgstr ""
|
1256 |
|
1257 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:358
|
1258 |
msgctxt "s2member-front"
|
1259 |
msgid "Please select at least one of the options."
|
1260 |
msgstr ""
|
1261 |
|
1262 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:362
|
1263 |
msgctxt "s2member-front"
|
1264 |
msgid "This is a required field, please try again."
|
1265 |
msgstr ""
|
1266 |
|
1267 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:368
|
1268 |
msgctxt "s2member-front"
|
1269 |
msgid "Must be numeric ( with or without decimals, commas allowed )."
|
1270 |
msgstr ""
|
1271 |
|
1272 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:372
|
1273 |
msgctxt "s2member-front"
|
1274 |
msgid "Must be numeric ( with or without decimals, no commas )."
|
1275 |
msgstr ""
|
1276 |
|
1277 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:376
|
1278 |
msgctxt "s2member-front"
|
1279 |
msgid "Must be an integer ( a whole number, without any decimals )."
|
1280 |
msgstr ""
|
1281 |
|
1282 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:380
|
1283 |
msgctxt "s2member-front"
|
1284 |
msgid "Must be an integer > 0 ( whole number, no decimals, greater than 0 )."
|
1285 |
msgstr ""
|
1286 |
|
1287 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:384
|
1288 |
msgctxt "s2member-front"
|
1289 |
msgid "Must be a float ( floating point number, decimals required )."
|
1290 |
msgstr ""
|
1291 |
|
1292 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:388
|
1293 |
msgctxt "s2member-front"
|
1294 |
msgid "Must be a float > 0 ( floating point number, decimals required, greater than 0 )."
|
1295 |
msgstr ""
|
1296 |
|
1297 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:392
|
1298 |
msgctxt "s2member-front"
|
1299 |
msgid "Must be a date ( required date format: dd/mm/yyyy )."
|
1300 |
msgstr ""
|
1301 |
|
1302 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:396
|
1303 |
msgctxt "s2member-front"
|
1304 |
msgid "Must be a valid email address."
|
1305 |
msgstr ""
|
1306 |
|
1307 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:400
|
1308 |
msgctxt "s2member-front"
|
1309 |
msgid ""
|
1310 |
"Please use a personal email address.\n"
|
1311 |
"Addresses like <%s@> are problematic."
|
1312 |
msgstr ""
|
1313 |
|
1314 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:404
|
1315 |
msgctxt "s2member-front"
|
1316 |
msgid "Must be a full URL ( starting with http or https )."
|
1317 |
msgstr ""
|
1318 |
|
1319 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:408
|
1320 |
msgctxt "s2member-front"
|
1321 |
msgid "Must be a domain name ( domain name only, without http )."
|
1322 |
msgstr ""
|
1323 |
|
1324 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:412
|
1325 |
msgctxt "s2member-front"
|
1326 |
msgid "Must be a phone # ( 10 digits w/possible hyphens,spaces,brackets )."
|
1327 |
msgstr ""
|
1328 |
|
1329 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:416
|
1330 |
msgctxt "s2member-front"
|
1331 |
msgid "Must be a US zipcode ( 5-9 digits w/possible hyphen )."
|
1332 |
msgstr ""
|
1333 |
|
1334 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:420
|
1335 |
msgctxt "s2member-front"
|
1336 |
msgid "Must be a Canadian zipcode ( 6 alpha-numerics w/possible space )."
|
1337 |
msgstr ""
|
1338 |
|
1339 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:424
|
1340 |
msgctxt "s2member-front"
|
1341 |
msgid "Must be a zipcode ( either a US or Canadian zipcode )."
|
1342 |
msgstr ""
|
1343 |
|
1344 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:428
|
1345 |
msgctxt "s2member-front"
|
1346 |
msgid "Please use alphanumerics, spaces & punctuation only."
|
1347 |
msgstr ""
|
1348 |
|
1349 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:432
|
1350 |
msgctxt "s2member-front"
|
1351 |
msgid "Please use alphanumerics & spaces only."
|
1352 |
msgstr ""
|
1353 |
|
1354 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:436
|
1355 |
msgctxt "s2member-front"
|
1356 |
msgid "Please use alphanumerics & punctuation only ( no spaces )."
|
1357 |
msgstr ""
|
1358 |
|
1359 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:440
|
1360 |
msgctxt "s2member-front"
|
1361 |
msgid "Please use alphanumerics only ( no spaces/punctuation )."
|
1362 |
msgstr ""
|
1363 |
|
1364 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:444
|
1365 |
msgctxt "s2member-front"
|
1366 |
msgid "Please use alphabetics only ( no digits/spaces/punctuation )."
|
1367 |
msgstr ""
|
1368 |
|
1369 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:448
|
1370 |
msgctxt "s2member-front"
|
1371 |
msgid "Please use numeric digits only."
|
1372 |
msgstr ""
|
1373 |
|
1374 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:455
|
1375 |
msgctxt "s2member-front"
|
1376 |
msgid "Must be exactly %s %s."
|
1377 |
msgstr ""
|
1378 |
|
1379 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:455
|
1380 |
+
#: s2member/includes/s2member.js:458
|
1381 |
msgctxt "s2member-front"
|
1382 |
msgid "digit"
|
1383 |
msgstr ""
|
1384 |
|
1385 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:455
|
1386 |
+
#: s2member/includes/s2member.js:458
|
1387 |
msgctxt "s2member-front"
|
1388 |
msgid "digits"
|
1389 |
msgstr ""
|
1390 |
|
1391 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:455
|
1392 |
+
#: s2member/includes/s2member.js:458
|
1393 |
msgctxt "s2member-front"
|
1394 |
msgid "character"
|
1395 |
msgstr ""
|
1396 |
|
1397 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:455
|
1398 |
+
#: s2member/includes/s2member.js:458
|
1399 |
msgctxt "s2member-front"
|
1400 |
msgid "characters"
|
1401 |
msgstr ""
|
1402 |
|
1403 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:458
|
1404 |
msgctxt "s2member-front"
|
1405 |
msgid "Must be at least %s %s."
|
1406 |
msgstr ""
|
1407 |
|
1408 |
+
#: s2member/includes/s2member-min.js:1 s2member/includes/s2member.js:511
|
1409 |
msgctxt "s2member-front"
|
1410 |
msgid "Processing"
|
1411 |
msgstr ""
|
2346 |
msgid "Buy Now ( Specific Post/Page, link valid for 5 years )"
|
2347 |
msgstr ""
|
2348 |
|
2349 |
+
#: s2member-pro/includes/classes/gateways/alipay/alipay-return-in.inc.php:117
|
2350 |
msgctxt "s2member-front"
|
2351 |
msgid ""
|
2352 |
"ERROR: Unexpected status. Please contact Support for assistance.\n"
|
2354 |
"The AliPay® status did NOT match a required action."
|
2355 |
msgstr ""
|
2356 |
|
2357 |
+
#: s2member-pro/includes/classes/gateways/alipay/alipay-return-in.inc.php:132
|
2358 |
msgctxt "s2member-front"
|
2359 |
msgid ""
|
2360 |
"ERROR: Unable to verify POST vars. Please contact Support for assistance.\n"
|
2368 |
msgid "<strong>Billing termination confirmed.</strong> Your account has been cancelled."
|
2369 |
msgstr ""
|
2370 |
|
2371 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-cancellation-in.inc.php:123
|
2372 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-cancellation-in.inc.php:131
|
2373 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-cancellation-in.inc.php:139
|
2374 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:126
|
2375 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:138
|
2376 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:146
|
2377 |
msgctxt "s2member-front"
|
2378 |
msgid "<strong>Billing terminated.</strong> Your account has been cancelled."
|
2379 |
msgstr ""
|
2380 |
|
2381 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-cancellation-in.inc.php:147
|
2382 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-update-in.inc.php:133
|
2383 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:154
|
2384 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:150
|
2385 |
msgctxt "s2member-front"
|
2386 |
msgid "You're <strong>NOT</strong> logged in."
|
2387 |
msgstr ""
|
2388 |
|
2389 |
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:248
|
2390 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:580
|
2391 |
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:289
|
2392 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:612
|
2393 |
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:420
|
2394 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:848
|
2395 |
msgctxt "s2member-front"
|
2396 |
msgid "<strong>Thank you.</strong> Your account has been updated.<br />— Please <a href=\"%s\" rel=\"nofollow\">log back in</a> now."
|
2397 |
msgstr ""
|
2398 |
|
2399 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:447
|
2400 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:696
|
2401 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:451
|
2402 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:764
|
2403 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:682
|
2404 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:1000
|
2405 |
msgctxt "s2member-front"
|
2406 |
msgid "<strong>Thank you.</strong> Your account has been approved.<br />— Please <a href=\"%s\" rel=\"nofollow\">login</a>."
|
2407 |
msgstr ""
|
2408 |
|
2409 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:456
|
2410 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:480
|
2411 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:705
|
2412 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:726
|
2413 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-registration-in.inc.php:124
|
2414 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-registration-in.inc.php:141
|
2415 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:460
|
2416 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:481
|
2417 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:773
|
2418 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:794
|
2419 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:691
|
2420 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:712
|
2421 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:1009
|
2422 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:1030
|
2423 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-registration-in.inc.php:124
|
2424 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-registration-in.inc.php:141
|
2425 |
msgctxt "s2member-front"
|
2426 |
msgid "<strong>Oops.</strong> A slight problem. Please contact Support for assistance."
|
2427 |
msgstr ""
|
2428 |
|
2429 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:471
|
2430 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:717
|
2431 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:472
|
2432 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:785
|
2433 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:703
|
2434 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:1021
|
2435 |
msgctxt "s2member-front"
|
2436 |
msgid "<strong>Thank you.</strong> Your account has been approved.<br />— You'll receive an email momentarily."
|
2437 |
msgstr ""
|
2438 |
|
2439 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-checkout-in.inc.php:737
|
2440 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:805
|
2441 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:1041
|
2442 |
msgctxt "s2member-front"
|
2443 |
msgid "<strong>Unknown error.</strong> Please contact Support for assistance."
|
2444 |
msgstr ""
|
2445 |
|
2446 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:112
|
2447 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:220
|
2448 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:353
|
2449 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:474
|
2450 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:663
|
2451 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:116
|
2452 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:224
|
2453 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:355
|
2454 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:474
|
2455 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:662
|
2456 |
msgctxt "s2member-front"
|
2457 |
msgid "Security Code"
|
2458 |
msgstr ""
|
2459 |
|
2460 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:187
|
2461 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:630
|
2462 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:191
|
2463 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:629
|
2464 |
msgctxt "s2member-front"
|
2465 |
msgid "Additional Info"
|
2466 |
msgstr ""
|
2467 |
|
2468 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:320
|
2469 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:441
|
2470 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:594
|
2471 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:324
|
2472 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:443
|
2473 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:595
|
2474 |
msgctxt "s2member-front"
|
2475 |
msgid "Visa®"
|
2476 |
msgstr ""
|
2477 |
|
2478 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:320
|
2479 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:441
|
2480 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:594
|
2481 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:324
|
2482 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:443
|
2483 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:595
|
2484 |
msgctxt "s2member-front"
|
2485 |
msgid "MasterCard®"
|
2486 |
msgstr ""
|
2487 |
|
2488 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:320
|
2489 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:441
|
2490 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:594
|
2491 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:324
|
2492 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:443
|
2493 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:595
|
2494 |
msgctxt "s2member-front"
|
2495 |
msgid "Discover®"
|
2496 |
msgstr ""
|
2497 |
|
2498 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:320
|
2499 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:441
|
2500 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:594
|
2501 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:324
|
2502 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:443
|
2503 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:595
|
2504 |
msgctxt "s2member-front"
|
2505 |
msgid "American Express®"
|
2506 |
msgstr ""
|
2511 |
msgid "<strong>Thank you.</strong> Please <a href=\"%s\" rel=\"nofollow\">login</a>."
|
2512 |
msgstr ""
|
2513 |
|
2514 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-registration-in.inc.php:134
|
2515 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-registration-in.inc.php:134
|
2516 |
msgctxt "s2member-front"
|
2517 |
msgid "<strong>Thank you.</strong> You'll receive an email momentarily."
|
2518 |
msgstr ""
|
3225 |
msgid "<strong>Thank you.</strong> Your purchase has been approved.<br />— Please <a href=\"%s\" rel=\"nofollow\">click here</a> to proceed."
|
3226 |
msgstr ""
|
3227 |
|
3228 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-sp-checkout-in.inc.php:170
|
3229 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-sp-checkout-in.inc.php:282
|
3230 |
msgctxt "s2member-front"
|
3231 |
msgid "<strong>Oops.</strong> Unable to generate Access Link. Please contact Support for assistance."
|
3232 |
msgstr ""
|
3237 |
msgid "<strong>Confirmed.</strong> Your billing information has been updated."
|
3238 |
msgstr ""
|
3239 |
|
3240 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-update-in.inc.php:119
|
3241 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:128
|
3242 |
msgctxt "s2member-front"
|
3243 |
msgid "<strong>Unable to update.</strong> You have NO recurring fees. Or, your billing profile is no longer active. Please contact Support if you need assistance."
|
3244 |
msgstr ""
|
3245 |
|
3246 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-update-in.inc.php:128
|
3247 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:145
|
3248 |
msgctxt "s2member-front"
|
3249 |
msgid "<strong>Oops.</strong> No Subscr. ID. Please contact Support for assistance."
|
3250 |
msgstr ""
|
3266 |
msgid "Error #%1$s. %2$s."
|
3267 |
msgstr ""
|
3268 |
|
3269 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:651
|
3270 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:794
|
3271 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:221
|
3272 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:364
|
3273 |
msgctxt "s2member-front percentage-symbol"
|
3274 |
msgid "%"
|
3275 |
msgstr ""
|
3276 |
|
3277 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:793
|
3278 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:363
|
3279 |
msgctxt "s2member-front"
|
3280 |
msgid " + tax"
|
3281 |
msgstr ""
|
3282 |
|
3283 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:838
|
3284 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:890
|
3285 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:903
|
3286 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:925
|
3287 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:985
|
3288 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1000
|
3289 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:408
|
3290 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:460
|
3291 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:473
|
3292 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:495
|
3293 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:555
|
3294 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:570
|
3295 |
msgctxt "s2member-front"
|
3296 |
msgid "COUPON %s off. ( Now: %s )"
|
3297 |
msgstr ""
|
3298 |
|
3299 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:839
|
3300 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:891
|
3301 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:904
|
3302 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:926
|
3303 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:986
|
3304 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1001
|
3305 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:409
|
3306 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:461
|
3307 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:474
|
3308 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:496
|
3309 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:556
|
3310 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:571
|
3311 |
msgctxt "s2member-front"
|
3312 |
msgid "<div>Coupon: <strong>%s off</strong>. ( Now: <strong>%s</strong> )</div>"
|
3313 |
msgstr ""
|
3314 |
|
3315 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:851
|
3316 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:864
|
3317 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:877
|
3318 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:940
|
3319 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:955
|
3320 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:970
|
3321 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:421
|
3322 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:434
|
3323 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:447
|
3324 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:510
|
3325 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:525
|
3326 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:540
|
3327 |
msgctxt "s2member-front"
|
3328 |
msgid "COUPON %s off. ( Now: %s, then %s )"
|
3329 |
msgstr ""
|
3330 |
|
3331 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:852
|
3332 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:865
|
3333 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:878
|
3334 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:941
|
3335 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:956
|
3336 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:971
|
3337 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:422
|
3338 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:435
|
3339 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:448
|
3340 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:511
|
3341 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:526
|
3342 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:541
|
3343 |
msgctxt "s2member-front"
|
3344 |
msgid "<div>Coupon: <strong>%s off</strong>. ( Now: <strong>%s, then %s</strong> )</div>"
|
3345 |
msgstr ""
|
3346 |
|
3347 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:908
|
3348 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1005
|
3349 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:478
|
3350 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:575
|
3351 |
msgctxt "s2member-front"
|
3352 |
msgid "<div>Sorry, your Coupon is not applicable.</div>"
|
3353 |
msgstr ""
|
3354 |
|
3355 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1009
|
3356 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:579
|
3357 |
msgctxt "s2member-front"
|
3358 |
msgid "<div>Coupon: <strong>%s0.00 off</strong>.</div>"
|
3359 |
msgstr ""
|
3360 |
|
3361 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1013
|
3362 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:583
|
3363 |
msgctxt "s2member-front"
|
3364 |
msgid "<div>Sorry, your Coupon cannot be applied to this particular purchase.</div>"
|
3365 |
msgstr ""
|
3366 |
|
3367 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1017
|
3368 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:587
|
3369 |
msgctxt "s2member-front"
|
3370 |
msgid "<div>Sorry, your Coupon <strong>expired</strong>: <em>%s</em>.</div>"
|
3371 |
msgstr ""
|
3373 |
#. translators: `%1$s` is new price/description, after coupon applied. `%2$s`
|
3374 |
#. is original description.
|
3375 |
|
3376 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1023
|
3377 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:593
|
3378 |
msgctxt "s2member-front"
|
3379 |
msgid "%1$s ~ ORIGINALLY: %2$s"
|
3380 |
msgstr ""
|
3381 |
|
3382 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1051
|
3383 |
+
#: s2member-pro/includes/classes/gateways/authnet/authnet-utilities.inc.php:1055
|
3384 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:621
|
3385 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-utilities.inc.php:625
|
3386 |
msgctxt "s2member-front"
|
3387 |
msgid "<div>Sorry, your Coupon is N/A, invalid or expired.</div>"
|
3388 |
msgstr ""
|
3395 |
"The ClickBank® txnType did not match a required action."
|
3396 |
msgstr ""
|
3397 |
|
3398 |
+
#: s2member-pro/includes/classes/gateways/clickbank/clickbank-return-in.inc.php:217
|
3399 |
msgctxt "s2member-front"
|
3400 |
msgid ""
|
3401 |
"ERROR: Unable to verify POST vars. Please contact Support for assistance.\n"
|
3403 |
"This is most likely related to an invalid ClickBank® configuration. If you are the site owner, please check: s2Member -> ClickBank® Options."
|
3404 |
msgstr ""
|
3405 |
|
3406 |
+
#: s2member-pro/includes/classes/gateways/clickbank/clickbank-utilities.inc.php:167
|
3407 |
msgctxt "s2member-front"
|
3408 |
msgid "<strong>Reminder:</strong> Purchases at this site will appear on your credit card or bank statement as: <code>ClickBank®</code> or <code>CLKBANK*COM</code>."
|
3409 |
msgstr ""
|
3410 |
|
3411 |
+
#: s2member-pro/includes/classes/gateways/google/google-button-in.inc.php:93
|
3412 |
+
#: s2member-pro/includes/classes/gateways/google/google-button-in.inc.php:115
|
3413 |
+
#: s2member-pro/includes/classes/gateways/google/google-button-in.inc.php:137
|
3414 |
#: s2member-pro/includes/templates/buttons/google-ccaps-checkout-button.php:7
|
3415 |
#: s2member-pro/includes/templates/buttons/google-checkout-button.php:7
|
3416 |
#: s2member-pro/includes/templates/buttons/google-sp-checkout-button.php:7
|
3487 |
msgid "Cancel at any time to avoid charges."
|
3488 |
msgstr ""
|
3489 |
|
3490 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:122
|
3491 |
#: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:258
|
3492 |
msgctxt "s2member-front"
|
3493 |
msgid "<strong>Unable to cancel at this time.</strong> Your account is pending other changes. Please try again in 15 minutes."
|
3494 |
msgstr ""
|
3495 |
|
3496 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-cancellation-in.inc.php:134
|
3497 |
#: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:251
|
3498 |
msgctxt "s2member-front"
|
3499 |
msgid "Please <a href=\"%s\" rel=\"nofollow\">log in at PayPal®</a> to cancel your Subscription."
|
3500 |
msgstr ""
|
3501 |
|
3502 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:301
|
3503 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-in.inc.php:624
|
3504 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:437
|
3505 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-checkout-rdp-in.inc.php:860
|
3506 |
msgctxt "s2member-front"
|
3507 |
msgid "<strong>Sorry.</strong> Your account is pending other changes. Please try again in 15 minutes."
|
3508 |
msgstr ""
|
3509 |
|
3510 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:324
|
3511 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:443
|
3512 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:595
|
3513 |
msgctxt "s2member-front"
|
3514 |
msgid "Maestro®"
|
3515 |
msgstr ""
|
3516 |
|
3517 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:324
|
3518 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:443
|
3519 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:595
|
3520 |
msgctxt "s2member-front"
|
3521 |
msgid "Solo®"
|
3522 |
msgstr ""
|
3523 |
|
3524 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:443
|
3525 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:595
|
3526 |
msgctxt "s2member-front"
|
3527 |
msgid "PayPal®"
|
3528 |
msgstr ""
|
3550 |
#: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:278
|
3551 |
#: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:281
|
3552 |
#: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:76
|
3553 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:132
|
3554 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:136
|
3555 |
msgctxt "s2member-front"
|
3556 |
msgid "Please <a href=\"%s\" rel=\"nofollow\">log in at PayPal®</a> to update your billing information."
|
3557 |
msgstr ""
|
3558 |
|
3559 |
#: s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php:288
|
3560 |
+
#: s2member-pro/includes/classes/gateways/paypal/paypal-update-in.inc.php:124
|
3561 |
msgctxt "s2member-front"
|
3562 |
msgid "<strong>Unable to update at this time.</strong> Your account is pending other changes. Please try again in 15 minutes."
|
3563 |
msgstr ""
|
3679 |
msgstr ""
|
3680 |
|
3681 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
3682 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:70
|
3683 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:164
|
3684 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:250
|
3685 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:457
|
3686 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:699
|
3687 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3688 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:70
|
3689 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:164
|
3690 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:250
|
3691 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:492
|
3692 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:769
|
3693 |
msgctxt "s2member-front"
|
3694 |
msgid "Security Code missing. Please try again."
|
3695 |
msgstr ""
|
3696 |
|
3697 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
3698 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:139
|
3699 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:432
|
3700 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:660
|
3701 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3702 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:139
|
3703 |
msgctxt "s2member-front"
|
3704 |
msgid "Please choose a Billing Method."
|
3705 |
msgstr ""
|
3706 |
|
3707 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
3708 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:299
|
3709 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:507
|
3710 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3711 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:302
|
3712 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:545
|
3713 |
msgctxt "s2member-front"
|
3714 |
msgid "Calculating Sales Tax..."
|
3715 |
msgstr ""
|
3716 |
|
3717 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
3718 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:299
|
3719 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:507
|
3720 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3721 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:302
|
3722 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:545
|
3723 |
msgctxt "s2member-front"
|
3724 |
msgid "calculating sales tax..."
|
3725 |
msgstr ""
|
3726 |
|
3727 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
3728 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:310
|
3729 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:518
|
3730 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3731 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:313
|
3732 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:556
|
3733 |
msgctxt "s2member-front"
|
3734 |
msgid "<strong>Sales Tax%s:</strong> %s<br /><strong>— Total%s:</strong> %s"
|
3735 |
msgstr ""
|
3736 |
|
3737 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
3738 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:310
|
3739 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:518
|
3740 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3741 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:313
|
3742 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:556
|
3743 |
msgctxt "s2member-front"
|
3744 |
msgid "Today"
|
3745 |
msgstr ""
|
3746 |
|
3747 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
3748 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:580
|
3749 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3750 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:618
|
3751 |
#: s2member-pro/includes/templates/forms/authnet-checkout-form.php:47
|
3752 |
#: s2member-pro/includes/templates/forms/authnet-registration-form.php:28
|
3753 |
#: s2member-pro/includes/templates/forms/paypal-checkout-form.php:47
|
3757 |
msgstr ""
|
3758 |
|
3759 |
#: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
|
3760 |
+
#: s2member-pro/includes/separates/gateways/authnet/authnet.js:581
|
3761 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3762 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:619
|
3763 |
msgctxt "s2member-front"
|
3764 |
msgid "Your Profile"
|
3765 |
msgstr ""
|
3766 |
|
3767 |
#: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
|
3768 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:265
|
3769 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:266
|
3770 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:508
|
3771 |
+
#: s2member-pro/includes/separates/gateways/paypal/paypal.js:509
|
3772 |
#: s2member-pro/includes/templates/forms/authnet-cancellation-form.php:34
|
3773 |
#: s2member-pro/includes/templates/forms/authnet-checkout-form.php:178
|
3774 |
#: s2member-pro/includes/templates/forms/authnet-registration-form.php:79
|
readme.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
=== s2Member® ( Membership w/ PayPal® ) ===
|
2 |
|
3 |
-
Version:
|
4 |
-
Stable tag:
|
5 |
Framework: WS-P-110523
|
6 |
|
7 |
SSL Compatible: yes
|
@@ -19,7 +19,7 @@ ClickBank® Compatible: yes w/ s2Member Pro
|
|
19 |
AliPay® Compatible: yes w/ s2Member Pro
|
20 |
ccBill® Compatible: yes w/ s2Member Pro
|
21 |
|
22 |
-
Tested up to: 3.3
|
23 |
Requires at least: 3.2
|
24 |
Requires: WordPress® 3.2+, PHP 5.2.3+
|
25 |
|
@@ -179,6 +179,15 @@ Please visit s2Member.com for [video tutorials](http://www.s2member.com/videos/)
|
|
179 |
|
180 |
== Changelog ==
|
181 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
= v111105 =
|
183 |
* (s2Member Pro) **New feature**. It is now possible to configure Coupon Codes that are ONLY valid on specific Pages/Posts which may hold one of your s2Member Pro Forms. For further details, please check the examples in your Dashboard, here: `s2Member -> Pro Coupon Codes`.
|
184 |
* (s2Member Pro) **New feature**. Affiliate Coupon Codes make it possible for your affiliates to receive credit for sales they refer, using one of your Coupon Codes. Here's how it works. You tell your affiliates about one or more of the Coupon Codes that you accept. Each of your affiliates can add their affiliate ID onto the end of any valid Coupon Code, like this: `COUPON-CODE-A:123`; where `COUPON-CODE` is the valid Coupon Code that you've configured, and `123` is the affiliate's ID. If a Customer comes to your site, and they use a Coupon Code with an affiliate ID on the end of it; your affiliate will be tracked automatically by s2Member. If this Customer actually completes the sale, the referring affiliate will be credited with whatever commission your affiliate program offers. For further details, please check the examples in your Dashboard, here: `s2Member -> Pro Coupon Codes -> Affiliate Coupon Codes`.
|
1 |
=== s2Member® ( Membership w/ PayPal® ) ===
|
2 |
|
3 |
+
Version: 111206
|
4 |
+
Stable tag: 111206
|
5 |
Framework: WS-P-110523
|
6 |
|
7 |
SSL Compatible: yes
|
19 |
AliPay® Compatible: yes w/ s2Member Pro
|
20 |
ccBill® Compatible: yes w/ s2Member Pro
|
21 |
|
22 |
+
Tested up to: 3.3
|
23 |
Requires at least: 3.2
|
24 |
Requires: WordPress® 3.2+, PHP 5.2.3+
|
25 |
|
179 |
|
180 |
== Changelog ==
|
181 |
|
182 |
+
= v111206 =
|
183 |
+
* (s2Member/s2Member Pro) **WordPress® v3.3**. Updates for compatibility with WordPress® v3.3. This release of s2Member also remains compatible with the WordPress® v3.2.x series.
|
184 |
+
* (s2Member/s2Member Pro) **Bug fix**. An important bug was identified in s2Member's handling of certain EOT events associated with Subscr. Modifications *( under the right scenario )*. Fixed in this release.
|
185 |
+
* (s2Member Pro) **reCAPTCHA™ bug fix**. An issue with reCAPTCHA™ public/private keys, on s2Member Pro Forms *( particularly on Free Registration Forms )*, which was related to some data loss suffered by Google's reCAPTCHA™ service; has been resolved in this release. In addition, a new UI panel has been introduced, allowing site owners to use their own public/private keys associated with reCAPTCHA™; if they so choose. This is optional however. For further details, please check your Dashboard here: `s2Member -> General Options -> CAPTCHA Anti-Spam Security`. Requires s2Member® Pro.
|
186 |
+
* (s2Member/s2Member Pro) **Security hardening**. Additional security checksums have been added to s2Member's utility encryption methods to make these routines even more secure.
|
187 |
+
* (s2Member/s2Member Pro) **Security hardening**. Additional security protocols have been added to s2Member's core PayPal® processors to make these routines even more secure.
|
188 |
+
* (s2Member Pro) **Deprecated feature**. For s2Member Pro Forms with Custom Return URLs on success, the `%%response%%` Replacement Code within URLs is now deprecated, in favor of the new `%%s_response%%`. For further details, please check your Dashboard here: `s2Member -> PayPal/Authorize.Net Pro Forms -> Custom Return URLs On Success -> Replacement Codes`.
|
189 |
+
* (s2Member/s2Member Pro) **Security fix**. A security vulnerability related to unsigned URLs leading to checkout pages for ccBill®, ClickBank® and Google® Checkout, has been addressed in this release. For further details, please see [this thread](http://www.primothemes.com/forums/viewtopic.php?f=4&t=15232&p=41707#p41707).
|
190 |
+
|
191 |
= v111105 =
|
192 |
* (s2Member Pro) **New feature**. It is now possible to configure Coupon Codes that are ONLY valid on specific Pages/Posts which may hold one of your s2Member Pro Forms. For further details, please check the examples in your Dashboard, here: `s2Member -> Pro Coupon Codes`.
|
193 |
* (s2Member Pro) **New feature**. Affiliate Coupon Codes make it possible for your affiliates to receive credit for sales they refer, using one of your Coupon Codes. Here's how it works. You tell your affiliates about one or more of the Coupon Codes that you accept. Each of your affiliates can add their affiliate ID onto the end of any valid Coupon Code, like this: `COUPON-CODE-A:123`; where `COUPON-CODE` is the valid Coupon Code that you've configured, and `123` is the affiliate's ID. If a Customer comes to your site, and they use a Coupon Code with an affiliate ID on the end of it; your affiliate will be tracked automatically by s2Member. If this Customer actually completes the sale, the referring affiliate will be credited with whatever commission your affiliate program offers. For further details, please check the examples in your Dashboard, here: `s2Member -> Pro Coupon Codes -> Affiliate Coupon Codes`.
|
s2member.php
CHANGED
@@ -19,8 +19,8 @@
|
|
19 |
*/
|
20 |
/* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
|
21 |
|
22 |
-
Version:
|
23 |
-
Stable tag:
|
24 |
Framework: WS-P-110523
|
25 |
|
26 |
SSL Compatible: yes
|
@@ -38,7 +38,7 @@ ClickBank® Compatible: w/ s2Member Pro
|
|
38 |
AliPay® Compatible: w/ s2Member Pro
|
39 |
ccBill® Compatible: w/ s2Member Pro
|
40 |
|
41 |
-
Tested up to: 3.3
|
42 |
Requires at least: 3.2
|
43 |
Requires: WordPress® 3.2+, PHP 5.2.3+
|
44 |
|
@@ -66,7 +66,7 @@ Tags: membership, members, member, register, signup, paypal, paypal pro, pay pal
|
|
66 |
|
67 |
-- end section for WordPress® parsing. ------------------------------------------------------------------------------- */
|
68 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
69 |
-
exit
|
70 |
/**
|
71 |
* The installed version of s2Member.
|
72 |
*
|
@@ -76,7 +76,7 @@ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
|
76 |
* @var str
|
77 |
*/
|
78 |
if (!defined ("WS_PLUGIN__S2MEMBER_VERSION"))
|
79 |
-
define ("WS_PLUGIN__S2MEMBER_VERSION", "
|
80 |
/**
|
81 |
* Minimum PHP version required to run s2Member.
|
82 |
*
|
@@ -106,7 +106,7 @@ if (!defined ("WS_PLUGIN__S2MEMBER_MIN_WP_VERSION"))
|
|
106 |
* @var str
|
107 |
*/
|
108 |
if (!defined ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION"))
|
109 |
-
define ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "
|
110 |
/*
|
111 |
Several compatibility checks.
|
112 |
If all pass, load the s2Member plugin.
|
@@ -117,7 +117,7 @@ if (version_compare (PHP_VERSION, WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION, ">=") &&
|
|
117 |
/*
|
118 |
Hook before loaded.
|
119 |
*/
|
120 |
-
do_action
|
121 |
/*
|
122 |
System configuraton.
|
123 |
*/
|
@@ -129,7 +129,7 @@ if (version_compare (PHP_VERSION, WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION, ">=") &&
|
|
129 |
/*
|
130 |
Hook after system config & Hooks are loaded.
|
131 |
*/
|
132 |
-
do_action
|
133 |
/*
|
134 |
Load a possible Pro module, if/when available.
|
135 |
*/
|
@@ -148,9 +148,10 @@ if (version_compare (PHP_VERSION, WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION, ">=") &&
|
|
148 |
*/
|
149 |
include_once dirname (__FILE__) . "/includes/codes.inc.php";
|
150 |
/*
|
151 |
-
|
152 |
*/
|
153 |
-
do_action
|
|
|
154 |
}
|
155 |
/*
|
156 |
Else NOT compatible. Do we need admin compatibility errors now?
|
19 |
*/
|
20 |
/* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
|
21 |
|
22 |
+
Version: 111206
|
23 |
+
Stable tag: 111206
|
24 |
Framework: WS-P-110523
|
25 |
|
26 |
SSL Compatible: yes
|
38 |
AliPay® Compatible: w/ s2Member Pro
|
39 |
ccBill® Compatible: w/ s2Member Pro
|
40 |
|
41 |
+
Tested up to: 3.3
|
42 |
Requires at least: 3.2
|
43 |
Requires: WordPress® 3.2+, PHP 5.2.3+
|
44 |
|
66 |
|
67 |
-- end section for WordPress® parsing. ------------------------------------------------------------------------------- */
|
68 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
69 |
+
exit("Do not access this file directly.");
|
70 |
/**
|
71 |
* The installed version of s2Member.
|
72 |
*
|
76 |
* @var str
|
77 |
*/
|
78 |
if (!defined ("WS_PLUGIN__S2MEMBER_VERSION"))
|
79 |
+
define ("WS_PLUGIN__S2MEMBER_VERSION", "111206");
|
80 |
/**
|
81 |
* Minimum PHP version required to run s2Member.
|
82 |
*
|
106 |
* @var str
|
107 |
*/
|
108 |
if (!defined ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION"))
|
109 |
+
define ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "111206");
|
110 |
/*
|
111 |
Several compatibility checks.
|
112 |
If all pass, load the s2Member plugin.
|
117 |
/*
|
118 |
Hook before loaded.
|
119 |
*/
|
120 |
+
do_action("ws_plugin__s2member_before_loaded");
|
121 |
/*
|
122 |
System configuraton.
|
123 |
*/
|
129 |
/*
|
130 |
Hook after system config & Hooks are loaded.
|
131 |
*/
|
132 |
+
do_action("ws_plugin__s2member_config_hooks_loaded");
|
133 |
/*
|
134 |
Load a possible Pro module, if/when available.
|
135 |
*/
|
148 |
*/
|
149 |
include_once dirname (__FILE__) . "/includes/codes.inc.php";
|
150 |
/*
|
151 |
+
Hooks after loaded.
|
152 |
*/
|
153 |
+
do_action("ws_plugin__s2member_loaded");
|
154 |
+
do_action("ws_plugin__s2member_after_loaded");
|
155 |
}
|
156 |
/*
|
157 |
Else NOT compatible. Do we need admin compatibility errors now?
|