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

Version Description

Download this release

Release Info

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

Code changes from version 110926 to 110927

includes/classes/files-in.inc.php CHANGED
@@ -37,7 +37,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
37
  * @also-called-by: API Function {@link s2Member\API_Functions\s2member_file_download_url()}, w/ ``$create_file_download_url`` param.
38
  *
39
  * @param array $create_file_download_url Optional. If this function is called directly, we can pass arguments through this array.
40
- * Possible array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `ignore_user`.
41
  * @return null|str If called directly with ``$create_file_download_url``, returns a string with the URL, based on configuration.
42
  * Else, this function may exit script execution after serving a File Download.
43
  */
@@ -68,7 +68,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
68
  $req["skip_confirmation"] = ($creating) ? @$create["skip_confirmation"] : /* N/A. */ null;
69
  $req["url_to_storage_source"] = ($creating) ? @$create["url_to_storage_source"] : /* N/A. */ null;
70
  $req["count_against_user"] = ($creating) ? @$create["count_against_user"] : /* N/A. */ null;
71
- $req["ignore_user"] = ($creating) ? @$create["ignore_user"] : /* N/A. */ null;
72
  /**/
73
  if ($req["file_download"] && is_string ($req["file_download"]) && ($req["file_download"] = trim ($req["file_download"], "/")))
74
  if (strpos ($req["file_download"], "..") === false && strpos (basename ($req["file_download"]), ".") !== 0)
@@ -82,7 +82,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
82
  /**/
83
  $excluded = apply_filters ("ws_plugin__s2member_check_file_download_access_excluded", false, get_defined_vars ());
84
  $valid_file_download_key = ($req["file_download_key"] && is_string ($req["file_download_key"])) ? c_ws_plugin__s2member_files_in::check_file_download_key ($req["file_download"], $req["file_download_key"]) : false;
85
- $checking_user = ($excluded || $valid_file_download_key || ($creating && isset ($req["ignore_user"]) && filter_var ($req["ignore_user"], FILTER_VALIDATE_BOOLEAN))) ? false : true; /* Checking User? */
86
  $updating_user_counter = (!$checking_user || ($creating && (!isset ($req["count_against_user"]) || !filter_var ($req["count_against_user"], FILTER_VALIDATE_BOOLEAN)))) ? false : true;
87
  /**/
88
  if (($serving || $creating) && $checking_user) /* In either case, the following routines apply whenever we ARE ``$checking_user``. */
@@ -381,9 +381,11 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
381
  * @since 110926
382
  *
383
  * @param array $config Required. This is an array of configuration options associated with permissions being checked against the current User/Member; and also the actual URL generated by this routine.
384
- * Possible ``$config`` array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `ignore_user`.
 
385
  * @return str A File Download URL string on success; or an array on success, with elements `streamer`, `file`, `url` when/if ``$get_streamer_array`` is true; else false on any type of failure.
386
- * Note: by default, this function DOES consider the current User/Member. If `ignore_user` is NOT set, or is set to false, this function MAY very well return false, when/if the current User/Member is NOT allowed access to the `file_download`, based on configuration.
 
387
  */
388
  public static function create_file_download_url ($config = FALSE, $get_streamer_array = FALSE)
