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

Version Description

= v160801 =

(Maintenance Release) Upgrade immediately.

Download this release

Release Info

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

Code changes from version 210208 to 210526

readme.txt CHANGED
@@ -3,9 +3,9 @@
3
  Plugin Name: s2Member® Framework
4
  Plugin URI: http://s2member.com/
5
  Tags: membership, subscribers, subscriber, members only, roles, capabilities, capability, register, signup, paypal, ecommerce, restriction
6
- Version: 210208
7
- Stable tag: 210208
8
- Tested up to: 5.7-alpha
9
  Requires at least: 4.2
10
  Requires PHP: 5.6.2
11
  Tested up to PHP: 7.4.6
@@ -33,11 +33,11 @@ The free s2Member® Framework lets you protect WordPress content and offer users
33
 
34
  Easy to configure and highly extensible.
35
 
36
- You can protect the whole site, certain areas, or even just parts of pages.
37
 
38
- Sell recurring (or non-recurring) subscriptions with lots of flexibility. Or sell "Buy Now" access in various ways.
39
 
40
- Protect your WordPress posts, pages, tags, categories, URIs, BuddyPress/bbPress, and even portions of them.
41
 
42
  Provide highly configurable access to specific portions of your content with Levels or Access Capabilities.
43
 
@@ -139,6 +139,16 @@ Released under the terms of the [GNU General Public License](http://www.gnu.org/
139
 
140
  == Changelog ==
141
 
 
 
 
 
 
 
 
 
 
 
142
  = v210208 =
143
 
144
  - (s2Member Pro) **Enhancement**: In the Stripe integration, cancelling a subscription in the last minutes of a period, may cause the invoice for the new period to remain there and still be charged later. Now s2Member Pro attempts to find a draft or open invoice for the subscription being cancelled, and void it. Thanks Alan for reporting it. See [post 8386](https://f.wpsharks.com/t/8098).
3
  Plugin Name: s2Member® Framework
4
  Plugin URI: http://s2member.com/
5
  Tags: membership, subscribers, subscriber, members only, roles, capabilities, capability, register, signup, paypal, ecommerce, restriction
6
+ Version: 210526
7
+ Stable tag: 210526
8
+ Tested up to: 6.0-alpha-52831
9
  Requires at least: 4.2
10
  Requires PHP: 5.6.2
11
  Tested up to PHP: 7.4.6
33
 
34
  Easy to configure and highly extensible.
35
 
36
+ You can protect the whole site, just certain areas, or even just parts of pages.
37
 
38
+ Sell recurring subscriptions with lots of flexibility. Or sell "Buy Now" access in various ways.
39
 
40
+ Protect your WordPress posts, pages, tags, categories, URIs, BuddyPress, bbPress, and even portions of them.
41
 
42
  Provide highly configurable access to specific portions of your content with Levels or Access Capabilities.
43
 
139
 
140
  == Changelog ==
141
 
142
+ = v210526 =
143
+
144
+ - (s2Member Framework & Pro) **UI Enhancement**: Started improving the admin interface. Lightened up the colors, and changed the layout a little bit.
145
+
146
+ - (s2Member Framework) **UI Enhancement**: Added title tag to buttons to manage custom profile fields in admin, to improve use with screen-reader. [Thread 8836](https://f.wpsharks.com/t/8836/12)
147
+
148
+ - (s2Member Pro) **UI Fix**: Fixed typo in pro-form `rrt` attribute description. [Issue 1204](https://github.com/wpsharks/s2member/issues/1204)
149
+
150
+ - (s2Member Framework) **Bug Fix**: Registration Date sometimes wasn't formatted correctly with the s2Get shortcode. [Thread 8730](https://f.wpsharks.com/t/8730)
151
+
152
  = v210208 =
153
 
154
  - (s2Member Pro) **Enhancement**: In the Stripe integration, cancelling a subscription in the last minutes of a period, may cause the invoice for the new period to remain there and still be charged later. Now s2Member Pro attempts to find a draft or open invoice for the subscription being cancelled, and void it. Thanks Alan for reporting it. See [post 8386](https://f.wpsharks.com/t/8098).
s2member.php CHANGED
@@ -20,8 +20,8 @@
20
  */
21
  /* -- This section for WordPress parsing. ------------------------------------------------------------------------------
22
 
23
- Version: 210208
24
- Stable tag: 210208
25
 
26
  SSL Compatible: yes
27
  bbPress Compatible: yes
@@ -36,7 +36,7 @@ PayPal Pro Compatible: yes w/s2Member Pro
36
  Authorize.Net Compatible: yes w/s2Member Pro
37
  ClickBank Compatible: yes w/s2Member Pro
38
 
39
- Tested up to: 5.7-alpha
40
  Requires at least: 4.2
41
 
42
  Requires PHP: 5.6.2
@@ -77,7 +77,7 @@ if(!defined('WPINC')) // MUST have WordPress.
77
  *
78
  * @var string
79
  */
80
- ${__FILE__}['tmp'] = '210208'; //version//
81
  if(!defined('WS_PLUGIN__S2MEMBER_VERSION'))
82
  define('WS_PLUGIN__S2MEMBER_VERSION', ${__FILE__}['tmp']);
83
  /**
@@ -110,7 +110,7 @@ if(!defined('WS_PLUGIN__S2MEMBER_MIN_WP_VERSION'))
110
  *
111
  * @var string
112
  */
113
- ${__FILE__}['tmp'] = '210208'; //version//
114
  if(!defined('WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION'))
115
  define('WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION', ${__FILE__}['tmp']);
116
  /*
20
  */
21
  /* -- This section for WordPress parsing. ------------------------------------------------------------------------------
22
 
23
+ Version: 210526
24
+ Stable tag: 210526
25
 
26
  SSL Compatible: yes
27
  bbPress Compatible: yes
36
  Authorize.Net Compatible: yes w/s2Member Pro
37
  ClickBank Compatible: yes w/s2Member Pro
38
 
39
+ Tested up to: 5.7-RC3-50511
40
  Requires at least: 4.2
41
 
42
  Requires PHP: 5.6.2
77
  *
78
  * @var string
79
  */
80
+ ${__FILE__}['tmp'] = '210526'; //version//
81
  if(!defined('WS_PLUGIN__S2MEMBER_VERSION'))
82
  define('WS_PLUGIN__S2MEMBER_VERSION', ${__FILE__}['tmp']);
83
  /**
110
  *
111
  * @var string
112
  */
113
+ ${__FILE__}['tmp'] = '210526'; //version//
114
  if(!defined('WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION'))
115
  define('WS_PLUGIN__S2MEMBER_MIN_PRO_VERSION', ${__FILE__}['tmp']);
116
  /*
src/includes/classes/sc-gets-in.inc.php CHANGED
@@ -79,7 +79,7 @@ if(!class_exists('c_ws_plugin__s2member_sc_gets_in'))
79
  $get = c_ws_plugin__s2member_utils_users::get_user_field($attr['user_field'], (int)$attr['user_id'], $user_field_args);
80
 
81
  if(preg_match('/time$/i', $attr['user_field']) && $attr['date_format'])
82
- if(is_numeric($get) && strlen($get) === 10) // Timestamp?
83
  {
84
  if($attr['date_format'] === 'timestamp')
85
  $get = (string)$get; // No change.
@@ -95,7 +95,7 @@ if(!class_exists('c_ws_plugin__s2member_sc_gets_in'))
95
  $get = get_user_option($attr['user_option'], (int)$attr['user_id']);
96
 
97
  if(preg_match('/time$/i', $attr['user_option']) && $attr['date_format'])
98
- if(is_numeric($get) && strlen($get) === 10) // Timestamp?
99
  {
100
  if($attr['date_format'] === 'timestamp')
101
  $get = (string)$get; // No change.
79
  $get = c_ws_plugin__s2member_utils_users::get_user_field($attr['user_field'], (int)$attr['user_id'], $user_field_args);
80
 
81
  if(preg_match('/time$/i', $attr['user_field']) && $attr['date_format'])
82
+ if((is_numeric($get) && strlen($get) === 10) || ($get = strtotime($get))) // Timestamp?
83
  {
84
  if($attr['date_format'] === 'timestamp')
85
  $get = (string)$get; // No change.
95
  $get = get_user_option($attr['user_option'], (int)$attr['user_id']);
96
 
97
  if(preg_match('/time$/i', $attr['user_option']) && $attr['date_format'])
98
+ if((is_numeric($get) && strlen($get) === 10) || ($get = strtotime($get))) // Timestamp?
99
  {
100
  if($attr['date_format'] === 'timestamp')
101
  $get = (string)$get; // No change.
src/includes/menu-pages/menu-pages-s.min.js CHANGED
@@ -1,2 +1,2 @@
1
  jQuery(document).ready(function($){var esc_attr=esc_html=function(e){return/[&\<\>"']/.test(e=String(e))&&(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/"/g,"&quot;").replace(/'/g,"&#039;")),e};if(ws_plugin__s2member_generateSecurityKey=function(e){e||(e="#ws-plugin--s2member-sec-encryption-key");for(var t=function(e,t){return e=arguments.length<1?0:e,t=arguments.length<2?2147483647:t,Math.floor(Math.random()*(t-e+1))+e},s="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#%^&*()",l=0,r="";l<64;l++)r+=s.substr(t(0,s.length-1),1);return $(e).val(r),!1},location.href.match(/page\=ws-plugin--s2member/)&&$("input.ws-plugin--s2member-update-roles-button, input.ws-plugin--s2member-reset-roles-button").click(function(){var e=$(this);e.val("one moment please ...");var t='<?php echo (int)$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; ?>',s=e.hasClass("ws-plugin--s2member-reset-roles-button")?"Reset":"Update";return $.post(ajaxurl,{action:"ws_plugin__s2member_update_roles_via_ajax",ws_plugin__s2member_update_roles_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-update-roles-via-ajax")); ?>'},function(l){"1"===l?(alert("s2Member's Roles/Capabilities "+("reset"===s.toLowerCase()?"have been successfully reset":"updated successfully")+".\nYour installation of s2Member has Membership Levels 0-"+t+"."),e.val(s+" Roles/Capabilities")):"l"===l?(alert("Sorry, your request failed.\ns2Member's Roles/Capabilities are locked by Filter:\nws_plugin__s2member_lock_roles_caps"),e.val(s+" Roles/Capabilities")):(alert("Sorry, your request failed.\nAccess denied. Do you have the ability to `create_users`?"),e.val(s+" Roles/Capabilities"))}),!1}),location.href.match(/page\=ws-plugin--s2member-logs/)){$("input#ws-plugin--s2member-gateway-debug-logs-extensive-1").click(function(){var e=($(this),!!this.checked);e&&$("input#ws-plugin--s2member-gateway-debug-logs-1").attr("checked","checked")});var $toggles=$("a.ws-plugin--s2member-log-file-viewport-toggle");$toggles.click(function(){return $("textarea#ws-plugin--s2member-log-file-viewer").each(function(){var e=$(this);"expanded"!==e.attr("data-state")?(e.css({height:e.prop("scrollHeight")+50+"px","overflow-y":"auto"}),$toggles.html("&#8657; normalize viewport &#10073;"),e.attr("data-state","expanded")):(e.css({height:"auto","overflow-y":"scroll"}),$toggles.html("&#8659; expand viewport &#8659;"),e.attr("data-state","scrolling"))}),!1})}if(location.href.match(/page\=ws-plugin--s2member-mms-ops/)&&($("select#ws-plugin--s2member-mms-registration-file").change(function(){if("wp-signup"===$(this).val()){var e=$("select#ws-plugin--s2member-mms-registration-grants").val(),t=$("input#ws-plugin--s2member-mms-registration-blogs-level0").val();$("div#ws-plugin--s2member-mms-registration-support-package-details-wrapper").show(),$("div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login").hide(),$("div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup").show(),$("div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0")["all"===e?"show":"hide"](),$("input#ws-plugin--s2member-mms-registration-blogs-level0").val("all"===e?t>0?t:"1":"0")}else if("wp-login"===$(this).val()){var e=$("select#ws-plugin--s2member-mms-registration-grants").val(),t=$("input#ws-plugin--s2member-mms-registration-blogs-level0").val();$("div#ws-plugin--s2member-mms-registration-support-package-details-wrapper").hide(),$("div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login").show(),$("div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup").hide(),$("div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0").hide(),$("input#ws-plugin--s2member-mms-registration-blogs-level0").val("0")}}).trigger("change"),$("select#ws-plugin--s2member-mms-registration-grants").change(function(){$("select#ws-plugin--s2member-mms-registration-file").trigger("change")})),location.href.match(/page\=ws-plugin--s2member-gen-ops/)&&(ws_plugin__s2member_enableSecurityKey=function(){return confirm("Edit Key? Are you sure?\nThis could break your installation!\n\n*Note* If you've been testing s2Member, feel free to change this Key before you go live. Just don't go live, and then change it. You'll have unhappy Customers. Data corruption WILL occur! For your safety, s2Member keeps a history of the last 10 Keys that you've used. If you get yourself into a real situation, s2Member will let you revert back to a previous Key.")&&$("input#ws-plugin--s2member-sec-encryption-key").removeAttr("disabled"),!1},ws_plugin__s2member_securityKeyHistory=function(){return $("div#ws-plugin--s2member-sec-encryption-key-history").toggle(),!1},$("select#ws-plugin--s2member-new-user-emails-enabled").change(function(){var e=$("input#ws-plugin--s2member-pluggables-wp-new-user-notification"),t=$(this),s=$("div#ws-plugin--s2member-new-user-emails");"0"===e.val()||"0"===t.val()?("0"===e.val()?t.attr("disabled","disabled"):t.removeAttr("disabled"),$(":input",s).attr("disabled","disabled"),s.css("opacity","0.5")):(t.removeAttr("disabled"),$(":input",s).removeAttr("disabled"),s.css("opacity",""))}).trigger("change"),$("select#ws-plugin--s2member-login-reg-design-enabled").change(function(){var e=$(this),t=$("div#ws-plugin--s2member-login-reg-design");"0"===e.val()?($(":input",t).attr("disabled","disabled"),t.css("opacity","0.5"),t.hide()):($(":input",t).removeAttr("disabled"),t.css("opacity",""),t.show())}).trigger("change"),$("select#ws-plugin--s2member-custom-reg-password").change(function(){var e=$(this),t=$("div#ws-plugin--s2member-new-user-email-details");"1"===e.val()?t.css("opacity","0.5"):t.css("opacity","")}).trigger("change"),$("input#ws-plugin--s2member-custom-reg-fields").length&&$("div#ws-plugin--s2member-custom-reg-field-configuration").length&&!function(){var e,t,s,l,r,o,a=$("input#ws-plugin--s2member-custom-reg-fields"),i=$("div#ws-plugin--s2member-custom-reg-field-configuration"),n=a.val()?$.JSON.parse(a.val()):[];for(n=n instanceof Array?n:[],t={section:"no",sectitle:"",id:"",label:"",type:"text",deflt:"",options:"",expected:"",required:"yes",levels:"all",editable:"yes",classes:"",styles:"",attrs:""},e=0;e<n.length;e++)n[e]=$.extend(!0,{},t,n[e]);s='<div id="ws-plugin--s2member-custom-reg-field-configuration-tools"></div>',l='<table id="ws-plugin--s2member-custom-reg-field-configuration-table"></table>',i.html(s+l),r=$("div#ws-plugin--s2member-custom-reg-field-configuration-tools"),o=$("table#ws-plugin--s2member-custom-reg-field-configuration-table"),ws_plugin__s2member_customRegFieldSectionChange=function(e){var t=$(e).val(),s="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle";"yes"===t?$(s).css("display",""):$(s).css("display","none")},ws_plugin__s2member_customRegFieldTypeChange=function(e){var t=$(e).val(),s="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt",l="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-options",r="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected";t.match(/^(text|textarea)$/)?$(s).css("display",""):$(s).css("display","none"),t.match(/^(select|selects|checkboxes|radios)$/)?$(l).css("display",""):$(l).css("display","none"),t.match(/^(text|textarea)$/)?$(r).css("display",""):$(r).css("display","none")},ws_plugin__s2member_customRegFieldDelete=function(e){for(var t=new Array,s=0;s<n.length;s++)s!==e&&t.push(n[s]);n=t,m(),b()},ws_plugin__s2member_customRegFieldMoveUp=function(e){if("object"==typeof n[e]&&"object"==typeof n[e-1]){var t=n[e-1],s=n[e];n[e-1]=s,n[e]=t,m(),b()}},ws_plugin__s2member_customRegFieldMoveDown=function(e){if("object"==typeof n[e]&&"object"==typeof n[e+1]){var t=n[e+1],s=n[e];n[e+1]=s,n[e]=t,m(),b()}},ws_plugin__s2member_customRegFieldCreate=function(){var e=$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form"),t={};$(":input[property]",e).each(function(){var e=$(this),s=e.attr("property"),l=$.trim(e.val());t[s]=l}),(t=c(t))&&(n.push(t),m(),g(),b(),d(),setTimeout(function(){"tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-"+(n.length-1);alert('Field created successfully.\n* Remember to "Save All Changes".')},500))},ws_plugin__s2member_customRegFieldUpdate=function(e){var t=$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form"),s={};$(":input[property]",t).each(function(){var e=$(this),t=e.attr("property"),l=$.trim(e.val());s[t]=l}),(s=c(s,e))&&(n[e]=s,m(),g(),b(),d(),setTimeout(function(){alert('Field updated successfully.\n* Remember to "Save All Changes".')},500))},ws_plugin__s2member_customRegFieldAdd=function(){g(!0)},ws_plugin__s2member_customRegFieldEdit=function(e){g(!1,e),d()},ws_plugin__s2member_customRegFieldCancel=function(){g(),d()};var c=function(e,s){var l,r,o="number"==typeof s&&"object"==typeof n[s],a=[];if("object"!=typeof e||"object"!=typeof(e=$.extend(!0,{},t,e)))return alert("Invalid field object. Please try again."),!1;if(e.sectitle="yes"===e.section?e.sectitle:"",e.deflt=e.type.match(/^(text|textarea)$/)?e.deflt:"",e.deflt=e.type.match(/^(text)$/)?e.deflt.replace(/[\r\n\t ]+/g," "):e.deflt,e.options=e.type.match(/^(select|selects|checkboxes|radios)$/)?e.options:"",e.expected=e.type.match(/^(text|textarea)$/)?e.expected:"",e.id?!u(e.id)||o&&e.id===n[s].id||a.push("Unique Field ID:\nThat Field ID already exists. Please try again."):a.push("Unique Field ID:\nThis is required. Please try again."),e.label||a.push("Field Label/Description:\nThis is required. Please try again."),e.type.match(/^(select|selects|checkboxes|radios)$/)&&!e.options)a.push("Option Configuration File:\nThis is required. Please try again.");else if(e.type.match(/^(select|selects|checkboxes|radios)$/)){for(r=0;r<(l=e.options.split(/[\r\n]+/)).length;r++)if(!(l[r]=$.trim(l[r])).match(/^([^\|]*)(\|)([^\|]*)(\|default)?$/)){a.push("Option Configuration File:\nInvalid configuration at line #"+(r+1)+".");break}e.options=$.trim(l.join("\n"))}return(e.levels=e.levels.replace(/ /g,""))?e.levels.match(/^(all|[0-9,]+)$/)||a.push("Applicable Levels:\nShould be comma-delimited Levels, or just type: all.\n(examples: 0,1,2,3,4 or type the word: all)"):a.push("Applicable Levels:\nThis is required. Please try again."),e.classes&&e.classes.match(/[^a-z 0-9 _ \-]/i)&&a.push("CSS Classes:\nContains invalid characters. Please try again.\n(only: alphanumerics, underscores, hyphens, spaces)"),e.styles&&e.styles.match(/["\=\>\<]/)&&a.push('CSS Styles:\nContains invalid characters. Please try again.\n(do NOT use these characters: = " < >)'),e.attrs&&e.attrs.match(/[\>\<]/)&&a.push("Other Attributes:\nContains invalid characters. Please try again.\n(do NOT use these characters: < >)"),a.length>0?(alert(a.join("\n\n")),!1):e},m=function(){a.val(n.length>0?$.JSON.stringify(n):"")},p=function(e){var t={text:"Text (single line)",textarea:"Textarea (multi-line)",select:"Select Menu (drop-down)",selects:"Select Menu (multi-option)",checkbox:"Checkbox (single)",pre_checkbox:"Checkbox (pre-checked)",checkboxes:"Checkboxes (multi-option)",radios:"Radio Buttons (multi-option)"};return"string"==typeof t[e]?t[e]:""},u=function(e){for(var t=0;t<n.length;t++)if(n[t].id===e)return!0},d=function(){scrollTo(0,$("div.ws-plugin--s2member-custom-reg-fields-section").offset().top-100)},g=function(e,s){var l=0,o="",a="",i="number"==typeof s&&"object"==typeof n[s],c=!(!e&&!i),m=i?$.extend(!0,{},t,n[s]):t;if(o+='<a href="#" onclick="ws_plugin__s2member_customRegFieldAdd(); return false;">Add New Field</a>',tb_remove(),$("div#ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form").remove(),c){for(a+='<div id="ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form">',a+='<table id="ws-plugin--s2member-custom-reg-field-configuration-tools-form">',a+="<tbody>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">Starts A New Section?</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">',a+='<td colspan="2">',a+='<select property="section" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section" onchange="ws_plugin__s2member_customRegFieldSectionChange(this);">',a+='<option value="no"'+("no"===m.section?' selected="selected"':"")+'">No (this Field flows normally)</option>',a+='<option value="yes"'+("yes"===m.section?' selected="selected"':"")+'">Yes (this Field begins a new section)</option>',a+="</select><br />",a+="<small>Optional. Allows Fields to be grouped into sections.</small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"'+("yes"===m.section?"":' style="display:none;"')+'><td colspan="2"><hr /></td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"'+("yes"===m.section?"":' style="display:none;"')+">",a+='<td colspan="2">',a+="Title for this new section? (optional)<br />",a+='<input type="text" property="sectitle" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle" value="'+esc_attr(m.sectitle)+'" /><br />',a+="<small>If empty, a simple divider will be used by default.</small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-type"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">Form Field Type: *</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">',a+='<td colspan="2">',a+='<select property="type" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type" onchange="ws_plugin__s2member_customRegFieldTypeChange(this);">',a+='<option value="text"'+("text"===m.type?' selected="selected"':"")+'">'+esc_html(p("text"))+"</option>",a+='<option value="textarea"'+("textarea"===m.type?' selected="selected"':"")+'">'+esc_html(p("textarea"))+"</option>",a+='<option value="select"'+("select"===m.type?' selected="selected"':"")+'">'+esc_html(p("select"))+"</option>",a+='<option value="selects"'+("selects"===m.type?' selected="selected"':"")+'">'+esc_html(p("selects"))+"</option>",a+='<option value="checkbox"'+("checkbox"===m.type?' selected="selected"':"")+'">'+esc_html(p("checkbox"))+"</option>",a+='<option value="pre_checkbox"'+("pre_checkbox"===m.type?' selected="selected"':"")+'">'+esc_html(p("pre_checkbox"))+"</option>",a+='<option value="checkboxes"'+("checkboxes"===m.type?' selected="selected"':"")+'">'+esc_html(p("checkboxes"))+"</option>",a+='<option value="radios"'+("radios"===m.type?' selected="selected"':"")+'">'+esc_html(p("radios"))+"</option>",a+="</select><br />",a+="<small>The options below may change, based on the Field Type you choose here.</small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-label"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">Field Label/Desc: *</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">',a+='<td colspan="2">',a+='<input type="text" property="label" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label" value="'+esc_attr(m.label)+'" /><br />',a+="<small>Examples: <code>Choose Country</code>, <code>Street Address</code></small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-id"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">Unique Field ID: *</label></label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">',a+='<td colspan="2">',a+='<input type="text" property="id" maxlength="25" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id" value="'+esc_attr(m.id)+'" /><br />',a+="<small>Examples: <code>country_code</code>, <code>street_address</code></small><br />",a+='<small>e.g., <code>[s2Get user_field="country_code" /]</code></small>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-required"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">Field Required: *</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">',a+='<td colspan="2">',a+='<select property="required" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">',a+='<option value="yes"'+("yes"===m.required?' selected="selected"':"")+'">Yes (required)</option>',a+='<option value="no"'+("no"===m.required?' selected="selected"':"")+'">No (optional)</option>',a+="</select><br />",a+='<small>If <code>yes</code>, only Users/Members will be "required" to enter this field.</small><br />',a+="<small>* Administrators are exempt from this requirement.</small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+(m.type.match(/^(text|textarea)$/)?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+(m.type.match(/^(text|textarea)$/)?"":' style="display:none;"')+">",a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt">Default Text Value: (optional)</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+(m.type.match(/^(text|textarea)$/)?"":' style="display:none;"')+">",a+='<td colspan="2">',a+='<textarea property="deflt" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt" rows="1">'+esc_html(m.deflt)+"</textarea><br />",a+="<small>Default value before user input is received.</small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+(m.type.match(/^(select|selects|checkboxes|radios)$/)?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+(m.type.match(/^(select|selects|checkboxes|radios)$/)?"":' style="display:none;"')+">",a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options">Option Configuration File: * (one option per line)</label><br />',a+="<small>Use a pipe <code>|</code> delimited format: <code>option value|option label</code></small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+(m.type.match(/^(select|selects|checkboxes|radios)$/)?"":' style="display:none;"')+">",a+='<td colspan="2">',a+='<textarea property="options" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options" rows="3">'+esc_html(m.options)+"</textarea><br />",a+="Here is a quick example:<br />",a+="<small>You can also specify a <em>default</em> option:</small><br />",a+="<code>US|United States|default</code><br />",a+="<code>CA|Canada</code><br />",a+="<code>VI|Virgin Islands (U.S.)</code>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+(m.type.match(/^(text|textarea)$/)?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+(m.type.match(/^(text|textarea)$/)?"":' style="display:none;"')+">",a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected">Expected Format: *</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+(m.type.match(/^(text|textarea)$/)?"":' style="display:none;"')+">",a+='<td colspan="2">',a+='<select property="expected" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected">',a+='<option value=""'+(""===m.expected?' selected="selected"':"")+'">Anything Goes</option>',a+='<option disabled="disabled"></option>',a+='<optgroup label="Specific Input Types">',a+='<option value="numeric-wp-commas"'+("numeric-wp-commas"===m.expected?' selected="selected"':"")+'">Numeric (with or without decimals, commas allowed)</option>',a+='<option value="numeric"'+("numeric"===m.expected?' selected="selected"':"")+'">Numeric (with or without decimals, no commas)</option>',a+='<option value="integer"'+("integer"===m.expected?' selected="selected"':"")+'">Integer (whole number, without any decimals)</option>',a+='<option value="integer-gt-0"'+("integer-gt-0"===m.expected?' selected="selected"':"")+'">Integer > 0 (whole number, no decimals, greater than 0)</option>',a+='<option value="float"'+("float"===m.expected?' selected="selected"':"")+'">Float (floating point number, decimals required)</option>',a+='<option value="float-gt-0"'+("float-gt-0"===m.expected?' selected="selected"':"")+'">Float > 0 (floating point number, decimals required, greater than 0)</option>',a+='<option value="date"'+("date"===m.expected?' selected="selected"':"")+'">Date (required date format: dd/mm/yyyy)</option>',a+='<option value="email"'+("email"===m.expected?' selected="selected"':"")+'">Email (require valid email)</option>',a+='<option value="url"'+("url"===m.expected?' selected="selected"':"")+'">Full URL (starting with http or https)</option>',a+='<option value="domain"'+("domain"===m.expected?' selected="selected"':"")+'">Domain Name (domain name only, without http)</option>',a+='<option value="phone"'+("phone"===m.expected?' selected="selected"':"")+'">Phone # (10 digits w/possible hyphens,spaces,brackets)</option>',a+='<option value="uszip"'+("uszip"===m.expected?' selected="selected"':"")+'">US Zipcode (5-9 digits w/possible hyphen)</option>',a+='<option value="cazip"'+("cazip"===m.expected?' selected="selected"':"")+'">Canadian Zipcode (6 alpha-numerics w/possible space)</option>',a+='<option value="uczip"'+("uczip"===m.expected?' selected="selected"':"")+'">US/Canadian Zipcode (either a US or Canadian zipcode)</option>',a+="</optgroup>",a+='<option disabled="disabled"></option>',a+='<optgroup label="Any Character Combination">',l=1;l<=25;l++)a+='<option value="any-'+l+'"'+(m.expected==="any-"+l?' selected="selected"':"")+'">Any Character Combination ('+l+" character minimum)</option>",a+='<option value="any-'+l+'-e"'+(m.expected==="any-"+l+"-e"?' selected="selected"':"")+'">Any Character Combination (exactly '+l+" character"+(l>1?"s":"")+")</option>";for(a+="</optgroup>",a+='<option disabled="disabled"></option>',a+='<optgroup label="Alphanumerics, Spaces &amp; Punctuation Only">',l=1;l<=25;l++)a+='<option value="alphanumerics-spaces-punctuation-'+l+'"'+(m.expected==="alphanumerics-spaces-punctuation-"+l?' selected="selected"':"")+'">Alphanumerics, Spaces &amp; Punctuation ('+l+" character minimum)</option>",a+='<option value="alphanumerics-spaces-punctuation-'+l+'-e"'+(m.expected==="alphanumerics-spaces-punctuation-"+l+"-e"?' selected="selected"':"")+'">Alphanumerics, Spaces &amp; Punctuation (exactly '+l+" character"+(l>1?"s":"")+")</option>";for(a+="</optgroup>",a+='<option disabled="disabled"></option>',a+='<optgroup label="Alphanumerics &amp; Spaces Only">',l=1;l<=25;l++)a+='<option value="alphanumerics-spaces-'+l+'"'+(m.expected==="alphanumerics-spaces-"+l?' selected="selected"':"")+'">Alphanumerics &amp; Spaces ('+l+" character minimum)</option>",a+='<option value="alphanumerics-spaces-'+l+'-e"'+(m.expected==="alphanumerics-spaces-"+l+"-e"?' selected="selected"':"")+'">Alphanumerics &amp; Spaces (exactly '+l+" character"+(l>1?"s":"")+")</option>";for(a+="</optgroup>",a+='<option disabled="disabled"></option>',a+='<optgroup label="Alphanumerics &amp; Punctuation Only">',l=1;l<=25;l++)a+='<option value="alphanumerics-punctuation-'+l+'"'+(m.expected==="alphanumerics-punctuation-"+l?' selected="selected"':"")+'">Alphanumerics &amp; Punctuation ('+l+" character minimum)</option>",a+='<option value="alphanumerics-punctuation-'+l+'-e"'+(m.expected==="alphanumerics-punctuation-"+l+"-e"?' selected="selected"':"")+'">Alphanumerics &amp; Punctuation (exactly '+l+" character"+(l>1?"s":"")+")</option>";for(a+="</optgroup>",a+='<option disabled="disabled"></option>',a+='<optgroup label="Alphanumerics Only">',l=1;l<=25;l++)a+='<option value="alphanumerics-'+l+'"'+(m.expected==="alphanumerics-"+l?' selected="selected"':"")+'">Alphanumerics ('+l+" character minimum)</option>",a+='<option value="alphanumerics-'+l+'-e"'+(m.expected==="alphanumerics-"+l+"-e"?' selected="selected"':"")+'">Alphanumerics (exactly '+l+" character"+(l>1?"s":"")+")</option>";for(a+="</optgroup>",a+='<option disabled="disabled"></option>',a+='<optgroup label="Alphabetics Only">',l=1;l<=25;l++)a+='<option value="alphabetics-'+l+'"'+(m.expected==="alphabetics-"+l?' selected="selected"':"")+'">Alphabetics ('+l+" character minimum)</option>",a+='<option value="alphabetics-'+l+'-e"'+(m.expected==="alphabetics-"+l+"-e"?' selected="selected"':"")+'">Alphabetics (exactly '+l+" character"+(l>1?"s":"")+")</option>";for(a+="</optgroup>",a+='<option disabled="disabled"></option>',a+='<optgroup label="Numeric Digits Only">',l=1;l<=25;l++)a+='<option value="numerics-'+l+'"'+(m.expected==="numerics-"+l?' selected="selected"':"")+'">Numeric Digits ('+l+" digit minimum)</option>",a+='<option value="numerics-'+l+'-e"'+(m.expected==="numerics-"+l+"-e"?' selected="selected"':"")+'">Numeric Digits (exactly '+l+" digit"+(l>1?"s":"")+")</option>";a+="</optgroup>",a+="</select><br />",a+="<small>Only Users/Members will be required to meet this criteria.</small><br />",a+="<small>* Administrators are exempt from this.</small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">Applicable Membership Levels: *</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">',a+='<td colspan="2">',a+='<input type="text" property="levels" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels" value="'+esc_attr(m.levels)+'" /><br />',a+="<small>Please use comma-delimited Level #'s: <code>0,1,2,3,4</code> or type: <code>all</code>.</small><br />",a+="<small>This allows you to enable this field - only at specific Membership Levels.</small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">Allow Profile Edits: *</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">',a+='<td colspan="2">',a+='<select property="editable" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">',a+='<option value="yes"'+("yes"===m.editable?' selected="selected"':"")+'">Yes (editable)</option>',a+='<option value="no"'+("no"===m.editable?' selected="selected"':"")+'">No (uneditable after registration)</option>',a+='<option value="no-invisible"'+("no-invisible"===m.editable?' selected="selected"':"")+'">No (uneditable &amp; totally invisible after registration)</option>',a+='<option value="no-always-invisible"'+("no-always-invisible"===m.editable?' selected="selected"':"")+'">No (uneditable &amp; totally invisible, both during &amp; after registration)</option>',a+='<option value="yes-invisible"'+("yes-invisible"===m.editable?' selected="selected"':"")+'">Yes (editable after registration / invisible during registration)</option>',a+="</select><br />",a+="<small>If <code>No</code>, this field will be un-editable after registration.</small><br />",a+="<small>* Administrators are exempt from this.</small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">CSS Classes: (optional)</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">',a+='<td colspan="2">',a+='<input type="text" property="classes" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes" value="'+esc_attr(m.classes)+'" /><br />',a+="<small>Example: <code>my-style-1 my-style-2</code></small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">CSS Styles: (optional)</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">',a+='<td colspan="2">',a+='<input type="text" property="styles" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles" value="'+esc_attr(m.styles)+'" /><br />',a+="<small>Example: <code>color:#000000; background:#FFFFFF;</code></small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">Other Attributes: (optional)</label>',
2
- a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">',a+='<td colspan="2">',a+='<input type="text" property="attrs" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs" value="'+esc_attr(m.attrs)+'" /><br />',a+='<small>Example: <code>onkeyup="" onblur=""</code></small>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-buttons"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-buttons">',a+='<td align="left">',a+='<input type="button" value="Cancel" onclick="ws_plugin__s2member_customRegFieldCancel();" />',a+="</td>",a+='<td align="right">',a+='<input type="button" value="'+(i?"Update This Field":"Create Registration Field")+'" onclick="'+(i?"ws_plugin__s2member_customRegFieldUpdate("+s+");":"ws_plugin__s2member_customRegFieldCreate();")+'" />',a+="</td>",a+="</tr>",a+="</tbody>",a+="</table>",a+="<div>",$("body").append(a),tb_show(i?"Editing Registration/Profile Field":"New Custom Registration/Profile Field","#TB_inline?inlineId=ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form"),$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form").show()}r.html(o)},b=function(){var e=(n.length,0),t="",s="o";if(t+="<tbody>",t+="<tr>",t+="<th>Order</th>",t+="<th>Field Type</th>",t+="<th>Unique ID</th>",t+="<th>Required</th>",t+="<th>Levels</th>",t+="<th>- Tools -</th>",t+="</tr>",n.length>0)for(e=0;e<n.length;e++)t+='<tr class="'+esc_attr(s="o"===s?"e":"o")+("yes"===n[e].section?" s":"")+" ws-plugin--s2member-custom-reg-field-configuration-table-row-"+e+'">',t+='<td nowrap="nowrap"><a class="ws-plugin--s2member-custom-reg-field-configuration-move-up" href="#" onclick="ws_plugin__s2member_customRegFieldMoveUp('+e+'); return false;"></a><a class="ws-plugin--s2member-custom-reg-field-configuration-move-down" href="#" onclick="ws_plugin__s2member_customRegFieldMoveDown('+e+'); return false;"></a></td>',t+='<td nowrap="nowrap">'+esc_html(p(n[e].type))+"</td>",t+='<td nowrap="nowrap">'+esc_html(n[e].id)+"</td>",t+='<td nowrap="nowrap">'+esc_html(n[e].required)+"</td>",t+='<td nowrap="nowrap">'+esc_html(n[e].levels)+"</td>",t+='<td nowrap="nowrap"><a class="ws-plugin--s2member-custom-reg-field-configuration-edit" href="#" onclick="ws_plugin__s2member_customRegFieldEdit('+e+'); return false;"></a><a class="ws-plugin--s2member-custom-reg-field-configuration-delete" href="#" onclick="ws_plugin__s2member_customRegFieldDelete('+e+'); return false;"></a></td>',t+="</tr>";else t+="<tr>",t+='<td colspan="6">No Custom Fields are configured.</td>',t+="</tr>";t+="</tbody>",o.html(t)};g(),b()}()),location.href.match(/page\=ws-plugin--s2member-res-ops/)&&($("input#ws-plugin--s2member-brute-force-restrictions-reset-button").click(function(){var e=$(this);return e.val("one moment please ..."),$.post(ajaxurl,{action:"ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax",ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'},function(t){alert("s2Member's Brute Force Restriction Logs have all been reset."),e.val("Reset Brute Force Logs")}),!1}),$("input#ws-plugin--s2member-ip-restrictions-reset-button").click(function(){var e=$(this);return e.val("one moment please ..."),$.post(ajaxurl,{action:"ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax",ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'},function(t){alert("s2Member's IP Restriction Logs have all been reset."),e.val("Reset IP Restriction Logs")}),!1}),$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query[]"]').change(function(){var e=$(this).val();$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query[]"]').each(function(){var t=$(this),s=t.val(),l='input[type="checkbox"]';"all"===s&&this.checked?t.nextAll(l).attr({checked:"checked",disabled:"disabled"}):"all"!==s||this.checked||(t.nextAll(l).removeAttr("disabled"),"all"===e?t.nextAll(l).removeAttr("checked"):null)})}).last().trigger("change")),location.href.match(/page\=ws-plugin--s2member-down-ops/)){var updateCloudFrontPrivateKey=function(){var e=$("input#ws-plugin--s2member-amazon-cf-files-private-key"),t=$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry"),s=$.trim(e.val()),l=$.trim(t.val());(s&&!l||l.match(/[^\r\n\u25CF]/))&&(e.val(l),t.val(l.replace(/[^\r\n]/g,String.fromCharCode(9679))))};$("form#ws-plugin--s2member-options-form").submit(updateCloudFrontPrivateKey),$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry").change(updateCloudFrontPrivateKey).trigger("change");var updateCloudFrontDistroCfgs=function(){var e=$("input#ws-plugin--s2member-amazon-cf-files-private-key"),t=$("input#ws-plugin--s2member-amazon-cf-files-private-key-id"),s=$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros"),l=$("input#ws-plugin--s2member-amazon-cf-files-distros-auto-config-status"),r=$.trim(l.val()),o=$.trim(e.val()),a=$.trim(t.val()),i=$.trim(e.attr("data-s-prev-config-value")),n=$.trim(t.attr("data-s-prev-config-value"));"configured"===r&&(n&&a!==n||i&&o!==i)?(alert("s2Member will need to delete and re-configure your Amazon CloudFront distributions if you change this. When you're done editing, click (Save All Changes) below."),s.attr("checked","checked")):"configured"!==r&&a&&o&&(alert("s2Member will need to auto-configure your Amazon CloudFront distributions for you. When you're done editing, click (Save All Changes) below."),s.attr("checked","checked"))};$("input#ws-plugin--s2member-amazon-cf-files-private-key-id").change(updateCloudFrontDistroCfgs),$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry").change(updateCloudFrontDistroCfgs),$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros-w-cnames").change(function(){var e=($(this),!!this.checked),t=$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros"),s=$("div#ws-plugin--s2member-amazon-cf-files-auto-configure-distro-cnames");e?s.show():s.hide(),e?t.attr("checked","checked"):null}).trigger("change")}location.href.match(/page\=ws-plugin--s2member-paypal-ops/)&&$("select#ws-plugin--s2member-auto-eot-system-enabled").change(function(){var e=$(this),t=e.val(),s=$("p#ws-plugin--s2member-auto-eot-system-enabled-via-cron");2==t?s.show():s.hide()}),location.href.match(/page\=ws-plugin--s2member-paypal-buttons/)&&($("div.ws-menu-page select[id]").filter(function(){return this.id.match(/^ws-plugin--s2member-(level[1-9][0-9]*|modification)-term$/)}).change(function(){var e=this.id.replace(/^ws-plugin--s2member-(.+?)-term$/g,"$1"),t="BN"===$(this).val().split("-")[2].replace(/[^0-1BN]/g,"")?1:0;$("p#ws-plugin--s2member-"+e+"-trial-line").css("display",t?"none":""),$("span#ws-plugin--s2member-"+e+"-trial-then").css("display",t?"none":""),$("span#ws-plugin--s2member-"+e+"-20p-rule").css("display",t?"none":""),t?$("input#ws-plugin--s2member-"+e+"-trial-period").val(0):null,t?$("input#ws-plugin--s2member-"+e+"-trial-amount").val("0.00"):null}),$("div.ws-menu-page input[id]").filter(function(){return this.id.match(/^ws-plugin--s2member-(level[1-9][0-9]*|modification|ccap)-ccaps$/)}).keyup(function(){var e=this.value.replace(/^(-all|-al|-a|-)[;,]*/gi,""),t=this.value.match(/^(-all|-al|-a|-)[;,]*/i)?"-all,":"";e.match(/[^a-z_0-9,]/)&&(this.value=t+$.trim($.trim(e).replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase()))}),ws_plugin__s2member_paypalButtonGenerate=function(button){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="",labels={};eval("<?php echo c_ws_plugin__s2member_utils_strings::esc_dq($labels); ?>");var shortCode=$("input#ws-plugin--s2member-"+button+"-shortcode"),code=$("textarea#ws-plugin--s2member-"+button+"-button"),modLevel=$("select#ws-plugin--s2member-modification-level"),level="modification"===button?modLevel.val().split(":",2)[1]:button.replace(/^level/,""),label=labels["level"+level].replace(/"/g,""),desc=$.trim($("input#ws-plugin--s2member-"+button+"-desc").val().replace(/"/g,"")),trialAmount=$("input#ws-plugin--s2member-"+button+"-trial-amount").val().replace(/[^0-9\.]/g,""),trialPeriod=$("input#ws-plugin--s2member-"+button+"-trial-period").val().replace(/[^0-9]/g,""),trialTerm=$("select#ws-plugin--s2member-"+button+"-trial-term").val().replace(/[^A-Z]/g,""),regAmount=$("input#ws-plugin--s2member-"+button+"-amount").val().replace(/[^0-9\.]/g,""),regPeriod=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[0].replace(/[^0-9]/g,""),regTerm=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[1].replace(/[^A-Z]/g,""),regRecur=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[2].replace(/[^0-1BN]/g,""),regRecurTimes="",regRecurRetry="1",localeCode="",digital="0",noShipping="1",pageStyle=$.trim($("input#ws-plugin--s2member-"+button+"-page-style").val().replace(/"/g,"")),currencyCode=$("select#ws-plugin--s2member-"+button+"-currency").val().replace(/[^A-Z]/g,""),cCaps=$.trim($.trim($("input#ws-plugin--s2member-"+button+"-ccaps").val()).replace(/^(-all|-al|-a|-)[;,]*/gi,"").replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());cCaps=$.trim($("input#ws-plugin--s2member-"+button+"-ccaps").val()).match(/^(-all|-al|-a|-)[;,]*/i)?(cCaps?"-all,":"-all")+cCaps.toLowerCase():cCaps.toLowerCase(),trialPeriod="BN"===regRecur?"0":trialPeriod,trialAmount=!trialAmount||isNaN(trialAmount)||trialAmount<.01||trialPeriod<=0?"0":trialAmount;var levelCcapsPer="BN"===regRecur&&"L"!==regTerm?level+":"+cCaps+":"+regPeriod+" "+regTerm:level+":"+cCaps;return levelCcapsPer=levelCcapsPer.replace(/\:+$/g,""),"0"!==trialAmount&&(isNaN(trialAmount)||trialAmount<0)?(alert("— Oops, a slight problem: —\n\nWhen provided, Trial Amount must be >= 0.00"),!1):"0"!==trialAmount&&trialAmount>1e4&&"USD"===currencyCode.toUpperCase()?(alert("— Oops, a slight problem: —\n\nMaximum Trial Amount is: 10000.00"),!1):"D"===trialTerm&&trialPeriod>90?(alert("— Oops, a slight problem: —\n\nMaximum Trial Days is: 90.\nIf you want to offer more than 90 days, please choose Weeks or Months from the drop-down."),!1):"W"===trialTerm&&trialPeriod>52?(alert("— Oops, a slight problem: —\n\nMaximum Trial Weeks is: 52.\nIf you want to offer more than 52 weeks, please choose Months from the drop-down."),!1):"M"===trialTerm&&trialPeriod>24?(alert("— Oops, a slight problem: —\n\nMaximum Trial Months is: 24.\nIf you want to offer more than 24 months, please choose Years from the drop-down."),!1):"Y"===trialTerm&&trialPeriod>5?(alert("— Oops, a slight problem: —\n\nMax Trial Period Years is: 5."),!1):!regAmount||isNaN(regAmount)||regAmount<.01?(alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01"),!1):regAmount>1e4&&"USD"===currencyCode.toUpperCase()?(alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00"),!1):desc?(code.html(code.val().replace(/ \<\!--(\<input type\="hidden" name\="(amount|src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\>)--\>/g," $1")),parseInt(trialPeriod)<=0?code.html(code.val().replace(/ (\<input type\="hidden" name\="(a1|p1|t1)" value\="(.*?)" \/\>)/g," <!--$1-->")):null,"BN"===regRecur?code.html(code.val().replace(/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g," $1_xclick$3")):null,"BN"===regRecur?code.html(code.val().replace(/ (\<input type\="hidden" name\="(src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\>)/g," <!--$1-->")):null,"BN"!==regRecur?code.html(code.val().replace(/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g," $1_xclick-subscriptions$3")):null,"BN"!==regRecur?code.html(code.val().replace(/ (\<input type\="hidden" name\="amount" value\="(.*?)" \/\>)/g," <!--$1-->")):null,shortCodeTemplateAttrs+="modification"===button?'modify="1" ':"",shortCodeTemplateAttrs+='level="'+esc_attr(level)+'" ccaps="'+esc_attr(cCaps)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'" custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"',shortCodeTemplateAttrs+=' ta="'+esc_attr(trialAmount)+'" tp="'+esc_attr(trialPeriod)+'" tt="'+esc_attr(trialTerm)+'" ra="'+esc_attr(regAmount)+'" rp="'+esc_attr(regPeriod)+'" rt="'+esc_attr(regTerm)+'" rr="'+esc_attr(regRecur)+'" rrt="'+esc_attr(regRecurTimes)+'" rra="'+esc_attr(regRecurRetry)+'"',shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs)),code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"')),code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"')),code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"')),code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(levelCcapsPer)+'"')),code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"')),code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"')),code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"')),code.html(code.val().replace(/ name\="modify" value\="(.*?)"/,' name="modify" value="'+("modification"===button?"1":"0")+'"')),code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"')),code.html(code.val().replace(/ name\="src" value\="(.*?)"/,' name="src" value="'+esc_attr(regRecur)+'"')),code.html(code.val().replace(/ name\="srt" value\="(.*?)"/,' name="srt" value="'+esc_attr(regRecurTimes)+'"')),code.html(code.val().replace(/ name\="sra" value\="(.*?)"/,' name="sra" value="'+esc_attr(regRecurRetry)+'"')),code.html(code.val().replace(/ name\="a1" value\="(.*?)"/,' name="a1" value="'+esc_attr(trialAmount)+'"')),code.html(code.val().replace(/ name\="p1" value\="(.*?)"/,' name="p1" value="'+esc_attr(trialPeriod)+'"')),code.html(code.val().replace(/ name\="t1" value\="(.*?)"/,' name="t1" value="'+esc_attr(trialTerm)+'"')),code.html(code.val().replace(/ name\="a3" value\="(.*?)"/,' name="a3" value="'+esc_attr(regAmount)+'"')),code.html(code.val().replace(/ name\="p3" value\="(.*?)"/,' name="p3" value="'+esc_attr(regPeriod)+'"')),code.html(code.val().replace(/ name\="t3" value\="(.*?)"/,' name="t3" value="'+esc_attr(regTerm)+'"')),$("div#ws-plugin--s2member-"+button+"-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round((new Date).getTime())+"~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr (c_ws_plugin__s2member_utils_ip::current())); ?>").replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,"")),"modification"===button?alert("Your Modification Button has been generated.\nPlease copy/paste the Shortcode into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Modification Buttons should be displayed to existing Users/Members, and they should be logged-in, BEFORE clicking this Button."):alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Membership Options Page."),shortCode.each(function(){this.focus(),this.select()}),!1):(alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button."),!1)},ws_plugin__s2member_paypalCcapButtonGenerate=function(){var e='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',t="",s=$("input#ws-plugin--s2member-ccap-shortcode"),l=$("textarea#ws-plugin--s2member-ccap-button"),r=$.trim($("input#ws-plugin--s2member-ccap-desc").val().replace(/"/g,"")),o=$("input#ws-plugin--s2member-ccap-amount").val().replace(/[^0-9\.]/g,""),a=$("select#ws-plugin--s2member-ccap-term").val().split("-")[0].replace(/[^0-9]/g,""),i=$("select#ws-plugin--s2member-ccap-term").val().split("-")[1].replace(/[^A-Z]/g,""),n=$("select#ws-plugin--s2member-ccap-term").val().split("-")[2].replace(/[^0-1BN]/g,""),c="",m="0",p="1",u=$.trim($("input#ws-plugin--s2member-ccap-page-style").val().replace(/"/g,"")),d=$("select#ws-plugin--s2member-ccap-currency").val().replace(/[^A-Z]/g,""),g=$.trim($.trim($("input#ws-plugin--s2member-ccap-ccaps").val()).replace(/^(-all|-al|-a|-)[;,]*/gi,"").replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());g=$.trim($("input#ws-plugin--s2member-ccap-ccaps").val()).match(/^(-all|-al|-a|-)[;,]*/i)?(g?"-all,":"-all")+g.toLowerCase():g.toLowerCase();var b="BN"===n&&"L"!==i?"*:"+g+":"+a+" "+i:"*:"+g;return b=b.replace(/\:+$/g,""),g&&"-all"!==g?!o||isNaN(o)||o<.01?(alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01"),!1):o>1e4&&"USD"===d.toUpperCase()?(alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00"),!1):r?(t+='level="*" ccaps="'+esc_attr(g)+'" desc="'+esc_attr(r)+'" ps="'+esc_attr(u)+'" lc="'+esc_attr(c)+'" cc="'+esc_attr(d)+'" dg="'+esc_attr(m)+'" ns="'+esc_attr(p)+'"',t+=' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="'+esc_attr(o)+'" rp="'+esc_attr(a)+'" rt="'+esc_attr(i)+'" rr="'+esc_attr(n)+'"',s.val(e.replace(/%%attrs%%/,t)),l.html(l.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(c)+'"')),l.html(l.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(p)+'"')),l.html(l.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(r)+'"')),l.html(l.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(b)+'"')),l.html(l.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(u)+'"')),l.html(l.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(d)+'"')),l.html(l.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"')),l.html(l.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(o)+'"')),$("div#ws-plugin--s2member-ccap-button-prev").html(l.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round((new Date).getTime())+"~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr (c_ws_plugin__s2member_utils_ip::current())); ?>").replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,"")),alert("Your Button has been generated.\nPlease copy/paste the Shortcode into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Independent Custom Capability Buttons should ONLY be displayed to existing Users/Members, and they MUST be logged-in, BEFORE clicking this Button."),s.each(function(){this.focus(),this.select()}),!1):(alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button."),!1):(alert("— Oops, a slight problem: —\n\nPlease provide at least one Custom Capability."),!1)},ws_plugin__s2member_paypalSpButtonGenerate=function(){var e='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',t="",s=$("input#ws-plugin--s2member-sp-shortcode"),l=$("textarea#ws-plugin--s2member-sp-button"),r=$("select#ws-plugin--s2member-sp-leading-id").val().replace(/[^0-9]/g,""),o=$("select#ws-plugin--s2member-sp-additional-ids").val()||[],a=$("select#ws-plugin--s2member-sp-hours").val().replace(/[^0-9]/g,""),i=$("input#ws-plugin--s2member-sp-amount").val().replace(/[^0-9\.]/g,""),n=$.trim($("input#ws-plugin--s2member-sp-desc").val().replace(/"/g,"")),c="",m="0",p="1",u=$.trim($("input#ws-plugin--s2member-sp-page-style").val().replace(/"/g,"")),d=$("select#ws-plugin--s2member-sp-currency").val().replace(/[^A-Z]/g,"");if(!r)return alert("— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it's because you've not configured s2Member for Specific Post/Page Access yet. See: s2Member → Restriction Options → Specific Post/Page Access."),!1;if(!i||isNaN(i)||i<.01)return alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01"),!1;if(i>1e4&&"USD"===d.toUpperCase())return alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00"),!1;if(!n)return alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button."),!1;for(var g=0,b=r;g<o.length;g++)o[g]&&o[g]!==r&&(b+=","+o[g]);var f="sp:"+b+":"+a;return t+='sp="1" ids="'+esc_attr(b)+'" exp="'+esc_attr(a)+'" desc="'+esc_attr(n)+'" ps="'+esc_attr(u)+'" lc="'+esc_attr(c)+'" cc="'+esc_attr(d)+'" dg="'+esc_attr(m)+'" ns="'+esc_attr(p)+'"',t+=' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="'+esc_attr(i)+'"',s.val(e.replace(/%%attrs%%/,t)),l.html(l.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(c)+'"')),l.html(l.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(p)+'"')),l.html(l.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(n)+'"')),l.html(l.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(f)+'"')),l.html(l.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(u)+'"')),l.html(l.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(d)+'"')),l.html(l.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"')),l.html(l.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(i)+'"')),$("div#ws-plugin--s2member-sp-button-prev").html(l.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round((new Date).getTime())+"~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr (c_ws_plugin__s2member_utils_ip::current())); ?>").replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,"")),alert("Your Button has been generated.\nPlease copy/paste the Shortcode into your WordPress Editor."),s.each(function(){this.focus(),this.select()}),!1},ws_plugin__s2member_paypalRegLinkGenerate=function(){var e=$("select#ws-plugin--s2member-reg-link-level").val().replace(/[^0-9]/g,""),t=$.trim($("input#ws-plugin--s2member-reg-link-subscr-id").val()),s=$.trim($("input#ws-plugin--s2member-reg-link-custom").val()),l=$.trim($.trim($("input#ws-plugin--s2member-reg-link-ccaps").val()).replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase()),r=$.trim($("input#ws-plugin--s2member-reg-link-fixed-term").val().replace(/[^A-Z 0-9]/gi,"").toUpperCase()),o=$("p#ws-plugin--s2member-reg-link"),a=$("img#ws-plugin--s2member-reg-link-loading"),i=r&&!r.match(/L$/)?e+":"+l+":"+r:e+":"+l;return i=i.replace(/\:+$/g,""),t?s&&0===s.indexOf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq ($_SERVER["HTTP_HOST"]); ?>')?r&&!r.match(/^[1-9]+ (D|W|M|Y|L)$/)?(alert("— Oops, a slight problem: —\n\nThe Fixed Term Length is not formatted properly."),!1):(o.hide(),a.show(),$.post(ajaxurl,{action:"ws_plugin__s2member_reg_access_link_via_ajax",ws_plugin__s2member_reg_access_link_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-reg-access-link-via-ajax")); ?>',s2member_reg_access_link_subscr_gateway:"paypal",s2member_reg_access_link_subscr_id:t,s2member_reg_access_link_custom:s,s2member_reg_access_link_item_number:i},function(e){o.show().html('<a href="'+esc_attr(e)+'" target="_blank" rel="external">'+esc_html(e)+"</a>"),a.hide()}),!1):(alert("— Oops, a slight problem: —\n\nThe Custom Value MUST start with your domain name."),!1):(alert("— Oops, a slight problem: —\n\nPaid Subscr. ID is a required value."),!1)},ws_plugin__s2member_paypalSpLinkGenerate=function(){var e=$("select#ws-plugin--s2member-sp-link-leading-id").val().replace(/[^0-9]/g,""),t=$("select#ws-plugin--s2member-sp-link-additional-ids").val()||[],s=$("select#ws-plugin--s2member-sp-link-hours").val().replace(/[^0-9]/g,""),l=$("p#ws-plugin--s2member-sp-link"),r=$("img#ws-plugin--s2member-sp-link-loading");if(!e)return alert("— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it's because you've not configured s2Member for Specific Post/Page Access yet. See: s2Member → Restriction Options → Specific Post/Page Access."),!1;for(var o=0,a=e;o<t.length;o++)t[o]&&t[o]!==e&&(a+=","+t[o]);return l.hide(),r.show(),$.post(ajaxurl,{action:"ws_plugin__s2member_sp_access_link_via_ajax",ws_plugin__s2member_sp_access_link_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-sp-access-link-via-ajax")); ?>',s2member_sp_access_link_ids:a,s2member_sp_access_link_hours:s},function(e){l.show().html('<a href="'+esc_attr(e)+'" target="_blank" rel="external">'+esc_html(e)+"</a>"),r.hide()}),!1}),location.href.match(/page\=ws-plugin--s2member-els-ops/)&&($("select#ws-plugin--s2member-custom-reg-opt-in").change(function(){var e=$(this),t=e.val(),s=$("tr.ws-plugin--s2member-custom-reg-opt-in-label-row"),l=$("img.ws-plugin--s2member-custom-reg-opt-in-label-prev-img");t<=0?(s.css("display","none"),l.attr("src",l.attr("src").replace(/\/checked\.png$/,"/unchecked.png"))):1==t?(s.css("display",""),l.attr("src",l.attr("src").replace(/\/unchecked\.png$/,"/checked.png"))):2==t&&(s.css("display",""),l.attr("src",l.attr("src").replace(/\/checked\.png$/,"/unchecked.png")))}),$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs[]"]').change(function(){var e=$(this).val(),t=[];$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs[]"]').each(function(){var t=$(this),s=t.val(),l='input[type="checkbox"]';"removal-deletion"===s&&this.checked?t.nextAll(l).slice(0,2).attr({checked:"checked",disabled:"disabled"}):"removal-deletion"!==s||this.checked?"modification"===s&&this.checked?t.nextAll(l).slice(0,3).attr({checked:"checked",disabled:"disabled"}):"modification"!==s||this.checked||("modification"===e?t.nextAll(l).slice(0,3).removeAttr("checked"):null,t.nextAll(l).slice(0,3).removeAttr("disabled")):(t.nextAll(l).slice(0,2).removeAttr("disabled"),"removal-deletion"===e?t.nextAll(l).slice(0,2).removeAttr("checked"):null)}).each(function(e){this.checked?t.push(e):null}),$("select#ws-plugin--s2member-custom-reg-auto-opt-out-transitions").removeAttr("disabled"),$.inArray(3,t)===-1&&$.inArray(4,t)===-1&&$.inArray(5,t)===-1&&$.inArray(6,t)===-1&&$("select#ws-plugin--s2member-custom-reg-auto-opt-out-transitions").attr("disabled","disabled")}).last().trigger("change"))});
1
  jQuery(document).ready(function($){var esc_attr=esc_html=function(e){return/[&\<\>"']/.test(e=String(e))&&(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/"/g,"&quot;").replace(/'/g,"&#039;")),e};if(ws_plugin__s2member_generateSecurityKey=function(e){e||(e="#ws-plugin--s2member-sec-encryption-key");for(var t=function(e,t){return e=arguments.length<1?0:e,t=arguments.length<2?2147483647:t,Math.floor(Math.random()*(t-e+1))+e},s="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#%^&*()",l=0,r="";l<64;l++)r+=s.substr(t(0,s.length-1),1);return $(e).val(r),!1},location.href.match(/page\=ws-plugin--s2member/)&&$("input.ws-plugin--s2member-update-roles-button, input.ws-plugin--s2member-reset-roles-button").click(function(){var e=$(this);e.val("one moment please ...");var t='<?php echo (int)$GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; ?>',s=e.hasClass("ws-plugin--s2member-reset-roles-button")?"Reset":"Update";return $.post(ajaxurl,{action:"ws_plugin__s2member_update_roles_via_ajax",ws_plugin__s2member_update_roles_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-update-roles-via-ajax")); ?>'},function(l){"1"===l?(alert("s2Member's Roles/Capabilities "+("reset"===s.toLowerCase()?"have been successfully reset":"updated successfully")+".\nYour installation of s2Member has Membership Levels 0-"+t+"."),e.val(s+" Roles/Capabilities")):"l"===l?(alert("Sorry, your request failed.\ns2Member's Roles/Capabilities are locked by Filter:\nws_plugin__s2member_lock_roles_caps"),e.val(s+" Roles/Capabilities")):(alert("Sorry, your request failed.\nAccess denied. Do you have the ability to `create_users`?"),e.val(s+" Roles/Capabilities"))}),!1}),location.href.match(/page\=ws-plugin--s2member-logs/)){$("input#ws-plugin--s2member-gateway-debug-logs-extensive-1").click(function(){var e=($(this),!!this.checked);e&&$("input#ws-plugin--s2member-gateway-debug-logs-1").attr("checked","checked")});var $toggles=$("a.ws-plugin--s2member-log-file-viewport-toggle");$toggles.click(function(){return $("textarea#ws-plugin--s2member-log-file-viewer").each(function(){var e=$(this);"expanded"!==e.attr("data-state")?(e.css({height:e.prop("scrollHeight")+50+"px","overflow-y":"auto"}),$toggles.html("&#8657; normalize viewport &#10073;"),e.attr("data-state","expanded")):(e.css({height:"auto","overflow-y":"scroll"}),$toggles.html("&#8659; expand viewport &#8659;"),e.attr("data-state","scrolling"))}),!1})}if(location.href.match(/page\=ws-plugin--s2member-mms-ops/)&&($("select#ws-plugin--s2member-mms-registration-file").change(function(){if("wp-signup"===$(this).val()){var e=$("select#ws-plugin--s2member-mms-registration-grants").val(),t=$("input#ws-plugin--s2member-mms-registration-blogs-level0").val();$("div#ws-plugin--s2member-mms-registration-support-package-details-wrapper").show(),$("div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login").hide(),$("div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup").show(),$("div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0")["all"===e?"show":"hide"](),$("input#ws-plugin--s2member-mms-registration-blogs-level0").val("all"===e?t>0?t:"1":"0")}else if("wp-login"===$(this).val()){var e=$("select#ws-plugin--s2member-mms-registration-grants").val(),t=$("input#ws-plugin--s2member-mms-registration-blogs-level0").val();$("div#ws-plugin--s2member-mms-registration-support-package-details-wrapper").hide(),$("div.ws-plugin--s2member-mms-registration-wp-login, table.ws-plugin--s2member-mms-registration-wp-login").show(),$("div.ws-plugin--s2member-mms-registration-wp-signup, table.ws-plugin--s2member-mms-registration-wp-signup").hide(),$("div.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0, table.ws-plugin--s2member-mms-registration-wp-signup-blogs-level0").hide(),$("input#ws-plugin--s2member-mms-registration-blogs-level0").val("0")}}).trigger("change"),$("select#ws-plugin--s2member-mms-registration-grants").change(function(){$("select#ws-plugin--s2member-mms-registration-file").trigger("change")})),location.href.match(/page\=ws-plugin--s2member-gen-ops/)&&(ws_plugin__s2member_enableSecurityKey=function(){return confirm("Edit Key? Are you sure?\nThis could break your installation!\n\n*Note* If you've been testing s2Member, feel free to change this Key before you go live. Just don't go live, and then change it. You'll have unhappy Customers. Data corruption WILL occur! For your safety, s2Member keeps a history of the last 10 Keys that you've used. If you get yourself into a real situation, s2Member will let you revert back to a previous Key.")&&$("input#ws-plugin--s2member-sec-encryption-key").removeAttr("disabled"),!1},ws_plugin__s2member_securityKeyHistory=function(){return $("div#ws-plugin--s2member-sec-encryption-key-history").toggle(),!1},$("select#ws-plugin--s2member-new-user-emails-enabled").change(function(){var e=$("input#ws-plugin--s2member-pluggables-wp-new-user-notification"),t=$(this),s=$("div#ws-plugin--s2member-new-user-emails");"0"===e.val()||"0"===t.val()?("0"===e.val()?t.attr("disabled","disabled"):t.removeAttr("disabled"),$(":input",s).attr("disabled","disabled"),s.css("opacity","0.5")):(t.removeAttr("disabled"),$(":input",s).removeAttr("disabled"),s.css("opacity",""))}).trigger("change"),$("select#ws-plugin--s2member-login-reg-design-enabled").change(function(){var e=$(this),t=$("div#ws-plugin--s2member-login-reg-design");"0"===e.val()?($(":input",t).attr("disabled","disabled"),t.css("opacity","0.5"),t.hide()):($(":input",t).removeAttr("disabled"),t.css("opacity",""),t.show())}).trigger("change"),$("select#ws-plugin--s2member-custom-reg-password").change(function(){var e=$(this),t=$("div#ws-plugin--s2member-new-user-email-details");"1"===e.val()?t.css("opacity","0.5"):t.css("opacity","")}).trigger("change"),$("input#ws-plugin--s2member-custom-reg-fields").length&&$("div#ws-plugin--s2member-custom-reg-field-configuration").length&&!function(){var e,t,s,l,r,o,a=$("input#ws-plugin--s2member-custom-reg-fields"),i=$("div#ws-plugin--s2member-custom-reg-field-configuration"),n=a.val()?$.JSON.parse(a.val()):[];for(n=n instanceof Array?n:[],t={section:"no",sectitle:"",id:"",label:"",type:"text",deflt:"",options:"",expected:"",required:"yes",levels:"all",editable:"yes",classes:"",styles:"",attrs:""},e=0;e<n.length;e++)n[e]=$.extend(!0,{},t,n[e]);s='<div id="ws-plugin--s2member-custom-reg-field-configuration-tools"></div>',l='<table id="ws-plugin--s2member-custom-reg-field-configuration-table"></table>',i.html(s+l),r=$("div#ws-plugin--s2member-custom-reg-field-configuration-tools"),o=$("table#ws-plugin--s2member-custom-reg-field-configuration-table"),ws_plugin__s2member_customRegFieldSectionChange=function(e){var t=$(e).val(),s="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle";"yes"===t?$(s).css("display",""):$(s).css("display","none")},ws_plugin__s2member_customRegFieldTypeChange=function(e){var t=$(e).val(),s="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt",l="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-options",r="tr.ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected";t.match(/^(text|textarea)$/)?$(s).css("display",""):$(s).css("display","none"),t.match(/^(select|selects|checkboxes|radios)$/)?$(l).css("display",""):$(l).css("display","none"),t.match(/^(text|textarea)$/)?$(r).css("display",""):$(r).css("display","none")},ws_plugin__s2member_customRegFieldDelete=function(e){for(var t=new Array,s=0;s<n.length;s++)s!==e&&t.push(n[s]);n=t,m(),b()},ws_plugin__s2member_customRegFieldMoveUp=function(e){if("object"==typeof n[e]&&"object"==typeof n[e-1]){var t=n[e-1],s=n[e];n[e-1]=s,n[e]=t,m(),b()}},ws_plugin__s2member_customRegFieldMoveDown=function(e){if("object"==typeof n[e]&&"object"==typeof n[e+1]){var t=n[e+1],s=n[e];n[e+1]=s,n[e]=t,m(),b()}},ws_plugin__s2member_customRegFieldCreate=function(){var e=$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form"),t={};$(":input[property]",e).each(function(){var e=$(this),s=e.attr("property"),l=$.trim(e.val());t[s]=l}),(t=c(t))&&(n.push(t),m(),g(),b(),d(),setTimeout(function(){"tr.ws-plugin--s2member-custom-reg-field-configuration-table-row-"+(n.length-1);alert('Field created successfully.\n* Remember to "Save All Changes".')},500))},ws_plugin__s2member_customRegFieldUpdate=function(e){var t=$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form"),s={};$(":input[property]",t).each(function(){var e=$(this),t=e.attr("property"),l=$.trim(e.val());s[t]=l}),(s=c(s,e))&&(n[e]=s,m(),g(),b(),d(),setTimeout(function(){alert('Field updated successfully.\n* Remember to "Save All Changes".')},500))},ws_plugin__s2member_customRegFieldAdd=function(){g(!0)},ws_plugin__s2member_customRegFieldEdit=function(e){g(!1,e),d()},ws_plugin__s2member_customRegFieldCancel=function(){g(),d()};var c=function(e,s){var l,r,o="number"==typeof s&&"object"==typeof n[s],a=[];if("object"!=typeof e||"object"!=typeof(e=$.extend(!0,{},t,e)))return alert("Invalid field object. Please try again."),!1;if(e.sectitle="yes"===e.section?e.sectitle:"",e.deflt=e.type.match(/^(text|textarea)$/)?e.deflt:"",e.deflt=e.type.match(/^(text)$/)?e.deflt.replace(/[\r\n\t ]+/g," "):e.deflt,e.options=e.type.match(/^(select|selects|checkboxes|radios)$/)?e.options:"",e.expected=e.type.match(/^(text|textarea)$/)?e.expected:"",e.id?!u(e.id)||o&&e.id===n[s].id||a.push("Unique Field ID:\nThat Field ID already exists. Please try again."):a.push("Unique Field ID:\nThis is required. Please try again."),e.label||a.push("Field Label/Description:\nThis is required. Please try again."),e.type.match(/^(select|selects|checkboxes|radios)$/)&&!e.options)a.push("Option Configuration File:\nThis is required. Please try again.");else if(e.type.match(/^(select|selects|checkboxes|radios)$/)){for(r=0;r<(l=e.options.split(/[\r\n]+/)).length;r++)if(!(l[r]=$.trim(l[r])).match(/^([^\|]*)(\|)([^\|]*)(\|default)?$/)){a.push("Option Configuration File:\nInvalid configuration at line #"+(r+1)+".");break}e.options=$.trim(l.join("\n"))}return(e.levels=e.levels.replace(/ /g,""))?e.levels.match(/^(all|[0-9,]+)$/)||a.push("Applicable Levels:\nShould be comma-delimited Levels, or just type: all.\n(examples: 0,1,2,3,4 or type the word: all)"):a.push("Applicable Levels:\nThis is required. Please try again."),e.classes&&e.classes.match(/[^a-z 0-9 _ \-]/i)&&a.push("CSS Classes:\nContains invalid characters. Please try again.\n(only: alphanumerics, underscores, hyphens, spaces)"),e.styles&&e.styles.match(/["\=\>\<]/)&&a.push('CSS Styles:\nContains invalid characters. Please try again.\n(do NOT use these characters: = " < >)'),e.attrs&&e.attrs.match(/[\>\<]/)&&a.push("Other Attributes:\nContains invalid characters. Please try again.\n(do NOT use these characters: < >)"),a.length>0?(alert(a.join("\n\n")),!1):e},m=function(){a.val(n.length>0?$.JSON.stringify(n):"")},p=function(e){var t={text:"Text (single line)",textarea:"Textarea (multi-line)",select:"Select Menu (drop-down)",selects:"Select Menu (multi-option)",checkbox:"Checkbox (single)",pre_checkbox:"Checkbox (pre-checked)",checkboxes:"Checkboxes (multi-option)",radios:"Radio Buttons (multi-option)"};return"string"==typeof t[e]?t[e]:""},u=function(e){for(var t=0;t<n.length;t++)if(n[t].id===e)return!0},d=function(){scrollTo(0,$("div.ws-plugin--s2member-custom-reg-fields-section").offset().top-100)},g=function(e,s){var l=0,o="",a="",i="number"==typeof s&&"object"==typeof n[s],c=!(!e&&!i),m=i?$.extend(!0,{},t,n[s]):t;if(o+='<a href="#" onclick="ws_plugin__s2member_customRegFieldAdd(); return false;">Add New Field</a>',tb_remove(),$("div#ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form").remove(),c){for(a+='<div id="ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form">',a+='<table id="ws-plugin--s2member-custom-reg-field-configuration-tools-form">',a+="<tbody>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">Starts A New Section?</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section">',a+='<td colspan="2">',a+='<select property="section" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-section" onchange="ws_plugin__s2member_customRegFieldSectionChange(this);">',a+='<option value="no"'+("no"===m.section?' selected="selected"':"")+'">No (this Field flows normally)</option>',a+='<option value="yes"'+("yes"===m.section?' selected="selected"':"")+'">Yes (this Field begins a new section)</option>',a+="</select><br />",a+="<small>Optional. Allows Fields to be grouped into sections.</small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"'+("yes"===m.section?"":' style="display:none;"')+'><td colspan="2"><hr /></td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle ws-plugin--s2member-custom-reg-field-configuration-tools-form-section"'+("yes"===m.section?"":' style="display:none;"')+">",a+='<td colspan="2">',a+="Title for this new section? (optional)<br />",a+='<input type="text" property="sectitle" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-sectitle" value="'+esc_attr(m.sectitle)+'" /><br />',a+="<small>If empty, a simple divider will be used by default.</small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-type"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">Form Field Type: *</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type">',a+='<td colspan="2">',a+='<select property="type" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-type" onchange="ws_plugin__s2member_customRegFieldTypeChange(this);">',a+='<option value="text"'+("text"===m.type?' selected="selected"':"")+'">'+esc_html(p("text"))+"</option>",a+='<option value="textarea"'+("textarea"===m.type?' selected="selected"':"")+'">'+esc_html(p("textarea"))+"</option>",a+='<option value="select"'+("select"===m.type?' selected="selected"':"")+'">'+esc_html(p("select"))+"</option>",a+='<option value="selects"'+("selects"===m.type?' selected="selected"':"")+'">'+esc_html(p("selects"))+"</option>",a+='<option value="checkbox"'+("checkbox"===m.type?' selected="selected"':"")+'">'+esc_html(p("checkbox"))+"</option>",a+='<option value="pre_checkbox"'+("pre_checkbox"===m.type?' selected="selected"':"")+'">'+esc_html(p("pre_checkbox"))+"</option>",a+='<option value="checkboxes"'+("checkboxes"===m.type?' selected="selected"':"")+'">'+esc_html(p("checkboxes"))+"</option>",a+='<option value="radios"'+("radios"===m.type?' selected="selected"':"")+'">'+esc_html(p("radios"))+"</option>",a+="</select><br />",a+="<small>The options below may change, based on the Field Type you choose here.</small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-label"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">Field Label/Desc: *</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label">',a+='<td colspan="2">',a+='<input type="text" property="label" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-label" value="'+esc_attr(m.label)+'" /><br />',a+="<small>Examples: <code>Choose Country</code>, <code>Street Address</code></small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-id"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">Unique Field ID: *</label></label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id">',a+='<td colspan="2">',a+='<input type="text" property="id" maxlength="25" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-id" value="'+esc_attr(m.id)+'" /><br />',a+="<small>Examples: <code>country_code</code>, <code>street_address</code></small><br />",a+='<small>e.g., <code>[s2Get user_field="country_code" /]</code></small>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-required"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">Field Required: *</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">',a+='<td colspan="2">',a+='<select property="required" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-required">',a+='<option value="yes"'+("yes"===m.required?' selected="selected"':"")+'">Yes (required)</option>',a+='<option value="no"'+("no"===m.required?' selected="selected"':"")+'">No (optional)</option>',a+="</select><br />",a+='<small>If <code>yes</code>, only Users/Members will be "required" to enter this field.</small><br />',a+="<small>* Administrators are exempt from this requirement.</small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+(m.type.match(/^(text|textarea)$/)?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+(m.type.match(/^(text|textarea)$/)?"":' style="display:none;"')+">",a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt">Default Text Value: (optional)</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt"'+(m.type.match(/^(text|textarea)$/)?"":' style="display:none;"')+">",a+='<td colspan="2">',a+='<textarea property="deflt" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-deflt" rows="1">'+esc_html(m.deflt)+"</textarea><br />",a+="<small>Default value before user input is received.</small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+(m.type.match(/^(select|selects|checkboxes|radios)$/)?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+(m.type.match(/^(select|selects|checkboxes|radios)$/)?"":' style="display:none;"')+">",a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options">Option Configuration File: * (one option per line)</label><br />',a+="<small>Use a pipe <code>|</code> delimited format: <code>option value|option label</code></small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options"'+(m.type.match(/^(select|selects|checkboxes|radios)$/)?"":' style="display:none;"')+">",a+='<td colspan="2">',a+='<textarea property="options" wrap="off" spellcheck="false" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-options" rows="3">'+esc_html(m.options)+"</textarea><br />",a+="Here is a quick example:<br />",a+="<small>You can also specify a <em>default</em> option:</small><br />",a+="<code>US|United States|default</code><br />",a+="<code>CA|Canada</code><br />",a+="<code>VI|Virgin Islands (U.S.)</code>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+(m.type.match(/^(text|textarea)$/)?"":' style="display:none;"')+'><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+(m.type.match(/^(text|textarea)$/)?"":' style="display:none;"')+">",a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected">Expected Format: *</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected"'+(m.type.match(/^(text|textarea)$/)?"":' style="display:none;"')+">",a+='<td colspan="2">',a+='<select property="expected" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-expected">',a+='<option value=""'+(""===m.expected?' selected="selected"':"")+'">Anything Goes</option>',a+='<option disabled="disabled"></option>',a+='<optgroup label="Specific Input Types">',a+='<option value="numeric-wp-commas"'+("numeric-wp-commas"===m.expected?' selected="selected"':"")+'">Numeric (with or without decimals, commas allowed)</option>',a+='<option value="numeric"'+("numeric"===m.expected?' selected="selected"':"")+'">Numeric (with or without decimals, no commas)</option>',a+='<option value="integer"'+("integer"===m.expected?' selected="selected"':"")+'">Integer (whole number, without any decimals)</option>',a+='<option value="integer-gt-0"'+("integer-gt-0"===m.expected?' selected="selected"':"")+'">Integer > 0 (whole number, no decimals, greater than 0)</option>',a+='<option value="float"'+("float"===m.expected?' selected="selected"':"")+'">Float (floating point number, decimals required)</option>',a+='<option value="float-gt-0"'+("float-gt-0"===m.expected?' selected="selected"':"")+'">Float > 0 (floating point number, decimals required, greater than 0)</option>',a+='<option value="date"'+("date"===m.expected?' selected="selected"':"")+'">Date (required date format: dd/mm/yyyy)</option>',a+='<option value="email"'+("email"===m.expected?' selected="selected"':"")+'">Email (require valid email)</option>',a+='<option value="url"'+("url"===m.expected?' selected="selected"':"")+'">Full URL (starting with http or https)</option>',a+='<option value="domain"'+("domain"===m.expected?' selected="selected"':"")+'">Domain Name (domain name only, without http)</option>',a+='<option value="phone"'+("phone"===m.expected?' selected="selected"':"")+'">Phone # (10 digits w/possible hyphens,spaces,brackets)</option>',a+='<option value="uszip"'+("uszip"===m.expected?' selected="selected"':"")+'">US Zipcode (5-9 digits w/possible hyphen)</option>',a+='<option value="cazip"'+("cazip"===m.expected?' selected="selected"':"")+'">Canadian Zipcode (6 alpha-numerics w/possible space)</option>',a+='<option value="uczip"'+("uczip"===m.expected?' selected="selected"':"")+'">US/Canadian Zipcode (either a US or Canadian zipcode)</option>',a+="</optgroup>",a+='<option disabled="disabled"></option>',a+='<optgroup label="Any Character Combination">',l=1;l<=25;l++)a+='<option value="any-'+l+'"'+(m.expected==="any-"+l?' selected="selected"':"")+'">Any Character Combination ('+l+" character minimum)</option>",a+='<option value="any-'+l+'-e"'+(m.expected==="any-"+l+"-e"?' selected="selected"':"")+'">Any Character Combination (exactly '+l+" character"+(l>1?"s":"")+")</option>";for(a+="</optgroup>",a+='<option disabled="disabled"></option>',a+='<optgroup label="Alphanumerics, Spaces &amp; Punctuation Only">',l=1;l<=25;l++)a+='<option value="alphanumerics-spaces-punctuation-'+l+'"'+(m.expected==="alphanumerics-spaces-punctuation-"+l?' selected="selected"':"")+'">Alphanumerics, Spaces &amp; Punctuation ('+l+" character minimum)</option>",a+='<option value="alphanumerics-spaces-punctuation-'+l+'-e"'+(m.expected==="alphanumerics-spaces-punctuation-"+l+"-e"?' selected="selected"':"")+'">Alphanumerics, Spaces &amp; Punctuation (exactly '+l+" character"+(l>1?"s":"")+")</option>";for(a+="</optgroup>",a+='<option disabled="disabled"></option>',a+='<optgroup label="Alphanumerics &amp; Spaces Only">',l=1;l<=25;l++)a+='<option value="alphanumerics-spaces-'+l+'"'+(m.expected==="alphanumerics-spaces-"+l?' selected="selected"':"")+'">Alphanumerics &amp; Spaces ('+l+" character minimum)</option>",a+='<option value="alphanumerics-spaces-'+l+'-e"'+(m.expected==="alphanumerics-spaces-"+l+"-e"?' selected="selected"':"")+'">Alphanumerics &amp; Spaces (exactly '+l+" character"+(l>1?"s":"")+")</option>";for(a+="</optgroup>",a+='<option disabled="disabled"></option>',a+='<optgroup label="Alphanumerics &amp; Punctuation Only">',l=1;l<=25;l++)a+='<option value="alphanumerics-punctuation-'+l+'"'+(m.expected==="alphanumerics-punctuation-"+l?' selected="selected"':"")+'">Alphanumerics &amp; Punctuation ('+l+" character minimum)</option>",a+='<option value="alphanumerics-punctuation-'+l+'-e"'+(m.expected==="alphanumerics-punctuation-"+l+"-e"?' selected="selected"':"")+'">Alphanumerics &amp; Punctuation (exactly '+l+" character"+(l>1?"s":"")+")</option>";for(a+="</optgroup>",a+='<option disabled="disabled"></option>',a+='<optgroup label="Alphanumerics Only">',l=1;l<=25;l++)a+='<option value="alphanumerics-'+l+'"'+(m.expected==="alphanumerics-"+l?' selected="selected"':"")+'">Alphanumerics ('+l+" character minimum)</option>",a+='<option value="alphanumerics-'+l+'-e"'+(m.expected==="alphanumerics-"+l+"-e"?' selected="selected"':"")+'">Alphanumerics (exactly '+l+" character"+(l>1?"s":"")+")</option>";for(a+="</optgroup>",a+='<option disabled="disabled"></option>',a+='<optgroup label="Alphabetics Only">',l=1;l<=25;l++)a+='<option value="alphabetics-'+l+'"'+(m.expected==="alphabetics-"+l?' selected="selected"':"")+'">Alphabetics ('+l+" character minimum)</option>",a+='<option value="alphabetics-'+l+'-e"'+(m.expected==="alphabetics-"+l+"-e"?' selected="selected"':"")+'">Alphabetics (exactly '+l+" character"+(l>1?"s":"")+")</option>";for(a+="</optgroup>",a+='<option disabled="disabled"></option>',a+='<optgroup label="Numeric Digits Only">',l=1;l<=25;l++)a+='<option value="numerics-'+l+'"'+(m.expected==="numerics-"+l?' selected="selected"':"")+'">Numeric Digits ('+l+" digit minimum)</option>",a+='<option value="numerics-'+l+'-e"'+(m.expected==="numerics-"+l+"-e"?' selected="selected"':"")+'">Numeric Digits (exactly '+l+" digit"+(l>1?"s":"")+")</option>";a+="</optgroup>",a+="</select><br />",a+="<small>Only Users/Members will be required to meet this criteria.</small><br />",a+="<small>* Administrators are exempt from this.</small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">Applicable Membership Levels: *</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels">',a+='<td colspan="2">',a+='<input type="text" property="levels" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-levels" value="'+esc_attr(m.levels)+'" /><br />',a+="<small>Please use comma-delimited Level #'s: <code>0,1,2,3,4</code> or type: <code>all</code>.</small><br />",a+="<small>This allows you to enable this field - only at specific Membership Levels.</small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">Allow Profile Edits: *</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">',a+='<td colspan="2">',a+='<select property="editable" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-editable">',a+='<option value="yes"'+("yes"===m.editable?' selected="selected"':"")+'">Yes (editable)</option>',a+='<option value="no"'+("no"===m.editable?' selected="selected"':"")+'">No (uneditable after registration)</option>',a+='<option value="no-invisible"'+("no-invisible"===m.editable?' selected="selected"':"")+'">No (uneditable &amp; totally invisible after registration)</option>',a+='<option value="no-always-invisible"'+("no-always-invisible"===m.editable?' selected="selected"':"")+'">No (uneditable &amp; totally invisible, both during &amp; after registration)</option>',a+='<option value="yes-invisible"'+("yes-invisible"===m.editable?' selected="selected"':"")+'">Yes (editable after registration / invisible during registration)</option>',a+="</select><br />",a+="<small>If <code>No</code>, this field will be un-editable after registration.</small><br />",a+="<small>* Administrators are exempt from this.</small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">CSS Classes: (optional)</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes">',a+='<td colspan="2">',a+='<input type="text" property="classes" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-classes" value="'+esc_attr(m.classes)+'" /><br />',a+="<small>Example: <code>my-style-1 my-style-2</code></small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">CSS Styles: (optional)</label>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles">',a+='<td colspan="2">',a+='<input type="text" property="styles" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-styles" value="'+esc_attr(m.styles)+'" /><br />',a+="<small>Example: <code>color:#000000; background:#FFFFFF;</code></small>",a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">',a+='<td colspan="2">',a+='<label for="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">Other Attributes: (optional)</label>',
2
+ a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs">',a+='<td colspan="2">',a+='<input type="text" property="attrs" autocomplete="off" id="ws-plugin--s2member-custom-reg-field-configuration-tools-form-attrs" value="'+esc_attr(m.attrs)+'" /><br />',a+='<small>Example: <code>onkeyup="" onblur=""</code></small>',a+="</td>",a+="</tr>",a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-spacer ws-plugin--s2member-custom-reg-field-configuration-tools-form-buttons"><td colspan="2">&nbsp;</td></tr>',a+='<tr class="ws-plugin--s2member-custom-reg-field-configuration-tools-form-buttons">',a+='<td align="left">',a+='<input type="button" value="Cancel" onclick="ws_plugin__s2member_customRegFieldCancel();" />',a+="</td>",a+='<td align="right">',a+='<input type="button" value="'+(i?"Update This Field":"Create Registration Field")+'" onclick="'+(i?"ws_plugin__s2member_customRegFieldUpdate("+s+");":"ws_plugin__s2member_customRegFieldCreate();")+'" />',a+="</td>",a+="</tr>",a+="</tbody>",a+="</table>",a+="<div>",$("body").append(a),tb_show(i?"Editing Registration/Profile Field":"New Custom Registration/Profile Field","#TB_inline?inlineId=ws-plugin--s2member-custom-reg-field-configuration-thickbox-tools-form"),$("table#ws-plugin--s2member-custom-reg-field-configuration-tools-form").show()}r.html(o)},b=function(){var e=(n.length,0),t="",s="o";if(t+="<tbody>",t+="<tr>",t+="<th>Order</th>",t+="<th>Field Type</th>",t+="<th>Unique ID</th>",t+="<th>Required</th>",t+="<th>Levels</th>",t+="<th>- Tools -</th>",t+="</tr>",n.length>0)for(e=0;e<n.length;e++)t+='<tr class="'+esc_attr(s="o"===s?"e":"o")+("yes"===n[e].section?" s":"")+" ws-plugin--s2member-custom-reg-field-configuration-table-row-"+e+'">',t+='<td nowrap="nowrap"><a class="ws-plugin--s2member-custom-reg-field-configuration-move-up" title="Move field up" href="#" onclick="ws_plugin__s2member_customRegFieldMoveUp('+e+'); return false;"></a><a class="ws-plugin--s2member-custom-reg-field-configuration-move-down" title="Move field down" href="#" onclick="ws_plugin__s2member_customRegFieldMoveDown('+e+'); return false;"></a></td>',t+='<td nowrap="nowrap">'+esc_html(p(n[e].type))+"</td>",t+='<td nowrap="nowrap">'+esc_html(n[e].id)+"</td>",t+='<td nowrap="nowrap">'+esc_html(n[e].required)+"</td>",t+='<td nowrap="nowrap">'+esc_html(n[e].levels)+"</td>",t+='<td nowrap="nowrap"><a class="ws-plugin--s2member-custom-reg-field-configuration-edit" title="Edit field" href="#" onclick="ws_plugin__s2member_customRegFieldEdit('+e+'); return false;"></a><a class="ws-plugin--s2member-custom-reg-field-configuration-delete" title="Delete field" href="#" onclick="ws_plugin__s2member_customRegFieldDelete('+e+'); return false;"></a></td>',t+="</tr>";else t+="<tr>",t+='<td colspan="6">No Custom Fields are configured.</td>',t+="</tr>";t+="</tbody>",o.html(t)};g(),b()}()),location.href.match(/page\=ws-plugin--s2member-res-ops/)&&($("input#ws-plugin--s2member-brute-force-restrictions-reset-button").click(function(){var e=$(this);return e.val("one moment please ..."),$.post(ajaxurl,{action:"ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax",ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'},function(t){alert("s2Member's Brute Force Restriction Logs have all been reset."),e.val("Reset Brute Force Logs")}),!1}),$("input#ws-plugin--s2member-ip-restrictions-reset-button").click(function(){var e=$(this);return e.val("one moment please ..."),$.post(ajaxurl,{action:"ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax",ws_plugin__s2member_delete_reset_all_ip_restrictions_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-delete-reset-all-ip-restrictions-via-ajax")); ?>'},function(t){alert("s2Member's IP Restriction Logs have all been reset."),e.val("Reset IP Restriction Logs")}),!1}),$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query[]"]').change(function(){var e=$(this).val();$('div.ws-plugin--s2member-query-level-access-section input[type="checkbox"][name="ws_plugin__s2member_filter_wp_query[]"]').each(function(){var t=$(this),s=t.val(),l='input[type="checkbox"]';"all"===s&&this.checked?t.nextAll(l).attr({checked:"checked",disabled:"disabled"}):"all"!==s||this.checked||(t.nextAll(l).removeAttr("disabled"),"all"===e?t.nextAll(l).removeAttr("checked"):null)})}).last().trigger("change")),location.href.match(/page\=ws-plugin--s2member-down-ops/)){var updateCloudFrontPrivateKey=function(){var e=$("input#ws-plugin--s2member-amazon-cf-files-private-key"),t=$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry"),s=$.trim(e.val()),l=$.trim(t.val());(s&&!l||l.match(/[^\r\n\u25CF]/))&&(e.val(l),t.val(l.replace(/[^\r\n]/g,String.fromCharCode(9679))))};$("form#ws-plugin--s2member-options-form").submit(updateCloudFrontPrivateKey),$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry").change(updateCloudFrontPrivateKey).trigger("change");var updateCloudFrontDistroCfgs=function(){var e=$("input#ws-plugin--s2member-amazon-cf-files-private-key"),t=$("input#ws-plugin--s2member-amazon-cf-files-private-key-id"),s=$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros"),l=$("input#ws-plugin--s2member-amazon-cf-files-distros-auto-config-status"),r=$.trim(l.val()),o=$.trim(e.val()),a=$.trim(t.val()),i=$.trim(e.attr("data-s-prev-config-value")),n=$.trim(t.attr("data-s-prev-config-value"));"configured"===r&&(n&&a!==n||i&&o!==i)?(alert("s2Member will need to delete and re-configure your Amazon CloudFront distributions if you change this. When you're done editing, click (Save All Changes) below."),s.attr("checked","checked")):"configured"!==r&&a&&o&&(alert("s2Member will need to auto-configure your Amazon CloudFront distributions for you. When you're done editing, click (Save All Changes) below."),s.attr("checked","checked"))};$("input#ws-plugin--s2member-amazon-cf-files-private-key-id").change(updateCloudFrontDistroCfgs),$("textarea#ws-plugin--s2member-amazon-cf-files-private-key-entry").change(updateCloudFrontDistroCfgs),$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros-w-cnames").change(function(){var e=($(this),!!this.checked),t=$("input#ws-plugin--s2member-amazon-cf-files-auto-configure-distros"),s=$("div#ws-plugin--s2member-amazon-cf-files-auto-configure-distro-cnames");e?s.show():s.hide(),e?t.attr("checked","checked"):null}).trigger("change")}location.href.match(/page\=ws-plugin--s2member-paypal-ops/)&&$("select#ws-plugin--s2member-auto-eot-system-enabled").change(function(){var e=$(this),t=e.val(),s=$("p#ws-plugin--s2member-auto-eot-system-enabled-via-cron");2==t?s.show():s.hide()}),location.href.match(/page\=ws-plugin--s2member-paypal-buttons/)&&($("div.ws-menu-page select[id]").filter(function(){return this.id.match(/^ws-plugin--s2member-(level[1-9][0-9]*|modification)-term$/)}).change(function(){var e=this.id.replace(/^ws-plugin--s2member-(.+?)-term$/g,"$1"),t="BN"===$(this).val().split("-")[2].replace(/[^0-1BN]/g,"")?1:0;$("p#ws-plugin--s2member-"+e+"-trial-line").css("display",t?"none":""),$("span#ws-plugin--s2member-"+e+"-trial-then").css("display",t?"none":""),$("span#ws-plugin--s2member-"+e+"-20p-rule").css("display",t?"none":""),t?$("input#ws-plugin--s2member-"+e+"-trial-period").val(0):null,t?$("input#ws-plugin--s2member-"+e+"-trial-amount").val("0.00"):null}),$("div.ws-menu-page input[id]").filter(function(){return this.id.match(/^ws-plugin--s2member-(level[1-9][0-9]*|modification|ccap)-ccaps$/)}).keyup(function(){var e=this.value.replace(/^(-all|-al|-a|-)[;,]*/gi,""),t=this.value.match(/^(-all|-al|-a|-)[;,]*/i)?"-all,":"";e.match(/[^a-z_0-9,]/)&&(this.value=t+$.trim($.trim(e).replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase()))}),ws_plugin__s2member_paypalButtonGenerate=function(button){var shortCodeTemplate='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',shortCodeTemplateAttrs="",labels={};eval("<?php echo c_ws_plugin__s2member_utils_strings::esc_dq($labels); ?>");var shortCode=$("input#ws-plugin--s2member-"+button+"-shortcode"),code=$("textarea#ws-plugin--s2member-"+button+"-button"),modLevel=$("select#ws-plugin--s2member-modification-level"),level="modification"===button?modLevel.val().split(":",2)[1]:button.replace(/^level/,""),label=labels["level"+level].replace(/"/g,""),desc=$.trim($("input#ws-plugin--s2member-"+button+"-desc").val().replace(/"/g,"")),trialAmount=$("input#ws-plugin--s2member-"+button+"-trial-amount").val().replace(/[^0-9\.]/g,""),trialPeriod=$("input#ws-plugin--s2member-"+button+"-trial-period").val().replace(/[^0-9]/g,""),trialTerm=$("select#ws-plugin--s2member-"+button+"-trial-term").val().replace(/[^A-Z]/g,""),regAmount=$("input#ws-plugin--s2member-"+button+"-amount").val().replace(/[^0-9\.]/g,""),regPeriod=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[0].replace(/[^0-9]/g,""),regTerm=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[1].replace(/[^A-Z]/g,""),regRecur=$("select#ws-plugin--s2member-"+button+"-term").val().split("-")[2].replace(/[^0-1BN]/g,""),regRecurTimes="",regRecurRetry="1",localeCode="",digital="0",noShipping="1",pageStyle=$.trim($("input#ws-plugin--s2member-"+button+"-page-style").val().replace(/"/g,"")),currencyCode=$("select#ws-plugin--s2member-"+button+"-currency").val().replace(/[^A-Z]/g,""),cCaps=$.trim($.trim($("input#ws-plugin--s2member-"+button+"-ccaps").val()).replace(/^(-all|-al|-a|-)[;,]*/gi,"").replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());cCaps=$.trim($("input#ws-plugin--s2member-"+button+"-ccaps").val()).match(/^(-all|-al|-a|-)[;,]*/i)?(cCaps?"-all,":"-all")+cCaps.toLowerCase():cCaps.toLowerCase(),trialPeriod="BN"===regRecur?"0":trialPeriod,trialAmount=!trialAmount||isNaN(trialAmount)||trialAmount<.01||trialPeriod<=0?"0":trialAmount;var levelCcapsPer="BN"===regRecur&&"L"!==regTerm?level+":"+cCaps+":"+regPeriod+" "+regTerm:level+":"+cCaps;return levelCcapsPer=levelCcapsPer.replace(/\:+$/g,""),"0"!==trialAmount&&(isNaN(trialAmount)||trialAmount<0)?(alert("— Oops, a slight problem: —\n\nWhen provided, Trial Amount must be >= 0.00"),!1):"0"!==trialAmount&&trialAmount>1e4&&"USD"===currencyCode.toUpperCase()?(alert("— Oops, a slight problem: —\n\nMaximum Trial Amount is: 10000.00"),!1):"D"===trialTerm&&trialPeriod>90?(alert("— Oops, a slight problem: —\n\nMaximum Trial Days is: 90.\nIf you want to offer more than 90 days, please choose Weeks or Months from the drop-down."),!1):"W"===trialTerm&&trialPeriod>52?(alert("— Oops, a slight problem: —\n\nMaximum Trial Weeks is: 52.\nIf you want to offer more than 52 weeks, please choose Months from the drop-down."),!1):"M"===trialTerm&&trialPeriod>24?(alert("— Oops, a slight problem: —\n\nMaximum Trial Months is: 24.\nIf you want to offer more than 24 months, please choose Years from the drop-down."),!1):"Y"===trialTerm&&trialPeriod>5?(alert("— Oops, a slight problem: —\n\nMax Trial Period Years is: 5."),!1):!regAmount||isNaN(regAmount)||regAmount<.01?(alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01"),!1):regAmount>1e4&&"USD"===currencyCode.toUpperCase()?(alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00"),!1):desc?(code.html(code.val().replace(/ \<\!--(\<input type\="hidden" name\="(amount|src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\>)--\>/g," $1")),parseInt(trialPeriod)<=0?code.html(code.val().replace(/ (\<input type\="hidden" name\="(a1|p1|t1)" value\="(.*?)" \/\>)/g," <!--$1-->")):null,"BN"===regRecur?code.html(code.val().replace(/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g," $1_xclick$3")):null,"BN"===regRecur?code.html(code.val().replace(/ (\<input type\="hidden" name\="(src|srt|sra|a1|p1|t1|a3|p3|t3)" value\="(.*?)" \/\>)/g," <!--$1-->")):null,"BN"!==regRecur?code.html(code.val().replace(/ (\<input type\="hidden" name\="cmd" value\=")(.*?)(" \/\>)/g," $1_xclick-subscriptions$3")):null,"BN"!==regRecur?code.html(code.val().replace(/ (\<input type\="hidden" name\="amount" value\="(.*?)" \/\>)/g," <!--$1-->")):null,shortCodeTemplateAttrs+="modification"===button?'modify="1" ':"",shortCodeTemplateAttrs+='level="'+esc_attr(level)+'" ccaps="'+esc_attr(cCaps)+'" desc="'+esc_attr(desc)+'" ps="'+esc_attr(pageStyle)+'" lc="'+esc_attr(localeCode)+'" cc="'+esc_attr(currencyCode)+'" dg="'+esc_attr(digital)+'" ns="'+esc_attr(noShipping)+'" custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"',shortCodeTemplateAttrs+=' ta="'+esc_attr(trialAmount)+'" tp="'+esc_attr(trialPeriod)+'" tt="'+esc_attr(trialTerm)+'" ra="'+esc_attr(regAmount)+'" rp="'+esc_attr(regPeriod)+'" rt="'+esc_attr(regTerm)+'" rr="'+esc_attr(regRecur)+'" rrt="'+esc_attr(regRecurTimes)+'" rra="'+esc_attr(regRecurRetry)+'"',shortCode.val(shortCodeTemplate.replace(/%%attrs%%/,shortCodeTemplateAttrs)),code.html(code.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(localeCode)+'"')),code.html(code.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(noShipping)+'"')),code.html(code.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(desc)+'"')),code.html(code.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(levelCcapsPer)+'"')),code.html(code.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(pageStyle)+'"')),code.html(code.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(currencyCode)+'"')),code.html(code.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"')),code.html(code.val().replace(/ name\="modify" value\="(.*?)"/,' name="modify" value="'+("modification"===button?"1":"0")+'"')),code.html(code.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(regAmount)+'"')),code.html(code.val().replace(/ name\="src" value\="(.*?)"/,' name="src" value="'+esc_attr(regRecur)+'"')),code.html(code.val().replace(/ name\="srt" value\="(.*?)"/,' name="srt" value="'+esc_attr(regRecurTimes)+'"')),code.html(code.val().replace(/ name\="sra" value\="(.*?)"/,' name="sra" value="'+esc_attr(regRecurRetry)+'"')),code.html(code.val().replace(/ name\="a1" value\="(.*?)"/,' name="a1" value="'+esc_attr(trialAmount)+'"')),code.html(code.val().replace(/ name\="p1" value\="(.*?)"/,' name="p1" value="'+esc_attr(trialPeriod)+'"')),code.html(code.val().replace(/ name\="t1" value\="(.*?)"/,' name="t1" value="'+esc_attr(trialTerm)+'"')),code.html(code.val().replace(/ name\="a3" value\="(.*?)"/,' name="a3" value="'+esc_attr(regAmount)+'"')),code.html(code.val().replace(/ name\="p3" value\="(.*?)"/,' name="p3" value="'+esc_attr(regPeriod)+'"')),code.html(code.val().replace(/ name\="t3" value\="(.*?)"/,' name="t3" value="'+esc_attr(regTerm)+'"')),$("div#ws-plugin--s2member-"+button+"-button-prev").html(code.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round((new Date).getTime())+"~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr (c_ws_plugin__s2member_utils_ip::current())); ?>").replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,"")),"modification"===button?alert("Your Modification Button has been generated.\nPlease copy/paste the Shortcode into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Modification Buttons should be displayed to existing Users/Members, and they should be logged-in, BEFORE clicking this Button."):alert("Your Button has been generated.\nPlease copy/paste the Shortcode Format into your Membership Options Page."),shortCode.each(function(){this.focus(),this.select()}),!1):(alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button."),!1)},ws_plugin__s2member_paypalCcapButtonGenerate=function(){var e='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',t="",s=$("input#ws-plugin--s2member-ccap-shortcode"),l=$("textarea#ws-plugin--s2member-ccap-button"),r=$.trim($("input#ws-plugin--s2member-ccap-desc").val().replace(/"/g,"")),o=$("input#ws-plugin--s2member-ccap-amount").val().replace(/[^0-9\.]/g,""),a=$("select#ws-plugin--s2member-ccap-term").val().split("-")[0].replace(/[^0-9]/g,""),i=$("select#ws-plugin--s2member-ccap-term").val().split("-")[1].replace(/[^A-Z]/g,""),n=$("select#ws-plugin--s2member-ccap-term").val().split("-")[2].replace(/[^0-1BN]/g,""),c="",m="0",p="1",u=$.trim($("input#ws-plugin--s2member-ccap-page-style").val().replace(/"/g,"")),d=$("select#ws-plugin--s2member-ccap-currency").val().replace(/[^A-Z]/g,""),g=$.trim($.trim($("input#ws-plugin--s2member-ccap-ccaps").val()).replace(/^(-all|-al|-a|-)[;,]*/gi,"").replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase());g=$.trim($("input#ws-plugin--s2member-ccap-ccaps").val()).match(/^(-all|-al|-a|-)[;,]*/i)?(g?"-all,":"-all")+g.toLowerCase():g.toLowerCase();var b="BN"===n&&"L"!==i?"*:"+g+":"+a+" "+i:"*:"+g;return b=b.replace(/\:+$/g,""),g&&"-all"!==g?!o||isNaN(o)||o<.01?(alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01"),!1):o>1e4&&"USD"===d.toUpperCase()?(alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00"),!1):r?(t+='level="*" ccaps="'+esc_attr(g)+'" desc="'+esc_attr(r)+'" ps="'+esc_attr(u)+'" lc="'+esc_attr(c)+'" cc="'+esc_attr(d)+'" dg="'+esc_attr(m)+'" ns="'+esc_attr(p)+'"',t+=' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="'+esc_attr(o)+'" rp="'+esc_attr(a)+'" rt="'+esc_attr(i)+'" rr="'+esc_attr(n)+'"',s.val(e.replace(/%%attrs%%/,t)),l.html(l.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(c)+'"')),l.html(l.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(p)+'"')),l.html(l.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(r)+'"')),l.html(l.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(b)+'"')),l.html(l.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(u)+'"')),l.html(l.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(d)+'"')),l.html(l.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"')),l.html(l.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(o)+'"')),$("div#ws-plugin--s2member-ccap-button-prev").html(l.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round((new Date).getTime())+"~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr (c_ws_plugin__s2member_utils_ip::current())); ?>").replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,"")),alert("Your Button has been generated.\nPlease copy/paste the Shortcode into your Login Welcome Page, or wherever you feel it would be most appropriate.\n\n* Remember, Independent Custom Capability Buttons should ONLY be displayed to existing Users/Members, and they MUST be logged-in, BEFORE clicking this Button."),s.each(function(){this.focus(),this.select()}),!1):(alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button."),!1):(alert("— Oops, a slight problem: —\n\nPlease provide at least one Custom Capability."),!1)},ws_plugin__s2member_paypalSpButtonGenerate=function(){var e='[s2Member-PayPal-Button %%attrs%% image="default" output="button" /]',t="",s=$("input#ws-plugin--s2member-sp-shortcode"),l=$("textarea#ws-plugin--s2member-sp-button"),r=$("select#ws-plugin--s2member-sp-leading-id").val().replace(/[^0-9]/g,""),o=$("select#ws-plugin--s2member-sp-additional-ids").val()||[],a=$("select#ws-plugin--s2member-sp-hours").val().replace(/[^0-9]/g,""),i=$("input#ws-plugin--s2member-sp-amount").val().replace(/[^0-9\.]/g,""),n=$.trim($("input#ws-plugin--s2member-sp-desc").val().replace(/"/g,"")),c="",m="0",p="1",u=$.trim($("input#ws-plugin--s2member-sp-page-style").val().replace(/"/g,"")),d=$("select#ws-plugin--s2member-sp-currency").val().replace(/[^A-Z]/g,"");if(!r)return alert("— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it's because you've not configured s2Member for Specific Post/Page Access yet. See: s2Member → Restriction Options → Specific Post/Page Access."),!1;if(!i||isNaN(i)||i<.01)return alert("— Oops, a slight problem: —\n\nAmount must be >= 0.01"),!1;if(i>1e4&&"USD"===d.toUpperCase())return alert("— Oops, a slight problem: —\n\nMaximum Amount is: 10000.00"),!1;if(!n)return alert("— Oops, a slight problem: —\n\nPlease type a Description for this Button."),!1;for(var g=0,b=r;g<o.length;g++)o[g]&&o[g]!==r&&(b+=","+o[g]);var f="sp:"+b+":"+a;return t+='sp="1" ids="'+esc_attr(b)+'" exp="'+esc_attr(a)+'" desc="'+esc_attr(n)+'" ps="'+esc_attr(u)+'" lc="'+esc_attr(c)+'" cc="'+esc_attr(d)+'" dg="'+esc_attr(m)+'" ns="'+esc_attr(p)+'"',t+=' custom="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>" ra="'+esc_attr(i)+'"',s.val(e.replace(/%%attrs%%/,t)),l.html(l.val().replace(/ name\="lc" value\="(.*?)"/,' name="lc" value="'+esc_attr(c)+'"')),l.html(l.val().replace(/ name\="no_shipping" value\="(.*?)"/,' name="no_shipping" value="'+esc_attr(p)+'"')),l.html(l.val().replace(/ name\="item_name" value\="(.*?)"/,' name="item_name" value="'+esc_attr(n)+'"')),l.html(l.val().replace(/ name\="item_number" value\="(.*?)"/,' name="item_number" value="'+esc_attr(f)+'"')),l.html(l.val().replace(/ name\="page_style" value\="(.*?)"/,' name="page_style" value="'+esc_attr(u)+'"')),l.html(l.val().replace(/ name\="currency_code" value\="(.*?)"/,' name="currency_code" value="'+esc_attr(d)+'"')),l.html(l.val().replace(/ name\="custom" value\="(.*?)"/,' name="custom" value="<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"])); ?>"')),l.html(l.val().replace(/ name\="amount" value\="(.*?)"/,' name="amount" value="'+esc_attr(i)+'"')),$("div#ws-plugin--s2member-sp-button-prev").html(l.val().replace(/\<form/,'<form target="_blank"').replace(/\<\?php echo S2MEMBER_VALUE_FOR_PP_INV\(\); \?\>/g,Math.round((new Date).getTime())+"~<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr (c_ws_plugin__s2member_utils_ip::current())); ?>").replace(/\<\?php echo S2MEMBER_CURRENT_USER_VALUE_FOR_PP_(ON0|OS0|ON1|OS1); \?\>/g,"")),alert("Your Button has been generated.\nPlease copy/paste the Shortcode into your WordPress Editor."),s.each(function(){this.focus(),this.select()}),!1},ws_plugin__s2member_paypalRegLinkGenerate=function(){var e=$("select#ws-plugin--s2member-reg-link-level").val().replace(/[^0-9]/g,""),t=$.trim($("input#ws-plugin--s2member-reg-link-subscr-id").val()),s=$.trim($("input#ws-plugin--s2member-reg-link-custom").val()),l=$.trim($.trim($("input#ws-plugin--s2member-reg-link-ccaps").val()).replace(/[ \-]/g,"_").replace(/[^a-z_0-9,]/gi,"").toLowerCase()),r=$.trim($("input#ws-plugin--s2member-reg-link-fixed-term").val().replace(/[^A-Z 0-9]/gi,"").toUpperCase()),o=$("p#ws-plugin--s2member-reg-link"),a=$("img#ws-plugin--s2member-reg-link-loading"),i=r&&!r.match(/L$/)?e+":"+l+":"+r:e+":"+l;return i=i.replace(/\:+$/g,""),t?s&&0===s.indexOf('<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq ($_SERVER["HTTP_HOST"]); ?>')?r&&!r.match(/^[1-9]+ (D|W|M|Y|L)$/)?(alert("— Oops, a slight problem: —\n\nThe Fixed Term Length is not formatted properly."),!1):(o.hide(),a.show(),$.post(ajaxurl,{action:"ws_plugin__s2member_reg_access_link_via_ajax",ws_plugin__s2member_reg_access_link_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-reg-access-link-via-ajax")); ?>',s2member_reg_access_link_subscr_gateway:"paypal",s2member_reg_access_link_subscr_id:t,s2member_reg_access_link_custom:s,s2member_reg_access_link_item_number:i},function(e){o.show().html('<a href="'+esc_attr(e)+'" target="_blank" rel="external">'+esc_html(e)+"</a>"),a.hide()}),!1):(alert("— Oops, a slight problem: —\n\nThe Custom Value MUST start with your domain name."),!1):(alert("— Oops, a slight problem: —\n\nPaid Subscr. ID is a required value."),!1)},ws_plugin__s2member_paypalSpLinkGenerate=function(){var e=$("select#ws-plugin--s2member-sp-link-leading-id").val().replace(/[^0-9]/g,""),t=$("select#ws-plugin--s2member-sp-link-additional-ids").val()||[],s=$("select#ws-plugin--s2member-sp-link-hours").val().replace(/[^0-9]/g,""),l=$("p#ws-plugin--s2member-sp-link"),r=$("img#ws-plugin--s2member-sp-link-loading");if(!e)return alert("— Oops, a slight problem: —\n\nPlease select a Leading Post/Page.\n\n*Tip* If there are no Posts/Pages in the menu, it's because you've not configured s2Member for Specific Post/Page Access yet. See: s2Member → Restriction Options → Specific Post/Page Access."),!1;for(var o=0,a=e;o<t.length;o++)t[o]&&t[o]!==e&&(a+=","+t[o]);return l.hide(),r.show(),$.post(ajaxurl,{action:"ws_plugin__s2member_sp_access_link_via_ajax",ws_plugin__s2member_sp_access_link_via_ajax:'<?php echo c_ws_plugin__s2member_utils_strings::esc_js_sq (wp_create_nonce ("ws-plugin--s2member-sp-access-link-via-ajax")); ?>',s2member_sp_access_link_ids:a,s2member_sp_access_link_hours:s},function(e){l.show().html('<a href="'+esc_attr(e)+'" target="_blank" rel="external">'+esc_html(e)+"</a>"),r.hide()}),!1}),location.href.match(/page\=ws-plugin--s2member-els-ops/)&&($("select#ws-plugin--s2member-custom-reg-opt-in").change(function(){var e=$(this),t=e.val(),s=$("tr.ws-plugin--s2member-custom-reg-opt-in-label-row"),l=$("img.ws-plugin--s2member-custom-reg-opt-in-label-prev-img");t<=0?(s.css("display","none"),l.attr("src",l.attr("src").replace(/\/checked\.png$/,"/unchecked.png"))):1==t?(s.css("display",""),l.attr("src",l.attr("src").replace(/\/unchecked\.png$/,"/checked.png"))):2==t&&(s.css("display",""),l.attr("src",l.attr("src").replace(/\/checked\.png$/,"/unchecked.png")))}),$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs[]"]').change(function(){var e=$(this).val(),t=[];$('div.ws-plugin--s2member-opt-out-section input[type="checkbox"][name="ws_plugin__s2member_custom_reg_auto_opt_outs[]"]').each(function(){var t=$(this),s=t.val(),l='input[type="checkbox"]';"removal-deletion"===s&&this.checked?t.nextAll(l).slice(0,2).attr({checked:"checked",disabled:"disabled"}):"removal-deletion"!==s||this.checked?"modification"===s&&this.checked?t.nextAll(l).slice(0,3).attr({checked:"checked",disabled:"disabled"}):"modification"!==s||this.checked||("modification"===e?t.nextAll(l).slice(0,3).removeAttr("checked"):null,t.nextAll(l).slice(0,3).removeAttr("disabled")):(t.nextAll(l).slice(0,2).removeAttr("disabled"),"removal-deletion"===e?t.nextAll(l).slice(0,2).removeAttr("checked"):null)}).each(function(e){this.checked?t.push(e):null}),$("select#ws-plugin--s2member-custom-reg-auto-opt-out-transitions").removeAttr("disabled"),$.inArray(3,t)===-1&&$.inArray(4,t)===-1&&$.inArray(5,t)===-1&&$.inArray(6,t)===-1&&$("select#ws-plugin--s2member-custom-reg-auto-opt-out-transitions").attr("disabled","disabled")}).last().trigger("change"))});
src/includes/menu-pages/menu-pages.css CHANGED
@@ -1069,3 +1069,454 @@ div.ws-menu-page-updates input[type = "radio"]
1069
  margin-right : 3px;
1070
  vertical-align : middle;
1071
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1069
  margin-right : 3px;
1070
  vertical-align : middle;
1071
  }
1072
+
1073
+ /*
1074
+ New admin styles
1075
+ */
1076
+ body[class*="s2member"] #wpwrap,
1077
+ body[class*="s2member"] #wpwrap::before {
1078
+ background: #f0f0f0;
1079
+ }
1080
+
1081
+ table.ws-menu-page-table div.ws-menu-page-group {
1082
+ background: #f0f0f0;
1083
+ }
1084
+
1085
+ div.ws-menu-page {
1086
+ margin: 20px 20px 20px 0;
1087
+ }
1088
+
1089
+ table.ws-menu-page-table div.ws-menu-page-group-header,
1090
+ table.ws-menu-page-table div.ws-menu-page-group-header.open,
1091
+ table.ws-menu-page-table div.ws-menu-page-r-group-header.open {
1092
+ background: #f0f0f0;
1093
+ border-radius: 0;
1094
+ margin: 5px 0 0 0;
1095
+ max-width: 676px;
1096
+ }
1097
+
1098
+ table.ws-menu-page-table div.ws-menu-page-group.open {
1099
+ margin-bottom: 20px !important;
1100
+ }
1101
+
1102
+ table.ws-menu-page-table div.ws-menu-page-group,
1103
+ table.ws-menu-page-table div.ws-menu-page-group.open {
1104
+ border-radius: 0;
1105
+ margin: 0;
1106
+ padding: 25px;
1107
+ width: 100%;
1108
+ max-width: 700px;
1109
+ border-left: 5px solid #72aee6;
1110
+ }
1111
+
1112
+ table.ws-menu-page-table div.ws-menu-page-group-header.open {
1113
+ border-radius: 3px 3px 0 0;
1114
+ }
1115
+ table.ws-menu-page-table div.ws-menu-page-group.open {
1116
+ border-radius: 0 0 3px 3px;
1117
+ }
1118
+
1119
+ table.ws-menu-page-table div.ws-menu-page-group-header.open,
1120
+ table.ws-menu-page-table div.ws-menu-page-group.open {
1121
+ background: white;
1122
+ }
1123
+
1124
+ .ws-menu-page-table {
1125
+ margin-left: 150px;
1126
+ max-width: calc(100% - 150px);
1127
+ }
1128
+
1129
+ table.ws-menu-page-table td.ws-menu-page-table-r {
1130
+ width: 255px !important;
1131
+ }
1132
+ table.ws-menu-page-table td.ws-menu-page-table-r > .wrapper {
1133
+ display: block !important;
1134
+ padding: 0 !important;
1135
+ }
1136
+ table.ws-menu-page-table td.ws-menu-page-table-r > .toggler {
1137
+ background: #2271b1;
1138
+ display: none !important;
1139
+ }
1140
+ table.ws-menu-page-table td.ws-menu-page-table-r > .toggler:hover {
1141
+ background: #72aee6;
1142
+ }
1143
+
1144
+ table.ws-menu-page-table td.ws-menu-page-table-r > .wrapper,
1145
+ table.ws-menu-page-table div.ws-menu-page-r-group-header,
1146
+ table.ws-menu-page-table div.ws-menu-page-r-group.open {
1147
+ background: #f0f0f0;
1148
+ padding-top: 0;
1149
+ }
1150
+
1151
+
1152
+ table.ws-menu-page-table div.ws-menu-page-r-group-header,
1153
+ table.ws-menu-page-table div.ws-menu-page-r-group-header:hover,
1154
+ table.ws-menu-page-table div.ws-menu-page-r-group-header.open,
1155
+ table.ws-menu-page-table div.ws-menu-page-r-group-header::after,
1156
+ table.ws-menu-page-table div.ws-menu-page-r-group-header:hover::after,
1157
+ table.ws-menu-page-table div.ws-menu-page-r-group-header.open::after {
1158
+ color: #dba617;
1159
+ }
1160
+ table.ws-menu-page-table div.ws-menu-page-r-group-header:hover,
1161
+ table.ws-menu-page-table div.ws-menu-page-r-group-header:hover::after {
1162
+ color: #f0c33c;
1163
+ }
1164
+
1165
+ table.ws-menu-page-table div.ws-menu-page-r-group.open > p {
1166
+ text-align: left !important;
1167
+ }
1168
+
1169
+
1170
+ .feedburnerFeedBlock li:first-child {
1171
+ font-weight: bold;
1172
+ }
1173
+ div.ws-menu-page-updates input[type="submit"] {
1174
+ width: auto;
1175
+ }
1176
+ div.ws-menu-page-updates {
1177
+ margin-bottom: 35px !important;
1178
+ }
1179
+
1180
+ div.ws-menu-page-kb img,
1181
+ div.ws-menu-page-videos img,
1182
+ div.ws-menu-page-support img,
1183
+ div.ws-menu-page-donations img {
1184
+ display: none !important;
1185
+ }
1186
+ div.ws-menu-page-others,
1187
+ div.ws-menu-page-kb,
1188
+ div.ws-menu-page-videos,
1189
+ div.ws-menu-page-support,
1190
+ div.ws-menu-page-donations {
1191
+ line-height: .9em;
1192
+ font-size: 9em;
1193
+ margin-left: 10px !important;
1194
+ }
1195
+ div.ws-menu-page-others img {
1196
+ margin-left: -10px;
1197
+ width: 150px !important;
1198
+ }
1199
+ div.ws-menu-page-others {
1200
+ height: 108px;
1201
+ overflow: hidden;
1202
+ margin-bottom: 30px !important;
1203
+ }
1204
+ div.ws-menu-page-support {
1205
+ line-height: .7em!important;
1206
+ }
1207
+ div.ws-menu-page-donations {
1208
+ line-height: 1em!important;
1209
+ }
1210
+ td.ws-menu-page-table-r a:before {
1211
+ color: #3a424a;
1212
+ }
1213
+ td.ws-menu-page-table-r a:hover:before {
1214
+ color: #dba617;
1215
+ }
1216
+ div.ws-menu-page-donations a:hover:before {
1217
+ color: #dba617;
1218
+ }
1219
+ div.ws-menu-page-others:hover {
1220
+ filter: hue-rotate(210deg) brightness(200%);
1221
+ }
1222
+
1223
+ div.ws-menu-page-kb a:before {
1224
+ font-family: fontawesome;
1225
+ content: "\f02d";
1226
+ font-size: 1.05em;
1227
+ margin-left: 2px;
1228
+ }
1229
+ div.ws-menu-page-videos a:before {
1230
+ font-family: fontawesome;
1231
+ content: "\f16a";
1232
+ }
1233
+ div.ws-menu-page-support a:before {
1234
+ font-family: fontawesome;
1235
+ content: "\f0e6";
1236
+ }
1237
+ div.ws-menu-page-donations a:before {
1238
+ font-family: fontawesome;
1239
+ content: "\f004";
1240
+ font-size: .9em;
1241
+ margin-left: 2px;
1242
+ }
1243
+
1244
+ div.ws-menu-page * {
1245
+ text-shadow: none !important;
1246
+ box-shadow: none !important;
1247
+ }
1248
+
1249
+ div.ws-menu-page-toolbox div.links {
1250
+ text-align: right !important;
1251
+ letter-spacing: -1px;
1252
+ }
1253
+ div.ws-menu-page-toolbox i {
1254
+ margin-right: 2px !important;
1255
+ }
1256
+
1257
+ div.ws-menu-page > h2,
1258
+ div.ws-menu-page > h2::before,
1259
+ div.ws-menu-page > h2::after,
1260
+ table.ws-menu-page-table div.ws-menu-page-group-header {
1261
+ background: none;
1262
+ }
1263
+
1264
+ div.ws-menu-page > h2 {
1265
+ background: no-repeat url('<?php echo $i; ?>/logo-square-big.png');
1266
+ height: 130px;
1267
+ padding: 10px 0 0 150px;
1268
+ margin: 0 0 15px 0;
1269
+ font-size: 2.8em;
1270
+ }
1271
+
1272
+ div.ws-menu-page div.ws-menu-page-groups-show,
1273
+ div.ws-menu-page div.ws-menu-page-groups-hide {
1274
+ display: none;
1275
+ }
1276
+
1277
+ table.ws-menu-page-table div.ws-menu-page-group-header::after {
1278
+ color: #3a424a
1279
+ }
1280
+ table.ws-menu-page-table div.ws-menu-page-group-header:hover::after {
1281
+ color: #72aee6
1282
+ }
1283
+ table.ws-menu-page-table div.ws-menu-page-group-header.open::after {
1284
+ color: #2271b1
1285
+ }
1286
+
1287
+ div.ws-menu-page * {
1288
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
1289
+ }
1290
+ div.ws-menu-page *.fa {
1291
+ font-family: FontAwesome !important;
1292
+ margin-right: 1px;
1293
+ }
1294
+
1295
+ h1,
1296
+ h2,
1297
+ h3,
1298
+ h4,
1299
+ table.ws-menu-page-table div.ws-menu-page-group-header,
1300
+ table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > th {
1301
+ color: #3a424a !important;
1302
+ text-shadow: none;
1303
+ line-height: 1em;
1304
+ }
1305
+
1306
+ table.ws-menu-page-table div.ws-menu-page-group-header {
1307
+ font-weight: 400;
1308
+ }
1309
+
1310
+ div.ws-menu-page a {
1311
+ color: #2271b1 !important;
1312
+ text-decoration: none;
1313
+ }
1314
+ div.ws-menu-page a:hover {
1315
+ color: #72aee6 !important;
1316
+ text-decoration: none;
1317
+ }
1318
+
1319
+ table.ws-menu-page-table div.ws-menu-page-group-header {
1320
+ color: #3a424a !important;
1321
+ border-left: 5px solid #f0f0f0;
1322
+ }
1323
+ table.ws-menu-page-table div.ws-menu-page-group-header:hover {
1324
+ color: #72aee6 !important;
1325
+ border-left: 5px solid #72aee6;
1326
+ }
1327
+ table.ws-menu-page-table div.ws-menu-page-group-header.open {
1328
+ color: #2271b1 !important;
1329
+ border-left: 5px solid #72aee6;
1330
+ font-weight: 500;
1331
+ }
1332
+
1333
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) select,
1334
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) textarea,
1335
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) input:not([type="image"]):not([type="button"]):not([type="submit"]):not([type="radio"]):not([type="checkbox"]),
1336
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) select:focus,
1337
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) textarea:focus,
1338
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) input:not([type="image"]):not([type="button"]):not([type="submit"]):not([type="radio"]):not([type="checkbox"]):focus,
1339
+ table.ws-menu-page-table div.ws-menu-page-group table.form-table > tbody > tr > td > div.ws-menu-page-scrollbox {
1340
+ background: white;
1341
+ border: 1px solid lightgray;
1342
+ color: #333;
1343
+ }
1344
+
1345
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) p.submit button[type="submit"],
1346
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) p.submit input[type="submit"] {
1347
+ width: auto;
1348
+ }
1349
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) button,
1350
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) button[type="submit"],
1351
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) input[type="submit"],
1352
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) input[type="button"],
1353
+ div.ws-menu-page div.ws-menu-page-number-button-tabs > a {
1354
+ background: #2271b1;
1355
+ border: 0;
1356
+ border-radius: 3px;
1357
+ font-weight: normal;
1358
+ font-size: 1em;
1359
+ line-height: 2;
1360
+ color: white !important;
1361
+ }
1362
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) button:hover,
1363
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) button[type="submit"]:hover,
1364
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) input[type="submit"]:hover,
1365
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) input[type="button"]:hover,
1366
+ div.ws-menu-page div.ws-menu-page-number-button-tabs > a:hover {
1367
+ background: #135e96;
1368
+ border: 0;
1369
+ border-radius: 3px;
1370
+ color: white !important;
1371
+ }
1372
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) button:active,
1373
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) button[type="submit"]:active,
1374
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) input[type="button"]:active,
1375
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) input[type="submit"]:active {
1376
+ transform: none;
1377
+ }
1378
+ div.ws-menu-page div.ws-menu-page-number-button-tabs > a.-current:hover {
1379
+ color: white !important;
1380
+ }
1381
+ div.ws-menu-page div.ws-menu-page-number-button-tabs > a.-current {
1382
+ color: #135e96 !important;
1383
+ border: 1px solid;
1384
+ }
1385
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) input[type="button"].ws-menu-page-right {
1386
+ margin: 0 0 10px 10px;
1387
+ }
1388
+
1389
+ table#ws-plugin--s2member-custom-reg-field-configuration-table tr.e {
1390
+ background-color: #ddd;
1391
+ }
1392
+
1393
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) div.ws-menu-page-hr {
1394
+ background: lightgray;
1395
+ }
1396
+ #ws-plugin--s2member-options-form > div {
1397
+ border-bottom: 0 !important;
1398
+ }
1399
+
1400
+ div.ws-menu-page code,
1401
+ div.ws-menu-page code *,
1402
+ div.ws-menu-page *.code {
1403
+ background: #f7f8f8 !important;
1404
+ border-radius: 3px !important;
1405
+ font-size: .9em !important;
1406
+ font-family: Consolas, Monaco, monospace !important;
1407
+ }
1408
+ div.ws-menu-page code,
1409
+ div.ws-menu-page *.code {
1410
+ margin: 10px 0;
1411
+ }
1412
+ div.ws-menu-page code * {
1413
+ margin: 0;
1414
+ }
1415
+ div.ws-menu-page > :not(.notice):not(.updated):not(.error) pre.code > code {
1416
+ color: #333;
1417
+ }
1418
+
1419
+ div.ws-menu-page div.info {
1420
+ background: #f0f6fc !important;
1421
+ border: 0 !important;
1422
+ }
1423
+ div.ws-menu-page .ws-menu-page-warning-hilite,
1424
+ div.ws-menu-page .ws-menu-page-warning-hilite code {
1425
+ background: #f86368 !important;
1426
+ }
1427
+
1428
+ div.ws-menu-page input[type="text"],
1429
+ div.ws-menu-page input[type="password"] {
1430
+ border-left: 5px solid lightgray !important;
1431
+ padding: 10px !important;
1432
+ margin: 5px 0 !important;
1433
+ max-width: 80%;
1434
+ }
1435
+ div.ws-menu-page textarea {
1436
+ border-left: 5px solid lightgray !important;
1437
+ padding: 10px !important;
1438
+ margin: 5px 0 !important;
1439
+ max-width: 80%;
1440
+ min-height: 5em;
1441
+ line-height: 1.2em !important;
1442
+ }
1443
+
1444
+ div.ws-menu-page select {
1445
+ background: #fff url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') no-repeat right 5px top 55% !important;
1446
+ border-bottom: 3px dotted lightgray !important;
1447
+ }
1448
+
1449
+ th.ws-menu-page-th-side {
1450
+ display: none;
1451
+ }
1452
+
1453
+ div.ws-menu-page-group.open form {
1454
+ max-width: 85%;
1455
+ }
1456
+
1457
+ div.ws-menu-page-group.open form table.btn-generator {
1458
+ max-width: 70ch;
1459
+ margin: 0 0 1em 0;
1460
+ }
1461
+ .btn-generator tr td {
1462
+ padding: 0;
1463
+ margin: 0;
1464
+ max-width: 55ch;
1465
+ vertical-align: baseline !important;
1466
+ height: 1em;
1467
+ }
1468
+ .btn-generator tr td:first-child {
1469
+ min-width: 20ch;
1470
+ }
1471
+
1472
+ .btn-generator tr td input[type="text"],
1473
+ .btn-generator tr td select {
1474
+ vertical-align: baseline;
1475
+ margin: 0 !important;
1476
+ }
1477
+ .btn-generator tr td select.regular-term {
1478
+ max-width: 42ch !important;
1479
+ }
1480
+ .btn-generator tr td input.amount {
1481
+ max-width: 9ch;
1482
+ border-color: #b8e6bf !important;
1483
+ }
1484
+ .btn-generator tr td input.trial-period {
1485
+ max-width: 7ch;
1486
+ }
1487
+ #ws-plugin--s2member-reg-link,
1488
+ #ws-plugin--s2member-sp-link {
1489
+ display: block;
1490
+ border: 1px solid lightgray;
1491
+ border-radius: 4px !important;
1492
+ line-height: .5em;
1493
+ padding: 10px;
1494
+ margin-top: 1em;
1495
+ }
1496
+
1497
+ .btn-generator tr.sp-lead td:first-child,
1498
+ .btn-generator tr.sp-additional td:first-child {
1499
+ text-align: right;
1500
+ vertical-align: top !important;
1501
+ }
1502
+ .btn-generator tr.sp-lead td:first-child i,
1503
+ .btn-generator tr.sp-additional td:first-child i {
1504
+ margin: .5em;
1505
+ }
1506
+ .btn-generator tr.sp-lead td select,
1507
+ .btn-generator tr.sp-additional td select {
1508
+ min-width: 52ch !important;
1509
+ vertical-align: top;
1510
+ }
1511
+ .co-style {
1512
+ display: none;
1513
+ }
1514
+
1515
+ div.ws-menu-page .coupons-table input[type="text"] {
1516
+ margin: 0 !important;
1517
+ padding: 5px !important;
1518
+ max-width: 100% !important;
1519
+ }
1520
+ table.ws-menu-page-table table.coupons-table th {
1521
+ vertical-align: top !important;
1522
+ }
src/includes/menu-pages/paypal-buttons.inc.php CHANGED
@@ -77,11 +77,36 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
77
 
