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

Version Description

= v130220 = (Maintenance Release) Upgrade immediately.

Download this release

Release Info

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

Code changes from version 130214 to 130220

checksum.txt CHANGED
@@ -1 +1 @@
1
- e6939c90eba55a9a1ebc7b3822f2b86c
1
+ 7035a163eae102761fa9a4f10d746b2a
includes/classes/auto-eots.inc.php CHANGED
@@ -145,9 +145,11 @@ if (!class_exists ("c_ws_plugin__s2member_auto_eots"))
145
  if /* Only if NOT the existing Role. */($existing_role !== $demotion_role)
146
  $user->set_role /* Give User the demotion Role. */ ($demotion_role);
147
 
148
- foreach ($user->allcaps as $cap => $cap_enabled)
149
- if (preg_match ("/^access_s2member_ccap_/", $cap))
150
- $user->remove_cap ($ccap = $cap);
 
 
151
 
152
  delete_user_option ($user_id, "s2member_custom");
153
  delete_user_option ($user_id, "s2member_subscr_id");
145
  if /* Only if NOT the existing Role. */($existing_role !== $demotion_role)
146
  $user->set_role /* Give User the demotion Role. */ ($demotion_role);
147
 
148
+ if(apply_filters("ws_plugin__s2member_remove_ccaps_during_eot_events",
149
+ (bool)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eots_remove_ccaps"], get_defined_vars()))
150
+ foreach ($user->allcaps as $cap => $cap_enabled)
151
+ if (preg_match ("/^access_s2member_ccap_/", $cap))
152
+ $user->remove_cap ($ccap = $cap);
153
 
154
  delete_user_option ($user_id, "s2member_custom");
155
  delete_user_option ($user_id, "s2member_subscr_id");
includes/classes/email-configs.inc.php CHANGED
@@ -200,48 +200,68 @@ if (!class_exists ("c_ws_plugin__s2member_email_configs"))
200
  {
201
  $fields = get_user_option ("s2member_custom_fields", $user_id);
202
  $cv = preg_split ("/\|/", get_user_option ("s2member_custom", $user_id));
 
 
 
 
 
 
203
  $user_full_name = trim ($user->first_name . " " . $user->last_name);
204
  $user_ip = $_SERVER["REMOTE_ADDR"];
205
 
206
  if (($sbj = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_email_subject"]))
207
  if (($sbj = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $sbj)))
208
  if (($sbj = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $sbj)))
209
- if (($sbj = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name), $sbj)))
210
- if (($sbj = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name), $sbj)))
211
- if (($sbj = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name), $sbj)))
212
- if (($sbj = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $sbj)))
213
- if (($sbj = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $sbj)))
214
- if (($sbj = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $sbj)))
215
- if (($sbj = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $sbj)))
216
- if (($sbj = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $sbj)))
217
- {
218
- if (is_array ($fields) && !empty ($fields))
219
- foreach /* Custom Registration/Profile Fields. */ ($fields as $var => $val)
220
- if (!($sbj = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $sbj)))
221
- break;
222
-
223
- if (($msg = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_email_message"]))
224
- if (($msg = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $msg)))
225
- if (($msg = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $msg)))
226
- if (($msg = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name), $msg)))
227
- if (($msg = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name), $msg)))
228
- if (($msg = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name), $msg)))
229
- if (($msg = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $msg)))
230
- if (($msg = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $msg)))
231
- if (($msg = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $msg)))
232
- if (($msg = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $msg)))
233
- if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
234
- {
235
- if (is_array ($fields) && !empty ($fields))
236
- foreach /* Custom Registration/Profile Fields. */ ($fields as $var => $val)
237
- if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
238
- break;
239
-
240
- if (($sbj = trim (preg_replace ("/%%(.+?)%%/i", "", $sbj))) && ($msg = trim (preg_replace ("/%%(.+?)%%/i", "", $msg)))) // Still have a ``$sbj`` and a ``$msg``?
241
-
242
- c_ws_plugin__s2member_email_configs::email_config () . wp_mail ($user->user_email, $sbj, $msg, "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">\r\nContent-Type: text/plain; charset=UTF-8") . c_ws_plugin__s2member_email_configs::email_config_release ();
243
- }
244
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  }
246
 
247
  if /* Send Admin(s) a notification? */ (in_array ("admin", $notify))
@@ -249,70 +269,93 @@ if (!class_exists ("c_ws_plugin__s2member_email_configs"))
249
  {
250
  $fields = get_user_option ("s2member_custom_fields", $user_id);
251
  $cv = preg_split ("/\|/", get_user_option ("s2member_custom", $user_id));
 
 
 
 
 
 
252
  $user_full_name = trim ($user->first_name . " " . $user->last_name);
253
  $user_ip = $_SERVER["REMOTE_ADDR"];
254
 
255
  if (($rec = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_recipients"]))
256
  if (($rec = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $rec)))
257
  if (($rec = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $rec)))
258
- if (($rec = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_dq (c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name)), $rec)))
259
- if (($rec = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_dq (c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name)), $rec)))
260
- if (($rec = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_dq (c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name)), $rec)))
261
- if (($rec = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $rec)))
262
- if (($rec = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $rec)))
263
- if (($rec = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $rec)))
264
- if (($rec = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $rec)))
265
- if (($rec = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $rec)))
266
- {
267
- if (is_array ($fields) && !empty ($fields))
268
- foreach /* Custom Registration/Profile Fields. */ ($fields as $var => $val)
269
- if (!($rec = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $rec)))
270
- break;
271
-
272
- if (($sbj = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_subject"]))
273
- if (($sbj = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $sbj)))
274
- if (($sbj = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $sbj)))
275
- if (($sbj = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name), $sbj)))
276
- if (($sbj = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name), $sbj)))
277
- if (($sbj = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name), $sbj)))
278
- if (($sbj = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $sbj)))
279
- if (($sbj = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $sbj)))
280
- if (($sbj = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $sbj)))
281
- if (($sbj = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $sbj)))
282
- if (($sbj = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $sbj)))
283
- {
284
- if (is_array ($fields) && !empty ($fields))
285
- foreach /* Custom Registration/Profile Fields. */ ($fields as $var => $val)
286
- if (!($sbj = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $sbj)))
287
- break;
288
-
289
- if (($msg = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_message"]))
290
- if (($msg = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $msg)))
291
- if (($msg = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $msg)))
292
- if (($msg = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name), $msg)))
293
- if (($msg = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name), $msg)))
294
- if (($msg = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name), $msg)))
295
- if (($msg = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $msg)))
296
- if (($msg = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $msg)))
297
- if (($msg = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $msg)))
298
- if (($msg = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $msg)))
299
- if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
300
- {
301
- if (is_array ($fields) && !empty ($fields))
302
- foreach /* Custom Registration/Profile Fields. */ ($fields as $var => $val)
303
- if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
304
- break;
305
-
306
- if (($rec = trim (preg_replace ("/%%(.+?)%%/i", "", $rec))) && ($sbj = trim (preg_replace ("/%%(.+?)%%/i", "", $sbj))) && ($msg = trim (preg_replace ("/%%(.+?)%%/i", "", $msg))))
307
- {
308
- foreach /* A possible list of recipients. */ (c_ws_plugin__s2member_utils_strings::parse_emails ($rec) as $recipient)
309
- wp_mail ($recipient, $sbj, $msg, "Content-Type: text/plain; charset=UTF-8");
310
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
311
  }
312
  }
313
- }
314
  }
315
-
316
  if /* Back on? */ ($email_configs_were_on)
317
  c_ws_plugin__s2member_email_configs::email_config ();
318
 