389
  {
@@ -394,8 +396,7 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
394
  $config = (is_array ($config)) ? $config : array (); /* This absolutely MUST be an array. */
395
  /**/
396
  $config["file_download"] = (isset ($config["file_download"]) && is_string ($config["file_download"])) ? trim ($config["file_download"], "/") : @$config["file_download"];
397
- $config["file_download_key"] = (isset ($config["file_download"]) && is_string ($config["file_download"]) && !empty ($config["file_download_key"])) /* Automatically generate a File Download Key here? */
398
- ? c_ws_plugin__s2member_files::file_download_key ($config["file_download"], ((in_array ($config["file_download_key"], array ("ip-forever", "universal", "cache-compatible"))) ? $config["file_download_key"] : false)) : @$config["file_download_key"];
399
  /**/
400
  $config["url_to_storage_source"] = /* Force a streaming URL here via ``$get_streamer_array``? */ ($get_streamer_array) ? true : @$config["url_to_storage_source"];
401
  $config["file_stream"] = /* Force a streaming URL here via ``$get_streamer_array``? */ ($get_streamer_array) ? true : @$config["file_stream"];
@@ -410,10 +411,10 @@ if (!class_exists ("c_ws_plugin__s2member_files_in"))
410
  $streaming = (isset ($config["file_stream"])) ? filter_var ($config["file_stream"], FILTER_VALIDATE_BOOLEAN) : ((in_array ($extension, preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_stream_extensions"]))) ? true : false);
411
  $ssl = (isset ($config["file_ssl"])) ? filter_var ($config["file_ssl"], FILTER_VALIDATE_BOOLEAN) : ((is_ssl ()) ? true : false);
412
  /**/
413
- if ($get_streamer_array && $streaming && ($cfx = "/cfx/st") && ($cfx_pos = strpos ($_url, $cfx)) !== false && ($streamer = substr ($_url, 0, $cfx_pos + strlen ($cfx))) && ($url = c_ws_plugin__s2member_files_in::check_file_download_access (array_merge ($config, array ("file_stream" => false, "ignore_user" => true)))))
414
  $return = array ("streamer" => $streamer, "file" => preg_replace ("/^" . preg_quote ($streamer, "/") . "\//", "", $_url), "url" => preg_replace ("/^.+?\:/", (($ssl) ? "https:" : "http:"), $url));
415
  /**/
416
- else if ($get_streamer_array && $streaming && is_array ($ups = @parse_url ($_url)) && ($streamer = $ups["scheme"] . "://" . $ups["host"] . ((!empty ($ups["port"])) ? ":" . $ups["port"] : "")) && ($url = c_ws_plugin__s2member_files_in::check_file_download_access (array_merge ($config, array ("file_stream" => false, "ignore_user" => true)))))
417
  $return = array ("streamer" => $streamer, "file" => preg_replace ("/^" . preg_quote ($streamer, "/") . "\//", "", $_url), "url" => preg_replace ("/^.+?\:/", (($ssl) ? "https:" : "http:"), $url));
418
  /**/
419
  else if ($get_streamer_array) /* Else, we MUST return false here, unable to acquire streamer/file. */
37
  * @also-called-by: API Function {@link s2Member\API_Functions\s2member_file_download_url()}, w/ ``$create_file_download_url`` param.
38
  *
39
  * @param array $create_file_download_url Optional. If this function is called directly, we can pass arguments through this array.
40
+ * Possible array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `check_user`.
41
  * @return null|str If called directly with ``$create_file_download_url``, returns a string with the URL, based on configuration.
42
  * Else, this function may exit script execution after serving a File Download.
43
  */
68
  $req["skip_confirmation"] = ($creating) ? @$create["skip_confirmation"] : /* N/A. */ null;
69
  $req["url_to_storage_source"] = ($creating) ? @$create["url_to_storage_source"] : /* N/A. */ null;
70
  $req["count_against_user"] = ($creating) ? @$create["count_against_user"] : /* N/A. */ null;
71
+ $req["check_user"] = ($creating) ? @$create["check_user"] : /* N/A. */ null;
72
  /**/
73
  if ($req["file_download"] && is_string ($req["file_download"]) && ($req["file_download"] = trim ($req["file_download"], "/")))
74
  if (strpos ($req["file_download"], "..") === false && strpos (basename ($req["file_download"]), ".") !== 0)
82
  /**/
83
  $excluded = apply_filters ("ws_plugin__s2member_check_file_download_access_excluded", false, get_defined_vars ());
84
  $valid_file_download_key = ($req["file_download_key"] && is_string ($req["file_download_key"])) ? c_ws_plugin__s2member_files_in::check_file_download_key ($req["file_download"], $req["file_download_key"]) : false;
85
+ $checking_user = ($excluded || $valid_file_download_key || ($creating && (!isset ($req["check_user"]) || !filter_var ($req["check_user"], FILTER_VALIDATE_BOOLEAN)) && (!isset ($req["count_against_user"]) || !filter_var ($req["count_against_user"], FILTER_VALIDATE_BOOLEAN)))) ? false : true;
86
  $updating_user_counter = (!$checking_user || ($creating && (!isset ($req["count_against_user"]) || !filter_var ($req["count_against_user"], FILTER_VALIDATE_BOOLEAN)))) ? false : true;
87
  /**/
88
  if (($serving || $creating) && $checking_user) /* In either case, the following routines apply whenever we ARE ``$checking_user``. */
381
  * @since 110926
382
  *
383
  * @param array $config Required. This is an array of configuration options associated with permissions being checked against the current User/Member; and also the actual URL generated by this routine.
384
+ * Possible ``$config`` array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `check_user`.
385
+ * @param bool $get_streamer_array Optional. Defaults to `false`. If `true`, this function will return an array with the following elements: `streamer`, `file`, `url`. For further details, please review this section in your Dashboard: `s2Member -> Download Options -> JW Player® & RTMP Protocol Examples`.
386
  * @return str A File Download URL string on success; or an array on success, with elements `streamer`, `file`, `url` when/if ``$get_streamer_array`` is true; else false on any type of failure.
387
+ *
388
+ * @see s2Member\API_Functions\s2member_file_download_url()
389
  */
390
  public static function create_file_download_url ($config = FALSE, $get_streamer_array = FALSE)
391
  {
396
  $config = (is_array ($config)) ? $config : array (); /* This absolutely MUST be an array. */
397
  /**/
398
  $config["file_download"] = (isset ($config["file_download"]) && is_string ($config["file_download"])) ? trim ($config["file_download"], "/") : @$config["file_download"];
399
+ $config["file_download_key"] = (isset ($config["file_download"]) && is_string ($config["file_download"]) && !empty ($config["file_download_key"])) ? c_ws_plugin__s2member_files::file_download_key ($config["file_download"], ((in_array ($config["file_download_key"], array ("ip-forever", "universal", "cache-compatible"))) ? $config["file_download_key"] : false)) : @$config["file_download_key"];
 
400
  /**/
401
  $config["url_to_storage_source"] = /* Force a streaming URL here via ``$get_streamer_array``? */ ($get_streamer_array) ? true : @$config["url_to_storage_source"];
402
  $config["file_stream"] = /* Force a streaming URL here via ``$get_streamer_array``? */ ($get_streamer_array) ? true : @$config["file_stream"];
411
  $streaming = (isset ($config["file_stream"])) ? filter_var ($config["file_stream"], FILTER_VALIDATE_BOOLEAN) : ((in_array ($extension, preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["file_download_stream_extensions"]))) ? true : false);
412
  $ssl = (isset ($config["file_ssl"])) ? filter_var ($config["file_ssl"], FILTER_VALIDATE_BOOLEAN) : ((is_ssl ()) ? true : false);
413
  /**/
414
+ if ($get_streamer_array && $streaming && ($cfx = "/cfx/st") && ($cfx_pos = strpos ($_url, $cfx)) !== false && ($streamer = substr ($_url, 0, $cfx_pos + strlen ($cfx))) && ($url = c_ws_plugin__s2member_files_in::check_file_download_access (array_merge ($config, array ("file_stream" => false, "check_user" => false)))))
415
  $return = array ("streamer" => $streamer, "file" => preg_replace ("/^" . preg_quote ($streamer, "/") . "\//", "", $_url), "url" => preg_replace ("/^.+?\:/", (($ssl) ? "https:" : "http:"), $url));
416
  /**/
417
+ else if ($get_streamer_array && $streaming && is_array ($ups = @parse_url ($_url)) && ($streamer = $ups["scheme"] . "://" . $ups["host"] . ((!empty ($ups["port"])) ? ":" . $ups["port"] : "")) && ($url = c_ws_plugin__s2member_files_in::check_file_download_access (array_merge ($config, array ("file_stream" => false, "check_user" => false)))))
418
  $return = array ("streamer" => $streamer, "file" => preg_replace ("/^" . preg_quote ($streamer, "/") . "\//", "", $_url), "url" => preg_replace ("/^.+?\:/", (($ssl) ? "https:" : "http:"), $url));
419
  /**/
420
  else if ($get_streamer_array) /* Else, we MUST return false here, unable to acquire streamer/file. */
includes/classes/files.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_files"))
21
  {
@@ -37,7 +37,7 @@ if (!class_exists ("c_ws_plugin__s2member_files"))
37
  * @also-called-by: API Function {@link s2Member\API_Functions\s2member_file_download_url()}, w/ ``$create_file_download_url`` param.
38
  *
39
  * @param array $create_file_download_url Optional. If this function is called directly, we can pass arguments through this array.
40
- * Possible array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `ignore_user`.
41
  * @return null|str If called directly with ``$create_file_download_url``, returns a string with the URL, based on configuration.
42
  * Else, this function may exit script execution after serving a File Download.
43
  */
@@ -55,9 +55,11 @@ if (!class_exists ("c_ws_plugin__s2member_files"))
55
  * @since 110926
56
  *
57
  * @param array $config Required. This is an array of configuration options associated with permissions being checked against the current User/Member; and also the actual URL generated by this routine.
58
- * Possible ``$config`` array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `ignore_user`.
 
59
  * @return str A File Download URL string on success; or an array on success, with elements `streamer`, `file`, `url` when/if ``$get_streamer_array`` is true; else false on any type of failure.
60
- * Note: by default, this function DOES consider the current User/Member. If `ignore_user` is NOT set, or is set to false, this function MAY very well return false, when/if the current User/Member is NOT allowed access to the `file_download`, based on configuration.
 
61
  */
62
  public static function create_file_download_url ($config = FALSE, $get_streamer_array = FALSE) /* Calls inner routine. */
63
  {
@@ -145,7 +147,7 @@ if (!class_exists ("c_ws_plugin__s2member_files"))
145
  */
146
  public static function user_downloads ($user = FALSE, $not_counting_this_particular_file = FALSE, $log = NULL)
147
  {
148
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
149
  do_action ("ws_plugin__s2member_before_user_downloads", get_defined_vars ());
150
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
151
  /**/
@@ -194,20 +196,20 @@ if (!class_exists ("c_ws_plugin__s2member_files"))
194
  */
195
  public static function file_download_key ($file = FALSE, $directive = FALSE)
196
  {
197
- eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
198
  do_action ("ws_plugin__s2member_before_file_download_key", get_defined_vars ());
199
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
200
  /**/
201
  $file = ($file && is_string ($file) && ($file = trim ($file, "/"))) ? $file : "";
202
  /**/
203
  if ($directive === "ip-forever") /* Allows the current IP forever. */
204
- eval ('$allow_caching = false; $salt = $file . $_SERVER["REMOTE_ADDR"];');
205
  /**/
206
  else if ($directive === "universal" || $directive === "cache-compatible" || $directive)
207
- eval ('$allow_caching = true; $salt = $file;');
208
  /**/
209
  else /* Otherwise, we use the default ``$salt``, which is VERY restrictive; even to a specific browser. */
210
- eval ('$allow_caching = false; $salt = date ("Y-m-d") . $_SERVER["REMOTE_ADDR"] . $_SERVER["HTTP_USER_AGENT"] . $file;');
211
  /**/
212
  $key = md5 (c_ws_plugin__s2member_utils_encryption::xencrypt ($salt));
213
  /**/
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_files"))
21
  {
37
  * @also-called-by: API Function {@link s2Member\API_Functions\s2member_file_download_url()}, w/ ``$create_file_download_url`` param.
38
  *
39
  * @param array $create_file_download_url Optional. If this function is called directly, we can pass arguments through this array.
40
+ * Possible array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `check_user`.
41
  * @return null|str If called directly with ``$create_file_download_url``, returns a string with the URL, based on configuration.
42
  * Else, this function may exit script execution after serving a File Download.
43
  */
55
  * @since 110926
56
  *
57
  * @param array $config Required. This is an array of configuration options associated with permissions being checked against the current User/Member; and also the actual URL generated by this routine.
58
+ * Possible ``$config`` array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `check_user`.
59
+ * @param bool $get_streamer_array Optional. Defaults to `false`. If `true`, this function will return an array with the following elements: `streamer`, `file`, `url`. For further details, please review this section in your Dashboard: `s2Member -> Download Options -> JW Player® & RTMP Protocol Examples`.
60
  * @return str A File Download URL string on success; or an array on success, with elements `streamer`, `file`, `url` when/if ``$get_streamer_array`` is true; else false on any type of failure.
61
+ *
62
+ * @see s2Member\API_Functions\s2member_file_download_url()
63
  */
64
  public static function create_file_download_url ($config = FALSE, $get_streamer_array = FALSE) /* Calls inner routine. */
65
  {
147
  */
148
  public static function user_downloads ($user = FALSE, $not_counting_this_particular_file = FALSE, $log = NULL)
149
  {
150
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
151
  do_action ("ws_plugin__s2member_before_user_downloads", get_defined_vars ());
152
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
153
  /**/
196
  */
197
  public static function file_download_key ($file = FALSE, $directive = FALSE)
198
  {
199
+ eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
200
  do_action ("ws_plugin__s2member_before_file_download_key", get_defined_vars ());
201
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
202
  /**/
203
  $file = ($file && is_string ($file) && ($file = trim ($file, "/"))) ? $file : "";
204
  /**/
205
  if ($directive === "ip-forever") /* Allows the current IP forever. */
206
+ eval('$allow_caching = false; $salt = $file . $_SERVER["REMOTE_ADDR"];');
207
  /**/
208
  else if ($directive === "universal" || $directive === "cache-compatible" || $directive)
209
+ eval('$allow_caching = true; $salt = $file;');
210
  /**/
211
  else /* Otherwise, we use the default ``$salt``, which is VERY restrictive; even to a specific browser. */
212
+ eval('$allow_caching = false; $salt = date ("Y-m-d") . $_SERVER["REMOTE_ADDR"] . $_SERVER["HTTP_USER_AGENT"] . $file;');
213
  /**/
214
  $key = md5 (c_ws_plugin__s2member_utils_encryption::xencrypt ($salt));
215
  /**/
includes/classes/menu-pages.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
21
  {
@@ -48,7 +48,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
48
  {
49
  $updated_all_options = false; /* Initialize this to a value of false. Initializing this variable here makes it an available reference-variable to Hooks/Filters. */
50
  /**/
51
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
52
  do_action ("ws_plugin__s2member_before_update_all_options", get_defined_vars ()); /* If you use this Hook, be sure to use ``wp_verify_nonce()``. */
53
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
54
  /**/
@@ -70,7 +70,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
70
  /**/
71
  unset ($key, $value); /* Unset these utility variables now. This prevents bleeding vars into Hooks/Filters that are of no use. */
72
  /**/
73
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
74
  do_action ("ws_plugin__s2member_during_update_all_options", get_defined_vars ()); /* If you use this Hook, be sure to use ``wp_verify_nonce()``. */
75
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
76
  /**/
@@ -110,7 +110,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
110
  $updated_all_options = true; /* Flag indicating this routine was processed successfully; and that all s2Member options have been updated successfully.*/
111
  }
112
  /**/
113
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
114
  do_action ("ws_plugin__s2member_after_update_all_options", get_defined_vars ()); /* If you use this Hook, be sure to use ``wp_verify_nonce()``. */
115
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
116
  /**/
@@ -255,27 +255,27 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
255
  *
256
  * @attaches-to: ``add_filter("plugin_action_links");``
257
  *
258
- * @param array $links Expects an existing array of links, passed in by the Filter.
259
- * @param str $file Expects path to a plugin file. We need to test against this for s2Member.
260
  * @return array An array of links, Filtered by this routine.
261
  */
262
- public static function _add_settings_link ($links = FALSE, $file = FALSE)
263
  {
264
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
265
  do_action ("_ws_plugin__s2member_before_add_settings_link", get_defined_vars ());
266
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
267
  /**/
268
- if ($file === plugin_basename ($GLOBALS["WS_PLUGIN__"]["s2member"]["l"]) && is_array ($links))
269
  {
270
  $settings = '<a href="' . esc_attr (admin_url ("/admin.php?page=ws-plugin--s2member-gen-ops")) . '">Settings</a>';
271
- array_unshift ($links, apply_filters ("ws_plugin__s2member_add_settings_link", $settings, get_defined_vars ()));
272
  /**/
273
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
274
  do_action ("_ws_plugin__s2member_during_add_settings_link", get_defined_vars ());
275
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
276
  }
277
  /**/
278
- return apply_filters ("_ws_plugin__s2member_add_settings_link", $links, get_defined_vars ());
279
  }
280
  /**
281
  * Enqueue scripts for administrative menu pages.
@@ -293,10 +293,10 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
293
  /**/
294
  if (!empty ($_GET["page"]) && preg_match ("/ws-plugin--s2member-/", $_GET["page"]))
295
  {
296
- wp_enqueue_script("jquery");
297
- wp_enqueue_script("thickbox");
298
- wp_enqueue_script("media-upload");
299
- wp_enqueue_script("jquery-ui-core");
300
  wp_enqueue_script ("jquery-sprintf", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/includes/jquery/jquery.sprintf/jquery.sprintf-min.js", array ("jquery"), c_ws_plugin__s2member_utilities::ver_checksum ());
301
  wp_enqueue_script ("jquery-json-ps", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/includes/jquery/jquery.json-ps/jquery.json-ps-min.js", array ("jquery"), c_ws_plugin__s2member_utilities::ver_checksum ());
302
  wp_enqueue_script ("jquery-ui-effects", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/includes/jquery/jquery.ui-effects/jquery.ui-effects-min.js", array ("jquery", "jquery-ui-core"), c_ws_plugin__s2member_utilities::ver_checksum ());
@@ -325,7 +325,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
325
  /**/
326
  if (!empty ($_GET["page"]) && preg_match ("/ws-plugin--s2member-/", $_GET["page"]))
327
  {
328
- wp_enqueue_style("thickbox");
329
  wp_enqueue_style ("ws-plugin--s2member-menu-pages", site_url ("/?ws_plugin__s2member_menu_pages_css=" . urlencode (mt_rand ())), array ("thickbox"), c_ws_plugin__s2member_utilities::ver_checksum (), "all");
330
  /**/
331
  do_action ("ws_plugin__s2member_during_add_admin_styles", get_defined_vars ());
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_menu_pages"))
21
  {
48
  {
49
  $updated_all_options = false; /* Initialize this to a value of false. Initializing this variable here makes it an available reference-variable to Hooks/Filters. */
50
  /**/
51
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
52
  do_action ("ws_plugin__s2member_before_update_all_options", get_defined_vars ()); /* If you use this Hook, be sure to use ``wp_verify_nonce()``. */
53
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
54
  /**/
70
  /**/
71
  unset ($key, $value); /* Unset these utility variables now. This prevents bleeding vars into Hooks/Filters that are of no use. */
72
  /**/
73
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
74
  do_action ("ws_plugin__s2member_during_update_all_options", get_defined_vars ()); /* If you use this Hook, be sure to use ``wp_verify_nonce()``. */
75
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
76
  /**/
110
  $updated_all_options = true; /* Flag indicating this routine was processed successfully; and that all s2Member options have been updated successfully.*/
111
  }
112
  /**/
113
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
114
  do_action ("ws_plugin__s2member_after_update_all_options", get_defined_vars ()); /* If you use this Hook, be sure to use ``wp_verify_nonce()``. */
115
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
116
  /**/
255
  *
256
  * @attaches-to: ``add_filter("plugin_action_links");``
257
  *
258
+ * @param array $actions Expects an existing array of actions links, passed in by the Filter.
259
+ * @param str $plugin_file Expects path to a plugin file. We need to test against this for s2Member.
260
  * @return array An array of links, Filtered by this routine.
261
  */
262
+ public static function _add_settings_link ($actions = FALSE, $plugin_file = FALSE)
263
  {
264
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
265
  do_action ("_ws_plugin__s2member_before_add_settings_link", get_defined_vars ());
266
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
267
  /**/
268
+ if ($plugin_file === plugin_basename ($GLOBALS["WS_PLUGIN__"]["s2member"]["l"]) && is_array ($actions))
269
  {
270
  $settings = '<a href="' . esc_attr (admin_url ("/admin.php?page=ws-plugin--s2member-gen-ops")) . '">Settings</a>';
271
+ array_unshift ($actions, apply_filters ("ws_plugin__s2member_add_settings_link", $settings, get_defined_vars ()));
272
  /**/
273
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
274
  do_action ("_ws_plugin__s2member_during_add_settings_link", get_defined_vars ());
275
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
276
  }
277
  /**/
278
+ return apply_filters ("_ws_plugin__s2member_add_settings_link", $actions, get_defined_vars ());
279
  }
280
  /**
281
  * Enqueue scripts for administrative menu pages.
293
  /**/
294
  if (!empty ($_GET["page"]) && preg_match ("/ws-plugin--s2member-/", $_GET["page"]))
295
  {
296
+ wp_enqueue_script ("jquery");
297
+ wp_enqueue_script ("thickbox");
298
+ wp_enqueue_script ("media-upload");
299
+ wp_enqueue_script ("jquery-ui-core");
300
  wp_enqueue_script ("jquery-sprintf", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/includes/jquery/jquery.sprintf/jquery.sprintf-min.js", array ("jquery"), c_ws_plugin__s2member_utilities::ver_checksum ());
301
  wp_enqueue_script ("jquery-json-ps", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/includes/jquery/jquery.json-ps/jquery.json-ps-min.js", array ("jquery"), c_ws_plugin__s2member_utilities::ver_checksum ());
302
  wp_enqueue_script ("jquery-ui-effects", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/includes/jquery/jquery.ui-effects/jquery.ui-effects-min.js", array ("jquery", "jquery-ui-core"), c_ws_plugin__s2member_utilities::ver_checksum ());
325
  /**/
326
  if (!empty ($_GET["page"]) && preg_match ("/ws-plugin--s2member-/", $_GET["page"]))
327
  {
328
+ wp_enqueue_style ("thickbox");
329
  wp_enqueue_style ("ws-plugin--s2member-menu-pages", site_url ("/?ws_plugin__s2member_menu_pages_css=" . urlencode (mt_rand ())), array ("thickbox"), c_ws_plugin__s2member_utilities::ver_checksum (), "all");
330
  /**/
331
  do_action ("ws_plugin__s2member_during_add_admin_styles", get_defined_vars ());
includes/classes/sc-files-in.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 110926
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_sc_files_in"))
21
  {
@@ -42,24 +42,26 @@ if (!class_exists ("c_ws_plugin__s2member_sc_files_in"))
42
  */
43
  public static function sc_get_file ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
44
  {
45
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
46
  do_action ("ws_plugin__s2member_before_sc_get_file", get_defined_vars ());
47
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
48
  /**/
49
  $attr = c_ws_plugin__s2member_utils_strings::trim_quot_deep ((array)$attr);
50
  /**/
51
- $attr = shortcode_atts (array ("download" => "", "download_key" => "", "stream" => "", "inline" => "", "storage" => "", "remote" => "", "ssl" => "", "rewrite" => "", "rewrite_base" => "", "skip_confirmation" => "", "url_to_storage_source" => "", "count_against_user" => "", "ignore_user" => "", /* Shortcode-specifics » */ "get_streamer_json" => ""), $attr);
52
  /**/
53
- eval('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
54
  do_action ("ws_plugin__s2member_before_sc_get_file_after_shortcode_atts", get_defined_vars ());
55
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
56
  /**/
57
- $get_streamer_json = $get_streamer_array = filter_var ($attr["get_streamer_json"], FILTER_VALIDATE_BOOLEAN); /* Getting a streamer? */
 
 
58
  /**/
59
  foreach ($attr as $key => $value) /* Now we need to go through and a `file_` prefix to certain Attribute keys, for compatibility. */
60
  if (strlen ($value) && in_array ($key, array ("download", "download_key", "stream", "inline", "storage", "remote", "ssl", "rewrite", "rewrite_base")))
61
  $config["file_" . $key] = $value; /* Set prefixed config parameter here so we can pass properly in ``$config`` array. */
62
- else if (strlen ($value) && !in_array ($key, array ("get_streamer_json"))) /* Else, exclude certain keys? */
63
  $config[$key] = $value;
64
  /**/
65
  unset ($key, $value); /* Ditch these now. We don't want these bleeding into Hooks/Filters anyway. */
15
  * @since 110926
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_sc_files_in"))
21
  {
42
  */
43
  public static function sc_get_file ($attr = FALSE, $content = FALSE, $shortcode = FALSE)
44
  {
45
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
46
  do_action ("ws_plugin__s2member_before_sc_get_file", get_defined_vars ());
47
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
48
  /**/
49
  $attr = c_ws_plugin__s2member_utils_strings::trim_quot_deep ((array)$attr);
50
  /**/
51
+ $attr = shortcode_atts (array ("download" => "", "download_key" => "", "stream" => "", "inline" => "", "storage" => "", "remote" => "", "ssl" => "", "rewrite" => "", "rewrite_base" => "", "skip_confirmation" => "", "url_to_storage_source" => "", "count_against_user" => "", "check_user" => "", /* Shortcode-specifics » */ "get_streamer_json" => "", "get_streamer_array" => ""), $attr);
52
  /**/
53
+ eval ('foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;');
54
  do_action ("ws_plugin__s2member_before_sc_get_file_after_shortcode_atts", get_defined_vars ());
55
  unset ($__refs, $__v); /* Unset defined __refs, __v. */
56
  /**/
57
+ $get_streamer_json = filter_var ($attr["get_streamer_json"], FILTER_VALIDATE_BOOLEAN); /* Getting streamer? */
58
+ $get_streamer_array = filter_var ($attr["get_streamer_array"], FILTER_VALIDATE_BOOLEAN); /* Streamer? */
59
+ $get_streamer_json = $get_streamer_array = ($get_streamer_array || $get_streamer_json) ? true : false;
60
  /**/
61
  foreach ($attr as $key => $value) /* Now we need to go through and a `file_` prefix to certain Attribute keys, for compatibility. */
62
  if (strlen ($value) && in_array ($key, array ("download", "download_key", "stream", "inline", "storage", "remote", "ssl", "rewrite", "rewrite_base")))
63
  $config["file_" . $key] = $value; /* Set prefixed config parameter here so we can pass properly in ``$config`` array. */
64
+ else if (strlen ($value) && !in_array ($key, array ("get_streamer_json", "get_streamer_array"))) /* Else, exclude? */
65
  $config[$key] = $value;
66
  /**/
67
  unset ($key, $value); /* Ditch these now. We don't want these bleeding into Hooks/Filters anyway. */
includes/classes/utils-conds.inc.php CHANGED
@@ -15,7 +15,7 @@
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
- exit("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
21
  {
@@ -53,14 +53,14 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
53
  if (defined ("BP_VERSION")) /* Installed and active? */
54
  return true;
55
  /**/
56
- if ($query_active_plugins) /* Else, query active plugins? */
57
  {
58
  $active_plugins = (is_multisite ()) ? wp_get_active_network_plugins () : array ();
59
  $active_plugins = array_unique (array_merge ($active_plugins, wp_get_active_and_valid_plugins ()));
60
  /**/
61
  foreach ($active_plugins as $active_plugin) /* BuddyPress active? */
62
- if (plugin_basename ($active_plugin) === "buddypress/bp-loader.php")
63
- return true;
64
  }
65
  /**/
66
  return false; /* Default return false. */
15
  * @since 3.5
16
  */
17
  if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
18
+ exit ("Do not access this file directly.");
19
  /**/
20
  if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
21
  {
53
  if (defined ("BP_VERSION")) /* Installed and active? */
54
  return true;
55
  /**/
56
+ if ($query_active_plugins && ($buddypress = "buddypress/bp-loader.php"))
57
  {
58
  $active_plugins = (is_multisite ()) ? wp_get_active_network_plugins () : array ();
59
  $active_plugins = array_unique (array_merge ($active_plugins, wp_get_active_and_valid_plugins ()));
60
  /**/
61
  foreach ($active_plugins as $active_plugin) /* BuddyPress active? */
62
+ if (plugin_basename ($active_plugin) === $buddypress) /* BuddyPress? */
63
+ return true; /* Yes, BuddyPress is one of the active plugins. */
64
  }
65
  /**/
66
  return false; /* Default return false. */
includes/classes/utils-users.inc.php CHANGED
@@ -294,9 +294,6 @@ if (!class_exists ("c_ws_plugin__s2member_utils_users"))
294
  * `s2member_access_ccaps`, etc, etc. ).
295
  * @param int|str $user_id Optional. Defaults to the current User's ID.
296
  * @return mixed The value of the requested field, or false if the field does not exist.
297
- *
298
- * @todo Create a function that returns extensive details regarding Custom Registration Fields configured with s2Member.
299
- * Until then, you can inspect this array: ``json_decode ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["custom_reg_fields"], true)``.
300
  */
301
  public static function get_user_field ($field_id = FALSE, $user_id = FALSE) /* Very powerful function here. */
302
  {
294
  * `s2member_access_ccaps`, etc, etc. ).
295
  * @param int|str $user_id Optional. Defaults to the current User's ID.
296
  * @return mixed The value of the requested field, or false if the field does not exist.
 
 
 
297
  */
298
  public static function get_user_field ($field_id = FALSE, $user_id = FALSE) /* Very powerful function here. */
299
  {
includes/functions/api-functions.inc.php CHANGED
@@ -1882,13 +1882,33 @@ if (!function_exists ("detach_s2member_query_filters"))
1882
  * <a href="[s2File download="file.zip" download_key="true" inline="true" /]">View PDF</a>
1883
  * ```
1884
  *
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1885
  * @package s2Member\API_Functions
1886
  * @since 110926
1887
  *
1888
  * @param array $config Required. This is an array of configuration options associated with permissions being checked against the current User/Member; and also the actual URL generated by this routine.
1889
- * Possible ``$config`` array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `ignore_user`.
 
1890
  * @return str A File Download URL string on success; or an array on success, with elements `streamer`, `file`, `url` when/if ``$get_streamer_array`` is true; else false on any type of failure.
1891
- * Note: by default, this function DOES consider the current User/Member. If `ignore_user` is NOT set, or is set to false, this function MAY very well return false, when/if the current User/Member is NOT allowed access to the `file_download`, based on configuration.
1892
  *
1893
  * @see s2Member\API_Functions\s2member_file_download_key()
1894
  */
@@ -1937,7 +1957,7 @@ if (!function_exists ("s2member_file_download_url"))
1937
  * @param str $file Location of the protected File, relative to the `/s2member-files/` directory.
1938
  * @param str|bool $directive Optional. Defaults to false. If you set this to any non-zero value ( i.e. the string `universal` ),
1939
  * the resulting Key will be universal *( i.e. valid for any User, at any time, from any browser )*. That is to say; universal, for this particular File.
1940
- * It is also possible to pass in the $directive string `ip-forever`, making the Key last forever, but only for a specific IP address.
1941
  * @return str The File Download Key. Which is an MD5 hash *( always 32 characters )*, URL-safe.
1942
  *
1943
  * @see s2Member\API_Functions\s2member_file_download_url()
1882
  * <a href="[s2File download="file.zip" download_key="true" inline="true" /]">View PDF</a>
1883
  * ```
1884
  *
1885
+ * ———— Extra Detail On Function Parameters ————
1886
+ *
1887
+ * **Parameter $config ( array Required ).** This should be an array with one or more of the following elements.
1888
+ *
1889
+ * o ``"file_download" => "file.zip"`` Location of the file, relative to the `/s2member-files/` directory; or, relative to the root of your Amazon® S3 Bucket, when applicable.
1890
+ * o ``"file_download_key" => false`` Defaults to `false`. If `true`, s2Member will return a URL with an s2Member-generated File Download Key. You don't need to generate the File Download Key yourself, s2Member does it for you. If you set this to `ip-forever`, the File Download Key that s2Member generates will last forever, for a specific IP Address; otherwise, by default, all File Download Keys expire after 24 hours automatically. If you set this to `universal`, s2Member will generate a File Download Key that is good for anyone/everyone forever, with NO restrictions on who/where/when a file is accessed *( e.g. be careful with this one )*.
1891
+ * o ``"file_stream" => false`` Defaults to `false`. If `true`, s2Member will return a URL containing a parameter/directive, which forces the File Download to take place over the RTMP protocol. This ONLY works when/if s2Member is configured to run with both Amazon® S3/CloudFront. Please note however, it's better to use the example code provided in the your Dashboard. See: `s2Member -> Download Options -> JW Player® and the RTMP Protocol`. Also note, if ``$get_streamer_array`` is passed, s2Member will automatically force ``"file_stream" => true`` for you.
1892
+ * o ``"file_inline" => null`` Defaults to `null`. If `true`, s2Member will serve the file inline, instead of as an actual File Download. If empty, s2Member will look at your Inline File Extensions configuration, and serve the file inline; if, and only if, its extension matches one found in your configuration. By default, s2Member serves all files as attachments *( i.e. downloads )*. Please check your Dashboard regarding Inline File Extensions. Also note, this Shortcode Attribute does NOTHING for files served via Amazon® CloudFront. See the tech-notes listed in the Amazon® CloudFront section of your Dashboard for further details and workarounds.
1893
+ * o ``"file_storage" => null`` Defaults to `null`. Can be one of `local|s3|cf`. When specified, s2Member will serve the file from a specific source location. For example, if you've configured Amazon® S3 and/or CloudFront; but, there are a few files that you want to upload locally to the `/s2member-files/` directory; you can force s2Member to serve a file from local storage by setting ``"file_storage" => "local"`` explicitly.
1894
+ * o ``"file_remote" => false`` Defaults to `false`. If `true`, s2Member will authenticate access to the File Download via Remote Header Authorization, instead of through your web site. This is similar to `.htaccess` protection routines of yester-year. Please check the Remote Authorization and Podcasting section in your Dashboard for further details about how this works.
1895
+ * o ``"file_ssl" => null`` Defaults to `null`. If `true`, s2Member will generate a File Download URL with an SSL protocol *( i.e. the URL will start with `https://` or `rtmpe://` )*. If `null`, s2Member will only generate a File Download URL with an SSL protocol, when/if the Post/Page/URL, is also being viewed over SSL. Otherwise, s2Member will use a non-SSL protocol by default.
1896
+ * o ``"file_rewrite" => false`` Defaults to `false`. If `true`, s2Member will generate a File Download URL that takes full advantage of s2Member's Advanced Mod Rewrite functionality. If you're running an Apache web server, or another server that supports `mod_rewrite`, we highly recommend turning this on. s2Member's `mod_rewrite` URLs do NOT contain query string parameters, making them more portable/compatible with other software applications and/or plugins for WordPress®.
1897
+ * o ``"file_rewrite_base" => null`` Defaults to `null`. If set to a URL, starting with `http` or another valid protocol, s2Member will generate a File Download URL that takes full advantage of s2Member's Advanced Mod Rewrite functionality, and it will use the rewrite base URL as a prefix. This could be useful on some WordPress® installations that use advanced directory structures. It could also be useful for site owners using virtual directories that point to `/s2member-files/`. Note, if `rewrite_base` is set, s2Member will automatically force ``"rewrite" => true`` for you.
1898
+ * o ``"skip_confirmation" => false`` Defaults to `false`. If `true`, s2Member will generate a File Download URL which contains a directive, telling s2Member NOT to introduce any JavaScript confirmation prompts on your site, for this File Download URL. Please note, s2Member will automatically detect links, anywhere in your content, and/or anywhere in your theme files, that contain `s2member_file_download` or `s2member-files`. Whenever a logged-in Member clicks a link that contains `s2member_file_download` or `s2member-files`, the system will politely ask the User to confirm the download using a very intuitive JavaScript confirmation prompt, which contains specific details about your configured download limitations. This way your Members will be aware of how many files they've downloaded in the current period; and they'll be able to make a conscious decision about whether to proceed with a specific download or not.
1899
+ * o ``"url_to_storage_source" => false`` Defaults to `false`. If `true`, s2Member will generate a File Download URL which points directly to the storage source. This is only functional with Amazon® S3 and/or CloudFront integrations. If you create a URL that points directly to the storage source *( i.e. points directly to Amazon® S3 or CloudFront )*, s2Member will NOT be able to further authenticate the current User/Member; and, s2Member will NOT be able to count the File Download against the current User's account record, because the URL being generated does not pass back through s2Member at all, it points directly to the storage source. For this reason, if you set ``"url_to_storage_source" => true``, you should also set ``"check_user" => true`` and ``"count_against_user" => true``, telling s2Member to authenticate the current User, and if authenticated, count this File Download URL against the current User's account record in real-time *( i.e. as the URL is being generated )*, while it still has a chance to do so. This is useful when you stream files over the RTMP protocol; where an `http://` URL is not feasible. It also helps in situations where a 3rd-party software application will not work as intended, with s2Member's internal redirection to Amazon® S3/CloudFront files. Important, when ``"check_user" => true`` and/or ``"count_against_user" => true``, this API Function will return `false` in situations where the current User/Member does NOT have access to the file.
1900
+ * o ``"count_against_user" => false`` Defaults to `false`. If `true`, it will automatically force ``"check_user" => true`` as well. In other words, s2Member will authenticate the current User, and if authenticated, count this File Download URL against the current User's account record in real-time *( i.e. as the URL is being generated )*. This is off by default. By default, s2Member will simply generate a File Download URL, and upon a User/Member clicking the URL, s2Member will authenticate the User/Member at that time, count the File Download against their account record, and serve the File Download. In other words, under normal circumstances, there is no reason to set ``"check_user" => true`` and/or ``"count_against_user" => true`` when generating the URL itself. However, this is a useful config option when ``"url_to_storage_source" => true``. Please note, when ``"check_user" => true`` and/or ``"count_against_user" => true``, this API Function will return `false` in situations where the current User/Member does NOT have access to the file.
1901
+ * o ``"check_user => false`` Defaults to `false`. If `true`, s2Member will authenticate the current User before allowing the File Download URL to be generated. This is off by default. By default, s2Member will simply generate a File Download URL, and upon a User/Member clicking the URL, s2Member will authenticate the User/Member at that time, and serve the File Download to the User/Member. In other words, under normal circumstances, there is no reason to set ``"check_user" => true`` and/or ``"count_against_user" => true`` when generating the URL itself. However, this IS a useful config option when ``"url_to_storage_source" => true``. Please note, when ``"check_user" => true`` and/or ``"count_against_user" => true``, this API Function will return `false` in situations where the current User/Member does NOT have access to the file.
1902
+ *
1903
+ * **Parameter $get_streamer_array ( bool Optional ).** Defaults to `false`. If `true`, this API Function will return an array with the following elements: `streamer`, `file`, `url`. For further details, please review this section in your Dashboard: `s2Member -> Download Options -> JW Player® & RTMP Protocol Examples`. Note, if this is true, s2Member will automatically force ``"url_to_storage_source" => true`` and ``"file_stream" => true``. For that reason, you should carefully review the details and warning above regarding `url_to_storage_source`. If you set ``$get_streamer_array``, you should also set ``"check_user" => true`` and ``"count_against_user" => true``.
1904
+ *
1905
  * @package s2Member\API_Functions
1906
  * @since 110926
1907
  *
1908
  * @param array $config Required. This is an array of configuration options associated with permissions being checked against the current User/Member; and also the actual URL generated by this routine.
1909
+ * Possible ``$config`` array elements: `file_download` *(required)*, `file_download_key`, `file_stream`, `file_inline`, `file_storage`, `file_remote`, `file_ssl`, `file_rewrite`, `file_rewrite_base`, `skip_confirmation`, `url_to_storage_source`, `count_against_user`, `check_user`.
1910
+ * @param bool $get_streamer_array Optional. Defaults to `false`. If `true`, this API Function will return an array with the following elements: `streamer`, `file`, `url`. For further details, please review this section in your Dashboard: `s2Member -> Download Options -> JW Player® & RTMP Protocol Examples`. Note, if this is true, s2Member will automatically force ``"url_to_storage_source" => true`` and ``"file_stream" => true``. For that reason, you should carefully review the details and warning above regarding `url_to_storage_source`. If you set ``$get_streamer_array``, you should also set ``"check_user" => true`` and ``"count_against_user" => true``.
1911
  * @return str A File Download URL string on success; or an array on success, with elements `streamer`, `file`, `url` when/if ``$get_streamer_array`` is true; else false on any type of failure.
 
1912
  *
1913
  * @see s2Member\API_Functions\s2member_file_download_key()
1914
  */
1957
  * @param str $file Location of the protected File, relative to the `/s2member-files/` directory.
1958
  * @param str|bool $directive Optional. Defaults to false. If you set this to any non-zero value ( i.e. the string `universal` ),
1959
  * the resulting Key will be universal *( i.e. valid for any User, at any time, from any browser )*. That is to say; universal, for this particular File.
1960
+ * It is also possible to pass in the ``$directive`` string `ip-forever`, making the Key last forever, but only for a specific IP address.
1961
  * @return str The File Download Key. Which is an MD5 hash *( always 32 characters )*, URL-safe.
1962
  *
1963
  * @see s2Member\API_Functions\s2member_file_download_url()
includes/menu-pages/down-ops.inc.php CHANGED
@@ -65,8 +65,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
65
  /**/
66
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
67
  /**/
68
- echo '<p>s2Member will allow access to these protected files, based on the configuration you specify below. Repeated downloads of the same exact file are NOT tabulated against the totals below. Once a file has been downloaded, future downloads of the same exact file, by the same exact Member will not be counted against them. In other words, if a Member downloads the same file three times, the system only counts that as one unique download.</p>' . "\n";
69
- echo '<p>s2Member will automatically detect links, anywhere in your content, and/or anywhere in your theme files, that contain <code>?s2member_file_download</code>. Whenever a logged-in Member clicks a link that contains <code>?s2member_file_download</code>, the system will politely ask the user to confirm the download using a very intuitive JavaScript confirmation prompt that contains specific details about download limitations. This way your Members will be aware of how many files they\'ve downloaded in the current period; and they\'ll be able to make a conscious decision about whether to proceed with a specific download or not. If you want to suppress this JavaScript confirmation prompt, you can add this to the end of your links: <code>&amp;s2member_skip_confirmation</code>.</p>' . "\n";
70
  echo '<p><em>* The above only applies to Users who are logged in as Members. For all other visitors in the general public, the <code>?s2member_file_download</code> links will redirect them your Membership Options Page, so that new visitors can signup, in order to gain access, by becoming a Member. You may also want to have a look down below at s2Member\'s "Advanced Download Restrictions", which provides a greater degree of flexibility.</em></p>' . "\n";
71
  /**/
72
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
@@ -533,6 +533,75 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_down_ops"))
533
  do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_after_rewrite_linkage", get_defined_vars ());
534
  }
535
  /**/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
536
  do_action ("ws_plugin__s2member_during_down_ops_page_after_left_sections", get_defined_vars ());
537
  /**/
538
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
65
  /**/
66
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
67
  /**/
68
+ echo '<p>s2Member will allow access to these protected files, based on the configuration you specify below. Repeated downloads of the same exact file are NOT tabulated against the totals below. Once a file has been downloaded, future downloads of the same exact file, by the same exact Member will not be counted against them. In other words, if a Member downloads the same file three times, the system only counts that as one unique download. In addition, multiple variations of popular media formats are only counted once. This is because many site owners provide multiple download options to their Users/Members, for compatibility purposes. Files that have the same exact name, with one of these extensions, will only be counted ONE time: <code>' . esc_html (implode (",", $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["streaming_file_extns"])) . '</code>.</p>' . "\n";
69
+ echo '<p>s2Member will automatically detect links, anywhere in your content, and/or anywhere in your theme files, that contain <code>s2member_file_download</code> or <code>s2member-files</code>. Whenever a logged-in Member clicks a link that contains <code>s2member_file_download</code> or <code>s2member-files</code>, the system will politely ask the user to confirm the download using a very intuitive JavaScript confirmation prompt, which contains specific details about your configured download limitations. This way your Members will be aware of how many files they\'ve downloaded in the current period; and they\'ll be able to make a conscious decision about whether to proceed with a specific download or not. If you want to suppress this JavaScript confirmation prompt, you can add this to the end of your links: <code>&amp;s2member_skip_confirmation</code>. Shortcode alternative: <code>[s2File skip_confirmation="yes" /]</code>.</p>' . "\n";
70
  echo '<p><em>* The above only applies to Users who are logged in as Members. For all other visitors in the general public, the <code>?s2member_file_download</code> links will redirect them your Membership Options Page, so that new visitors can signup, in order to gain access, by becoming a Member. You may also want to have a look down below at s2Member\'s "Advanced Download Restrictions", which provides a greater degree of flexibility.</em></p>' . "\n";
71
  /**/
72
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
533
  do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_after_rewrite_linkage", get_defined_vars ());
534
  }
535
  /**/
536
+ if (apply_filters ("ws_plugin__s2member_during_down_ops_page_during_left_sections_display_shortcode_attrs", true, get_defined_vars ()))
537
+ {
538
+ do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_before_shortcode_attrs", get_defined_vars ());
539
+ /**/
540
+ echo '<div class="ws-menu-page-group" title="Shortcode Attributes &amp; API Functions ( Explained )">' . "\n";
541
+ /**/
542
+ echo '<div class="ws-menu-page-section ws-plugin--s2member-shortcode-attrs-section">' . "\n";
543
+ echo '<h3>Shortcode Attributes &amp; API Functions ( Explained In Full Detail )</h3>' . "\n";
544
+ echo '<p>s2Member makes <a href="http://codex.wordpress.org/Shortcode_API#Overview" target="_blank" rel="external">Shortcodes</a> available to you, which allow you to generate File Download URLs and/or File Download Keys. Like most Shortcodes for WordPress®, s2Member reads Attributes in your Shortcode. Many site owners like to know exactly how these Shortcode Attributes work. Below, is a brief overview of each possible Shortcode Attribute.</p>' . "\n";
545
+ do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_shortcode_attrs", get_defined_vars ());
546
+ /**/
547
+ echo '<div class="ws-menu-page-hr"></div>' . "\n";
548
+ /**/
549
+ echo '<h4 style="margin:0;"><code>[s2File /]</code> Shortcode Attributes:</h4>' . "\n";
550
+ echo '<p style="margin:0;"><strong>See also:</strong> API Function <a href="http://www.primothemes.com/forums/viewtopic.php?f=40&t=12453#src_doc_s2member_file_download_url()" target="_blank" rel="external">s2member_file_download_url()</a> for PHP integration.</p>' . "\n";
551
+ echo '<table class="form-table" style="margin-top:0;">' . "\n";
552
+ echo '<tbody>' . "\n";
553
+ echo '<tr style="padding-top:0;">' . "\n";
554
+ /**/
555
+ echo '<td style="padding-top:0;">' . "\n";
556
+ echo '<ul>' . "\n";
557
+ echo '<li><code>download="file.zip"</code> Location of the file, relative to the <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory; or, relative to the root of your Amazon® S3 Bucket, when applicable.</li>' . "\n";
558
+ echo '<li><code>download_key="no"</code> Defaults to <code>no</code>. If <code>download_key="1|on|yes|true|ip-forever|universal"</code>, s2Member will return a URL with an s2Member-generated File Download Key. You don\'t need to generate the File Download Key yourself, s2Member does it for you. If you set <code>download_key="ip-forever"</code>, the File Download Key that s2Member generates will last forever, for a specific IP Address; otherwise, by default, all File Download Keys expire after 24 hours automatically. If you set <code>download_key="universal"</code>, s2Member will generate a File Download Key that is good for anyone/everyone forever, with NO restrictions on who/where/when a file is accessed <em>( e.g. be careful with this one )</em>.</li>' . "\n";
559
+ echo '<li><code>stream="no"</code> Defaults to <code>no</code>. If <code>stream="1|on|yes|true"</code>, s2Member will return a URL containing a parameter/directive, which forces the File Download to take place over the RTMP protocol. This ONLY works when/if s2Member is configured to run with both Amazon® S3/CloudFront. Please note however, it\'s better to use the example code provided in the section above, regarding: <code>JW Player® and the RTMP Protocol</code>. Also note, if <code>get_streamer_json="1|on|yes|true"</code>, s2Member will automatically force <code>stream="true"</code> for you.</li>' . "\n";
560
+ echo '<li><code>inline=""</code> Defaults to <code>[empty]</code>. If <code>inline="1|on|yes|true"</code>, s2Member will serve the file inline, instead of as an actual File Download. If empty, s2Member will look at your <code>Inline File Extensions</code> configuration above, and serve the file inline; if, and only if, its extension matches one found in your configuration. By default, s2Member serves all files as attachments <em>( i.e. downloads )</em>. Please read the section above regarding <code>Inline File Extensions</code> for further details. Also note, this Shortcode Attribute does NOTHING for files served via Amazon® CloudFront. See the tech-notes listed in the Amazon® CloudFront section for further details and workarounds.</li>' . "\n";
561
+ echo '<li><code>storage=""</code> Defaults to <code>[empty]</code>. If <code>storage="local|s3|cf"</code>, s2Member will serve the file from a specific source location, based on the value of this Shortcode Attribute. For example, if you\'ve configured Amazon® S3 and/or CloudFront; but, there are a few files that you want to upload locally to the <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory; you can force s2Member to serve a file from local storage by setting <code>storage="local"</code> explicitly.</li>' . "\n";
562
+ echo '<li><code>remote="no"</code> Defaults to <code>no</code>. If <code>remote="1|on|yes|true"</code>, s2Member will authenticate access to the File Download via Remote Header Authorization, instead of through your web site. This is similar to <code>.htaccess</code> protection routines of yester-year</code>. Please check the <code>Remote Authorization and Podcasting</code> section for further details about how this works.</li>' . "\n";
563
+ echo '<li><code>ssl=""</code> Defaults to <code>[empty]</code>. If <code>ssl="1|on|yes|true"</code>, s2Member will generate a File Download URL with an SSL protocol <em>( i.e. the URL will start with <code>https://</code> or <code>rtmpe://</code> )</em>. If empty, s2Member will only generate a File Download URL with an SSL protocol, when/if the Post/Page/URL firing the Shortcode itself, is also being viewed over SSL. Otherwise, s2Member will use a non-SSL protocol by default.</li>' . "\n";
564
+ echo '<li><code>rewrite="no"</code> Defaults to <code>no</code>. If <code>rewrite="1|on|yes|true"</code>, s2Member will generate a File Download URL that takes full advantage of s2Member\'s Advanced Mod Rewrite functionality. If you\'re running an Apache web server, or another server that supports <code>mod_rewrite</code>, we highly recommend turning this on. s2Member\'s <code>mod_rewrite</code> URLs do NOT contain query string parameters, making them more portable/compatible with other software applications and/or plugins for WordPress®.</li>' . "\n";
565
+ echo '<li><code>rewrite_base=""</code> Defaults to <code>[empty]</code>. If <code>rewrite_base="' . esc_attr (site_url ("/")) . '"</code>, s2Member will generate a File Download URL that takes full advantage of s2Member\'s Advanced Mod Rewrite functionality, and it will use the rewrite base URL as a prefix. This could be useful on some WordPress® installations that use advanced directory structures. It could also be useful for site owners using virtual directories that point to <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code>. Note, if <code>rewrite_base</code> is set, s2Member will automatically force <code>rewrite="yes"</code> for you.</li>' . "\n";
566
+ echo '<li><code>skip_confirmation="no"</code> Defaults to <code>no</code>. If <code>skip_confirmation="1|on|yes|true"</code>, s2Member will generate a File Download URL which contains a directive, telling s2Member NOT to introduce any JavaScript confirmation prompts on your site, for this File Download URL. Please note, s2Member will automatically detect links, anywhere in your content, and/or anywhere in your theme files, that contain <code>s2member_file_download</code> or <code>s2member-files</code>. Whenever a logged-in Member clicks a link that contains <code>s2member_file_download</code> or <code>s2member-files</code>, the system will politely ask the User to confirm the download using a very intuitive JavaScript confirmation prompt, which contains specific details about your configured download limitations. This way your Members will be aware of how many files they\'ve downloaded in the current period; and they\'ll be able to make a conscious decision about whether to proceed with a specific download or not.</li>' . "\n";
567
+ echo '<li><code>url_to_storage_source="no"</code> Defaults to <code>no</code>. If <code>url_to_storage_source="1|on|yes|true"</code>, s2Member will generate a File Download URL which points directly to the storage source. This is only functional with Amazon® S3 and/or CloudFront integrations. If you create a URL that points directly to the storage source <em>( i.e. points directly to Amazon® S3 or CloudFront )</em>, s2Member will NOT be able to further authenticate the current User/Member; and, s2Member will NOT be able to count the File Download against the current User\'s account record, because the URL being generated does not pass back through s2Member at all, it points directly to the storage source. For this reason, if you set <code>url_to_storage_source="true"</code>, you should also set <code>check_user="true"</code> and <code>count_against_user="true"</code>, telling s2Member to authenticate the current User, and if authenticated, count this File Download URL against the current User\'s account record in real-time <em>( i.e. as the URL is being generated ) </em>, while it still has a chance to do so. This Shortcode Attribute is useful when you stream files over the RTMP protocol; where an <code>http://</code> URL is not feasible. It also helps in situations where a 3rd-party software application will not work as intended, with s2Member\'s internal redirection to Amazon® S3/CloudFront files. Important, when <code>check_user="true"</code> and/or <code>count_against_user="true"</code>, the Shortcode will return an empty and/or null object value in situations where the current User/Member does NOT have access to the file.</li>' . "\n";
568
+ echo '<li><code>count_against_user="no"</code> Defaults to <code>no</code>. If <code>count_against_user="1|on|yes|true"</code>, it will automatically force <code>check_user="true"</code> as well. In other words, s2Member will authenticate the current User, and if authenticated, count this File Download URL against the current User\'s account record in real-time <em>( i.e. as the URL is being generated ) </em>. This is off by default. By default, s2Member will simply generate a File Download URL, and upon a User/Member clicking the URL, s2Member will authenticate the User/Member at that time, count the File Download against their account record, and serve the File Download. In other words, under normal circumstances, there is no reason to set <code>check_user="true"</code> and/or <code>count_against_user="true"</code> when generating the URL itself. However, this is a useful Shortcode Attribute when <code>url_to_storage_source="true"</code>. Please note, when <code>check_user="true"</code> and/or <code>count_against_user="true"</code>, the Shortcode will return an empty and/or null object value in situations where the current User/Member does NOT have access to the file.</li>' . "\n";
569
+ echo '<li><code>check_user="no"</code> Defaults to <code>no</code>. If <code>check_user="1|on|yes|true"</code>, s2Member will authenticate the current User before allowing the File Download URL to be generated. This is off by default. By default, s2Member will simply generate a File Download URL, and upon a User/Member clicking the URL, s2Member will authenticate the User/Member at that time, and serve the File Download to the User/Member. In other words, under normal circumstances, there is no reason to set <code>check_user="true"</code> and/or <code>count_against_user="true"</code> when generating the URL itself. However, this IS a useful Shortcode Attribute when <code>url_to_storage_source="true"</code>. Please note, when <code>check_user="true"</code> and/or <code>count_against_user="true"</code>, the Shortcode will return an empty and/or null object value in situations where the current User/Member does NOT have access to the file.</li>' . "\n";
570
+ echo '<li><code>get_streamer_json="no"</code> Defaults to <code>no</code>. If <code>get_streamer_json="1|on|yes|true"</code>, the Shortcode will return a JSON object for JavaScript notation, making it possible to integrate the <code>[s2File /]</code> Shortcode into JavaScript routines that configure streaming media players. For further details, please review the section above: <code>JW Player® &amp; RTMP Protocol Examples</code>. Note, if you set <code>get_streamer_json="true"</code>, s2Member will automatically force <code>url_to_storage_source="true"</code> and <code>stream="true"</code>. For that reason, you should carefully review the details and warning above regarding <code>url_to_storage_source</code>. If you set <code>get_streamer_json="true"</code>, you should also set <code>check_user="true"</code> and <code>count_against_user="true"</code>.</li>' . "\n";
571
+ do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_shortcode_attrs_s2file_lis", get_defined_vars ());
572
+ echo '</ul>' . "\n";
573
+ echo '</td>' . "\n";
574
+ /**/
575
+ echo '</tr>' . "\n";
576
+ echo '</tbody>' . "\n";
577
+ echo '</table>' . "\n";
578
+ /**/
579
+ echo '<div class="ws-menu-page-hr"></div>' . "\n";
580
+ /**/
581
+ echo '<h4 style="margin:0;"><code>[s2Key /]</code> Shortcode Attributes:</h4>' . "\n";
582
+ echo '<p style="margin:0;"><strong>See also:</strong> API Function <a href="http://www.primothemes.com/forums/viewtopic.php?f=40&t=12453#src_doc_s2member_file_download_key()" target="_blank" rel="external">s2member_file_download_key()</a> for PHP integration.</p>' . "\n";
583
+ echo '<table class="form-table" style="margin-top:0;">' . "\n";
584
+ echo '<tbody>' . "\n";
585
+ echo '<tr style="padding-top:0;">' . "\n";
586
+ /**/
587
+ echo '<td style="padding-top:0;">' . "\n";
588
+ echo '<ul>' . "\n";
589
+ echo '<li><code>file_download="file.zip"</code> Location of the file, relative to the <code>/' . esc_html (c_ws_plugin__s2member_utils_dirs::basename_dir_app_data ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"])) . '/</code> directory; or, relative to the root of your Amazon® S3 Bucket, when applicable.</li>' . "\n";
590
+ echo '<li><code>directive=""</code> Defaults to <code>[empty]</code>. If <code>directive="ip-forever|universal"</code>, s2Member will return a special File Download Key. If you set <code>directive="ip-forever"</code>, the File Download Key that s2Member generates will last forever, for a specific IP Address; otherwise, by default, all File Download Keys expire after 24 hours automatically. If you set <code>directive="universal"</code>, s2Member will generate a File Download Key that is good for anyone/everyone forever, with NO restrictions on who/where/when a file is accessed <em>( e.g. be careful with this one )</em>.</li>' . "\n";
591
+ do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_shortcode_attrs_s2key_lis", get_defined_vars ());
592
+ echo '</ul>' . "\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
+ do_action ("ws_plugin__s2member_during_down_ops_page_during_left_sections_after_shortcode_attrs", get_defined_vars ());
603
+ }
604
+ /**/
605
  do_action ("ws_plugin__s2member_during_down_ops_page_after_left_sections", get_defined_vars ());
606
  /**/
607
  echo '<div class="ws-menu-page-hr"></div>' . "\n";
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === s2Member® ( Membership w/ PayPal® ) ===
2
 
3
- Version: 110926
4
- Stable tag: 110926
5
  Framework: WS-P-110523
6
 
7
  SSL Compatible: yes
@@ -178,6 +178,10 @@ Please visit s2Member.com for [video tutorials](http://www.s2member.com/videos/)
178
 
179
  == Changelog ==
180
 
 
 
 
 
181
  = v110926 =
182
  * (s2Member/s2Member Pro) **BuddyPress v1.5**. Updated for compatibility with BuddyPress v1.5.
183
  * (s2Member Pro) **Bug fix**. A bug first introduced in s2Member Pro v110912 was causing problems for Pro Forms integrated on a Child Blog of Multisite Blog Farm. Fixed in this release.
1
  === s2Member® ( Membership w/ PayPal® ) ===
2
 
3
+ Version: 110927
4
+ Stable tag: 110927
5
  Framework: WS-P-110523
6
 
7
  SSL Compatible: yes
178
 
179
  == Changelog ==
180
 
181
+ = v110927 =
182
+ * (s2Member) **BuddyPress v1.5 compatibility**. Misc tweaks.
183
+ * (s2Member) **Documentation improvements**. New documentation covering Shortcode Attributes and API Function parameters for the new `[s2File /]` Shortcode, and for the new API Function `s2member_file_download_url()`. Please check your Dashboard, under: `s2Member -> Download Options -> Shortcode Attributes / API Functions ( Explained )`.
184
+
185
  = v110926 =
186
  * (s2Member/s2Member Pro) **BuddyPress v1.5**. Updated for compatibility with BuddyPress v1.5.
187
  * (s2Member Pro) **Bug fix**. A bug first introduced in s2Member Pro v110912 was causing problems for Pro Forms integrated on a Child Blog of Multisite Blog Farm. Fixed in this release.
s2member.php CHANGED
@@ -19,8 +19,8 @@
19
  */
20
  /* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
21
 
22
- Version: 110926
23
- Stable tag: 110926
24
  Framework: WS-P-110523
25
 
26
  SSL Compatible: yes
@@ -75,7 +75,7 @@ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
75
  * @var str
76
  */
77
  if (!defined ("WS_PLUGIN__S2MEMBER_VERSION"))
78
- define ("WS_PLUGIN__S2MEMBER_VERSION", "110926");
79
  /**
80
  * Minimum PHP version required to run s2Member.
81
  *
@@ -105,7 +105,7 @@ if (!defined ("WS_PLUGIN__S2MEMBER_MIN_WP_VERSION"))
105
  * @var str
106
  */
107
  if (!defined ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION"))
108
- define ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "110926");
109
  /*
110
  Several compatibility checks.
111
  If all pass, load the s2Member plugin.
19
  */
20
  /* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
21
 
22
+ Version: 110927
23
+ Stable tag: 110927
24
  Framework: WS-P-110523
25
 
26
  SSL Compatible: yes
75
  * @var str
76
  */
77
  if (!defined ("WS_PLUGIN__S2MEMBER_VERSION"))
78
+ define ("WS_PLUGIN__S2MEMBER_VERSION", "110927");
79
  /**
80
  * Minimum PHP version required to run s2Member.
81
  *
105
  * @var str
106
  */
107
  if (!defined ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION"))
108
+ define ("WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION", "110927");
109
  /*
110
  Several compatibility checks.
111
  If all pass, load the s2Member plugin.