78
  echo '<td>' . "\n";
79
  echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
80
- echo '<p id="ws-plugin--s2member-level' . $n . '-trial-line">I\'ll offer the first <input type="text" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-trial-period" value="0" size="6" /> <select id="ws-plugin--s2member-level' . $n . '-trial-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-trial-terms.php"))) . '</select> @ $<input type="text" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-trial-amount" value="0.00" size="4" /></p>' . "\n";
81
- echo '<p><span id="ws-plugin--s2member-level' . $n . '-trial-then">Then, </span>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-level' . $n . '-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-regular-terms.php"))) . '</select></p>' . "\n";
82
- echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-level' . $n . '-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalButtonGenerate(\'level' . $n . '\');" /></p>' . "\n";
83
- echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-desc" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"]) . ' / description and pricing details here." size="73" /></p>' . "\n";
84
- echo '<p' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities (comma-delimited) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member → API Scripting → Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-ccaps" size="40" /></p>' . "\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  echo '</form>' . "\n";
86
  echo '</td>' . "\n";
87
 
@@ -103,7 +128,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
103
 
104
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
105
  echo '<strong>Resulting PayPal Button Code:</strong> (ultimately, your Shortcode will produce this snippet)<br />' . "\n";
106
- echo '<textarea id="ws-plugin--s2member-level' . $n . '-button" rows="8" wrap="off" onclick="this.select ();">';
107
  $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-checkout-button.php")));
