Version Description
- Upgrade highly recommended.
Download this release
Release Info
Developer | PriMoThemes |
Plugin | s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members) |
Version | 3.0.6 |
Comparing to | |
See all releases |
Code changes from version 3.0.5 to 3.0.6
- includes/functions/paypal-button.inc.php +8 -8
- includes/functions/paypal-notify.inc.php +4 -4
- readme.txt +9 -3
- s2member.php +2 -2
includes/functions/paypal-button.inc.php
CHANGED
@@ -12,7 +12,7 @@ If not, see: <http://www.gnu.org/licenses/>.
|
|
12 |
Direct access denial.
|
13 |
*/
|
14 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
15 |
-
exit
|
16 |
/*
|
17 |
Function that handles the Shortcode for [s2Member-PayPal-Button /].
|
18 |
Attach to: add_shortcode("s2Member-PayPal-Button");
|
@@ -29,7 +29,7 @@ if (!function_exists ("ws_plugin__s2member_paypal_button"))
|
|
29 |
{
|
30 |
function ws_plugin__s2member_paypal_button ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
|
31 |
{
|
32 |
-
eval
|
33 |
do_action ("ws_plugin__s2member_before_paypal_button", get_defined_vars ());
|
34 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
35 |
/**/
|
@@ -49,7 +49,7 @@ if (!function_exists ("ws_plugin__s2member_paypal_button"))
|
|
49 |
/**/
|
50 |
$attr = shortcode_atts (array ("ids" => "0", "exp" => "72", "level" => "1", "ccaps" => "", "desc" => "", "ps" => "paypal", "cc" => "USD", "custom" => $_SERVER["HTTP_HOST"], "tp" => "0", "tt" => "D", "ra" => "0.01", "rp" => "1", "rt" => "M", "rr" => "1", "modify" => "0", "cancel" => "0", "sp" => "0", "image" => "default"), $attr);
|
51 |
/**/
|
52 |
-
eval
|
53 |
do_action ("ws_plugin__s2member_before_paypal_button_after_shortcode_atts", get_defined_vars ());
|
54 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
55 |
/**/
|
@@ -61,7 +61,7 @@ if (!function_exists ("ws_plugin__s2member_paypal_button"))
|
|
61 |
/**/
|
62 |
$code = ($attr["image"] && $attr["image"] !== "default") ? preg_replace ('/ src\="(.*?)"/', ' src="' . ws_plugin__s2member_esc_ds (esc_attr ($attr["image"])) . '"', $code) : $code;
|
63 |
/**/
|
64 |
-
eval
|
65 |
do_action ("ws_plugin__s2member_during_paypal_cancellation_button", get_defined_vars ());
|
66 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
67 |
}
|
@@ -70,7 +70,7 @@ if (!function_exists ("ws_plugin__s2member_paypal_button"))
|
|
70 |
{
|
71 |
$attr["sp_ids_exp"] = "sp:" . $attr["ids"] . ":" . $attr["exp"]; /* Combined "sp:ids:expiration hours". */
|
72 |
/**/
|
73 |
-
$code = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-sp-button.html"));
|
74 |
$code = preg_replace ("/%%endpoint%%/", ws_plugin__s2member_esc_ds (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $code);
|
75 |
$code = preg_replace ("/%%paypal_business%%/", ws_plugin__s2member_esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $code);
|
76 |
$code = preg_replace ("/%%cancel_return%%/", ws_plugin__s2member_esc_ds (esc_attr (get_bloginfo ("url"))), $code);
|
@@ -87,7 +87,7 @@ if (!function_exists ("ws_plugin__s2member_paypal_button"))
|
|
87 |
/**/
|
88 |
$code = ($attr["image"] && $attr["image"] !== "default") ? preg_replace ('/ src\="(.*?)"/', ' src="' . ws_plugin__s2member_esc_ds (esc_attr ($attr["image"])) . '"', $code) : $code;
|
89 |
/**/
|
90 |
-
eval
|
91 |
do_action ("ws_plugin__s2member_during_paypal_sp_button", get_defined_vars ());
|
92 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
93 |
}
|
@@ -98,7 +98,7 @@ if (!function_exists ("ws_plugin__s2member_paypal_button"))
|
|
98 |
$attr["level_ccaps_eotper"] = ($attr["rr"] === "BN" && $attr["rt"] !== "L") ? $attr["level"] . ":" . $attr["ccaps"] . ":" . $attr["rp"] . " " . $attr["rt"] : $attr["level"] . ":" . $attr["ccaps"];
|
99 |
$attr["level_ccaps_eotper"] = rtrim ($attr["level_ccaps_eotper"], ":"); /* Clean any trailing separators from this string. */
|
100 |
/**/
|
101 |
-
$code = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-button.html"));
|
102 |
$code = preg_replace ("/%%endpoint%%/", ws_plugin__s2member_esc_ds (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $code);
|
103 |
$code = preg_replace ("/%%paypal_business%%/", ws_plugin__s2member_esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $code);
|
104 |
$code = preg_replace ("/%%level_label%%/", ws_plugin__s2member_esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $attr["level"] . "_label"])), $code);
|
@@ -133,7 +133,7 @@ if (!function_exists ("ws_plugin__s2member_paypal_button"))
|
|
133 |
/**/
|
134 |
$code = ($attr["image"] && $attr["image"] !== "default") ? preg_replace ('/ src\="(.*?)"/', ' src="' . ws_plugin__s2member_esc_ds (esc_attr ($attr["image"])) . '"', $code) : $code;
|
135 |
/**/
|
136 |
-
eval
|
137 |
($attr["modify"]) ? do_action ("ws_plugin__s2member_during_paypal_modification_button", get_defined_vars ()) : do_action ("ws_plugin__s2member_during_paypal_button", get_defined_vars ());
|
138 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
139 |
}
|
12 |
Direct access denial.
|
13 |
*/
|
14 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
15 |
+
exit("Do not access this file directly.");
|
16 |
/*
|
17 |
Function that handles the Shortcode for [s2Member-PayPal-Button /].
|
18 |
Attach to: add_shortcode("s2Member-PayPal-Button");
|
29 |
{
|
30 |
function ws_plugin__s2member_paypal_button ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
|
31 |
{
|
32 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
33 |
do_action ("ws_plugin__s2member_before_paypal_button", get_defined_vars ());
|
34 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
35 |
/**/
|
49 |
/**/
|
50 |
$attr = shortcode_atts (array ("ids" => "0", "exp" => "72", "level" => "1", "ccaps" => "", "desc" => "", "ps" => "paypal", "cc" => "USD", "custom" => $_SERVER["HTTP_HOST"], "tp" => "0", "tt" => "D", "ra" => "0.01", "rp" => "1", "rt" => "M", "rr" => "1", "modify" => "0", "cancel" => "0", "sp" => "0", "image" => "default"), $attr);
|
51 |
/**/
|
52 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
53 |
do_action ("ws_plugin__s2member_before_paypal_button_after_shortcode_atts", get_defined_vars ());
|
54 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
55 |
/**/
|
61 |
/**/
|
62 |
$code = ($attr["image"] && $attr["image"] !== "default") ? preg_replace ('/ src\="(.*?)"/', ' src="' . ws_plugin__s2member_esc_ds (esc_attr ($attr["image"])) . '"', $code) : $code;
|
63 |
/**/
|
64 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
65 |
do_action ("ws_plugin__s2member_during_paypal_cancellation_button", get_defined_vars ());
|
66 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
67 |
}
|
70 |
{
|
71 |
$attr["sp_ids_exp"] = "sp:" . $attr["ids"] . ":" . $attr["exp"]; /* Combined "sp:ids:expiration hours". */
|
72 |
/**/
|
73 |
+
$code = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-sp-checkout-button.html"));
|
74 |
$code = preg_replace ("/%%endpoint%%/", ws_plugin__s2member_esc_ds (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $code);
|
75 |
$code = preg_replace ("/%%paypal_business%%/", ws_plugin__s2member_esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $code);
|
76 |
$code = preg_replace ("/%%cancel_return%%/", ws_plugin__s2member_esc_ds (esc_attr (get_bloginfo ("url"))), $code);
|
87 |
/**/
|
88 |
$code = ($attr["image"] && $attr["image"] !== "default") ? preg_replace ('/ src\="(.*?)"/', ' src="' . ws_plugin__s2member_esc_ds (esc_attr ($attr["image"])) . '"', $code) : $code;
|
89 |
/**/
|
90 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
91 |
do_action ("ws_plugin__s2member_during_paypal_sp_button", get_defined_vars ());
|
92 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
93 |
}
|
98 |
$attr["level_ccaps_eotper"] = ($attr["rr"] === "BN" && $attr["rt"] !== "L") ? $attr["level"] . ":" . $attr["ccaps"] . ":" . $attr["rp"] . " " . $attr["rt"] : $attr["level"] . ":" . $attr["ccaps"];
|
99 |
$attr["level_ccaps_eotper"] = rtrim ($attr["level_ccaps_eotper"], ":"); /* Clean any trailing separators from this string. */
|
100 |
/**/
|
101 |
+
$code = trim (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-checkout-button.html"));
|
102 |
$code = preg_replace ("/%%endpoint%%/", ws_plugin__s2member_esc_ds (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $code);
|
103 |
$code = preg_replace ("/%%paypal_business%%/", ws_plugin__s2member_esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $code);
|
104 |
$code = preg_replace ("/%%level_label%%/", ws_plugin__s2member_esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $attr["level"] . "_label"])), $code);
|
133 |
/**/
|
134 |
$code = ($attr["image"] && $attr["image"] !== "default") ? preg_replace ('/ src\="(.*?)"/', ' src="' . ws_plugin__s2member_esc_ds (esc_attr ($attr["image"])) . '"', $code) : $code;
|
135 |
/**/
|
136 |
+
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
137 |
($attr["modify"]) ? do_action ("ws_plugin__s2member_during_paypal_modification_button", get_defined_vars ()) : do_action ("ws_plugin__s2member_during_paypal_button", get_defined_vars ());
|
138 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
139 |
}
|
includes/functions/paypal-notify.inc.php
CHANGED
@@ -155,7 +155,7 @@ if (!function_exists ("ws_plugin__s2member_paypal_notify"))
|
|
155 |
/**/
|
156 |
if (($sbj = trim ($sbj)) && ($msg = trim ($msg))) /* Make sure they are not empty. */
|
157 |
{
|
158 |
-
|
159 |
/**/
|
160 |
$paypal["s2member_log"][] = "Specific Post/Page Confirmation Email sent to Customer.";
|
161 |
}
|
@@ -279,7 +279,7 @@ if (!function_exists ("ws_plugin__s2member_paypal_notify"))
|
|
279 |
/**/
|
280 |
$paypal["s2member_log"][] = "s2Member Level/Capabilities updated w/ advanced update routines.";
|
281 |
/**/
|
282 |
-
|
283 |
/**/
|
284 |
$paypal["s2member_log"][] = "Modification Confirmation Email sent to Customer, with a URL that provides them with a way to log back in.";
|
285 |
/**/
|
@@ -341,7 +341,7 @@ if (!function_exists ("ws_plugin__s2member_paypal_notify"))
|
|
341 |
/**/
|
342 |
if (($sbj = trim ($sbj)) && ($msg = trim ($msg))) /* Make sure they are not empty. */
|
343 |
{
|
344 |
-
|
345 |
/**/
|
346 |
$paypal["s2member_log"][] = "Signup Confirmation Email sent to Customer.";
|
347 |
}
|
@@ -489,7 +489,7 @@ if (!function_exists ("ws_plugin__s2member_paypal_notify"))
|
|
489 |
/**/
|
490 |
$paypal["s2member_log"][] = "s2Member Level/Capabilities updated on Subscription modification.";
|
491 |
/**/
|
492 |
-
|
493 |
/**/
|
494 |
$paypal["s2member_log"][] = "Modification Confirmation Email sent to Customer, with a URL that provides them with a way to log back in.";
|
495 |
/**/
|
155 |
/**/
|
156 |
if (($sbj = trim ($sbj)) && ($msg = trim ($msg))) /* Make sure they are not empty. */
|
157 |
{
|
158 |
+
mail ($paypal["payer_email"], $sbj, $msg, "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">\r\nContent-Type: text/plain; charset=utf-8");
|
159 |
/**/
|
160 |
$paypal["s2member_log"][] = "Specific Post/Page Confirmation Email sent to Customer.";
|
161 |
}
|
279 |
/**/
|
280 |
$paypal["s2member_log"][] = "s2Member Level/Capabilities updated w/ advanced update routines.";
|
281 |
/**/
|
282 |
+
mail ($paypal["payer_email"], "Thank You! Your membership has been updated.", "Thank You! Your membership has been updated to:\n" . $paypal["item_name"] . "\n\nYou'll need to log back in now.\n" . wp_login_url (), "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">\r\nContent-Type: text/plain; charset=utf-8");
|
283 |
/**/
|
284 |
$paypal["s2member_log"][] = "Modification Confirmation Email sent to Customer, with a URL that provides them with a way to log back in.";
|
285 |
/**/
|
341 |
/**/
|
342 |
if (($sbj = trim ($sbj)) && ($msg = trim ($msg))) /* Make sure they are not empty. */
|
343 |
{
|
344 |
+
mail ($paypal["payer_email"], $sbj, $msg, "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">\r\nContent-Type: text/plain; charset=utf-8");
|
345 |
/**/
|
346 |
$paypal["s2member_log"][] = "Signup Confirmation Email sent to Customer.";
|
347 |
}
|
489 |
/**/
|
490 |
$paypal["s2member_log"][] = "s2Member Level/Capabilities updated on Subscription modification.";
|
491 |
/**/
|
492 |
+
mail ($paypal["payer_email"], "Thank You! Your membership has been updated.", "Thank You! Your membership has been updated to:\n" . $paypal["item_name"] . "\n\nYou'll need to log back in now.\n" . wp_login_url (), "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">\r\nContent-Type: text/plain; charset=utf-8");
|
493 |
/**/
|
494 |
$paypal["s2member_log"][] = "Modification Confirmation Email sent to Customer, with a URL that provides them with a way to log back in.";
|
495 |
/**/
|
readme.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
=== s2Member ( Membership w/ PayPal® Integration ) also works w/ BuddyPress ===
|
2 |
|
3 |
-
Version: 3.0.
|
4 |
-
Stable tag: 3.0.
|
5 |
Framework: WS-P-3.0
|
6 |
|
7 |
SSL Compatible: yes
|
@@ -144,11 +144,17 @@ Not yet. This is coming soon though. It will be included in a future release of
|
|
144 |
|
145 |
== Upgrade Notice ==
|
146 |
|
|
|
|
|
|
|
147 |
= 3.0.5 =
|
148 |
-
*
|
149 |
|
150 |
== Changelog ==
|
151 |
|
|
|
|
|
|
|
152 |
= 3.0.5 =
|
153 |
* s2Member v3.0.5 is the first version of s2Member that is fully compatible with the s2Member Pro Module. Available now @ [s2Member.com](http://www.s2member.com/).
|
154 |
* New Level #0. s2Member now supports a new reserved Level #0 for Free Subscribers. s2Member has always supported Free Subscribers, but in past versions it was not possible to set custom permissions in the s2Member configuration panels for Level #0. Now you can. See: `s2Member -> General Options -> Open Registration`. You can now set Page, Post, Tag, Category, and even URI restrictions for Level #0.
|
1 |
=== s2Member ( Membership w/ PayPal® Integration ) also works w/ BuddyPress ===
|
2 |
|
3 |
+
Version: 3.0.6
|
4 |
+
Stable tag: 3.0.6
|
5 |
Framework: WS-P-3.0
|
6 |
|
7 |
SSL Compatible: yes
|
144 |
|
145 |
== Upgrade Notice ==
|
146 |
|
147 |
+
= 3.0.6 =
|
148 |
+
* Upgrade highly recommended.
|
149 |
+
|
150 |
= 3.0.5 =
|
151 |
+
* Several bug fixes, improvements, and some new features.
|
152 |
|
153 |
== Changelog ==
|
154 |
|
155 |
+
= 3.0.6 =
|
156 |
+
* Bug fix. The file `paypal-button.html` was renamed in s2Member v3.0.5, to `paypal-checkout-button.html`. The "missing file error" has been corrected in v3.0.6.
|
157 |
+
|
158 |
= 3.0.5 =
|
159 |
* s2Member v3.0.5 is the first version of s2Member that is fully compatible with the s2Member Pro Module. Available now @ [s2Member.com](http://www.s2member.com/).
|
160 |
* New Level #0. s2Member now supports a new reserved Level #0 for Free Subscribers. s2Member has always supported Free Subscribers, but in past versions it was not possible to set custom permissions in the s2Member configuration panels for Level #0. Now you can. See: `s2Member -> General Options -> Open Registration`. You can now set Page, Post, Tag, Category, and even URI restrictions for Level #0.
|
s2member.php
CHANGED
@@ -9,8 +9,8 @@ along with this software. In the main directory, see: /licensing/
|
|
9 |
If not, see: <http://www.gnu.org/licenses/>.
|
10 |
*/
|
11 |
/*
|
12 |
-
Version: 3.0.
|
13 |
-
Stable tag: 3.0.
|
14 |
Framework: WS-P-3.0
|
15 |
|
16 |
SSL Compatible: yes
|
9 |
If not, see: <http://www.gnu.org/licenses/>.
|
10 |
*/
|
11 |
/*
|
12 |
+
Version: 3.0.6
|
13 |
+
Stable tag: 3.0.6
|
14 |
Framework: WS-P-3.0
|
15 |
|
16 |
SSL Compatible: yes
|