Version Description
Download this release
Release Info
Developer | DvanKooten |
Plugin | MailChimp for WordPress |
Version | 4.8.11 |
Comparing to | |
See all releases |
Code changes from version 4.8.10 to 4.8.11
- CHANGELOG.md +8 -0
- assets/css/form-basic.css +1 -1
- assets/css/form-themes.css +1 -1
- assets/js/third-party/{placeholders.js.js → placeholders.js} +1 -1
- assets/js/third-party/{placeholders.js.js.LICENSE.txt → placeholders.js.LICENSE.txt} +0 -0
- assets/src/css/form-basic.css +0 -3
- assets/src/css/form-themes.css +0 -3
- assets/src/js/third-party/placeholders.js +0 -535
- includes/integrations/class-integration.php +46 -24
- includes/integrations/views/integration-settings.php +10 -1
- integrations/give/class-give.php +1 -1
- integrations/woocommerce/class-woocommerce.php +13 -7
- languages/mailchimp-for-wp.pot +14 -14
- mailchimp-for-wp.php +2 -2
- readme.txt +9 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +2 -2
- vendor/composer/installed.php +2 -2
CHANGELOG.md
CHANGED
@@ -1,6 +1,14 @@
|
|
1 |
Changelog
|
2 |
=========
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
#### 4.8.10 - Sep 14, 2022
|
5 |
|
6 |
- Fix mc4wp_get_request_ip_address() to return an IP address that matches Mailchimp's validation format when X-Forwarded-For header contains a port component.
|
1 |
Changelog
|
2 |
=========
|
3 |
|
4 |
+
#### 4.8.11 - Nov 1, 2022
|
5 |
+
|
6 |
+
- Improved default styling for the WooCommerce sign-up checkbox integration.
|
7 |
+
- Add `<strong>` to allowed HTML elements for GDPR disclaimer text on settings pages.
|
8 |
+
- Remove all references to obsolete placeholders.js polyfill.
|
9 |
+
- Move the GiveWP sign-up checkbox closer to the email input field. Thanks [Matthew Lewis](https://github.com/Matthew-Lewis).
|
10 |
+
|
11 |
+
|
12 |
#### 4.8.10 - Sep 14, 2022
|
13 |
|
14 |
- Fix mc4wp_get_request_ip_address() to return an IP address that matches Mailchimp's validation format when X-Forwarded-For header contains a port component.
|
assets/css/form-basic.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.mc4wp-form input[name^="_mc4wp_honey"]{display:none!important}.mc4wp-form-basic{margin:1em 0}.mc4wp-form-basic input,.mc4wp-form-basic label{width:auto;display:block;box-sizing:border-box;cursor:auto;height:auto;vertical-align:baseline;line-height:normal}.mc4wp-form-basic input:after,.mc4wp-form-basic label:after{content:"";display:table;clear:both}.mc4wp-form-basic label{font-weight:700;margin-bottom:6px;display:block}.mc4wp-form-basic input
|
1 |
+
.mc4wp-form input[name^="_mc4wp_honey"]{display:none!important}.mc4wp-form-basic{margin:1em 0}.mc4wp-form-basic input,.mc4wp-form-basic label{width:auto;display:block;box-sizing:border-box;cursor:auto;height:auto;vertical-align:baseline;line-height:normal}.mc4wp-form-basic input:after,.mc4wp-form-basic label:after{content:"";display:table;clear:both}.mc4wp-form-basic label{font-weight:700;margin-bottom:6px;display:block}.mc4wp-form-basic input[type=date],.mc4wp-form-basic input[type=email],.mc4wp-form-basic input[type=tel],.mc4wp-form-basic input[type=text],.mc4wp-form-basic input[type=url],.mc4wp-form-basic select,.mc4wp-form-basic textarea{min-height:32px;width:100%;max-width:480px}.mc4wp-form-basic input[type=number]{min-width:40px}.mc4wp-form-basic input[type=checkbox],.mc4wp-form-basic input[type=radio]{position:relative;margin:0 6px 0 0;padding:0;height:13px;width:13px;display:inline-block;border:0}.mc4wp-form-basic input[type=checkbox]{-webkit-appearance:checkbox;-moz-appearance:checkbox;appearance:checkbox}.mc4wp-form-basic input[type=radio]{-webkit-appearance:radio;-moz-appearance:radio;appearance:radio}.mc4wp-form-basic button,.mc4wp-form-basic input[type=button],.mc4wp-form-basic input[type=submit]{cursor:pointer;display:inline-block;-webkit-appearance:none;-moz-appearance:none;appearance:none}.mc4wp-form-basic label>span,.mc4wp-form-basic li>label{font-weight:400}.mc4wp-alert{color:#c09853;clear:both}.mc4wp-success{color:#468847}.mc4wp-notice{color:#3a87ad}.mc4wp-error{color:#cd5c5c}.rtl .mc4wp-form-basic input[type=checkbox],.rtl .mc4wp-form-basic input[type=radio]{margin:0 0 0 6px}
|
assets/css/form-themes.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.mc4wp-form input[name^="_mc4wp_honey"]{display:none!important}.mc4wp-form-theme{margin:1em 0}.mc4wp-form-theme input,.mc4wp-form-theme label{width:auto;display:block;box-sizing:border-box;cursor:auto;height:auto;vertical-align:baseline;line-height:normal}.mc4wp-form-theme input:after,.mc4wp-form-theme label:after{content:"";display:table;clear:both}.mc4wp-form-theme label{font-weight:700;margin-bottom:6px;display:block}.mc4wp-form-theme input
|
1 |
+
.mc4wp-form input[name^="_mc4wp_honey"]{display:none!important}.mc4wp-form-theme{margin:1em 0}.mc4wp-form-theme input,.mc4wp-form-theme label{width:auto;display:block;box-sizing:border-box;cursor:auto;height:auto;vertical-align:baseline;line-height:normal}.mc4wp-form-theme input:after,.mc4wp-form-theme label:after{content:"";display:table;clear:both}.mc4wp-form-theme label{font-weight:700;margin-bottom:6px;display:block}.mc4wp-form-theme input[type=date],.mc4wp-form-theme input[type=email],.mc4wp-form-theme input[type=tel],.mc4wp-form-theme input[type=text],.mc4wp-form-theme input[type=url],.mc4wp-form-theme select,.mc4wp-form-theme textarea{min-height:32px;height:auto;width:100%;max-width:480px;padding:8px 16px;line-height:1.428571429;color:#555!important;vertical-align:middle;background:0 0;background-color:#fff;border:1px solid #ccc;border-radius:2px;text-shadow:none;outline:0}.mc4wp-form-theme textarea{height:auto}.mc4wp-form-theme input[disabled],.mc4wp-form-theme input[readonly]{background-color:#eee}.mc4wp-form-theme input[type=number]{min-width:40px}.mc4wp-form-theme input[type=checkbox],.mc4wp-form-theme input[type=radio]{position:relative;margin:0 6px 0 0;padding:0;height:13px;width:13px;display:inline-block;border:0}.mc4wp-form-theme input[type=checkbox]{-webkit-appearance:checkbox;-moz-appearance:checkbox;appearance:checkbox}.mc4wp-form-theme input[type=radio]{-webkit-appearance:radio;-moz-appearance:radio;appearance:radio}.mc4wp-form-theme button,.mc4wp-form-theme input[type=button],.mc4wp-form-theme input[type=submit]{cursor:pointer;display:inline-block;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:8px 16px;font-weight:400;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;border:1px solid transparent;border-radius:2px;user-select:none;background:0 0;text-shadow:none;filter:none;height:auto;width:auto}.mc4wp-form-theme button:focus,.mc4wp-form-theme button:hover,.mc4wp-form-theme input[type=button]:focus,.mc4wp-form-theme input[type=button]:hover,.mc4wp-form-theme input[type=submit]:focus,.mc4wp-form-theme input[type=submit]:hover{outline:0;color:#333;text-decoration:none;background:0 0}.mc4wp-form-theme label>span,.mc4wp-form-theme li>label{font-weight:400}.mc4wp-alert{color:#c09853;clear:both}.mc4wp-success{color:#468847}.mc4wp-notice{color:#3a87ad}.mc4wp-error{color:#cd5c5c}.rtl .mc4wp-form-theme input[type=checkbox],.rtl .mc4wp-form-theme input[type=radio]{margin:0 0 0 6px}.mc4wp-form-theme-dark button,.mc4wp-form-theme-dark input[type=button],.mc4wp-form-theme-dark input[type=submit]{color:#fff!important;background-color:#444!important;border-color:#1e1e1e}.mc4wp-form-theme-dark button:focus,.mc4wp-form-theme-dark button:hover,.mc4wp-form-theme-dark input[type=button]:focus,.mc4wp-form-theme-dark input[type=button]:hover,.mc4wp-form-theme-dark input[type=submit]:focus,.mc4wp-form-theme-dark input[type=submit]:hover{color:#fff!important;background-color:#1e1e1e!important;border-color:#000}.mc4wp-form-theme-dark input[type=date]:focus,.mc4wp-form-theme-dark input[type=email]:focus,.mc4wp-form-theme-dark input[type=tel]:focus,.mc4wp-form-theme-dark input[type=text]:focus,.mc4wp-form-theme-dark input[type=url]:focus,.mc4wp-form-theme-dark select:focus,.mc4wp-form-theme-dark textarea:focus{border-color:#6a6a6a}.mc4wp-form-theme-light button,.mc4wp-form-theme-light input[type=button],.mc4wp-form-theme-light input[type=submit]{color:#000!important;background-color:#fff!important;border-color:#d9d9d9}.mc4wp-form-theme-light button:focus,.mc4wp-form-theme-light button:hover,.mc4wp-form-theme-light input[type=button]:focus,.mc4wp-form-theme-light input[type=button]:hover,.mc4wp-form-theme-light input[type=submit]:focus,.mc4wp-form-theme-light input[type=submit]:hover{color:#000!important;background-color:#d9d9d9!important;border-color:#b3b3b3}.mc4wp-form-theme-light input[type=date]:focus,.mc4wp-form-theme-light input[type=email]:focus,.mc4wp-form-theme-light input[type=tel]:focus,.mc4wp-form-theme-light input[type=text]:focus,.mc4wp-form-theme-light input[type=url]:focus,.mc4wp-form-theme-light select:focus,.mc4wp-form-theme-light textarea:focus{border-color:#d9d9d9}.mc4wp-form-theme-red button,.mc4wp-form-theme-red input[type=button],.mc4wp-form-theme-red input[type=submit]{color:#fff!important;background-color:#d9534f!important;border-color:#b52b27}.mc4wp-form-theme-red button:focus,.mc4wp-form-theme-red button:hover,.mc4wp-form-theme-red input[type=button]:focus,.mc4wp-form-theme-red input[type=button]:hover,.mc4wp-form-theme-red input[type=submit]:focus,.mc4wp-form-theme-red input[type=submit]:hover{color:#fff!important;background-color:#b52b27!important;border-color:#761c19}.mc4wp-form-theme-red input[type=date]:focus,.mc4wp-form-theme-red input[type=email]:focus,.mc4wp-form-theme-red input[type=tel]:focus,.mc4wp-form-theme-red input[type=text]:focus,.mc4wp-form-theme-red input[type=url]:focus,.mc4wp-form-theme-red select:focus,.mc4wp-form-theme-red textarea:focus{border-color:#e7908e}.mc4wp-form-theme-blue button,.mc4wp-form-theme-blue input[type=button],.mc4wp-form-theme-blue input[type=submit]{color:#fff!important;background-color:#428bca!important;border-color:#2a6496}.mc4wp-form-theme-blue button:focus,.mc4wp-form-theme-blue button:hover,.mc4wp-form-theme-blue input[type=button]:focus,.mc4wp-form-theme-blue input[type=button]:hover,.mc4wp-form-theme-blue input[type=submit]:focus,.mc4wp-form-theme-blue input[type=submit]:hover{color:#fff!important;background-color:#2a6496!important;border-color:#193c5a}.mc4wp-form-theme-blue input[type=date]:focus,.mc4wp-form-theme-blue input[type=email]:focus,.mc4wp-form-theme-blue input[type=tel]:focus,.mc4wp-form-theme-blue input[type=text]:focus,.mc4wp-form-theme-blue input[type=url]:focus,.mc4wp-form-theme-blue select:focus,.mc4wp-form-theme-blue textarea:focus{border-color:#7eb0db}.mc4wp-form-theme-green button,.mc4wp-form-theme-green input[type=button],.mc4wp-form-theme-green input[type=submit]{color:#fff!important;background-color:#5cb85c!important;border-color:#3d8b3d}.mc4wp-form-theme-green button:focus,.mc4wp-form-theme-green button:hover,.mc4wp-form-theme-green input[type=button]:focus,.mc4wp-form-theme-green input[type=button]:hover,.mc4wp-form-theme-green input[type=submit]:focus,.mc4wp-form-theme-green input[type=submit]:hover{color:#fff!important;background-color:#3d8b3d!important;border-color:#255625}.mc4wp-form-theme-green input[type=date]:focus,.mc4wp-form-theme-green input[type=email]:focus,.mc4wp-form-theme-green input[type=tel]:focus,.mc4wp-form-theme-green input[type=text]:focus,.mc4wp-form-theme-green input[type=url]:focus,.mc4wp-form-theme-green select:focus,.mc4wp-form-theme-green textarea:focus{border-color:#91cf91}
|
assets/js/third-party/{placeholders.js.js → placeholders.js}
RENAMED
@@ -1,2 +1,2 @@
|
|
1 |
-
/*! For license information please see placeholders.js.
|
2 |
({6315:function(){!function(t){"use strict";var e=void 0!==document.createElement("input").placeholder;if(t.Placeholders={nativeSupport:e,disable:e?B:C,enable:e?B:function(t){j(t,D)}},!e){var r,n=["text","search","url","tel","email","password","number","textarea"],a=[27,33,34,35,36,37,38,39,40,8,46],u=new RegExp("(?:^|\\s)placeholdersjs(?!\\S)"),l="data-placeholder-value",i="data-placeholder-active",o="data-placeholder-type",c="data-placeholder-submit",s="data-placeholder-bound",d="data-placeholder-maxlength",g=document.getElementsByTagName("head")[0],b=document.documentElement,f=t.Placeholders,v=document.getElementsByTagName("input"),p=document.getElementsByTagName("textarea"),h="false"===b.getAttribute("data-placeholder-focus"),m="false"!==b.getAttribute("data-placeholder-live"),A=document.createElement("style");A.type="text/css";var y,x,E=document.createTextNode(".placeholdersjs {color:#ccc;}");A.styleSheet?A.styleSheet.cssText=E.nodeValue:A.appendChild(E),g.insertBefore(A,g.firstChild);for(var N=0,T=v.length+p.length;N<T;N++)x=N<v.length?v[N]:p[N-v.length],(y=x.attributes.placeholder)&&(y=y.nodeValue)&&L(n,x.type)&&P(x);var w=setInterval((function(){for(var t=0,e=v.length+p.length;t<e;t++)x=t<v.length?v[t]:p[t-v.length],(y=x.attributes.placeholder)?(y=y.nodeValue)&&L(n,x.type)&&(x.getAttribute(s)||P(x),(y!==x.getAttribute(l)||"password"===x.type&&!x.getAttribute(o))&&("password"===x.type&&!x.getAttribute(o)&&R(x,"text")&&x.setAttribute(o,"password"),x.value===x.getAttribute(l)&&(x.value=y),x.setAttribute(l,y))):x.getAttribute(i)&&(V(x),x.removeAttribute(l));m||clearInterval(w)}),100);k(t,"beforeunload",(function(){f.disable()}))}function B(){}function S(){try{return document.activeElement}catch(t){}}function L(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return!0;return!1}function k(t,e,r){return t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent?t.attachEvent("on"+e,r):void 0}function I(t,e){var r;t.createTextRange?((r=t.createTextRange()).move("character",e),r.select()):t.selectionStart&&(t.focus(),t.setSelectionRange(e,e))}function R(t,e){try{return t.type=e,!0}catch(t){return!1}}function j(t,e){if(t&&t.getAttribute(l))e(t);else for(var r=t?t.getElementsByTagName("input"):v,n=t?t.getElementsByTagName("textarea"):p,a=r?r.length:0,u=a+(n?n.length:0),i=0;i<u;i++)e(i<a?r[i]:n[i-a])}function C(t){j(t,V)}function V(t,e){var r=!!e&&t.value!==e,n=t.value===t.getAttribute(l);if((r||n)&&"true"===t.getAttribute(i)){t.removeAttribute(i),t.value=t.value.replace(t.getAttribute(l),""),t.className=t.className.replace(u,"");var a=t.getAttribute(d);parseInt(a,10)>=0&&(t.setAttribute("maxLength",a),t.removeAttribute(d));var c=t.getAttribute(o);return c&&(t.type=c),!0}return!1}function D(t){var e=t.getAttribute(l);return!(""!==t.value||!e||(t.setAttribute(i,"true"),t.value=e,t.className+=" placeholdersjs",t.getAttribute(d)||(t.setAttribute(d,t.maxLength),t.removeAttribute("maxLength")),t.getAttribute(o)?t.type="text":"password"===t.type&&R(t,"text")&&t.setAttribute(o,"password"),0))}function P(t){var e=t.form;e&&"string"==typeof e&&((e=document.getElementById(e)).getAttribute(c)||(k(e,"submit",function(t){return function(){C(t)}}(e)),e.setAttribute(c,"true"))),k(t,"focus",function(t){return function(){h&&t.value===t.getAttribute(l)&&"true"===t.getAttribute(i)?I(t,0):V(t)}}(t)),k(t,"blur",function(t){return function(){D(t)}}(t)),h&&(k(t,"keydown",function(t){return function(e){if(r=t.value,"true"===t.getAttribute(i)&&r===t.getAttribute(l)&&L(a,e.keyCode))return e.preventDefault&&e.preventDefault(),!1}}(t)),k(t,"keyup",function(t){return function(){V(t,r),""===t.value&&(t.blur(),I(t,0))}}(t)),k(t,"click",function(t){return function(){t===S()&&t.value===t.getAttribute(l)&&"true"===t.getAttribute(i)&&I(t,0)}}(t))),t.setAttribute(s,"true"),t.setAttribute(l,y),(h||t!==S())&&D(t)}}(this)}})[6315]();
|
1 |
+
/*! For license information please see placeholders.js.LICENSE.txt */
|
2 |
({6315:function(){!function(t){"use strict";var e=void 0!==document.createElement("input").placeholder;if(t.Placeholders={nativeSupport:e,disable:e?B:C,enable:e?B:function(t){j(t,D)}},!e){var r,n=["text","search","url","tel","email","password","number","textarea"],a=[27,33,34,35,36,37,38,39,40,8,46],u=new RegExp("(?:^|\\s)placeholdersjs(?!\\S)"),l="data-placeholder-value",i="data-placeholder-active",o="data-placeholder-type",c="data-placeholder-submit",s="data-placeholder-bound",d="data-placeholder-maxlength",g=document.getElementsByTagName("head")[0],b=document.documentElement,f=t.Placeholders,v=document.getElementsByTagName("input"),p=document.getElementsByTagName("textarea"),h="false"===b.getAttribute("data-placeholder-focus"),m="false"!==b.getAttribute("data-placeholder-live"),A=document.createElement("style");A.type="text/css";var y,x,E=document.createTextNode(".placeholdersjs {color:#ccc;}");A.styleSheet?A.styleSheet.cssText=E.nodeValue:A.appendChild(E),g.insertBefore(A,g.firstChild);for(var N=0,T=v.length+p.length;N<T;N++)x=N<v.length?v[N]:p[N-v.length],(y=x.attributes.placeholder)&&(y=y.nodeValue)&&L(n,x.type)&&P(x);var w=setInterval((function(){for(var t=0,e=v.length+p.length;t<e;t++)x=t<v.length?v[t]:p[t-v.length],(y=x.attributes.placeholder)?(y=y.nodeValue)&&L(n,x.type)&&(x.getAttribute(s)||P(x),(y!==x.getAttribute(l)||"password"===x.type&&!x.getAttribute(o))&&("password"===x.type&&!x.getAttribute(o)&&R(x,"text")&&x.setAttribute(o,"password"),x.value===x.getAttribute(l)&&(x.value=y),x.setAttribute(l,y))):x.getAttribute(i)&&(V(x),x.removeAttribute(l));m||clearInterval(w)}),100);k(t,"beforeunload",(function(){f.disable()}))}function B(){}function S(){try{return document.activeElement}catch(t){}}function L(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return!0;return!1}function k(t,e,r){return t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent?t.attachEvent("on"+e,r):void 0}function I(t,e){var r;t.createTextRange?((r=t.createTextRange()).move("character",e),r.select()):t.selectionStart&&(t.focus(),t.setSelectionRange(e,e))}function R(t,e){try{return t.type=e,!0}catch(t){return!1}}function j(t,e){if(t&&t.getAttribute(l))e(t);else for(var r=t?t.getElementsByTagName("input"):v,n=t?t.getElementsByTagName("textarea"):p,a=r?r.length:0,u=a+(n?n.length:0),i=0;i<u;i++)e(i<a?r[i]:n[i-a])}function C(t){j(t,V)}function V(t,e){var r=!!e&&t.value!==e,n=t.value===t.getAttribute(l);if((r||n)&&"true"===t.getAttribute(i)){t.removeAttribute(i),t.value=t.value.replace(t.getAttribute(l),""),t.className=t.className.replace(u,"");var a=t.getAttribute(d);parseInt(a,10)>=0&&(t.setAttribute("maxLength",a),t.removeAttribute(d));var c=t.getAttribute(o);return c&&(t.type=c),!0}return!1}function D(t){var e=t.getAttribute(l);return!(""!==t.value||!e||(t.setAttribute(i,"true"),t.value=e,t.className+=" placeholdersjs",t.getAttribute(d)||(t.setAttribute(d,t.maxLength),t.removeAttribute("maxLength")),t.getAttribute(o)?t.type="text":"password"===t.type&&R(t,"text")&&t.setAttribute(o,"password"),0))}function P(t){var e=t.form;e&&"string"==typeof e&&((e=document.getElementById(e)).getAttribute(c)||(k(e,"submit",function(t){return function(){C(t)}}(e)),e.setAttribute(c,"true"))),k(t,"focus",function(t){return function(){h&&t.value===t.getAttribute(l)&&"true"===t.getAttribute(i)?I(t,0):V(t)}}(t)),k(t,"blur",function(t){return function(){D(t)}}(t)),h&&(k(t,"keydown",function(t){return function(e){if(r=t.value,"true"===t.getAttribute(i)&&r===t.getAttribute(l)&&L(a,e.keyCode))return e.preventDefault&&e.preventDefault(),!1}}(t)),k(t,"keyup",function(t){return function(){V(t,r),""===t.value&&(t.blur(),I(t,0))}}(t)),k(t,"click",function(t){return function(){t===S()&&t.value===t.getAttribute(l)&&"true"===t.getAttribute(i)&&I(t,0)}}(t))),t.setAttribute(s,"true"),t.setAttribute(l,y),(h||t!==S())&&D(t)}}(this)}})[6315]();
|
assets/js/third-party/{placeholders.js.js.LICENSE.txt → placeholders.js.LICENSE.txt}
RENAMED
File without changes
|
assets/src/css/form-basic.css
CHANGED
@@ -27,9 +27,6 @@
|
|
27 |
}
|
28 |
|
29 |
/* Form Elements */
|
30 |
-
.mc4wp-form-basic input.placeholdersjs {
|
31 |
-
color: #aaa !important;
|
32 |
-
}
|
33 |
.mc4wp-form-basic input[type="text"],
|
34 |
.mc4wp-form-basic input[type="email"],
|
35 |
.mc4wp-form-basic input[type="tel"],
|
27 |
}
|
28 |
|
29 |
/* Form Elements */
|
|
|
|
|
|
|
30 |
.mc4wp-form-basic input[type="text"],
|
31 |
.mc4wp-form-basic input[type="email"],
|
32 |
.mc4wp-form-basic input[type="tel"],
|
assets/src/css/form-themes.css
CHANGED
@@ -27,9 +27,6 @@
|
|
27 |
}
|
28 |
|
29 |
/* Form Elements */
|
30 |
-
.mc4wp-form-theme input.placeholdersjs {
|
31 |
-
color: #aaa !important;
|
32 |
-
}
|
33 |
.mc4wp-form-theme input[type="text"],
|
34 |
.mc4wp-form-theme input[type="email"],
|
35 |
.mc4wp-form-theme input[type="tel"],
|
27 |
}
|
28 |
|
29 |
/* Form Elements */
|
|
|
|
|
|
|
30 |
.mc4wp-form-theme input[type="text"],
|
31 |
.mc4wp-form-theme input[type="email"],
|
32 |
.mc4wp-form-theme input[type="tel"],
|
assets/src/js/third-party/placeholders.js
DELETED
@@ -1,535 +0,0 @@
|
|
1 |
-
/* eslint-disable */
|
2 |
-
/*!
|
3 |
-
* The MIT License
|
4 |
-
*
|
5 |
-
* Copyright (c) 2012 James Allardice
|
6 |
-
*
|
7 |
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
8 |
-
* of this software and associated documentation files (the "Software"), to
|
9 |
-
* deal in the Software without restriction, including without limitation the
|
10 |
-
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
11 |
-
* sell copies of the Software, and to permit persons to whom the Software is
|
12 |
-
* furnished to do so, subject to the following conditions:
|
13 |
-
*
|
14 |
-
* The above copyright notice and this permission notice shall be included in
|
15 |
-
* all copies or substantial portions of the Software.
|
16 |
-
*
|
17 |
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18 |
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19 |
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20 |
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21 |
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
22 |
-
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
23 |
-
* IN THE SOFTWARE.
|
24 |
-
*/
|
25 |
-
|
26 |
-
(function (global) {
|
27 |
-
'use strict'
|
28 |
-
|
29 |
-
//
|
30 |
-
// Test for support. We do this as early as possible to optimise for browsers
|
31 |
-
// that have native support for the attribute.
|
32 |
-
//
|
33 |
-
|
34 |
-
var test = document.createElement('input')
|
35 |
-
var nativeSupport = test.placeholder !== void 0
|
36 |
-
|
37 |
-
global.Placeholders = {
|
38 |
-
nativeSupport: nativeSupport,
|
39 |
-
disable: nativeSupport ? noop : disablePlaceholders,
|
40 |
-
enable: nativeSupport ? noop : enablePlaceholders
|
41 |
-
}
|
42 |
-
|
43 |
-
if (nativeSupport) {
|
44 |
-
return
|
45 |
-
}
|
46 |
-
|
47 |
-
//
|
48 |
-
// If we reach this point then the browser does not have native support for
|
49 |
-
// the attribute.
|
50 |
-
//
|
51 |
-
|
52 |
-
// The list of input element types that support the placeholder attribute.
|
53 |
-
var validTypes = [
|
54 |
-
'text',
|
55 |
-
'search',
|
56 |
-
'url',
|
57 |
-
'tel',
|
58 |
-
'email',
|
59 |
-
'password',
|
60 |
-
'number',
|
61 |
-
'textarea'
|
62 |
-
]
|
63 |
-
|
64 |
-
// The list of keycodes that are not allowed when the polyfill is configured
|
65 |
-
// to hide-on-input.
|
66 |
-
var badKeys = [
|
67 |
-
|
68 |
-
// The following keys all cause the caret to jump to the end of the input
|
69 |
-
// value.
|
70 |
-
|
71 |
-
27, // Escape
|
72 |
-
33, // Page up
|
73 |
-
34, // Page down
|
74 |
-
35, // End
|
75 |
-
36, // Home
|
76 |
-
|
77 |
-
// Arrow keys allow you to move the caret manually, which should be
|
78 |
-
// prevented when the placeholder is visible.
|
79 |
-
|
80 |
-
37, // Left
|
81 |
-
38, // Up
|
82 |
-
39, // Right
|
83 |
-
40, // Down
|
84 |
-
|
85 |
-
// The following keys allow you to modify the placeholder text by removing
|
86 |
-
// characters, which should be prevented when the placeholder is visible.
|
87 |
-
|
88 |
-
8, // Backspace
|
89 |
-
46 // Delete
|
90 |
-
]
|
91 |
-
|
92 |
-
// Styling variables.
|
93 |
-
var placeholderStyleColor = '#ccc'
|
94 |
-
var placeholderClassName = 'placeholdersjs'
|
95 |
-
var classNameRegExp = new RegExp('(?:^|\\s)' + placeholderClassName + '(?!\\S)')
|
96 |
-
|
97 |
-
// The various data-* attributes used by the polyfill.
|
98 |
-
var ATTR_CURRENT_VAL = 'data-placeholder-value'
|
99 |
-
var ATTR_ACTIVE = 'data-placeholder-active'
|
100 |
-
var ATTR_INPUT_TYPE = 'data-placeholder-type'
|
101 |
-
var ATTR_FORM_HANDLED = 'data-placeholder-submit'
|
102 |
-
var ATTR_EVENTS_BOUND = 'data-placeholder-bound'
|
103 |
-
var ATTR_OPTION_FOCUS = 'data-placeholder-focus'
|
104 |
-
var ATTR_OPTION_LIVE = 'data-placeholder-live'
|
105 |
-
var ATTR_MAXLENGTH = 'data-placeholder-maxlength'
|
106 |
-
|
107 |
-
// Various other variables used throughout the rest of the script.
|
108 |
-
var UPDATE_INTERVAL = 100
|
109 |
-
var head = document.getElementsByTagName('head')[0]
|
110 |
-
var root = document.documentElement
|
111 |
-
var Placeholders = global.Placeholders
|
112 |
-
var keydownVal
|
113 |
-
|
114 |
-
// Get references to all the input and textarea elements currently in the DOM
|
115 |
-
// (live NodeList objects to we only need to do this once).
|
116 |
-
var inputs = document.getElementsByTagName('input')
|
117 |
-
var textareas = document.getElementsByTagName('textarea')
|
118 |
-
|
119 |
-
// Get any settings declared as data-* attributes on the root element.
|
120 |
-
// Currently the only options are whether to hide the placeholder on focus
|
121 |
-
// or input and whether to auto-update.
|
122 |
-
var hideOnInput = root.getAttribute(ATTR_OPTION_FOCUS) === 'false'
|
123 |
-
var liveUpdates = root.getAttribute(ATTR_OPTION_LIVE) !== 'false'
|
124 |
-
|
125 |
-
// Create style element for placeholder styles (instead of directly setting
|
126 |
-
// style properties on elements - allows for better flexibility alongside
|
127 |
-
// user-defined styles).
|
128 |
-
var styleElem = document.createElement('style')
|
129 |
-
styleElem.type = 'text/css'
|
130 |
-
|
131 |
-
// Create style rules as text node.
|
132 |
-
var styleRules = document.createTextNode(
|
133 |
-
'.' + placeholderClassName + ' {' +
|
134 |
-
'color:' + placeholderStyleColor + ';' +
|
135 |
-
'}'
|
136 |
-
)
|
137 |
-
|
138 |
-
// Append style rules to newly created stylesheet.
|
139 |
-
if (styleElem.styleSheet) {
|
140 |
-
styleElem.styleSheet.cssText = styleRules.nodeValue
|
141 |
-
} else {
|
142 |
-
styleElem.appendChild(styleRules)
|
143 |
-
}
|
144 |
-
|
145 |
-
// Prepend new style element to the head (before any existing stylesheets,
|
146 |
-
// so user-defined rules take precedence).
|
147 |
-
head.insertBefore(styleElem, head.firstChild)
|
148 |
-
|
149 |
-
// Set up the placeholders.
|
150 |
-
var placeholder
|
151 |
-
var elem
|
152 |
-
|
153 |
-
for (var i = 0, len = inputs.length + textareas.length; i < len; i++) {
|
154 |
-
// Find the next element. If we've already done all the inputs we move on
|
155 |
-
// to the textareas.
|
156 |
-
elem = i < inputs.length ? inputs[i] : textareas[i - inputs.length]
|
157 |
-
|
158 |
-
// Get the value of the placeholder attribute, if any. IE10 emulating IE7
|
159 |
-
// fails with getAttribute, hence the use of the attributes node.
|
160 |
-
placeholder = elem.attributes.placeholder
|
161 |
-
|
162 |
-
// If the element has a placeholder attribute we need to modify it.
|
163 |
-
if (placeholder) {
|
164 |
-
// IE returns an empty object instead of undefined if the attribute is
|
165 |
-
// not present.
|
166 |
-
placeholder = placeholder.nodeValue
|
167 |
-
|
168 |
-
// Only apply the polyfill if this element is of a type that supports
|
169 |
-
// placeholders and has a placeholder attribute with a non-empty value.
|
170 |
-
if (placeholder && inArray(validTypes, elem.type)) {
|
171 |
-
newElement(elem)
|
172 |
-
}
|
173 |
-
}
|
174 |
-
}
|
175 |
-
|
176 |
-
// If enabled, the polyfill will repeatedly check for changed/added elements
|
177 |
-
// and apply to those as well.
|
178 |
-
var timer = setInterval(function () {
|
179 |
-
for (var i = 0, len = inputs.length + textareas.length; i < len; i++) {
|
180 |
-
elem = i < inputs.length ? inputs[i] : textareas[i - inputs.length]
|
181 |
-
|
182 |
-
// Only apply the polyfill if this element is of a type that supports
|
183 |
-
// placeholders, and has a placeholder attribute with a non-empty value.
|
184 |
-
placeholder = elem.attributes.placeholder
|
185 |
-
|
186 |
-
if (placeholder) {
|
187 |
-
placeholder = placeholder.nodeValue
|
188 |
-
|
189 |
-
if (placeholder && inArray(validTypes, elem.type)) {
|
190 |
-
// If the element hasn't had event handlers bound to it then add
|
191 |
-
// them.
|
192 |
-
if (!elem.getAttribute(ATTR_EVENTS_BOUND)) {
|
193 |
-
newElement(elem)
|
194 |
-
}
|
195 |
-
|
196 |
-
// If the placeholder value has changed or not been initialised yet
|
197 |
-
// we need to update the display.
|
198 |
-
if (
|
199 |
-
placeholder !== elem.getAttribute(ATTR_CURRENT_VAL) ||
|
200 |
-
(elem.type === 'password' && !elem.getAttribute(ATTR_INPUT_TYPE))
|
201 |
-
) {
|
202 |
-
// Attempt to change the type of password inputs (fails in IE < 9).
|
203 |
-
if (
|
204 |
-
elem.type === 'password' &&
|
205 |
-
!elem.getAttribute(ATTR_INPUT_TYPE) &&
|
206 |
-
changeType(elem, 'text')
|
207 |
-
) {
|
208 |
-
elem.setAttribute(ATTR_INPUT_TYPE, 'password')
|
209 |
-
}
|
210 |
-
|
211 |
-
// If the placeholder value has changed and the placeholder is
|
212 |
-
// currently on display we need to change it.
|
213 |
-
if (elem.value === elem.getAttribute(ATTR_CURRENT_VAL)) {
|
214 |
-
elem.value = placeholder
|
215 |
-
}
|
216 |
-
|
217 |
-
// Keep a reference to the current placeholder value in case it
|
218 |
-
// changes via another script.
|
219 |
-
elem.setAttribute(ATTR_CURRENT_VAL, placeholder)
|
220 |
-
}
|
221 |
-
}
|
222 |
-
} else if (elem.getAttribute(ATTR_ACTIVE)) {
|
223 |
-
hidePlaceholder(elem)
|
224 |
-
elem.removeAttribute(ATTR_CURRENT_VAL)
|
225 |
-
}
|
226 |
-
}
|
227 |
-
|
228 |
-
// If live updates are not enabled cancel the timer.
|
229 |
-
if (!liveUpdates) {
|
230 |
-
clearInterval(timer)
|
231 |
-
}
|
232 |
-
}, UPDATE_INTERVAL)
|
233 |
-
|
234 |
-
// Disabling placeholders before unloading the page prevents flash of
|
235 |
-
// unstyled placeholders on load if the page was refreshed.
|
236 |
-
addEventListener(global, 'beforeunload', function () {
|
237 |
-
Placeholders.disable()
|
238 |
-
})
|
239 |
-
|
240 |
-
//
|
241 |
-
// Utility functions
|
242 |
-
//
|
243 |
-
|
244 |
-
// No-op (used in place of public methods when native support is detected).
|
245 |
-
function noop () {}
|
246 |
-
|
247 |
-
// Avoid IE9 activeElement of death when an iframe is used.
|
248 |
-
//
|
249 |
-
// More info:
|
250 |
-
// - http://bugs.jquery.com/ticket/13393
|
251 |
-
// - https://github.com/jquery/jquery/commit/85fc5878b3c6af73f42d61eedf73013e7faae408
|
252 |
-
function safeActiveElement () {
|
253 |
-
try {
|
254 |
-
return document.activeElement
|
255 |
-
} catch (err) {}
|
256 |
-
}
|
257 |
-
|
258 |
-
// Check whether an item is in an array. We don't use Array.prototype.indexOf
|
259 |
-
// so we don't clobber any existing polyfills. This is a really simple
|
260 |
-
// alternative.
|
261 |
-
function inArray (arr, item) {
|
262 |
-
for (var i = 0, len = arr.length; i < len; i++) {
|
263 |
-
if (arr[i] === item) {
|
264 |
-
return true
|
265 |
-
}
|
266 |
-
}
|
267 |
-
return false
|
268 |
-
}
|
269 |
-
|
270 |
-
// Cross-browser DOM event binding
|
271 |
-
function addEventListener (elem, event, fn) {
|
272 |
-
if (elem.addEventListener) {
|
273 |
-
return elem.addEventListener(event, fn, false)
|
274 |
-
}
|
275 |
-
if (elem.attachEvent) {
|
276 |
-
return elem.attachEvent('on' + event, fn)
|
277 |
-
}
|
278 |
-
}
|
279 |
-
|
280 |
-
// Move the caret to the index position specified. Assumes that the element
|
281 |
-
// has focus.
|
282 |
-
function moveCaret (elem, index) {
|
283 |
-
var range
|
284 |
-
if (elem.createTextRange) {
|
285 |
-
range = elem.createTextRange()
|
286 |
-
range.move('character', index)
|
287 |
-
range.select()
|
288 |
-
} else if (elem.selectionStart) {
|
289 |
-
elem.focus()
|
290 |
-
elem.setSelectionRange(index, index)
|
291 |
-
}
|
292 |
-
}
|
293 |
-
|
294 |
-
// Attempt to change the type property of an input element.
|
295 |
-
function changeType (elem, type) {
|
296 |
-
try {
|
297 |
-
elem.type = type
|
298 |
-
return true
|
299 |
-
} catch (e) {
|
300 |
-
// You can't change input type in IE8 and below.
|
301 |
-
return false
|
302 |
-
}
|
303 |
-
}
|
304 |
-
|
305 |
-
function handleElem (node, callback) {
|
306 |
-
// Check if the passed in node is an input/textarea (in which case it can't
|
307 |
-
// have any affected descendants).
|
308 |
-
if (node && node.getAttribute(ATTR_CURRENT_VAL)) {
|
309 |
-
callback(node)
|
310 |
-
} else {
|
311 |
-
// If an element was passed in, get all affected descendants. Otherwise,
|
312 |
-
// get all affected elements in document.
|
313 |
-
var handleInputs = node ? node.getElementsByTagName('input') : inputs
|
314 |
-
var handleTextareas = node ? node.getElementsByTagName('textarea') : textareas
|
315 |
-
|
316 |
-
var handleInputsLength = handleInputs ? handleInputs.length : 0
|
317 |
-
var handleTextareasLength = handleTextareas ? handleTextareas.length : 0
|
318 |
-
|
319 |
-
// Run the callback for each element.
|
320 |
-
var len = handleInputsLength + handleTextareasLength
|
321 |
-
var elem
|
322 |
-
for (var i = 0; i < len; i++) {
|
323 |
-
elem = i < handleInputsLength
|
324 |
-
? handleInputs[i]
|
325 |
-
: handleTextareas[i - handleInputsLength]
|
326 |
-
|
327 |
-
callback(elem)
|
328 |
-
}
|
329 |
-
}
|
330 |
-
}
|
331 |
-
|
332 |
-
// Return all affected elements to their normal state (remove placeholder
|
333 |
-
// value if present).
|
334 |
-
function disablePlaceholders (node) {
|
335 |
-
handleElem(node, hidePlaceholder)
|
336 |
-
}
|
337 |
-
|
338 |
-
// Show the placeholder value on all appropriate elements.
|
339 |
-
function enablePlaceholders (node) {
|
340 |
-
handleElem(node, showPlaceholder)
|
341 |
-
}
|
342 |
-
|
343 |
-
// Hide the placeholder value on a single element. Returns true if the
|
344 |
-
// placeholder was hidden and false if it was not (because it wasn't visible
|
345 |
-
// in the first place).
|
346 |
-
function hidePlaceholder (elem, keydownValue) {
|
347 |
-
var valueChanged = !!keydownValue && elem.value !== keydownValue
|
348 |
-
var isPlaceholderValue = elem.value === elem.getAttribute(ATTR_CURRENT_VAL)
|
349 |
-
|
350 |
-
if (
|
351 |
-
(valueChanged || isPlaceholderValue) &&
|
352 |
-
elem.getAttribute(ATTR_ACTIVE) === 'true'
|
353 |
-
) {
|
354 |
-
elem.removeAttribute(ATTR_ACTIVE)
|
355 |
-
elem.value = elem.value.replace(elem.getAttribute(ATTR_CURRENT_VAL), '')
|
356 |
-
elem.className = elem.className.replace(classNameRegExp, '')
|
357 |
-
|
358 |
-
// Restore the maxlength value. Old FF returns -1 if attribute not set.
|
359 |
-
// See GH-56.
|
360 |
-
var maxLength = elem.getAttribute(ATTR_MAXLENGTH)
|
361 |
-
if (parseInt(maxLength, 10) >= 0) {
|
362 |
-
elem.setAttribute('maxLength', maxLength)
|
363 |
-
elem.removeAttribute(ATTR_MAXLENGTH)
|
364 |
-
}
|
365 |
-
|
366 |
-
// If the polyfill has changed the type of the element we need to change
|
367 |
-
// it back.
|
368 |
-
var type = elem.getAttribute(ATTR_INPUT_TYPE)
|
369 |
-
if (type) {
|
370 |
-
elem.type = type
|
371 |
-
}
|
372 |
-
|
373 |
-
return true
|
374 |
-
}
|
375 |
-
|
376 |
-
return false
|
377 |
-
}
|
378 |
-
|
379 |
-
// Show the placeholder value on a single element. Returns true if the
|
380 |
-
// placeholder was shown and false if it was not (because it was already
|
381 |
-
// visible).
|
382 |
-
function showPlaceholder (elem) {
|
383 |
-
var val = elem.getAttribute(ATTR_CURRENT_VAL)
|
384 |
-
|
385 |
-
if (elem.value === '' && val) {
|
386 |
-
elem.setAttribute(ATTR_ACTIVE, 'true')
|
387 |
-
elem.value = val
|
388 |
-
elem.className += ' ' + placeholderClassName
|
389 |
-
|
390 |
-
// Store and remove the maxlength value.
|
391 |
-
var maxLength = elem.getAttribute(ATTR_MAXLENGTH)
|
392 |
-
if (!maxLength) {
|
393 |
-
elem.setAttribute(ATTR_MAXLENGTH, elem.maxLength)
|
394 |
-
elem.removeAttribute('maxLength')
|
395 |
-
}
|
396 |
-
|
397 |
-
// If the type of element needs to change, change it (e.g. password
|
398 |
-
// inputs).
|
399 |
-
var type = elem.getAttribute(ATTR_INPUT_TYPE)
|
400 |
-
if (type) {
|
401 |
-
elem.type = 'text'
|
402 |
-
} else if (elem.type === 'password' && changeType(elem, 'text')) {
|
403 |
-
elem.setAttribute(ATTR_INPUT_TYPE, 'password')
|
404 |
-
}
|
405 |
-
|
406 |
-
return true
|
407 |
-
}
|
408 |
-
|
409 |
-
return false
|
410 |
-
}
|
411 |
-
|
412 |
-
// Returns a function that is used as a focus event handler.
|
413 |
-
function makeFocusHandler (elem) {
|
414 |
-
return function () {
|
415 |
-
// Only hide the placeholder value if the (default) hide-on-focus
|
416 |
-
// behaviour is enabled.
|
417 |
-
if (
|
418 |
-
hideOnInput &&
|
419 |
-
elem.value === elem.getAttribute(ATTR_CURRENT_VAL) &&
|
420 |
-
elem.getAttribute(ATTR_ACTIVE) === 'true'
|
421 |
-
) {
|
422 |
-
// Move the caret to the start of the input (this mimics the behaviour
|
423 |
-
// of all browsers that do not hide the placeholder on focus).
|
424 |
-
moveCaret(elem, 0)
|
425 |
-
} else {
|
426 |
-
// Remove the placeholder.
|
427 |
-
hidePlaceholder(elem)
|
428 |
-
}
|
429 |
-
}
|
430 |
-
}
|
431 |
-
|
432 |
-
// Returns a function that is used as a blur event handler.
|
433 |
-
function makeBlurHandler (elem) {
|
434 |
-
return function () {
|
435 |
-
showPlaceholder(elem)
|
436 |
-
}
|
437 |
-
}
|
438 |
-
|
439 |
-
// Returns a function that is used as a submit event handler on form elements
|
440 |
-
// that have children affected by this polyfill.
|
441 |
-
function makeSubmitHandler (form) {
|
442 |
-
return function () {
|
443 |
-
// Turn off placeholders on all appropriate descendant elements.
|
444 |
-
disablePlaceholders(form)
|
445 |
-
}
|
446 |
-
}
|
447 |
-
|
448 |
-
// Functions that are used as a event handlers when the hide-on-input
|
449 |
-
// behaviour has been activated - very basic implementation of the 'input'
|
450 |
-
// event.
|
451 |
-
function makeKeydownHandler (elem) {
|
452 |
-
return function (e) {
|
453 |
-
keydownVal = elem.value
|
454 |
-
|
455 |
-
// Prevent the use of the arrow keys (try to keep the cursor before the
|
456 |
-
// placeholder).
|
457 |
-
if (
|
458 |
-
elem.getAttribute(ATTR_ACTIVE) === 'true' &&
|
459 |
-
keydownVal === elem.getAttribute(ATTR_CURRENT_VAL) &&
|
460 |
-
inArray(badKeys, e.keyCode)
|
461 |
-
) {
|
462 |
-
if (e.preventDefault) {
|
463 |
-
e.preventDefault()
|
464 |
-
}
|
465 |
-
return false
|
466 |
-
}
|
467 |
-
}
|
468 |
-
}
|
469 |
-
|
470 |
-
function makeKeyupHandler (elem) {
|
471 |
-
return function () {
|
472 |
-
hidePlaceholder(elem, keydownVal)
|
473 |
-
|
474 |
-
// If the element is now empty we need to show the placeholder
|
475 |
-
if (elem.value === '') {
|
476 |
-
elem.blur()
|
477 |
-
moveCaret(elem, 0)
|
478 |
-
}
|
479 |
-
}
|
480 |
-
}
|
481 |
-
|
482 |
-
function makeClickHandler (elem) {
|
483 |
-
return function () {
|
484 |
-
if (
|
485 |
-
elem === safeActiveElement() &&
|
486 |
-
elem.value === elem.getAttribute(ATTR_CURRENT_VAL) &&
|
487 |
-
elem.getAttribute(ATTR_ACTIVE) === 'true'
|
488 |
-
) {
|
489 |
-
moveCaret(elem, 0)
|
490 |
-
}
|
491 |
-
}
|
492 |
-
}
|
493 |
-
|
494 |
-
// Bind event handlers to an element that we need to affect with the
|
495 |
-
// polyfill.
|
496 |
-
function newElement (elem) {
|
497 |
-
// If the element is part of a form, make sure the placeholder string is
|
498 |
-
// not submitted as a value.
|
499 |
-
var form = elem.form
|
500 |
-
if (form && typeof form === 'string') {
|
501 |
-
// Get the real form.
|
502 |
-
form = document.getElementById(form)
|
503 |
-
|
504 |
-
// Set a flag on the form so we know it's been handled (forms can contain
|
505 |
-
// multiple inputs).
|
506 |
-
if (!form.getAttribute(ATTR_FORM_HANDLED)) {
|
507 |
-
addEventListener(form, 'submit', makeSubmitHandler(form))
|
508 |
-
form.setAttribute(ATTR_FORM_HANDLED, 'true')
|
509 |
-
}
|
510 |
-
}
|
511 |
-
|
512 |
-
// Bind event handlers to the element so we can hide/show the placeholder
|
513 |
-
// as appropriate.
|
514 |
-
addEventListener(elem, 'focus', makeFocusHandler(elem))
|
515 |
-
addEventListener(elem, 'blur', makeBlurHandler(elem))
|
516 |
-
|
517 |
-
// If the placeholder should hide on input rather than on focus we need
|
518 |
-
// additional event handlers
|
519 |
-
if (hideOnInput) {
|
520 |
-
addEventListener(elem, 'keydown', makeKeydownHandler(elem))
|
521 |
-
addEventListener(elem, 'keyup', makeKeyupHandler(elem))
|
522 |
-
addEventListener(elem, 'click', makeClickHandler(elem))
|
523 |
-
}
|
524 |
-
|
525 |
-
// Remember that we've bound event handlers to this element.
|
526 |
-
elem.setAttribute(ATTR_EVENTS_BOUND, 'true')
|
527 |
-
elem.setAttribute(ATTR_CURRENT_VAL, placeholder)
|
528 |
-
|
529 |
-
// If the element doesn't have a value and is not focussed, set it to the
|
530 |
-
// placeholder string.
|
531 |
-
if (hideOnInput || elem !== safeActiveElement()) {
|
532 |
-
showPlaceholder(elem)
|
533 |
-
}
|
534 |
-
}
|
535 |
-
}(this))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/integrations/class-integration.php
CHANGED
@@ -39,6 +39,16 @@ abstract class MC4WP_Integration {
|
|
39 |
*/
|
40 |
protected $checkbox_name = '';
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
/**
|
43 |
* Constructor
|
44 |
*
|
@@ -181,6 +191,18 @@ abstract class MC4WP_Integration {
|
|
181 |
return isset( $data[ $this->checkbox_name ] ) && (int) $data[ $this->checkbox_name ] === 1;
|
182 |
}
|
183 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
/**
|
185 |
* Get a string of attributes for the checkbox element.
|
186 |
*
|
@@ -196,6 +218,10 @@ abstract class MC4WP_Integration {
|
|
196 |
$attributes['checked'] = 'checked';
|
197 |
}
|
198 |
|
|
|
|
|
|
|
|
|
199 |
/**
|
200 |
* Filters the attributes array.
|
201 |
*
|
@@ -216,12 +242,7 @@ abstract class MC4WP_Integration {
|
|
216 |
*/
|
217 |
$attributes = (array) apply_filters( 'mc4wp_integration_' . $slug . '_checkbox_attributes', $attributes, $integration );
|
218 |
|
219 |
-
$
|
220 |
-
foreach ( $attributes as $key => $value ) {
|
221 |
-
$string .= sprintf( '%s="%s"', $key, esc_attr( $value ) );
|
222 |
-
}
|
223 |
-
|
224 |
-
return $string;
|
225 |
}
|
226 |
|
227 |
/**
|
@@ -232,11 +253,11 @@ abstract class MC4WP_Integration {
|
|
232 |
}
|
233 |
|
234 |
/**
|
235 |
-
* Get HTML for the checkbox
|
236 |
-
*
|
237 |
* @return string
|
238 |
*/
|
239 |
-
public function get_checkbox_html(
|
240 |
$show_checkbox = empty( $this->options['implicit'] );
|
241 |
$integration_slug = $this->slug;
|
242 |
|
@@ -247,7 +268,6 @@ abstract class MC4WP_Integration {
|
|
247 |
* @param string $integration_slug
|
248 |
*/
|
249 |
$show_checkbox = (bool) apply_filters( 'mc4wp_integration_show_checkbox', $show_checkbox, $integration_slug );
|
250 |
-
|
251 |
if ( ! $show_checkbox ) {
|
252 |
return '';
|
253 |
}
|
@@ -263,23 +283,11 @@ abstract class MC4WP_Integration {
|
|
263 |
do_action( 'mc4wp_integration_' . $this->slug . '_before_checkbox_wrapper', $this );
|
264 |
|
265 |
$wrapper_tag = $this->options['wrap_p'] ? 'p' : 'span';
|
266 |
-
|
267 |
-
$html_attrs = array_merge(
|
268 |
-
array(
|
269 |
-
'class' => '',
|
270 |
-
),
|
271 |
-
$html_attrs
|
272 |
-
);
|
273 |
-
$html_attrs['class'] = $html_attrs['class'] . sprintf( ' mc4wp-checkbox mc4wp-checkbox-%s', $this->slug );
|
274 |
-
|
275 |
-
$html_attr_str = '';
|
276 |
-
foreach ( $html_attrs as $key => $value ) {
|
277 |
-
$html_attr_str .= sprintf( '%s="%s" ', $key, esc_attr( $value ) );
|
278 |
-
}
|
279 |
|
280 |
// Hidden field to make sure "0" is sent to server
|
281 |
echo sprintf( '<input type="hidden" name="%s" value="0" />', esc_attr( $this->checkbox_name ) );
|
282 |
-
echo sprintf( '<%s %s>', $wrapper_tag, $
|
283 |
echo '<label>';
|
284 |
echo sprintf( '<input type="checkbox" name="%s" value="1" %s />', esc_attr( $this->checkbox_name ), $this->get_checkbox_attributes() );
|
285 |
echo sprintf( '<span>%s</span>', $this->get_label_text() );
|
@@ -550,6 +558,20 @@ abstract class MC4WP_Integration {
|
|
550 |
return $data;
|
551 |
}
|
552 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
553 |
/**
|
554 |
* @return MC4WP_Debug_Log
|
555 |
*/
|
39 |
*/
|
40 |
protected $checkbox_name = '';
|
41 |
|
42 |
+
/**
|
43 |
+
* @var string[]
|
44 |
+
*/
|
45 |
+
public $checkbox_classes = array();
|
46 |
+
|
47 |
+
/**
|
48 |
+
* @var string[]
|
49 |
+
*/
|
50 |
+
public $wrapper_classes = array();
|
51 |
+
|
52 |
/**
|
53 |
* Constructor
|
54 |
*
|
191 |
return isset( $data[ $this->checkbox_name ] ) && (int) $data[ $this->checkbox_name ] === 1;
|
192 |
}
|
193 |
|
194 |
+
/**
|
195 |
+
* Get a string of attributes for the HTML element wrapping the checkbox + label
|
196 |
+
*
|
197 |
+
* @return string
|
198 |
+
*/
|
199 |
+
protected function get_wrapper_attributes() {
|
200 |
+
$html_attrs = array(
|
201 |
+
'class' => sprintf( 'mc4wp-checkbox mc4wp-checkbox-%s %s', $this->slug, join( ' ', $this->wrapper_classes ) ),
|
202 |
+
);
|
203 |
+
return $this->array_to_attr_string( $html_attrs );
|
204 |
+
}
|
205 |
+
|
206 |
/**
|
207 |
* Get a string of attributes for the checkbox element.
|
208 |
*
|
218 |
$attributes['checked'] = 'checked';
|
219 |
}
|
220 |
|
221 |
+
if ( ! empty( $this->checkbox_classes ) ) {
|
222 |
+
$attributes['class'] = join( ' ', $this->checkbox_classes );
|
223 |
+
}
|
224 |
+
|
225 |
/**
|
226 |
* Filters the attributes array.
|
227 |
*
|
242 |
*/
|
243 |
$attributes = (array) apply_filters( 'mc4wp_integration_' . $slug . '_checkbox_attributes', $attributes, $integration );
|
244 |
|
245 |
+
return $this->array_to_attr_string( $attributes );
|
|
|
|
|
|
|
|
|
|
|
246 |
}
|
247 |
|
248 |
/**
|
253 |
}
|
254 |
|
255 |
/**
|
256 |
+
* Get HTML string for the checkbox row (incl. wrapper, label, etc.)
|
257 |
+
*
|
258 |
* @return string
|
259 |
*/
|
260 |
+
public function get_checkbox_html() {
|
261 |
$show_checkbox = empty( $this->options['implicit'] );
|
262 |
$integration_slug = $this->slug;
|
263 |
|
268 |
* @param string $integration_slug
|
269 |
*/
|
270 |
$show_checkbox = (bool) apply_filters( 'mc4wp_integration_show_checkbox', $show_checkbox, $integration_slug );
|
|
|
271 |
if ( ! $show_checkbox ) {
|
272 |
return '';
|
273 |
}
|
283 |
do_action( 'mc4wp_integration_' . $this->slug . '_before_checkbox_wrapper', $this );
|
284 |
|
285 |
$wrapper_tag = $this->options['wrap_p'] ? 'p' : 'span';
|
286 |
+
$wrapper_attrs = $this->get_wrapper_attributes();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
287 |
|
288 |
// Hidden field to make sure "0" is sent to server
|
289 |
echo sprintf( '<input type="hidden" name="%s" value="0" />', esc_attr( $this->checkbox_name ) );
|
290 |
+
echo sprintf( '<%s %s>', $wrapper_tag, $wrapper_attrs );
|
291 |
echo '<label>';
|
292 |
echo sprintf( '<input type="checkbox" name="%s" value="1" %s />', esc_attr( $this->checkbox_name ), $this->get_checkbox_attributes() );
|
293 |
echo sprintf( '<span>%s</span>', $this->get_label_text() );
|
558 |
return $data;
|
559 |
}
|
560 |
|
561 |
+
/**
|
562 |
+
* Converts an array to an attribute string (foo="bar" bar="foo") with escaped values.
|
563 |
+
*
|
564 |
+
* @param array $attrs
|
565 |
+
* @return string
|
566 |
+
*/
|
567 |
+
protected function array_to_attr_string( array $attrs ) {
|
568 |
+
$str = '';
|
569 |
+
foreach ( $attrs as $key => $value ) {
|
570 |
+
$str .= sprintf( '%s="%s" ', $key, esc_attr( $value ) );
|
571 |
+
}
|
572 |
+
return $str;
|
573 |
+
}
|
574 |
+
|
575 |
/**
|
576 |
* @return MC4WP_Debug_Log
|
577 |
*/
|
includes/integrations/views/integration-settings.php
CHANGED
@@ -180,7 +180,16 @@
|
|
180 |
<?php
|
181 |
echo esc_html__( 'Select "yes" if the checkbox should be pre-checked.', 'mailchimp-for-wp' );
|
182 |
echo '<br />';
|
183 |
-
echo sprintf(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
?>
|
185 |
</p>
|
186 |
</td>
|
180 |
<?php
|
181 |
echo esc_html__( 'Select "yes" if the checkbox should be pre-checked.', 'mailchimp-for-wp' );
|
182 |
echo '<br />';
|
183 |
+
echo sprintf(
|
184 |
+
wp_kses(
|
185 |
+
__( '<strong>Warning: </strong> enabling this may affect your <a href="%s">GDPR compliance</a>.', 'mailchimp-for-wp' ),
|
186 |
+
array(
|
187 |
+
'a' => array( 'href' => array() ),
|
188 |
+
'strong' => array(),
|
189 |
+
)
|
190 |
+
),
|
191 |
+
'https://www.mc4wp.com/kb/gdpr-compliance/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=integrations-page'
|
192 |
+
);
|
193 |
?>
|
194 |
</p>
|
195 |
</td>
|
integrations/give/class-give.php
CHANGED
@@ -13,7 +13,7 @@ class MC4WP_Give_Integration extends MC4WP_Integration {
|
|
13 |
|
14 |
public function add_hooks() {
|
15 |
if ( ! $this->options['implicit'] ) {
|
16 |
-
add_action( '
|
17 |
}
|
18 |
|
19 |
add_action( 'give_checkout_before_gateway', array( $this, 'subscribe_from_give' ), 90, 2 );
|
13 |
|
14 |
public function add_hooks() {
|
15 |
if ( ! $this->options['implicit'] ) {
|
16 |
+
add_action( 'give_purchase_form_register_login_fields', array( $this, 'output_checkbox' ), 50 );
|
17 |
}
|
18 |
|
19 |
add_action( 'give_checkout_before_gateway', array( $this, 'subscribe_from_give' ), 90, 2 );
|
integrations/woocommerce/class-woocommerce.php
CHANGED
@@ -20,6 +20,18 @@ class MC4WP_WooCommerce_Integration extends MC4WP_Integration {
|
|
20 |
*/
|
21 |
public $description = "Subscribes people from WooCommerce's checkout form.";
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
/**
|
24 |
* Add hooks
|
25 |
*/
|
@@ -73,13 +85,7 @@ class MC4WP_WooCommerce_Integration extends MC4WP_Integration {
|
|
73 |
return $field;
|
74 |
}
|
75 |
|
76 |
-
$field
|
77 |
-
$field .= $this->get_checkbox_html(
|
78 |
-
array(
|
79 |
-
'class' => 'form-row form-row-wide',
|
80 |
-
)
|
81 |
-
);
|
82 |
-
return $field;
|
83 |
}
|
84 |
|
85 |
/**
|
20 |
*/
|
21 |
public $description = "Subscribes people from WooCommerce's checkout form.";
|
22 |
|
23 |
+
/**
|
24 |
+
* @var string[]
|
25 |
+
*/
|
26 |
+
public $checkbox_classes = array(
|
27 |
+
'input-checkbox',
|
28 |
+
);
|
29 |
+
|
30 |
+
public $wrapper_classes = array(
|
31 |
+
'form-row',
|
32 |
+
'form-row-wide',
|
33 |
+
);
|
34 |
+
|
35 |
/**
|
36 |
* Add hooks
|
37 |
*/
|
85 |
return $field;
|
86 |
}
|
87 |
|
88 |
+
return sprintf( '%s%s%s', $field, PHP_EOL, $this->get_checkbox_html() );
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
}
|
90 |
|
91 |
/**
|
languages/mailchimp-for-wp.pot
CHANGED
@@ -457,11 +457,11 @@ msgstr ""
|
|
457 |
msgid "Enable Google reCaptcha"
|
458 |
msgstr ""
|
459 |
|
460 |
-
#: includes/forms/class-google-recaptcha.php:169, includes/views/other-settings.php:21, integrations/contact-form-7/class-contact-form-7.php:74, integrations/gravity-forms/class-gravity-forms.php:112, integrations/gravity-forms/class-gravity-forms.php:124, integrations/wpforms/class-field.php:253, includes/integrations/views/integration-settings.php:66, includes/integrations/views/integration-settings.php:90, includes/integrations/views/integration-settings.php:177, includes/integrations/views/integration-settings.php:
|
461 |
msgid "Yes"
|
462 |
msgstr ""
|
463 |
|
464 |
-
#: includes/forms/class-google-recaptcha.php:171, includes/views/other-settings.php:25, integrations/contact-form-7/class-contact-form-7.php:74, integrations/gravity-forms/class-gravity-forms.php:113, integrations/gravity-forms/class-gravity-forms.php:125, integrations/wpforms/class-field.php:253, includes/integrations/views/integration-settings.php:67, includes/integrations/views/integration-settings.php:91, includes/integrations/views/integration-settings.php:178, includes/integrations/views/integration-settings.php:
|
465 |
msgid "No"
|
466 |
msgstr ""
|
467 |
|
@@ -501,7 +501,7 @@ msgstr ""
|
|
501 |
msgid "Integrations"
|
502 |
msgstr ""
|
503 |
|
504 |
-
#: includes/integrations/class-integration.php:
|
505 |
msgid "Sign me up for the newsletter!"
|
506 |
msgstr ""
|
507 |
|
@@ -638,11 +638,11 @@ msgstr ""
|
|
638 |
msgid "Select the list(s) to which people who check the checkbox should be subscribed."
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: integrations/gravity-forms/class-gravity-forms.php:109, includes/integrations/views/integration-settings.php:
|
642 |
msgid "Double opt-in?"
|
643 |
msgstr ""
|
644 |
|
645 |
-
#: integrations/gravity-forms/class-gravity-forms.php:116, includes/integrations/views/integration-settings.php:
|
646 |
msgid "Select \"yes\" if you want people to confirm their email address before being subscribed (recommended)"
|
647 |
msgstr ""
|
648 |
|
@@ -654,7 +654,7 @@ msgstr ""
|
|
654 |
msgid "Select \"yes\" if the checkbox should be pre-checked."
|
655 |
msgstr ""
|
656 |
|
657 |
-
#: integrations/gravity-forms/class-gravity-forms.php:131, includes/integrations/views/integration-settings.php:100, includes/integrations/views/integration-settings.php:
|
658 |
msgid "<strong>Warning: </strong> enabling this may affect your <a href=\"%s\">GDPR compliance</a>."
|
659 |
msgstr ""
|
660 |
|
@@ -670,7 +670,7 @@ msgstr ""
|
|
670 |
msgid "Use double opt-in?"
|
671 |
msgstr ""
|
672 |
|
673 |
-
#: integrations/ninja-forms/class-action.php:48, includes/integrations/views/integration-settings.php:
|
674 |
msgid "Update existing subscribers?"
|
675 |
msgstr ""
|
676 |
|
@@ -722,7 +722,7 @@ msgstr ""
|
|
722 |
msgid "Position"
|
723 |
msgstr ""
|
724 |
|
725 |
-
#: integrations/woocommerce/class-woocommerce.php:
|
726 |
msgid "Order #%d"
|
727 |
msgstr ""
|
728 |
|
@@ -846,27 +846,27 @@ msgstr ""
|
|
846 |
msgid "HTML tags like %s are allowed in the label text."
|
847 |
msgstr ""
|
848 |
|
849 |
-
#: includes/integrations/views/integration-settings.php:
|
850 |
msgid "Load some default CSS?"
|
851 |
msgstr ""
|
852 |
|
853 |
-
#: includes/integrations/views/integration-settings.php:
|
854 |
msgid "Select \"yes\" if the checkbox appears in a weird place."
|
855 |
msgstr ""
|
856 |
|
857 |
-
#: includes/integrations/views/integration-settings.php:
|
858 |
msgid "Select \"yes\" if you want to update existing subscribers with the data that is sent."
|
859 |
msgstr ""
|
860 |
|
861 |
-
#: includes/integrations/views/integration-settings.php:
|
862 |
msgid "Replace interest groups?"
|
863 |
msgstr ""
|
864 |
|
865 |
-
#: includes/integrations/views/integration-settings.php:
|
866 |
msgid "Select \"no\" if you want to add the selected interests to any previously selected interests when updating a subscriber."
|
867 |
msgstr ""
|
868 |
|
869 |
-
#: includes/integrations/views/integration-settings.php:
|
870 |
msgid "What does this do?"
|
871 |
msgstr ""
|
872 |
|
457 |
msgid "Enable Google reCaptcha"
|
458 |
msgstr ""
|
459 |
|
460 |
+
#: includes/forms/class-google-recaptcha.php:169, includes/views/other-settings.php:21, integrations/contact-form-7/class-contact-form-7.php:74, integrations/gravity-forms/class-gravity-forms.php:112, integrations/gravity-forms/class-gravity-forms.php:124, integrations/wpforms/class-field.php:253, includes/integrations/views/integration-settings.php:66, includes/integrations/views/integration-settings.php:90, includes/integrations/views/integration-settings.php:177, includes/integrations/views/integration-settings.php:210, includes/integrations/views/integration-settings.php:227, includes/integrations/views/integration-settings.php:250, includes/integrations/views/integration-settings.php:275, includes/forms/views/tabs/form-settings.php:51, includes/forms/views/tabs/form-settings.php:66, includes/forms/views/tabs/form-settings.php:87, includes/forms/views/tabs/form-settings.php:135
|
461 |
msgid "Yes"
|
462 |
msgstr ""
|
463 |
|
464 |
+
#: includes/forms/class-google-recaptcha.php:171, includes/views/other-settings.php:25, integrations/contact-form-7/class-contact-form-7.php:74, integrations/gravity-forms/class-gravity-forms.php:113, integrations/gravity-forms/class-gravity-forms.php:125, integrations/wpforms/class-field.php:253, includes/integrations/views/integration-settings.php:67, includes/integrations/views/integration-settings.php:91, includes/integrations/views/integration-settings.php:178, includes/integrations/views/integration-settings.php:211, includes/integrations/views/integration-settings.php:231, includes/integrations/views/integration-settings.php:254, includes/integrations/views/integration-settings.php:279, includes/forms/views/tabs/form-settings.php:55, includes/forms/views/tabs/form-settings.php:70, includes/forms/views/tabs/form-settings.php:91, includes/forms/views/tabs/form-settings.php:139
|
465 |
msgid "No"
|
466 |
msgstr ""
|
467 |
|
501 |
msgid "Integrations"
|
502 |
msgstr ""
|
503 |
|
504 |
+
#: includes/integrations/class-integration.php:79
|
505 |
msgid "Sign me up for the newsletter!"
|
506 |
msgstr ""
|
507 |
|
638 |
msgid "Select the list(s) to which people who check the checkbox should be subscribed."
|
639 |
msgstr ""
|
640 |
|
641 |
+
#: integrations/gravity-forms/class-gravity-forms.php:109, includes/integrations/views/integration-settings.php:223
|
642 |
msgid "Double opt-in?"
|
643 |
msgstr ""
|
644 |
|
645 |
+
#: integrations/gravity-forms/class-gravity-forms.php:116, includes/integrations/views/integration-settings.php:234
|
646 |
msgid "Select \"yes\" if you want people to confirm their email address before being subscribed (recommended)"
|
647 |
msgstr ""
|
648 |
|
654 |
msgid "Select \"yes\" if the checkbox should be pre-checked."
|
655 |
msgstr ""
|
656 |
|
657 |
+
#: integrations/gravity-forms/class-gravity-forms.php:131, includes/integrations/views/integration-settings.php:100, includes/integrations/views/integration-settings.php:185
|
658 |
msgid "<strong>Warning: </strong> enabling this may affect your <a href=\"%s\">GDPR compliance</a>."
|
659 |
msgstr ""
|
660 |
|
670 |
msgid "Use double opt-in?"
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: integrations/ninja-forms/class-action.php:48, includes/integrations/views/integration-settings.php:246, includes/forms/views/tabs/form-settings.php:62
|
674 |
msgid "Update existing subscribers?"
|
675 |
msgstr ""
|
676 |
|
722 |
msgid "Position"
|
723 |
msgstr ""
|
724 |
|
725 |
+
#: integrations/woocommerce/class-woocommerce.php:176
|
726 |
msgid "Order #%d"
|
727 |
msgstr ""
|
728 |
|
846 |
msgid "HTML tags like %s are allowed in the label text."
|
847 |
msgstr ""
|
848 |
|
849 |
+
#: includes/integrations/views/integration-settings.php:208
|
850 |
msgid "Load some default CSS?"
|
851 |
msgstr ""
|
852 |
|
853 |
+
#: includes/integrations/views/integration-settings.php:212
|
854 |
msgid "Select \"yes\" if the checkbox appears in a weird place."
|
855 |
msgstr ""
|
856 |
|
857 |
+
#: includes/integrations/views/integration-settings.php:256, includes/forms/views/tabs/form-settings.php:72
|
858 |
msgid "Select \"yes\" if you want to update existing subscribers with the data that is sent."
|
859 |
msgstr ""
|
860 |
|
861 |
+
#: includes/integrations/views/integration-settings.php:271, includes/forms/views/tabs/form-settings.php:83
|
862 |
msgid "Replace interest groups?"
|
863 |
msgstr ""
|
864 |
|
865 |
+
#: includes/integrations/views/integration-settings.php:282, includes/forms/views/tabs/form-settings.php:94
|
866 |
msgid "Select \"no\" if you want to add the selected interests to any previously selected interests when updating a subscriber."
|
867 |
msgstr ""
|
868 |
|
869 |
+
#: includes/integrations/views/integration-settings.php:283, includes/forms/views/tabs/form-settings.php:95
|
870 |
msgid "What does this do?"
|
871 |
msgstr ""
|
872 |
|
mailchimp-for-wp.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: MC4WP: Mailchimp for WordPress
|
4 |
Plugin URI: https://www.mc4wp.com/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=plugins-page
|
5 |
Description: Mailchimp for WordPress by ibericode. Adds various highly effective sign-up methods to your site.
|
6 |
-
Version: 4.8.
|
7 |
Author: ibericode
|
8 |
Author URI: https://ibericode.com/
|
9 |
Text Domain: mailchimp-for-wp
|
@@ -45,7 +45,7 @@ function _mc4wp_load_plugin() {
|
|
45 |
}
|
46 |
|
47 |
// bootstrap the core plugin
|
48 |
-
define( 'MC4WP_VERSION', '4.8.
|
49 |
define( 'MC4WP_PLUGIN_DIR', __DIR__ );
|
50 |
define( 'MC4WP_PLUGIN_FILE', __FILE__ );
|
51 |
|
3 |
Plugin Name: MC4WP: Mailchimp for WordPress
|
4 |
Plugin URI: https://www.mc4wp.com/#utm_source=wp-plugin&utm_medium=mailchimp-for-wp&utm_campaign=plugins-page
|
5 |
Description: Mailchimp for WordPress by ibericode. Adds various highly effective sign-up methods to your site.
|
6 |
+
Version: 4.8.11
|
7 |
Author: ibericode
|
8 |
Author URI: https://ibericode.com/
|
9 |
Text Domain: mailchimp-for-wp
|
45 |
}
|
46 |
|
47 |
// bootstrap the core plugin
|
48 |
+
define( 'MC4WP_VERSION', '4.8.11' );
|
49 |
define( 'MC4WP_PLUGIN_DIR', __DIR__ );
|
50 |
define( 'MC4WP_PLUGIN_FILE', __FILE__ );
|
51 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.mc4wp.com/contribute/#utm_source=wp-plugin-repo&utm_med
|
|
4 |
Tags: mailchimp, mc4wp, email, marketing, newsletter, subscribe, widget, mc4wp, contact form 7, woocommerce, buddypress, ibericode, mailchimp form
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 6.0
|
7 |
-
Stable tag: 4.8.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Requires PHP: 5.3
|
@@ -197,6 +197,14 @@ The plugin provides various filter & action hooks that allow you to modify or ex
|
|
197 |
== Changelog ==
|
198 |
|
199 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
#### 4.8.10 - Sep 14, 2022
|
201 |
|
202 |
- Fix mc4wp_get_request_ip_address() to return an IP address that matches Mailchimp's validation format when X-Forwarded-For header contains a port component.
|
4 |
Tags: mailchimp, mc4wp, email, marketing, newsletter, subscribe, widget, mc4wp, contact form 7, woocommerce, buddypress, ibericode, mailchimp form
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 6.0
|
7 |
+
Stable tag: 4.8.11
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Requires PHP: 5.3
|
197 |
== Changelog ==
|
198 |
|
199 |
|
200 |
+
#### 4.8.11 - Nov 1, 2022
|
201 |
+
|
202 |
+
- Improved default styling for the WooCommerce sign-up checkbox integration.
|
203 |
+
- Add `<strong>` to allowed HTML elements for GDPR disclaimer text on settings pages.
|
204 |
+
- Remove all references to obsolete placeholders.js polyfill.
|
205 |
+
- Move the GiveWP sign-up checkbox closer to the email input field. Thanks [Matthew Lewis](https://github.com/Matthew-Lewis).
|
206 |
+
|
207 |
+
|
208 |
#### 4.8.10 - Sep 14, 2022
|
209 |
|
210 |
- Fix mc4wp_get_request_ip_address() to return an IP address that matches Mailchimp's validation format when X-Forwarded-For header contains a port component.
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitb6c375ce6e96db702ab60c5ac4deef50::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -24,15 +24,15 @@ class ComposerAutoloaderInit6853f969aeab142bb1203dfc0bfa7a38
|
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
-
spl_autoload_register(array('
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
-
spl_autoload_unregister(array('
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
-
call_user_func(\Composer\Autoload\
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
@@ -53,12 +53,12 @@ class ComposerAutoloaderInit6853f969aeab142bb1203dfc0bfa7a38
|
|
53 |
$loader->register(true);
|
54 |
|
55 |
if ($useStaticLoader) {
|
56 |
-
$includeFiles = Composer\Autoload\
|
57 |
} else {
|
58 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
}
|
60 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
-
|
62 |
}
|
63 |
|
64 |
return $loader;
|
@@ -70,7 +70,7 @@ class ComposerAutoloaderInit6853f969aeab142bb1203dfc0bfa7a38
|
|
70 |
* @param string $file
|
71 |
* @return void
|
72 |
*/
|
73 |
-
function
|
74 |
{
|
75 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
76 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitb6c375ce6e96db702ab60c5ac4deef50
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInitb6c375ce6e96db702ab60c5ac4deef50', 'loadClassLoader'), true, true);
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitb6c375ce6e96db702ab60c5ac4deef50', 'loadClassLoader'));
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitb6c375ce6e96db702ab60c5ac4deef50::getInitializer($loader));
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
53 |
$loader->register(true);
|
54 |
|
55 |
if ($useStaticLoader) {
|
56 |
+
$includeFiles = Composer\Autoload\ComposerStaticInitb6c375ce6e96db702ab60c5ac4deef50::$files;
|
57 |
} else {
|
58 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
}
|
60 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
+
composerRequireb6c375ce6e96db702ab60c5ac4deef50($fileIdentifier, $file);
|
62 |
}
|
63 |
|
64 |
return $loader;
|
70 |
* @param string $file
|
71 |
* @return void
|
72 |
*/
|
73 |
+
function composerRequireb6c375ce6e96db702ab60c5ac4deef50($fileIdentifier, $file)
|
74 |
{
|
75 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
76 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'fca581ae5268210490253d58378748c5' => __DIR__ . '/../..' . '/includes/functions.php',
|
@@ -87,7 +87,7 @@ class ComposerStaticInit6853f969aeab142bb1203dfc0bfa7a38
|
|
87 |
public static function getInitializer(ClassLoader $loader)
|
88 |
{
|
89 |
return \Closure::bind(function () use ($loader) {
|
90 |
-
$loader->classMap =
|
91 |
|
92 |
}, null, ClassLoader::class);
|
93 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitb6c375ce6e96db702ab60c5ac4deef50
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'fca581ae5268210490253d58378748c5' => __DIR__ . '/../..' . '/includes/functions.php',
|
87 |
public static function getInitializer(ClassLoader $loader)
|
88 |
{
|
89 |
return \Closure::bind(function () use ($loader) {
|
90 |
+
$loader->classMap = ComposerStaticInitb6c375ce6e96db702ab60c5ac4deef50::$classMap;
|
91 |
|
92 |
}, null, ClassLoader::class);
|
93 |
}
|
vendor/composer/installed.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
9 |
'name' => 'ibericode/mailchimp-for-wordpress',
|
10 |
'dev' => false,
|
11 |
),
|
@@ -16,7 +16,7 @@
|
|
16 |
'type' => 'wordpress-plugin',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
-
'reference' => '
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
),
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => '93b05cb87303f82f980fab307c2b3fa560359156',
|
9 |
'name' => 'ibericode/mailchimp-for-wordpress',
|
10 |
'dev' => false,
|
11 |
),
|
16 |
'type' => 'wordpress-plugin',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
+
'reference' => '93b05cb87303f82f980fab307c2b3fa560359156',
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
),
|