108
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
109
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
@@ -118,7 +143,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
118
  $ws_plugin__s2member_temp_s = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr (home_url ())), $ws_plugin__s2member_temp_s);
119
  echo format_to_edit ($ws_plugin__s2member_temp_s);
120
  echo '</textarea><br />' . "\n";
121
- echo '&uarr; <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
122
  echo '</div>' . "\n";
123
 
124
  echo '</form>' . "\n";
@@ -144,7 +169,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
144
 
145
  echo '<div class="ws-menu-page-section ws-plugin--s2member-ccap-buttons-section">' . "\n";
146
  echo '<h3>Button Code Generator For Independent Custom Capabilities</h3>' . "\n";
147
- echo '<p>This is VERY advanced. For further details, please check your Dashboard: <strong>s2Member → API Scripting → Custom Capabiities</strong>.</p>' . "\n";
148
  echo '<p>With s2Member, you can sell one or more Custom Capabilities using Buy Now functionality, to "existing" Users/Members, regardless of which Membership Level they have on your site <em>(i.e., you could even sell Independent Custom Capabilities to Users at Membership Level #0, normally referred to as Free Subscribers, if you like)</em>. So this is quite flexible. Independent Custom Capabilities do NOT rely on any specific Membership Level. That\'s why s2Member refers to these as `Independent` Custom Capabilities, because you can sell Capabilities this way, through Buy Now functionality, and the Customer\'s Membership Level Access, along with any existing paid Subscription they may already have with you, will remain completely unaffected. That being said, if you intend to charge a recurring fee for Custom Capabilities, please use a <code>Subscr. Modification Button</code> instead; because Independent Custom Capabilities can only be sold through Buy Now functionality.</p>' . "\n";
