Version Description
= v120301 = Two bug fixes. Upgrade immediately.
Download this release
Release Info
Developer | PriMoThemes |
Plugin | s2Member Framework (Member Roles, Capabilities, Membership, PayPal Members) |
Version | 120301 |
Comparing to | |
See all releases |
Code changes from version 120219 to 120301
- includes/_xtnls/mailchimp/nc-mcapi.inc.php +1 -1
- includes/classes/files-in.inc.php +8 -8
- includes/classes/utils-conds.inc.php +42 -47
- includes/menu-pages/updates.inc.php +41 -42
- includes/translations/s2member.pot +2 -2
- readme.txt +9 -5
- s2member.php +4 -4
includes/_xtnls/mailchimp/nc-mcapi.inc.php
CHANGED
@@ -2416,7 +2416,7 @@ class NC_MCAPI {
|
|
2416 |
$this->errorCode = "";
|
2417 |
$error = false;
|
2418 |
|
2419 |
-
$post_vars = http_build_query($params);
|
2420 |
|
2421 |
$s2_ags = array("user-agent" => "MCAPI/" . $this->version, "timeout" => $this->timeout);
|
2422 |
$s2_url = $host . $this->apiUrl["path"] . "?" . $this->apiUrl["query"] . "&method=" . $method;
|
2416 |
$this->errorCode = "";
|
2417 |
$error = false;
|
2418 |
|
2419 |
+
$post_vars = http_build_query($params, null, "&");
|
2420 |
|
2421 |
$s2_ags = array("user-agent" => "MCAPI/" . $this->version, "timeout" => $this->timeout);
|
2422 |
$s2_url = $host . $this->apiUrl["path"] . "?" . $this->apiUrl["query"] . "&method=" . $method;
|
includes/classes/files-in.inc.php
CHANGED
@@ -73,9 +73,9 @@ if(!class_exists("c_ws_plugin__s2member_files_in"))
|
|
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)
|
75 |
{
|
76 |
-
$using_amazon_s3_storage = ((!$req["file_storage"] || strcasecmp((string)$req["file_storage"], "s3") === 0) && c_ws_plugin__s2member_utils_conds::using_amazon_s3_storage()) ? true : false;
|
77 |
$using_amazon_cf_storage = ((!$req["file_storage"] || strcasecmp((string)$req["file_storage"], "cf") === 0) && c_ws_plugin__s2member_utils_conds::using_amazon_cf_storage()) ? true : false;
|
78 |
-
$
|
|
|
79 |
/**/
|
80 |
$excluded = apply_filters("ws_plugin__s2member_check_file_download_access_excluded", false, get_defined_vars());
|
81 |
$valid_file_download_key = ($req["file_download_key"] && is_string($req["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))) ? true : false;
|
@@ -277,22 +277,22 @@ if(!class_exists("c_ws_plugin__s2member_files_in"))
|
|
277 |
do_action("ws_plugin__s2member_during_file_download_access", get_defined_vars());
|
278 |
unset($__refs, $__v); /* Unset defined __refs, __v. */
|
279 |
/**/
|
280 |
-
if($
|
281 |
{
|
282 |
if /* We only need this section when/if we're actually serving. */($serving)
|
283 |
-
wp_redirect(c_ws_plugin__s2member_files_in::
|
284 |
/**/
|
285 |
else /* Else return File Download URL. */
|
286 |
-
return apply_filters("ws_plugin__s2member_file_download_access_url", c_ws_plugin__s2member_files_in::
|
287 |
}
|
288 |
/**/
|
289 |
-
else if($
|
290 |
{
|
291 |
if /* We only need this section when/if we're actually serving. */($serving)
|
292 |
-
wp_redirect(c_ws_plugin__s2member_files_in::
|
293 |
/**/
|
294 |
else /* Else return File Download URL. */
|
295 |
-
return apply_filters("ws_plugin__s2member_file_download_access_url", c_ws_plugin__s2member_files_in::
|
296 |
}
|
297 |
/**/
|
298 |
else if /* Creating a rewrite URL, pointing to local storage. */($creating && $rewriting)
|
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)
|
75 |
{
|
|
|
76 |
$using_amazon_cf_storage = ((!$req["file_storage"] || strcasecmp((string)$req["file_storage"], "cf") === 0) && c_ws_plugin__s2member_utils_conds::using_amazon_cf_storage()) ? true : false;
|
77 |
+
$using_amazon_s3_storage = ((!$req["file_storage"] || strcasecmp((string)$req["file_storage"], "s3") === 0) && c_ws_plugin__s2member_utils_conds::using_amazon_s3_storage()) ? true : false;
|
78 |
+
$using_amazon_storage = /* Either? */ ($using_amazon_cf_storage || $using_amazon_s3_storage) ? true : false;
|
79 |
/**/
|
80 |
$excluded = apply_filters("ws_plugin__s2member_check_file_download_access_excluded", false, get_defined_vars());
|
81 |
$valid_file_download_key = ($req["file_download_key"] && is_string($req["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))) ? true : false;
|
277 |
do_action("ws_plugin__s2member_during_file_download_access", get_defined_vars());
|
278 |
unset($__refs, $__v); /* Unset defined __refs, __v. */
|
279 |
/**/
|
280 |
+
if($using_amazon_storage && $using_amazon_cf_storage && ($serving || ($creating && $url_to_storage_source)))
|
281 |
{
|
282 |
if /* We only need this section when/if we're actually serving. */($serving)
|
283 |
+
wp_redirect(c_ws_plugin__s2member_files_in::amazon_cf_url($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype)).exit();
|
284 |
/**/
|
285 |
else /* Else return File Download URL. */
|
286 |
+
return apply_filters("ws_plugin__s2member_file_download_access_url", c_ws_plugin__s2member_files_in::amazon_cf_url($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype), get_defined_vars());
|
287 |
}
|
288 |
/**/
|
289 |
+
else if($using_amazon_storage && $using_amazon_s3_storage && ($serving || ($creating && $url_to_storage_source)))
|
290 |
{
|
291 |
if /* We only need this section when/if we're actually serving. */($serving)
|
292 |
+
wp_redirect(c_ws_plugin__s2member_files_in::amazon_s3_url($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype)).exit();
|
293 |
/**/
|
294 |
else /* Else return File Download URL. */
|
295 |
+
return apply_filters("ws_plugin__s2member_file_download_access_url", c_ws_plugin__s2member_files_in::amazon_s3_url($req["file_download"], $stream, $inline, $ssl, $basename, $mimetype), get_defined_vars());
|
296 |
}
|
297 |
/**/
|
298 |
else if /* Creating a rewrite URL, pointing to local storage. */($creating && $rewriting)
|
includes/classes/utils-conds.inc.php
CHANGED
@@ -14,10 +14,10 @@
|
|
14 |
* @package s2Member\Utilities
|
15 |
* @since 3.5
|
16 |
*/
|
17 |
-
if
|
18 |
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
-
if
|
21 |
{
|
22 |
/**
|
23 |
* Conditional utilities.
|
@@ -35,9 +35,9 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
|
|
35 |
*
|
36 |
* @return bool True if s2Member Pro is installed, else false.
|
37 |
*/
|
38 |
-
public static function pro_is_installed
|
39 |
{
|
40 |
-
return (defined
|
41 |
}
|
42 |
/**
|
43 |
* Determines whether or not BuddyPress is installed.
|
@@ -48,22 +48,22 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
|
|
48 |
* @param bool $query_active_plugins Optional. If true, this conditional will query active plugins too. Defaults to true if {@link s2Member\WS_PLUGIN__S2MEMBER_ONLY} is true, else false.
|
49 |
* @return bool True if BuddyPress is installed, else false.
|
50 |
*/
|
51 |
-
public static function bp_is_installed
|
52 |
{
|
53 |
-
if
|
54 |
return true; /* Quickest/easiest way to determine. */
|
55 |
/**/
|
56 |
-
$s2o = (defined
|
57 |
/**/
|
58 |
-
if
|
59 |
{
|
60 |
$buddypress = "buddypress/bp-loader.php"; /* BuddyPress. */
|
61 |
/**/
|
62 |
-
$active_plugins = (is_multisite
|
63 |
-
$active_plugins = array_unique
|
64 |
/**/
|
65 |
-
foreach
|
66 |
-
if
|
67 |
return true; /* BuddyPress active. */
|
68 |
}
|
69 |
return false; /* Default return false. */
|
@@ -80,9 +80,9 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
|
|
80 |
*
|
81 |
* @return bool True if this is a Multisite Farm, else false.
|
82 |
*/
|
83 |
-
public static function is_multisite_farm
|
84 |
{
|
85 |
-
return (is_multisite
|
86 |
}
|
87 |
/**
|
88 |
* Checks if a Post is in a child Category.
|
@@ -94,16 +94,14 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
|
|
94 |
* @param int|str $post_id A numeric WordPress® Post ID.
|
95 |
* @return bool True if the Post is inside a desendant of at least one of the specified Categories; else false.
|
96 |
*/
|
97 |
-
public static function in_descendant_category
|
98 |
{
|
99 |
-
foreach
|
100 |
{
|
101 |
-
$descendants = get_term_children
|
102 |
-
|
103 |
-
if ($descendants && in_category ($descendants, $post_id))
|
104 |
return true;
|
105 |
}
|
106 |
-
|
107 |
return false; /* Default return false. */
|
108 |
}
|
109 |
/**
|
@@ -115,17 +113,16 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
|
|
115 |
* @param str $url_uri Either a full URL, or a partial URI to test.
|
116 |
* @return bool True if the URL or URI leads to the site root, else false.
|
117 |
*/
|
118 |
-
public static function is_site_root
|
119 |
{
|
120 |
-
if
|
121 |
{
|
122 |
-
$parse["path"] = (!empty
|
123 |
/**/
|
124 |
-
if
|
125 |
-
if
|
126 |
return true;
|
127 |
}
|
128 |
-
|
129 |
return false; /* Default return false. */
|
130 |
}
|
131 |
/**
|
@@ -136,9 +133,9 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
|
|
136 |
*
|
137 |
* @return bool True if we're in a localhost environment, else false.
|
138 |
*/
|
139 |
-
public static function is_localhost
|
140 |
{
|
141 |
-
if
|
142 |
return true;
|
143 |
/**/
|
144 |
return /* Default return false. */ false;
|
@@ -151,18 +148,16 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
|
|
151 |
*
|
152 |
* @return bool True if using Amazon® S3, else false.
|
153 |
*/
|
154 |
-
public static function using_amazon_s3_storage
|
155 |
{
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
}
|
165 |
-
return false; /* Default return false. */
|
166 |
}
|
167 |
/**
|
168 |
* Checks to see if we're using Amazon® CloudFront.
|
@@ -172,21 +167,21 @@ if (!class_exists ("c_ws_plugin__s2member_utils_conds"))
|
|
172 |
*
|
173 |
* @return bool True if using Amazon® CloudFront, else false.
|
174 |
*/
|
175 |
-
public static function using_amazon_cf_storage
|
176 |
{
|
177 |
-
foreach
|
178 |
-
if
|
179 |
$s3c[$option] = $option_value;
|
180 |
/**/
|
181 |
-
foreach
|
182 |
-
if
|
183 |
$cfc[$option] = $option_value;
|
184 |
/**/
|
185 |
-
if
|
186 |
-
if
|
187 |
return true;
|
188 |
/**/
|
189 |
-
return
|
190 |
}
|
191 |
}
|
192 |
}
|
14 |
* @package s2Member\Utilities
|
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 |
{
|
22 |
/**
|
23 |
* Conditional utilities.
|
35 |
*
|
36 |
* @return bool True if s2Member Pro is installed, else false.
|
37 |
*/
|
38 |
+
public static function pro_is_installed()
|
39 |
{
|
40 |
+
return (defined("WS_PLUGIN__S2MEMBER_PRO_VERSION") && did_action("ws_plugin__s2member_pro_loaded"));
|
41 |
}
|
42 |
/**
|
43 |
* Determines whether or not BuddyPress is installed.
|
48 |
* @param bool $query_active_plugins Optional. If true, this conditional will query active plugins too. Defaults to true if {@link s2Member\WS_PLUGIN__S2MEMBER_ONLY} is true, else false.
|
49 |
* @return bool True if BuddyPress is installed, else false.
|
50 |
*/
|
51 |
+
public static function bp_is_installed($query_active_plugins = NULL)
|
52 |
{
|
53 |
+
if(defined("BP_VERSION") && did_action("bp_core_loaded"))
|
54 |
return true; /* Quickest/easiest way to determine. */
|
55 |
/**/
|
56 |
+
$s2o = (defined("WS_PLUGIN__S2MEMBER_ONLY") && WS_PLUGIN__S2MEMBER_ONLY) ? true : false;
|
57 |
/**/
|
58 |
+
if(($query_active_plugins = (!isset($query_active_plugins) && $s2o) ? true : $query_active_plugins))
|
59 |
{
|
60 |
$buddypress = "buddypress/bp-loader.php"; /* BuddyPress. */
|
61 |
/**/
|
62 |
+
$active_plugins = (is_multisite()) ? wp_get_active_network_plugins() : array();
|
63 |
+
$active_plugins = array_unique(array_merge($active_plugins, wp_get_active_and_valid_plugins()));
|
64 |
/**/
|
65 |
+
foreach($active_plugins as $active_plugin) /* Search. */
|
66 |
+
if(plugin_basename($active_plugin) === $buddypress)
|
67 |
return true; /* BuddyPress active. */
|
68 |
}
|
69 |
return false; /* Default return false. */
|
80 |
*
|
81 |
* @return bool True if this is a Multisite Farm, else false.
|
82 |
*/
|
83 |
+
public static function is_multisite_farm()
|
84 |
{
|
85 |
+
return (is_multisite() && ((is_main_site() && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mms_registration_file"] === "wp-signup") || (defined("MULTISITE_FARM") && MULTISITE_FARM)));
|
86 |
}
|
87 |
/**
|
88 |
* Checks if a Post is in a child Category.
|
94 |
* @param int|str $post_id A numeric WordPress® Post ID.
|
95 |
* @return bool True if the Post is inside a desendant of at least one of the specified Categories; else false.
|
96 |
*/
|
97 |
+
public static function in_descendant_category($cats = FALSE, $post_id = FALSE)
|
98 |
{
|
99 |
+
foreach((array)$cats as $cat)
|
100 |
{
|
101 |
+
$descendants = get_term_children((int)$cat, "category");
|
102 |
+
if($descendants && in_category($descendants, $post_id))
|
|
|
103 |
return true;
|
104 |
}
|
|
|
105 |
return false; /* Default return false. */
|
106 |
}
|
107 |
/**
|
113 |
* @param str $url_uri Either a full URL, or a partial URI to test.
|
114 |
* @return bool True if the URL or URI leads to the site root, else false.
|
115 |
*/
|
116 |
+
public static function is_site_root($url_uri = FALSE)
|
117 |
{
|
118 |
+
if(is_array($parse = c_ws_plugin__s2member_utils_urls::parse_url($url_uri)))
|
119 |
{
|
120 |
+
$parse["path"] = (!empty($parse["path"])) ? ((strpos($parse["path"], "/") === 0) ? $parse["path"] : "/".$parse["path"]) : "/";
|
121 |
/**/
|
122 |
+
if(empty($parse["host"]) || strcasecmp($parse["host"], c_ws_plugin__s2member_utils_urls::parse_url(site_url(), PHP_URL_HOST)) === 0)
|
123 |
+
if($parse["path"] === "/" || rtrim($parse["path"], "/") === rtrim(c_ws_plugin__s2member_utils_urls::parse_url(site_url(), PHP_URL_PATH), "/"))
|
124 |
return true;
|
125 |
}
|
|
|
126 |
return false; /* Default return false. */
|
127 |
}
|
128 |
/**
|
133 |
*
|
134 |
* @return bool True if we're in a localhost environment, else false.
|
135 |
*/
|
136 |
+
public static function is_localhost()
|
137 |
{
|
138 |
+
if((defined("LOCALHOST") && LOCALHOST) || stripos($_SERVER["HTTP_HOST"], "localhost") !== false || strpos($_SERVER["HTTP_HOST"], "127.0.0.1") !== false)
|
139 |
return true;
|
140 |
/**/
|
141 |
return /* Default return false. */ false;
|
148 |
*
|
149 |
* @return bool True if using Amazon® S3, else false.
|
150 |
*/
|
151 |
+
public static function using_amazon_s3_storage()
|
152 |
{
|
153 |
+
foreach($GLOBALS["WS_PLUGIN__"]["s2member"]["o"] as $option => $option_value)
|
154 |
+
if(preg_match("/^amazon_s3_files_/", $option) && ($option = preg_replace("/^amazon_s3_files_/", "", $option)))
|
155 |
+
$s3c[$option] = $option_value;
|
156 |
+
/**/
|
157 |
+
if(!empty($s3c["bucket"]) && !empty($s3c["access_key"]) && !empty($s3c["secret_key"]))
|
158 |
+
return true;
|
159 |
+
/**/
|
160 |
+
return /* Default return false. */ false;
|
|
|
|
|
161 |
}
|
162 |
/**
|
163 |
* Checks to see if we're using Amazon® CloudFront.
|
167 |
*
|
168 |
* @return bool True if using Amazon® CloudFront, else false.
|
169 |
*/
|
170 |
+
public static function using_amazon_cf_storage()
|
171 |
{
|
172 |
+
foreach($GLOBALS["WS_PLUGIN__"]["s2member"]["o"] as $option => $option_value)
|
173 |
+
if(preg_match("/^amazon_s3_files_/", $option) && ($option = preg_replace("/^amazon_s3_files_/", "", $option)))
|
174 |
$s3c[$option] = $option_value;
|
175 |
/**/
|
176 |
+
foreach($GLOBALS["WS_PLUGIN__"]["s2member"]["o"] as $option => $option_value)
|
177 |
+
if(preg_match("/^amazon_cf_files_/", $option) && ($option = preg_replace("/^amazon_cf_files_/", "", $option)))
|
178 |
$cfc[$option] = $option_value;
|
179 |
/**/
|
180 |
+
if(!empty($s3c["bucket"]) && !empty($s3c["access_key"]) && !empty($s3c["secret_key"]))
|
181 |
+
if(!empty($cfc["private_key"]) && !empty($cfc["private_key_id"]) && !empty($cfc["distros_access_id"]) && !empty($cfc["distros_s3_access_id"]) && !empty($cfc["distro_downloads_id"]) && !empty($cfc["distro_downloads_dname"]) && !empty($cfc["distro_streaming_id"]) && !empty($cfc["distro_streaming_dname"]))
|
182 |
return true;
|
183 |
/**/
|
184 |
+
return /* Default return false. */ false;
|
185 |
}
|
186 |
}
|
187 |
}
|
includes/menu-pages/updates.inc.php
CHANGED
@@ -14,10 +14,10 @@
|
|
14 |
* @package s2Member\Menu_Pages
|
15 |
* @since 111205
|
16 |
*/
|
17 |
-
if
|
18 |
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
-
if
|
21 |
{
|
22 |
/**
|
23 |
* Newsletter/Updates for Menu Pages.
|
@@ -27,67 +27,66 @@ if (!class_exists ("c_ws_plugin__s2member_menu_pages_updates"))
|
|
27 |
*/
|
28 |
class c_ws_plugin__s2member_menu_pages_updates
|
29 |
{
|
30 |
-
public function __construct
|
31 |
{
|
32 |
-
if
|
33 |
{
|
34 |
-
echo '<form id="ws-updates-form" action="http://websharks-inc.us1.list-manage1.com/subscribe/post?u=8f347da54d66b5298d13237d9&id=19e9d213bc" method="post" target="_blank">'
|
35 |
-
echo '<input type="hidden" name="group[1][4]" id="ws-updates-group" value="4" />' . "\n";
|
36 |
/**/
|
37 |
-
if
|
38 |
{
|
39 |
-
echo '<div class="ws-menu-page-r-group-header">'
|
40 |
-
echo '<ins class="open">-</ins>Latest News<em>!</em>'
|
41 |
-
echo '</div>'
|
42 |
/**/
|
43 |
-
echo '<div class="ws-menu-page-r-group" style="display:block;">'
|
44 |
-
echo '<script type="text/javascript" src="http://feeds.feedburner.com/s2member-updates?format=sigpro&nItems=3&openLinks=new&displayTitle=false&displayFeedIcon=false&displayExcerpts=false&displayAuthor=false&displayDate=false&displayEnclosures=false&displayLinkToFeed=false"></script>'
|
45 |
-
echo '</div>'
|
46 |
}
|
47 |
/**/
|
48 |
-
echo '<div class="ws-menu-page-r-group-header">'
|
49 |
-
echo '<ins>+</ins>Email Updates<em>!</em>'
|
50 |
-
echo '</div>'
|
51 |
/**/
|
52 |
-
echo '<div class="ws-menu-page-r-group">'
|
53 |
/**/
|
54 |
-
echo '<div id="ws-updates-div-fname">'
|
55 |
-
echo '<label for="ws-updates-fname">First Name: *</label><br />'
|
56 |
-
echo '<input type="text" aria-required="true" autocomplete="off" name="FNAME" id="ws-updates-fname" value="'
|
57 |
-
echo '</div>'
|
58 |
/**/
|
59 |
-
echo '<div id="ws-updates-div-lname">'
|
60 |
-
echo '<label for="ws-updates-lname">Last Name: *</label><br />'
|
61 |
-
echo '<input type="text" aria-required="true" autocomplete="off" name="LNAME" id="ws-updates-lname" value="'
|
62 |
-
echo '</div>'
|
63 |
/**/
|
64 |
-
echo '<div id="ws-updates-div-email">'
|
65 |
-
echo '<label for="ws-updates-email">Email Address: *</label><br />'
|
66 |
-
echo '<input type="text" aria-required="true" autocomplete="off" name="EMAIL" id="ws-updates-email" value="'
|
67 |
-
echo '</div>'
|
68 |
/**/
|
69 |
-
if
|
70 |
{
|
71 |
-
echo '<div id="ws-updates-div-subs">'
|
72 |
-
echo '<script type="text/javascript" src="http://websharks-inc.us1.list-manage.com/subscriber-count?b=31&u=8c67d547-edf6-41c5-807d-2d2d0e6cffd1&id=19e9d213bc"></script>'
|
73 |
-
echo '</div>'
|
74 |
}
|
75 |
/**/
|
76 |
-
echo '<div id="ws-updates-div-priv">'
|
77 |
-
echo '( <a href="'
|
78 |
-
echo '</div>'
|
79 |
/**/
|
80 |
-
echo '<div id="ws-updates-div-submit">'
|
81 |
-
echo '<input type="submit" value="Subscribe" name="subscribe" />'
|
82 |
-
echo '</div>'
|
83 |
/**/
|
84 |
-
echo '</div>'
|
85 |
/**/
|
86 |
-
echo '</form>'
|
87 |
}
|
88 |
}
|
89 |
}
|
90 |
}
|
91 |
/**/
|
92 |
-
new c_ws_plugin__s2member_menu_pages_updates
|
93 |
?>
|
14 |
* @package s2Member\Menu_Pages
|
15 |
* @since 111205
|
16 |
*/
|
17 |
+
if(realpath(__FILE__) === realpath($_SERVER["SCRIPT_FILENAME"]))
|
18 |
exit("Do not access this file directly.");
|
19 |
/**/
|
20 |
+
if(!class_exists("c_ws_plugin__s2member_menu_pages_updates"))
|
21 |
{
|
22 |
/**
|
23 |
* Newsletter/Updates for Menu Pages.
|
27 |
*/
|
28 |
class c_ws_plugin__s2member_menu_pages_updates
|
29 |
{
|
30 |
+
public function __construct()
|
31 |
{
|
32 |
+
if(is_object($user = wp_get_current_user()) && ($user_id = $user->ID))
|
33 |
{
|
34 |
+
echo '<form id="ws-updates-form" action="http://websharks-inc.us1.list-manage1.com/subscribe/post?u=8f347da54d66b5298d13237d9&id=19e9d213bc" method="post" target="_blank">'."\n";
|
|
|
35 |
/**/
|
36 |
+
if(!is_ssl() && /* Don't require remote connections when running on `localhost`. */ !c_ws_plugin__s2member_utils_conds::is_localhost())
|
37 |
{
|
38 |
+
echo '<div class="ws-menu-page-r-group-header">'."\n";
|
39 |
+
echo '<ins class="open">-</ins>Latest News<em>!</em>'."\n";
|
40 |
+
echo '</div>'."\n";
|
41 |
/**/
|
42 |
+
echo '<div class="ws-menu-page-r-group" style="display:block;">'."\n";
|
43 |
+
echo '<script type="text/javascript" src="http://feeds.feedburner.com/s2member-updates?format=sigpro&nItems=3&openLinks=new&displayTitle=false&displayFeedIcon=false&displayExcerpts=false&displayAuthor=false&displayDate=false&displayEnclosures=false&displayLinkToFeed=false"></script>'."\n";
|
44 |
+
echo '</div>'."\n";
|
45 |
}
|
46 |
/**/
|
47 |
+
echo '<div class="ws-menu-page-r-group-header">'."\n";
|
48 |
+
echo '<ins>+</ins>Email Updates<em>!</em>'."\n";
|
49 |
+
echo '</div>'."\n";
|
50 |
/**/
|
51 |
+
echo '<div class="ws-menu-page-r-group">'."\n";
|
52 |
/**/
|
53 |
+
echo '<div id="ws-updates-div-fname">'."\n";
|
54 |
+
echo '<label for="ws-updates-fname">First Name: *</label><br />'."\n";
|
55 |
+
echo '<input type="text" aria-required="true" autocomplete="off" name="FNAME" id="ws-updates-fname" value="'.esc_attr($user->first_name).'" />'."\n";
|
56 |
+
echo '</div>'."\n";
|
57 |
/**/
|
58 |
+
echo '<div id="ws-updates-div-lname">'."\n";
|
59 |
+
echo '<label for="ws-updates-lname">Last Name: *</label><br />'."\n";
|
60 |
+
echo '<input type="text" aria-required="true" autocomplete="off" name="LNAME" id="ws-updates-lname" value="'.esc_attr($user->last_name).'" />'."\n";
|
61 |
+
echo '</div>'."\n";
|
62 |
/**/
|
63 |
+
echo '<div id="ws-updates-div-email">'."\n";
|
64 |
+
echo '<label for="ws-updates-email">Email Address: *</label><br />'."\n";
|
65 |
+
echo '<input type="text" aria-required="true" autocomplete="off" name="EMAIL" id="ws-updates-email" value="'.format_to_edit($user->user_email).'" />'."\n";
|
66 |
+
echo '</div>'."\n";
|
67 |
/**/
|
68 |
+
if(!is_ssl() && /* Don't require remote connections when running on `localhost`. */ !c_ws_plugin__s2member_utils_conds::is_localhost())
|
69 |
{
|
70 |
+
echo '<div id="ws-updates-div-subs">'."\n";
|
71 |
+
echo '<script type="text/javascript" src="http://websharks-inc.us1.list-manage.com/subscriber-count?b=31&u=8c67d547-edf6-41c5-807d-2d2d0e6cffd1&id=19e9d213bc"></script>'."\n";
|
72 |
+
echo '</div>'."\n";
|
73 |
}
|
74 |
/**/
|
75 |
+
echo '<div id="ws-updates-div-priv">'."\n";
|
76 |
+
echo '( <a href="'.esc_attr(c_ws_plugin__s2member_readmes::parse_readme_value("Privacy URI")).'" target="_blank">we DO respect your privacy</a> )'."\n";
|
77 |
+
echo '</div>'."\n";
|
78 |
/**/
|
79 |
+
echo '<div id="ws-updates-div-submit">'."\n";
|
80 |
+
echo '<input type="submit" value="Subscribe" name="subscribe" />'."\n";
|
81 |
+
echo '</div>'."\n";
|
82 |
/**/
|
83 |
+
echo '</div>'."\n";
|
84 |
/**/
|
85 |
+
echo '</form>'."\n";
|
86 |
}
|
87 |
}
|
88 |
}
|
89 |
}
|
90 |
/**/
|
91 |
+
new c_ws_plugin__s2member_menu_pages_updates();
|
92 |
?>
|
includes/translations/s2member.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the s2Member® Framework package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: s2Member® Framework
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/__s2member\n"
|
7 |
-
"POT-Creation-Date: 2012-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
2 |
# This file is distributed under the same license as the s2Member® Framework package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: s2Member® Framework 120219\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/__s2member\n"
|
7 |
+
"POT-Creation-Date: 2012-03-01 09:08:56+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
readme.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
=== s2Member® Framework (Member Roles, Capabilities, Membership, PayPal Members) ===
|
2 |
|
3 |
-
Version:
|
4 |
-
Stable tag:
|
5 |
|
6 |
SSL Compatible: yes
|
7 |
bbPress® Compatible: yes
|
@@ -85,13 +85,17 @@ Please see [this FAQ entry](http://www.s2member.com/faqs/#s2-faqs-translations)
|
|
85 |
|
86 |
== Upgrade Notice ==
|
87 |
|
88 |
-
=
|
89 |
-
|
90 |
|
91 |
== Changelog ==
|
92 |
|
|
|
|
|
|
|
|
|
93 |
= v120219 =
|
94 |
-
* (s2Member) **File downloads**. s2Member
|
95 |
* (s2Member) **Link updates**. Some of the documentation built into the s2Member® plugin contained links which were outdated after our recent move to the new [s2Member.com](http://www.s2member.com/). These links have now been updated within the plugin.
|
96 |
* (s2Member) **New video tutorial**. [s2Member® Intros, Framework and Pro](http://www.s2member.com/videos/85E41C40550808C2/)
|
97 |
* (s2Member) **New video tutorial**. [s2Member® File Downloads, Complete Series / From Basics On Up](http://www.s2member.com/videos/7547A199A4385310/)
|
1 |
=== s2Member® Framework (Member Roles, Capabilities, Membership, PayPal Members) ===
|
2 |
|
3 |
+
Version: 120301
|
4 |
+
Stable tag: 120301
|
5 |
|
6 |
SSL Compatible: yes
|
7 |
bbPress® Compatible: yes
|
85 |
|
86 |
== Upgrade Notice ==
|
87 |
|
88 |
+
= v120301 =
|
89 |
+
Two bug fixes. Upgrade immediately.
|
90 |
|
91 |
== Changelog ==
|
92 |
|
93 |
+
= v120301 =
|
94 |
+
* (s2Member Pro) **ClickBank**. Bug fix in call to `http_build_query()` related to `arg_separator`. This affected installations of PHP with something other than a default INI value for argument separators. Fixed in this release for better compatibility.
|
95 |
+
* (s2Member/s2Member Pro) **File downloads**. Bug fix in s2Member's handling of the `"file_storage"` parameter to API Function `s2member_file_download_url()`. Fixed in this release.
|
96 |
+
|
97 |
= v120219 =
|
98 |
+
* (s2Member) **File downloads**. s2Member's `.htaccess` rules updated to also support older versions of the Apache 1.x series. However, we still recommend that you run s2Member® with Apache 2.0 or higher. Or, with another modern web server that's Apache-compatible, such as [LiteSpeed](http://litespeedtech.com/).
|
99 |
* (s2Member) **Link updates**. Some of the documentation built into the s2Member® plugin contained links which were outdated after our recent move to the new [s2Member.com](http://www.s2member.com/). These links have now been updated within the plugin.
|
100 |
* (s2Member) **New video tutorial**. [s2Member® Intros, Framework and Pro](http://www.s2member.com/videos/85E41C40550808C2/)
|
101 |
* (s2Member) **New video tutorial**. [s2Member® File Downloads, Complete Series / From Basics On Up](http://www.s2member.com/videos/7547A199A4385310/)
|
s2member.php
CHANGED
@@ -19,8 +19,8 @@
|
|
19 |
*/
|
20 |
/* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
|
21 |
|
22 |
-
Version:
|
23 |
-
Stable tag:
|
24 |
|
25 |
SSL Compatible: yes
|
26 |
bbPress® 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", "
|
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", "
|
109 |
/*
|
110 |
Several compatibility checks.
|
111 |
If all pass, load the s2Member plugin.
|
19 |
*/
|
20 |
/* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
|
21 |
|
22 |
+
Version: 120301
|
23 |
+
Stable tag: 120301
|
24 |
|
25 |
SSL Compatible: yes
|
26 |
bbPress® Compatible: yes
|
75 |
* @var str
|
76 |
*/
|
77 |
if(!defined("WS_PLUGIN__S2MEMBER_VERSION"))
|
78 |
+
define("WS_PLUGIN__S2MEMBER_VERSION", "120301" /* !#distro-version#! */);
|
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", "120301" /* !#distro-version#! */);
|
109 |
/*
|
110 |
Several compatibility checks.
|
111 |
If all pass, load the s2Member plugin.
|