Version Description
- Bug fix. The Replacment Code (
%%current_user_level%%
); which works in conjunction with a Login Welcome Page URL, and also with URI Level Access was always returning-1
. This has been corrected in v3.1.5+. - General cleanup and improved routines inside
/includes/file-download-access.inc.php
. No functionality changes, just subtle improvements in the logic behind s2Member's File Download Restrictions. - New Replacement Code for s2Member's Registration API Notification. The Replacement Code (
%%user_id%%
) is now available to developers.
Download this release
Release Info
Developer | PriMoThemes |
Plugin | s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members) |
Version | 3.1.5 |
Comparing to | |
See all releases |
Code changes from version 3.1.4 to 3.1.5
- includes/functions/file-download-access.inc.php +72 -67
- includes/functions/login-redirection.inc.php +2 -1
- includes/functions/register-access.inc.php +6 -4
- includes/functions/ruri-level-access.inc.php +4 -3
- includes/functions/user-access-level.inc.php +23 -14
- includes/menu-pages/api-ops.inc.php +6 -5
- includes/menu-pages/paypal-ops.inc.php +2 -2
- includes/menu-pages/trk-ops.inc.php +2 -2
- readme.txt +7 -2
- s2member.php +3 -3
includes/functions/file-download-access.inc.php
CHANGED
@@ -154,92 +154,97 @@ if (!function_exists ("ws_plugin__s2member_check_file_download_access"))
|
|
154 |
/**/
|
155 |
$_GET["s2member_file_download_key"] = (!$_GET["s2member_file_download_key"] && $_GET["s2member_free_file_download_key"]) ? $_GET["s2member_free_file_download_key"] : $_GET["s2member_file_download_key"];
|
156 |
/**/
|
157 |
-
|
158 |
-
if (!$excluded && (!$_GET["s2member_file_download_key"] || ($_GET["s2member_file_download_key"] && !($_GET["s2member_file_download_key"] === ws_plugin__s2member_file_download_key ($_GET["s2member_file_download"]) || $_GET["s2member_file_download_key"] === ws_plugin__s2member_file_download_key ($_GET["s2member_file_download"], "cache-compatible") || /* Deprecated « */ $_GET["s2member_file_download_key"] === md5 (ws_plugin__s2member_xencrypt ($_GET["s2member_file_download"])) /* » */))) && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"])
|
159 |
{
|
160 |
-
$_GET["s2member_file_download"] = trim ($_GET["s2member_file_download"], "/"); /*
|
161 |
/**/
|
162 |
-
|
163 |
-
/**/
|
164 |
-
if ($file_download_access_is_allowed === false) /* Have file downloads even been enabled? */
|
165 |
{
|
166 |
-
header ("HTTP/1.0
|
167 |
-
exit ("
|
168 |
}
|
169 |
-
|
170 |
-
else if (!($current_user = (is_user_logged_in ()) ? wp_get_current_user () : false) /* Redirect Users who are not logged in. */
|
171 |
-
&& wp_redirect (add_query_arg (array ("s2member_level_req" => (string)$min_level_4_downloads, "s2member_file_download_req" => $_GET["s2member_file_download"]), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"]))) !== "nill")
|
172 |
-
exit ();
|
173 |
-
/**/
|
174 |
-
else if (!file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $_GET["s2member_file_download"]))
|
175 |
{
|
176 |
-
header ("HTTP/1.0
|
177 |
-
exit ("
|
178 |
}
|
179 |
-
|
180 |
-
|
181 |
-
&& wp_redirect (add_query_arg (array ("s2member_file_download_req" => $_GET["s2member_file_download"]), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"]))) !== "nill")
|
182 |
-
exit ();
|
183 |
-
/**/
|
184 |
-
else if (preg_match ("/^access[_\-]s2member[_\-]level([0-9]+)\//", $_GET["s2member_file_download"])) /* Level required? */
|
185 |
{
|
186 |
-
|
187 |
-
|
|
|
|
|
|
|
188 |
/**/
|
189 |
-
if (
|
190 |
-
&& wp_redirect (add_query_arg (array ("s2member_level_req" => $
|
191 |
exit ();
|
192 |
-
}
|
193 |
-
/**/
|
194 |
-
else if (preg_match ("/^access[_\-]s2member[_\-]ccap[_\-](.+?)\//", $_GET["s2member_file_download"])) /* Custom Capability? */
|
195 |
-
{
|
196 |
-
list ($ccap_req) = preg_split ("/\//", $_GET["s2member_file_download"], 2); /* Which Capability does this require? */
|
197 |
-
$ccap_req = preg_replace ("/-/", "_", $ccap_req);
|
198 |
/**/
|
199 |
-
if (
|
200 |
-
&& wp_redirect (add_query_arg (array ("
|
201 |
exit ();
|
202 |
-
|
203 |
-
|
204 |
-
$previous_file_downloads = 0; /* Here we're going to count how many downloads they've performed. */
|
205 |
-
$max_days_logged = ws_plugin__s2member_max_download_period (); /* The longest period in days. */
|
206 |
-
$file_download_access_log = (array)get_usermeta ($current_user->ID, "s2member_file_download_access_log");
|
207 |
-
$file_download_access_arc = (array)get_usermeta ($current_user->ID, "s2member_file_download_access_arc");
|
208 |
-
/**/
|
209 |
-
foreach ($file_download_access_log as $file_download_access_log_entry_key => $file_download_access_log_entry)
|
210 |
-
{
|
211 |
-
if (strtotime ($file_download_access_log_entry["date"]) < strtotime ("-" . $max_days_logged . " days"))
|
212 |
{
|
213 |
-
|
214 |
-
$
|
|
|
|
|
|
|
|
|
215 |
}
|
216 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
{
|
218 |
-
$
|
219 |
-
|
220 |
-
|
221 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
}
|
224 |
-
/**/
|
225 |
-
if (!$already_downloaded && $previous_file_downloads >= $file_downloads["allowed"] /* They have NOT already downloaded this file, and they're over their limit. */
|
226 |
-
&& wp_redirect (add_query_arg (array ("s2member_file_download_req" => $_GET["s2member_file_download"]), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"]))) !== "nill")
|
227 |
-
exit ();
|
228 |
-
/**/
|
229 |
-
if (!$already_downloaded) /* Only add this file to the log if they have not already downloaded it. */
|
230 |
-
$file_download_access_log[] = array ("date" => date ("Y-m-d"), "file" => $_GET["s2member_file_download"]);
|
231 |
-
/**/
|
232 |
-
update_usermeta ($current_user->ID, "s2member_file_download_access_arc", ws_plugin__s2member_array_unique ($file_download_access_arc));
|
233 |
-
update_usermeta ($current_user->ID, "s2member_file_download_access_log", ws_plugin__s2member_array_unique ($file_download_access_log));
|
234 |
}
|
235 |
-
else /*
|
236 |
{
|
237 |
$_GET["s2member_file_download"] = trim ($_GET["s2member_file_download"], "/");
|
238 |
/**/
|
239 |
if (!file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $_GET["s2member_file_download"]))
|
240 |
{
|
241 |
-
header ("HTTP/1.0 404 Not Found"); /* The file does
|
242 |
-
exit ("404: Sorry, file
|
243 |
}
|
244 |
}
|
245 |
/*
|
@@ -257,7 +262,8 @@ if (!function_exists ("ws_plugin__s2member_check_file_download_access"))
|
|
257 |
do_action ("ws_plugin__s2member_during_file_download_access", get_defined_vars ());
|
258 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
259 |
/*
|
260 |
-
Now send the file to the browser.
|
|
|
261 |
*/
|
262 |
set_time_limit (0); /* Make time. */
|
263 |
ini_set ("zlib.output_compression", 0);
|
@@ -297,8 +303,7 @@ if (!function_exists ("ws_plugin__s2member_file_download_key"))
|
|
297 |
do_action ("ws_plugin__s2member_before_file_download_key", get_defined_vars ());
|
298 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
299 |
/**/
|
300 |
-
$salt = ($cache_compatible) ? $file
|
301 |
-
: date ("Y-m-d") . $_SERVER["REMOTE_ADDR"] . $_SERVER["HTTP_USER_AGENT"] . $file;
|
302 |
$key = md5 (ws_plugin__s2member_xencrypt ($salt));
|
303 |
/**/
|
304 |
if (!$cache_compatible) /* Disallow caching. */
|
154 |
/**/
|
155 |
$_GET["s2member_file_download_key"] = (!$_GET["s2member_file_download_key"] && $_GET["s2member_free_file_download_key"]) ? $_GET["s2member_free_file_download_key"] : $_GET["s2member_file_download_key"];
|
156 |
/**/
|
157 |
+
if (!$excluded && (!$_GET["s2member_file_download_key"] || ($_GET["s2member_file_download_key"] && !($file_download_key_is_valid = ($_GET["s2member_file_download_key"] === ws_plugin__s2member_file_download_key ($_GET["s2member_file_download"]) || $_GET["s2member_file_download_key"] === ws_plugin__s2member_file_download_key ($_GET["s2member_file_download"], "cache-compatible"))))))
|
|
|
158 |
{
|
159 |
+
$_GET["s2member_file_download"] = trim ($_GET["s2member_file_download"], "/"); /* Trim slashes after Key comparison. */
|
160 |
/**/
|
161 |
+
if (!file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $_GET["s2member_file_download"]))
|
|
|
|
|
162 |
{
|
163 |
+
header ("HTTP/1.0 404 Not Found"); /* The file does NOT even exist. */
|
164 |
+
exit ("404: Sorry, file not found. Please contact Support for assistance.");
|
165 |
}
|
166 |
+
else if ($_GET["s2member_file_download_key"] && !$file_download_key_is_valid) /* Was an invalid Key passed in? */
|
|
|
|
|
|
|
|
|
|
|
167 |
{
|
168 |
+
header ("HTTP/1.0 503 Service Temporarily Unavailable"); /* Invalid Download Keys are handled separately. */
|
169 |
+
exit ("503 ( Invalid Key ): Sorry, your access to this file has expired. Please contact Support for assistance.");
|
170 |
}
|
171 |
+
else if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"]) /* Is a Membership Options Page configured? */
|
172 |
+
/* This file will be processed WITHOUT a Download Key, using Membership Level Access ( w/ possible Custom Capabilities ). */
|
|
|
|
|
|
|
|
|
173 |
{
|
174 |
+
if (($file_download_access_is_allowed = $min_level_4_downloads = ws_plugin__s2member_min_level_4_downloads ()) === false)
|
175 |
+
{
|
176 |
+
header ("HTTP/1.0 503 Service Temporarily Unavailable"); /* File downloads are NOT yet configured? */
|
177 |
+
exit ("503: Sorry, file downloads are not enabled yet. Please contact Support for assistance. If you are the site owner, please configure `s2Member -> Download Options`.");
|
178 |
+
}
|
179 |
/**/
|
180 |
+
else if (!($current_user = (is_user_logged_in ()) ? wp_get_current_user () : false) /* NOT logged in? */
|
181 |
+
&& wp_redirect (add_query_arg (array ("s2member_level_req" => (string)$min_level_4_downloads, "s2member_file_download_req" => $_GET["s2member_file_download"]), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"]))) !== "nill")
|
182 |
exit ();
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
/**/
|
184 |
+
else if ((!is_array ($file_downloads = ws_plugin__s2member_user_downloads ()) || !$file_downloads["allowed"] || !$file_downloads["allowed_days"])/**/
|
185 |
+
&& wp_redirect (add_query_arg (array ("s2member_file_download_req" => $_GET["s2member_file_download"]), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"]))) !== "nill")
|
186 |
exit ();
|
187 |
+
/**/
|
188 |
+
else if (preg_match ("/^access[_\-]s2member[_\-]level([0-9]+)\//", $_GET["s2member_file_download"])) /* Level required? */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
{
|
190 |
+
list ($level_req) = preg_split ("/\//", $_GET["s2member_file_download"], 2); /* Which Level does this require? */
|
191 |
+
$level_req = preg_replace ("/[^0-9]/", "", $level_req);
|
192 |
+
/**/
|
193 |
+
if (!$current_user->has_cap ("access_s2member_level" . $level_req) /* Does the User have access to this Level? */
|
194 |
+
&& wp_redirect (add_query_arg (array ("s2member_level_req" => $level_req, "s2member_file_download_req" => $_GET["s2member_file_download"]), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"]))) !== "nill")
|
195 |
+
exit ();
|
196 |
}
|
197 |
+
/**/
|
198 |
+
else if (preg_match ("/^access[_\-]s2member[_\-]ccap[_\-](.+?)\//", $_GET["s2member_file_download"])) /* Custom Capability? */
|
199 |
+
{
|
200 |
+
list ($ccap_req) = preg_split ("/\//", $_GET["s2member_file_download"], 2); /* Which Capability does this require? */
|
201 |
+
$ccap_req = preg_replace ("/-/", "_", $ccap_req);
|
202 |
+
/**/
|
203 |
+
if (!$current_user->has_cap ($ccap_req) /* Does the User have access to this Custom Capability? */
|
204 |
+
&& wp_redirect (add_query_arg (array ("s2member_ccap_req" => $ccap_req, "s2member_file_download_req" => $_GET["s2member_file_download"]), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"]))) !== "nill")
|
205 |
+
exit ();
|
206 |
+
}
|
207 |
+
/**/
|
208 |
+
$previous_file_downloads = 0; /* Here we're going to count how many downloads they've performed. */
|
209 |
+
$max_days_logged = ws_plugin__s2member_max_download_period (); /* The longest period in days. */
|
210 |
+
$file_download_access_log = (array)get_usermeta ($current_user->ID, "s2member_file_download_access_log");
|
211 |
+
$file_download_access_arc = (array)get_usermeta ($current_user->ID, "s2member_file_download_access_arc");
|
212 |
+
/**/
|
213 |
+
foreach ($file_download_access_log as $file_download_access_log_entry_key => $file_download_access_log_entry)
|
214 |
{
|
215 |
+
if (strtotime ($file_download_access_log_entry["date"]) < strtotime ("-" . $max_days_logged . " days"))
|
216 |
+
{
|
217 |
+
unset ($file_download_access_log[$file_download_access_log_entry_key]);
|
218 |
+
$file_download_access_arc[] = $file_download_access_log_entry;
|
219 |
+
}
|
220 |
+
else if (strtotime ($file_download_access_log_entry["date"]) >= strtotime ("-" . $file_downloads["allowed_days"] . " days"))
|
221 |
+
{
|
222 |
+
$previous_file_downloads++;
|
223 |
+
/* Here we check if this file has already been downloaded. */
|
224 |
+
if ($file_download_access_log_entry["file"] === $_GET["s2member_file_download"])
|
225 |
+
$already_downloaded = true;
|
226 |
+
}
|
227 |
}
|
228 |
+
/**/
|
229 |
+
if (!$already_downloaded && $previous_file_downloads >= $file_downloads["allowed"] /* They have NOT already downloaded this file, and they're over their limit. */
|
230 |
+
&& wp_redirect (add_query_arg (array ("s2member_file_download_req" => $_GET["s2member_file_download"]), get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_limit_exceeded_page"]))) !== "nill")
|
231 |
+
exit ();
|
232 |
+
/**/
|
233 |
+
if (!$already_downloaded) /* Only add this file to the log if they have not already downloaded it. */
|
234 |
+
$file_download_access_log[] = array ("date" => date ("Y-m-d"), "file" => $_GET["s2member_file_download"]);
|
235 |
+
/**/
|
236 |
+
update_usermeta ($current_user->ID, "s2member_file_download_access_arc", ws_plugin__s2member_array_unique ($file_download_access_arc));
|
237 |
+
update_usermeta ($current_user->ID, "s2member_file_download_access_log", ws_plugin__s2member_array_unique ($file_download_access_log));
|
238 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
}
|
240 |
+
else /* Otherwise... it's either $excluded; or permission was granted with a valid Download Key. */
|
241 |
{
|
242 |
$_GET["s2member_file_download"] = trim ($_GET["s2member_file_download"], "/");
|
243 |
/**/
|
244 |
if (!file_exists ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] . "/" . $_GET["s2member_file_download"]))
|
245 |
{
|
246 |
+
header ("HTTP/1.0 404 Not Found"); /* The file does NOT even exist. */
|
247 |
+
exit ("404: Sorry, file not found. Please contact Support for assistance.");
|
248 |
}
|
249 |
}
|
250 |
/*
|
262 |
do_action ("ws_plugin__s2member_during_file_download_access", get_defined_vars ());
|
263 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
264 |
/*
|
265 |
+
Now send the file to the browser.
|
266 |
+
Be sure to turn off output compression.
|
267 |
*/
|
268 |
set_time_limit (0); /* Make time. */
|
269 |
ini_set ("zlib.output_compression", 0);
|
303 |
do_action ("ws_plugin__s2member_before_file_download_key", get_defined_vars ());
|
304 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
305 |
/**/
|
306 |
+
$salt = ($cache_compatible) ? $file : date ("Y-m-d") . $_SERVER["REMOTE_ADDR"] . $_SERVER["HTTP_USER_AGENT"] . $file;
|
|
|
307 |
$key = md5 (ws_plugin__s2member_xencrypt ($salt));
|
308 |
/**/
|
309 |
if (!$cache_compatible) /* Disallow caching. */
|
includes/functions/login-redirection.inc.php
CHANGED
@@ -65,10 +65,11 @@ if (!function_exists ("ws_plugin__s2member_fill_login_redirect_rc_vars"))
|
|
65 |
$current_user = (is_object ($current_user)) ? $current_user : wp_get_current_user ();
|
66 |
$current_user_login = (is_object ($current_user)) ? strtolower ($current_user->user_login) : "";
|
67 |
$current_user_ID = (is_object ($current_user)) ? (string)$current_user->ID : "";
|
|
|
68 |
/**/
|
69 |
$url = preg_replace ("/%%current_user_login%%/i", ws_plugin__s2member_esc_ds ($current_user_login), $url);
|
70 |
$url = preg_replace ("/%%current_user_ID%%/i", ws_plugin__s2member_esc_ds ($current_user_ID), $url);
|
71 |
-
$url = preg_replace ("/%%current_user_level%%/i",
|
72 |
/**/
|
73 |
return apply_filters ("ws_plugin__s2member_fill_login_redirect_rc_vars", $url, get_defined_vars ());
|
74 |
}
|
65 |
$current_user = (is_object ($current_user)) ? $current_user : wp_get_current_user ();
|
66 |
$current_user_login = (is_object ($current_user)) ? strtolower ($current_user->user_login) : "";
|
67 |
$current_user_ID = (is_object ($current_user)) ? (string)$current_user->ID : "";
|
68 |
+
$current_user_level = (string)ws_plugin__s2member_user_access_level ($current_user);
|
69 |
/**/
|
70 |
$url = preg_replace ("/%%current_user_login%%/i", ws_plugin__s2member_esc_ds ($current_user_login), $url);
|
71 |
$url = preg_replace ("/%%current_user_ID%%/i", ws_plugin__s2member_esc_ds ($current_user_ID), $url);
|
72 |
+
$url = preg_replace ("/%%current_user_level%%/i", ws_plugin__s2member_esc_ds ($current_user_level), $url);
|
73 |
/**/
|
74 |
return apply_filters ("ws_plugin__s2member_fill_login_redirect_rc_vars", $url, get_defined_vars ());
|
75 |
}
|
includes/functions/register-access.inc.php
CHANGED
@@ -467,8 +467,9 @@ if (!function_exists ("ws_plugin__s2member_configure_user_registration"))
|
|
467 |
if (($url = preg_replace ("/%%user_email%%/i", ws_plugin__s2member_esc_ds (urlencode ($email)), $url)))
|
468 |
if (($url = preg_replace ("/%%user_login%%/i", ws_plugin__s2member_esc_ds (urlencode ($login)), $url)))
|
469 |
if (($url = preg_replace ("/%%user_pass%%/i", ws_plugin__s2member_esc_ds (urlencode ($pass)), $url)))
|
470 |
-
if (($url =
|
471 |
-
|
|
|
472 |
/**/
|
473 |
if ($url = $GLOBALS["ws_plugin__s2member_registration_return_url"])
|
474 |
if (($url = preg_replace ("/%%cv([0-9]+)%%/ei", 'urlencode(trim($cv[$1]))', $url)))
|
@@ -479,8 +480,9 @@ if (!function_exists ("ws_plugin__s2member_configure_user_registration"))
|
|
479 |
if (($url = preg_replace ("/%%user_email%%/i", ws_plugin__s2member_esc_ds (urlencode ($email)), $url)))
|
480 |
if (($url = preg_replace ("/%%user_login%%/i", ws_plugin__s2member_esc_ds (urlencode ($login)), $url)))
|
481 |
if (($url = preg_replace ("/%%user_pass%%/i", ws_plugin__s2member_esc_ds (urlencode ($pass)), $url)))
|
482 |
-
if (($url =
|
483 |
-
$
|
|
|
484 |
/**/
|
485 |
setcookie ("s2member_subscr_id", "", time () + 31556926, "/");
|
486 |
setcookie ("s2member_custom", "", time () + 31556926, "/");
|
467 |
if (($url = preg_replace ("/%%user_email%%/i", ws_plugin__s2member_esc_ds (urlencode ($email)), $url)))
|
468 |
if (($url = preg_replace ("/%%user_login%%/i", ws_plugin__s2member_esc_ds (urlencode ($login)), $url)))
|
469 |
if (($url = preg_replace ("/%%user_pass%%/i", ws_plugin__s2member_esc_ds (urlencode ($pass)), $url)))
|
470 |
+
if (($url = preg_replace ("/%%user_id%%/i", ws_plugin__s2member_esc_ds (urlencode ($user_id)), $url)))
|
471 |
+
if (($url = trim ($url))) /* Empty? */
|
472 |
+
ws_plugin__s2member_remote ($url);
|
473 |
/**/
|
474 |
if ($url = $GLOBALS["ws_plugin__s2member_registration_return_url"])
|
475 |
if (($url = preg_replace ("/%%cv([0-9]+)%%/ei", 'urlencode(trim($cv[$1]))', $url)))
|
480 |
if (($url = preg_replace ("/%%user_email%%/i", ws_plugin__s2member_esc_ds (urlencode ($email)), $url)))
|
481 |
if (($url = preg_replace ("/%%user_login%%/i", ws_plugin__s2member_esc_ds (urlencode ($login)), $url)))
|
482 |
if (($url = preg_replace ("/%%user_pass%%/i", ws_plugin__s2member_esc_ds (urlencode ($pass)), $url)))
|
483 |
+
if (($url = preg_replace ("/%%user_id%%/i", ws_plugin__s2member_esc_ds (urlencode ($user_id)), $url)))
|
484 |
+
if (($url = trim ($url))) /* Empty? ... Otherwise, re-fill. */
|
485 |
+
$GLOBALS["ws_plugin__s2member_registration_return_url"] = $url;
|
486 |
/**/
|
487 |
setcookie ("s2member_subscr_id", "", time () + 31556926, "/");
|
488 |
setcookie ("s2member_custom", "", time () + 31556926, "/");
|
includes/functions/ruri-level-access.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("Do not access this file directly.");
|
16 |
/*
|
17 |
Function for handling Request URI Level Access permissions.
|
18 |
Attach to: add_action("template_redirect");
|
@@ -69,17 +69,18 @@ if (!function_exists ("ws_plugin__s2member_fill_ruri_level_access_rc_vars"))
|
|
69 |
{
|
70 |
function ws_plugin__s2member_fill_ruri_level_access_rc_vars ($uris = FALSE, $current_user = FALSE)
|
71 |
{
|
72 |
-
eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
73 |
do_action ("ws_plugin__s2member_before_fill_ruri_level_access_rc_vars", get_defined_vars ());
|
74 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
75 |
/**/
|
76 |
$current_user = (is_object ($current_user)) ? $current_user : wp_get_current_user ();
|
77 |
$current_user_login = (is_object ($current_user)) ? strtolower ($current_user->user_login) : "";
|
78 |
$current_user_ID = (is_object ($current_user)) ? (string)$current_user->ID : "";
|
|
|
79 |
/**/
|
80 |
$uris = preg_replace ("/%%current_user_login%%/i", ws_plugin__s2member_esc_ds ($current_user_login), $uris);
|
81 |
$uris = preg_replace ("/%%current_user_ID%%/i", ws_plugin__s2member_esc_ds ($current_user_ID), $uris);
|
82 |
-
$uris = preg_replace ("/%%current_user_level%%/i",
|
83 |
/**/
|
84 |
return apply_filters ("ws_plugin__s2member_fill_ruri_level_access_rc_vars", $uris, get_defined_vars ());
|
85 |
}
|
12 |
Direct access denial.
|
13 |
*/
|
14 |
if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
15 |
+
exit ("Do not access this file directly.");
|
16 |
/*
|
17 |
Function for handling Request URI Level Access permissions.
|
18 |
Attach to: add_action("template_redirect");
|
69 |
{
|
70 |
function ws_plugin__s2member_fill_ruri_level_access_rc_vars ($uris = FALSE, $current_user = FALSE)
|
71 |
{
|
72 |
+
eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
|
73 |
do_action ("ws_plugin__s2member_before_fill_ruri_level_access_rc_vars", get_defined_vars ());
|
74 |
unset ($__refs, $__v); /* Unset defined __refs, __v. */
|
75 |
/**/
|
76 |
$current_user = (is_object ($current_user)) ? $current_user : wp_get_current_user ();
|
77 |
$current_user_login = (is_object ($current_user)) ? strtolower ($current_user->user_login) : "";
|
78 |
$current_user_ID = (is_object ($current_user)) ? (string)$current_user->ID : "";
|
79 |
+
$current_user_level = (string)ws_plugin__s2member_user_access_level ($current_user);
|
80 |
/**/
|
81 |
$uris = preg_replace ("/%%current_user_login%%/i", ws_plugin__s2member_esc_ds ($current_user_login), $uris);
|
82 |
$uris = preg_replace ("/%%current_user_ID%%/i", ws_plugin__s2member_esc_ds ($current_user_ID), $uris);
|
83 |
+
$uris = preg_replace ("/%%current_user_level%%/i", ws_plugin__s2member_esc_ds ($current_user_level), $uris);
|
84 |
/**/
|
85 |
return apply_filters ("ws_plugin__s2member_fill_ruri_level_access_rc_vars", $uris, get_defined_vars ());
|
86 |
}
|
includes/functions/user-access-level.inc.php
CHANGED
@@ -15,41 +15,50 @@ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
|
15 |
exit ("Do not access this file directly.");
|
16 |
/*
|
17 |
Function for determing the Access Level of a User/Member.
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
*/
|
20 |
if (!function_exists ("ws_plugin__s2member_user_access_level"))
|
21 |
{
|
22 |
-
function ws_plugin__s2member_user_access_level ()
|
23 |
{
|
24 |
-
|
|
|
|
|
25 |
{
|
26 |
return apply_filters ("ws_plugin__s2member_user_access_level", -1, get_defined_vars ());
|
27 |
-
/* Return of -1, means
|
28 |
}
|
29 |
-
else if (current_user_can ("access_s2member_level4"))
|
30 |
{
|
31 |
return apply_filters ("ws_plugin__s2member_user_access_level", 4, get_defined_vars ());
|
32 |
-
/* Member logged in with Level 4 Access. */
|
33 |
}
|
34 |
-
else if (current_user_can ("access_s2member_level3"))
|
35 |
{
|
36 |
return apply_filters ("ws_plugin__s2member_user_access_level", 3, get_defined_vars ());
|
37 |
-
/* Member logged in with Level 3 Access. */
|
38 |
}
|
39 |
-
else if (current_user_can ("access_s2member_level2"))
|
40 |
{
|
41 |
return apply_filters ("ws_plugin__s2member_user_access_level", 2, get_defined_vars ());
|
42 |
-
/* Member logged in with Level 2 Access. */
|
43 |
}
|
44 |
-
else if (current_user_can ("access_s2member_level1"))
|
45 |
{
|
46 |
return apply_filters ("ws_plugin__s2member_user_access_level", 1, get_defined_vars ());
|
47 |
-
/* Member logged in with Level 1 Access. */
|
48 |
}
|
49 |
-
else if (current_user_can ("access_s2member_level0"))
|
50 |
{
|
51 |
return apply_filters ("ws_plugin__s2member_user_access_level", 0, get_defined_vars ());
|
52 |
-
/* Subscriber logged in with Level 0 Access. */
|
53 |
}
|
54 |
else /* Else we assume this is a User ( a Free Subscriber with a level of 0. ). */
|
55 |
return apply_filters ("ws_plugin__s2member_user_access_level", 0, get_defined_vars ());
|
15 |
exit ("Do not access this file directly.");
|
16 |
/*
|
17 |
Function for determing the Access Level of a User/Member.
|
18 |
+
|
19 |
+
If $user is NOT passed in, check the current User/Member.
|
20 |
+
Returns -1 thru 4, according to the User/Member's Access Level.
|
21 |
+
Negative (-1) if a User/Member is NOT logged in.
|
22 |
+
|
23 |
+
If $user IS passed in, this function will check a specific $user.
|
24 |
+
Returns -1 thru 4, according to the User/Member's Access Level.
|
25 |
+
Negative (-1) if $user is passed in, but NOT an object.
|
26 |
*/
|
27 |
if (!function_exists ("ws_plugin__s2member_user_access_level"))
|
28 |
{
|
29 |
+
function ws_plugin__s2member_user_access_level ($user = FALSE)
|
30 |
{
|
31 |
+
$user = (func_num_args () && is_object ($user)) ? $user : false;
|
32 |
+
/**/
|
33 |
+
if ((func_num_args () && !$user) || (!$user && !((is_user_logged_in ()) ? wp_get_current_user () : false)))
|
34 |
{
|
35 |
return apply_filters ("ws_plugin__s2member_user_access_level", -1, get_defined_vars ());
|
36 |
+
/* Return of -1, means $user was passed in, but is NOT an object; or nobody is logged in. */
|
37 |
}
|
38 |
+
else if (($user && $user->has_cap ("access_s2member_level4")) || (!$user && current_user_can ("access_s2member_level4")))
|
39 |
{
|
40 |
return apply_filters ("ws_plugin__s2member_user_access_level", 4, get_defined_vars ());
|
41 |
+
/* The $user has; or a Member is logged in with Level 4 Access. */
|
42 |
}
|
43 |
+
else if (($user && $user->has_cap ("access_s2member_level3")) || (!$user && current_user_can ("access_s2member_level3")))
|
44 |
{
|
45 |
return apply_filters ("ws_plugin__s2member_user_access_level", 3, get_defined_vars ());
|
46 |
+
/* The $user has; or a Member is logged in with Level 3 Access. */
|
47 |
}
|
48 |
+
else if (($user && $user->has_cap ("access_s2member_level2")) || (!$user && current_user_can ("access_s2member_level2")))
|
49 |
{
|
50 |
return apply_filters ("ws_plugin__s2member_user_access_level", 2, get_defined_vars ());
|
51 |
+
/* The $user has; or a Member is logged in with Level 2 Access. */
|
52 |
}
|
53 |
+
else if (($user && $user->has_cap ("access_s2member_level1")) || (!$user && current_user_can ("access_s2member_level1")))
|
54 |
{
|
55 |
return apply_filters ("ws_plugin__s2member_user_access_level", 1, get_defined_vars ());
|
56 |
+
/* The $user has; or a Member is logged in with Level 1 Access. */
|
57 |
}
|
58 |
+
else if (($user && $user->has_cap ("access_s2member_level0")) || (!$user && current_user_can ("access_s2member_level0")))
|
59 |
{
|
60 |
return apply_filters ("ws_plugin__s2member_user_access_level", 0, get_defined_vars ());
|
61 |
+
/* The $user has; or a Free Subscriber is logged in with Level 0 Access. */
|
62 |
}
|
63 |
else /* Else we assume this is a User ( a Free Subscriber with a level of 0. ). */
|
64 |
return apply_filters ("ws_plugin__s2member_user_access_level", 0, get_defined_vars ());
|
includes/menu-pages/api-ops.inc.php
CHANGED
@@ -70,7 +70,7 @@ if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections
|
|
70 |
echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a Recurring basis, or <code>0</code> if non-Recurring. [ <a href="#" onclick="alert(\'If recurring payments have not been required, this will be equal to 0. That being said, %%regular%% & %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the regular recurring rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\'); return false;">?</a> ]</li>' . "\n";
|
71 |
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
72 |
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
73 |
-
echo '<li><code>%%full_name%%</code> = The Full Name ( First & Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
74 |
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
75 |
echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) for the Membership Subscription.</li>' . "\n";
|
76 |
echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
|
@@ -128,10 +128,11 @@ if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections
|
|
128 |
echo '<li><code>%%level%%</code> = The Level number <code>( 0, 1, 2, 3, 4 )</code>, where <code>0 = Free Subscriber</code>.</li>' . "\n";
|
129 |
echo '<li><code>%%user_first_name%%</code> = The First Name of the Member who registered their Username.</li>' . "\n";
|
130 |
echo '<li><code>%%user_last_name%%</code> = The Last Name of the Member who registered their Username.</li>' . "\n";
|
131 |
-
echo '<li><code>%%user_full_name%%</code> = The Full Name ( First & Last ) of the Member who registered their Username.</li>' . "\n";
|
132 |
echo '<li><code>%%user_email%%</code> = The Email Address of the Member who registered their Username.</li>' . "\n";
|
133 |
echo '<li><code>%%user_login%%</code> = The Username the Member selected during registration.</li>' . "\n";
|
134 |
echo '<li><code>%%user_pass%%</code> = The Password selected or generated during registration.</li>' . "\n";
|
|
|
135 |
echo '</ul>' . "\n";
|
136 |
echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
|
137 |
echo '<ul>' . "\n";
|
@@ -188,7 +189,7 @@ if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections
|
|
188 |
echo '<li><code>%%amount%%</code> = The Amount of the payment. Most affiliate programs calculate commissions from this.</li>' . "\n";
|
189 |
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
190 |
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
191 |
-
echo '<li><code>%%full_name%%</code> = The Full Name ( First & Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
192 |
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
193 |
echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) that the payment is for.</li>' . "\n";
|
194 |
echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
|
@@ -307,7 +308,7 @@ if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections
|
|
307 |
echo '<li><code>%%-amount%%</code> = The Negative Amount of the payment, that was refunded or reversed back to the Customer.</li>' . "\n";
|
308 |
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
309 |
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
310 |
-
echo '<li><code>%%full_name%%</code> = The Full Name ( First & Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
311 |
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
312 |
echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <em>level:custom_capabilities:fixed term</em> ) that the payment was for.</li>' . "\n";
|
313 |
echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
|
@@ -368,7 +369,7 @@ if (apply_filters ("ws_plugin__s2member_during_api_ops_page_during_left_sections
|
|
368 |
echo '<li><code>%%amount%%</code> = The full Amount of the sale. Most affiliate programs calculate commissions from this.</li>' . "\n";
|
369 |
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
370 |
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
371 |
-
echo '<li><code>%%full_name%%</code> = The Full Name ( First & Last ) of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
372 |
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
373 |
echo '<li><code>%%item_number%%</code> = The Item Number. Ex: <code><em>sp:13,24,36:72</em></code> ( translates to: <code><em>sp:comma-delimited IDs:expiration hours</em></code> ).</li>' . "\n";
|
374 |
echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
|
70 |
echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a Recurring basis, or <code>0</code> if non-Recurring. [ <a href="#" onclick="alert(\'If recurring payments have not been required, this will be equal to 0. That being said, %%regular%% & %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the regular recurring rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\'); return false;">?</a> ]</li>' . "\n";
|
71 |
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
72 |
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
73 |
+
echo '<li><code>%%full_name%%</code> = The Full Name ( First & Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
74 |
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
75 |
echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) for the Membership Subscription.</li>' . "\n";
|
76 |
echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
|
128 |
echo '<li><code>%%level%%</code> = The Level number <code>( 0, 1, 2, 3, 4 )</code>, where <code>0 = Free Subscriber</code>.</li>' . "\n";
|
129 |
echo '<li><code>%%user_first_name%%</code> = The First Name of the Member who registered their Username.</li>' . "\n";
|
130 |
echo '<li><code>%%user_last_name%%</code> = The Last Name of the Member who registered their Username.</li>' . "\n";
|
131 |
+
echo '<li><code>%%user_full_name%%</code> = The Full Name ( First & Last ) of the Member who registered their Username.</li>' . "\n";
|
132 |
echo '<li><code>%%user_email%%</code> = The Email Address of the Member who registered their Username.</li>' . "\n";
|
133 |
echo '<li><code>%%user_login%%</code> = The Username the Member selected during registration.</li>' . "\n";
|
134 |
echo '<li><code>%%user_pass%%</code> = The Password selected or generated during registration.</li>' . "\n";
|
135 |
+
echo '<li><code>%%user_id%%</code> = A unique WordPress® User ID generated during registration.</li>' . "\n";
|
136 |
echo '</ul>' . "\n";
|
137 |
echo '<strong>Custom Replacement Codes can also be inserted using these instructions:</strong>' . "\n";
|
138 |
echo '<ul>' . "\n";
|
189 |
echo '<li><code>%%amount%%</code> = The Amount of the payment. Most affiliate programs calculate commissions from this.</li>' . "\n";
|
190 |
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
191 |
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
192 |
+
echo '<li><code>%%full_name%%</code> = The Full Name ( First & Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
193 |
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
194 |
echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) that the payment is for.</li>' . "\n";
|
195 |
echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
|
308 |
echo '<li><code>%%-amount%%</code> = The Negative Amount of the payment, that was refunded or reversed back to the Customer.</li>' . "\n";
|
309 |
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
310 |
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
311 |
+
echo '<li><code>%%full_name%%</code> = The Full Name ( First & Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
312 |
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
313 |
echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <em>level:custom_capabilities:fixed term</em> ) that the payment was for.</li>' . "\n";
|
314 |
echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
|
369 |
echo '<li><code>%%amount%%</code> = The full Amount of the sale. Most affiliate programs calculate commissions from this.</li>' . "\n";
|
370 |
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
371 |
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
372 |
+
echo '<li><code>%%full_name%%</code> = The Full Name ( First & Last ) of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
373 |
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
374 |
echo '<li><code>%%item_number%%</code> = The Item Number. Ex: <code><em>sp:13,24,36:72</em></code> ( translates to: <code><em>sp:comma-delimited IDs:expiration hours</em></code> ).</li>' . "\n";
|
375 |
echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
|
includes/menu-pages/paypal-ops.inc.php
CHANGED
@@ -281,7 +281,7 @@ if (apply_filters ("ws_plugin__s2member_during_paypal_ops_page_during_left_secti
|
|
281 |
echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a Recurring basis, or <code>0</code> if non-Recurring. [ <a href="#" onclick="alert(\'If recurring payments have not been required, this will be equal to 0. That being said, %%regular%% & %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the regular recurring rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\'); return false;">?</a> ]</li>' . "\n";
|
282 |
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
283 |
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
284 |
-
echo '<li><code>%%full_name%%</code> = The Full Name ( First & Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
285 |
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
286 |
echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) that the Subscription is for.</li>' . "\n";
|
287 |
echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
|
@@ -381,7 +381,7 @@ if (apply_filters ("ws_plugin__s2member_during_paypal_ops_page_during_left_secti
|
|
381 |
echo '<li><code>%%amount%%</code> = The full Amount that you charged for Specific Post/Page Access. This value will <code>always be > 0</code>.</li>' . "\n";
|
382 |
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
383 |
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
384 |
-
echo '<li><code>%%full_name%%</code> = The Full Name ( First & Last ) of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
385 |
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
386 |
echo '<li><code>%%item_number%%</code> = The Item Number. Ex: <code><em>sp:13,24,36:72</em></code> ( translates to: <code><em>sp:comma-delimited IDs:expiration hours</em></code> ).</li>' . "\n";
|
387 |
echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
|
281 |
echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a Recurring basis, or <code>0</code> if non-Recurring. [ <a href="#" onclick="alert(\'If recurring payments have not been required, this will be equal to 0. That being said, %%regular%% & %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the regular recurring rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\'); return false;">?</a> ]</li>' . "\n";
|
282 |
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
283 |
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
284 |
+
echo '<li><code>%%full_name%%</code> = The Full Name ( First & Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
285 |
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
286 |
echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) that the Subscription is for.</li>' . "\n";
|
287 |
echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
|
381 |
echo '<li><code>%%amount%%</code> = The full Amount that you charged for Specific Post/Page Access. This value will <code>always be > 0</code>.</li>' . "\n";
|
382 |
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
383 |
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
384 |
+
echo '<li><code>%%full_name%%</code> = The Full Name ( First & Last ) of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
385 |
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
386 |
echo '<li><code>%%item_number%%</code> = The Item Number. Ex: <code><em>sp:13,24,36:72</em></code> ( translates to: <code><em>sp:comma-delimited IDs:expiration hours</em></code> ).</li>' . "\n";
|
387 |
echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
|
includes/menu-pages/trk-ops.inc.php
CHANGED
@@ -70,7 +70,7 @@ if (apply_filters ("ws_plugin__s2member_during_trk_ops_page_during_left_sections
|
|
70 |
echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a Recurring basis, or <code>0</code> if non-Recurring. [ <a href="#" onclick="alert(\'If recurring payments have not been required, this will be equal to 0. That being said, %%regular%% & %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the regular recurring rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\'); return false;">?</a> ]</li>' . "\n";
|
71 |
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
72 |
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
73 |
-
echo '<li><code>%%full_name%%</code> = The Full Name ( First & Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
74 |
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
75 |
echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) that the Subscription is for.</li>' . "\n";
|
76 |
echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
|
@@ -130,7 +130,7 @@ if (apply_filters ("ws_plugin__s2member_during_trk_ops_page_during_left_sections
|
|
130 |
echo '<li><code>%%amount%%</code> = The full Amount that you charged for Specific Post/Page Access. This value will <code>always be > 0</code>.</li>' . "\n";
|
131 |
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
132 |
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
133 |
-
echo '<li><code>%%full_name%%</code> = The Full Name ( First & Last ) of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
134 |
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
135 |
echo '<li><code>%%item_number%%</code> = The Item Number. Ex: <code><em>sp:13,24,36:72</em></code> ( translates to: <code><em>sp:comma-delimited IDs:expiration hours</em></code> ).</li>' . "\n";
|
136 |
echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
|
70 |
echo '<li><code>%%recurring%%</code> = This is the amount that will be charged on a Recurring basis, or <code>0</code> if non-Recurring. [ <a href="#" onclick="alert(\'If recurring payments have not been required, this will be equal to 0. That being said, %%regular%% & %%recurring%% are usually the same value. This variable can be used in two different ways. You can use it to determine what the regular recurring rate is, or to determine whether the Subscription will recur or not. If it is going to recur, %%recurring%% will be > 0.\'); return false;">?</a> ]</li>' . "\n";
|
71 |
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
72 |
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
73 |
+
echo '<li><code>%%full_name%%</code> = The Full Name ( First & Last ) of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
74 |
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased the Membership Subscription.</li>' . "\n";
|
75 |
echo '<li><code>%%item_number%%</code> = The Item Number ( colon separated <code><em>level:custom_capabilities:fixed term</em></code> ) that the Subscription is for.</li>' . "\n";
|
76 |
echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
|
130 |
echo '<li><code>%%amount%%</code> = The full Amount that you charged for Specific Post/Page Access. This value will <code>always be > 0</code>.</li>' . "\n";
|
131 |
echo '<li><code>%%first_name%%</code> = The First Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
132 |
echo '<li><code>%%last_name%%</code> = The Last Name of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
133 |
+
echo '<li><code>%%full_name%%</code> = The Full Name ( First & Last ) of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
134 |
echo '<li><code>%%payer_email%%</code> = The Email Address of the Customer who purchased Specific Post/Page Access.</li>' . "\n";
|
135 |
echo '<li><code>%%item_number%%</code> = The Item Number. Ex: <code><em>sp:13,24,36:72</em></code> ( translates to: <code><em>sp:comma-delimited IDs:expiration hours</em></code> ).</li>' . "\n";
|
136 |
echo '<li><code>%%item_name%%</code> = The Item Name ( as provided by the <code>desc=""</code> attribute in your Shortcode, which briefly describes the Item Number ).</li>' . "\n";
|
readme.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
=== s2Member ( Membership w/ PayPal® Integration ) also works w/ BuddyPress ===
|
2 |
|
3 |
-
Version: 3.1.
|
4 |
-
Stable tag: 3.1.
|
5 |
Framework: WS-P-3.0
|
6 |
|
7 |
SSL Compatible: yes
|
@@ -156,6 +156,11 @@ Not yet. This is coming soon though. It will be included in a future release of
|
|
156 |
|
157 |
== Changelog ==
|
158 |
|
|
|
|
|
|
|
|
|
|
|
159 |
= 3.1.4 =
|
160 |
* Bug fix. Conditional check against `DOING_AJAX` added as an exclusion to the admin lockout routines for s2Member. This allows `/wp-admin/admin-ajax.php` to receive Ajax requests at all times, as it should be.
|
161 |
|
1 |
=== s2Member ( Membership w/ PayPal® Integration ) also works w/ BuddyPress ===
|
2 |
|
3 |
+
Version: 3.1.5
|
4 |
+
Stable tag: 3.1.5
|
5 |
Framework: WS-P-3.0
|
6 |
|
7 |
SSL Compatible: yes
|
156 |
|
157 |
== Changelog ==
|
158 |
|
159 |
+
= 3.1.5 =
|
160 |
+
* Bug fix. The Replacment Code ( `%%current_user_level%%` ); which works in conjunction with a Login Welcome Page URL, and also with URI Level Access was always returning `-1`. This has been corrected in v3.1.5+.
|
161 |
+
* General cleanup and improved routines inside `/includes/file-download-access.inc.php`. No functionality changes, just subtle improvements in the logic behind s2Member's File Download Restrictions.
|
162 |
+
* New Replacement Code for s2Member's Registration API Notification. The Replacement Code ( `%%user_id%%` ) is now available to developers.
|
163 |
+
|
164 |
= 3.1.4 =
|
165 |
* Bug fix. Conditional check against `DOING_AJAX` added as an exclusion to the admin lockout routines for s2Member. This allows `/wp-admin/admin-ajax.php` to receive Ajax requests at all times, as it should be.
|
166 |
|
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.1.
|
13 |
-
Stable tag: 3.1.
|
14 |
Framework: WS-P-3.0
|
15 |
|
16 |
SSL Compatible: yes
|
@@ -47,7 +47,7 @@ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
|
|
47 |
/*
|
48 |
Define versions.
|
49 |
*/
|
50 |
-
define ("WS_PLUGIN__S2MEMBER_VERSION", "3.1.
|
51 |
define ("WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION", "5.2");
|
52 |
define ("WS_PLUGIN__S2MEMBER_MIN_WP_VERSION", "3.0");
|
53 |
define ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "1.1");
|
9 |
If not, see: <http://www.gnu.org/licenses/>.
|
10 |
*/
|
11 |
/*
|
12 |
+
Version: 3.1.5
|
13 |
+
Stable tag: 3.1.5
|
14 |
Framework: WS-P-3.0
|
15 |
|
16 |
SSL Compatible: yes
|
47 |
/*
|
48 |
Define versions.
|
49 |
*/
|
50 |
+
define ("WS_PLUGIN__S2MEMBER_VERSION", "3.1.5");
|
51 |
define ("WS_PLUGIN__S2MEMBER_MIN_PHP_VERSION", "5.2");
|
52 |
define ("WS_PLUGIN__S2MEMBER_MIN_WP_VERSION", "3.0");
|
53 |
define ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "1.1");
|