149
  echo '<p>Independent Custom Capabilities are added to a Customer\'s account immediately after checkout, and the Customer will have the Custom Capabilities for as long as their Membership lasts, based on their primary Subscription with your site, and/or forever, if they have a Lifetime account with you. In other words, Independent Custom Capabilities will exist on the Customer\'s account forever, or until an EOT <em>(End Of Term)</em> occurs on their primary Subscription with you; in which case s2Member would demote or delete the Customer\'s account <em>(based on your EOT configuration)</em>, and all Custom Capabilities are removed as well.</p>' . "\n";
150
  echo '<p>Very simple. All you do is customize the form fields provided, for each set of Custom Capabilities that you plan to sell. Then press (Generate Button Code). These special PayPal Buttons are customized to work with s2Member seamlessly. The Customer will be granted additional access to one or more Custom Capabilities that you specify; while the Customer\'s Membership Level Access and any existing paid Subscription they may already have with you, will remain completely unaffected.</p>' . "\n";
@@ -165,10 +190,32 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
165
 
166
  echo '<td>' . "\n";
167
  echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
168
- echo '<p>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--s2member-ccap-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-ccap-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-ccap-terms.php"))) . '</select></p>' . "\n";
169
- echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--s2member-ccap-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-ccap-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalCcapButtonGenerate();" /></p>' . "\n";
170
- echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--s2member-ccap-desc" value="Description and pricing details here." size="73" /></p>' . "\n";
171
- echo '<p>Custom Capabilities (comma-delimited) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member → API Scripting → Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-ccap-ccaps" size="40" /></p>' . "\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
  echo '</form>' . "\n";