200
  {
201
  $fields = get_user_option ("s2member_custom_fields", $user_id);
202
  $cv = preg_split ("/\|/", get_user_option ("s2member_custom", $user_id));
203
+
204
+ $role = c_ws_plugin__s2member_user_access::user_access_role($user);
205
+ $label = c_ws_plugin__s2member_user_access::user_access_label($user);
206
+ $level = c_ws_plugin__s2member_user_access::user_access_level($user);
207
+ $ccaps = implode(",", c_ws_plugin__s2member_user_access::user_access_ccaps($user));
208
+
209
  $user_full_name = trim ($user->first_name . " " . $user->last_name);
210
  $user_ip = $_SERVER["REMOTE_ADDR"];
211
 
212
  if (($sbj = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_email_subject"]))
213
  if (($sbj = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $sbj)))
214
  if (($sbj = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $sbj)))
215
+ if (($sbj = preg_replace ("/%%role%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($role), $sbj)))
216
+ if (($sbj = preg_replace ("/%%label%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($label), $sbj)))
217
+ if (($sbj = preg_replace ("/%%level%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($level), $sbj)))
218
+ if (($sbj = preg_replace ("/%%ccaps%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($ccaps), $sbj)))
219
+ if (($sbj = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name), $sbj)))
220
+ if (($sbj = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name), $sbj)))
221
+ if (($sbj = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name), $sbj)))
222
+ if (($sbj = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $sbj)))
223
+ if (($sbj = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $sbj)))
224
+ if (($sbj = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $sbj)))
225
+ if (($sbj = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $sbj)))
226
+ if (($sbj = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $sbj)))
227
+ {
228
+ if (is_array ($fields) && !empty ($fields))
229
+ foreach /* Custom Registration/Profile Fields. */ ($fields as $var => $val)
230
+ if (!($sbj = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $sbj)))
231
+ break;
232
+
233
+ if (($msg = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_email_message"]))
234
+ if (($msg = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $msg)))
235
+ if (($msg = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $msg)))
236
+ if (($msg = preg_replace ("/%%role%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($role), $msg)))
237
+ if (($msg = preg_replace ("/%%label%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($label), $msg)))
238
+ if (($msg = preg_replace ("/%%level%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($level), $msg)))
239
+ if (($msg = preg_replace ("/%%ccaps%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($ccaps), $msg)))
240
+ if (($msg = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name), $msg)))
241
+ if (($msg = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name), $msg)))
242
+ if (($msg = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name), $msg)))
243
+ if (($msg = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $msg)))
244
+ if (($msg = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $msg)))
245
+ if (($msg = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $msg)))
246
+ if (($msg = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $msg)))
247
+ if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
248
+ {
249
+ if (is_array ($fields) && !empty ($fields))
250
+ foreach /* Custom Registration/Profile Fields. */ ($fields as $var => $val)
251
+ if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
252
+ break;
253
+
254
+ if (($sbj = trim (preg_replace ("/%%(.+?)%%/i", "", $sbj))) && ($msg = trim (preg_replace ("/%%(.+?)%%/i", "", $msg)))) // Still have a ``$sbj`` and a ``$msg``?
255
+ {
256
+ if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ())
257
+ {
258
+ $sbj = c_ws_plugin__s2member_utilities::evl($sbj, get_defined_vars());
259
+ $msg = c_ws_plugin__s2member_utilities::evl($msg, get_defined_vars());
260
+ }
261
+ c_ws_plugin__s2member_email_configs::email_config () . wp_mail ($user->user_email, apply_filters("ws_plugin__s2member_welcome_email_sbj", $sbj, get_defined_vars()), apply_filters("ws_plugin__s2member_welcome_email_msg", $msg, get_defined_vars()), "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">\r\nContent-Type: text/plain; charset=UTF-8") . c_ws_plugin__s2member_email_configs::email_config_release ();
262
+ }
263
+ }
264
+ }
265
  }
266
 
267
  if /* Send Admin(s) a notification? */ (in_array ("admin", $notify))
269
  {
270
  $fields = get_user_option ("s2member_custom_fields", $user_id);
271
  $cv = preg_split ("/\|/", get_user_option ("s2member_custom", $user_id));
272
+
273
+ $role = c_ws_plugin__s2member_user_access::user_access_role($user);
274
+ $label = c_ws_plugin__s2member_user_access::user_access_label($user);
275
+ $level = c_ws_plugin__s2member_user_access::user_access_level($user);
276
+ $ccaps = implode(",", c_ws_plugin__s2member_user_access::user_access_ccaps($user));
277
+
278
  $user_full_name = trim ($user->first_name . " " . $user->last_name);
279
  $user_ip = $_SERVER["REMOTE_ADDR"];
280
 
281
  if (($rec = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_recipients"]))
282
  if (($rec = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $rec)))
283
  if (($rec = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $rec)))
284
+ if (($rec = preg_replace ("/%%role%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($role), $rec)))
285
+ if (($rec = preg_replace ("/%%label%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($label), $rec)))
286
+ if (($rec = preg_replace ("/%%level%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($level), $rec)))
287
+ if (($rec = preg_replace ("/%%ccaps%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($ccaps), $rec)))
288
+ if (($rec = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_dq (c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name)), $rec)))
289
+ if (($rec = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_dq (c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name)), $rec)))
290
+ if (($rec = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_dq (c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name)), $rec)))
291
+ if (($rec = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $rec)))
292
+ if (($rec = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $rec)))
293
+ if (($rec = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $rec)))
294
+ if (($rec = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $rec)))
295
+ if (($rec = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $rec)))
296
+ {
297
+ if (is_array ($fields) && !empty ($fields))
298
+ foreach /* Custom Registration/Profile Fields. */ ($fields as $var => $val)
299
+ if (!($rec = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $rec)))
300
+ break;
301
+
302
+ if (($sbj = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_subject"]))
303
+ if (($sbj = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $sbj)))
304
+ if (($sbj = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $sbj)))
305
+ if (($sbj = preg_replace ("/%%role%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($role), $sbj)))
306
+ if (($sbj = preg_replace ("/%%label%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($label), $sbj)))
307
+ if (($sbj = preg_replace ("/%%level%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($level), $sbj)))
308
+ if (($sbj = preg_replace ("/%%ccaps%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($ccaps), $sbj)))
309
+ if (($sbj = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name), $sbj)))
310
+ if (($sbj = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name), $sbj)))
311
+ if (($sbj = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name), $sbj)))
312
+ if (($sbj = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $sbj)))
313
+ if (($sbj = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $sbj)))
314
+ if (($sbj = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $sbj)))
315
+ if (($sbj = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $sbj)))
316
+ if (($sbj = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $sbj)))
317
+ {
318
+ if (is_array ($fields) && !empty ($fields))
319
+ foreach /* Custom Registration/Profile Fields. */ ($fields as $var => $val)
320
+ if (!($sbj = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $sbj)))
321
+ break;
322
+
323
+ if (($msg = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["new_user_admin_email_message"]))
324
+ if (($msg = preg_replace ("/%%cv([0-9]+)%%/ei", 'trim($cv[$1])', $msg)))
325
+ if (($msg = preg_replace ("/%%wp_login_url%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (wp_login_url ()), $msg)))
326
+ if (($msg = preg_replace ("/%%role%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($role), $msg)))
327
+ if (($msg = preg_replace ("/%%label%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($label), $msg)))
328
+ if (($msg = preg_replace ("/%%level%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($level), $msg)))
329
+ if (($msg = preg_replace ("/%%ccaps%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($ccaps), $msg)))
330
+ if (($msg = preg_replace ("/%%user_first_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->first_name), $msg)))
331
+ if (($msg = preg_replace ("/%%user_last_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->last_name), $msg)))
332
+ if (($msg = preg_replace ("/%%user_full_name%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_full_name), $msg)))
333
+ if (($msg = preg_replace ("/%%user_email%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_email), $msg)))
334
+ if (($msg = preg_replace ("/%%user_login%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user->user_login), $msg)))
335
+ if (($msg = preg_replace ("/%%user_pass%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_pass), $msg)))
336
+ if (($msg = preg_replace ("/%%user_ip%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_ip), $msg)))
337
+ if (($msg = preg_replace ("/%%user_id%%/i", c_ws_plugin__s2member_utils_strings::esc_ds ($user_id), $msg)))
338
+ {
339
+ if (is_array ($fields) && !empty ($fields))
340
+ foreach /* Custom Registration/Profile Fields. */ ($fields as $var => $val)
341
+ if (!($msg = preg_replace ("/%%" . preg_quote ($var, "/") . "%%/i", c_ws_plugin__s2member_utils_strings::esc_ds (maybe_serialize ($val)), $msg)))
342
+ break;
343
+
344
+ if (($rec = trim (preg_replace ("/%%(.+?)%%/i", "", $rec))) && ($sbj = trim (preg_replace ("/%%(.+?)%%/i", "", $sbj))) && ($msg = trim (preg_replace ("/%%(.+?)%%/i", "", $msg))))
345
+ {
346
+ if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ())
347
+ {
348
+ $rec = c_ws_plugin__s2member_utilities::evl($rec, get_defined_vars());
349
+ $sbj = c_ws_plugin__s2member_utilities::evl($sbj, get_defined_vars());
350
+ $msg = c_ws_plugin__s2member_utilities::evl($msg, get_defined_vars());
351
+ }
352
+ foreach /* A possible list of recipients. */ (c_ws_plugin__s2member_utils_strings::parse_emails ($_rec) as $recipient)
353
+ wp_mail ($recipient, apply_filters("ws_plugin__s2member_admin_new_user_email_sbj", $sbj, get_defined_vars()), apply_filters("ws_plugin__s2member_admin_new_user_email_msg", $msg, get_defined_vars()), "Content-Type: text/plain; charset=UTF-8");
354
+ }
355
+ }
356
  }
357
  }
 
358
  }
 
359
  if /* Back on? */ ($email_configs_were_on)
360
  c_ws_plugin__s2member_email_configs::email_config ();
361
 
includes/classes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php CHANGED
@@ -113,7 +113,9 @@ if(!class_exists("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_lev
113
  if($existing_role !== $demotion_role) // Only if NOT the existing Role.
114
  $user->set_role($demotion_role); // Give User the demotion Role.
115
 
116
- foreach($user->allcaps as $cap => $cap_enabled)
 
 
117
  if(preg_match("/^access_s2member_ccap_/", $cap))
118
  $user->remove_cap($ccap = $cap);
119
 
@@ -160,7 +162,6 @@ if(!class_exists("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_lev
160
 
161
  $paypal["s2member_log"][] = "EOT/Deletion Notification URLs have been processed.";
162
  }
163
-
164
  if($processing && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_del_notification_recipients"] && is_array($cv = preg_split("/\|/", $paypal["custom"])))
165
  {
166
  $msg = $sbj = "(s2Member / API Notification Email) - EOT/Deletion";
@@ -212,12 +213,10 @@ if(!class_exists("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_lev
212
 
213
  $paypal["s2member_log"][] = "EOT/Deletion Notification Emails have been processed.";
214
  }
215
-
216
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
217
  do_action("ws_plugin__s2member_during_paypal_notify_during_subscr_eot_demote", get_defined_vars());
218
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
219
  }
220
-
221
  else if($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_eot_behavior"] === "delete")
222
  {
223
  $processing = $during = true; // Yes, we ARE processing this.
@@ -249,19 +248,17 @@ if(!class_exists("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_lev
249
  do_action("ws_plugin__s2member_during_paypal_notify_during_subscr_eot_delete", get_defined_vars());
250
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
251
  }
252
-
253
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
254
  do_action("ws_plugin__s2member_during_paypal_notify_during_subscr_eot", get_defined_vars());
255
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
256
  }
257
-
258
  else // Otherwise, treat this as if it were a cancellation. EOTs are currently disabled.
259
  {
260
  $processing = $during = true; // Yes, we ARE processing this.
261
 
262
  update_user_option($user_id, "s2member_auto_eot_time", ($auto_eot_time = strtotime("now")));
263
 
264
- $paypal["s2member_log"][] = "Auto-EOT is currently disabled. Skipping immediate EOT (demote|delete), for now.";
265
  $paypal["s2member_log"][] = "Recording the Auto-EOT Time for this Member's account: ".date("D M j, Y g:i a T", $auto_eot_time);
266
 
267
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
@@ -272,7 +269,6 @@ if(!class_exists("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_lev
272
  else
273
  $paypal["s2member_log"][] = "Unable to (demote|delete) Member. The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access.";
274
  }
275
-
276
  else if($is_delayed_eot && !get_user_option("s2member_auto_eot_time", $user_id))
277
  {
278
  if(!$user->has_cap("administrator")) // Do NOT process this routine on Administrators.
@@ -293,7 +289,6 @@ if(!class_exists("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_lev
293
  else
294
  $paypal["s2member_log"][] = "Ignoring Delayed EOT. The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access.";
295
  }
296
-
297
  else if(!$is_refund_or_reversal || $is_delayed_eot)
298
  $paypal["s2member_log"][] = "Skipping (demote|delete) Member, for now. An Auto-EOT Time is already set for this account. When an Auto-EOT Time has been recorded, s2Member will handle EOT (demote|delete) events using it's own Auto-EOT System - internally.";
299
 
@@ -317,9 +312,7 @@ if(!class_exists("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_lev
317
 
318
  set_transient("s2m_".md5("s2member_transient_ipn_subscr_eot_".$paypal["subscr_id"]), $ipn, 43200);
319
  }
320
-
321
- else
322
- $paypal["s2member_log"][] = "Unable to (demote|delete) Member. Could not get the existing User ID from the DB. It's possible that it was ALREADY processed through another IPN, removed manually by a Site Administrator, or by s2Member's Auto-EOT Sys.";
323
  /*
324
  Refunds and chargeback reversals. This is excluded from the processing check, because a Member *could* have already been (demoted|deleted).
325
  In other words, s2Member sends `Refund/Reversal` Notifications ANYTIME a Refund/Reversal occurs; even if s2Member did not process it otherwise.
@@ -356,7 +349,6 @@ if(!class_exists("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_lev
356
 
357
  $paypal["s2member_log"][] = "Refund/Reversal Notification URLs have been processed.";
358
  }
359
-
360
  if($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["ref_rev_notification_recipients"] && is_array($cv = preg_split("/\|/", $paypal["custom"])))
361
  {
362
  $msg = $sbj = "(s2Member / API Notification Email) - Refund/Reversal";
@@ -412,7 +404,6 @@ if(!class_exists("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_lev
412
 
413
  $paypal["s2member_log"][] = "Refund/Reversal Notification Emails have been processed.";
414
  }
415
-
416
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
417
  do_action("ws_plugin__s2member_during_paypal_notify_during_subscr_eot_refund_reversal", get_defined_vars());
418
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
@@ -424,7 +415,6 @@ if(!class_exists("c_ws_plugin__s2member_paypal_notify_in_subscr_or_rp_eots_w_lev
424
  $paypal["s2member_log"][] = "s2Member `txn_type` identified as a type of EOT.";
425
  $paypal["s2member_log"][] = "Duplicate IPN. Already processed. This IPN will be ignored.";
426
  }
427
-
428
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
429
  do_action("ws_plugin__s2member_during_paypal_notify_after_subscr_eot", get_defined_vars());
430
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
113
  if($existing_role !== $demotion_role) // Only if NOT the existing Role.
114
  $user->set_role($demotion_role); // Give User the demotion Role.
115
 
116
+ if(apply_filters("ws_plugin__s2member_remove_ccaps_during_eot_events",
117
+ ((bool)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eots_remove_ccaps"] || $is_refund_or_reversal), get_defined_vars()))
118
+ foreach($user->allcaps as $cap => $cap_enabled)
119
  if(preg_match("/^access_s2member_ccap_/", $cap))
120
  $user->remove_cap($ccap = $cap);
121
 
162
 
163
  $paypal["s2member_log"][] = "EOT/Deletion Notification URLs have been processed.";
164
  }
 
165
  if($processing && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_del_notification_recipients"] && is_array($cv = preg_split("/\|/", $paypal["custom"])))
166
  {
167
  $msg = $sbj = "(s2Member / API Notification Email) - EOT/Deletion";
213
 
214
  $paypal["s2member_log"][] = "EOT/Deletion Notification Emails have been processed.";
215
  }
 
216
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
217
  do_action("ws_plugin__s2member_during_paypal_notify_during_subscr_eot_demote", get_defined_vars());
218
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
219
  }
 
220
  else if($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_eot_behavior"] === "delete")
221
  {
222
  $processing = $during = true; // Yes, we ARE processing this.
248
  do_action("ws_plugin__s2member_during_paypal_notify_during_subscr_eot_delete", get_defined_vars());
249
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
250
  }
 
251
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
252
  do_action("ws_plugin__s2member_during_paypal_notify_during_subscr_eot", get_defined_vars());
253
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
254
  }
 
255
  else // Otherwise, treat this as if it were a cancellation. EOTs are currently disabled.
256
  {
257
  $processing = $during = true; // Yes, we ARE processing this.
258
 
259
  update_user_option($user_id, "s2member_auto_eot_time", ($auto_eot_time = strtotime("now")));
260
 
261
+ $paypal["s2member_log"][] = "Auto-EOT is currently disabled. Skipping EOT (demote|delete), for now.";
262
  $paypal["s2member_log"][] = "Recording the Auto-EOT Time for this Member's account: ".date("D M j, Y g:i a T", $auto_eot_time);
263
 
264
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
269
  else
270
  $paypal["s2member_log"][] = "Unable to (demote|delete) Member. The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access.";
271
  }
 
272
  else if($is_delayed_eot && !get_user_option("s2member_auto_eot_time", $user_id))
273
  {
274
  if(!$user->has_cap("administrator")) // Do NOT process this routine on Administrators.
289
  else
290
  $paypal["s2member_log"][] = "Ignoring Delayed EOT. The existing User ID is associated with an Administrator. Stopping here. Otherwise, an Administrator could lose access.";
291
  }
 
292
  else if(!$is_refund_or_reversal || $is_delayed_eot)
293
  $paypal["s2member_log"][] = "Skipping (demote|delete) Member, for now. An Auto-EOT Time is already set for this account. When an Auto-EOT Time has been recorded, s2Member will handle EOT (demote|delete) events using it's own Auto-EOT System - internally.";
294
 
312
 
313
  set_transient("s2m_".md5("s2member_transient_ipn_subscr_eot_".$paypal["subscr_id"]), $ipn, 43200);
314
  }
315
+ else $paypal["s2member_log"][] = "Unable to (demote|delete) Member. Could not get the existing User ID from the DB. It's possible that it was ALREADY processed through another IPN, removed manually by a Site Administrator, or by s2Member's Auto-EOT Sys.";
 
 
316
  /*
317
  Refunds and chargeback reversals. This is excluded from the processing check, because a Member *could* have already been (demoted|deleted).
318
  In other words, s2Member sends `Refund/Reversal` Notifications ANYTIME a Refund/Reversal occurs; even if s2Member did not process it otherwise.
349
 
350
  $paypal["s2member_log"][] = "Refund/Reversal Notification URLs have been processed.";
351
  }
 
352
  if($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["ref_rev_notification_recipients"] && is_array($cv = preg_split("/\|/", $paypal["custom"])))
353
  {
354
  $msg = $sbj = "(s2Member / API Notification Email) - Refund/Reversal";
404
 
405
  $paypal["s2member_log"][] = "Refund/Reversal Notification Emails have been processed.";
406
  }
 
407
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
408
  do_action("ws_plugin__s2member_during_paypal_notify_during_subscr_eot_refund_reversal", get_defined_vars());
409
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
415
  $paypal["s2member_log"][] = "s2Member `txn_type` identified as a type of EOT.";
416
  $paypal["s2member_log"][] = "Duplicate IPN. Already processed. This IPN will be ignored.";
417
  }
 
418
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
419
  do_action("ws_plugin__s2member_during_paypal_notify_after_subscr_eot", get_defined_vars());
420
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
includes/classes/paypal-notify-in-subscr-or-wa-w-level.inc.php CHANGED
@@ -362,6 +362,11 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_subscr_or_wa_w_level"
362
 
363
  if (($rec = trim (preg_replace ("/%%(.+?)%%/i", "", $rec))) && ($sbj = trim (preg_replace ("/%%(.+?)%%/i", "", $sbj))) && ($msg = trim (preg_replace ("/%%(.+?)%%/i", "", $msg))))
364
  {
 
 
 
 
 
365
  foreach /* Go through a possible list of recipients. */(c_ws_plugin__s2member_utils_strings::parse_emails ($rec) as $recipient)
366
  c_ws_plugin__s2member_email_configs::email_config () . wp_mail ($recipient, apply_filters ("ws_plugin__s2member_signup_email_sbj", $sbj, get_defined_vars ()), apply_filters ("ws_plugin__s2member_signup_email_msg", $msg, get_defined_vars ()), "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">\r\nContent-Type: text/plain; charset=UTF-8") . c_ws_plugin__s2member_email_configs::email_config_release ();
367
 
362
 
363
  if (($rec = trim (preg_replace ("/%%(.+?)%%/i", "", $rec))) && ($sbj = trim (preg_replace ("/%%(.+?)%%/i", "", $sbj))) && ($msg = trim (preg_replace ("/%%(.+?)%%/i", "", $msg))))
364
  {
365
+ if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ())
366
+ {
367
+ $sbj = c_ws_plugin__s2member_utilities::evl($sbj, get_defined_vars());
368
+ $msg = c_ws_plugin__s2member_utilities::evl($msg, get_defined_vars());
369
+ }
370
  foreach /* Go through a possible list of recipients. */(c_ws_plugin__s2member_utils_strings::parse_emails ($rec) as $recipient)
371
  c_ws_plugin__s2member_email_configs::email_config () . wp_mail ($recipient, apply_filters ("ws_plugin__s2member_signup_email_sbj", $sbj, get_defined_vars ()), apply_filters ("ws_plugin__s2member_signup_email_msg", $msg, get_defined_vars ()), "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">\r\nContent-Type: text/plain; charset=UTF-8") . c_ws_plugin__s2member_email_configs::email_config_release ();
372
 
includes/classes/paypal-notify-in-web-accept-sp.inc.php CHANGED
@@ -113,6 +113,11 @@ if (!class_exists ("c_ws_plugin__s2member_paypal_notify_in_web_accept_sp"))
113
 
114
  if (($rec = trim (preg_replace ("/%%(.+?)%%/i", "", $rec))) && ($sbj = trim (preg_replace ("/%%(.+?)%%/i", "", $sbj))) && ($msg = trim (preg_replace ("/%%(.+?)%%/i", "", $msg))))
115
  {
 
 
 
 
 
116
  foreach (c_ws_plugin__s2member_utils_strings::parse_emails ($rec) as $recipient) // Go through a possible list of recipients.
117
  c_ws_plugin__s2member_email_configs::email_config () . wp_mail ($recipient, apply_filters ("ws_plugin__s2member_sp_email_sbj", $sbj, get_defined_vars ()), apply_filters ("ws_plugin__s2member_sp_email_msg", $msg, get_defined_vars ()), "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">\r\nContent-Type: text/plain; charset=UTF-8") . c_ws_plugin__s2member_email_configs::email_config_release ();
118
 
113
 
114
  if (($rec = trim (preg_replace ("/%%(.+?)%%/i", "", $rec))) && ($sbj = trim (preg_replace ("/%%(.+?)%%/i", "", $sbj))) && ($msg = trim (preg_replace ("/%%(.+?)%%/i", "", $msg))))
115
  {
116
+ if (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ())
117
+ {
118
+ $sbj = c_ws_plugin__s2member_utilities::evl($sbj, get_defined_vars());
119
+ $msg = c_ws_plugin__s2member_utilities::evl($msg, get_defined_vars());
120
+ }
121
  foreach (c_ws_plugin__s2member_utils_strings::parse_emails ($rec) as $recipient) // Go through a possible list of recipients.
122
  c_ws_plugin__s2member_email_configs::email_config () . wp_mail ($recipient, apply_filters ("ws_plugin__s2member_sp_email_sbj", $sbj, get_defined_vars ()), apply_filters ("ws_plugin__s2member_sp_email_msg", $msg, get_defined_vars ()), "From: \"" . preg_replace ('/"/', "'", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_name"]) . "\" <" . $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["reg_email_from_email"] . ">\r\nContent-Type: text/plain; charset=UTF-8") . c_ws_plugin__s2member_email_configs::email_config_release ();
123
 
includes/classes/registrations.inc.php CHANGED
@@ -457,7 +457,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
457
  if (!is_admin () && (!c_ws_plugin__s2member_utils_conds::pro_is_installed () || !c_ws_plugin__s2member_pro_remote_ops::is_remote_op ("create_user")) && /* A paying Customer? */ ($reg_cookies = c_ws_plugin__s2member_register_access::reg_cookies_ok ()) && extract ($reg_cookies))
458
  { /* This routine could be processed through `/wp-login.php?action=register`, `/wp-activate.php`, or `/activate` via BuddyPress`.
459
  This may also be processed through a standard BuddyPress installation, or another plugin calling `user_register`.
460
- If processed through `/wp-activate.php`, it could've originated inside the admin, via `/user-new.php`. */
461
 
462
  $processed = "yes"; // Mark this as yes.
463
 
@@ -513,7 +513,6 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
513
  (!headers_sent ()) ? delete_user_setting ("default_password_nag", $user_id) : null;
514
  update_user_option ($user_id, "default_password_nag", false, true);
515
  }
516
-
517
  update_user_option ($user_id, "s2member_registration_ip", $ip);
518
  update_user_option ($user_id, "s2member_auto_eot_time", $auto_eot_time);
519
  update_user_option ($user_id, "s2member_subscr_gateway", $subscr_gateway);
@@ -538,7 +537,6 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
538
  else if ($custom_reg_display_name === "login" && $login)
539
  wp_update_user (array ("ID" => $user_id, "display_name" => $login));
540
  }
541
-
542
  if (is_multisite ()) // Should we handle Main Site permissions and Originating Blog ID#?
543
  {
544
  if (!is_main_site () && strtotime ($user->user_registered) >= strtotime ("-10 seconds"))
@@ -547,7 +545,6 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
547
  if (!get_user_meta ($user_id, "s2member_originating_blog", true)) // Recorded yet?
548
  update_user_meta ($user_id, "s2member_originating_blog", $current_blog->blog_id);
549
  }
550
-
551
  if ($current_role !== $role) // Only if NOT the current Role.
552
  $user->set_role ($role); // s2Member.
553
 
@@ -570,6 +567,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
570
  if (isset ($_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var]))
571
  $fields[$field_var] = $_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var];
572
  }
 
573
 
574
  if (!empty ($fields)) // Only if NOT empty.
575
  update_user_option ($user_id, "s2member_custom_fields", $fields);
@@ -581,7 +579,6 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
581
  $pr_times["level" . $level] = (empty ($pr_times["level" . $level])) ? time () : $pr_times["level" . $level];
582
  update_user_option ($user_id, "s2member_paid_registration_times", $pr_times); // Update now.
583
  }
584
-
585
  if (($transient = "s2m_" . md5 ("s2member_transient_ipn_signup_vars_" . $subscr_id)) && is_array ($ipn_signup_vars = get_transient ($transient)))
586
  {
587
  update_user_option ($user_id, "s2member_ipn_signup_vars", $ipn_signup_vars); // For future reference.
@@ -599,7 +596,6 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
599
  c_ws_plugin__s2member_utils_urls::remote (site_url ("/?s2member_paypal_notify=1"), array_merge(stripslashes_deep ($subscr_eot), $proxy), array ("timeout" => 20));
600
  delete_transient ($transient); // This can be deleted now.
601
  }
602
-
603
  if (!headers_sent ()) // Only if headers are NOT yet sent. Here we establish both Signup and Payment Tracking Cookies.
604
  @setcookie ("s2member_tracking", ($s2member_tracking = c_ws_plugin__s2member_utils_encryption::encrypt ($subscr_id)), time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie ("s2member_tracking", $s2member_tracking, time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["s2member_tracking"] = $s2member_tracking);
605
 
@@ -608,7 +604,6 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
608
  do_action ("ws_plugin__s2member_during_configure_user_registration_front_side", get_defined_vars ());
609
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
610
  }
611
-
612
  else if (!is_admin () && (!c_ws_plugin__s2member_utils_conds::pro_is_installed () || !c_ws_plugin__s2member_pro_remote_ops::is_remote_op ("create_user")))
613
  { /* This routine could be processed through `/wp-login.php?action=register`, `/wp-activate.php`, or `/activate` via BuddyPress`.
614
  This may also be processed through a standard BuddyPress installation, or another plugin calling `user_register`.
@@ -680,7 +675,6 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
680
  (!headers_sent ()) ? delete_user_setting ("default_password_nag", $user_id) : null;
681
  update_user_option ($user_id, "default_password_nag", false, true);
682
  }
683
-
684
  update_user_option ($user_id, "s2member_registration_ip", $ip);
685
  update_user_option ($user_id, "s2member_auto_eot_time", $auto_eot_time);
686
  update_user_option ($user_id, "s2member_subscr_gateway", $subscr_gateway);
@@ -705,7 +699,6 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
705
  else if ($custom_reg_display_name === "login" && $login)
706
  wp_update_user (array ("ID" => $user_id, "display_name" => $login));
707
  }
708
-
709
  if /* Should we handle Main Site permissions and Originating Blog ID#? */(is_multisite ())
710
  {
711
  if (!is_main_site () && strtotime ($user->user_registered) >= strtotime ("-10 seconds"))
@@ -714,7 +707,6 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
714
  if /* Recorded yet? */(!get_user_meta ($user_id, "s2member_originating_blog", true))
715
  update_user_meta ($user_id, "s2member_originating_blog", $current_blog->blog_id);
716
  }
717
-
718
  if ($current_role !== $role) // Only if NOT the current Role.
719
  $user->set_role ($role); // s2Member.
720
 
@@ -737,6 +729,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
737
  if (isset ($_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var]))
738
  $fields[$field_var] = $_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var];
739
  }
 
740
 
741
  if (!empty ($fields)) // Only if NOT empty.
742
  update_user_option ($user_id, "s2member_custom_fields", $fields);
@@ -748,13 +741,11 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
748
  $pr_times["level" . $level] = (empty ($pr_times["level" . $level])) ? time () : $pr_times["level" . $level];
749
  update_user_option ($user_id, "s2member_paid_registration_times", $pr_times); // Update now.
750
  }
751
-
752
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
753
  do_action ("ws_plugin__s2member_during_configure_user_registration_front_side_free", get_defined_vars ());
754
  do_action ("ws_plugin__s2member_during_configure_user_registration_front_side", get_defined_vars ());
755
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
756
  }
757
-
758
  else if ((is_blog_admin () && $pagenow === "user-new.php") || (c_ws_plugin__s2member_utils_conds::pro_is_installed () && c_ws_plugin__s2member_pro_remote_ops::is_remote_op ("create_user")))
759
  { // Can only be processed through `/user-new.php` in the Admin panel, or through Remote Op: `create_user`.
760
 
@@ -814,7 +805,6 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
814
  (!headers_sent ()) ? delete_user_setting ("default_password_nag", $user_id) : null;
815
  update_user_option ($user_id, "default_password_nag", false, true);
816
  }
817
-
818
  update_user_option ($user_id, "s2member_registration_ip", $ip);
819
  update_user_option ($user_id, "s2member_auto_eot_time", $auto_eot_time);
820
  update_user_option ($user_id, "s2member_subscr_gateway", $subscr_gateway);
@@ -839,7 +829,6 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
839
  else if ($custom_reg_display_name === "login" && $login)
840
  wp_update_user (array ("ID" => $user_id, "display_name" => $login));
841
  }
842
-
843
  if (is_multisite ()) // Should we handle Main Site permissions and Originating Blog ID#?
844
  {
845
  if (!is_main_site () && strtotime ($user->user_registered) >= strtotime ("-10 seconds"))
@@ -848,7 +837,6 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
848
  if (!get_user_meta ($user_id, "s2member_originating_blog", true)) // Recorded yet?
849
  update_user_meta ($user_id, "s2member_originating_blog", $current_blog->blog_id);
850
  }
851
-
852
  if ($current_role !== $role) // Only if NOT the current Role.
853
  $user->set_role ($role); // s2Member.
854
 
@@ -871,6 +859,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
871
  if (isset ($_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var]))
872
  $fields[$field_var] = $_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var];
873
  }
 
874
 
875
  if (!empty ($fields)) // Only if NOT empty.
876
  update_user_option ($user_id, "s2member_custom_fields", $fields);
@@ -882,12 +871,10 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
882
  $pr_times["level" . $level] = (empty ($pr_times["level" . $level])) ? time () : $pr_times["level" . $level];
883
  update_user_option ($user_id, "s2member_paid_registration_times", $pr_times); // Update now.
884
  }
885
-
886
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
887
  do_action ("ws_plugin__s2member_during_configure_user_registration_admin_side", get_defined_vars ());
888
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
889
  }
890
-
891
  if ($processed === "yes") // If registration was processed by one of the routines above.
892
  {
893
  if ($urls = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["registration_notification_urls"])
@@ -915,6 +902,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
915
  if (($url = trim (preg_replace ("/%%(.+?)%%/i", "", $url))))
916
  c_ws_plugin__s2member_utils_urls::remote ($url);
917
  }
 
918
 
919
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["registration_notification_recipients"])
920
  {
@@ -974,9 +962,10 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
974
  foreach (c_ws_plugin__s2member_utils_strings::parse_emails ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["registration_notification_recipients"]) as $recipient)
975
  wp_mail ($recipient, apply_filters ("ws_plugin__s2member_registration_notification_email_sbj", $sbj, get_defined_vars ()), apply_filters ("ws_plugin__s2member_registration_notification_email_msg", $msg, get_defined_vars ()), "Content-Type: text/plain; charset=UTF-8");
976
  }
977
-
978
  if ($email_configs_were_on) // Back on?
979
  c_ws_plugin__s2member_email_configs::email_config ();
 
 
980
  }
981
 
982
  if ($url = $GLOBALS["ws_plugin__s2member_registration_return_url"])
@@ -1002,6 +991,7 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
1002
  if (($url = trim ($url))) // Preserve remaining Replacements; because the parent routine may perform replacements too.
1003
  $GLOBALS["ws_plugin__s2member_registration_return_url"] = $url;
1004
  }
 
1005
 
1006
  c_ws_plugin__s2member_list_servers::process_list_servers ($role, $level, $login, $pass, $email, $fname, $lname, $ip, $opt_in, true, $user_id);
1007
  /*
@@ -1015,13 +1005,32 @@ if (!class_exists ("c_ws_plugin__s2member_registrations"))
1015
  @setcookie ("s2member_custom", "", time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie ("s2member_custom", "", time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
1016
  @setcookie ("s2member_item_number", "", time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie ("s2member_item_number", "", time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
1017
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1018
 
1019
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
1020
  do_action ("ws_plugin__s2member_during_configure_user_registration", get_defined_vars ());
1021
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
1022
  }
1023
  }
1024
-
1025
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
1026
  do_action ("ws_plugin__s2member_after_configure_user_registration", get_defined_vars ());
1027
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
457
  if (!is_admin () && (!c_ws_plugin__s2member_utils_conds::pro_is_installed () || !c_ws_plugin__s2member_pro_remote_ops::is_remote_op ("create_user")) && /* A paying Customer? */ ($reg_cookies = c_ws_plugin__s2member_register_access::reg_cookies_ok ()) && extract ($reg_cookies))
458
  { /* This routine could be processed through `/wp-login.php?action=register`, `/wp-activate.php`, or `/activate` via BuddyPress`.
459
  This may also be processed through a standard BuddyPress installation, or another plugin calling `user_register`.
460
+ If processed through `/wp-activate.php`, it could've originated inside the admin via `/user-new.php`. */
461
 
462
  $processed = "yes"; // Mark this as yes.
463
 
513
  (!headers_sent ()) ? delete_user_setting ("default_password_nag", $user_id) : null;
514
  update_user_option ($user_id, "default_password_nag", false, true);
515
  }
 
516
  update_user_option ($user_id, "s2member_registration_ip", $ip);
517
  update_user_option ($user_id, "s2member_auto_eot_time", $auto_eot_time);
518
  update_user_option ($user_id, "s2member_subscr_gateway", $subscr_gateway);
537
  else if ($custom_reg_display_name === "login" && $login)
538
  wp_update_user (array ("ID" => $user_id, "display_name" => $login));
539
  }
 
540
  if (is_multisite ()) // Should we handle Main Site permissions and Originating Blog ID#?
541
  {
542
  if (!is_main_site () && strtotime ($user->user_registered) >= strtotime ("-10 seconds"))
545
  if (!get_user_meta ($user_id, "s2member_originating_blog", true)) // Recorded yet?
546
  update_user_meta ($user_id, "s2member_originating_blog", $current_blog->blog_id);
547
  }
 
548
  if ($current_role !== $role) // Only if NOT the current Role.
549
  $user->set_role ($role); // s2Member.
550
 
567
  if (isset ($_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var]))
568
  $fields[$field_var] = $_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var];
569
  }
570
+ unset($field, $field_var, $field_id_class); // Housekeeping.
571
 
572
  if (!empty ($fields)) // Only if NOT empty.
573
  update_user_option ($user_id, "s2member_custom_fields", $fields);
579
  $pr_times["level" . $level] = (empty ($pr_times["level" . $level])) ? time () : $pr_times["level" . $level];
580
  update_user_option ($user_id, "s2member_paid_registration_times", $pr_times); // Update now.
581
  }
 
582
  if (($transient = "s2m_" . md5 ("s2member_transient_ipn_signup_vars_" . $subscr_id)) && is_array ($ipn_signup_vars = get_transient ($transient)))
583
  {
584
  update_user_option ($user_id, "s2member_ipn_signup_vars", $ipn_signup_vars); // For future reference.
596
  c_ws_plugin__s2member_utils_urls::remote (site_url ("/?s2member_paypal_notify=1"), array_merge(stripslashes_deep ($subscr_eot), $proxy), array ("timeout" => 20));
597
  delete_transient ($transient); // This can be deleted now.
598
  }
 
599
  if (!headers_sent ()) // Only if headers are NOT yet sent. Here we establish both Signup and Payment Tracking Cookies.
600
  @setcookie ("s2member_tracking", ($s2member_tracking = c_ws_plugin__s2member_utils_encryption::encrypt ($subscr_id)), time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie ("s2member_tracking", $s2member_tracking, time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN) . ($_COOKIE["s2member_tracking"] = $s2member_tracking);
601
 
604
  do_action ("ws_plugin__s2member_during_configure_user_registration_front_side", get_defined_vars ());
605
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
606
  }
 
607
  else if (!is_admin () && (!c_ws_plugin__s2member_utils_conds::pro_is_installed () || !c_ws_plugin__s2member_pro_remote_ops::is_remote_op ("create_user")))
608
  { /* This routine could be processed through `/wp-login.php?action=register`, `/wp-activate.php`, or `/activate` via BuddyPress`.
609
  This may also be processed through a standard BuddyPress installation, or another plugin calling `user_register`.
675
  (!headers_sent ()) ? delete_user_setting ("default_password_nag", $user_id) : null;
676
  update_user_option ($user_id, "default_password_nag", false, true);
677
  }
 
678
  update_user_option ($user_id, "s2member_registration_ip", $ip);
679
  update_user_option ($user_id, "s2member_auto_eot_time", $auto_eot_time);
680
  update_user_option ($user_id, "s2member_subscr_gateway", $subscr_gateway);
699
  else if ($custom_reg_display_name === "login" && $login)
700
  wp_update_user (array ("ID" => $user_id, "display_name" => $login));
701
  }
 
702
  if /* Should we handle Main Site permissions and Originating Blog ID#? */(is_multisite ())
703
  {
704
  if (!is_main_site () && strtotime ($user->user_registered) >= strtotime ("-10 seconds"))
707
  if /* Recorded yet? */(!get_user_meta ($user_id, "s2member_originating_blog", true))
708
  update_user_meta ($user_id, "s2member_originating_blog", $current_blog->blog_id);
709
  }
 
710
  if ($current_role !== $role) // Only if NOT the current Role.
711
  $user->set_role ($role); // s2Member.
712
 
729
  if (isset ($_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var]))
730
  $fields[$field_var] = $_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var];
731
  }
732
+ unset($field, $field_var, $field_id_class); // Housekeeping.
733
 
734
  if (!empty ($fields)) // Only if NOT empty.
735
  update_user_option ($user_id, "s2member_custom_fields", $fields);
741
  $pr_times["level" . $level] = (empty ($pr_times["level" . $level])) ? time () : $pr_times["level" . $level];
742
  update_user_option ($user_id, "s2member_paid_registration_times", $pr_times); // Update now.
743
  }
 
744
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
745
  do_action ("ws_plugin__s2member_during_configure_user_registration_front_side_free", get_defined_vars ());
746
  do_action ("ws_plugin__s2member_during_configure_user_registration_front_side", get_defined_vars ());
747
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
748
  }
 
749
  else if ((is_blog_admin () && $pagenow === "user-new.php") || (c_ws_plugin__s2member_utils_conds::pro_is_installed () && c_ws_plugin__s2member_pro_remote_ops::is_remote_op ("create_user")))
750
  { // Can only be processed through `/user-new.php` in the Admin panel, or through Remote Op: `create_user`.
751
 
805
  (!headers_sent ()) ? delete_user_setting ("default_password_nag", $user_id) : null;
806
  update_user_option ($user_id, "default_password_nag", false, true);
807
  }
 
808
  update_user_option ($user_id, "s2member_registration_ip", $ip);
809
  update_user_option ($user_id, "s2member_auto_eot_time", $auto_eot_time);
810
  update_user_option ($user_id, "s2member_subscr_gateway", $subscr_gateway);
829
  else if ($custom_reg_display_name === "login" && $login)
830
  wp_update_user (array ("ID" => $user_id, "display_name" => $login));
831
  }
 
832
  if (is_multisite ()) // Should we handle Main Site permissions and Originating Blog ID#?
833
  {
834
  if (!is_main_site () && strtotime ($user->user_registered) >= strtotime ("-10 seconds"))
837
  if (!get_user_meta ($user_id, "s2member_originating_blog", true)) // Recorded yet?
838
  update_user_meta ($user_id, "s2member_originating_blog", $current_blog->blog_id);
839
  }
 
840
  if ($current_role !== $role) // Only if NOT the current Role.
841
  $user->set_role ($role); // s2Member.
842
 
859
  if (isset ($_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var]))
860
  $fields[$field_var] = $_pmr["ws_plugin__s2member_custom_reg_field_" . $field_var];
861
  }
862
+ unset($field, $field_var, $field_id_class); // Housekeeping.
863
 
864
  if (!empty ($fields)) // Only if NOT empty.
865
  update_user_option ($user_id, "s2member_custom_fields", $fields);
871
  $pr_times["level" . $level] = (empty ($pr_times["level" . $level])) ? time () : $pr_times["level" . $level];
872
  update_user_option ($user_id, "s2member_paid_registration_times", $pr_times); // Update now.
873
  }
 
874
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
875
  do_action ("ws_plugin__s2member_during_configure_user_registration_admin_side", get_defined_vars ());
876
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
877
  }
 
878
  if ($processed === "yes") // If registration was processed by one of the routines above.
879
  {
880
  if ($urls = $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["registration_notification_urls"])
902
  if (($url = trim (preg_replace ("/%%(.+?)%%/i", "", $url))))
903
  c_ws_plugin__s2member_utils_urls::remote ($url);
904
  }
905
+ unset($urls, $url, $var, $val); // Housekeeping.
906
 
907
  if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["registration_notification_recipients"])
908
  {
962
  foreach (c_ws_plugin__s2member_utils_strings::parse_emails ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["registration_notification_recipients"]) as $recipient)
963
  wp_mail ($recipient, apply_filters ("ws_plugin__s2member_registration_notification_email_sbj", $sbj, get_defined_vars ()), apply_filters ("ws_plugin__s2member_registration_notification_email_msg", $msg, get_defined_vars ()), "Content-Type: text/plain; charset=UTF-8");
964
  }
 
965
  if ($email_configs_were_on) // Back on?
966
  c_ws_plugin__s2member_email_configs::email_config ();
967
+
968
+ unset($sbj, $msg, $var, $val, $recipient, $email_configs_were_on); // Housekeeping.
969
  }
970
 
971
  if ($url = $GLOBALS["ws_plugin__s2member_registration_return_url"])
991
  if (($url = trim ($url))) // Preserve remaining Replacements; because the parent routine may perform replacements too.
992
  $GLOBALS["ws_plugin__s2member_registration_return_url"] = $url;
993
  }
994
+ unset($url, $var, $val); // Housekeeping.
995
 
996
  c_ws_plugin__s2member_list_servers::process_list_servers ($role, $level, $login, $pass, $email, $fname, $lname, $ip, $opt_in, true, $user_id);
997
  /*
1005
  @setcookie ("s2member_custom", "", time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie ("s2member_custom", "", time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
1006
  @setcookie ("s2member_item_number", "", time () + 31556926, COOKIEPATH, COOKIE_DOMAIN) . @setcookie ("s2member_item_number", "", time () + 31556926, SITECOOKIEPATH, COOKIE_DOMAIN);
1007
  }
1008
+ /* If debugging/logging is enabled; we need to append ``$reg_vars`` to the log file.
1009
+ Logging now supports Multisite Networking as well. */
1010
+
1011
+ $reg_vars = get_defined_vars(); // All defined vars.
1012
+ // No need to include these in the logs. Unset before log entry.
1013
+ unset($reg_vars["wpdb"], $reg_vars["current_site"], $reg_vars["current_blog"]);
1014
+
1015
+ $logt = c_ws_plugin__s2member_utilities::time_details ();
1016
+ $logv = c_ws_plugin__s2member_utilities::ver_details ();
1017
+ $logm = c_ws_plugin__s2member_utilities::mem_details ();
1018
+ $log4 = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] . "\nUser-Agent: " . $_SERVER["HTTP_USER_AGENT"];
1019
+ $log4 = (is_multisite () && !is_main_site ()) ? ($_log4 = $current_blog->domain . $current_blog->path) . "\n" . $log4 : $log4;
1020
+ $log2 = (is_multisite () && !is_main_site ()) ? "reg-handler-4-" . trim (preg_replace ("/[^a-z0-9]/i", "-", $_log4), "-") . ".log" : "reg-handler.log";
1021
+
1022
+ if ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["gateway_debug_logs"])
1023
+ if (is_dir ($logs_dir = $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["logs_dir"]))
1024
+ if (is_writable ($logs_dir) && c_ws_plugin__s2member_utils_logs::archive_oversize_log_files ())
1025
+ file_put_contents ($logs_dir . "/" . $log2, "LOG ENTRY: ".$logt . "\n" . $logv . "\n" . $logm . "\n" . $log4 . "\n" . var_export ($reg_vars, true) . "\n\n", FILE_APPEND);
1026
+
1027
+ unset($logt, $logv, $logm, $log4, $_log4, $log2, $logs_dir, $reg_vars); // Housekeeping.
1028
 
1029
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
1030
  do_action ("ws_plugin__s2member_during_configure_user_registration", get_defined_vars ());
1031
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
1032
  }
1033
  }
 
1034
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
1035
  do_action ("ws_plugin__s2member_after_configure_user_registration", get_defined_vars ());
1036
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
includes/classes/sc-files-in.inc.php CHANGED
@@ -102,7 +102,7 @@ if(!class_exists("c_ws_plugin__s2member_sc_files_in"))
102
 
103
  $attr = /* Force array; trim quote entities. */ c_ws_plugin__s2member_utils_strings::trim_qts_deep((array)$attr);
104
 
105
- $attr = shortcode_atts(array("download" => "", "download_key" => "", "stream" => "yes", "inline" => "yes", "storage" => "", "remote" => "", "ssl" => "", "rewrite" => "yes", "rewrite_base" => "", "skip_confirmation" => "", "url_to_storage_source" => "yes", "count_against_user" => "yes", "check_user" => "yes", /* Shortcode-specifics »» */ "file_download" => "", /* Configuration » */ "player" => "jwplayer-v6-rtmp", "player_id" => "s2-stream-".md5(uniqid("", TRUE)), "player_path" => "/jwplayer/jwplayer.js", "player_key" => "", "player_image" => "", "player_title" => "", /* Layout » */ "player_controls" => "yes", "player_height" => "270", "player_skin" => "", "player_stretching" => "uniform", "player_width" => "480", /* Playback » */ "player_autostart" => "no", "player_fallback" => "yes", "player_mute" => "no", "player_primary" => "flash", "player_repeat" => "no", "player_startparam" => "", /* Advanced option blocks » */ "player_option_blocks" => ""), $attr);
106
  $attr["download"] = (!empty($attr["file_download"])) ? $attr["file_download"] : $attr["download"];
107
 
108
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
@@ -136,8 +136,15 @@ if(!class_exists("c_ws_plugin__s2member_sc_files_in"))
136
  $get = preg_replace("/%%player_path%%/", $attr["player_path"], $get);
137
  $get = preg_replace("/%%player_key%%/", $attr["player_key"], $get);
138
 
139
- $get = preg_replace("/%%player_image%%/", $attr["player_image"], $get);
140
  $get = preg_replace("/%%player_title%%/", $attr["player_title"], $get);
 
 
 
 
 
 
 
 
141
 
142
  $get = preg_replace("/%%player_controls%%/", ((filter_var($attr["player_controls"], FILTER_VALIDATE_BOOLEAN)) ? "true" : "false"), $get);
143
  $get = preg_replace("/%%player_height%%/", (integer)$attr["player_height"], $get);
102
 
103
  $attr = /* Force array; trim quote entities. */ c_ws_plugin__s2member_utils_strings::trim_qts_deep((array)$attr);
104
 
105
+ $attr = shortcode_atts(array("download" => "", "download_key" => "", "stream" => "yes", "inline" => "yes", "storage" => "", "remote" => "", "ssl" => "", "rewrite" => "yes", "rewrite_base" => "", "skip_confirmation" => "", "url_to_storage_source" => "yes", "count_against_user" => "yes", "check_user" => "yes", /* Shortcode-specifics »» */ "file_download" => "", /* Configuration » */ "player" => "jwplayer-v6-rtmp", "player_id" => "s2-stream-".md5(uniqid("", TRUE)), "player_path" => "/jwplayer/jwplayer.js", "player_key" => "", "player_title" => "", "player_image" => "", "player_mediaid" => "", "player_description" => "", "player_captions" => "", /* Layout » */ "player_controls" => "yes", "player_height" => "270", "player_skin" => "", "player_stretching" => "uniform", "player_width" => "480", /* Playback » */ "player_autostart" => "no", "player_fallback" => "yes", "player_mute" => "no", "player_primary" => "flash", "player_repeat" => "no", "player_startparam" => "", /* Advanced option blocks » */ "player_option_blocks" => ""), $attr);
106
  $attr["download"] = (!empty($attr["file_download"])) ? $attr["file_download"] : $attr["download"];
107
 
108
  foreach(array_keys(get_defined_vars())as$__v)$__refs[$__v]=&$$__v;
136
  $get = preg_replace("/%%player_path%%/", $attr["player_path"], $get);
137
  $get = preg_replace("/%%player_key%%/", $attr["player_key"], $get);
138
 
 
139
  $get = preg_replace("/%%player_title%%/", $attr["player_title"], $get);
140
+ $get = preg_replace("/%%player_image%%/", $attr["player_image"], $get);
141
+
142
+ $get = preg_replace("/%%player_mediaid%%/", $attr["player_mediaid"], $get);
143
+ $get = preg_replace("/%%player_description%%/", $attr["player_description"], $get);
144
+
145
+ if(($attr["player_captions"] = c_ws_plugin__s2member_utils_strings::trim($attr["player_captions"], null, "[]")))
146
+ $get = preg_replace("/%%player_captions%%/", "[".((strpos($attr["player_captions"], ":") !== false) ? $attr["player_captions"] : base64_decode($attr["player_captions"]))."]", $get);
147
+ else $get = preg_replace("/%%player_captions%%/", "[]", $get);
148
 
149
  $get = preg_replace("/%%player_controls%%/", ((filter_var($attr["player_controls"], FILTER_VALIDATE_BOOLEAN)) ? "true" : "false"), $get);
150
  $get = preg_replace("/%%player_height%%/", (integer)$attr["player_height"], $get);
includes/classes/sc-paypal-button-e.inc.php CHANGED
@@ -74,9 +74,9 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_e"))
74
  if (($paypal = c_ws_plugin__s2member_paypal_utilities::paypal_api_response ($paypal)) && empty ($paypal["__error"]) && !empty ($paypal["WEBSITECODE"]) && ($code = $paypal["WEBSITECODE"]))
75
  // Only proceed if we DID get a valid response from the PayPal® API. This works as a nice fallback; just in case the API connection fails.
76
  {
77
- $default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_xpressCheckout.gif";
78
 
79
- $code = preg_replace ("/\<img[^\>]+\>/i", "", $code); // Remove the 1x1 pixel tracking image that PayPal® sticks in there.
80
  $code = preg_replace ("/(\<input)([^\>]+)(\>)/ie", "'\\1'.rtrim(stripslashes('\\2'),'/').' /\\3'", $code); // Use XHTML!
81
 
82
  $code = ($attr["image"] && $attr["image"] !== "default") ? preg_replace ('/ src\="(.*?)"/', ' src="' . c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($attr["image"])) . '"', $code) : preg_replace ('/ src\="(.*?)"/', ' src="' . c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($default_image)) . '"', $code);
74
  if (($paypal = c_ws_plugin__s2member_paypal_utilities::paypal_api_response ($paypal)) && empty ($paypal["__error"]) && !empty ($paypal["WEBSITECODE"]) && ($code = $paypal["WEBSITECODE"]))
75
  // Only proceed if we DID get a valid response from the PayPal® API. This works as a nice fallback; just in case the API connection fails.
76
  {
77
+ $default_image = "https://www.paypal.com/" . (($attr["lang"]) ? $attr["lang"] : _x ("en_US", "s2member-front paypal-button-lang-code", "s2member")) . "/i/btn/btn_xpressCheckout.gif";
78
 
79
+ $code = preg_replace ("/\<img[^\>]+\>/i", "", $code); // Remove 1x1 pixel tracking image that PayPal® sticks in there.
80
  $code = preg_replace ("/(\<input)([^\>]+)(\>)/ie", "'\\1'.rtrim(stripslashes('\\2'),'/').' /\\3'", $code); // Use XHTML!
81
 
82
  $code = ($attr["image"] && $attr["image"] !== "default") ? preg_replace ('/ src\="(.*?)"/', ' src="' . c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($attr["image"])) . '"', $code) : preg_replace ('/ src\="(.*?)"/', ' src="' . c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($default_image)) . '"', $code);
includes/classes/sc-paypal-button-in.inc.php CHANGED
@@ -50,7 +50,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
50
 
51
  $attr = /* Force array. Trim quote entities. */ c_ws_plugin__s2member_utils_strings::trim_qts_deep ((array)$attr);
52
 
53
- $attr = shortcode_atts (apply_filters ("ws_plugin__s2member_sc_paypal_button_default_attrs", array ("ids" => "0", "exp" => "72", "level" => "1", "ccaps" => "", "desc" => "", "ps" => "paypal", "lc" => "", "cc" => "USD", "dg" => "0", "ns" => "1", "custom" => $_SERVER["HTTP_HOST"], "ta" => "0", "tp" => "0", "tt" => "D", "ra" => "0.01", "rp" => "1", "rt" => "M", "rr" => "1", "rrt" => "", "rra" => "1", "modify" => "0", "cancel" => "0", "sp" => "0", "image" => "default", "output" => "button"), get_defined_vars ()), $attr);
54
 
55
  $attr["modify"] = ($attr["modify"] === "1" && (!is_user_logged_in () || !get_user_option ("s2member_subscr_id")) && $attr["tp"]) ? "0" : $attr["modify"];
56
 
@@ -69,7 +69,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
69
 
70
  if /* Cancellation Buttons. */ ($attr["cancel"])
71
  {
72
- $default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_unsubscribe_LG.gif";
73
 
74
  $code = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-cancellation-button.php")));
75
  $code = preg_replace ("/%%images%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images")), $code);
@@ -92,7 +92,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
92
  }
93
  else if /* Specific Post/Page Buttons. */ ($attr["sp"])
94
  {
95
- $default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_xpressCheckout.gif";
96
 
97
  $paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
98
  $paypal_os0_input_value = /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */ ($referencing) ? $referencing : $_SERVER["HTTP_HOST"];
@@ -146,7 +146,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
146
  }
147
  else if /* Independent Custom Capabilities. */ ($attr["level"] === "*")
148
  {
149
- $default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_xpressCheckout.gif";
150
 
151
  $paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
152
  $paypal_os0_input_value = /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */ ($referencing) ? $referencing : $_SERVER["HTTP_HOST"];
@@ -201,7 +201,7 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
201
  }
202
  else // Otherwise, we'll process this Button normally, using Membership routines.
203
  {
204
- $default_image = "https://www.paypal.com/" . _x ("en_US", "s2member-front paypal-button-lang-code", "s2member") . "/i/btn/btn_xpressCheckout.gif";
205
 
206
  $paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
207
  $paypal_os0_input_value = /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */ ($referencing) ? $referencing : $_SERVER["HTTP_HOST"];
@@ -281,7 +281,6 @@ if (!class_exists ("c_ws_plugin__s2member_sc_paypal_button_in"))
281
  ($attr["modify"]) ? do_action ("ws_plugin__s2member_during_sc_paypal_modification_button", get_defined_vars ()) : do_action ("ws_plugin__s2member_during_sc_paypal_button", get_defined_vars ());
282
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
283
  }
284
-
285
  $code = c_ws_plugin__s2member_sc_paypal_button_e::sc_paypal_button_encryption ($code, get_defined_vars ());
286
 
287
  return apply_filters ("ws_plugin__s2member_sc_paypal_button", $code, get_defined_vars ());
50
 
51
  $attr = /* Force array. Trim quote entities. */ c_ws_plugin__s2member_utils_strings::trim_qts_deep ((array)$attr);
52
 
53
+ $attr = shortcode_atts (apply_filters ("ws_plugin__s2member_sc_paypal_button_default_attrs", array ("ids" => "0", "exp" => "72", "level" => "1", "ccaps" => "", "desc" => "", "ps" => "paypal", "lc" => "", "lang" => "", "cc" => "USD", "dg" => "0", "ns" => "1", "custom" => $_SERVER["HTTP_HOST"], "ta" => "0", "tp" => "0", "tt" => "D", "ra" => "0.01", "rp" => "1", "rt" => "M", "rr" => "1", "rrt" => "", "rra" => "1", "modify" => "0", "cancel" => "0", "sp" => "0", "image" => "default", "output" => "button"), get_defined_vars ()), $attr);
54
 
55
  $attr["modify"] = ($attr["modify"] === "1" && (!is_user_logged_in () || !get_user_option ("s2member_subscr_id")) && $attr["tp"]) ? "0" : $attr["modify"];
56
 
69
 
70
  if /* Cancellation Buttons. */ ($attr["cancel"])
71
  {
72
+ $default_image = "https://www.paypal.com/" . (($attr["lang"]) ? $attr["lang"] : _x ("en_US", "s2member-front paypal-button-lang-code", "s2member")) . "/i/btn/btn_unsubscribe_LG.gif";
73
 
74
  $code = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-cancellation-button.php")));
75
  $code = preg_replace ("/%%images%%/", c_ws_plugin__s2member_utils_strings::esc_ds (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"] . "/images")), $code);
92
  }
93
  else if /* Specific Post/Page Buttons. */ ($attr["sp"])
94
  {
95
+ $default_image = "https://www.paypal.com/" . (($attr["lang"]) ? $attr["lang"] : _x ("en_US", "s2member-front paypal-button-lang-code", "s2member")) . "/i/btn/btn_xpressCheckout.gif";
96
 
97
  $paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
98
  $paypal_os0_input_value = /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */ ($referencing) ? $referencing : $_SERVER["HTTP_HOST"];
146
  }
147
  else if /* Independent Custom Capabilities. */ ($attr["level"] === "*")
148
  {
149
+ $default_image = "https://www.paypal.com/" . (($attr["lang"]) ? $attr["lang"] : _x ("en_US", "s2member-front paypal-button-lang-code", "s2member")) . "/i/btn/btn_xpressCheckout.gif";
150
 
151
  $paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
152
  $paypal_os0_input_value = /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */ ($referencing) ? $referencing : $_SERVER["HTTP_HOST"];
201
  }
202
  else // Otherwise, we'll process this Button normally, using Membership routines.
203
  {
204
+ $default_image = "https://www.paypal.com/" . (($attr["lang"]) ? $attr["lang"] : _x ("en_US", "s2member-front paypal-button-lang-code", "s2member")) . "/i/btn/btn_xpressCheckout.gif";
205
 
206
  $paypal_on0_input_value = ($referencing = c_ws_plugin__s2member_utils_users::get_user_subscr_or_wp_id ()) ? "Referencing Customer ID" : "Originating Domain";
207
  $paypal_os0_input_value = /* Current User's Paid Subscr. ID, or WP® User ID, or domain. */ ($referencing) ? $referencing : $_SERVER["HTTP_HOST"];
281
  ($attr["modify"]) ? do_action ("ws_plugin__s2member_during_sc_paypal_modification_button", get_defined_vars ()) : do_action ("ws_plugin__s2member_during_sc_paypal_button", get_defined_vars ());
282
  unset /* Unset defined __refs, __v. */ ($__refs, $__v);
283
  }
 
284
  $code = c_ws_plugin__s2member_sc_paypal_button_e::sc_paypal_button_encryption ($code, get_defined_vars ());
285
 
286
  return apply_filters ("ws_plugin__s2member_sc_paypal_button", $code, get_defined_vars ());
includes/classes/user-access.inc.php CHANGED
@@ -75,7 +75,7 @@ if (!class_exists ("c_ws_plugin__s2member_user_access"))
75
  $ccaps = array (); // Initializes $ccaps array.
76
 
77
  foreach ($user->allcaps as $cap => $cap_enabled)
78
- if (preg_match ("/^access_s2member_ccap_/", $cap))
79
  $ccaps[] = preg_replace ("/^access_s2member_ccap_/", "", $cap);
80
 
81
  return apply_filters ("ws_plugin__s2member_user_access_ccaps", $ccaps, get_defined_vars ());
75
  $ccaps = array (); // Initializes $ccaps array.
76
 
77
  foreach ($user->allcaps as $cap => $cap_enabled)
78
+ if (preg_match ("/^access_s2member_ccap_/", $cap) && $cap_enabled)
79
  $ccaps[] = preg_replace ("/^access_s2member_ccap_/", "", $cap);
80
 
81
  return apply_filters ("ws_plugin__s2member_user_access_ccaps", $ccaps, get_defined_vars ());
includes/classes/utilities.inc.php CHANGED
@@ -36,8 +36,11 @@ if (!class_exists ("c_ws_plugin__s2member_utilities"))
36
  * @param str $code A string of data, possibly with embedded PHP code.
37
  * @return str Output after PHP evaluation.
38
  */
39
- public static function evl ($code = FALSE)
40
  {
 
 
 
41
  ob_start (); // Output buffer.
42
 
43
  eval ("?>" . trim ($code));
36
  * @param str $code A string of data, possibly with embedded PHP code.
37
  * @return str Output after PHP evaluation.
38
  */
39
+ public static function evl ($code = FALSE, $vars = array())
40
  {
41
+ if(is_array($vars) && !empty($vars))
42
+ extract($vars, EXTR_PREFIX_SAME, '_extract_');
43
+
44
  ob_start (); // Output buffer.
45
 
46
  eval ("?>" . trim ($code));
includes/classes/utils-logs.inc.php CHANGED
@@ -62,6 +62,8 @@ if (!class_exists ("c_ws_plugin__s2member_utils_logs"))
62
  '/mailchimp-api/' => array('short' => 'MailChimp® API communication.', 'long' => 'This log file records all of s2Member\'s communication with MailChimp® APIs.'),
63
  '/aweber-api/' => array('short' => 'AWeber® API communication.', 'long' => 'This log file records all of s2Member\'s communication with AWeber® APIs.'),
64
 
 
 
65
  '/s2-http-api-debug/' => array('short' => 'All outgoing HTTP connections related to s2Member®.', 'long' => 'This log file records all outgoing WP_Http connections that are specifically related to s2Member®. This log file can be extremely helpful. It includes technical details about remote HTTP connections that are not available in other log files.'),
66
  '/wp-http-api-debug/' => array('short' => 'All outgoing WordPress® HTTP connections.', 'long' => 'This log file records all outgoing HTTP connections processed by the WP_Http class. This includes everything processed by WordPress®; even things unrelated to s2Member®. This log file can be extremely helpful. It includes technical details about remote HTTP connections that are not available in other log files.'),
67
  );
62
  '/mailchimp-api/' => array('short' => 'MailChimp® API communication.', 'long' => 'This log file records all of s2Member\'s communication with MailChimp® APIs.'),
63
  '/aweber-api/' => array('short' => 'AWeber® API communication.', 'long' => 'This log file records all of s2Member\'s communication with AWeber® APIs.'),
64
 
65
+ '/reg-handler/' => array('short' => 'User registrations processed by s2Member®.', 'long' => 'This log file records all User/Member registrations processed by s2Member® (either directly or indirectly). This includes both free and paid registrations. It also logs registrations that occur as a result of new Users/Members being created from the Dashboard by a site owner. It also includes registrations that occur through the s2Member® Pro Remote Operations API.'),
66
+
67
  '/s2-http-api-debug/' => array('short' => 'All outgoing HTTP connections related to s2Member®.', 'long' => 'This log file records all outgoing WP_Http connections that are specifically related to s2Member®. This log file can be extremely helpful. It includes technical details about remote HTTP connections that are not available in other log files.'),
68
  '/wp-http-api-debug/' => array('short' => 'All outgoing WordPress® HTTP connections.', 'long' => 'This log file records all outgoing HTTP connections processed by the WP_Http class. This includes everything processed by WordPress®; even things unrelated to s2Member®. This log file can be extremely helpful. It includes technical details about remote HTTP connections that are not available in other log files.'),
69
  );
includes/classes/utils-time.inc.php CHANGED
@@ -126,6 +126,9 @@ if (!class_exists ("c_ws_plugin__s2member_utils_time"))
126
  {
127
  if ($user_id && ($user = new WP_User ($user_id)) && $user->ID) // Valid user_id?
128
  {
 
 
 
129
  $registration_time = strtotime ($user->user_registered);
130
  $last_payment_time = get_user_option ("s2member_last_payment_time", $user_id);
131
  $last_payment_time = ((int)$lpt) ? (int)$lpt : (int)$last_payment_time;
@@ -147,7 +150,6 @@ if (!class_exists ("c_ws_plugin__s2member_utils_time"))
147
  $p1_days = (int)$num * (int)$days;
148
  $p1_time = $p1_days * 86400;
149
  }
150
-
151
  if (!($p3_time = 0) && ($period3 = trim (strtoupper ($period3))))
152
  {
153
  list ($num, $span) = preg_split ("/ /", $period3, 2);
@@ -165,19 +167,17 @@ if (!class_exists ("c_ws_plugin__s2member_utils_time"))
165
  $p3_days = (int)$num * (int)$days;
166
  $p3_time = $p3_days * 86400;
167
  }
168
-
169
  if (!$last_payment_time) /* If there's been no payment yet.
170
  After p1, if there was a p1. Otherwise, reg. time + 1 day grace. */
171
- $auto_eot_time = $registration_time + $p1_time + 86400;
172
 
173
  // Else if p1, and last payment within p1, last + p1 + 1 day grace.
174
  else if ($p1_time && $last_payment_time <= $registration_time + $p1_time)
175
- $auto_eot_time = $last_payment_time + $p1_time + 86400;
176
 
177
  else // Otherwise, after last payment + p3 + 1 day grace.
178
- $auto_eot_time = $last_payment_time + $p3_time + 86400;
179
  }
180
-
181
  else if ($eotper) // Otherwise, if we have a specific EOT period; calculate from today.
182
  {
183
  if (!($eot_time = 0) && ($eotper = trim (strtoupper ($eotper))))
@@ -197,10 +197,8 @@ if (!class_exists ("c_ws_plugin__s2member_utils_time"))
197
  $eot_days = (int)$num * (int)$days;
198
  $eot_time = $eot_days * 86400;
199
  }
200
-
201
- $auto_eot_time = strtotime ("now") + $eot_time + 86400;
202
  }
203
-
204
  settype ($auto_eot_time, "integer"); // Force to integer type here.
205
 
206
  if ($ext && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_time_ext_behavior"] === "extend")
126
  {
127
  if ($user_id && ($user = new WP_User ($user_id)) && $user->ID) // Valid user_id?
128
  {
129
+ $eot_grace_time = (integer)$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_grace_time"];
130
+ $eot_grace_time = (integer)apply_filters("ws_plugin__s2member_eot_grace_time", $eot_grace_time, get_defined_vars());
131
+
132
  $registration_time = strtotime ($user->user_registered);
133
  $last_payment_time = get_user_option ("s2member_last_payment_time", $user_id);
134
  $last_payment_time = ((int)$lpt) ? (int)$lpt : (int)$last_payment_time;
150
  $p1_days = (int)$num * (int)$days;
151
  $p1_time = $p1_days * 86400;
152
  }
 
153
  if (!($p3_time = 0) && ($period3 = trim (strtoupper ($period3))))
154
  {
155
  list ($num, $span) = preg_split ("/ /", $period3, 2);
167
  $p3_days = (int)$num * (int)$days;
168
  $p3_time = $p3_days * 86400;
169
  }
 
170
  if (!$last_payment_time) /* If there's been no payment yet.
171
  After p1, if there was a p1. Otherwise, reg. time + 1 day grace. */
172
+ $auto_eot_time = $registration_time + $p1_time + $eot_grace_time;
173
 
174
  // Else if p1, and last payment within p1, last + p1 + 1 day grace.
175
  else if ($p1_time && $last_payment_time <= $registration_time + $p1_time)
176
+ $auto_eot_time = $last_payment_time + $p1_time + $eot_grace_time;
177
 
178
  else // Otherwise, after last payment + p3 + 1 day grace.
179
+ $auto_eot_time = $last_payment_time + $p3_time + $eot_grace_time;
180
  }
 
181
  else if ($eotper) // Otherwise, if we have a specific EOT period; calculate from today.
182
  {
183
  if (!($eot_time = 0) && ($eotper = trim (strtoupper ($eotper))))
197
  $eot_days = (int)$num * (int)$days;
198
  $eot_time = $eot_days * 86400;
199
  }
200
+ $auto_eot_time = strtotime ("now") + $eot_time + $eot_grace_time;
 
201
  }
 
202
  settype ($auto_eot_time, "integer"); // Force to integer type here.
203
 
204
  if ($ext && $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_time_ext_behavior"] === "extend")
includes/menu-pages/down-ops.inc.php CHANGED
@@ -660,8 +660,9 @@ if(!class_exists("c_ws_plugin__s2member_menu_page_down_ops"))
660
  echo '<li><code>player="jwplayer-v6-rtmp"</code> Required. Current supported players in this Shortcode include: <code>jwplayer-v6</code> (works with any audio/video file, and you do NOT need to have Amazon® S3 or CloudFront™ integrated for this to work), <code>jwplayer-v6-rtmp</code> (streams with the RTMP protocol, plus there is a full download fallback of the source file if streaming is not possible on a particular device; this requires both Amazon® S3 and CloudFront™ integration), <code>jwplayer-v6-rtmp-only</code> (streams with the RTMP protocol only, with no access to the source file, only to the RTMP stream; this requires both Amazon® S3 and CloudFront™ integration).</li>'."\n";
661
  echo '<li><code>player_id=""</code> Optional. HTML div ID for the audio/video player. Defaults to a unique ID generated by s2Member® for each instance of your Shortcode.</li>'."\n";
662
  echo '<li><code>player_path="/jwplayer/jwplayer.js"</code> Required. Path to the player\'s JavaScript file (ex: <code>/jwplayer/jwplayer.js</code> — you should upload the <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">/jwplayer</a> folder to the root of your web directory).</li>'."\n";
663
- echo '<li><code>player_[setting]=""</code> Optional. Any additional configuration attributes supported by your audio/video player, prefixed with <code>player_</code>. For JW Player™ v6, see <a href="http://www.longtailvideo.com/support/jw-player/28839/embedding-the-player" target="_blank" rel="external">this article please</a>. Examples: <code>player_width="480"</code>, <code>player_height="270"</code>, <code>player_image="http://www.example.com/wp-content/uploads/video-preview.jpg"</code>, <code>player_autostart="true"</code>, <code>player_skin="/jwplayer/my-skin.xml"</code>, <code>player_key="my-license-key"</code>. Please note that "Advanced Options Blocks" listed on <a href="http://www.longtailvideo.com/support/jw-player/28839/embedding-the-player" target="_blank" rel="external">this page</a> are NOT supported here. For those, please use: <code>player_option_blocks=""</code>.</li>'."\n";
664
- echo '<li><code>player_option_blocks=""</code> Optional. Any "Advanced Option Blocks" supported by your audio/video player. For JW Player™ v6, see <a href="http://www.longtailvideo.com/support/jw-player/28839/embedding-the-player" target="_blank" rel="external">this article please</a>. Here are some examples: <code>player_option_blocks="sharing:{}"</code>, <code>player_option_blocks="sharing:{}, logo: {file: \'/logo.png\', link: \'http://example.com\'}"</code>. Or: <code>player_option_blocks="c2hhcmluZzoge30="</code> (base64 encoded version of <code>sharing: {}</code>). Please note that "Advanced Options Blocks" can be defined in plain text or with a <a href="http://www.base64encode.org/" target="_blank" rel="external">base64 encoded string</a>. Advanced Option Blocks are JavaScript objects with properties. If you have trouble defining JavaScript object properties inside a Shortcode Attribute, please use <a href="http://www.base64encode.org/" target="_blank" rel="external">this tool</a> to base64 encode your Advanced Option Blocks, so that you end up with a string that\'s compatible with Shortcode Attributes.</li>'."\n";
 
665
  do_action("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_shortcode_attrs_s2stream_lis", get_defined_vars());
666
  echo '</ul>'."\n";
667
  echo '</td>'."\n";
660
  echo '<li><code>player="jwplayer-v6-rtmp"</code> Required. Current supported players in this Shortcode include: <code>jwplayer-v6</code> (works with any audio/video file, and you do NOT need to have Amazon® S3 or CloudFront™ integrated for this to work), <code>jwplayer-v6-rtmp</code> (streams with the RTMP protocol, plus there is a full download fallback of the source file if streaming is not possible on a particular device; this requires both Amazon® S3 and CloudFront™ integration), <code>jwplayer-v6-rtmp-only</code> (streams with the RTMP protocol only, with no access to the source file, only to the RTMP stream; this requires both Amazon® S3 and CloudFront™ integration).</li>'."\n";
661
  echo '<li><code>player_id=""</code> Optional. HTML div ID for the audio/video player. Defaults to a unique ID generated by s2Member® for each instance of your Shortcode.</li>'."\n";
662
  echo '<li><code>player_path="/jwplayer/jwplayer.js"</code> Required. Path to the player\'s JavaScript file (ex: <code>/jwplayer/jwplayer.js</code> — you should upload the <a href="http://www.longtailvideo.com/players/" target="_blank" rel="external">/jwplayer</a> folder to the root of your web directory).</li>'."\n";
663
+ echo '<li><code>player_{setting}=""</code> Optional. Any additional configuration attributes supported by your audio/video player, prefixed with <code>player_</code>. For JW Player™ v6, see <a href="http://www.longtailvideo.com/support/jw-player/28839/embedding-the-player" target="_blank" rel="external">this article please</a>. Examples: <code>player_width="480"</code>, <code>player_height="270"</code>, <code>player_title="My Video"</code>, <code>player_description="A video about something."</code>, <code>player_image="http://www.example.com/wp-content/uploads/video-preview.jpg"</code>, <code>player_mediaid="video_ei0wsx23"</code>, <code>player_autostart="true"</code>, <code>player_skin="/jwplayer/my-skin.xml"</code>, <code>player_key="my-license-key"</code>, <code>player_captions="{file:\'/assets/captions-en.vtt\',label:\'English\'}"</code> (<em>With <a href="http://www.longtailvideo.com/support/jw-player/28845/adding-video-captions" target="_blank" rel="external">Captions</a>, you can exclude the square array brackets to avoid Shortcode parsing issues. s2Member® will automatically wrap your Caption objects with square array brackets.</em>). Please note that "Advanced Options Blocks" listed on <a href="http://www.longtailvideo.com/support/jw-player/28839/embedding-the-player" target="_blank" rel="external">this page</a> are NOT supported here. For those, please use: <code>player_option_blocks=""</code> (see below).</li>'."\n";
664
+ echo '<li><code>player_option_blocks=""</code> Optional. Any "Advanced Option Blocks" supported by your audio/video player. For JW Player™ v6, see <a href="http://www.longtailvideo.com/support/jw-player/28839/embedding-the-player" target="_blank" rel="external">this article please</a>. Here are some examples: <code>player_option_blocks="sharing:{}"</code>, <code>player_option_blocks="sharing:{}, logo: {file: \'/logo.png\', link: \'http://example.com\'}"</code>. Or: <code>player_option_blocks="c2hhcmluZzoge30="</code> (base64 encoded version of <code>sharing:{}</code>). Please note that "Advanced Options Blocks" can be defined in plain text or with a <a href="http://www.base64encode.org/" target="_blank" rel="external">base64 encoded string</a>. Advanced Option Blocks are JavaScript objects with properties. If you have trouble defining JavaScript object properties inside a Shortcode Attribute, please use <a href="http://www.base64encode.org/" target="_blank" rel="external">this tool</a> to base64 encode your Advanced Option Blocks, so that you end up with a string that\'s compatible with Shortcode Attributes.</li>'."\n";
665
+ echo '<li>Please check the <strong>Shortcode Attributes</strong> Tab in <a href="http://www.s2member.com/kb/jwplayer-s2stream-shortcodes/#using-s2stream-shortcodes" target="_blank" rel="external">this KB article</a> for further details on everything here.</li>'."\n";
666
  do_action("ws_plugin__s2member_during_down_ops_page_during_left_sections_during_shortcode_attrs_s2stream_lis", get_defined_vars());
667
  echo '</ul>'."\n";
668
  echo '</td>'."\n";
includes/menu-pages/gen-ops.inc.php CHANGED
@@ -346,6 +346,10 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
346
  echo 'Message Body used in the email sent to new Users/Members.<br /><br />' . "\n";
347
  echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
348
  echo '<ul>' . "\n";
 
 
 
 
349
  echo '<li><code>%%user_first_name%%</code> = The First Name of the Member who registered their Username.</li>' . "\n";
350
  echo '<li><code>%%user_last_name%%</code> = The Last Name of the Member who registered their Username.</li>' . "\n";
351
  echo '<li><code>%%user_full_name%%</code> = The Full Name (First &amp; Last) of the Member who registered their Username.</li>' . "\n";
@@ -374,6 +378,10 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
374
  echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
375
  echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
376
 
 
 
 
 
377
  echo '</td>' . "\n";
378
 
379
  echo '</tr>' . "\n";
@@ -441,6 +449,10 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
441
  echo 'Message Body used in the email notification sent to Administrator.<br /><br />' . "\n";
442
  echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
443
  echo '<ul>' . "\n";
 
 
 
 
444
  echo '<li><code>%%user_first_name%%</code> = The First Name of the Member who registered their Username.</li>' . "\n";
445
  echo '<li><code>%%user_last_name%%</code> = The Last Name of the Member who registered their Username.</li>' . "\n";
446
  echo '<li><code>%%user_full_name%%</code> = The Full Name (First &amp; Last) of the Member who registered their Username.</li>' . "\n";
@@ -469,6 +481,10 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_gen_ops"))
469
  echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
470
  echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
471
 
 
 
 
 
472
  echo '</td>' . "\n";
473
 
474
  echo '</tr>' . "\n";
346
  echo 'Message Body used in the email sent to new Users/Members.<br /><br />' . "\n";
347
  echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
348
  echo '<ul>' . "\n";
349
+ echo '<li><code>%%role%%</code> = The Role ID <code>(subscriber, s2member_level[0-9]+, administrator, editor, author, contributor)</code>.</li>' . "\n";
350
+ echo '<li><code>%%label%%</code> = The Role ID Label <code>(Subscriber, s2Member Level 1, s2Member Level 2; or your own custom Labels — if configured)</code>.</li>' . "\n";
351
+ echo '<li><code>%%level%%</code> = The Level number <code>(0, 1, 2, 3, 4)</code>. (<em>deprecated, no longer recommended; use <code>%%role%%</code></em>)</li>' . "\n";
352
+ echo '<li><code>%%ccaps%%</code> = Custom Capabilities. Ex: <code>music,videos,free_gift</code> (<em>in comma-delimited format</em>).</li>' . "\n";
353
  echo '<li><code>%%user_first_name%%</code> = The First Name of the Member who registered their Username.</li>' . "\n";
354
  echo '<li><code>%%user_last_name%%</code> = The Last Name of the Member who registered their Username.</li>' . "\n";
355
  echo '<li><code>%%user_full_name%%</code> = The Full Name (First &amp; Last) of the Member who registered their Username.</li>' . "\n";
378
  echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
379
  echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
380
 
381
+ echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ?
382
+ '<div class="ws-menu-page-hr"></div>' . "\n".
383
+ '<p style="margin:0;"><strong>PHP Code:</strong> It is also possible to use PHP tags — optional (for developers). If you use PHP tags, please run a test email with <code>&lt;?php print_r(get_defined_vars()); ?&gt;</code>. This will give you a full list of all PHP variables available to you in this email. The <code>$user</code> variable is the most important one. It\'s an instance of the <a href="http://codex.wordpress.org/Class_Reference/WP_User" target="_blank" rel="external"><code>WP_User</code></a> class (e.g. <code>$user->ID</code>, <code>$user->has_cap()</code>, etc). Please note that all Replacement Codes will be parsed first, and then any PHP tags that you\'ve included. Also, please remember that emails are sent in plain text format.</p>'."\n"
384
+ : '';
385
  echo '</td>' . "\n";
386
 
387
  echo '</tr>' . "\n";
449
  echo 'Message Body used in the email notification sent to Administrator.<br /><br />' . "\n";
450
  echo '<strong>You can also use these special Replacement Codes if you need them:</strong>' . "\n";
451
  echo '<ul>' . "\n";
452
+ echo '<li><code>%%role%%</code> = The Role ID <code>(subscriber, s2member_level[0-9]+, administrator, editor, author, contributor)</code>.</li>' . "\n";
453
+ echo '<li><code>%%label%%</code> = The Role ID Label <code>(Subscriber, s2Member Level 1, s2Member Level 2; or your own custom Labels — if configured)</code>.</li>' . "\n";
454
+ echo '<li><code>%%level%%</code> = The Level number <code>(0, 1, 2, 3, 4)</code>. (<em>deprecated, no longer recommended; use <code>%%role%%</code></em>)</li>' . "\n";
455
+ echo '<li><code>%%ccaps%%</code> = Custom Capabilities. Ex: <code>music,videos,free_gift</code> (<em>in comma-delimited format</em>).</li>' . "\n";
456
  echo '<li><code>%%user_first_name%%</code> = The First Name of the Member who registered their Username.</li>' . "\n";
457
  echo '<li><code>%%user_last_name%%</code> = The Last Name of the Member who registered their Username.</li>' . "\n";
458
  echo '<li><code>%%user_full_name%%</code> = The Full Name (First &amp; Last) of the Member who registered their Username.</li>' . "\n";
481
  echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />' . "\n";
482
  echo '<code>custom="' . esc_html ($_SERVER["HTTP_HOST"]) . '|christmas-promo"</code>' . "\n";
483
 
484
+ echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ?
485
+ '<div class="ws-menu-page-hr"></div>' . "\n".
486
+ '<p style="margin:0;"><strong>PHP Code:</strong> It is also possible to use PHP tags — optional (for developers). If you use PHP tags, please run a test email with <code>&lt;?php print_r(get_defined_vars()); ?&gt;</code>. This will give you a full list of all PHP variables available to you in this email. The <code>$user</code> variable is the most important one. It\'s an instance of the <a href="http://codex.wordpress.org/Class_Reference/WP_User" target="_blank" rel="external"><code>WP_User</code></a> class (e.g. <code>$user->ID</code>, <code>$user->has_cap()</code>, etc). Please note that all Replacement Codes will be parsed first, and then any PHP tags that you\'ve included. Also, please remember that emails are sent in plain text format.</p>'."\n"
487
+ : '';
488
  echo '</td>' . "\n";
489
 
490
  echo '</tr>' . "\n";
includes/menu-pages/paypal-buttons.inc.php CHANGED
@@ -591,7 +591,8 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
591
  echo '<li><code>exp="72"</code> Access Expires (in hours). Only valid when <code>sp="1"</code> for Specific Post/Page Access.</li>' . "\n";
592
  echo '<li><code>ids="14"</code> A Post/Page ID#, or a comma-delimited list of IDs. Only valid when <code>sp="1"</code> for Specific Post/Page Access.</li>' . "\n";
593
  echo '<li><code>image="default"</code> Button Image Location. Possible values: <code>default</code> = use the default PayPal® Button, <code>http://...</code> = location of your custom Image.</li>' . "\n";
594
- echo '<li><code>lc=""</code> Optional 2 character Locale Code <em>(i.e. Country Code)</em>. This controls the interface language used at PayPal® during checkout. If unspecified, the language is determined by PayPal® when possible, defaulting to <code>US</code> <em>english</em> when not possible. Not valid when <code>cancel="1"</code>.</li>' . "\n";
 
595
  echo '<li><code>level="1"</code> Membership Level [1-4] <em>(or, up to the number of configured Levels)</em>. Only valid for Buttons providing paid Membership Level Access.' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? '' : ' Or, with Independent Custom Capabilities this MUST be set to <code>level="*"</code>, and <code>ccaps=""</code> must NOT be empty <em>(i.e. <code>level="*" ccaps="music,videos"</code>)</em>.') . '</li>' . "\n";
596
  echo '<li><code>modify="0"</code> Modification directive. Only valid w/ Membership Level Access. Possible values: <code>0</code> = allows Customers to only create a new Subscription, <code>1</code> = allows Customers to modify their current Subscription or sign up for a new one, <code>2</code> = allows Customers to only modify their current Subscription.</li>' . "\n";
597
  echo '<li><code>ns="1"</code> The <em>no_shipping</em> directive. Possible values: <code>0</code> = prompt for an address, but do not require one, <code>1</code> = do not prompt for a shipping address, <code>2</code> = prompt for an address, and require one. Not valid when <code>cancel="1"</code>.</li>' . "\n";
591
  echo '<li><code>exp="72"</code> Access Expires (in hours). Only valid when <code>sp="1"</code> for Specific Post/Page Access.</li>' . "\n";
592
  echo '<li><code>ids="14"</code> A Post/Page ID#, or a comma-delimited list of IDs. Only valid when <code>sp="1"</code> for Specific Post/Page Access.</li>' . "\n";
593
  echo '<li><code>image="default"</code> Button Image Location. Possible values: <code>default</code> = use the default PayPal® Button, <code>http://...</code> = location of your custom Image.</li>' . "\n";
594
+ echo '<li><code>lang=""</code> Optional 5 character Button Language Code <em>(ake: Locale Code — ex: <code>en_US</code>)</em>. This controls the interface language of the PayPal® Button itself. If unspecified, the language defaults to English (i.e. <code>en_US</code>; or to the value set by an optional MO translation file; which translates s2Member® overall). See <a href="https://cms.paypal.com/mx/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECButtonIntegration#id089QD0O0TX4__id08AH904I0YK" target="_blank" rel="external">this list of possible Locale Codes</a>.</li>' . "\n";
595
+ echo '<li><code>lc=""</code> Optional 2 character Country/Locale Code <em>(i.e. Country Code — ex: <code>US</code>)</em>. This controls the interface language used at PayPal® during checkout. If unspecified, the language is determined by PayPal® when possible, defaulting to <code>US</code> <em>english</em> when not possible. See <a href="https://cms.paypal.com/mx/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_ECButtonIntegration#id089QD0O0TX4__id08AH904I0YK" target="_blank" rel="external">this list of possible Country Codes</a>. Not valid when <code>cancel="1"</code>.</li>' . "\n";
596
  echo '<li><code>level="1"</code> Membership Level [1-4] <em>(or, up to the number of configured Levels)</em>. Only valid for Buttons providing paid Membership Level Access.' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? '' : ' Or, with Independent Custom Capabilities this MUST be set to <code>level="*"</code>, and <code>ccaps=""</code> must NOT be empty <em>(i.e. <code>level="*" ccaps="music,videos"</code>)</em>.') . '</li>' . "\n";
597
  echo '<li><code>modify="0"</code> Modification directive. Only valid w/ Membership Level Access. Possible values: <code>0</code> = allows Customers to only create a new Subscription, <code>1</code> = allows Customers to modify their current Subscription or sign up for a new one, <code>2</code> = allows Customers to only modify their current Subscription.</li>' . "\n";
598
  echo '<li><code>ns="1"</code> The <em>no_shipping</em> directive. Possible values: <code>0</code> = prompt for an address, but do not require one, <code>1</code> = do not prompt for a shipping address, <code>2</code> = prompt for an address, and require one. Not valid when <code>cancel="1"</code>.</li>' . "\n";
includes/menu-pages/paypal-ops.inc.php CHANGED
@@ -483,6 +483,10 @@ if(!class_exists("c_ws_plugin__s2member_menu_page_paypal_ops"))
483
  echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />'."\n";
484
  echo '<code>custom="'.esc_html($_SERVER["HTTP_HOST"]).'|christmas-promo"</code>'."\n";
485
 
 
 
 
 
486
  echo '</td>'."\n";
487
 
488
  echo '</tr>'."\n";
@@ -581,6 +585,10 @@ if(!class_exists("c_ws_plugin__s2member_menu_page_paypal_ops"))
581
  echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />'."\n";
582
  echo '<code>custom="'.esc_html($_SERVER["HTTP_HOST"]).'|christmas-promo"</code>'."\n";
583
 
 
 
 
 
584
  echo '</td>'."\n";
585
 
586
  echo '</tr>'."\n";
@@ -601,8 +609,8 @@ if(!class_exists("c_ws_plugin__s2member_menu_page_paypal_ops"))
601
 
602
  echo '<div class="ws-menu-page-section ws-plugin--s2member-eot-behavior-section">'."\n";
603
  echo '<h3>PayPal® EOT Behavior (required, please choose)</h3>'."\n";
604
- echo '<p>EOT = End Of Term. By default, s2Member will demote a paid Member to a Free Subscriber whenever their Subscription term has ended (i.e. expired), been cancelled, refunded, charged back to you, etc. s2Member demotes them to a Free Subscriber, so they will no longer have Member Level Access to your site. However, in some cases, you may prefer to have Customer accounts deleted completely, instead of just being demoted. This is where you choose which method works best for your site. If you don\'t want s2Member to take ANY action at all, you can disable s2Member\'s EOT System temporarily, or even completely.</p>'."\n";
605
- echo '<p>The PayPal® IPN service will notify s2Member whenever a Member\'s payments have been failing, and/or whenever a Member\'s Subscription has expired for any reason. Even refunds &amp; chargeback reversals are supported through the IPN service. For example, if you issue a refund to an unhappy Customer through PayPal®, s2Member will eventually be notified, and the account for that Customer will either be demoted to a Free Subscriber, or deleted automatically (based on your configuration). The communication from PayPal® -› s2Member is seamless.</p>'."\n";
606
  echo '<p><em><strong>*Some Hairy Details*</strong> There might be times whenever you notice that a Member\'s Subscription has been cancelled through PayPal®... but, s2Member continues allowing the User access to your site as a paid Member. Please don\'t be confused by this... in 99.9% of these cases, the reason for this is legitimate. s2Member will only remove the User\'s Membership privileges when an EOT (End Of Term) is processed, a refund occurs, a chargeback occurs, or when a cancellation occurs - which would later result in a delayed Auto-EOT by s2Member.</em></p>'."\n";
607
  echo '<p><em>s2Member will not process an EOT until the User has completely used up the time they paid for. In other words, if a User signs up for a monthly Subscription on Jan 1st, and then cancels their Subscription on Jan 15th; technically, they should still be allowed to access the site for another 15 days, and then on Feb 1st, the time they paid for has completely elapsed. At that time, s2Member will remove their Membership privileges; by either demoting them to a Free Subscriber, or deleting their account from the system (based on your configuration). s2Member also calculates one extra day (24 hours) into its equation, just to make sure access is not removed sooner than a Customer might expect.</em></p>'."\n";
608
  do_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_eot_behavior", get_defined_vars());
@@ -638,7 +646,7 @@ if(!class_exists("c_ws_plugin__s2member_menu_page_paypal_ops"))
638
 
639
  echo '<th>'."\n";
640
  echo '<label for="ws-plugin--s2member-membership-eot-behavior">'."\n";
641
- echo 'Membership EOT Behavior (demote or delete)?'."\n";
642
  echo '</label>'."\n";
643
  echo '</th>'."\n";
644
 
@@ -655,9 +663,46 @@ if(!class_exists("c_ws_plugin__s2member_menu_page_paypal_ops"))
655
  echo '</tr>'."\n";
656
  echo '<tr>'."\n";
657
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
658
  echo '<th>'."\n";
659
  echo '<label for="ws-plugin--s2member-triggers-immediate-eot">'."\n";
660
- echo 'Refunds/Reversals (trigger immediate EOT)?'."\n";
661
  echo '</label>'."\n";
662
  echo '</th>'."\n";
663
 
@@ -667,11 +712,11 @@ if(!class_exists("c_ws_plugin__s2member_menu_page_paypal_ops"))
667
  echo '<td>'."\n";
668
  echo '<select name="ws_plugin__s2member_triggers_immediate_eot" id="ws-plugin--s2member-triggers-immediate-eot">'."\n";
669
  echo '<option value="none"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["triggers_immediate_eot"] === "none") ? ' selected="selected"' : '').'>Neither (I\'ll review these two events manually)</option>'."\n";
670
- echo '<option value="refunds"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["triggers_immediate_eot"] === "refunds") ? ' selected="selected"' : '').'>Refunds (refunds ALWAYS trigger an immediate EOT action)</option>'."\n";
671
- echo '<option value="reversals"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["triggers_immediate_eot"] === "reversals") ? ' selected="selected"' : '').'>Reversals (chargebacks ALWAYS trigger an immediate EOT action)</option>'."\n";
672
- echo '<option value="refunds,reversals"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["triggers_immediate_eot"] === "refunds,reversals") ? ' selected="selected"' : '').'>Refunds/Reversals (ALWAYS trigger an immediate EOT action)</option>'."\n";
673
  echo '</select><br />'."\n";
674
- echo 'This setting will <a href="#" onclick="alert(\'A Refund/Reversal Notification will ALWAYS be processed internally by s2Member, even if no action is taken by s2Member. This way you\\\'ll have the full ability to listen for these two events on your own; if you prefer (optional). For more information, check your Dashboard under: `s2Member -› API Notifications -› Refunds/Reversals`.\'); return false;">NOT affect</a> s2Member\'s internal API Notifications for Refund/Reversal events.'."\n";
675
  echo '</td>'."\n";
676
 
677
  echo '</tr>'."\n";
@@ -679,7 +724,7 @@ if(!class_exists("c_ws_plugin__s2member_menu_page_paypal_ops"))
679
 
680
  echo '<th>'."\n";
681
  echo '<label for="ws-plugin--s2member-eot-time-ext-behavior">'."\n";
682
- echo 'Fixed-Term Extensions (auto-extend)?'."\n";
683
  echo '</label>'."\n";
684
  echo '</th>'."\n";
685
 
@@ -691,7 +736,7 @@ if(!class_exists("c_ws_plugin__s2member_menu_page_paypal_ops"))
691
  echo '<option value="extend"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_time_ext_behavior"] === "extend") ? ' selected="selected"' : '').'>Yes (default, automatically extend any existing EOT Time)</option>'."\n";
692
  echo '<option value="reset"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_time_ext_behavior"] === "reset") ? ' selected="selected"' : '').'>No (do NOT extend; s2Member should reset EOT Time completely)</option>'."\n";
693
  echo '</select><br />'."\n";
694
- echo 'This setting will only affect Buy Now transactions for fixed-term lengths. By default, s2Member will automatically extend any existing EOT Time that a Customer may have.'."\n";
695
  echo '</td>'."\n";
696
 
697
  echo '</tr>'."\n";
483
  echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />'."\n";
484
  echo '<code>custom="'.esc_html($_SERVER["HTTP_HOST"]).'|christmas-promo"</code>'."\n";
485
 
486
+ echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ?
487
+ '<div class="ws-menu-page-hr"></div>' . "\n".
488
+ '<p style="margin:0;"><strong>PHP Code:</strong> It is also possible to use PHP tags — optional (for developers). If you use PHP tags, please run a test email with <code>&lt;?php print_r(get_defined_vars()); ?&gt;</code>. This will give you a full list of all PHP variables available to you in this email. The <code>$paypal</code> variable is the most important one. It contains all of the <code>$_POST</code> variables received from PayPal\'s IPN service — or from an s2Member® Pro Form integration (e.g. <code>$paypal["item_number"]</code>, <code>$paypal["item_name"]</code>, etc). Please note that all Replacement Codes will be parsed first, and then any PHP tags that you\'ve included. Also, please remember that emails are sent in plain text format.</p>'."\n"
489
+ : '';
490
  echo '</td>'."\n";
491
 
492
  echo '</tr>'."\n";
585
  echo '<em>(The campaign (i.e. christmas-promo) could be referenced using <code>%%cv1%%</code>)</em><br />'."\n";
586
  echo '<code>custom="'.esc_html($_SERVER["HTTP_HOST"]).'|christmas-promo"</code>'."\n";
587
 
588
+ echo (!is_multisite () || !c_ws_plugin__s2member_utils_conds::is_multisite_farm () || is_main_site ()) ?
589
+ '<div class="ws-menu-page-hr"></div>' . "\n".
590
+ '<p style="margin:0;"><strong>PHP Code:</strong> It is also possible to use PHP tags — optional (for developers). If you use PHP tags, please run a test email with <code>&lt;?php print_r(get_defined_vars()); ?&gt;</code>. This will give you a full list of all PHP variables available to you in this email. The <code>$paypal</code> variable is the most important one. It contains all of the <code>$_POST</code> variables received from PayPal\'s IPN service — or from an s2Member® Pro Form integration (e.g. <code>$paypal["item_number"]</code>, <code>$paypal["item_name"]</code>, etc). Please note that all Replacement Codes will be parsed first, and then any PHP tags that you\'ve included. Also, please remember that emails are sent in plain text format.</p>'."\n"
591
+ : '';
592
  echo '</td>'."\n";
593
 
594
  echo '</tr>'."\n";
609
 
610
  echo '<div class="ws-menu-page-section ws-plugin--s2member-eot-behavior-section">'."\n";
611
  echo '<h3>PayPal® EOT Behavior (required, please choose)</h3>'."\n";
612
+ echo '<p>EOT = End Of Term. By default, s2Member will demote a paid Member to a Free Subscriber whenever their Subscription term has ended (i.e. expired), been cancelled, refunded, charged back to you, etc. s2Member demotes them to a Free Subscriber, so they will no longer have Member Level Access to your site. However, in some cases, you may prefer to have Customer accounts deleted completely, instead of just being demoted. This is where you choose which method works best for your site. If you don\'t want s2Member to take ANY action at all, you can disable s2Member\'s EOT System temporarily, or even completely. There are also a few other configurable options here, so please read carefully. These options are all very important.</p>'."\n";
613
+ echo '<p><strong>PayPal® IPNs:</strong> The PayPal® IPN service will notify s2Member whenever a Member\'s payments have been failing, and/or whenever a Member\'s Subscription has expired for any reason. Even refunds &amp; chargeback reversals are supported through the IPN service. For example, if you issue a refund to an unhappy Customer through PayPal®, s2Member will eventually be notified, and the account for that Customer will either be demoted to a Free Subscriber, or deleted automatically (based on your configuration). The communication from PayPal® -› s2Member is seamless.</p>'."\n";
614
  echo '<p><em><strong>*Some Hairy Details*</strong> There might be times whenever you notice that a Member\'s Subscription has been cancelled through PayPal®... but, s2Member continues allowing the User access to your site as a paid Member. Please don\'t be confused by this... in 99.9% of these cases, the reason for this is legitimate. s2Member will only remove the User\'s Membership privileges when an EOT (End Of Term) is processed, a refund occurs, a chargeback occurs, or when a cancellation occurs - which would later result in a delayed Auto-EOT by s2Member.</em></p>'."\n";
615
  echo '<p><em>s2Member will not process an EOT until the User has completely used up the time they paid for. In other words, if a User signs up for a monthly Subscription on Jan 1st, and then cancels their Subscription on Jan 15th; technically, they should still be allowed to access the site for another 15 days, and then on Feb 1st, the time they paid for has completely elapsed. At that time, s2Member will remove their Membership privileges; by either demoting them to a Free Subscriber, or deleting their account from the system (based on your configuration). s2Member also calculates one extra day (24 hours) into its equation, just to make sure access is not removed sooner than a Customer might expect.</em></p>'."\n";
616
  do_action("ws_plugin__s2member_during_paypal_ops_page_during_left_sections_during_eot_behavior", get_defined_vars());
646
 
647
  echo '<th>'."\n";
648
  echo '<label for="ws-plugin--s2member-membership-eot-behavior">'."\n";
649
+ echo 'Membership EOT Behavior (Demote or Delete)?'."\n";
650
  echo '</label>'."\n";
651
  echo '</th>'."\n";
652
 
663
  echo '</tr>'."\n";
664
  echo '<tr>'."\n";
665
 
666
+ echo '<th>'."\n";
667
+ echo '<label for="ws-plugin--s2member-eots-remove-ccaps">'."\n";
668
+ echo 'Membership EOTs also Remove all Custom Capabilities?'."\n";
669
+ echo '</label>'."\n";
670
+ echo '</th>'."\n";
671
+
672
+ echo '</tr>'."\n";
673
+ echo '<tr>'."\n";
674
+
675
+ echo '<td>'."\n";
676
+ echo '<select name="ws_plugin__s2member_eots_remove_ccaps" id="ws-plugin--s2member-eots-remove-ccaps">'."\n";
677
+ echo '<option value="1"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eots_remove_ccaps"]) ? ' selected="selected"' : '').'>Yes (an EOT also results in the loss of any Custom Capabilities a User/Member may have)</option>'."\n";
678
+ echo '<option value="0"'.((!$GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eots_remove_ccaps"]) ? ' selected="selected"' : '').'>No (an EOT has no impact on any Custom Capabilities a User/Member may have)</option>'."\n";
679
+ echo '</select><br />'."\n";
680
+ echo '<em>NOTE: If Refunds/Reversals trigger an Immediate EOT (see setting below); Custom Capabilities will always be removed when/if a Refund or Reversal occurs. In other words, this setting is ignored for Refunds/Reversals (IF they trigger an Immediate EOT — based on your configuration below). If you prefer to review all Refunds/Reversals for yourself, please choose that option below.</em>'."\n";
681
+ echo '</td>'."\n";
682
+
683
+ echo '</tr>'."\n";
684
+ echo '<tr>'."\n";
685
+
686
+ echo '<th>'."\n";
687
+ echo '<label for="ws-plugin--s2member-eot-grace-time">'."\n";
688
+ echo 'EOT Grace Time (in seconds):'."\n";
689
+ echo '</label>'."\n";
690
+ echo '</th>'."\n";
691
+
692
+ echo '</tr>'."\n";
693
+ echo '<tr>'."\n";
694
+
695
+ echo '<td>'."\n";
696
+ echo '<input type="text" autocomplete="off" name="ws_plugin__s2member_eot_grace_time" id="ws-plugin--s2member-eot-grace-time" value="'.format_to_edit($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_grace_time"]).'" /><br />'."\n";
697
+ echo '<em>This is represented in seconds. For example, a value of: <code>86400</code> = 1 day. Your EOT Grace Time; is the amount of time you will offer as a grace period (if any). Most site owners will give customers an additional 24 hours of access; just to help avoid any negativity that may result from a customer losing access sooner than they might expect. You can disable EOT Grace Time by setting this to: <code>0</code>. Note: there is NO Grace Time applied when/if a Refund or Reversal occurs. If Refunds/Reversals trigger an Immediate EOT (see setting below); there is never any Grace Time applied in that scenario.</em>'."\n";
698
+ echo '</td>'."\n";
699
+
700
+ echo '</tr>'."\n";
701
+ echo '<tr>'."\n";
702
+
703
  echo '<th>'."\n";
704
  echo '<label for="ws-plugin--s2member-triggers-immediate-eot">'."\n";
705
+ echo 'Refunds/Reversals (trigger Immediate EOT)?'."\n";
706
  echo '</label>'."\n";
707
  echo '</th>'."\n";
708
 
712
  echo '<td>'."\n";
713
  echo '<select name="ws_plugin__s2member_triggers_immediate_eot" id="ws-plugin--s2member-triggers-immediate-eot">'."\n";
714
  echo '<option value="none"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["triggers_immediate_eot"] === "none") ? ' selected="selected"' : '').'>Neither (I\'ll review these two events manually)</option>'."\n";
715
+ echo '<option value="refunds"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["triggers_immediate_eot"] === "refunds") ? ' selected="selected"' : '').'>Refunds (refunds ALWAYS trigger an Immediate EOT action)</option>'."\n";
716
+ echo '<option value="reversals"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["triggers_immediate_eot"] === "reversals") ? ' selected="selected"' : '').'>Reversals (chargebacks ALWAYS trigger an Immediate EOT action)</option>'."\n";
717
+ echo '<option value="refunds,reversals"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["triggers_immediate_eot"] === "refunds,reversals") ? ' selected="selected"' : '').'>Refunds/Reversals (ALWAYS trigger an Immediate EOT action)</option>'."\n";
718
  echo '</select><br />'."\n";
719
+ echo '<em>This setting will <a href="#" onclick="alert(\'A Refund/Reversal Notification will ALWAYS be processed internally by s2Member, even if no action is taken by s2Member. This way you\\\'ll have the full ability to listen for these two events on your own; if you prefer (optional). For more information, check your Dashboard under: `s2Member -› API Notifications -› Refunds/Reversals`.\'); return false;">NOT impact</a> s2Member\'s internal API Notifications for Refund/Reversal events.</em>'."\n";
720
  echo '</td>'."\n";
721
 
722
  echo '</tr>'."\n";
724
 
725
  echo '<th>'."\n";
726
  echo '<label for="ws-plugin--s2member-eot-time-ext-behavior">'."\n";
727
+ echo 'Fixed-Term Extensions (Auto-Extend)?'."\n";
728
  echo '</label>'."\n";
729
  echo '</th>'."\n";
730
 
736
  echo '<option value="extend"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_time_ext_behavior"] === "extend") ? ' selected="selected"' : '').'>Yes (default, automatically extend any existing EOT Time)</option>'."\n";
737
  echo '<option value="reset"'.(($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["eot_time_ext_behavior"] === "reset") ? ' selected="selected"' : '').'>No (do NOT extend; s2Member should reset EOT Time completely)</option>'."\n";
738
  echo '</select><br />'."\n";
739
+ echo '<em>This setting will only affect Buy Now transactions for fixed-term lengths. By default, s2Member will automatically extend any existing EOT Time that a Customer may have. For example, if I buy one year of access, and then I buy another year of access (before my first year is totally used up); I end up with everything I paid you for (now over 1 year of access) if this is set to <code>Yes</code>. If this was set to <code>No</code>, the EOT Time would be reset when I make the second purchase; leaving me with only 1 year of access, starting the date of my second purchase.</em>'."\n";
740
  echo '</td>'."\n";
741
 
742
  echo '</tr>'."\n";
includes/syscon.inc.php CHANGED
@@ -282,15 +282,16 @@ if(!function_exists("ws_plugin__s2member_configure_options_and_their_defaults"))
282
  $default_options["amazon_cf_files_distro_streaming_dname"] = "";
283
  $default_options["amazon_cf_files_distros_auto_config_status"] = "";
284
 
285
- for($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)$default_options["level".$n."_ruris"] = "";
286
-
287
- for($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)$default_options["level".$n."_catgs"] = "";
288
-
289
- for($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)$default_options["level".$n."_ptags"] = "";
290
-
291
- for($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)$default_options["level".$n."_posts"] = "";
292
-
293
- for($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)$default_options["level".$n."_pages"] = "";
 
294
 
295
  $default_options["specific_ids"] = "";
296
 
@@ -298,6 +299,8 @@ if(!function_exists("ws_plugin__s2member_configure_options_and_their_defaults"))
298
  $default_options["membership_eot_behavior"] = "demote";
299
  $default_options["eot_time_ext_behavior"] = "extend";
300
  $default_options["auto_eot_system_enabled"] = "1";
 
 
301
 
302
  $default_options["wp_footer_code"] = "";
303
 
@@ -532,7 +535,7 @@ if(!function_exists("ws_plugin__s2member_configure_options_and_their_defaults"))
532
  else if($key === "eot_time_ext_behavior" && (!is_string($value) || !preg_match("/^(?:extend|reset)$/", $value)))
533
  $value = $default_options[$key];
534
 
535
- else if($key === "auto_eot_system_enabled" && (!is_string($value) || !is_numeric($value)))
536
  $value = $default_options[$key];
537
 
538
  else if($key === "wp_footer_code" && (!is_string($value) || !strlen($value)))
282
  $default_options["amazon_cf_files_distro_streaming_dname"] = "";
283
  $default_options["amazon_cf_files_distros_auto_config_status"] = "";
284
 
285
+ for($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
286
+ $default_options["level".$n."_ruris"] = "";
287
+ for($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
288
+ $default_options["level".$n."_catgs"] = "";
289
+ for($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
290
+ $default_options["level".$n."_ptags"] = "";
291
+ for($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
292
+ $default_options["level".$n."_posts"] = "";
293
+ for($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
294
+ $default_options["level".$n."_pages"] = "";
295
 
296
  $default_options["specific_ids"] = "";
297
 
299
  $default_options["membership_eot_behavior"] = "demote";
300
  $default_options["eot_time_ext_behavior"] = "extend";
301
  $default_options["auto_eot_system_enabled"] = "1";
302
+ $default_options["eots_remove_ccaps"] = "1";
303
+ $default_options["eot_grace_time"] = "86400";
304
 
305
  $default_options["wp_footer_code"] = "";
306
 
535
  else if($key === "eot_time_ext_behavior" && (!is_string($value) || !preg_match("/^(?:extend|reset)$/", $value)))
536
  $value = $default_options[$key];
537
 
538
+ else if(preg_match("/^(?:auto_eot_system_enabled|eot_grace_time|eots_remove_ccaps)$/", $key) && (!is_string($value) || !is_numeric($value)))
539
  $value = $default_options[$key];
540
 
541
  else if($key === "wp_footer_code" && (!is_string($value) || !strlen($value)))
includes/templates/players/jwplayer-v6-rtmp-only.php CHANGED
@@ -6,38 +6,40 @@ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
6
  <div id="%%player_id%%"></div>
7
  <script type="text/javascript" src="%%player_path%%"></script>
8
  <script type="text/javascript">
9
-
10
  if(typeof jwplayer.key !== 'string' || !jwplayer.key)
11
  jwplayer.key = '%%player_key%%';
12
 
13
- jwplayer('%%player_id%%').setup({
14
-
15
  playlist:
16
  [{
 
17
  image: '%%player_image%%',
18
-
 
 
 
 
 
19
  sources: // Available sources.
20
  [
21
  {file: '%%streamer%%/%%prefix%%%%file%%'}
22
  ]
23
  }],
24
-
25
- title: '%%player_title%%',
26
-
27
  controls: %%player_controls%%,
28
  height: %%player_height%%,
29
  skin: '%%player_skin%%',
30
  stretching: '%%player_stretching%%',
31
  width: %%player_width%%,
32
-
33
  autostart: %%player_autostart%%,
34
  fallback: %%player_fallback%%,
35
  mute: %%player_mute%%,
36
  primary: '%%player_primary%%',
37
  repeat: %%player_repeat%%,
38
  startparam: '%%player_startparam%%',
39
-
40
  %%player_option_blocks%%
41
  });
42
-
43
  </script>
6
  <div id="%%player_id%%"></div>
7
  <script type="text/javascript" src="%%player_path%%"></script>
8
  <script type="text/javascript">
 
9
  if(typeof jwplayer.key !== 'string' || !jwplayer.key)
10
  jwplayer.key = '%%player_key%%';
11
 
12
+ jwplayer('%%player_id%%').setup
13
+ ({
14
  playlist:
15
  [{
16
+ title: '%%player_title%%',
17
  image: '%%player_image%%',
18
+
19
+ mediaid: '%%player_mediaid%%',
20
+ description: '%%player_description%%',
21
+
22
+ captions: %%player_captions%%,
23
+
24
  sources: // Available sources.
25
  [
26
  {file: '%%streamer%%/%%prefix%%%%file%%'}
27
  ]
28
  }],
29
+
 
 
30
  controls: %%player_controls%%,
31
  height: %%player_height%%,
32
  skin: '%%player_skin%%',
33
  stretching: '%%player_stretching%%',
34
  width: %%player_width%%,
35
+
36
  autostart: %%player_autostart%%,
37
  fallback: %%player_fallback%%,
38
  mute: %%player_mute%%,
39
  primary: '%%player_primary%%',
40
  repeat: %%player_repeat%%,
41
  startparam: '%%player_startparam%%',
42
+
43
  %%player_option_blocks%%
44
  });
 
45
  </script>
includes/templates/players/jwplayer-v6-rtmp.php CHANGED
@@ -6,39 +6,41 @@ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
6
  <div id="%%player_id%%"></div>
7
  <script type="text/javascript" src="%%player_path%%"></script>
8
  <script type="text/javascript">
9
-
10
  if(typeof jwplayer.key !== 'string' || !jwplayer.key)
11
  jwplayer.key = '%%player_key%%';
12
 
13
- jwplayer('%%player_id%%').setup({
14
-
15
  playlist:
16
  [{
 
17
  image: '%%player_image%%',
18
-
 
 
 
 
 
19
  sources: // Available sources.
20
  [
21
  {file: '%%streamer%%/%%prefix%%%%file%%'},
22
  {file: '%%url%%'}
23
  ]
24
  }],
25
-
26
- title: '%%player_title%%',
27
-
28
  controls: %%player_controls%%,
29
  height: %%player_height%%,
30
  skin: '%%player_skin%%',
31
  stretching: '%%player_stretching%%',
32
  width: %%player_width%%,
33
-
34
  autostart: %%player_autostart%%,
35
  fallback: %%player_fallback%%,
36
  mute: %%player_mute%%,
37
  primary: '%%player_primary%%',
38
  repeat: %%player_repeat%%,
39
  startparam: '%%player_startparam%%',
40
-
41
  %%player_option_blocks%%
42
  });
43
-
44
  </script>
6
  <div id="%%player_id%%"></div>
7
  <script type="text/javascript" src="%%player_path%%"></script>
8
  <script type="text/javascript">
 
9
  if(typeof jwplayer.key !== 'string' || !jwplayer.key)
10
  jwplayer.key = '%%player_key%%';
11
 
12
+ jwplayer('%%player_id%%').setup
13
+ ({
14
  playlist:
15
  [{
16
+ title: '%%player_title%%',
17
  image: '%%player_image%%',
18
+
19
+ mediaid: '%%player_mediaid%%',
20
+ description: '%%player_description%%',
21
+
22
+ captions: %%player_captions%%,
23
+
24
  sources: // Available sources.
25
  [
26
  {file: '%%streamer%%/%%prefix%%%%file%%'},
27
  {file: '%%url%%'}
28
  ]
29
  }],
30
+
 
 
31
  controls: %%player_controls%%,
32
  height: %%player_height%%,
33
  skin: '%%player_skin%%',
34
  stretching: '%%player_stretching%%',
35
  width: %%player_width%%,
36
+
37
  autostart: %%player_autostart%%,
38
  fallback: %%player_fallback%%,
39
  mute: %%player_mute%%,
40
  primary: '%%player_primary%%',
41
  repeat: %%player_repeat%%,
42
  startparam: '%%player_startparam%%',
43
+
44
  %%player_option_blocks%%
45
  });
 
46
  </script>
includes/templates/players/jwplayer-v6.php CHANGED
@@ -6,38 +6,40 @@ if (realpath (__FILE__) === realpath ($_SERVER["SCRIPT_FILENAME"]))
6
  <div id="%%player_id%%"></div>
7
  <script type="text/javascript" src="%%player_path%%"></script>
8
  <script type="text/javascript">
9
-
10
  if(typeof jwplayer.key !== 'string' || !jwplayer.key)
11
  jwplayer.key = '%%player_key%%';
12
 
13
- jwplayer('%%player_id%%').setup({
14
-
15
  playlist:
16
  [{
 
17
  image: '%%player_image%%',
18
-
 
 
 
 
 
19
  sources: // Available sources.
20
  [
21
  {file: '%%url%%'}
22
  ]
23
  }],
24
-
25
- title: '%%player_title%%',
26
-
27
  controls: %%player_controls%%,
28
  height: %%player_height%%,
29
  skin: '%%player_skin%%',
30
  stretching: '%%player_stretching%%',
31
  width: %%player_width%%,
32
-
33
  autostart: %%player_autostart%%,
34
  fallback: %%player_fallback%%,
35
  mute: %%player_mute%%,
36
  primary: '%%player_primary%%',
37
  repeat: %%player_repeat%%,
38
  startparam: '%%player_startparam%%',
39
-
40
  %%player_option_blocks%%
41
  });
42
-
43
  </script>
6
  <div id="%%player_id%%"></div>
7
  <script type="text/javascript" src="%%player_path%%"></script>
8
  <script type="text/javascript">
 
9
  if(typeof jwplayer.key !== 'string' || !jwplayer.key)
10
  jwplayer.key = '%%player_key%%';
11
 
12
+ jwplayer('%%player_id%%').setup
13
+ ({
14
  playlist:
15
  [{
16
+ title: '%%player_title%%',
17
  image: '%%player_image%%',
18
+
19
+ mediaid: '%%player_mediaid%%',
20
+ description: '%%player_description%%',
21
+
22
+ captions: %%player_captions%%,
23
+
24
  sources: // Available sources.
25
  [
26
  {file: '%%url%%'}
27
  ]
28
  }],
29
+
 
 
30
  controls: %%player_controls%%,
31
  height: %%player_height%%,
32
  skin: '%%player_skin%%',
33
  stretching: '%%player_stretching%%',
34
  width: %%player_width%%,
35
+
36
  autostart: %%player_autostart%%,
37
  fallback: %%player_fallback%%,
38
  mute: %%player_mute%%,
39
  primary: '%%player_primary%%',
40
  repeat: %%player_repeat%%,
41
  startparam: '%%player_startparam%%',
42
+
43
  %%player_option_blocks%%
44
  });
 
45
  </script>
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 130207\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/s2member\n"
7
- "POT-Creation-Date: 2013-02-14 14:01:57+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -810,8 +810,8 @@ msgstr ""
810
  #: s2member/includes/templates/buttons/paypal-checkout-button.php:46
811
  #: s2member/includes/templates/buttons/paypal-sp-checkout-button.php:34
812
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
813
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:266
814
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:509
815
  msgctxt "s2member-front paypal-button-lang-code"
816
  msgid "en_US"
817
  msgstr ""
@@ -1016,93 +1016,93 @@ msgid_plural "%s years"
1016
  msgstr[0] ""
1017
  msgstr[1] ""
1018
 
1019
- #: s2member/includes/classes/utils-time.inc.php:235
1020
  msgctxt "s2member-front"
1021
  msgid "Daily"
1022
  msgstr ""
1023
 
1024
- #: s2member/includes/classes/utils-time.inc.php:235
1025
  msgctxt "s2member-front"
1026
  msgid "Weekly"
1027
  msgstr ""
1028
 
1029
- #: s2member/includes/classes/utils-time.inc.php:235
1030
  msgctxt "s2member-front"
1031
  msgid "Monthly"
1032
  msgstr ""
1033
 
1034
- #: s2member/includes/classes/utils-time.inc.php:235
1035
  msgctxt "s2member-front"
1036
  msgid "Yearly"
1037
  msgstr ""
1038
 
1039
- #: s2member/includes/classes/utils-time.inc.php:235
1040
- #: s2member/includes/classes/utils-time.inc.php:246
1041
  msgctxt "s2member-front"
1042
  msgid "Lifetime"
1043
  msgstr ""
1044
 
1045
- #: s2member/includes/classes/utils-time.inc.php:239
1046
  msgctxt "s2member-front"
1047
  msgid "Bi-Weekly"
1048
  msgstr ""
1049
 
1050
- #: s2member/includes/classes/utils-time.inc.php:240
1051
  msgctxt "s2member-front"
1052
  msgid "Bi-Monthly"
1053
  msgstr ""
1054
 
1055
- #: s2member/includes/classes/utils-time.inc.php:241
1056
  msgctxt "s2member-front"
1057
  msgid "Quarterly"
1058
  msgstr ""
1059
 
1060
- #: s2member/includes/classes/utils-time.inc.php:242
1061
  msgctxt "s2member-front"
1062
  msgid "Semi-Yearly"
1063
  msgstr ""
1064
 
1065
- #: s2member/includes/classes/utils-time.inc.php:246
1066
  msgctxt "s2member-front"
1067
  msgid "Day"
1068
  msgstr ""
1069
 
1070
- #: s2member/includes/classes/utils-time.inc.php:246
1071
  msgctxt "s2member-front"
1072
  msgid "Week"
1073
  msgstr ""
1074
 
1075
- #: s2member/includes/classes/utils-time.inc.php:246
1076
  msgctxt "s2member-front"
1077
  msgid "Month"
1078
  msgstr ""
1079
 
1080
- #: s2member/includes/classes/utils-time.inc.php:246
1081
  msgctxt "s2member-front"
1082
  msgid "Year"
1083
  msgstr ""
1084
 
1085
- #: s2member/includes/classes/utils-time.inc.php:252
1086
  msgctxt "s2member-front"
1087
  msgid "Days"
1088
  msgstr ""
1089
 
1090
- #: s2member/includes/classes/utils-time.inc.php:252
1091
  msgctxt "s2member-front"
1092
  msgid "Weeks"
1093
  msgstr ""
1094
 
1095
- #: s2member/includes/classes/utils-time.inc.php:252
1096
  msgctxt "s2member-front"
1097
  msgid "Months"
1098
  msgstr ""
1099
 
1100
- #: s2member/includes/classes/utils-time.inc.php:252
1101
  msgctxt "s2member-front"
1102
  msgid "Years"
1103
  msgstr ""
1104
 
1105
- #: s2member/includes/classes/utils-time.inc.php:252
1106
  msgctxt "s2member-front"
1107
  msgid "Lifetimes"
1108
  msgstr ""
@@ -1110,15 +1110,15 @@ msgstr ""
1110
  #. translators: Each cycle ( i.e. `each day/week/month` or `every 2
1111
  #. days/weeks/months`, etc. ). Cycles are translated elsewhere.
1112
 
1113
- #: s2member/includes/classes/utils-time.inc.php:287
1114
- #: s2member/includes/classes/utils-time.inc.php:328
1115
  msgctxt "s2member-front"
1116
  msgid "each %2$s"
1117
  msgid_plural "every %1$s %3$s"
1118
  msgstr[0] ""
1119
  msgstr[1] ""
1120
 
1121
- #: s2member/includes/classes/utils-time.inc.php:290
1122
  msgctxt "s2member-front"
1123
  msgid "lifetime"
1124
  msgstr ""
@@ -1126,7 +1126,7 @@ msgstr ""
1126
  #. translators: Membership cycle ( i.e. `1 day/week/month` or `2
1127
  #. days/weeks/months`, etc. ). Most of this is translated elsewhere.
1128
 
1129
- #: s2member/includes/classes/utils-time.inc.php:294
1130
  msgctxt "s2member-front"
1131
  msgid "%1$s %2$s"
1132
  msgid_plural "%1$s %3$s"
@@ -1136,7 +1136,7 @@ msgstr[1] ""
1136
  #. translators: Cycle ( i.e. `for 1 day/week/month` or `for 2
1137
  #. days/weeks/months`, etc. ). Most of this is translated elsewhere.
1138
 
1139
- #: s2member/includes/classes/utils-time.inc.php:335
1140
  msgctxt "s2member-front"
1141
  msgid "for %1$s %2$s"
1142
  msgid_plural "for %1$s %3$s"
@@ -1233,12 +1233,12 @@ msgstr ""
1233
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:236
1234
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:243
1235
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:250
1236
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:485
1237
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:492
1238
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:748
1239
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:755
1240
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:762
1241
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:769
1242
  msgctxt "s2member-front"
1243
  msgid "— Oops, you missed something: —"
1244
  msgstr ""
@@ -1250,7 +1250,7 @@ msgstr ""
1250
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:685
1251
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
1252
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:236
1253
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:755
1254
  msgctxt "s2member-front"
1255
  msgid "Passwords do not match up. Please try again."
1256
  msgstr ""
@@ -1262,7 +1262,7 @@ msgstr ""
1262
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:692
1263
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
1264
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:243
1265
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:762
1266
  msgctxt "s2member-front"
1267
  msgid "Password MUST be at least 6 characters. Please try again."
1268
  msgstr ""
@@ -2546,18 +2546,18 @@ msgstr ""
2546
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:474
2547
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:663
2548
  #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:116
2549
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:223
2550
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:354
2551
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:473
2552
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:661
2553
  msgctxt "s2member-front"
2554
  msgid "Security Code"
2555
  msgstr ""
2556
 
2557
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:187
2558
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:630
2559
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:191
2560
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:629
2561
  msgctxt "s2member-front"
2562
  msgid "Additional Info"
2563
  msgstr ""
@@ -2565,9 +2565,9 @@ msgstr ""
2565
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:320
2566
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:441
2567
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:594
2568
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:323
2569
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:442
2570
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:595
2571
  msgctxt "s2member-front"
2572
  msgid "Visa®"
2573
  msgstr ""
@@ -2575,9 +2575,9 @@ msgstr ""
2575
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:320
2576
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:441
2577
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:594
2578
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:323
2579
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:442
2580
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:595
2581
  msgctxt "s2member-front"
2582
  msgid "MasterCard®"
2583
  msgstr ""
@@ -2585,9 +2585,9 @@ msgstr ""
2585
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:320
2586
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:441
2587
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:594
2588
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:323
2589
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:442
2590
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:595
2591
  msgctxt "s2member-front"
2592
  msgid "Discover®"
2593
  msgstr ""
@@ -2595,9 +2595,9 @@ msgstr ""
2595
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:320
2596
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:441
2597
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:594
2598
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:323
2599
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:442
2600
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:595
2601
  msgctxt "s2member-front"
2602
  msgid "American Express®"
2603
  msgstr ""
@@ -3606,28 +3606,28 @@ msgctxt "s2member-front"
3606
  msgid "<strong>Sorry.</strong> Your account is pending other changes. Please try again in 15 minutes."
3607
  msgstr ""
3608
 
3609
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:323
3610
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:442
3611
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:595
3612
  msgctxt "s2member-front"
3613
  msgid "Maestro®"
3614
  msgstr ""
3615
 
3616
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:323
3617
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:442
3618
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:595
3619
  msgctxt "s2member-front"
3620
  msgid "Solo®"
3621
  msgstr ""
3622
 
3623
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:442
3624
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:595
3625
  msgctxt "s2member-front"
3626
  msgid "PayPal®"
3627
  msgstr ""
3628
 
3629
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:517
3630
- #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:706
3631
  msgctxt "s2member-front"
3632
  msgid "We Accept PayPal®"
3633
  msgstr ""
@@ -3798,8 +3798,8 @@ msgstr ""
3798
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:70
3799
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:164
3800
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:250
3801
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:492
3802
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:769
3803
  msgctxt "s2member-front"
3804
  msgid "Security Code missing. Please try again."
3805
  msgstr ""
@@ -3818,8 +3818,8 @@ msgstr ""
3818
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:299
3819
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:507
3820
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
3821
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:302
3822
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:545
3823
  msgctxt "s2member-front"
3824
  msgid "Calculating Sales Tax..."
3825
  msgstr ""
@@ -3828,8 +3828,8 @@ msgstr ""
3828
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:299
3829
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:507
3830
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
3831
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:302
3832
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:545
3833
  msgctxt "s2member-front"
3834
  msgid "calculating sales tax..."
3835
  msgstr ""
@@ -3838,8 +3838,8 @@ msgstr ""
3838
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:310
3839
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:518
3840
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
3841
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:313
3842
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:556
3843
  msgctxt "s2member-front"
3844
  msgid "<strong>Sales Tax%s:</strong> %s<br /><strong>— Total%s:</strong> %s"
3845
  msgstr ""
@@ -3848,8 +3848,8 @@ msgstr ""
3848
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:310
3849
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:518
3850
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
3851
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:313
3852
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:556
3853
  msgctxt "s2member-front"
3854
  msgid "Today"
3855
  msgstr ""
@@ -3857,7 +3857,7 @@ msgstr ""
3857
  #: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
3858
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:580
3859
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
3860
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:618
3861
  #: s2member-pro/includes/templates/forms/authnet-checkout-form.php:47
3862
  #: s2member-pro/includes/templates/forms/authnet-registration-form.php:28
3863
  #: s2member-pro/includes/templates/forms/paypal-checkout-form.php:47
@@ -3869,16 +3869,16 @@ msgstr ""
3869
  #: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
3870
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:581
3871
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
3872
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:619
3873
  msgctxt "s2member-front"
3874
  msgid "Your Profile"
3875
  msgstr ""
3876
 
3877
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
3878
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:265
3879
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:266
3880
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:508
3881
- #: s2member-pro/includes/separates/gateways/paypal/paypal.js:509
 
3882
  #: s2member-pro/includes/templates/forms/authnet-cancellation-form.php:34
3883
  #: s2member-pro/includes/templates/forms/authnet-checkout-form.php:178
3884
  #: s2member-pro/includes/templates/forms/authnet-registration-form.php:79
2
  # This file is distributed under the same license as the s2Member® Framework package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: s2Member® Framework 130220\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/s2member\n"
7
+ "POT-Creation-Date: 2013-02-20 13:06:26+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
810
  #: s2member/includes/templates/buttons/paypal-checkout-button.php:46
811
  #: s2member/includes/templates/buttons/paypal-sp-checkout-button.php:34
812
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
813
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:267
814
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:511
815
  msgctxt "s2member-front paypal-button-lang-code"
816
  msgid "en_US"
817
  msgstr ""
1016
  msgstr[0] ""
1017
  msgstr[1] ""
1018
 
1019
+ #: s2member/includes/classes/utils-time.inc.php:233
1020
  msgctxt "s2member-front"
1021
  msgid "Daily"
1022
  msgstr ""
1023
 
1024
+ #: s2member/includes/classes/utils-time.inc.php:233
1025
  msgctxt "s2member-front"
1026
  msgid "Weekly"
1027
  msgstr ""
1028
 
1029
+ #: s2member/includes/classes/utils-time.inc.php:233
1030
  msgctxt "s2member-front"
1031
  msgid "Monthly"
1032
  msgstr ""
1033
 
1034
+ #: s2member/includes/classes/utils-time.inc.php:233
1035
  msgctxt "s2member-front"
1036
  msgid "Yearly"
1037
  msgstr ""
1038
 
1039
+ #: s2member/includes/classes/utils-time.inc.php:233
1040
+ #: s2member/includes/classes/utils-time.inc.php:244
1041
  msgctxt "s2member-front"
1042
  msgid "Lifetime"
1043
  msgstr ""
1044
 
1045
+ #: s2member/includes/classes/utils-time.inc.php:237
1046
  msgctxt "s2member-front"
1047
  msgid "Bi-Weekly"
1048
  msgstr ""
1049
 
1050
+ #: s2member/includes/classes/utils-time.inc.php:238
1051
  msgctxt "s2member-front"
1052
  msgid "Bi-Monthly"
1053
  msgstr ""
1054
 
1055
+ #: s2member/includes/classes/utils-time.inc.php:239
1056
  msgctxt "s2member-front"
1057
  msgid "Quarterly"
1058
  msgstr ""
1059
 
1060
+ #: s2member/includes/classes/utils-time.inc.php:240
1061
  msgctxt "s2member-front"
1062
  msgid "Semi-Yearly"
1063
  msgstr ""
1064
 
1065
+ #: s2member/includes/classes/utils-time.inc.php:244
1066
  msgctxt "s2member-front"
1067
  msgid "Day"
1068
  msgstr ""
1069
 
1070
+ #: s2member/includes/classes/utils-time.inc.php:244
1071
  msgctxt "s2member-front"
1072
  msgid "Week"
1073
  msgstr ""
1074
 
1075
+ #: s2member/includes/classes/utils-time.inc.php:244
1076
  msgctxt "s2member-front"
1077
  msgid "Month"
1078
  msgstr ""
1079
 
1080
+ #: s2member/includes/classes/utils-time.inc.php:244
1081
  msgctxt "s2member-front"
1082
  msgid "Year"
1083
  msgstr ""
1084
 
1085
+ #: s2member/includes/classes/utils-time.inc.php:250
1086
  msgctxt "s2member-front"
1087
  msgid "Days"
1088
  msgstr ""
1089
 
1090
+ #: s2member/includes/classes/utils-time.inc.php:250
1091
  msgctxt "s2member-front"
1092
  msgid "Weeks"
1093
  msgstr ""
1094
 
1095
+ #: s2member/includes/classes/utils-time.inc.php:250
1096
  msgctxt "s2member-front"
1097
  msgid "Months"
1098
  msgstr ""
1099
 
1100
+ #: s2member/includes/classes/utils-time.inc.php:250
1101
  msgctxt "s2member-front"
1102
  msgid "Years"
1103
  msgstr ""
1104
 
1105
+ #: s2member/includes/classes/utils-time.inc.php:250
1106
  msgctxt "s2member-front"
1107
  msgid "Lifetimes"
1108
  msgstr ""
1110
  #. translators: Each cycle ( i.e. `each day/week/month` or `every 2
1111
  #. days/weeks/months`, etc. ). Cycles are translated elsewhere.
1112
 
1113
+ #: s2member/includes/classes/utils-time.inc.php:285
1114
+ #: s2member/includes/classes/utils-time.inc.php:326
1115
  msgctxt "s2member-front"
1116
  msgid "each %2$s"
1117
  msgid_plural "every %1$s %3$s"
1118
  msgstr[0] ""
1119
  msgstr[1] ""
1120
 
1121
+ #: s2member/includes/classes/utils-time.inc.php:288
1122
  msgctxt "s2member-front"
1123
  msgid "lifetime"
1124
  msgstr ""
1126
  #. translators: Membership cycle ( i.e. `1 day/week/month` or `2
1127
  #. days/weeks/months`, etc. ). Most of this is translated elsewhere.
1128
 
1129
+ #: s2member/includes/classes/utils-time.inc.php:292
1130
  msgctxt "s2member-front"
1131
  msgid "%1$s %2$s"
1132
  msgid_plural "%1$s %3$s"
1136
  #. translators: Cycle ( i.e. `for 1 day/week/month` or `for 2
1137
  #. days/weeks/months`, etc. ). Most of this is translated elsewhere.
1138
 
1139
+ #: s2member/includes/classes/utils-time.inc.php:333
1140
  msgctxt "s2member-front"
1141
  msgid "for %1$s %2$s"
1142
  msgid_plural "for %1$s %3$s"
1233
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:236
1234
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:243
1235
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:250
1236
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:486
1237
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:493
1238
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:750
1239
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:757
1240
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:764
1241
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:771
1242
  msgctxt "s2member-front"
1243
  msgid "— Oops, you missed something: —"
1244
  msgstr ""
1250
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:685
1251
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
1252
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:236
1253
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:757
1254
  msgctxt "s2member-front"
1255
  msgid "Passwords do not match up. Please try again."
1256
  msgstr ""
1262
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:692
1263
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
1264
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:243
1265
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:764
1266
  msgctxt "s2member-front"
1267
  msgid "Password MUST be at least 6 characters. Please try again."
1268
  msgstr ""
2546
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:474
2547
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:663
2548
  #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:116
2549
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:224
2550
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:356
2551
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:476
2552
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:665
2553
  msgctxt "s2member-front"
2554
  msgid "Security Code"
2555
  msgstr ""
2556
 
2557
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:187
2558
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:630
2559
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:192
2560
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:633
2561
  msgctxt "s2member-front"
2562
  msgid "Additional Info"
2563
  msgstr ""
2565
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:320
2566
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:441
2567
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:594
2568
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:325
2569
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:445
2570
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:599
2571
  msgctxt "s2member-front"
2572
  msgid "Visa®"
2573
  msgstr ""
2575
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:320
2576
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:441
2577
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:594
2578
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:325
2579
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:445
2580
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:599
2581
  msgctxt "s2member-front"
2582
  msgid "MasterCard®"
2583
  msgstr ""
2585
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:320
2586
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:441
2587
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:594
2588
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:325
2589
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:445
2590
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:599
2591
  msgctxt "s2member-front"
2592
  msgid "Discover®"
2593
  msgstr ""
2595
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:320
2596
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:441
2597
  #: s2member-pro/includes/classes/gateways/authnet/authnet-form-in.inc.php:594
2598
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:325
2599
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:445
2600
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:599
2601
  msgctxt "s2member-front"
2602
  msgid "American Express®"
2603
  msgstr ""
3606
  msgid "<strong>Sorry.</strong> Your account is pending other changes. Please try again in 15 minutes."
3607
  msgstr ""
3608
 
3609
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:325
3610
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:445
3611
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:599
3612
  msgctxt "s2member-front"
3613
  msgid "Maestro®"
3614
  msgstr ""
3615
 
3616
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:325
3617
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:445
3618
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:599
3619
  msgctxt "s2member-front"
3620
  msgid "Solo®"
3621
  msgstr ""
3622
 
3623
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:445
3624
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:599
3625
  msgctxt "s2member-front"
3626
  msgid "PayPal®"
3627
  msgstr ""
3628
 
3629
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:521
3630
+ #: s2member-pro/includes/classes/gateways/paypal/paypal-form-in.inc.php:711
3631
  msgctxt "s2member-front"
3632
  msgid "We Accept PayPal®"
3633
  msgstr ""
3798
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:70
3799
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:164
3800
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:250
3801
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:493
3802
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:771
3803
  msgctxt "s2member-front"
3804
  msgid "Security Code missing. Please try again."
3805
  msgstr ""
3818
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:299
3819
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:507
3820
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
3821
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:303
3822
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:547
3823
  msgctxt "s2member-front"
3824
  msgid "Calculating Sales Tax..."
3825
  msgstr ""
3828
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:299
3829
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:507
3830
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
3831
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:303
3832
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:547
3833
  msgctxt "s2member-front"
3834
  msgid "calculating sales tax..."
3835
  msgstr ""
3838
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:310
3839
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:518
3840
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
3841
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:314
3842
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:558
3843
  msgctxt "s2member-front"
3844
  msgid "<strong>Sales Tax%s:</strong> %s<br /><strong>— Total%s:</strong> %s"
3845
  msgstr ""
3848
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:310
3849
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:518
3850
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
3851
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:314
3852
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:558
3853
  msgctxt "s2member-front"
3854
  msgid "Today"
3855
  msgstr ""
3857
  #: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
3858
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:580
3859
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
3860
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:620
3861
  #: s2member-pro/includes/templates/forms/authnet-checkout-form.php:47
3862
  #: s2member-pro/includes/templates/forms/authnet-registration-form.php:28
3863
  #: s2member-pro/includes/templates/forms/paypal-checkout-form.php:47
3869
  #: s2member-pro/includes/separates/gateways/authnet/authnet-min.js:1
3870
  #: s2member-pro/includes/separates/gateways/authnet/authnet.js:581
3871
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
3872
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:621
3873
  msgctxt "s2member-front"
3874
  msgid "Your Profile"
3875
  msgstr ""
3876
 
3877
  #: s2member-pro/includes/separates/gateways/paypal/paypal-min.js:1
 
3878
  #: s2member-pro/includes/separates/gateways/paypal/paypal.js:266
3879
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:267
3880
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:510
3881
+ #: s2member-pro/includes/separates/gateways/paypal/paypal.js:511
3882
  #: s2member-pro/includes/templates/forms/authnet-cancellation-form.php:34
3883
  #: s2member-pro/includes/templates/forms/authnet-checkout-form.php:178
3884
  #: s2member-pro/includes/templates/forms/authnet-registration-form.php:79
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === s2Member® Framework (Member Roles, Capabilities, Membership, PayPal Members) ===
2
 
3
- Version: 130214
4
- Stable tag: 130214
5
 
6
  SSL Compatible: yes
7
  bbPress® Compatible: yes
@@ -92,11 +92,22 @@ Please see [this FAQ entry](http://www.s2member.com/faqs/#s2-faqs-translations)
92
 
93
  == Upgrade Notice ==
94
 
95
- = v130214 =
96
  (Maintenance Release) Upgrade immediately.
97
 
98
  == Changelog ==
99
 
 
 
 
 
 
 
 
 
 
 
 
100
  = v130214 =
101
  * **(Maintenance Release) Upgrade immediately.**
102
  * (s2Member/s2Member Pro) **Log Viewer (Issue #16)** Additional log file descriptions have been added to the Dashboard, along with some other UI enhancements in this section.
1
  === s2Member® Framework (Member Roles, Capabilities, Membership, PayPal Members) ===
2
 
3
+ Version: 130220
4
+ Stable tag: 130220
5
 
6
  SSL Compatible: yes
7
  bbPress® Compatible: yes
92
 
93
  == Upgrade Notice ==
94
 
95
+ = v130220 =
96
  (Maintenance Release) Upgrade immediately.
97
 
98
  == Changelog ==
99
 
100
+ = v130220 =
101
+ * (s2Member Pro) **Feature Enhancement/User Exportation (Issue #33)** Adding support for UTF-8 BOM in CSV User export files. Now a configurable option during User/Member Exportation.
102
+ * (s2Member/s2Member Pro) **Feature Enhancement/Emails (Issue #21)** Adding additional Replacement Codes for New User Email Notifications (for both the User/Member Notification and also for the Administrator Notification). The following Replacement Codes are now possible: `%%role%%`, `%%label%%`, `%%level%%`, `%%ccaps%%`. Also adding four new Filters for developers. These include: `ws_plugin__s2member_welcome_email_sbj`, `ws_plugin__s2member_welcome_email_msg`, `ws_plugin__s2member_admin_new_user_email_sbj`, `ws_plugin__s2member_admin_new_user_email_msg`. See `Dashboard -› General Options -› Email Configuration` for further details.
103
+ * (s2Member/s2Member Pro) **Feature Enhancement/Emails (Issue #30)** Adding support for PHP tags in the following emails: New User Notification, Administrative New User Notification, Signup Confirmation Email, Specific Post/Page Confirmation Email. See the relevant sections in your Dashboard for further details. Such as: `s2Member® -› General Options -› Email Configuration` and `s2Member® -› PayPal® Options -› Signup Confirmation Email`.
104
+ * (s2Member/s2Member Pro) **Feature Enhancement/Shortcodes (Issue #23)** Adding support for the `lang=""` Attribute in PayPal Buttons, PayPal Pro Forms, and in Google Checkout Buttons. This is a bit different from the existing `lc=""` value. The `lc=""` value controls the interface at PayPal, while the `lang=""` value controls the language of the Standard and/or Express Checkout Button itself (with respect to s2Member®). For further details, please see: `Dashboard -› PayPal Buttons (or Pro Forms) -› Shortcode Attributes (Explained)`.
105
+ * (s2Member/s2Member Pro) **Bug Fix** Fixing bug in User Access Package. Now checking if `$cap_enabled` also is `TRUE`; just in case another plugin or hack file attempts to disable Custom Capabilities without removing them. Not likely, but we can support this easily with a quick update in this release. Note... this has no impact on s2Member's existing functionality. Custom Capabilities continue to work just as they always have.
106
+ * (s2Member/s2Member Pro) **Feature Enhancement/Logging** Adding new logger. Logs to file `reg-handler.log`. Includes all User/Member registrations handled by s2Member® (either directly or indirectly). Only if logging is enabled. For further details, please check your Dashboard here: `s2Member® -› Log Files (Debug)`.
107
+ * (s2Member/s2Member Pro) **Feature Enhancement/EOTs (Issue #29)** Adding UI option for EOT Grace Time. For further details, please see: `Dashboard -› PayPal Options -› Automatic EOT Behavior`. Also adding a new Filter for developers: `ws_plugin__s2member_eot_grace_time`.
108
+ * (s2Member/s2Member Pro) **Feature Enhancement/EOTs** Adding UI option for EOT Custom Capability Removal. For further details, please see: `Dashboard -› PayPal Options -› Automatic EOT Behavior`. Also adding a new Filter for developers: `ws_plugin__s2member_remove_ccaps_during_eot_events`.
109
+ * (s2Member/s2Member Pro) **Feature Enhancement/s2Stream Shortcode (Issue #32)** Adding additional support for JW Player™ Captions, Titles, Descriptions, and Media IDs (i.e. `player_title=""`, `player_description=""`, `player_mediaid=""`, `player_captions=""`). Please check the Shortcode Attributes tab in [this KB article](http://www.s2member.com/kb/jwplayer-s2stream-shortcodes/#using-s2stream-shortcodes) for further details.
110
+
111
  = v130214 =
112
  * **(Maintenance Release) Upgrade immediately.**
113
  * (s2Member/s2Member Pro) **Log Viewer (Issue #16)** Additional log file descriptions have been added to the Dashboard, along with some other UI enhancements in this section.
s2member.php CHANGED
@@ -19,8 +19,8 @@
19
  */
20
  /* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
21
 
22
- Version: 130214
23
- Stable tag: 130214
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", "130214" /* !#distro-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", "130214" /* !#distro-version#! */);
109
  /*
110
  Several compatibility checks.
111
  If all pass, load the s2Member plugin.
19
  */
20
  /* -- This section for WordPress® parsing. ------------------------------------------------------------------------------
21
 
22
+ Version: 130220
23
+ Stable tag: 130220
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", "130220" /* !#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", "130220" /* !#distro-version#! */);
109
  /*
110
  Several compatibility checks.
111
  If all pass, load the s2Member plugin.