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

Version Description

= v140409 =

(Maintenance Release) Upgrade immediately.

Download this release

Release Info

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

Code changes from version 140328 to 140409

checksum.txt CHANGED
@@ -1 +1 @@
1
- 3d97d4d4213785bad33b96ffa9cba239
1
+ 0dc9576ca2b6a5856d4e1e602dccc109
includes/classes/mo-page-in.inc.php CHANGED
@@ -1,105 +1,167 @@
1
<?php
2
/**
3
- * Membership Options Page (inner processing routines).
4
- *
5
- * Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
- * (coded in the USA)
8
- *
9
- * Released under the terms of the GNU General Public License.
10
- * You should have received a copy of the GNU General Public License,
11
- * along with this software. In the main directory, see: /licensing/
12
- * If not, see: {@link http://www.gnu.org/licenses/}.
13
- *
14
- * @package s2Member\Membership_Options_Page
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_mo_page_in"))
21
{
22
/**
23
- * Membership Options Page (inner processing routines).
24
- *
25
- * @package s2Member\Membership_Options_Page
26
- * @since 3.5
27
- */
28
class c_ws_plugin__s2member_mo_page_in
29
- {
30
- /**
31
- * Forces a redirection to the Membership Options Page for s2Member.
32
- *
33
- * This can be used by 3rd party apps that are not aware of which Page is currently set as the Membership Options Page.
34
- * Example usage: `http://example.com/?s2member_membership_options_page=1`
35
- *
36
- * Redirection URLs containing array brackets MUST be URL encoded to get through: ``wp_sanitize_redirect()``.
37
- * So we pass everything to ``urlencode_deep()``, as an array. It handles this via ``_http_build_query()``.
38
- * See bug report here: {@link http://core.trac.wordpress.org/ticket/17052}
39
- *
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
- */
47
- public static function membership_options_page /* Real Membership Options Page. */ ()
48
- {
49
- do_action ("ws_plugin__s2member_before_membership_options_page", get_defined_vars ());
50
-
51
- if (!empty ($_GET["s2member_membership_options_page"]) && is_array ($_g = c_ws_plugin__s2member_utils_strings::trim_deep (stripslashes_deep ($_GET))))
52
- {
53
- $args = /* Initialize this to an empty array value. */ array ();
54
-
55
- foreach ($_g as $var => $value) // Include all of the `_?s2member_` variables.
56
- // Do NOT include `s2member_membership_options_page`; creates a redirection loop.
57
- if (preg_match ("/^_?s2member_/", $var) && $var !== "s2member_membership_options_page")
58
- $args[$var] = /* Supports nested arrays. */ $value;
59
-
60
- wp_redirect (add_query_arg (urlencode_deep ($args), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"])), 301) . exit ();
61
- }
62
-
63
- do_action ("ws_plugin__s2member_after_membership_options_page", get_defined_vars ());
64
- }
65
- /**
66
- * Redirects to Membership Options Page w/ MOP Vars.
67
- *
68
- * Redirection URLs containing array brackets MUST be URL encoded to get through: ``wp_sanitize_redirect()``.
69
- * So we pass everything to ``urlencode_deep()``, as an array. It handles this via ``_http_build_query()``.
70
- * See bug report here: {@link http://core.trac.wordpress.org/ticket/17052}
71
- *
72
- * @package s2Member\Membership_Options_Page
73
- * @since 111101
74
- *
75
- * @param str $seeking_type Seeking content type. One of: `post|page|catg|ptag|file|ruri`.
76
- * @param str|int $seeking_type_value Seeking content type data. String, or a Post/Page ID.
77
- * @param str $req_type Access requirement type. One of these values: `level|ccap|sp`.
78
- * @param str|int $req_type_value Access requirement. String, or a Post/Page ID.
79
- * @param str $seeking_uri The full URI that access was attempted on.
80
- * @param str $res_type Restriction type that's preventing access.
81
- * One of: `post|page|catg|ptag|file|ruri|ccap|sp|sys`.
82
- * Defaults to ``$seeking_type``.
83
- * @return bool This function always returns true.
84
- */
85
- public static function wp_redirect_w_mop_vars ($seeking_type = FALSE, $seeking_type_value = FALSE, $req_type = FALSE, $req_type_value = FALSE, $seeking_uri = FALSE, $res_type = FALSE)
86
- {
87
- do_action ("ws_plugin__s2member_before_wp_redirect_w_mop_vars", get_defined_vars ());
88
-
89
- $status = /* Allow Filters. Defaults to `301`. */ apply_filters ("ws_plugin__s2member_content_redirect_status", 301, get_defined_vars ());
90
- $status = /* Allow Filters. Defaults to `301`. */ apply_filters ("ws_plugin__s2member_wp_redirect_w_mop_vars_status", $status, get_defined_vars ());
91
-
92
- $seeking_uri = (strlen ((string)$seeking_uri) /* URIs are base64 encoded. */) ? base64_encode ((string)$seeking_uri) : (string)$seeking_uri;
93
- $seeking_type_value = ((string)$seeking_type /* URIs are base64 encoded. */ === "ruri") ? base64_encode ((string)$seeking_type_value) : (string)$seeking_type_value;
94
-
95
- $res_type = (!(string)$res_type) ? /* Restriction type preventing access. Defaults to ``$seeking_type`` if NOT passed in explicitly. */ (string)$seeking_type : (string)$res_type;
96
-
97
- wp_redirect (add_query_arg (urlencode_deep (array ("_s2member_seeking" => array ("type" => (string)$seeking_type, urlencode ((string)$seeking_type)=> (string)$seeking_type_value, "_uri" => (string)$seeking_uri), "_s2member_req" => array ("type" => (string)$req_type, urlencode ((string)$req_type)=> (string)$req_type_value), "_s2member_res" => array ("type" => (string)$res_type), "s2member_seeking" => (string)$seeking_type . "-" . (string)$seeking_type_value, "s2member_" . urlencode ((string)$req_type) . "_req" => (string)$req_type_value)), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"])), $status);
98
-
99
- do_action ("ws_plugin__s2member_after_wp_redirect_w_mop_vars", get_defined_vars ());
100
-
101
- return true; // Always returns true here.
102
- }
103
- }
104
}
105
?>
1
<?php
2
/**
3
+ * Membership Options Page (inner processing routines).
4
+ *
5
+ * Copyright: © 2009-2011
6
+ * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
+ * (coded in the USA)
8
+ *
9
+ * Released under the terms of the GNU General Public License.
10
+ * You should have received a copy of the GNU General Public License,
11
+ * along with this software. In the main directory, see: /licensing/
12
+ * If not, see: {@link http://www.gnu.org/licenses/}.
13
+ *
14
+ * @package s2Member\Membership_Options_Page
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_mo_page_in"))
21
{
22
/**
23
+ * Membership Options Page (inner processing routines).
24
+ *
25
+ * @package s2Member\Membership_Options_Page
26
+ * @since 3.5
27
+ */
28
class c_ws_plugin__s2member_mo_page_in
29
+ {
30
+ /**
31
+ * Forces a redirection to the Membership Options Page for s2Member.
32
+ *
33
+ * This can be used by 3rd party apps that are not aware of which Page is currently set as the Membership Options Page.
34
+ * Example usage: `http://example.com/?s2member_membership_options_page=1`
35
+ *
36
+ * Redirection URLs containing array brackets MUST be URL encoded to get through: ``wp_sanitize_redirect()``.
37
+ * So we pass everything to ``urlencode_deep()``, as an array. It handles this via ``_http_build_query()``.
38
+ * See bug report here: {@link http://core.trac.wordpress.org/ticket/17052}
39
+ *
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
+ */
47
+ public static function membership_options_page() // Real Membership Options Page.
48
+ {
49
+ do_action("ws_plugin__s2member_before_membership_options_page", get_defined_vars());
50
+
51
+ if(!empty ($_GET["s2member_membership_options_page"]) && is_array($_g = c_ws_plugin__s2member_utils_strings::trim_deep(stripslashes_deep($_GET))))
52
+ {
53
+ $args = array(); // Initialize this to an empty array value.
54
+
55
+ foreach($_g as $var => $value) // Include all of the `_?s2member_` variables.
56
+ // Do NOT include `s2member_membership_options_page`; creates a redirection loop.
57
+ if(preg_match("/^_?s2member_/", $var) && $var !== "s2member_membership_options_page")
58
+ $args[$var] = $value; // Supports nested arrays.
59
+
60
+ wp_redirect(add_query_arg(urlencode_deep($args), get_page_link($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"])), 301).exit ();
61
+ }
62
+ do_action("ws_plugin__s2member_after_membership_options_page", get_defined_vars());
63
+ }
64
+
65
+ /**
66
+ * Redirects to Membership Options Page w/ MOP Vars.
67
+ *
68
+ * Redirection URLs containing array brackets MUST be URL encoded to get through: ``wp_sanitize_redirect()``.
69
+ * So we pass everything to ``urlencode_deep()``, as an array. It handles this via ``_http_build_query()``.
70
+ * See bug report here: {@link http://core.trac.wordpress.org/ticket/17052}
71
+ *
72
+ * @package s2Member\Membership_Options_Page
73
+ * @since 111101
74
+ *
75
+ * @param str $seeking_type Seeking content type. One of: `post|page|catg|ptag|file|ruri`.
76
+ * @param str|int $seeking_type_value Seeking content type data. String, or a Post/Page ID.
77
+ * @param str $req_type Access requirement type. One of these values: `level|ccap|sp`.
78
+ * @param str|int $req_type_value Access requirement. String, or a Post/Page ID.
79
+ * @param str $seeking_uri The full URI that access was attempted on.
80
+ * @param str $res_type Restriction type that's preventing access.
81
+ * One of: `post|page|catg|ptag|file|ruri|ccap|sp|sys`.
82
+ * Defaults to ``$seeking_type``.
83
+ *
84
+ * @return bool This function always returns true.
85
+ *
86
+ * @TODO Update documentation in the API Scripting section.
87
+ */
88
+ public static function wp_redirect_w_mop_vars($seeking_type = FALSE, $seeking_type_value = FALSE, $req_type = FALSE, $req_type_value = FALSE, $seeking_uri = FALSE, $res_type = FALSE)
89
+ {
90
+ do_action("ws_plugin__s2member_before_wp_redirect_w_mop_vars", get_defined_vars());
91
+
92
+ foreach(array("seeking_type", "seeking_type_value", "req_type", "req_type_value", "seeking_uri", "res_type") as $_param)
93
+ {
94
+ if($_param === "seeking_uri" || ($_param === "seeking_type_value" && $seeking_type === "ruri"))
95
+ ${$_param} = base64_encode((string)${$_param});
96
+ else ${$_param} = str_replace(".", "", (string)${$_param});
97
+ }
98
+ unset($_param); // Housekeeping.
99
+
100
+ if(!$res_type) $res_type = $seeking_type;
101
+
102
+ $vars = $res_type.".".$req_type.".".$req_type_value.".";
103
+ $vars .= $seeking_type.".".$seeking_type_value.".".$seeking_uri;
104
+ $vars = array("_s2member_vars" => $vars);
105
+
106
+ $status = apply_filters("ws_plugin__s2member_content_redirect_status", 301, get_defined_vars());
107
+ $status = apply_filters("ws_plugin__s2member_wp_redirect_w_mop_vars_status", $status, get_defined_vars());
108
+
109
+ $mop_url = get_page_link($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"]);
110
+ if($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page_vars_enable"])
111
+ {
112
+ $mop_url = add_query_arg(urlencode_deep($vars), $mop_url);
113
+ $mop_url = c_ws_plugin__s2member_utils_urls::add_s2member_sig($mop_url);
114
+ }
115
+ wp_redirect($mop_url, $status); // NOTE: we do not exit here (on purpose).
116
+
117
+ do_action("ws_plugin__s2member_after_wp_redirect_w_mop_vars", get_defined_vars());
118
+
119
+ return TRUE; // Always returns true here.
120
+ }
121
+
122
+ /*
123
+ * s2Member's MOP Vars are now a dot (`.`) delimited list of six values.
124
+ *
125
+ * e.g. .../membership-options-page/
126
+ * ?_s2member_vars=[restriction type].[requirement type].[requirement type value].
127
+ * [seeking type].[seeking type value].[seeking URI base 64 encoded]
128
+ */
129
+ public static function back_compat_mop_vars()
130
+ {
131
+ if(empty($_REQUEST["_s2member_vars"])
132
+ || !is_string($_REQUEST["_s2member_vars"])
133
+ ) return;
134
+
135
+ $v = explode(".", $_REQUEST["_s2member_vars"]);
136
+ if(count($v) !== 6) return;
137
+
138
+ /*
139
+ * Back compat. Deprecated since v1404xx.
140
+ */
141
+ $ov["_s2member_seeking"] = array(
142
+ "type" => $v[3],
143
+ $v[3] => $v[4],
144
+ "_uri" => $v[5]
145
+ );
146
+ $ov["_s2member_req"] = array(
147
+ "type" => $v[1],
148
+ $v[1] => $v[2],
149
+ );
150
+ $ov["_s2member_res"]["type"] = $v[0];
151
+
152
+ /*
153
+ * Back compat. Deprecated since v1104xx.
154
+ */
155
+ $ov["s2member_seeking"] = $v[3]."-".$v[4];
156
+ $ov["s2member_".$v[1]."_req"] = $v[2];
157
+
158
+ /*
159
+ * Fill both $_GET and $_REQUEST vars.
160
+ */
161
+ foreach($ov as $_k => $_v)
162
+ $_GET[$_k] = $_REQUEST[$_k] = $_v;
163
+ unset($_k, $_v);
164
+ }
165
+ }
166
}
167
?>
includes/classes/mo-page.inc.php CHANGED
@@ -1,72 +1,86 @@
1
<?php
2
/**
3
- * Membership Options Page.
4
- *
5
- * Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
- * (coded in the USA)
8
- *
9
- * Released under the terms of the GNU General Public License.
10
- * You should have received a copy of the GNU General Public License,
11
- * along with this software. In the main directory, see: /licensing/
12
- * If not, see: {@link http://www.gnu.org/licenses/}.
13
- *
14
- * @package s2Member\Membership_Options_Page
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_mo_page"))
21
{
22
/**
23
- * Membership Options Page.
24
- *
25
- * @package s2Member\Membership_Options_Page
26
- * @since 3.5
27
- */
28
class c_ws_plugin__s2member_mo_page
29
- {
30
- /**
31
- * Forces a redirection to the Membership Options Page for s2Member.
32
- *
33
- * This can be used by 3rd party apps that are not aware of which Page is currently set as the Membership Options Page.
34
- * Example usage: `http://example.com/?s2member_membership_options_page=1`
35
- *
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
- */
43
- public static function membership_options_page ()
44
- {
45
- if (!empty ($_GET["s2member_membership_options_page"]))
46
- {
47
- return c_ws_plugin__s2member_mo_page_in::membership_options_page ();
48
- }
49
- }
50
- /**
51
- * Redirects to Membership Options Page w/ MOP Vars.
52
- *
53
- * @package s2Member\Membership_Options_Page
54
- * @since 111101
55
- *
56
- * @param str $seeking_type Seeking content type. One of: `post|page|catg|ptag|file|ruri`.
57
- * @param str|int $seeking_type_value Seeking content type data. String, or a Post/Page ID.
58
- * @param str $req_type Access requirement type. One of these values: `level|ccap|sp`.
59
- * @param str|int $req_type_value Access requirement. String, or a Post/Page ID.
60
- * @param str $seeking_uri The full URI that access was attempted on.
61
- * @param str $res_type Restriction type that's preventing access.
62
- * One of: `post|page|catg|ptag|file|ruri|ccap|sp|sys`.
63
- * Defaults to ``$seeking_type``.
64
- * @return inner Return-value of inner routine.
65
- */
66
- public static function wp_redirect_w_mop_vars ($seeking_type = FALSE, $seeking_type_value = FALSE, $req_type = FALSE, $req_type_value = FALSE, $seeking_uri = FALSE, $res_type = FALSE)
67
- {
68
- return c_ws_plugin__s2member_mo_page_in::wp_redirect_w_mop_vars ($seeking_type, $seeking_type_value, $req_type, $req_type_value, $seeking_uri, $res_type);
69
- }
70
- }
71
}
72
?>
1
<?php
2
/**
3
+ * Membership Options Page.
4
+ *
5
+ * Copyright: © 2009-2011
6
+ * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
+ * (coded in the USA)
8
+ *
9
+ * Released under the terms of the GNU General Public License.
10
+ * You should have received a copy of the GNU General Public License,
11
+ * along with this software. In the main directory, see: /licensing/
12
+ * If not, see: {@link http://www.gnu.org/licenses/}.
13
+ *
14
+ * @package s2Member\Membership_Options_Page
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_mo_page"))
21
{
22
/**
23
+ * Membership Options Page.
24
+ *
25
+ * @package s2Member\Membership_Options_Page
26
+ * @since 3.5
27
+ */
28
class c_ws_plugin__s2member_mo_page
29
+ {
30
+ /**
31
+ * Forces a redirection to the Membership Options Page for s2Member.
32
+ *
33
+ * This can be used by 3rd party apps that are not aware of which Page is currently set as the Membership Options Page.
34
+ * Example usage: `http://example.com/?s2member_membership_options_page=1`
35
+ *
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
+ */
43
+ public static function membership_options_page()
44
+ {
45
+ if(!empty ($_GET["s2member_membership_options_page"]))
46
+ {
47
+ return c_ws_plugin__s2member_mo_page_in::membership_options_page();
48
+ }
49
+ }
50
+
51
+ /**
52
+ * Redirects to Membership Options Page w/ MOP Vars.
53
+ *
54
+ * @package s2Member\Membership_Options_Page
55
+ * @since 111101
56
+ *
57
+ * @param str $seeking_type Seeking content type. One of: `post|page|catg|ptag|file|ruri`.
58
+ * @param str|int $seeking_type_value Seeking content type data. String, or a Post/Page ID.
59
+ * @param str $req_type Access requirement type. One of these values: `level|ccap|sp`.
60
+ * @param str|int $req_type_value Access requirement. String, or a Post/Page ID.
61
+ * @param str $seeking_uri The full URI that access was attempted on.
62
+ * @param str $res_type Restriction type that's preventing access.
63
+ * One of: `post|page|catg|ptag|file|ruri|ccap|sp|sys`.
64
+ * Defaults to ``$seeking_type``.
65
+ *
66
+ * @return inner Return-value of inner routine.
67
+ */
68
+ public static function wp_redirect_w_mop_vars($seeking_type = FALSE, $seeking_type_value = FALSE, $req_type = FALSE, $req_type_value = FALSE, $seeking_uri = FALSE, $res_type = FALSE)
69
+ {
70
+ return c_ws_plugin__s2member_mo_page_in::wp_redirect_w_mop_vars($seeking_type, $seeking_type_value, $req_type, $req_type_value, $seeking_uri, $res_type);
71
+ }
72
+
73
+ /*
74
+ * s2Member's MOP Vars are now a dot (`.`) delimited list of six values.
75
+ *
76
+ * e.g. .../membership-options-page/
77
+ * ?_s2member_vars=[restriction type].[requirement type].[requirement type value].
78
+ * [seeking type].[seeking type value].[seeking URI base 64 encoded]
79
+ */
80
+ public static function back_compat_mop_vars()
81
+ {
82
+ return c_ws_plugin__s2member_mo_page_in::back_compat_mop_vars();
83
+ }
84
+ }
85
}
86
?>
includes/classes/paypal-notify-in.inc.php CHANGED
@@ -176,22 +176,22 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in"))
176
Add IPN proxy (when available) to the ``$paypal`` array.
177
*/
178
if (!empty ($_REQUEST["s2member_paypal_proxy"]))
179
- $paypal["s2member_paypal_proxy"] = esc_html(trim(stripslashes($_REQUEST["s2member_paypal_proxy"])));
180
/*
181
Add IPN proxy use vars (when available) to the ``$paypal`` array.
182
*/
183
if (!empty ($_REQUEST["s2member_paypal_proxy_use"]))
184
- $paypal["s2member_paypal_proxy_use"] = esc_html(trim(stripslashes($_REQUEST["s2member_paypal_proxy_use"])));
185
/*
186
Add IPN proxy coupon vars (when available) to the ``$paypal`` array.
187
*/
188
if (!empty ($_REQUEST["s2member_paypal_proxy_coupon"]))
189
- $paypal["s2member_paypal_proxy_coupon"] = esc_html(trim(stripslashes($_REQUEST["s2member_paypal_proxy_coupon"])));
190
/*
191
Also add IPN proxy self-verification (when available) to the ``$paypal`` array.
192
*/
193
if (!empty ($_REQUEST["s2member_paypal_proxy_verification"]))
194
- $paypal["s2member_paypal_proxy_verification"] = esc_html(trim(stripslashes($_REQUEST["s2member_paypal_proxy_verification"])));
195
/*
196
If debugging/logging is enabled; we need to append ``$paypal`` to the log file.
197
Logging now supports Multisite Networking as well.
176
Add IPN proxy (when available) to the ``$paypal`` array.
177
*/
178
if (!empty ($_REQUEST["s2member_paypal_proxy"]))
179
+ $paypal["s2member_paypal_proxy"] = esc_html(trim(stripslashes((string)$_REQUEST["s2member_paypal_proxy"])));
180
/*
181
Add IPN proxy use vars (when available) to the ``$paypal`` array.
182
*/
183
if (!empty ($_REQUEST["s2member_paypal_proxy_use"]))
184
+ $paypal["s2member_paypal_proxy_use"] = esc_html(trim(stripslashes((string)$_REQUEST["s2member_paypal_proxy_use"])));
185
/*
186
Add IPN proxy coupon vars (when available) to the ``$paypal`` array.
187
*/
188
if (!empty ($_REQUEST["s2member_paypal_proxy_coupon"]))
189
+ $paypal["s2member_paypal_proxy_coupon"] = stripslashes_deep((array)$_REQUEST["s2member_paypal_proxy_coupon"]);
190
/*
191
Also add IPN proxy self-verification (when available) to the ``$paypal`` array.
192
*/
193
if (!empty ($_REQUEST["s2member_paypal_proxy_verification"]))
194
+ $paypal["s2member_paypal_proxy_verification"] = esc_html(trim(stripslashes((string)$_REQUEST["s2member_paypal_proxy_verification"])));
195
/*
196
If debugging/logging is enabled; we need to append ``$paypal`` to the log file.
197
Logging now supports Multisite Networking as well.
includes/classes/paypal-return-in.inc.php CHANGED
@@ -141,27 +141,27 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_return_in"))
141
Add RTN proxy (when available) to the ``$paypal`` array.
142
*/
143
if (!empty ($_GET["s2member_paypal_proxy"]))
144
- $paypal["s2member_paypal_proxy"] = esc_html(trim(stripslashes($_GET["s2member_paypal_proxy"])));
145
/*
146
Add IPN proxy use vars (when available) to the ``$paypal`` array.
147
*/
148
if (!empty ($_GET["s2member_paypal_proxy_use"]))
149
- $paypal["s2member_paypal_proxy_use"] = esc_html(trim(stripslashes($_GET["s2member_paypal_proxy_use"])));
150
/*
151
Also add RTN proxy self-verification (when available) to the ``$paypal`` array.
152
*/
153
if (!empty ($_GET["s2member_paypal_proxy_verification"]))
154
- $paypal["s2member_paypal_proxy_verification"] = esc_html(trim(stripslashes($_GET["s2member_paypal_proxy_verification"])));
155
/*
156
Also add RTN success redirection URL (when available) to the ``$paypal`` array.
157
*/
158
if (!empty ($_GET["s2member_paypal_return_success"]))
159
- $paypal["s2member_paypal_return_success"] = esc_html(trim(stripslashes($_GET["s2member_paypal_return_success"])));
160
/*
161
Also add RTN t and r Attributes (when available) to the ``$paypal`` array.
162
*/
163
if (!empty ($_GET["s2member_paypal_return_tra"]))
164
- $paypal["s2member_paypal_return_tra"] = esc_html(trim(stripslashes($_GET["s2member_paypal_return_tra"])));
165
/*
166
If debugging/logging is enabled; we need to append $paypal to the log file.
167
Logging now supports Multisite Networking as well.
141
Add RTN proxy (when available) to the ``$paypal`` array.
142
*/
143
if (!empty ($_GET["s2member_paypal_proxy"]))
144
+ $paypal["s2member_paypal_proxy"] = esc_html(trim(stripslashes((string)$_GET["s2member_paypal_proxy"])));
145
/*
146
Add IPN proxy use vars (when available) to the ``$paypal`` array.
147
*/
148
if (!empty ($_GET["s2member_paypal_proxy_use"]))
149
+ $paypal["s2member_paypal_proxy_use"] = esc_html(trim(stripslashes((string)$_GET["s2member_paypal_proxy_use"])));
150
/*
151
Also add RTN proxy self-verification (when available) to the ``$paypal`` array.
152
*/
153
if (!empty ($_GET["s2member_paypal_proxy_verification"]))
154
+ $paypal["s2member_paypal_proxy_verification"] = esc_html(trim(stripslashes((string)$_GET["s2member_paypal_proxy_verification"])));
155
/*
156
Also add RTN success redirection URL (when available) to the ``$paypal`` array.
157
*/
158
if (!empty ($_GET["s2member_paypal_return_success"]))
159
+ $paypal["s2member_paypal_return_success"] = esc_html(trim(stripslashes((string)$_GET["s2member_paypal_return_success"])));
160
/*
161
Also add RTN t and r Attributes (when available) to the ``$paypal`` array.
162
*/
163
if (!empty ($_GET["s2member_paypal_return_tra"]))
164
+ $paypal["s2member_paypal_return_tra"] = esc_html(trim(stripslashes((string)$_GET["s2member_paypal_return_tra"])));
165
/*
166
If debugging/logging is enabled; we need to append $paypal to the log file.
167
Logging now supports Multisite Networking as well.
includes/classes/roles-caps.inc.php CHANGED
@@ -1,207 +1,199 @@
1
<?php
2
/**
3
- * Roles/Capabilities.
4
- *
5
- * Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
- * (coded in the USA)
8
- *
9
- * Released under the terms of the GNU General Public License.
10
- * You should have received a copy of the GNU General Public License,
11
- * along with this software. In the main directory, see: /licensing/
12
- * If not, see: {@link http://www.gnu.org/licenses/}.
13
- *
14
- * @package s2Member\Roles_Caps
15
- * @since 110524RC
16
- */
17
if(realpath(__FILE__) === realpath($_SERVER["SCRIPT_FILENAME"]))
18
exit("Do not access this file directly.");
19
20
if(!class_exists("c_ws_plugin__s2member_roles_caps"))
21
{
22
/**
23
- * Roles/Capabilities.
24
- *
25
- * @package s2Member\Roles_Caps
26
- * @since 110524RC
27
- */
28
class c_ws_plugin__s2member_roles_caps
29
- {
30
- /**
31
- * Configures Roles/Capabilities.
32
- *
33
- * @package s2Member\Roles_Caps
34
- * @since 110524RC
35
- *
36
- * @return null
37
- */
38
- public static function config_roles()
39
- {
40
- do_action("ws_plugin__s2member_before_config_roles", get_defined_vars());
41
-
42
- if(!apply_filters("ws_plugin__s2member_lock_roles_caps", false))
43
- {
44
- c_ws_plugin__s2member_roles_caps::unlink_roles();
45
-
46
- if(function_exists("bbp_get_dynamic_roles") /* bbPress v2.2+ integration. */)
47
- {
48
- foreach(bbp_get_caps_for_role(bbp_get_participant_role()) as $bbp_participant_cap => $bbp_participant_cap_is)
49
- if($bbp_participant_cap_is /* Is this capability enabled? */)
50
- $bbp_participant_caps[$bbp_participant_cap] = true;
51
- }
52
- else if(function_exists("bbp_get_caps_for_role") /* bbPress < v2.2 integration. */)
53
- {
54
- foreach(bbp_get_caps_for_role(bbp_get_participant_role()) as $bbp_participant_cap)
55
- $bbp_participant_caps[$bbp_participant_cap] = true;
56
- }
57
-
58
- if(0 === 0) // Subscriber Role is required by s2Member.
59
- {
60
- $caps = array("read" => true, "level_0" => true);
61
- $caps = array_merge($caps, array("access_s2member_level0" => true));
62
- $caps = (!empty($bbp_participant_caps)) ? array_merge($caps, $bbp_participant_caps) : $caps;
63
-
64
- if(!($role = &get_role("subscriber")))
65
- {
66
- add_role("subscriber", "Subscriber");
67
- $role = &get_role("subscriber");
68
- }
69
-
70
- foreach(array_keys($caps) as $cap)
71
- $role->add_cap($cap);
72
- }
73
-
74
- for($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
75
- {
76
- for($i = 0, $caps = array("read" => true, "level_0" => true); $i <= $n; $i++)
77
- $caps = array_merge($caps, array("access_s2member_level".$i => true));
78
- $caps = (!empty($bbp_participant_caps)) ? array_merge($caps, $bbp_participant_caps) : $caps;
79
-
80
- if(!($role = &get_role("s2member_level".$n)))
81
- {
82
- add_role("s2member_level".$n, "s2Member Level ".$n);
83
- $role = &get_role("s2member_level".$n);
84
- }
85
-
86
- foreach(array_keys($caps) as $cap)
87
- $role->add_cap($cap);
88
- }
89
-
90
- $full_access_roles = array("administrator", "editor", "author", "contributor");
91
-
92
- if(function_exists("bbp_get_caps_for_role") && !function_exists("bbp_get_dynamic_roles") /* bbPress < v2.2 integration. */)
93
- $full_access_roles = array_merge($full_access_roles, (array)bbp_get_moderator_role());
94
-
95
- foreach($full_access_roles as $role)
96
- {
97
- if(($role = &get_role($role)))
98
- for($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
99
- $role->add_cap("access_s2member_level".$n);
100
- }
101
- }
102
-
103
- do_action("ws_plugin__s2member_after_config_roles", get_defined_vars());
104
-
105
- return /* Return for uniformity. */;
106
- }
107
- /**
108
- * Adds support for bbPress v2.2+ dynamic roles.
109
- *
110
- * @package s2Member\Roles_Caps
111
- * @since 112512
112
- *
113
- * @attaches-to ``add_filter("bbp_get_caps_for_role");``
114
- *
115
- * @return array
116
- */
117
- public static function bbp_dynamic_role_caps($caps = FALSE, $role = FALSE)
118
- {
119
- if(function_exists("bbp_get_dynamic_roles") && $role !== bbp_get_blocked_role())
120
- if(!did_action("bbp_deactivation") && !did_action("bbp_uninstall"))
121
{
122
- $caps = array_merge($caps, array("read" => true, "level_0" => true));
123
- $caps = array_merge($caps, array("access_s2member_level0" => true));
124
-
125
- if(in_array($role, array(bbp_get_keymaster_role(), bbp_get_moderator_role()), TRUE))
126
{
127
- for($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
128
- $caps = array_merge($caps, array("access_s2member_level".$n => true));
129
}
130
}
131
- return /* Dynamic capabilities. */ $caps;
132
- }
133
- /**
134
- * Unlinks Roles/Capabilities.
135
- *
136
- * @package s2Member\Roles_Caps
137
- * @since 110524RC
138
- *
139
- * @return null
140
- */
141
- public static function unlink_roles()
142
- {
143
- do_action("ws_plugin__s2member_before_unlink_roles", get_defined_vars());
144
-
145
- if(!apply_filters("ws_plugin__s2member_lock_roles_caps", false))
146
- {
147
- if(($role = &get_role("subscriber")))
148
- $role->remove_cap("access_s2member_level0");
149
150
- for($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["max_levels"]; $n++)
151
- remove_role("s2member_level".$n);
152
153
- $full_access_roles = array("administrator", "editor", "author", "contributor");
154
155
- if(function_exists("bbp_get_caps_for_role") && !function_exists("bbp_get_dynamic_roles") /* bbPress < v2.2 integration. */)
156
- $full_access_roles = array_merge($full_access_roles, (array)bbp_get_moderator_role());
157
158
- foreach($full_access_roles as $role)
159
{
160
- if(($role = &get_role($role)))
161
- for($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["max_levels"]; $n++)
162
- $role->remove_cap("access_s2member_level".$n);
163
}
164
}
165
166
- do_action("ws_plugin__s2member_after_unlink_roles", get_defined_vars());
167
-
168
- return /* Return for uniformity. */;
169
- }
170
- /**
171
- * Updates Roles/Capabilities via AJAX.
172
- *
173
- * @package s2Member\Roles_Caps
174
- * @since 110524RC
175
- *
176
- * @attaches-to ``add_action("wp_ajax_ws_plugin__s2member_update_roles_via_ajax");``
177
- *
178
- * @return null Exits script execution after output for AJAX caller.
179
- */
180
- public static function update_roles_via_ajax()
181
- {
182
- do_action("ws_plugin__s2member_before_update_roles_via_ajax", get_defined_vars());
183
-
184
- status_header(200); // Send a 200 OK status header.
185
- header("Content-Type: text/plain; charset=UTF-8"); // Content-Type with UTF-8.
186
- while (@ob_end_clean ()); // Clean any existing output buffers.
187
-
188
- if(current_user_can("create_users")) // Check privileges. Ability to create Users?
189
-
190
- if(!empty($_POST["ws_plugin__s2member_update_roles_via_ajax"]))
191
- if(($nonce = $_POST["ws_plugin__s2member_update_roles_via_ajax"]))
192
- if(wp_verify_nonce($nonce, "ws-plugin--s2member-update-roles-via-ajax"))
193
-
194
- if(!apply_filters("ws_plugin__s2member_lock_roles_caps", false))
195
- {
196
- c_ws_plugin__s2member_roles_caps::config_roles();
197
- $success = true; // Roles updated.
198
- }
199
- else // Else flag as having been locked here.
200
- $locked = true;
201
-
202
- exit(apply_filters("ws_plugin__s2member_update_roles_via_ajax", // Also handle ``$locked`` here.
203
((isset($success) && $success) ? "1" : ((isset($locked) && $locked) ? "l" : "0")), get_defined_vars()));
204
- }
205
- }
206
}
207
?>
1
<?php
2
/**
3
+ * Roles/Capabilities.
4
+ *
5
+ * Copyright: © 2009-2011
6
+ * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
+ * (coded in the USA)
8
+ *
9
+ * Released under the terms of the GNU General Public License.
10
+ * You should have received a copy of the GNU General Public License,
11
+ * along with this software. In the main directory, see: /licensing/
12
+ * If not, see: {@link http://www.gnu.org/licenses/}.
13
+ *
14
+ * @package s2Member\Roles_Caps
15
+ * @since 110524RC
16
+ */
17
if(realpath(__FILE__) === realpath($_SERVER["SCRIPT_FILENAME"]))
18
exit("Do not access this file directly.");
19
20
if(!class_exists("c_ws_plugin__s2member_roles_caps"))
21
{
22
/**
23
+ * Roles/Capabilities.
24
+ *
25
+ * @package s2Member\Roles_Caps
26
+ * @since 110524RC
27
+ */
28
class c_ws_plugin__s2member_roles_caps
29
+ {
30
+ /**
31
+ * Configures Roles/Capabilities.
32
+ *
33
+ * @package s2Member\Roles_Caps
34
+ * @since 110524RC
35
+ *
36
+ * @return null
37
+ */
38
+ public static function config_roles()
39
+ {
40
+ do_action("ws_plugin__s2member_before_config_roles", get_defined_vars());
41
+
42
+ if(!apply_filters("ws_plugin__s2member_lock_roles_caps", FALSE))
43
+ {
44
+ c_ws_plugin__s2member_roles_caps::unlink_roles();
45
+
46
+ if(function_exists("bbp_get_dynamic_roles") /* bbPress v2.2+ integration. */)
47
+ {
48
+ foreach(bbp_get_caps_for_role(bbp_get_participant_role()) as $bbp_participant_cap => $bbp_participant_cap_is)
49
+ if($bbp_participant_cap_is /* Is this capability enabled? */)
50
+ $bbp_participant_caps[$bbp_participant_cap] = TRUE;
51
+ }
52
+ else if(function_exists("bbp_get_caps_for_role") /* bbPress < v2.2 integration. */)
53
+ {
54
+ foreach(bbp_get_caps_for_role(bbp_get_participant_role()) as $bbp_participant_cap)
55
+ $bbp_participant_caps[$bbp_participant_cap] = TRUE;
56
+ }
57
+ if(0 === 0) // Subscriber Role is required by s2Member.
58
{
59
+ $caps = array("read" => TRUE, "level_0" => TRUE);
60
+ $caps = array_merge($caps, array("access_s2member_level0" => TRUE));
61
+ $caps = (!empty($bbp_participant_caps)) ? array_merge($caps, $bbp_participant_caps) : $caps;
62
+
63
+ if(!($role = get_role("subscriber")))
64
{
65
+ add_role("subscriber", "Subscriber");
66
+ $role = get_role("subscriber");
67
}
68
+ foreach(array_keys($caps) as $cap)
69
+ $role->add_cap($cap);
70
}
71
+ for($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
72
+ {
73
+ for($i = 0, $caps = array("read" => TRUE, "level_0" => TRUE); $i <= $n; $i++)
74
+ $caps = array_merge($caps, array("access_s2member_level".$i => TRUE));
75
+ $caps = (!empty($bbp_participant_caps)) ? array_merge($caps, $bbp_participant_caps) : $caps;
76
77
+ if(!($role = get_role("s2member_level".$n)))
78
+ {
79
+ add_role("s2member_level".$n, "s2Member Level ".$n);
80
+ $role = get_role("s2member_level".$n);
81
+ }
82
+ foreach(array_keys($caps) as $cap)
83
+ $role->add_cap($cap);
84
+ }
85
+ $full_access_roles = array("administrator", "editor", "author", "contributor");
86
87
+ if(function_exists("bbp_get_caps_for_role") && !function_exists("bbp_get_dynamic_roles") /* bbPress < v2.2 integration. */)
88
+ $full_access_roles = array_merge($full_access_roles, (array)bbp_get_moderator_role());
89
90
+ foreach($full_access_roles as $role)
91
+ {
92
+ if(($role = get_role($role)))
93
+ for($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
94
+ $role->add_cap("access_s2member_level".$n);
95
+ }
96
+ }
97
+ do_action("ws_plugin__s2member_after_config_roles", get_defined_vars());
98
+ }
99
+
100
+ /**
101
+ * Adds support for bbPress v2.2+ dynamic roles.
102
+ *
103
+ * @package s2Member\Roles_Caps
104
+ * @since 112512
105
+ *
106
+ * @attaches-to ``add_filter("bbp_get_caps_for_role");``
107
+ *
108
+ * @return array
109
+ */
110
+ public static function bbp_dynamic_role_caps($caps = FALSE, $role = FALSE)
111
+ {
112
+ if(function_exists("bbp_get_dynamic_roles") && $role !== bbp_get_blocked_role())
113
+ if(!did_action("bbp_deactivation") && !did_action("bbp_uninstall"))
114
+ {
115
+ $caps = array_merge($caps, array("read" => TRUE, "level_0" => TRUE));
116
+ $caps = array_merge($caps, array("access_s2member_level0" => TRUE));
117
118
+ if(in_array($role, array(bbp_get_keymaster_role(), bbp_get_moderator_role()), TRUE))
119
{
120
+ for($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
121
+ $caps = array_merge($caps, array("access_s2member_level".$n => TRUE));
122
}
123
}
124
+ return $caps;
125
+ }
126
+
127
+ /**
128
+ * Unlinks Roles/Capabilities.
129
+ *
130
+ * @package s2Member\Roles_Caps
131
+ * @since 110524RC
132
+ *
133
+ * @return null
134
+ */
135
+ public static function unlink_roles()
136
+ {
137
+ do_action("ws_plugin__s2member_before_unlink_roles", get_defined_vars());
138
+
139
+ if(!apply_filters("ws_plugin__s2member_lock_roles_caps", FALSE))
140
+ {
141
+ if(($role = get_role("subscriber")))
142
+ $role->remove_cap("access_s2member_level0");
143
+
144
+ for($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["max_levels"]; $n++)
145
+ remove_role("s2member_level".$n);
146
+
147
+ $full_access_roles = array("administrator", "editor", "author", "contributor");
148
+
149
+ if(function_exists("bbp_get_caps_for_role") && !function_exists("bbp_get_dynamic_roles") /* bbPress < v2.2 integration. */)
150
+ $full_access_roles = array_merge($full_access_roles, (array)bbp_get_moderator_role());
151
+
152
+ foreach($full_access_roles as $role)
153
+ {
154
+ if(($role = get_role($role)))
155
+ for($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["max_levels"]; $n++)
156
+ $role->remove_cap("access_s2member_level".$n);
157
+ }
158
+ }
159
+ do_action("ws_plugin__s2member_after_unlink_roles", get_defined_vars());
160
+ }
161
+
162
+ /**
163
+ * Updates Roles/Capabilities via AJAX.
164
+ *
165
+ * @package s2Member\Roles_Caps
166
+ * @since 110524RC
167
+ *
168
+ * @attaches-to ``add_action("wp_ajax_ws_plugin__s2member_update_roles_via_ajax");``
169
+ *
170
+ * @return null Exits script execution after output for AJAX caller.
171
+ */
172
+ public static function update_roles_via_ajax()
173
+ {
174
+ do_action("ws_plugin__s2member_before_update_roles_via_ajax", get_defined_vars());
175
+
176
+ status_header(200); // Send a 200 OK status header.
177
+ header("Content-Type: text/plain; charset=UTF-8"); // Content-Type with UTF-8.
178
+ while(@ob_end_clean()) ; // Clean any existing output buffers.
179
+
180
+ if(current_user_can("create_users")) // Check privileges. Ability to create Users?
181
+
182
+ if(!empty($_POST["ws_plugin__s2member_update_roles_via_ajax"]))
183
+ if(($nonce = $_POST["ws_plugin__s2member_update_roles_via_ajax"]))
184
+ if(wp_verify_nonce($nonce, "ws-plugin--s2member-update-roles-via-ajax"))
185
+
186
+ if(!apply_filters("ws_plugin__s2member_lock_roles_caps", FALSE))
187
+ {
188
+ c_ws_plugin__s2member_roles_caps::config_roles();
189
+ $success = TRUE; // Roles updated.
190
+ }
191
+ else // Else flag as having been locked here.
192
+ $locked = TRUE;
193
194
+ exit(apply_filters("ws_plugin__s2member_update_roles_via_ajax", // Also handle ``$locked`` here.
195
((isset($success) && $success) ? "1" : ((isset($locked) && $locked) ? "l" : "0")), get_defined_vars()));
196
+ }
197
+ }
198
}
199
?>
includes/classes/users-list.inc.php CHANGED
@@ -210,7 +210,7 @@ if (!class_exists ("c_ws_plugin__s2member_users_list"))
210
$val = (!empty ($ccaps)) ? implode ("<br />", $ccaps) : "—";
211
}
212
else if($col === "s2member_auto_eot_time")
213
- $val = ($v = get_user_option ("s2member_auto_eot_time", $user_id)) ? esc_html ($v) : "—";
214
215
else if (preg_match ("/^s2member_custom_field_/", $col))
216
{
210
$val = (!empty ($ccaps)) ? implode ("<br />", $ccaps) : "—";
211
}
212
else if($col === "s2member_auto_eot_time")
213
+ $val = ($v = get_user_option ("s2member_auto_eot_time", $user_id)) ? date("D M jS, Y", (integer)$v) . "<br /><small>@ precisely " . date ("g:i a", (integer)$v)."</small>" : "—";
214
215
else if (preg_match ("/^s2member_custom_field_/", $col))
216
{
includes/codes.inc.php CHANGED
@@ -1,42 +1,42 @@
1
<?php
2
/**
3
- * Shortcodes for the s2Member plugin.
4
- *
5
- * Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
- * (coded in the USA)
8
- *
9
- * Released under the terms of the GNU General Public License.
10
- * You should have received a copy of the GNU General Public License,
11
- * along with this software. In the main directory, see: /licensing/
12
- * If not, see: {@link http://www.gnu.org/licenses/}.
13
- *
14
- * @package s2Member
15
- * @since 3.0
16
- */
17
- if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
exit ("Do not access this file directly.");
19
/*
20
Add WordPress Editor Shortcodes.
21
*/
22
- add_shortcode ("s2Key", "c_ws_plugin__s2member_sc_keys::sc_get_key");
23
- add_shortcode ("s2Get", "c_ws_plugin__s2member_sc_gets::sc_get_details");
24
- add_shortcode ("s2File", "c_ws_plugin__s2member_sc_files::sc_get_file");
25
- add_shortcode ("s2Stream", "c_ws_plugin__s2member_sc_files::sc_get_stream");
26
27
- add_shortcode ("s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
28
- add_shortcode ("_s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
29
- add_shortcode ("__s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
30
- add_shortcode ("___s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
31
- add_shortcode ("____s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
32
- add_shortcode ("_____s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
33
- add_shortcode ("______s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
34
- add_shortcode ("_______s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
35
- add_shortcode ("________s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
36
- add_shortcode ("_________s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
37
- add_shortcode ("__________s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
38
39
- add_shortcode ("s2Member-Profile", "c_ws_plugin__s2member_sc_profile::sc_profile");
40
- add_shortcode ("s2Member-PayPal-Button", "c_ws_plugin__s2member_sc_paypal_button::sc_paypal_button");
41
- add_shortcode ("s2Member-Security-Badge", "c_ws_plugin__s2member_sc_s_badge::sc_s_badge");
42
?>
1
<?php
2
/**
3
+ * Shortcodes for the s2Member plugin.
4
+ *
5
+ * Copyright: © 2009-2011
6
+ * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
+ * (coded in the USA)
8
+ *
9
+ * Released under the terms of the GNU General Public License.
10
+ * You should have received a copy of the GNU General Public License,
11
+ * along with this software. In the main directory, see: /licensing/
12
+ * If not, see: {@link http://www.gnu.org/licenses/}.
13
+ *
14
+ * @package s2Member
15
+ * @since 3.0
16
+ */
17
+ if(realpath(__FILE__) === realpath($_SERVER["SCRIPT_FILENAME"]))
18
exit ("Do not access this file directly.");
19
/*
20
Add WordPress Editor Shortcodes.
21
*/
22
+ add_shortcode("s2Key", "c_ws_plugin__s2member_sc_keys::sc_get_key");
23
+ add_shortcode("s2Get", "c_ws_plugin__s2member_sc_gets::sc_get_details");
24
+ add_shortcode("s2File", "c_ws_plugin__s2member_sc_files::sc_get_file");
25
+ add_shortcode("s2Stream", "c_ws_plugin__s2member_sc_files::sc_get_stream");
26
27
+ add_shortcode("s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
28
+ add_shortcode("_s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
29
+ add_shortcode("__s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
30
+ add_shortcode("___s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
31
+ add_shortcode("____s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
32
+ add_shortcode("_____s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
33
+ add_shortcode("______s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
34
+ add_shortcode("_______s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
35
+ add_shortcode("________s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
36
+ add_shortcode("_________s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
37
+ add_shortcode("__________s2If", "c_ws_plugin__s2member_sc_if_conds::sc_if_conditionals");
38
39
+ add_shortcode("s2Member-Profile", "c_ws_plugin__s2member_sc_profile::sc_profile");
40
+ add_shortcode("s2Member-PayPal-Button", "c_ws_plugin__s2member_sc_paypal_button::sc_paypal_button");
41
+ add_shortcode("s2Member-Security-Badge", "c_ws_plugin__s2member_sc_s_badge::sc_s_badge");
42
?>
includes/hooks.inc.php CHANGED
@@ -181,6 +181,8 @@ add_filter("bbp_get_caps_for_role", "c_ws_plugin__s2member_roles_caps::bbp_dynam
181
add_action("bbp_activation", "c_ws_plugin__s2member_roles_caps::config_roles", 11);
182
183
add_action("http_api_debug", "c_ws_plugin__s2member_utils_logs::http_api_debug", 1000, 5);
184
/*
185
Register the activation | de-activation routines.
186
*/
181
add_action("bbp_activation", "c_ws_plugin__s2member_roles_caps::config_roles", 11);
182
183
add_action("http_api_debug", "c_ws_plugin__s2member_utils_logs::http_api_debug", 1000, 5);
184
+
185
+ add_action("plugins_loaded", "c_ws_plugin__s2member_mo_page::back_compat_mop_vars", -(PHP_INT_MAX - 10));
186
/*
187
Register the activation | de-activation routines.
188
*/
includes/menu-pages/code-samples/api-mop-vars-e.x-php CHANGED
@@ -1,60 +1,7 @@
1
<?php
2
- // ---------------------------------------------------------------
3
4
- $_g = stripslashes_deep ($_GET);
5
-
6
- // ------------------------------------------------------------------------------------
7
-
8
- if (isset ($_g["_s2member_seeking"]["type"]) /* One of: page|post|catg|ptag|file|ruri */ )
9
- echo 'You were trying to access a protected: ' . esc_html ($_g["_s2member_seeking"]["type"]) . '.';
10
-
11
- // ---------------------------------------------------------------
12
-
13
- if (isset ($_g["_s2member_seeking"]["page"]))
14
- echo 'You were trying to access Page ID #' . esc_html ($_g["_s2member_seeking"]["page"]) . '.';
15
-
16
- else if (isset ($_g["_s2member_seeking"]["post"]))
17
- echo 'You were trying to access Post ID #' . esc_html ($_g["_s2member_seeking"]["post"]) . '.';
18
-
19
- else if (isset ($_g["_s2member_seeking"]["catg"]))
20
- echo 'You were trying to access Category ID #' . esc_html ($_g["_s2member_seeking"]["catg"]) . '.';
21
-
22
- else if (isset ($_g["_s2member_seeking"]["ptag"]))
23
- echo 'You were trying to access the Tag ID #' . esc_html ($_g["_s2member_seeking"]["ptag"]) . '.';
24
-
25
- else if (isset ($_g["_s2member_seeking"]["file"]))
26
- echo 'You were trying to access the File: ' . esc_html ($_g["_s2member_seeking"]["file"]) . '.';
27
-
28
- else if (isset ($_g["_s2member_seeking"]["ruri"]) /* Full URI they were trying to access. */)
29
- echo 'You were trying to access URI: ' . esc_html (base64_decode ($_g["_s2member_seeking"]["ruri"])) . '.';
30
- // See also: <http://codex.wordpress.org/Function_Reference/site_url>.
31
- // See also: <http://php.net/manual/en/function.base64-decode.php>.
32
-
33
- // ---------------------------------------------------------------
34
-
35
- if (isset ($_g["_s2member_seeking"]["_uri"]) /* Full URI they were trying to access. */ )
36
- echo 'You were trying to access URL: ' . esc_html (site_url(base64_decode($_g["_s2member_seeking"]["_uri"]))) . '.';
37
- // See also: <http://codex.wordpress.org/Function_Reference/site_url>.
38
- // See also: <http://php.net/manual/en/function.base64-decode.php>.
39
-
40
- // ------------------------------------------------------------------------------------
41
-
42
- if (isset ($_g["_s2member_req"]["type"]) /* One of: level|ccap|sp */)
43
- echo 'You were trying to access content that requires: ' . esc_html ($_g["_s2member_req"]["type"]) . '.';
44
-
45
- // ---------------------------------------------------------------
46
-
47
- if (isset ($_g["_s2member_req"]["level"]))
48
- echo 'You must be a Member at Level #' . esc_html ($_g["_s2member_req"]["level"]) . ' or higher.';
49
-
50
- else if (isset ($_g["_s2member_req"]["ccap"]))
51
- echo 'You must be a Member with Custom Capability: ' . esc_html ($_g["_s2member_req"]["ccap"]) . '.';
52
-
53
- else if (isset ($_g["_s2member_req"]["sp"]))
54
- echo 'You must purchase Specific Post/Page ID #' . esc_html ($_g["_s2member_req"]["sp"]) . '.';
55
-
56
- // ------------------------------------------------------------------------------------
57
-
58
- if (isset ($_g["_s2member_res"]["type"]) /* One of: post|page|catg|ptag|file|ruri|ccap|sp|sys */)
59
- echo 'You were trying to access content protected via s2Member: ' . esc_html ($_g["_s2member_res"]["type"]) . ' restrictions.';
60
- ?>
1
<?php
2
+ if(!empty($_REQUEST["_s2member_vars"]))
3
+ @list($restriction_type, $requirement_type, $requirement_type_value, $seeking_type, $seeking_type_value, $seeking_uri)
4
+ = explode(".", stripslashes((string)$_REQUEST["_s2member_vars"]));
5
6
+ if (!empty($seeking_type) /* One of: page|post|catg|ptag|file|ruri */ )
7
+ echo 'You were trying to access a protected: ' . esc_html($seeking_type) . '.';
includes/menu-pages/code-samples/api-mop-vars-o.x-php CHANGED
@@ -1,34 +1,59 @@
1
-----------------------------------------------------------------------------------------------------------
2
- These example redirection links include all possible MOP Variable variations in the query string.
3
-----------------------------------------------------------------------------------------------------------
4
5
- .../membership-options-page/?s2member_seeking=page-587&s2member_level_req=1
6
- .../membership-options-page/?s2member_seeking=post-545&s2member_level_req=2
7
- .../membership-options-page/?s2member_seeking=catg-698&s2member_level_req=4
8
- .../membership-options-page/?s2member_seeking=ptag-447&s2member_level_req=3
9
- .../membership-options-page/?s2member_seeking=page-887&s2member_ccap_req=music
10
- .../membership-options-page/?s2member_seeking=post-871&s2member_ccap_req=videos
11
- .../membership-options-page/?s2member_seeking=post-369&s2member_sp_req=369
12
- .../membership-options-page/?s2member_seeking=bbpress&s2member_level_req=1
13
- .../membership-options-page/?s2member_seeking=ruri-aHR0cDovL3d3dy5leGFtcGxlLmNvbS8&s2member_level_req=1
14
- .../membership-options-page/?s2member_seeking=file-example.zip&s2member_level_req=1
15
16
-----------------------------------------------------------------------------------------------------------
17
18
Here is a breakdown on each of these Variables:
19
20
- * `s2member_seeking` = [post|page|catg|ptag]-[ID number] (Post ID, Page ID, Category ID, Tag ID)
21
- Or: `s2member_seeking` = ruri-[base64 encoded URI] (only applies w/ Membership URI Restrictions)
22
- Or: `s2member_seeking` = file-[protected file name] (only applies w/ Download Restrictions)
23
- Or: `s2member_seeking` = bbpress (only applies when the s2Member -› bbPress Bridge is installed)
24
- * `s2member_level_req` = a Membership Level # required for access (only applies to Membership Level Access)
25
- * `s2member_ccap_req` = a Custom Capability required for access (only applies to Custom Capability Restrictions)
26
- * `s2member_sp_req` = a Specific Post/Page ID required (only applies to Specific Post/Page Access Restrictions)
27
28
- `s2member_seeking` is always passed in; it is never excluded.
29
- `s2member_level_req`, `s2member_ccap_req`, `s2member_sp_req` are mutually exclusive.
30
- Only ONE of these three Variables will be passed in combination with `s2member_seeking`.
31
32
-----------------------------------------------------------------------------------------------------------
33
34
- * These old MOP Vars are deprecated (they will NOT be available in future versions of s2Member).
1
+ NOTE: While these old variables no longer appear in the URL,
2
+ s2Member will create the following variables (internally) for backward compatibility
3
+ with older versions of the software.
4
+
5
-----------------------------------------------------------------------------------------------------------
6
+ Example redirection links, including many of the possible MOP Variable variations.
7
-----------------------------------------------------------------------------------------------------------
8
9
+ .../membership-options-page/?_s2member_seeking[post]=369&_s2member_req[sp]=369
10
+ .../membership-options-page/?_s2member_seeking[page]=559&_s2member_req[sp]=559
11
+ .../membership-options-page/?_s2member_seeking[page]=587&_s2member_req[level]=1
12
+ .../membership-options-page/?_s2member_seeking[post]=545&_s2member_req[level]=2
13
+ .../membership-options-page/?_s2member_seeking[catg]=698&_s2member_req[level]=4
14
+ .../membership-options-page/?_s2member_seeking[ptag]=447&_s2member_req[level]=3
15
+ .../membership-options-page/?_s2member_seeking[page]=887&_s2member_req[ccap]=music
16
+ .../membership-options-page/?_s2member_seeking[post]=871&_s2member_req[ccap]=videos
17
+ .../membership-options-page/?_s2member_seeking[file]=example.zip&_s2member_req[level]=1
18
+ .../membership-options-page/?_s2member_seeking[ruri]=aHR0cDov...&_s2member_req[level]=1
19
20
-----------------------------------------------------------------------------------------------------------
21
22
Here is a breakdown on each of these Variables:
23
24
+ * `_s2member_seeking[post|page|catg|ptag|file|ruri]` = (Post ID, Page ID, Category ID, Tag ID, File, URI)
25
+ Tip: `_s2member_seeking[file]` = (File path, relative to /s2member-files/, or your Amazon® S3 Bucket)
26
+ Tip: `_s2member_seeking[ruri]` = (A base 64 encoded URI; only applies w/ Membership URI Restrictions)
27
+ Tip: These array elements are mutually exclusive: [post|page|catg|ptag|file|ruri].
28
+ Only ONE of these array elements (i.e. Content Types) will be specified.
29
+
30
+ * `_s2member_req[level]` = a Membership Level # required for access (only applies to Membership Level Access)
31
+ * `_s2member_req[ccap]` = a Custom Capability required for access (only applies to Custom Capability Restrictions)
32
+ * `_s2member_req[sp]` = a Specific Post/Page ID required (only applies to Specific Post/Page Access Restrictions)
33
+ Tip: `_s2member_req[level|ccap|sp]` are mutually exclusive Requirement Types.
34
+ Only ONE of these three elements will be passed in combination with:
35
+ `_s2member_seeking[post|page|catg|ptag|file|ruri]`.
36
+
37
+ -----------------------------------------------------------------------------------------------------------
38
+
39
+ Additional Variables that might be useful to developers:
40
+
41
+ * `_s2member_seeking[_uri]` = (A base 64 encoded URI; the URI they were originally seeking)
42
+ Tip: this is ALWAYS passed through, regardless of which Content Type was protected.
43
+
44
+ * `_s2member_seeking[type]` = (A string. One of: post|page|catg|ptag|file|ruri)
45
+ Tip: this is ALWAYS passed through, regardless of which Content Type was protected.
46
+
47
+ * `_s2member_req[type]` = (A string. One of: level|ccap|sp)
48
+ Tip: this Requirement Type Variable is ALWAYS passed through.
49
50
+ * `_s2member_res[type]` = (A string. One of: post|page|catg|ptag|file|ruri|ccap|sp|sys)
51
+ Tip: Actual Restriction Type that's preventing access; may differ from `_s2member_seeking[type]`.
52
+ Tip: Restriction Type `sys` Systematic (i.e. something s2Member protects automatically)
53
+ Tip: Restriction Type `ccap` represents Custom Capability Restrictions by s2Member.
54
+ Tip: Restriction Type `sp` represents Specific Post/Page Access Restrictions.
55
+ Tip: this Restriction Type Variable is ALWAYS passed through.
56
57
-----------------------------------------------------------------------------------------------------------
58
59
+ * The use of MOP Vars is 100% completely optional (for advanced site owners).
includes/menu-pages/code-samples/api-mop-vars-ro.x-php ADDED
@@ -0,0 +1,38 @@
1
+ NOTE: While these old variables no longer appear in the URL,
2
+ s2Member will create the following variables (internally) for backward compatibility
3
+ with older versions of the software.
4
+
5
+ -----------------------------------------------------------------------------------------------------------
6
+ These example redirection links include all possible MOP Variable variations in the query string.
7
+ -----------------------------------------------------------------------------------------------------------
8
+
9
+ .../membership-options-page/?s2member_seeking=page-587&s2member_level_req=1
10
+ .../membership-options-page/?s2member_seeking=post-545&s2member_level_req=2
11
+ .../membership-options-page/?s2member_seeking=catg-698&s2member_level_req=4
12
+ .../membership-options-page/?s2member_seeking=ptag-447&s2member_level_req=3
13
+ .../membership-options-page/?s2member_seeking=page-887&s2member_ccap_req=music
14
+ .../membership-options-page/?s2member_seeking=post-871&s2member_ccap_req=videos
15
+ .../membership-options-page/?s2member_seeking=post-369&s2member_sp_req=369
16
+ .../membership-options-page/?s2member_seeking=bbpress&s2member_level_req=1
17
+ .../membership-options-page/?s2member_seeking=ruri-aHR0cDovL3d3dy5leGFtcGxlLmNvbS8&s2member_level_req=1
18
+ .../membership-options-page/?s2member_seeking=file-example.zip&s2member_level_req=1
19
+
20
+ -----------------------------------------------------------------------------------------------------------
21
+
22
+ Here is a breakdown on each of these Variables:
23
+
24
+ * `s2member_seeking` = [post|page|catg|ptag]-[ID number] (Post ID, Page ID, Category ID, Tag ID)
25
+ Or: `s2member_seeking` = ruri-[base64 encoded URI] (only applies w/ Membership URI Restrictions)
26
+ Or: `s2member_seeking` = file-[protected file name] (only applies w/ Download Restrictions)
27
+ Or: `s2member_seeking` = bbpress (only applies when the s2Member -› bbPress Bridge is installed)
28
+ * `s2member_level_req` = a Membership Level # required for access (only applies to Membership Level Access)
29
+ * `s2member_ccap_req` = a Custom Capability required for access (only applies to Custom Capability Restrictions)
30
+ * `s2member_sp_req` = a Specific Post/Page ID required (only applies to Specific Post/Page Access Restrictions)
31
+
32
+ `s2member_seeking` is always passed in; it is never excluded.
33
+ `s2member_level_req`, `s2member_ccap_req`, `s2member_sp_req` are mutually exclusive.
34
+ Only ONE of these three Variables will be passed in combination with `s2member_seeking`.
35
+
36
+ -----------------------------------------------------------------------------------------------------------
37
+
38
+ * These old MOP Vars are deprecated (they will NOT be available in future versions of s2Member).
includes/menu-pages/code-samples/api-mop-vars.x-php CHANGED
@@ -1,54 +1,55 @@
1
-----------------------------------------------------------------------------------------------------------
2
- Example redirection links, including many of the possible MOP Variable variations.
3
-----------------------------------------------------------------------------------------------------------
4
5
- .../membership-options-page/?_s2member_seeking[post]=369&_s2member_req[sp]=369
6
- .../membership-options-page/?_s2member_seeking[page]=559&_s2member_req[sp]=559
7
- .../membership-options-page/?_s2member_seeking[page]=587&_s2member_req[level]=1
8
- .../membership-options-page/?_s2member_seeking[post]=545&_s2member_req[level]=2
9
- .../membership-options-page/?_s2member_seeking[catg]=698&_s2member_req[level]=4
10
- .../membership-options-page/?_s2member_seeking[ptag]=447&_s2member_req[level]=3
11
- .../membership-options-page/?_s2member_seeking[page]=887&_s2member_req[ccap]=music
12
- .../membership-options-page/?_s2member_seeking[post]=871&_s2member_req[ccap]=videos
13
- .../membership-options-page/?_s2member_seeking[file]=example.zip&_s2member_req[level]=1
14
- .../membership-options-page/?_s2member_seeking[ruri]=aHR0cDov...&_s2member_req[level]=1
15
16
- -----------------------------------------------------------------------------------------------------------
17
-
18
- Here is a breakdown on each of these Variables:
19
-
20
- * `_s2member_seeking[post|page|catg|ptag|file|ruri]` = (Post ID, Page ID, Category ID, Tag ID, File, URI)
21
- Tip: `_s2member_seeking[file]` = (File path, relative to /s2member-files/, or your Amazon® S3 Bucket)
22
- Tip: `_s2member_seeking[ruri]` = (A base 64 encoded URI; only applies w/ Membership URI Restrictions)
23
- Tip: These array elements are mutually exclusive: [post|page|catg|ptag|file|ruri].
24
- Only ONE of these array elements (i.e. Content Types) will be specified.
25
-
26
- * `_s2member_req[level]` = a Membership Level # required for access (only applies to Membership Level Access)
27
- * `_s2member_req[ccap]` = a Custom Capability required for access (only applies to Custom Capability Restrictions)
28
- * `_s2member_req[sp]` = a Specific Post/Page ID required (only applies to Specific Post/Page Access Restrictions)
29
- Tip: `_s2member_req[level|ccap|sp]` are mutually exclusive Requirement Types.
30
- Only ONE of these three elements will be passed in combination with:
31
- `_s2member_seeking[post|page|catg|ptag|file|ruri]`.
32
33
-----------------------------------------------------------------------------------------------------------
34
35
- Additional Variables that might be useful to developers:
36
-
37
- * `_s2member_seeking[_uri]` = (A base 64 encoded URI; the URI they were originally seeking)
38
- Tip: this is ALWAYS passed through, regardless of which Content Type was protected.
39
-
40
- * `_s2member_seeking[type]` = (A string. One of: post|page|catg|ptag|file|ruri)
41
- Tip: this is ALWAYS passed through, regardless of which Content Type was protected.
42
-
43
- * `_s2member_req[type]` = (A string. One of: level|ccap|sp)
44
- Tip: this Requirement Type Variable is ALWAYS passed through.
45
-
46
- * `_s2member_res[type]` = (A string. One of: post|page|catg|ptag|file|ruri|ccap|sp|sys)
47
- Tip: Actual Restriction Type that's preventing access; may differ from `_s2member_seeking[type]`.
48
- Tip: Restriction Type `sys` Systematic (i.e. something s2Member protects automatically)
49
- Tip: Restriction Type `ccap` represents Custom Capability Restrictions by s2Member.
50
- Tip: Restriction Type `sp` represents Specific Post/Page Access Restrictions.
51
- Tip: this Restriction Type Variable is ALWAYS passed through.
52
53
-----------------------------------------------------------------------------------------------------------
54
1
-----------------------------------------------------------------------------------------------------------
2
+ Example redirection link with MOP Vars, in psuedo code:
3
-----------------------------------------------------------------------------------------------------------
4
5
+ s2Member's MOP Vars are now a dot (`.`) delimited list of six values.
6
7
+ .../membership-options-page/
8
+ ?_s2member_vars=[restriction type].[requirement type].[requirement type value].
9
+ [seeking type].[seeking type value].[seeking URI base 64 encoded]
10
11
-----------------------------------------------------------------------------------------------------------
12
13
+ Here is a breakdown that explains each of the values:
14
+
15
+ * `[restriction type]` = A string. One of: `post|page|catg|ptag|file|ruri|ccap|sp|sys`
16
+ - The s2Member Restriction Type you've configured which is preventing access.
17
+ - Restriction Type `post` indicates that Post Access Restrictions triggered the redirection.
18
+ - Restriction Type `page` indicates that Page Access Restrictions triggered the redirection.
19
+ - Restriction Type `catg` indicates that Category Access Restrictions triggered the redirection.
20
+ - Restriction Type `ptag` indicates that Post Tag Access Restrictions triggered the redirection.
21
+ - Restriction Type `file` indicates that File Access Restrictions triggered the redirection.
22
+ - Restriction Type `ruri` indicates that Request URI Access Restrictions triggered the redirection.
23
+ - Restriction Type `ccap` indicates Custom Capability Restrictions triggered the redirection.
24
+ - Restriction Type `sp` indicates Specific Post/Page Access Restrictions triggered the redirection.
25
+ - Restriction Type `sys` indicates Systematic (i.e. something s2Member protects automatically).
26
+
27
+ * `[requirement type]` = A string. One of: `level|ccap|sp`
28
+ - Requirement Type `level` indicates that a Membership Level is required for access.
29
+ - Requirement Type `ccap` indicates that a Custom Capability is required for access.
30
+ - Requirement Type `sp` indicates that a Specific Post/Page purchase is required for access.
31
+
32
+ * `[requirement type value]` = A string. The Level, CCAP or Specific Post/Page ID required for access.
33
+ - This value correlates with `[requirement type]` to supply more specific information.
34
+ For instance, if `[requirement type]` is `level`, `[requirement type value]`
35
+ might be `1` to indicate that Level `1` is required for access.
36
+ - In the case of a CCAP, this will be set to the CCAP required for access.
37
+ - In the case of a Specific Post/Page, this is set to the Post/Page ID in WordPress.
38
+
39
+ * `[seeking type]` = A string. One of: `post|page|catg|ptag|file|ruri`
40
+ - This identifies the type of content a visitor was attempting to access.
41
+ A Post (`post`), Page (`page`), Category (`catg`), Post Tag (`ptag`), File (`file`),
42
+ or a Request URI (`ruri`) to indicate something that doesn't fall into any other classification.
43
+
44
+ * `[seeking type value]` = A string. A Post ID, Page ID, Category ID, Post Tag ID, File, or Request URI.
45
+ - This correlates with `[seeking type]` to supply more specific information.
46
+ For instance, if `[seeking type]` is `post`, this might be `123` to indicate the
47
+ visitor was attempting to access Post ID `123` in WordPress.
48
+ - File paths are relative to `/s2member-files/`, or your Amazon® S3 Bucket.
49
+ - Request URIs are base 64 encoded. Use PHP's `base64_decode()` to decode the value.
50
+
51
+ * `[seeking URI; base 64 encoded]` = A string. Base 64 encoded URI that a visitor was attempting to access.
52
+ - Request URIs are base 64 encoded. Use PHP's `base64_decode()` to decode the value.
53
54
-----------------------------------------------------------------------------------------------------------
55
includes/menu-pages/gen-ops.inc.php CHANGED
@@ -1,1488 +1,1516 @@
1
<?php
2
/**
3
- * Menu page for the s2Member plugin (General Options page).
4
- *
5
- * Copyright: © 2009-2011
6
- * {@link http://www.websharks-inc.com/ WebSharks, Inc.}
7
- * (coded in the USA)
8
- *
9
- * Released under the terms of the GNU General Public License.
10
- * You should have received a copy of the GNU General Public License,
11
- * along with this software. In the main directory, see: /licensing/
12
- * If not, see: {@link http://www.gnu.org/licenses/}.
13
- *
14
- * @package s2Member\Menu_Pages
15
- * @since 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
{
22
/**
23
- * Menu page for the s2Member plugin (General Options page).
24
- *
25
- * @package s2Member\Menu_Pages
26
- * @since 110531
27
- */
28
class c_ws_plugin__s2member_menu_page_gen_ops
29
- {
30
- public function __construct ()
31
- {
32
- echo '<div class="wrap ws-menu-page">' . "\n";
33
-
34
- echo '<div class="ws-menu-page-toolbox">'."\n";
35
- c_ws_plugin__s2member_menu_pages_tb::display ();
36
- echo '</div>'."\n";
37
-
38
- echo '<h2>General Options</h2>' . "\n";
39
40
- echo '<table class="ws-menu-page-table">' . "\n";
41
- echo '<tbody class="ws-menu-page-table-tbody">' . "\n";
42
- echo '<tr class="ws-menu-page-table-tr">' . "\n";
43
- echo '<td class="ws-menu-page-table-l">' . "\n";
44
-
45
- echo '<form method="post" name="ws_plugin__s2member_options_form" id="ws-plugin--s2member-options-form">' . "\n";
46
- echo '<input type="hidden" name="ws_plugin__s2member_options_save" id="ws-plugin--s2member-options-save" value="' . esc_attr (wp_create_nonce ("ws-plugin--s2member-options-save")) . '" />' . "\n";
47
- echo '<input type="hidden" name="ws_plugin__s2member_configured" id="ws-plugin--s2member-configured" value="1" />' . "\n";
48
-
49
- do_action ("ws_plugin__s2member_during_gen_ops_page_before_left_sections", get_defined_vars ());
50
51
- if (apply_filters ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_deactivation", (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site () || is_super_admin ()), get_defined_vars ()))
52
- {
53
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_deactivation", get_defined_vars ());
54
55
- echo '<div class="ws-menu-page-group" title="Deactivation Safeguards"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["run_deactivation_routines"]) ? ' default-state="open"' : '') . '>' . "\n";
56
-
57
- echo '<div class="ws-menu-page-section ws-plugin--s2member-deactivation-section">' . "\n";
58
- echo '<h3>Deactivation Safeguards (highly recommended)</h3>' . "\n";
59
- echo (is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site () && is_super_admin ()) ? '<p><em class="ws-menu-page-hilite">On a Multisite Blog Farm, this panel is ONLY visible to YOU, as a Super Administrator. s2Member automatically Safeguards everything on a Multisite Blog Farm. However, as the Super Administrator, you may turn this off; on a per-Blog basis. For example, if you\'re going to de-activate s2Member on this particular Blog, you can turn OFF the Safeguards below, so that s2Member will completely erase itself.</em></p>' . "\n" : '<p>By default, s2Member will retain all of it\'s Roles, Capabilities, and your Configuration Options when/if you deactivate s2Member from the Plugins Menu in WordPress. However, if you would like for s2Member to erase itself completely, please choose: <code>No (upon deactivation, erase all data/options)</code>.</p>' . "\n";
60
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_deactivation", get_defined_vars ());
61
62
- echo '<table class="form-table">' . "\n";
63
- echo '<tbody>' . "\n";
64
- echo '<tr>' . "\n";
65
66
- echo '<th>' . "\n";
67
- echo '<label for="ws-plugin--s2member-run-deactivation-routines">' . "\n";
68
- echo 'Safeguard s2Member Data/Options?' . "\n";
69
- echo '</label>' . "\n";
70
- echo '</th>' . "\n";
71
72
- echo '</tr>' . "\n";
73
- echo '<tr>' . "\n";
74
-
75
- echo '<td>' . "\n";
76
- echo '<select name="ws_plugin__s2member_run_deactivation_routines" id="ws-plugin--s2member-run-deactivation-routines">' . "\n";
77
- echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["run_deactivation_routines"]) ? ' selected="selected"' : '') . '>Yes (safeguard all data/options)</option>' . "\n";
78
- echo '<option value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["run_deactivation_routines"]) ? ' selected="selected"' : '') . '>No (upon deactivation, erase all data/options)</option>' . "\n";
79
- echo '</select><br />' . "\n";
80
- echo 'Recommended setting: (<code>Yes, safeguard all data/options</code>)' . "\n";
81
- echo '</td>' . "\n";
82
-
83
- echo '</tr>' . "\n";
84
- echo '</tbody>' . "\n";
85
- echo '</table>' . "\n";
86
- echo '</div>' . "\n";
87
-
88
- echo '</div>' . "\n";
89
-
90
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_deactivation", get_defined_vars ());
91
- }
92
-
93
- if (apply_filters ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_security", true, get_defined_vars ()))
94
- {
95
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_security", get_defined_vars ());
96
-
97
- echo '<div class="ws-menu-page-group" title="Security Encryption Key">' . "\n";
98
-
99
- echo '<div class="ws-menu-page-section ws-plugin--s2member-security-section">' . "\n";
100
- echo '<img src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/images/large-icon.png" title="s2Member (a Membership management system for WordPress)" alt="" style="float:right; margin:0 0 0 25px; border:0;" />' . "\n";
101
- echo '<h3>Security Encryption Key (optional, for tighter security)</h3>' . "\n";
102
- echo '<p>Just like WordPress, s2Member is open-source software. Which is wonderful. However, this also makes it possible for anyone to grab a copy of the software, and try to learn their way around its security measures. In order to keep your installation of s2Member unique/secure, you should configure a Security Encryption Key. s2Member will use your Security Encryption Key to protect itself against hackers. It does this by encrypting all sensitive information with your Key. A Security Encryption Key is unique to your installation.</p>' . "\n";
103
- echo '<p>Once you configure this, you do NOT want to change it; not ever. In fact, it is a VERY good idea to keep this backed up in a safe place, just in case you need to move your site, or re-install s2Member in the future. Some of the sensitive data that s2Member stores, will be encrypted with this Key. If you change it, that data can no longer be read, even by s2Member itself. In other words, don\'t use s2Member for six months, then decide to change your Key. That would break your installation.</p>' . "\n";
104
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_security", get_defined_vars ());
105
-
106
- echo '<table class="form-table">' . "\n";
107
- echo '<tbody>' . "\n";
108
- echo '<tr>' . "\n";
109
-
110
- echo '<th>' . "\n";
111
- echo '<label for="ws-plugin--s2member-sec-encryption-key">' . "\n";
112
- echo 'Security Encryption Key (at least 60 chars)' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["sec_encryption_key"]) ? ' <a href="#" onclick="ws_plugin__s2member_enableSecurityKey(); return false;" title="(not recommended)">edit key</a>' : ' <a href="#" onclick="ws_plugin__s2member_generateSecurityKey(); return false;" title="Insert an auto-generated Key. (recommended)">auto-generate</a>') . "\n";
113
- echo '</label>' . "\n";
114
- echo '</th>' . "\n";
115
-
116
- echo '</tr>' . "\n";
117
- echo '<tr>' . "\n";
118
-
119
- echo '<td>' . "\n";
120
- 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";
121
- 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" : '';
122
- 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" : '';
123
- echo '</td>' . "\n";
124
-
125
- echo '</tr>' . "\n";
126
- echo '</tbody>' . "\n";
127
- echo '</table>' . "\n";
128
- echo '</div>' . "\n";
129
-
130
- echo '</div>' . "\n";
131
-
132
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_security", get_defined_vars ());
133
- }
134
-
135
- if (apply_filters ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_localhost_info", (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site () || is_super_admin ()), get_defined_vars ()))
136
- {
137
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_localhost_info", get_defined_vars ());
138
-
139
- echo '<div class="ws-menu-page-group" title="Localhost WAMP/MAMP Developers">' . "\n";
140
-
141
- echo '<div class="ws-menu-page-section ws-plugin--s2member-localhost-info-section">' . "\n";
142
- echo '<h3>Localhost WAMP/MAMP Installs (are you a developer?)</h3>' . "\n";
143
- echo '<p>If you\'re developing your site in a <code>localhost</code> environment, running something like WAMP/MAMP, or <a href="http://www.easyphp.org/" target="_blank" rel="external">EasyPHP</a>, please add this line to your <code>/wp-config.php</code> file: <code><span style="color:#0000BB;">define</span><span style="color:#007700;">(</span><span style="color:#DD0000;">"LOCALHOST"</span>, <span style="color:#0000BB;">true</span><span style="color:#007700;">);</span></code>.</p>' . "\n";
144
- echo '<p>This lets s2Member know definitively that your site is in a <code>localhost</code> environment. s2Member will adjust itself accordingly, maximizing functionality during your developement. s2Member can usually auto-detect this, but in cases where your <code>localhost</code> installation runs on something other than <code>127.0.0.1/localhost</code>, you need to tell s2Member definitively, by adding that line to your <code>/wp-config.php</code> file. For instance, s2Member needs to know when your server IP is the same as all User IPs.</p>' . "\n";
145
- echo '<p><em>Once your site goes live, please remove the line. If you\'re already on a live server connected to the web, please ignore this section.</em></p>' . "\n";
146
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_localhost_info", get_defined_vars ());
147
- echo '</div>' . "\n";
148
-
149
- echo '</div>' . "\n";
150
-
151
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_localhost_info", get_defined_vars ());
152
- }
153
-
154
- if (apply_filters ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_lazy_load", (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site () || is_super_admin ()), get_defined_vars ()))
155
- {
156
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_lazy_load", get_defined_vars ());
157
-
158
- echo '<div class="ws-menu-page-group" title="CSS/JS Lazy Loading">' . "\n";
159
-
160
- echo '<div class="ws-menu-page-section ws-plugin--s2member-lazy-load-section">' . "\n";
161
- echo '<h3>CSS/JS Lazy Loading (Client-Side Libraries)</h3>' . "\n";
162
- echo '<p>By default, s2Member will load it\'s CSS/JS libraries on every page of your site. However, you may wish to enable lazy-loading here (e.g. only load when absolutely necessary).</p>' . "\n";
163
- echo '<p><em><strong>Tip:</strong> Do you need s2Member\'s CSS/JS on every page? If not, you can turn lazy-loading on. If you need s2Member\'s CSS/JS on a given Post/Page, you can insert an HTML comment into the Post/Page content like this: <code>&lt;!--s2member--&gt;</code>. If a Post/Page contains the word <code>s2member</code> or an <code>[s2*</code> Shortcode, this will automatically trigger s2Member\'s lazy-load routine (no matter what you configure here). Thus, it\'s an easy way to force s2Member to load it\'s CSS/JS on specific Posts/Pages where you deem this necessary. There is also a WordPress filter available: <code>add_filter("ws_plugin__s2member_lazy_load_css_js", "__return_true");</code> for developers; this could be incorporated into more dynamic scenarios.</em></p>' . "\n";
164
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_lazy_load", get_defined_vars ());
165
-
166
- echo '<table class="form-table">' . "\n";
167
- echo '<tbody>' . "\n";
168
- echo '<tr>' . "\n";
169
-
170
- echo '<th>' . "\n";
171
- echo '<label for="ws-plugin--s2member-lazy-load-css-js">' . "\n";
172
- echo 'Lazy-Load s2Member\'s CSS/JS Libraries?' . "\n";
173
- echo '</label>' . "\n";
174
- echo '</th>' . "\n";
175
-
176
- echo '</tr>' . "\n";
177
- echo '<tr>' . "\n";
178
-
179
- echo '<td>' . "\n";
180
- echo '<select name="ws_plugin__s2member_lazy_load_css_js" id="ws-plugin--s2member-lazy-load-css-js">' . "\n";
181
- echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["lazy_load_css_js"]) ? ' selected="selected"' : '') . '>No (always load the CSS/JS libraries; e.g. on every page of the site)</option>' . "\n";
182
- echo '<option value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["lazy_load_css_js"]) ? ' selected="selected"' : '') . '>Yes (lazy-load CSS/JS libraries; e.g. load only when absolutely necessary)</option>' . "\n";
183
- echo '</select>' . "\n";
184
- echo '</td>' . "\n";
185
-
186
- echo '</tr>' . "\n";
187
- echo '</tbody>' . "\n";
188
- echo '</table>' . "\n";
189
- echo '</div>' . "\n";
190
-
191
- echo '</div>' . "\n";
192
-
193
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_lazy_load", get_defined_vars ());
194
- }
195
-
196
- if (apply_filters ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_s_badge_wp_footer_code", true, get_defined_vars ()))
197
- {
198
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_s_badge_wp_footer_code", get_defined_vars ());
199
-
200
- echo '<div class="ws-menu-page-group" title="s2Member Security Badge">' . "\n";
201
-
202
- echo '<div class="ws-menu-page-section ws-plugin--s2member-s-badge-wp-footer-code-section">' . "\n";
203
- echo '<h3>Security Badge &amp; Footer Configuration (optional)</h3>' . "\n";
204
- echo '<div class="ws-menu-page-right">' . c_ws_plugin__s2member_utilities::s_badge_gen ("1", true, true) . '</div>' . "\n";
205
- echo '<p>An s2Member Security Badge <em>(optional)</em>, can be used to express your site\'s concern for security; demonstrating to all Users/Members that your site <em>(and the s2Member software)</em>, takes security seriously. However, in order to qualify your site, you MUST generate a Security Encryption Key <em>(previous section)</em>, and then click "Save All Changes". Only then, will s2Member officially verify your installation <em>(verification occurs automatically)</em>.</p>' . "\n";
206
- echo '<p>Once you\'ve <a href="http://www.s2member.com/kb/security-badges/" target="_blank" rel="external">properly configured all security aspects of s2Member</a>, your s2Member Security Badge will be verified. To see the "verified" version of your Security Badge, you might need to refresh your browser after saving all changes <em>(i.e. after you create a Security Encryption Key)</em>. Also, s2Member will NOT "verify" your site if you turn off Unique IP Restrictions, Brute Force Login Protection, or if your <code>/wp-config.php</code> file lacks <a href="http://codex.wordpress.org/Editing_wp-config.php#Security_Keys" target="_blank" rel="external">Security Keys</a> <em>(each at least 60 chars in length)</em>. In addition, it\'s NOT possible for s2Member to verify your Security Badge, if your site is in a <code>localhost</code> environment; i.e. not connected to the web.</p>' . "\n";
207
- echo '<p><strong>How does s2Member know when my site is secure?</strong><br />If enabled below, an API call for "Security Badge Status", will allow web service connections to determine your status. Clicking <a href="' . esc_attr (site_url ("/?s2member_s_badge_status=1")) . '" target="_blank" rel="external">this link</a> will report <code>1</code> <em>(secure)</em>, <code>0</code> <em>(at risk)</em>, or <code>-</code> <em>(API disabled)</em>. Once all security considerations are satisfied, s2Member will report <code>1</code> <em>(secure)</em> for your installation. *Note, this simple API will NOT, and should not, report any other information. It will ONLY report the current status of your Security Badge, as determined by your installation of s2Member. When/if you install the s2Member Security Badge, s2Member will make a connection to your site "once per day", to test your status.</p>' . "\n";
208
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_s_badge_wp_footer_code", get_defined_vars ());
209
-
210
- echo '<table class="form-table">' . "\n";
211
- echo '<tbody>' . "\n";
212
- echo '<tr>' . "\n";
213
-
214
- echo '<th>' . "\n";
215
- echo '<label for="ws-plugin--s2member-s-badge-status-enabled">' . "\n";
216
- echo 'Enable Security Badge Status API?' . "\n";
217
- echo '</label>' . "\n";
218
- echo '</th>' . "\n";
219
-
220
- echo '</tr>' . "\n";
221
- echo '<tr>' . "\n";
222
-
223
- echo '<td>' . "\n";
224
- echo '<select name="ws_plugin__s2member_s_badge_status_enabled" id="ws-plugin--s2member-s-badge-status-enabled">' . "\n";
225
- echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["s_badge_status_enabled"]) ? ' selected="selected"' : '') . '>No (default, Badge Status API is disabled)</option>' . "\n";
226
- echo '<option value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["s_badge_status_enabled"]) ? ' selected="selected"' : '') . '>Yes (enable Badge Status API for verification)</option>' . "\n";
227
- echo '</select><br />' . "\n";
228
- echo 'This must be enabled if you want s2Member to verify your Security Badge.' . "\n";
229
- echo '</td>' . "\n";
230
-
231
- echo '</tr>' . "\n";
232
- echo '<tr>' . "\n";
233
-
234
- echo '<th>' . "\n";
235
- echo '<label for="ws-plugin--s2member-wp-footer-code">' . "\n";
236
- echo 'Customize WordPress Footer:<br />' . "\n";
237
- echo '<small>[ <a href="#" onclick="this.$code = jQuery(\'textarea#ws-plugin--s2member-wp-footer-code\'); this.$code.val(jQuery.trim(unescape(\'' . rawurlencode ('[s2Member-Security-Badge v="1" /]') . '\')+\'\n\'+this.$code.val())); return false;">Click HERE to insert your Security Badge</a> ],<br />or use Shortcode <code>[s2Member-Security-Badge v="1" /]</code> in a Post/Page/Widget.<br />The <code>v="1"</code> attribute is a Security Badge style/variation. Try variations <code>1|2|3</code>.</small>' . "\n";
238
- echo '</label>' . "\n";
239
- echo '</th>' . "\n";
240
-
241
- echo '</tr>' . "\n";
242
- echo '<tr>' . "\n";
243
-
244
- echo '<td>' . "\n";
245
- echo '<textarea name="ws_plugin__s2member_wp_footer_code" id="ws-plugin--s2member-wp-footer-code" rows="8" wrap="off" spellcheck="false" class="monospace">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["wp_footer_code"]) . '</textarea><br />' . "\n";
246
- echo 'Any valid XHTML / JavaScript' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? '' : ' (or even PHP)') . ' code will work just fine here.' . "\n";
247
- echo '</td>' . "\n";
248
-
249
- echo '</tr>' . "\n";
250
- echo '</tbody>' . "\n";
251
- echo '</table>' . "\n";
252
- echo '</div>' . "\n";
253
-
254
- echo '</div>' . "\n";
255
-
256
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_s_badge_wp_footer_code", get_defined_vars ());
257
- }
258
-
259
- if (apply_filters ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_email_config", true, get_defined_vars ()))
260
- {
261
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_email_config", get_defined_vars ());
262
-
263
- echo '<div class="ws-menu-page-group" title="Email Configuration">' . "\n";
264
-
265
- echo '<div class="ws-menu-page-section ws-plugin--s2member-email-section">' . "\n";
266
- echo '<h3 style="margin:0;">Email From: ' . esc_html ('"Name" <address>') . '</h3>' . "\n";
267
- echo '<p style="margin:0;">This is the name/address that will appear in outgoing email notifications sent by the s2Member plugin.</p>' . "\n";
268
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_email_from_name_config", get_defined_vars ());
269
-
270
- echo '<table class="form-table">' . "\n";
271
- echo '<tbody>' . "\n";
272
- echo '<tr>' . "\n";
273
-
274
- echo '<th>' . "\n";
275
- echo '<label for="ws-plugin--s2member-reg-email-from-name">' . "\n";
276
- echo 'Email From Name:' . "\n";
277
- echo '</label>' . "\n";
278
- echo '</th>' . "\n";
279
-
280
- echo '</tr>' . "\n";
281
- echo '<tr>' . "\n";
282
-
283
- echo '<td>' . "\n";
284
- 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";
285
- echo 'We recommend that you use the name of your site here.' . "\n";
286
- echo '</td>' . "\n";
287
-
288
- echo '</tr>' . "\n";
289
- echo '<tr>' . "\n";
290
-
291
- echo '<th>' . "\n";
292
- echo '<label for="ws-plugin--s2member-reg-email-from-email">' . "\n";
293
- echo 'Email From Address:' . "\n";
294
- echo '</label>' . "\n";
295
- echo '</th>' . "\n";
296
-
297
- echo '</tr>' . "\n";
298
- echo '<tr>' . "\n";
299
-
300
- echo '<td>' . "\n";
301
- 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";
302
- 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";
303
- echo '</td>' . "\n";
304
-
305
- echo '</tr>' . "\n";
306
- echo '<tr>' . "\n";
307
-
308
- echo '<th>' . "\n";
309
- echo '<label for="ws-plugin--s2member-reg-email-support-link">' . "\n";
310
- echo 'Email Support/Contact Link:' . "\n";
311
- echo '</label>' . "\n";
312
- echo '</th>' . "\n";
313
-
314
- echo '</tr>' . "\n";
315
- echo '<tr>' . "\n";
316
-
317
- echo '<td>' . "\n";
318
- 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";
319
- echo 'Ex: <code>mailto:support@your-domain.com</code> (<em>mailto link</em>).<br />' . "\n";
320
- echo 'Or: <code>' . esc_html (site_url ("/contact-us/")) . '</code>.' . "\n";
321
- echo '</td>' . "\n";
322
-
323
- echo '</tr>' . "\n";
324
- echo '</tbody>' . "\n";
325
- echo '</table>' . "\n";
326
-
327
- echo '<div class="ws-menu-page-hr"></div>' . "\n";
328
-
329
- echo '<h3 style="margin:0;">New User Email Configuration</h3>' . "\n";
330
- echo '<input type="hidden" id="ws-plugin--s2member-pluggables-wp-new-user-notification" value="' . esc_attr ((empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["pluggables"]["wp_new_user_notification"])) ? '0' : '1') . '" />' . "\n";
331
- echo (empty ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["pluggables"]["wp_new_user_notification"])) ? '<p class="ws-menu-page-error" style="margin:0;"><em><strong>Conflict warning:</strong> You have another theme or plugin installed that is preventing s2Member from controlling this aspect of your installation. When the pluggable function <code><a href="http://codex.wordpress.org/Function_Reference/wp_new_user_notification" target="_blank" rel="external">wp_new_user_notification()</a></code> is handled by another plugin, it\'s not possible for s2Member to allow customization of New User Emails. This is NOT a major issue. In fact, in some cases, it might be desirable. That being said, if you DO want to use s2Member\'s customization of New User Emails, you will need to deactivate one plugin at a time until this conflict warning goes away.</em></p>' . "\n" : '';
332
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_new_user_emails", get_defined_vars ());
333
-
334
- echo '<table class="form-table">' . "\n";
335
- echo '<tbody>' . "\n";
336
- echo '<tr>' . "\n";
337
-
338
- echo '<td>' . "\n";
339
- echo '<select name="ws_plugin__s2member_new_user_emails_enabled" id="ws-plugin--s2member-new-user-emails-enabled">' . "\n";
340
- echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_emails_enabled"]) ? ' selected="selected"' : '') . '>No (default, use WordPress defaults)</option>' . "\n";
341
- echo '<option value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_emails_enabled"]) ? ' selected="selected"' : '') . '>Yes (customize New User Emails with s2Member)</option>' . "\n";
342
- echo '</select>' . "\n";
343
- echo '</td>' . "\n";
344
-
345
- echo '</tr>' . "\n";
346
- echo '</tbody>' . "\n";
347
- echo '</table>' . "\n";
348
-
349
- echo '<div id="ws-plugin--s2member-new-user-emails">' . "\n";
350
-
351
- echo '<div class="ws-menu-page-hr"></div>' . "\n";
352
-
353
- echo '<h3 style="margin:0;">New User Email Message (<a href="#" onclick="jQuery(\'div#ws-plugin--s2member-new-user-email-details\').toggle(); return false;" class="ws-dotted-link">click to customize</a>)</h3>' . "\n";
354
- echo '<p style="margin:0;">This email is sent to all new Users/Members. It should always contain their Username/Password. In addition to this email, s2Member will also send new paying Customers a Signup Confirmation Email, which you can customize from your Dashboard, under: <code>s2Member -› PayPal Options</code>. You may wish to customize these emails further, by providing details that are specifically geared to your site.</p>' . "\n";
355
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_new_user_email", get_defined_vars ());
356
-
357
- echo '<div id="ws-plugin--s2member-new-user-email-details" style="display:none;">' . "\n";
358
- echo (c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '<p><em><strong>BuddyPress:</strong> please note that BuddyPress does NOT send this email to Users that register through the BuddyPress registration system. This is because BuddyPress sends each User an activation link; eliminating the need for this email all together. However, you CAN still customize s2Member\'s separate email to paying Members. See: <code>s2Member -› PayPal Options -› Signup Confirmation Email</code>.</em></p>' . "\n" : '';
359
- echo '<table class="form-table">' . "\n";
360
- echo '<tbody>' . "\n";
361
- echo '<tr>' . "\n";
362
-
363
- echo '<th>' . "\n";
364
- echo '<label for="ws-plugin--s2member-new-user-email-subject">' . "\n";
365
- echo 'New User Email Subject:' . "\n";
366
- echo '</label>' . "\n";
367
- echo '</th>' . "\n";
368
-
369
- echo '</tr>' . "\n";
370
- echo '<tr>' . "\n";
371
-
372
- echo '<td>' . "\n";
373
- 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";
374
- echo 'Subject Line used in the email sent to new Users/Members.' . "\n";
375
- echo '</td>' . "\n";
376
-
377
- echo '</tr>' . "\n";
378
- echo '<tr>' . "\n";
379
-
380
- echo '<th>' . "\n";
381
- echo '<label for="ws-plugin--s2member-new-user-email-message">' . "\n";
382
- echo 'New User Email Message:' . "\n";
383
- echo '</label>' . "\n";
384
- echo '</th>' . "\n";
385
-
386
- echo '</tr>' . "\n";
387
- echo '<tr>' . "\n";
388
-
389
- echo '<td>' . "\n";
390
- echo '<textarea name="ws_plugin__s2member_new_user_email_message" id="ws-plugin--s2member-new-user-email-message" rows="10">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_email_message"]) . '</textarea><br />' . "\n";
391
- echo 'Message Body used in the email sent to new Users/Members.<br /><br />' . "\n";
392
- echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
393
- echo '<ul>' . "\n";
394
- echo '<li><code>%%role%%</code> = The Role ID <code>(subscriber, s2member_level[0-9]+, administrator, editor, author, contributor)</code>.</li>' . "\n";
395
- echo '<li><code>%%label%%</code> = The Role ID Label <code>(Subscriber, s2Member Level 1, s2Member Level 2; or your own custom Labels — if configured)</code>.</li>' . "\n";
396
- echo '<li><code>%%level%%</code> = The Level number <code>(0, 1, 2, 3, 4)</code>. (<em>deprecated, no longer recommended; use <code>%%role%%</code></em>)</li>' . "\n";
397
- echo '<li><code>%%ccaps%%</code> = Custom Capabilities. Ex: <code>music,videos,free_gift</code> (<em>in comma-delimited format</em>).</li>' . "\n";
398
- echo '<li><code>%%user_first_name%%</code> = The First Name of the Member who registered their Username.</li>' . "\n";
399
- echo '<li><code>%%user_last_name%%</code> = The Last Name of the Member who registered their Username.</li>' . "\n";
400
- echo '<li><code>%%user_full_name%%</code> = The Full Name (First &amp; Last) of the Member who registered their Username.</li>' . "\n";
401
- echo '<li><code>%%user_email%%</code> = The Email Address of the Member who registered their Username.</li>' . "\n";
402
- echo '<li><code>%%user_login%%</code> = The Username the Member selected during registration.</li>' . "\n";
403
- echo '<li><code>%%user_pass%%</code> = The Password selected or generated during registration.</li>' . "\n";
404
- echo '<li><code>%%user_ip%%</code> = The User\'s IP Address, detected via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
405
- echo '<li><code>%%user_id%%</code> = A unique WordPress User ID generated during registration.</li>' . "\n";
406
- echo '<li><code>%%wp_login_url%%</code> = The full URL where Users can get logged into your site.</li>' . "\n";
407
- echo '</ul>' . "\n";
408
-
409
- echo '<strong>Custom Registration/Profile Fields are also supported in this email:</strong>' . "\n";
410
- echo '<ul>' . "\n";
411
- echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
412
- echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
413
- echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
414
- echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -› General Options -› Registration/Profile Fields</em>.</li>' . "\n";
415
- echo '</ul>' . "\n";
416
-
417
- echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
418
- echo '<ul>' . "\n";
419
- echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
420
- echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
421
- echo '</ul>' . "\n";
422
- echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
423
- echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
424
- echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
425
-
426
- echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ?
427
- '<div class="ws-menu-page-hr"></div>' . "\n".
428
- '<p style="margin:0;"><strong>PHP Code:</strong> It is also possible to use PHP tags — optional (for developers). If you use PHP tags, please run a test email with <code>&lt;?php print_r(get_defined_vars()); ?&gt;</code>. This will give you a full list of all PHP variables available to you in this email. The <code>$user</code> variable is the most important one. It\'s an instance of the <a href="http://codex.wordpress.org/Class_Reference/WP_User" target="_blank" rel="external"><code>WP_User</code></a> class (e.g. <code>$user->ID</code>, <code>$user->has_cap()</code>, etc). Please note that all Replacement Codes will be parsed first, and then any PHP tags that you\'ve included. Also, please remember that emails are sent in plain text format.</p>'."\n"
429
- : '';
430
- echo '</td>' . "\n";
431
-
432
- echo '</tr>' . "\n";
433
- echo '</tbody>' . "\n";
434
- echo '</table>' . "\n";
435
- echo '</div>' . "\n";
436
-
437
- echo '<div class="ws-menu-page-hr"></div>' . "\n";
438
-
439
- echo '<h3 style="margin:0;">Administrative: New User Notification (<a href="#" onclick="jQuery(\'div#ws-plugin--s2member-new-user-admin-email-details\').toggle(); return false;" class="ws-dotted-link">click to customize</a>)</h3>' . "\n";
440
- echo '<p style="margin:0;">This email notification is sent to you, each time a new User/Member registers.</p>' . "\n";
441
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_new_user_admin_email", get_defined_vars ());
442
-
443
- echo '<div id="ws-plugin--s2member-new-user-admin-email-details" style="display:none;">' . "\n";
444
- echo '<table class="form-table">' . "\n";
445
- echo '<tbody>' . "\n";
446
- echo '<tr>' . "\n";
447
-
448
- echo '<th>' . "\n";
449
- echo '<label for="ws-plugin--s2member-new-user-admin-email-recipients">' . "\n";
450
- echo 'New User Notification Recipients:' . "\n";
451
- echo '</label>' . "\n";
452
- echo '</th>' . "\n";
453
-
454
- echo '</tr>' . "\n";
455
- echo '<tr>' . "\n";
456
-
457
- echo '<td>' . "\n";
458
- 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";
459
- echo 'This is a semicolon ( ; ) delimited list of Recipients. Here is an example:<br />' . "\n";
460
- echo '<code>"Name" &lt;user@example.com&gt;; admin@example.com; "Webmaster" &lt;webmaster@example.com&gt;</code>' . "\n";
461
- echo '</td>' . "\n";
462
-
463
- echo '</tr>' . "\n";
464
- echo '<tr>' . "\n";
465
-
466
- echo '<th>' . "\n";
467
- echo '<label for="ws-plugin--s2member-new-user-admin-email-subject">' . "\n";
468
- echo 'New User Notification Subject:' . "\n";
469
- echo '</label>' . "\n";
470
- echo '</th>' . "\n";
471
-
472
- echo '</tr>' . "\n";
473
- echo '<tr>' . "\n";
474
-
475
- echo '<td>' . "\n";
476
- 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";
477
- echo 'Subject Line used in the email notification sent to Administrator.' . "\n";
478
- echo '</td>' . "\n";
479
-
480
- echo '</tr>' . "\n";
481
- echo '<tr>' . "\n";
482
-
483
- echo '<th>' . "\n";
484
- echo '<label for="ws-plugin--s2member-new-user-admin-email-message">' . "\n";
485
- echo 'New User Notification Message:' . "\n";
486
- echo '</label>' . "\n";
487
- echo '</th>' . "\n";
488
-
489
- echo '</tr>' . "\n";
490
- echo '<tr>' . "\n";
491
-
492
- echo '<td>' . "\n";
493
- echo '<textarea name="ws_plugin__s2member_new_user_admin_email_message" id="ws-plugin--s2member-new-user-admin-email-message" rows="10">' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_message"]) . '</textarea><br />' . "\n";
494
- echo 'Message Body used in the email notification sent to Administrator.<br /><br />' . "\n";
495
- echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
496
- echo '<ul>' . "\n";
497
- echo '<li><code>%%role%%</code> = The Role ID <code>(subscriber, s2member_level[0-9]+, administrator, editor, author, contributor)</code>.</li>' . "\n";
498
- echo '<li><code>%%label%%</code> = The Role ID Label <code>(Subscriber, s2Member Level 1, s2Member Level 2; or your own custom Labels — if configured)</code>.</li>' . "\n";
499
- echo '<li><code>%%level%%</code> = The Level number <code>(0, 1, 2, 3, 4)</code>. (<em>deprecated, no longer recommended; use <code>%%role%%</code></em>)</li>' . "\n";
500
- echo '<li><code>%%ccaps%%</code> = Custom Capabilities. Ex: <code>music,videos,free_gift</code> (<em>in comma-delimited format</em>).</li>' . "\n";
501
- echo '<li><code>%%user_first_name%%</code> = The First Name of the Member who registered their Username.</li>' . "\n";
502
- echo '<li><code>%%user_last_name%%</code> = The Last Name of the Member who registered their Username.</li>' . "\n";
503
- echo '<li><code>%%user_full_name%%</code> = The Full Name (First &amp; Last) of the Member who registered their Username.</li>' . "\n";
504
- echo '<li><code>%%user_email%%</code> = The Email Address of the Member who registered their Username.</li>' . "\n";
505
- echo '<li><code>%%user_login%%</code> = The Username the Member selected during registration.</li>' . "\n";
506
- echo '<li><code>%%user_pass%%</code> = The Password selected or generated during registration.</li>' . "\n";
507
- echo '<li><code>%%user_ip%%</code> = The User\'s IP Address, detected via <code>$_SERVER["REMOTE_ADDR"]</code>.</li>' . "\n";
508
- echo '<li><code>%%user_id%%</code> = A unique WordPress User ID generated during registration.</li>' . "\n";
509
- echo '<li><code>%%wp_login_url%%</code> = The full URL where Users can get logged into your site.</li>' . "\n";
510
- echo '</ul>' . "\n";
511
-
512
- echo '<strong>Custom Registration/Profile Fields are also supported in this email:</strong>' . "\n";
513
- echo '<ul>' . "\n";
514
- echo '<li><code>%%date_of_birth%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>date_of_birth</code>.</li>' . "\n";
515
- echo '<li><code>%%street_address%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>street_address</code>.</li>' . "\n";
516
- echo '<li><code>%%country%%</code> would be valid; if you have a Custom Registration/Profile Field with the ID <code>country</code>.</li>' . "\n";
517
- echo '<li><em><code>%%etc, etc...%%</code> <strong>see:</strong> s2Member -› General Options -› Registration/Profile Fields</em>.</li>' . "\n";
518
- echo '</ul>' . "\n";
519
-
520
- echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
521
- echo '<ul>' . "\n";
522
- echo '<li><code>%%cv0%%</code> = The domain of your site, which is passed through the `custom` attribute in your Shortcode.</li>' . "\n";
523
- echo '<li><code>%%cv1%%</code> = If you need to track additional custom variables, you can pipe delimit them into the `custom` attribute; inside your Shortcode, like this: <code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|cv1|cv2|cv3"</code>. You can have an unlimited number of custom variables. Obviously, this is for advanced webmasters; but the functionality has been made available for those who need it.</li>' . "\n";
524
- echo '</ul>' . "\n";
525
- echo '<strong>This example uses cv1 to record a special marketing campaign:</strong><br />' . "\n";
526
- echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
527
- echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
528
-
529
- echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ?
530
- '<div class="ws-menu-page-hr"></div>' . "\n".
531
- '<p style="margin:0;"><strong>PHP Code:</strong> It is also possible to use PHP tags — optional (for developers). If you use PHP tags, please run a test email with <code>&lt;?php print_r(get_defined_vars()); ?&gt;</code>. This will give you a full list of all PHP variables available to you in this email. The <code>$user</code> variable is the most important one. It\'s an instance of the <a href="http://codex.wordpress.org/Class_Reference/WP_User" target="_blank" rel="external"><code>WP_User</code></a> class (e.g. <code>$user->ID</code>, <code>$user->has_cap()</code>, etc). Please note that all Replacement Codes will be parsed first, and then any PHP tags that you\'ve included. Also, please remember that emails are sent in plain text format.</p>'."\n"
532
- : '';
533
- echo '</td>' . "\n";
534
-
535
- echo '</tr>' . "\n";
536
- echo '</tbody>' . "\n";
537
- echo '</table>' . "\n";
538
- echo '</div>' . "\n";
539
- echo '</div>' . "\n";
540
-
541
- echo '</div>' . "\n";
542
-
543
- echo '</div>' . "\n";
544
-
545
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_email_config", get_defined_vars ());
546
- }
547
-
548
- if (apply_filters ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_open_registration", true, get_defined_vars ()))
549
- {
550
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_open_registration", get_defined_vars ());
551
-
552
- if (is_multisite () && is_main_site ()) // A Multisite Network, and we're on the Main Site?
553
- {
554
- echo '<div class="ws-menu-page-group" title="Open Registration">' . "\n";
555
-
556
- echo '<div class="ws-menu-page-section ws-plugin--s2member-open-registration-section">' . "\n";
557
- echo '<h3>Open Registration / Free Subscribers (optional)</h3>' . "\n";
558
- echo '<p>On the Main Site of a Multisite Network, the settings for Open Registration are consolidated into the <code>s2Member -› Multisite (Config)</code> panel.</p>' . "\n";
559
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_open_registration", get_defined_vars ());
560
- echo '</div>' . "\n";
561
-
562
- echo '</div>' . "\n";
563
- }
564
- else // Else we display this section normally. No special considerations are required in this case.
565
- {
566
- echo '<div class="ws-menu-page-group" title="Open Registration">' . "\n";
567
-
568
- echo '<div class="ws-menu-page-section ws-plugin--s2member-open-registration-section">' . "\n";
569
- echo '<h3>Open Registration / Free Subscribers (optional)</h3>' . "\n";
570
- echo '<p>s2Member supports Free Subscribers (at Level #0), along with four Primary Levels [1-4] of paid Membership. If you want your visitors to be capable of registering absolutely free, you will want to "allow" Open Registration. Whenever a visitor registers without paying, they\'ll automatically become a Free Subscriber, at Level #0.</p>' . "\n";
571
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_open_registration", get_defined_vars ());
572
-
573
- echo '<table class="form-table">' . "\n";
574
- echo '<tbody>' . "\n";
575
- echo '<tr>' . "\n";
576
-
577
- echo '<th>' . "\n";
578
- echo '<label for="ws-plugin--s2member-allow-subscribers-in">' . "\n";
579
- echo 'Allow Open Registration? (Free Subscribers)' . "\n";
580
- echo '</label>' . "\n";
581
- echo '</th>' . "\n";
582
-
583
- echo '</tr>' . "\n";
584
- echo '<tr>' . "\n";
585
-
586
- echo '<td>' . "\n";
587
- echo '<select name="ws_plugin__s2member_allow_subscribers_in" id="ws-plugin--s2member-allow-subscribers-in">' . "\n";
588
- echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["allow_subscribers_in"]) ? ' selected="selected"' : '') . '>No (do NOT allow Open Registration)</option>' . "\n";
589
- echo '<option value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["allow_subscribers_in"]) ? ' selected="selected"' : '') . '>Yes (allow Open Registration; Free Subscribers at Level #0)</option>' . "\n";
590
- echo '</select><br />' . "\n";
591
- echo 'If you set this to <code>Yes</code>, you\'re unlocking <a href="' . esc_attr (c_ws_plugin__s2member_utils_urls::wp_register_url ()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Standard Registration Form.\\n* s2Member makes this form available to logged-in Administrators, at all times (for testing purposes), regardless of configuration.' . ((c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq (c_ws_plugin__s2member_utils_urls::bp_register_url ()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">/wp-login.php?action=register</a>. When a visitor registers without paying, they\'ll automatically become a Free Subscriber, at Level #0. The s2Member software reserves Level #0; to be used ONLY for Free Subscribers. All other Membership Levels [1-4] require payment.' . "\n";
592
- echo (c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '<br /><br /><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form <a href="' . esc_attr (c_ws_plugin__s2member_utils_urls::bp_register_url ()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your BuddyPress Registration Form.\\n* However, you will probably be redirected away from this BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq (c_ws_plugin__s2member_utils_urls::bp_register_url ()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.\');">here</a>.<br />s2Member integrates with BuddyPress, and the above setting will control Open Regisration for BuddyPress too.</em>' . "\n" : '';
593
- echo '</td>' . "\n";
594
-
595
- echo '</tr>' . "\n";
596
- echo '</tbody>' . "\n";
597
- echo '</table>' . "\n";
598
- echo '</div>' . "\n";
599
-
600
- echo '</div>' . "\n";
601
- }
602
-
603
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_open_registration", get_defined_vars ());
604
- }
605
-
606
- if (apply_filters ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_membership_levels", true, get_defined_vars ()))
607
- {
608
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_membership_levels", get_defined_vars ());
609
-
610
- echo '<div class="ws-menu-page-group" title="Membership Levels/Labels">' . "\n";
611
-
612
- echo '<div class="ws-menu-page-section ws-plugin--s2member-membership-levels-section">' . "\n";
613
- echo '<h3>Membership Levels (required, please customize these)</h3>' . "\n";
614
- echo '<p>The default Membership Levels are labeled generically; feel free to modify them as needed. s2Member supports Free Subscribers <em>(at Level #0)</em>, along with several Primary Roles for paid Membership <em>(i.e. Levels 1-4)</em>, created by the s2Member plugin.' . ((!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? ' s2Member also supports unlimited Custom Capability Packages <em>(see <code>s2Member -› API Scripting -› Custom Capabilities</code>)</em>' : '') . '. That being said, you don\'t have to use all of the Membership Levels if you don\'t want to. To use only 1 or 2 of these Levels, just design your Membership Options Page, so it only includes Payment Buttons for the Levels being used.</p>' . "\n";
615
- echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? '<p><em><strong>TIP:</strong> <strong>Unlimited Membership Levels</strong> are only possible with <a href="' . esc_attr (c_ws_plugin__s2member_readmes::parse_readme_value ("Pro Module / Prices")) . '" target="_blank" rel="external">s2Member Pro</a>. However, Custom Capabilities are possible in all versions of s2Member, including the free version. Custom Capabilities are a great way to extend s2Member in creative ways. If you\'re an advanced site owner, a theme designer, or a web developer integrating s2Member for a client, please check your Dashboard, under: <code>s2Member -› API Scripting -› Custom Capabilities</code>. We also recommend <a href="http://www.s2member.com/videos/A2C07377CF60025E/" target="_blank" rel="external">this video tutorial</a>.</em></p>' . "\n" : '';
616
- echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? '<p><strong>See also:</strong> These KB articles: <a href="http://www.s2member.com/kb/roles-caps/" target="_blank" rel="external">s2Member Roles/Capabilities</a> and <a href="http://www.s2member.com/kb/simple-shortcode-conditionals/" target="_blank" rel="external">Simple Shortcode Conditionals</a>.</p>'."\n" : '';
617
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_membership_levels", get_defined_vars ());
618
-
619
- echo '<table class="form-table">' . "\n";
620
- echo '<tbody>' . "\n";
621
-
622
- for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
623
- {
624
- echo '<tr>' . "\n";
625
-
626
- echo '<th>' . "\n";
627
- echo '<label for="ws-plugin--s2member-level' . $n . '-label">' . "\n";
628
- echo ($n === 0) ? 'Level #' . $n . ' <em>(Free Subscribers)</em>:' . "\n" : 'Level #' . $n . ' Members:' . "\n";
629
- echo '</label>' . "\n";
630
- echo '</th>' . "\n";
631
-
632
- echo '</tr>' . "\n";
633
- echo '<tr>' . "\n";
634
635
- echo '<td>' . "\n";
636
- 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";
637
- echo 'This is the Label for Level #' . $n . (($n === 0) ? ' (Free Subscribers)' : ' Members') . '.<br />' . "\n";
638
- echo '</td>' . "\n";
639
640
- echo '</tr>' . "\n";
641
- }
642
643
- echo '</tbody>' . "\n";
644
- echo '</table>' . "\n";
645
-
646
- echo '<div class="ws-menu-page-hr"></div>' . "\n";
647
-
648
- echo '<table class="form-table" style="margin-top:0;">' . "\n";
649
- echo '<tbody>' . "\n";
650
- echo '<tr>' . "\n";
651
-
652
- echo '<th style="padding-top:0;">' . "\n";
653
- echo '<label for="ws-plugin--s2member-apply-label-translations">' . "\n";
654
- echo 'Force WordPress to use your Labels?' . "\n";
655
- echo '</label>' . "\n";
656
- echo '</th>' . "\n";
657
-
658
- echo '</tr>' . "\n";
659
- echo '<tr>' . "\n";
660
661
- echo '<td>' . "\n";
662
- echo '<input type="radio" name="ws_plugin__s2member_apply_label_translations" id="ws-plugin--s2member-apply-label-translations-0" value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["apply_label_translations"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-apply-label-translations-0">No</label> &nbsp;&nbsp;&nbsp; <input type="radio" name="ws_plugin__s2member_apply_label_translations" id="ws-plugin--s2member-apply-label-translations-1" value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["apply_label_translations"]) ? ' checked="checked"' : '') . ' /> <label for="ws-plugin--s2member-apply-label-translations-1">Yes, force WordPress to use my Labels.</label><br />' . "\n";
663
- echo 'This affects your administrative Dashboard only <em>(i.e. your list of Users)</em>.<br />s2Member can force WordPress to use your Labels instead of referencing Roles by `s2Member Level #`. If this is your first installation of s2Member, we suggest leaving this set to <code>no</code> until you\'ve had a chance to get acclimated with s2Member\'s functionality. In fact, many site owners choose to leave this off, because they find it less confusing when Roles are referred to by their s2Member Level #.' . "\n";
664
- echo '</td>' . "\n";
665
-
666
- echo '</tr>' . "\n";
667
- echo '</tbody>' . "\n";
668
- echo '</table>' . "\n";
669
670
- echo '<div class="ws-menu-page-hr"></div>' . "\n";
671
672
- echo '<input type="button" value="Reset Roles/Capabilities" class="ws-menu-page-right ws-plugin--s2member-reset-roles-button" style="min-width:175px;" />' . "\n";
673
- echo '<p>The button to the right, is a nifty tool, which allows you to reset s2Member\'s internal Roles and Capabilities that integrate with WordPress. If you, or a developer working with you, has made attempts to alter the default <em>internal</em> Role/Capability sets that come with s2Member, and you need to reset them back to the way s2Member expects them to be, please use this tool. <em>Attn Developers: it is also possible lock-in your modified Roles/Capabilities with an s2Member Filter. Please see <a href="http://www.s2member.com/kb/roles-caps/#modifying-roles-caps" target="_blank" rel="external">this KB article for details</a>.</em></p>' . "\n";
674
675
- echo '</div>' . "\n";
676
677
- echo '</div>' . "\n";
678
679
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_after_membership_levels", get_defined_vars ());
680
- }
681
682
- if (apply_filters ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_display_login_registration", true, get_defined_vars ()))
683
- {
684
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_before_login_registration", get_defined_vars ());
685
686
- echo '<div class="ws-menu-page-group" title="Login/Registration Design">' . "\n";
687
688
- echo '<div class="ws-menu-page-section ws-plugin--s2member-login-registration-section">' . "\n";
689
- echo '<h3>Login/Registration Page Customization (optional)</h3>' . "\n";
690
- echo '<p>These settings customize your Standard Login/Registration Pages:<br />(<a href="' . esc_attr (c_ws_plugin__s2member_utils_urls::wp_register_url ()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Standard Registration Form.\\n* s2Member makes this form available to logged-in Administrators, at all times (for testing purposes), regardless of configuration.' . ((c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq (c_ws_plugin__s2member_utils_urls::bp_register_url ()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">' . esc_html (c_ws_plugin__s2member_utils_urls::wp_register_url ()) . '</a>)</p>' . "\n";
691
- echo (is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && is_main_site ()) ? '<p><em>The Main Site of a Multisite Blog Farm uses this Form instead, powered by your theme.<br />(<a href="' . esc_attr (c_ws_plugin__s2member_utils_urls::wp_signup_url ()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your Multisite Registration Form.\\n* s2Member makes this form available to logged-in Super Administrators, at all times (for testing purposes), regardless of configuration.' . ((c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '\\n\\nBuddyPress: * BuddyPress will use its own Registration Form. Please note, you will probably be redirected away from the BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq (c_ws_plugin__s2member_utils_urls::bp_register_url ()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.' : '') . '\');">' . esc_html (c_ws_plugin__s2member_utils_urls::wp_signup_url ()) . '</a>)</em></p>' . "\n" : '';
692
- echo (c_ws_plugin__s2member_utils_conds::bp_is_installed ()) ? '<p><em><strong>BuddyPress:</strong> BuddyPress will use its own Registration Form, powered by your theme.<br />(<a href="' . esc_attr (c_ws_plugin__s2member_utils_urls::bp_register_url ()) . '" target="_blank" rel="external" onclick="alert(\'s2Member will now open your BuddyPress Registration Form.\\n* However, you will probably be redirected away from this BuddyPress Registration Form ( ' . c_ws_plugin__s2member_utils_strings::esc_js_sq (c_ws_plugin__s2member_utils_urls::bp_register_url ()) . ' ), because you\\\'re ALREADY logged-in. Please log out before testing BuddyPress registration.\');">' . esc_html (c_ws_plugin__s2member_utils_urls::bp_register_url ()) . '</a>)</em></p>' . "\n" : '';
693
- do_action ("ws_plugin__s2member_during_gen_ops_page_during_left_sections_during_login_registration", get_defined_vars ());
694
695
- echo '<table class="form-table">' . "\n";
696
- echo '<tbody>' . "\n";
697
- echo '<tr>' . "\n";
698
699
- echo '<td>' . "\n";
700
- echo '<h3 style="margin:0;">Enable This Functionality?</h3>' . "\n";
701
- echo '<select name="ws_plugin__s2member_login_reg_design_enabled" id="ws-plugin--s2member-login-reg-design-enabled">' . "\n";
702
- echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_design_enabled"]) ? ' selected="selected"' : '') . '>No (default, use WordPress defaults)</option>' . "\n";
703
- echo '<option value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_design_enabled"]) ? ' selected="selected"' : '') . '>Yes (customize Login/Registration with s2Member)</option>' . "\n";
704
- echo '</select>' . "\n";
705
- echo '</td>' . "\n";
706
707
- echo '</tr>' . "\n";
708
- echo '</tbody>' . "\n";
709
- echo '</table>' . "\n";
710
711
- echo '<div id="ws-plugin--s2member-login-reg-design"'.((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_design_enabled"]) ? ' style="display:none;"' : '').'>' . "\n";
712
713
- echo '<div class="ws-menu-page-hr"></div>' . "\n";
714
715
- echo '<table class="form-table">' . "\n";
716
- echo '<tbody>' . "\n";
717
- echo '<tr>' . "\n";
718
719
- echo '<td>' . "\n";
720
- echo '<h3 style="margin:0;">Overall Font/Size Configuration</h3>' . "\n";
721
- echo '<p style="margin:0;">These settings are all focused on your Login/Registration Fonts.</p>' . "\n";
722
- echo '</td>' . "\n";
723
724
- echo '</tr>' . "\n";
725
- echo '<tr>' . "\n";
726
727
- echo '<th>' . "\n";
728
- echo '<label for="ws-plugin--s2member-login-reg-font-size">' . "\n";
729
- echo 'Overall Font Size:' . "\n";
730
- echo '</label>' . "\n";
731
- echo '</th>' . "\n";
732
733
- echo '</tr>' . "\n";
734
- echo '<tr>' . "\n";
735
736
- echo '<td>' . "\n";
737
- 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";
738
- echo 'Set this to a numeric value, calculated in pixels.' . "\n";
739
- echo '</td>' . "\n";
740
741
- echo '</tr>' . "\n";
742
- echo '<tr>' . "\n";
743
-
744
- echo '<th>' . "\n";
745
- echo '<label for="ws-plugin--s2member-login-reg-font-family">' . "\n";
746
- echo 'Overall Font Family:' . "\n";
747
- echo '</label>' . "\n";
748
- echo '</th>' . "\n";
749
-
750
- echo '</tr>' . "\n";
751
- echo '<tr>' . "\n";
752
-
753
- echo '<td>' . "\n";
754
- 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";
755
- echo 'Set this to a web-safe font family.' . "\n";
756
- echo '</td>' . "\n";
757
-
758
- echo '</tr>' . "\n";
759
- echo '<tr>' . "\n";
760
-
761
- echo '<th>' . "\n";
762
- echo '<label for="ws-plugin--s2member-login-reg-font-field-size">' . "\n";
763
- echo 'Form Field Font Size:' . "\n";
764
- echo '</label>' . "\n";
765
- echo '</th>' . "\n";
766
-
767
- echo '</tr>' . "\n";
768
- echo '<tr>' . "\n";
769
-
770
- echo '<td>' . "\n";
771
- 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";
772
- echo 'Set this to a numeric value, calculated in pixels.' . "\n";
773
- echo '</td>' . "\n";
774
-
775
- echo '</tr>' . "\n";
776
- echo '</tbody>' . "\n";
777
- echo '</table>' . "\n";
778
-
779
- echo '<div class="ws-menu-page-hr"></div>' . "\n";
780
-
781
- echo '<table class="form-table" style="margin-top:0;">' . "\n";
782
- echo '<tbody>' . "\n";
783
- echo '<tr>' . "\n";
784
-
785
- echo '<td>' . "\n";
786
- echo '<h3 style="margin:0;">Background Configuration</h3>' . "\n";
787
- echo '<p style="margin:0;">These settings are all focused on your Login/Registration Background.</p>' . "\n";
788
- echo '</td>' . "\n";
789
-
790
- echo '</tr>' . "\n";
791
- echo '<tr>' . "\n";
792
-
793
- echo '<th>' . "\n";
794
- echo '<label for="ws-plugin--s2member-login-reg-background-color">' . "\n";
795
- echo 'Background Color:' . "\n";
796
- echo '</label>' . "\n";
797
- echo '</th>' . "\n";
798
-
799
- echo '</tr>' . "\n";
800
- echo '<tr>' . "\n";
801
-
802
- echo '<td>' . "\n";
803
- 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";
804
- echo 'Set this to a 6-digit hex color code.' . "\n";
805
- echo '</td>' . "\n";
806
-
807
- echo '</tr>' . "\n";
808
- echo '<tr>' . "\n";
809
-
810
- echo '<th>' . "\n";
811
- echo '<label for="ws-plugin--s2member-login-reg-background-image">' . "\n";
812
- echo 'Background Image:' . "\n";
813
- echo '</label>' . "\n";
814
- echo '</th>' . "\n";
815
-
816
- echo '</tr>' . "\n";
817
- echo '<tr>' . "\n";
818
-
819
- echo '<td>' . "\n";
820
- 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";
821
- 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";
822
- echo 'Set this to the URL of your Background Image. (this is optional)<br />';
823
- echo 'If supplied, your Background Image will be tiled.' . "\n";
824
- echo '</td>' . "\n";
825
-
826
- echo '</tr>' . "\n";
827
- echo '<tr>' . "\n";
828
-
829
- echo '<th>' . "\n";
830
- echo '<label for="ws-plugin--s2member-login-reg-background-image-repeat">' . "\n";
831
- echo 'Background Image Tile:' . "\n";
832
- echo '</label>' . "\n";
833
- echo '</th>' . "\n";
834
-
835
- echo '</tr>' . "\n";
836
- echo '<tr>' . "\n";
837
-
838
- echo '<td>' . "\n";
839
- echo '<select name="ws_plugin__s2member_login_reg_background_image_repeat" id="ws-plugin--s2member-login-reg-background-image-repeat">' . "\n";
840
- echo '<option value="repeat"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_image_repeat"] === "repeat") ? ' selected="selected"' : '') . '>Seamless Tile ( background-repeat: repeat; )</option>' . "\n";
841
- echo '<option value="repeat-x"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_image_repeat"] === "repeat-x") ? ' selected="selected"' : '') . '>Tile Horizontally ( background-repeat: repeat-x; )</option>' . "\n";
842
- echo '<option value="repeat-y"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_image_repeat"] === "repeat-y") ? ' selected="selected"' : '') . '>Tile Vertically ( background-repeat: repeat-y; )</option>' . "\n";
843
- echo '<option value="no-repeat"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_background_image_repeat"] === "no-repeat") ? ' selected="selected"' : '') . '>No Tiles ( background-repeat: no-repeat; )</option>' . "\n";
844
- echo '</select><br />' . "\n";
845
- echo 'This controls the way your Background Image is styled with CSS. [ <a href="http://www.w3schools.com/css/pr_background-repeat.asp" target="_blank" rel="external">learn more</a> ]' . "\n";
846
- echo '</td>' . "\n";
847
-
848
- echo '</tr>' . "\n";
849
- echo '<tr>' . "\n";
850
-
851
- echo '<th>' . "\n";
852
- echo '<label for="ws-plugin--s2member-login-reg-background-text-color">' . "\n";
853
- echo 'Color of Text on top of your Background:' . "\n";
854
- echo '</label>' . "\n";
855
- echo '</th>' . "\n";
856
-
857
- echo '</tr>' . "\n";
858
- echo '<tr>' . "\n";
859
-
860
- echo '<td>' . "\n";
861
- 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";
862
- echo 'Set this to a 6-digit hex color code.' . "\n";
863
- echo '</td>' . "\n";
864
-
865
- echo '</tr>' . "\n";
866
- echo '<tr>' . "\n";
867
-
868
- echo '<th>' . "\n";
869
- echo '<label for="ws-plugin--s2member-login-reg-background-text-shadow-color">' . "\n";
870
- echo 'Shadow Color for Text on top of your Background:' . "\n";
871
- echo '</label>' . "\n";
872
- echo '</th>' . "\n";
873
-
874
- echo '</tr>' . "\n";
875
- echo '<tr>' . "\n";
876
-
877
- echo '<td>' . "\n";
878
- 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";
879
- echo 'Set this to a 6-digit hex color code.' . "\n";
880
- echo '</td>' . "\n";
881
-
882
- echo '</tr>' . "\n";
883
- echo '<tr>' . "\n";
884
-
885
- echo '<th>' . "\n";
886
- echo '<label for="ws-plugin--s2member-login-reg-background-box-shadow-color">' . "\n";
887
- echo 'Shadow Color for Boxes on top of your Background:' . "\n";
888
- echo '</label>' . "\n";
889
- echo '</th>' . "\n";
890
-
891
- echo '</tr>' . "\n";
892
- echo '<tr>' . "\n";
893
-
894
- echo '<td>' . "\n";
895
- 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";
896
- echo 'Set this to a 6-digit hex color code.' . "\n";
897
- echo '</td>' . "\n";
898
-
899
- echo '</tr>' . "\n";
900
- echo '</tbody>' . "\n";
901
- echo '</table>' . "\n";
902
-
903
- echo '<div class="ws-menu-page-hr"></div>' . "\n";
904
-
905
- echo '<table class="form-table" style="margin-top:0;">' . "\n";
906
- echo '<tbody>' . "\n";
907
- echo '<tr>' . "\n";
908
-
909
- echo '<td>' . "\n";
910
- echo '<h3 style="margin:0;">Logo Image Configuration</h3>' . "\n";
911
- echo '<p style="margin:0;">These settings are all focused on your Login/Registration Logo.</p>' . "\n";
912
- echo '</td>' . "\n";
913
-
914
- echo '</tr>' . "\n";
915
- echo '<tr>' . "\n";
916
-
917
- echo '<th>' . "\n";
918
- echo '<label for="ws-plugin--s2member-login-reg-logo-src">' . "\n";
919
- echo 'Logo Image Location:' . "\n";
920
- echo '</label>' . "\n";
921
- echo '</th>' . "\n";
922
-
923
- echo '</tr>' . "\n";
924
- echo '<tr>' . "\n";
925
-
926
- echo '<td>' . "\n";
927
- 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";
928
- 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";
929
- echo 'Set this to the URL of your Logo Image.<br />' . "\n";
930
- echo 'Suggested size is around 500 x 100.' . "\n";
931
- echo '</td>' . "\n";
932
-
933
- echo '</tr>' . "\n";
934
- echo '<tr>' . "\n";
935
-
936
- echo '<th>' . "\n";
937
- echo '<label for="ws-plugin--s2member-login-reg-logo-src-width">' . "\n";
938
- echo 'Logo Image Width:' . "\n";
939
- echo '</label>' . "\n";
940
- echo '</th>' . "\n";
941
-
942
- echo '</tr>' . "\n";
943
- echo '<tr>' . "\n";
944
-
945
- echo '<td>' . "\n";
946
- 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";
947
- 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";
948
- echo '</td>' . "\n";
949
-
950
- echo '</tr>' . "\n";
951
- echo '<tr>' . "\n";
952
-
953
- echo '<th>' . "\n";
954
- echo '<label for="ws-plugin--s2member-login-reg-logo-src-height">' . "\n";
955
- echo 'Logo Image Height:' . "\n";
956
- echo '</label>' . "\n";
957
- echo '</th>' . "\n";
958
-
959
- echo '</tr>' . "\n";
960
- echo '<tr>' . "\n";
961
-
962
- echo '<td>' . "\n";
963
- 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";
964
- echo 'The pixel Height of your Logo Image.' . "\n";
965
- echo '</td>' . "\n";
966
-
967
- echo '</tr>' . "\n";
968
- echo '<tr>' . "\n";
969
-
970
- echo '<th>' . "\n";
971
- echo '<label for="ws-plugin--s2member-login-reg-logo-url">' . "\n";
972
- echo 'Logo Image Click URL:' . "\n";
973
- echo '</label>' . "\n";
974
- echo '</th>' . "\n";
975
-
976
- echo '</tr>' . "\n";
977
- echo '<tr>' . "\n";
978
-
979
- echo '<td>' . "\n";
980
- 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";
981
- echo 'Set this to the Click URL for your Logo Image.' . "\n";
982
- echo '</td>' . "\n";
983
-
984
- echo '</tr>' . "\n";
985
- echo '<tr>' . "\n";
986
-
987
- echo '<th>' . "\n";
988
- echo '<label for="ws-plugin--s2member-login-reg-logo-title">' . "\n";
989
- echo 'Logo Image Title Attribute:' . "\n";
990
- echo '</label>' . "\n";
991
- echo '</th>' . "\n";
992
-
993
- echo '</tr>' . "\n";
994
- echo '<tr>' . "\n";
995
-
996
- echo '<td>' . "\n";
997
- 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";
998
- echo 'Used as the <code>title=""</code> attribute for your Logo Image.' . "\n";
999
- echo '</td>' . "\n";
1000
-
1001
- echo '</tr>' . "\n";
1002
- echo '</tbody>' . "\n";
1003
- echo '</table>' . "\n";
1004
-
1005
- echo '<div class="ws-menu-page-hr"></div>' . "\n";
1006
-
1007
- echo '<table class="form-table" style="margin-top:0;">' . "\n";
1008
- echo '<tbody>' . "\n";
1009
- echo '<tr>' . "\n";
1010
-
1011
- echo '<th>' . "\n";
1012
- echo '<label for="ws-plugin--s2member-login-reg-footer-backtoblog">' . "\n";
1013
- echo 'Display [Back to Home Page] Link At Bottom?' . "\n";
1014
- echo '</label>' . "\n";
1015
- echo '</th>' . "\n";
1016
-
1017
- echo '</tr>' . "\n";
1018
- echo '<tr>' . "\n";
1019
-
1020
- echo '<td>' . "\n";
1021
- echo '<select name="ws_plugin__s2member_login_reg_footer_backtoblog" id="ws-plugin--s2member-login-reg-footer-backtoblog">' . "\n";
1022
- echo '<option value="1"' . (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_footer_backtoblog"]) ? ' selected="selected"' : '') . '>Yes, display link at bottom pointing visitors back to the home page</option>' . "\n";
1023
- echo '<option value="0"' . ((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["login_reg_footer_backtoblog"]) ? ' selected="selected"' : '') . '>No, hide this link (I\'ll create my own custom footer w/ the details I prefer)</option>' . "\n";
1024
- echo '</select>' . "\n";
1025
- echo '</td>' . "\n";
1026
-
1027
- echo '</tr>' . "\n";
1028
- echo '<tr>' . "\n";
1029
-
1030
- echo '<td>' . "\n";
1031
- echo '<h3 style="margin:0;">Footer Design (i.e. Bottom)</h3>' . "\n";
1032
- echo '<p style="margin:0;">This field accepts raw HTML' . ((!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ? ' (and/or PHP)' : '') . ' code.</p>' . "\n";
1033
- echo '</td>' . "\n";
1034
-
1035
- echo '</tr>' . "\n";
1036
- echo '<tr>' . "\n";
1037
-
1038
- echo '<th>' . "\n";
1039
- echo '<label for="ws-plugin--s2member-login-reg-footer-design">' . "\n";
1040
- echo 'Login/Registration Footer Design (optional):' . "\n";
1041
- echo '</label>' . "\n";
1042