173
  echo '</td>' . "\n";
174
 
@@ -185,7 +232,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
185
 
186
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
187
  echo '<strong>Resulting PayPal Button Code:</strong> (ultimately, your Shortcode will produce this snippet)<br />' . "\n";
188
- echo '<textarea id="ws-plugin--s2member-ccap-button" rows="8" wrap="off" onclick="this.select ();">';
189
  $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-ccaps-checkout-button.php")));
190
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
191
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
@@ -198,7 +245,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
198
  $ws_plugin__s2member_temp_s = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr (home_url ())), $ws_plugin__s2member_temp_s);
199
  echo format_to_edit ($ws_plugin__s2member_temp_s);
200
  echo '</textarea><br />' . "\n";
201
- echo '&uarr; <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
202
  echo '</div>' . "\n";
203
 
204
  echo '</form>' . "\n";
@@ -266,7 +313,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
266
 
267
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
268
  echo '<strong>Resulting PayPal Button Code:</strong> (ultimately, your Shortcode will produce this snippet)<br />' . "\n";
269
- echo '<textarea id="ws-plugin--s2member-cancellation-button" rows="8" wrap="off" onclick="this.select ();">';
270
  $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-cancellation-button.php")));
271
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
272
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
@@ -308,15 +355,36 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
308
 
309
  echo '<td>' . "\n";
310
  echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
311
- echo '<p>Paid Membership Level#: <select id="ws-plugin--s2member-reg-link-level" style="min-width:200px;">' . "\n";
312
- for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
313
- echo '<option value="' . $n . '">s2Member Level #' . $n . '</option>' . "\n";
314
- echo '</select></p>' . "\n";
315
- echo '<p>Paid Subscr. ID: <input type="text" autocomplete="off" id="ws-plugin--s2member-reg-link-subscr-id" value="" size="50" /> <a href="#" onclick="alert(\'The Customer\\\'s Paid Subscr. ID (aka: Recurring Profile ID, Transaction ID) must be unique. This value can be obtained from inside your PayPal account under the History tab. Each paying Customer MUST be associated with a unique Paid Subscr. ID. If the Customer is NOT associated with a Paid Subscr. ID, you will need to generate a unique value for this field on your own. But keep in mind, s2Member will be unable to maintain future communication with the PayPal IPN (i.e., Notification) service if this value does not reflect a real Paid Subscr. ID that exists in your PayPal History log.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
316
- echo '<p>Custom String Value: <input type="text" autocomplete="off" id="ws-plugin--s2member-reg-link-custom" value="' . esc_attr ($_SERVER["HTTP_HOST"]) . '" size="30" /> <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\n' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1">[?]</a> <input type="button" value="Generate Access Link" onclick="ws_plugin__s2member_paypalRegLinkGenerate();" /> <img id="ws-plugin--s2member-reg-link-loading" src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/src/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
317
- echo '<p' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>Custom Capabilities (comma-delimited) <a href="#" onclick="alert(\'Optional. This is VERY advanced.\\nSee: s2Member API Scripting → Custom Capabilities.\'); return false;" tabindex="-1">[?]</a> <input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-reg-link-ccaps" size="40" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></p>' . "\n";
318
- echo '<p>Fixed Term Length (for Buy Now transactions): <input type="text" autocomplete="off" id="ws-plugin--s2member-reg-link-fixed-term" value="" size="10" /> <a href="#" onclick="alert(\'If the Customer purchased Membership through a Buy Now transaction (i.e., there is no Initial/Trial Period and no recurring charges for ongoing access), you may configure a Fixed Term Length in this field. This way the Customer\\\'s Membership Access is automatically revoked by s2Member at the appropriate time. This will be a numeric value, followed by a space, then a single letter.\\n\\nHere are some examples:\\n\\n1 D (this means 1 Day)\\n1 W (this means 1 Week)\\n1 M (this means 1 Month)\\n1 Y (this means 1 Year)\\n1 L (this means 1 Lifetime)\'); return false;">[?]</a></p>' . "\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
319
  echo '<p id="ws-plugin--s2member-reg-link" style="display:none;"></p>' . "\n";
 
320
  echo '</form>' . "\n";
321
  echo '</td>' . "\n";
322
 
@@ -359,27 +427,43 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
359
  echo '<td>' . "\n";
360
  echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
361
 
362
- echo '<p><select id="ws-plugin--s2member-sp-leading-id">' . "\n";
363
- echo '<option value="">&mdash; Select a Leading Post/Page that you\'ve protected &mdash;</option>' . "\n";
364
-
365
- $ws_plugin__s2member_temp_a_singulars = c_ws_plugin__s2member_utils_gets::get_all_singulars_with_sp ("exclude-conflicts");
366
-
367
- foreach ($ws_plugin__s2member_temp_a_singulars as $ws_plugin__s2member_temp_o)
368
- echo '<option value="' . esc_attr ($ws_plugin__s2member_temp_o->ID) . '">' . esc_html ($ws_plugin__s2member_temp_o->post_title) . '</option>' . "\n";
369
-
370
- echo '</select> <a href="#" onclick="alert(\'Required. The Leading Post/Page, is what your Customers will land on after checkout.\n\n*Tip* If there are no Posts/Pages in the menu, it\\\'s because you\\\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member → Restriction Options → Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
371
-
372
- echo '<p><select id="ws-plugin--s2member-sp-additional-ids" multiple="multiple" style="height:100px;">' . "\n";
373
- echo '<optgroup label="&mdash; Package Additional Posts/Pages that you\'ve protected &mdash;">' . "\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
374
 
375
- foreach ($ws_plugin__s2member_temp_a_singulars as $ws_plugin__s2member_temp_o)
376
- echo '<option value="' . esc_attr ($ws_plugin__s2member_temp_o->ID) . '">' . esc_html ($ws_plugin__s2member_temp_o->post_title) . '</option>' . "\n";
377
-
378
- echo '</optgroup></select> <a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page (they\\\'ll land on your Leading Post/Page after checkout), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically (i.e., only one Access Link is needed, and s2Member generates this automatically). However, you will STILL need to design your Leading Post/Page (which is what a Customer will actually land on), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* s2Member sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this menu, it\\\'s because you\\\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member → Restriction Options → Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
379
-
380
- echo '<p>I want to charge: $<input type="text" autocomplete="off" id="ws-plugin--s2member-sp-amount" value="0.01" size="4" /> / <select id="ws-plugin--s2member-sp-hours">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-sp-hours.php"))) . '</select></p>' . "\n";
381
- echo '<p>Description: <input type="text" autocomplete="off" id="ws-plugin--s2member-sp-desc" value="Description and pricing details here." size="68" /></p>' . "\n";
382
- echo '<p>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal Button image.\'); return false;" tabindex="-1">[?]</a>: <input type="text" autocomplete="off" id="ws-plugin--s2member-sp-page-style" value="paypal" size="18" /> <select id="ws-plugin--s2member-sp-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select> <input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalSpButtonGenerate();" /></p>' . "\n";
383
  echo '</form>' . "\n";
384
  echo '</td>' . "\n";
385
 
@@ -396,7 +480,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
396
 
397
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
398
  echo '<strong>Resulting PayPal Button Code:</strong> (ultimately, your Shortcode will produce this snippet)<br />' . "\n";
399
- echo '<textarea id="ws-plugin--s2member-sp-button" rows="8" wrap="off" onclick="this.select ();">';
400
  $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-sp-checkout-button.php")));
401
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
402
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
@@ -409,7 +493,7 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
409
  $ws_plugin__s2member_temp_s = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr (home_url ())), $ws_plugin__s2member_temp_s);
410
  echo format_to_edit ($ws_plugin__s2member_temp_s);
411
  echo '</textarea><br />' . "\n";
412
- echo '&uarr; <em>This <span class="ws-menu-page-hilite">may contain PHP code too</span>; so be careful if you use this.</em>' . "\n";
413
  echo '</div>' . "\n";
414
 
415
  echo '</form>' . "\n";
@@ -443,25 +527,29 @@ if (!class_exists ("c_ws_plugin__s2member_menu_page_paypal_buttons"))
443
  echo '<td>' . "\n";
444
  echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
445
 
446
- echo '<p><select id="ws-plugin--s2member-sp-link-leading-id">' . "\n";
447
- echo '<option value="">&mdash; Select a Leading Post/Page that you\'ve protected &mdash;</option>' . "\n";
448
-
449
- $ws_plugin__s2member_temp_a_singulars = c_ws_plugin__s2member_utils_gets::get_all_singulars_with_sp ("exclude-conflicts");
450
-
451
- foreach ($ws_plugin__s2member_temp_a_singulars as $ws_plugin__s2member_temp_o)
452
- echo '<option value="' . esc_attr ($ws_plugin__s2member_temp_o->ID) . '">' . esc_html ($ws_plugin__s2member_temp_o->post_title) . '</option>' . "\n";
453
-
454
- echo '</select> <a href="#" onclick="alert(\'Required. The Leading Post/Page, is what your Customers will land on after checkout.\n\n*Tip* If there are no Posts/Pages in the menu, it\\\'s because you\\\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member → Restriction Options → Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
455
-
456
- echo '<p><select id="ws-plugin--s2member-sp-link-additional-ids" multiple="multiple" style="height:100px; min-width:450px;">' . "\n";
457
- echo '<optgroup label="&mdash; Package Additional Posts/Pages that you\'ve protected &mdash;">' . "\n";
458
-
459
- foreach ($ws_plugin__s2member_temp_a_singulars as $ws_plugin__s2member_temp_o)
460
- echo '<option value="' . esc_attr ($ws_plugin__s2member_temp_o->ID) . '">' . esc_html ($ws_plugin__s2member_temp_o->post_title) . '</option>' . "\n";
461
-
462
- echo '</optgroup></select> <a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page (they\\\'ll land on your Leading Post/Page after checkout), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically (i.e., only one Access Link is needed, and s2Member generates this automatically). However, you will STILL need to design your Leading Post/Page (which is what a Customer will actually land on), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* s2Member sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this menu, it\\\'s because you\\\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member → Restriction Options → Specific Post/Page Access.\'); return false;" tabindex="-1">[?]</a></p>' . "\n";
 
 
 
 
 
463
 
464
- echo '<p><select id="ws-plugin--s2member-sp-link-hours">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-sp-hours.php"))) . '</select> <input type="button" value="Generate Access Link" onclick="ws_plugin__s2member_paypalSpLinkGenerate();" /> <img id="ws-plugin--s2member-sp-link-loading" src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/src/images/ajax-loader.gif" alt="" style="display:none;" /></p>' . "\n";
465
  echo '<p id="ws-plugin--s2member-sp-link" style="display:none;"></p>' . "\n";
466
  echo '</form>' . "\n";
467
  echo '</td>' . "\n";
77
 
78
  echo '<td>' . "\n";
79
  echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
80
+
81
+ echo '<table class="btn-generator">
82
+ <tr id="ws-plugin--s2member-level' . $n . '-trial-line" class="trial">
83
+ <td>I\'ll offer the first</td>
84
+ <td><input type="text" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-trial-period" class="trial-period" value="0" size="6" /> <select id="ws-plugin--s2member-level' . $n . '-trial-term" class="trial-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-trial-terms.php"))) . '</select> for <input type="text" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-trial-amount" class="amount" value="0.00" size="4" /></td>
85
+ </tr>
86
+ <tr class="regular">
87
+ <td><span id="ws-plugin--s2member-level' . $n . '-trial-then">Then </span>I want to charge</td>
88
+ <td><input type="text" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-amount" class="amount" value="0.01" size="4" /> <select id="ws-plugin--s2member-level' . $n . '-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select></td>
89
+ </tr>
90
+ <tr>
91
+ <td>&nbsp;</td>
92
+ <td><select id="ws-plugin--s2member-level' . $n . '-term" class="regular-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-regular-terms.php"))) . '</select></td>
93
+ </tr>
94
+ <tr class="co-style">
95
+ <td>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal Button image.\'); return false;" tabindex="-1"><i class="fa fa-question-circle icon"></i></a></td>
96
+ <td><input type="text" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-page-style" value="paypal" size="18" /></td>
97
+ </tr>
98
+ <tr class="desc">
99
+ <td>Description:</td>
100
+ <td><input type="text" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-desc" value="' . format_to_edit ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_label"]) . ' / description and pricing details here." size="73" /></td>
101
+ </tr>
102
+ <tr class="ccaps" ' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>
103
+ <td>Custom Capabilities <a href="#" onclick="alert(\'Optional.\\nSee: s2Member → API Scripting → Custom Capabilities.\\n\\n*ADVANCED TIP: You can specifiy a comma-separated list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\\n\\nOr to just (Remove All) and (Add) nothing:\\n-all\'); return false;" tabindex="-1"><i class="fa fa-question-circle icon"></i></a></td>
104
+ <td><input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-level' . $n . '-ccaps" size="40" /></td>
105
+ </tr>
106
+ </table>
107
+ ';
108
+
109
+ echo '<input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalButtonGenerate(\'level' . $n . '\');" /></p>' . "\n";
110
  echo '</form>' . "\n";
111
  echo '</td>' . "\n";
112
 
128
 
129
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
130
  echo '<strong>Resulting PayPal Button Code:</strong> (ultimately, your Shortcode will produce this snippet)<br />' . "\n";
131
+ echo '<textarea id="ws-plugin--s2member-level' . $n . '-button" rows="2" wrap="off" onclick="this.select ();">';
132
  $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-checkout-button.php")));
133
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
134
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
143
  $ws_plugin__s2member_temp_s = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr (home_url ())), $ws_plugin__s2member_temp_s);
144
  echo format_to_edit ($ws_plugin__s2member_temp_s);
145
  echo '</textarea><br />' . "\n";
146
+ echo '&uarr; <em>This <span class="ws-menu-page-hilite">contains PHP code with s2 constants</span>, so it needs to be used in WordPress and with PHP execution possible.</em>' . "\n";
147
  echo '</div>' . "\n";
148
 
149
  echo '</form>' . "\n";
169
 
170
  echo '<div class="ws-menu-page-section ws-plugin--s2member-ccap-buttons-section">' . "\n";
171
  echo '<h3>Button Code Generator For Independent Custom Capabilities</h3>' . "\n";
172
+ echo '<p>For further details, please check your Dashboard: <strong>s2Member → API Scripting → Custom Capabiities</strong>.</p>' . "\n";
173
  echo '<p>With s2Member, you can sell one or more Custom Capabilities using Buy Now functionality, to "existing" Users/Members, regardless of which Membership Level they have on your site <em>(i.e., you could even sell Independent Custom Capabilities to Users at Membership Level #0, normally referred to as Free Subscribers, if you like)</em>. So this is quite flexible. Independent Custom Capabilities do NOT rely on any specific Membership Level. That\'s why s2Member refers to these as `Independent` Custom Capabilities, because you can sell Capabilities this way, through Buy Now functionality, and the Customer\'s Membership Level Access, along with any existing paid Subscription they may already have with you, will remain completely unaffected. That being said, if you intend to charge a recurring fee for Custom Capabilities, please use a <code>Subscr. Modification Button</code> instead; because Independent Custom Capabilities can only be sold through Buy Now functionality.</p>' . "\n";
174
  echo '<p>Independent Custom Capabilities are added to a Customer\'s account immediately after checkout, and the Customer will have the Custom Capabilities for as long as their Membership lasts, based on their primary Subscription with your site, and/or forever, if they have a Lifetime account with you. In other words, Independent Custom Capabilities will exist on the Customer\'s account forever, or until an EOT <em>(End Of Term)</em> occurs on their primary Subscription with you; in which case s2Member would demote or delete the Customer\'s account <em>(based on your EOT configuration)</em>, and all Custom Capabilities are removed as well.</p>' . "\n";
175
  echo '<p>Very simple. All you do is customize the form fields provided, for each set of Custom Capabilities that you plan to sell. Then press (Generate Button Code). These special PayPal Buttons are customized to work with s2Member seamlessly. The Customer will be granted additional access to one or more Custom Capabilities that you specify; while the Customer\'s Membership Level Access and any existing paid Subscription they may already have with you, will remain completely unaffected.</p>' . "\n";
190
 
191
  echo '<td>' . "\n";
192
  echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
193
+
194
+ echo '<table class="btn-generator">
195
+ <tr>
196
+ <td>I want to charge</td>
197
+ <td><input type="text" autocomplete="off" id="ws-plugin--s2member-ccap-amount" class="amount" value="0.01" size="4" /> <select id="ws-plugin--s2member-ccap-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select></td>
198
+ </tr>
199
+ <tr class="ccap-term">
200
+ <td>&nbsp;</td>
201
+ <td><select id="ws-plugin--s2member-ccap-term">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-membership-ccap-terms.php"))) . '</select></td>
202
+ </tr>
203
+ <tr class="co-style">
204
+ <td>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal Button image.\'); return false;" tabindex="-1"><i class="fa fa-question-circle icon"></i></a></td>
205
+ <td><input type="text" autocomplete="off" id="ws-plugin--s2member-ccap-page-style" value="paypal" size="18" /></td>
206
+ </tr>
207
+ <tr class="desc">
208
+ <td>Description:</td>
209
+ <td><input type="text" autocomplete="off" id="ws-plugin--s2member-ccap-desc" value="Description and pricing details here." size="73" /></td>
210
+ </tr>
211
+ <tr class="ccaps">
212
+ <td>Custom Capabilities <a href="#" onclick="alert(\'See: s2Member → API Scripting → Custom Capabilities.\\n\\nSpecifiy a comma-separed list of Custom Capabilities that will be (Added) with this purchase. Or, you could tell s2Member to (Remove All) Custom Capabilities that may or may not already exist for a particular Member, and (Add) only the new ones that you specify. To do this, just start your list of Custom Capabilities with `-all`.\\n\\nSo instead of just (Adding) Custom Capabilities:\\nmusic,videos,archives,gifts\\n\\nYou could (Remove All) that may already exist, and then (Add) new ones:\\n-all,calendar,forums,tools\'); return false;" tabindex="-1"><i class="fa fa-question-circle icon"></i></a></td>
213
+ <td><input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-ccap-ccaps" size="40" /></td>
214
+ </tr>
215
+ </table>
216
+ ';
217
+ echo '<input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalCcapButtonGenerate();" />';
218
+
219
  echo '</form>' . "\n";
220
  echo '</td>' . "\n";
221
 
232
 
233
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
234
  echo '<strong>Resulting PayPal Button Code:</strong> (ultimately, your Shortcode will produce this snippet)<br />' . "\n";
235
+ echo '<textarea id="ws-plugin--s2member-ccap-button" rows="2" wrap="off" onclick="this.select ();">';
236
  $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-ccaps-checkout-button.php")));
237
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
238
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
245
  $ws_plugin__s2member_temp_s = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr (home_url ())), $ws_plugin__s2member_temp_s);
246
  echo format_to_edit ($ws_plugin__s2member_temp_s);
247
  echo '</textarea><br />' . "\n";
248
+ echo '&uarr; <em>This <span class="ws-menu-page-hilite">contains PHP code with s2 constants</span>, so it needs to be used in WordPress and with PHP execution possible.</em>'. "\n";
249
  echo '</div>' . "\n";
250
 
251
  echo '</form>' . "\n";
313
 
314
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
315
  echo '<strong>Resulting PayPal Button Code:</strong> (ultimately, your Shortcode will produce this snippet)<br />' . "\n";
316
+ echo '<textarea id="ws-plugin--s2member-cancellation-button" rows="2" wrap="off" onclick="this.select ();">';
317
  $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-cancellation-button.php")));
318
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
319
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
355
 
356
  echo '<td>' . "\n";
357
  echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
358
+
359
+ echo '<table class="btn-generator">
360
+ <tr class="level">
361
+ <td>Paid Membership Level</td>
362
+ <td><select id="ws-plugin--s2member-reg-link-level" style="min-width:200px;">';
363
+ for ($n = 1; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)
364
+ echo '<option value="' . $n . '">s2Member Level ' . $n . '</option>';
365
+ echo '</select></td>
366
+ </tr>
367
+ <tr class="subscr-id">
368
+ <td>Paid Subscr. ID <a href="#" onclick="alert(\'The Customer\\\'s Paid Subscr. ID (aka: Recurring Profile ID, Transaction ID) must be unique. This value can be obtained from inside your PayPal account under the History tab. Each paying Customer MUST be associated with a unique Paid Subscr. ID. If the Customer is NOT associated with a Paid Subscr. ID, you will need to generate a unique value for this field on your own. But keep in mind, s2Member will be unable to maintain future communication with the PayPal IPN (i.e., Notification) service if this value does not reflect a real Paid Subscr. ID that exists in your PayPal History log.\'); return false;" tabindex="-1"><i class="fa fa-question-circle icon"></i></a></td>
369
+ <td><input type="text" autocomplete="off" id="ws-plugin--s2member-reg-link-subscr-id" value="" size="50" /></td>
370
+ </tr>
371
+ <tr class="custom">
372
+ <td>Custom String Value <a href="#" onclick="alert(\'A Paid Subscription is always associated with a Custom String that is passed through the custom=\\\'\\\'' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '\\\'\\\' attribute of your Shortcode. This Custom Value, MUST always start with your domain name. However, you can also pipe delimit additional values after your domain, if you need to.\\n\\nFor example:\n' . c_ws_plugin__s2member_utils_strings::esc_js_sq (esc_attr ($_SERVER["HTTP_HOST"]), 3) . '|cv1|cv2|cv3\'); return false;" tabindex="-1"><i class="fa fa-question-circle icon"></i></a></td>
373
+ <td><input type="text" autocomplete="off" id="ws-plugin--s2member-reg-link-custom" value="' . esc_attr ($_SERVER["HTTP_HOST"]) . '" size="30" /></td>
374
+ </tr>
375
+ <tr class="ccaps"' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '>
376
+ <td>Custom Capabilities <a href="#" onclick="alert(\'Optional.\\nSee: s2Member → API Scripting → Custom Capabilities.\'); return false;" tabindex="-1"><i class="fa fa-question-circle icon"></i></a></td>
377
+ <td><input type="text" maxlength="125" autocomplete="off" id="ws-plugin--s2member-reg-link-ccaps" size="40" onkeyup="if(this.value.match(/[^a-z_0-9,]/)) this.value = jQuery.trim (jQuery.trim (this.value).replace (/[ \-]/g, \'_\').replace (/[^a-z_0-9,]/gi, \'\').toLowerCase ());" /></td>
378
+ </tr>
379
+ <tr class="term">
380
+ <td>Fixed Term Length <a href="#" onclick="alert(\'If the Customer purchased Membership through a Buy Now transaction (i.e., there is no Initial/Trial Period and no recurring charges for ongoing access), you may configure a Fixed Term Length in this field. This way the Customer\\\'s Membership Access is automatically revoked by s2Member at the appropriate time. This will be a numeric value, followed by a space, then a single letter.\\n\\nHere are some examples:\\n\\n1 D (this means 1 Day)\\n1 W (this means 1 Week)\\n1 M (this means 1 Month)\\n1 Y (this means 1 Year)\\n1 L (this means 1 Lifetime)\'); return false;"><i class="fa fa-question-circle icon"></i></a><br />(for Buy Now transactions)</td>
381
+ <td><input type="text" autocomplete="off" id="ws-plugin--s2member-reg-link-fixed-term" value="" size="10" /></td>
382
+ </tr>
383
+ </table>';
384
+
385
+ echo '<input type="button" value="Generate Access Link" onclick="ws_plugin__s2member_paypalRegLinkGenerate();" /> <img id="ws-plugin--s2member-reg-link-loading" src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/src/images/ajax-loader.gif" alt="" style="display:none;" />';
386
  echo '<p id="ws-plugin--s2member-reg-link" style="display:none;"></p>' . "\n";
387
+
388
  echo '</form>' . "\n";
389
  echo '</td>' . "\n";
390
 
427
  echo '<td>' . "\n";
428
  echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
429
 
430
+ echo '
431
+ <table class="btn-generator">
432
+ <tr class="sp-lead">
433
+ <td><a href="#" onclick="alert(\'Required. The Leading Post/Page, is what your Customers will land on after checkout.\n\n*Tip* If there are no Posts/Pages in the menu, it\\\'s because you\\\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member → Restriction Options → Specific Post/Page Access.\'); return false;" tabindex="-1"><i class="fa fa-question-circle icon"></i></a></td>
434
+ <td class="sp-lead"><select id="ws-plugin--s2member-sp-leading-id">
435
+ <option value="">Select a Leading Post/Page that you\'ve protected</option>';
436
+ $ws_plugin__s2member_temp_a_singulars = c_ws_plugin__s2member_utils_gets::get_all_singulars_with_sp ("exclude-conflicts");
437
+ foreach ($ws_plugin__s2member_temp_a_singulars as $ws_plugin__s2member_temp_o)
438
+ echo '<option value="' . esc_attr ($ws_plugin__s2member_temp_o->ID) . '">' . esc_html ($ws_plugin__s2member_temp_o->post_title) . '</option>' . "\n";
439
+ echo '</select></td>
440
+ </tr>
441
+ <tr class="sp-additional">
442
+ <td><a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page (they\\\'ll land on your Leading Post/Page after checkout), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically (i.e., only one Access Link is needed, and s2Member generates this automatically). However, you will STILL need to design your Leading Post/Page (which is what a Customer will actually land on), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* s2Member sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this menu, it\\\'s because you\\\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member → Restriction Options → Specific Post/Page Access.\'); return false;" tabindex="-1"><i class="fa fa-question-circle icon"></i></a></td>
443
+ <td><select id="ws-plugin--s2member-sp-additional-ids" multiple="multiple" style="height:100px;"><optgroup label="Package Additional Posts/Pages that you\'ve protected">';
444
+ foreach ($ws_plugin__s2member_temp_a_singulars as $ws_plugin__s2member_temp_o)
445
+ echo '<option value="' . esc_attr ($ws_plugin__s2member_temp_o->ID) . '">' . esc_html ($ws_plugin__s2member_temp_o->post_title) . '</option>' . "\n";
446
+ echo '</optgroup></select></td>
447
+ </tr>
448
+ <tr class="amount">
449
+ <td>I want to charge</td>
450
+ <td><input type="text" autocomplete="off" id="ws-plugin--s2member-sp-amount" class="amount" value="0.01" size="4" /> <select id="ws-plugin--s2member-sp-currency">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-currencies.php"))) . '</select></td>
451
+ </tr>
452
+ <tr class="expiration">
453
+ <td>Expiration</td>
454
+ <td><select id="ws-plugin--s2member-sp-hours">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-sp-hours.php"))) . '</select></td>
455
+ </tr>
456
+ <tr class="desc">
457
+ <td>Description</td>
458
+ <td><input type="text" autocomplete="off" id="ws-plugin--s2member-sp-desc" value="Description and pricing details here." size="68" /></td>
459
+ </tr>
460
+ <tr class="co-style">
461
+ <td>Checkout Page Style <a href="#" onclick="alert(\'Optional. This can be configured inside your PayPal account. PayPal allows you to create Custom Page Styles, and assign a unique name to them. You can add your own header image and color selection to the checkout form. Once you\\\'ve created a Custom Page Style at PayPal, you can enter that Page Style here.\\n\\nIn addition. The Shortcode below, provided by s2Member; supports an image attribute: image=\\\'\\\'default\\\'\\\'. This can be changed to a full URL, pointing to a custom image of your own; instead of the default PayPal Button image.\'); return false;" tabindex="-1"><i class="fa fa-question-circle icon"></i></a></td>
462
+ <td><input type="text" autocomplete="off" id="ws-plugin--s2member-sp-page-style" value="paypal" size="18" /></td>
463
+ </tr>
464
+ </table>';
465
+ echo '<input type="button" value="Generate Button Code" onclick="ws_plugin__s2member_paypalSpButtonGenerate();" />';
466
 
 
 
 
 
 
 
 
 
467
  echo '</form>' . "\n";
468
  echo '</td>' . "\n";
469
 
480
 
481
  echo '<div' . ((is_multisite () && c_ws_plugin__s2member_utils_conds::is_multisite_farm () && !is_main_site ()) ? ' style="display:none;"' : '') . '><br />' . "\n";
482
  echo '<strong>Resulting PayPal Button Code:</strong> (ultimately, your Shortcode will produce this snippet)<br />' . "\n";
483
+ echo '<textarea id="ws-plugin--s2member-sp-button" rows="2" wrap="off" onclick="this.select ();">';
484
  $ws_plugin__s2member_temp_s = trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/buttons/paypal-sp-checkout-button.php")));
485
  $ws_plugin__s2member_temp_s = preg_replace ("/%%endpoint%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr (($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_sandbox"]) ? "www.sandbox.paypal.com" : "www.paypal.com")), $ws_plugin__s2member_temp_s);
486
  $ws_plugin__s2member_temp_s = preg_replace ("/%%paypal_business%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["paypal_business"])), $ws_plugin__s2member_temp_s);
493
  $ws_plugin__s2member_temp_s = preg_replace ("/%%wpurl%%/", c_ws_plugin__s2member_utils_strings::esc_refs (esc_attr (home_url ())), $ws_plugin__s2member_temp_s);
494
  echo format_to_edit ($ws_plugin__s2member_temp_s);
495
  echo '</textarea><br />' . "\n";
496
+ echo '&uarr; <em>This <span class="ws-menu-page-hilite">contains PHP code with s2 constants</span>, so it needs to be used in WordPress and with PHP execution possible.</em>' . "\n";
497
  echo '</div>' . "\n";
498
 
499
  echo '</form>' . "\n";
527
  echo '<td>' . "\n";
528
  echo '<form onsubmit="return false;" autocomplete="off">' . "\n";
529
 
530
+ echo '<table class="btn-generator">
531
+ <tr class="sp-lead">
532
+ <td><a href="#" onclick="alert(\'Required. The Leading Post/Page, is what your Customers will land on after checkout.\n\n*Tip* If there are no Posts/Pages in the menu, it\\\'s because you\\\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member → Restriction Options → Specific Post/Page Access.\'); return false;" tabindex="-1"><i class="fa fa-question-circle icon"></i></a></td>
533
+ <td><select id="ws-plugin--s2member-sp-link-leading-id"><option value="">Select a Leading Post/Page that you\'ve protected</option>';
534
+ $ws_plugin__s2member_temp_a_singulars = c_ws_plugin__s2member_utils_gets::get_all_singulars_with_sp ("exclude-conflicts");
535
+ foreach ($ws_plugin__s2member_temp_a_singulars as $ws_plugin__s2member_temp_o)
536
+ echo '<option value="' . esc_attr ($ws_plugin__s2member_temp_o->ID) . '">' . esc_html ($ws_plugin__s2member_temp_o->post_title) . '</option>';
537
+ echo '</select></td>
538
+ </tr>
539
+ <tr class="sp-additional">
540
+ <td><a href="#" onclick="alert(\'Hold down your `Ctrl` key to select multiples.\\n\\nOptional. If you include Additional Posts/Pages, Customers will still land on your Leading Post/Page; BUT, they\\\'ll ALSO have access to some Additional Posts/Pages that you\\\'ve protected. This gives you the ability to create Post/Page Packages.\\n\\nIn other words, a Customer is sold a Specific Post/Page (they\\\'ll land on your Leading Post/Page after checkout), which might contain links to some other Posts/Pages that you\\\'ve packaged together under one transaction.\\n\\nBundling Additional Posts/Pages into one Package, authenticates the Customer for access to the Additional Posts/Pages automatically (i.e., only one Access Link is needed, and s2Member generates this automatically). However, you will STILL need to design your Leading Post/Page (which is what a Customer will actually land on), with links pointing to the other Posts/Pages. This way your Customers will have clickable links to everything they\\\'ve paid for.\\n\\n*Quick Summary* s2Member sends Customers to your Leading Post/Page, and also authenticates them for access to any Additional Posts/Pages automatically. You handle it from there.\\n\\n*Tip* If there are no Posts/Pages in this menu, it\\\'s because you\\\'ve not configured s2Member for Specific Post/Page Access yet. See: s2Member → Restriction Options → Specific Post/Page Access.\'); return false;" tabindex="-1"><i class="fa fa-question-circle icon"></i></a></td>
541
+ <td><select id="ws-plugin--s2member-sp-link-additional-ids" multiple="multiple" style="height:100px;"><optgroup label="Package Additional Posts/Pages that you\'ve protected">';
542
+ foreach ($ws_plugin__s2member_temp_a_singulars as $ws_plugin__s2member_temp_o)
543
+ echo '<option value="' . esc_attr ($ws_plugin__s2member_temp_o->ID) . '">' . esc_html ($ws_plugin__s2member_temp_o->post_title) . '</option>';
544
+ echo '</optgroup></select></td>
545
+ </tr>
546
+ <tr class="sp-expire">
547
+ <td>Expiration</td>
548
+ <td><select id="ws-plugin--s2member-sp-link-hours">' . trim (c_ws_plugin__s2member_utilities::evl (file_get_contents (dirname (dirname (__FILE__)) . "/templates/options/paypal-sp-hours.php"))) . '</select></td>
549
+ </tr>
550
+ </table>';
551
+ echo '<input type="button" value="Generate Access Link" onclick="ws_plugin__s2member_paypalSpLinkGenerate();" /> <img id="ws-plugin--s2member-sp-link-loading" src="' . esc_attr ($GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["dir_url"]) . '/src/images/ajax-loader.gif" alt="" style="display:none;" />';
552
 
 
553
  echo '<p id="ws-plugin--s2member-sp-link" style="display:none;"></p>' . "\n";
554
  echo '</form>' . "\n";
555
  echo '</td>' . "\n";
src/includes/translations/s2member.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: 210208\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/s2member\n"
7
- "POT-Creation-Date: 2021-02-08 19:31:13+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -1706,7 +1706,7 @@ msgctxt "s2member-front"
1706
  msgid "unused"
1707
  msgstr ""
1708
 
1709
- #: pro/src/includes/classes/sc-member-list-in.inc.php:210
1710
  msgctxt "s2member-front"
1711
  msgid "Search users..."
1712
  msgstr ""
2
  # This file is distributed under the same license as the package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: 210526\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/s2member\n"
7
+ "POT-Creation-Date: 2021-05-25 23:49:03+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
1706
  msgid "unused"
1707
  msgstr ""
1708
 
1709
+ #: pro/src/includes/classes/sc-member-list-in.inc.php:217
1710
  msgctxt "s2member-front"
1711
  msgid "Search users..."
1712
  msgstr ""
src/vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit8e33ba4249ec1a9d09b4e4fdd20f7055::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit33b208bdf6e6720d9c1548990588b9f5::getLoader();
src/vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit8e33ba4249ec1a9d09b4e4fdd20f7055
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit8e33ba4249ec1a9d09b4e4fdd20f7055
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit8e33ba4249ec1a9d09b4e4fdd20f7055', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit8e33ba4249ec1a9d09b4e4fdd20f7055', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInit8e33ba4249ec1a9d09b4e4fdd20f7055::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit8e33ba4249ec1a9d09b4e4fdd20f7055
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInit8e33ba4249ec1a9d09b4e4fdd20f7055::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequire8e33ba4249ec1a9d09b4e4fdd20f7055($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequire8e33ba4249ec1a9d09b4e4fdd20f7055($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit33b208bdf6e6720d9c1548990588b9f5
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit33b208bdf6e6720d9c1548990588b9f5', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit33b208bdf6e6720d9c1548990588b9f5', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInit33b208bdf6e6720d9c1548990588b9f5::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
+ $includeFiles = Composer\Autoload\ComposerStaticInit33b208bdf6e6720d9c1548990588b9f5::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequire33b208bdf6e6720d9c1548990588b9f5($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequire33b208bdf6e6720d9c1548990588b9f5($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
src/vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit8e33ba4249ec1a9d09b4e4fdd20f7055
8
  {
9
  public static $files = array (
10
  '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php',
@@ -30,7 +30,7 @@ class ComposerStaticInit8e33ba4249ec1a9d09b4e4fdd20f7055
30
  public static function getInitializer(ClassLoader $loader)
31
  {
32
  return \Closure::bind(function () use ($loader) {
33
- $loader->classMap = ComposerStaticInit8e33ba4249ec1a9d09b4e4fdd20f7055::$classMap;
34
 
35
  }, null, ClassLoader::class);
36
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit33b208bdf6e6720d9c1548990588b9f5
8
  {
9
  public static $files = array (
10
  '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php',
30
  public static function getInitializer(ClassLoader $loader)
31
  {
32
  return \Closure::bind(function () use ($loader) {
33
+ $loader->classMap = ComposerStaticInit33b208bdf6e6720d9c1548990588b9f5::$classMap;
34
 
35
  }, null, ClassLoader::class);
36
  }