Version Description
Download this release
Release Info
Developer | constantcontact |
Plugin | Creative Mail – Easier WordPress & WooCommerce Email Marketing |
Version | 1.4.1 |
Comparing to | |
See all releases |
Code changes from version 1.4.0 to 1.4.1
- CHANGELOG.md +2 -0
- README.md +2 -1
- assets/css/admin.css +59 -0
- assets/images/banner-image_collect.svg +69 -0
- assets/images/post-boxes.svg +105 -0
- assets/images/screenshot-creative-mail-form.png +0 -0
- assets/js/block/submit.js +1 -1
- assets/js/block/subscribe.asset.php +1 -1
- assets/js/block/subscribe.css +1 -1
- assets/js/block/subscribe.js +1 -1
- assets/js/subscribe/submit.js +56 -17
- composer.lock +51 -21
- creative-mail-plugin.php +5 -4
- readme.txt +74 -20
- src/{clients → Clients}/CreativeMailClient.php +0 -0
- src/{constants → Constants}/EnvironmentNames.php +0 -0
- src/{exceptions → Exceptions}/CreativeMailException.php +0 -0
- src/{helpers → Helpers}/EncryptionHelper.php +0 -0
- src/{helpers → Helpers}/EnvironmentHelper.php +0 -0
- src/{helpers → Helpers}/GuidHelper.php +0 -0
- src/{helpers → Helpers}/OptionsHelper.php +0 -0
- src/{helpers → Helpers}/SsoHelper.php +0 -0
- src/{helpers → Helpers}/ValidationHelper.php +0 -0
- src/{integrations → Integrations}/Integration.php +0 -0
- src/{managers → Managers}/AdminManager.php +6 -6
- src/{managers → Managers}/ApiManager.php +0 -0
- src/{managers → Managers}/CheckoutManager.php +0 -0
- src/{managers → Managers}/DatabaseManager.php +148 -51
- src/{managers → Managers}/EmailManager.php +4 -2
- src/{managers → Managers}/FormManager.php +25 -3
- src/{managers → Managers}/InstanceManager.php +0 -0
- src/{managers → Managers}/IntegrationManager.php +11 -13
- src/{managers → Managers}/RaygunManager.php +0 -0
- src/{modules/api → Modules/Api}/Models/ApiRequestItem.php +0 -0
- src/{modules/api → Modules/Api}/Processes/ApiBackgroundProcess.php +0 -0
- src/{modules/blog/models → Modules/Blog/Models}/BlogAttachment.php +0 -0
- src/{modules/blog/models → Modules/Blog/Models}/BlogInformation.php +0 -0
- src/{modules/blog/models → Modules/Blog/Models}/BlogPost.php +0 -0
- src/{modules/contacts → Modules/Contacts}/Exceptions/InvalidContactSyncBackgroundRequestException.php +2 -2
- src/{modules/contacts → Modules/Contacts}/Exceptions/InvalidHandlerContactSyncRequestException.php +2 -2
- src/{modules/contacts → Modules/Contacts}/Handlers/BaseContactFormPluginHandler.php +0 -0
- src/{modules/contacts → Modules/Contacts}/Handlers/BlueHostBuilderPluginHandler.php +0 -0
- src/{modules/contacts → Modules/Contacts}/Handlers/CalderaPluginHandler.php +0 -0
- src/{modules/contacts → Modules/Contacts}/Handlers/ContactFormSevenPluginHandler.php +0 -0
- src/{modules/contacts → Modules/Contacts}/Handlers/CreativeMailPluginHandler.php +31 -2
- src/{modules/contacts → Modules/Contacts}/Handlers/ElementorPluginHandler.php +0 -0
- src/{modules/contacts → Modules/Contacts}/Handlers/FormidablePluginHandler.php +0 -0
- src/{modules/contacts → Modules/Contacts}/Handlers/GravityFormsPluginHandler.php +0 -0
- src/{modules/contacts → Modules/Contacts}/Handlers/JetpackPluginHandler.php +0 -0
- src/{modules/contacts → Modules/Contacts}/Handlers/NewsLetterContactFormPluginHandler.php +0 -0
- src/{modules/contacts → Modules/Contacts}/Handlers/NinjaFormsPluginHandler.php +0 -0
- src/{modules/contacts → Modules/Contacts}/Handlers/WooCommercePluginHandler.php +28 -22
- src/{modules/contacts → Modules/Contacts}/Handlers/WpFormsPluginHandler.php +0 -0
- src/{modules/contacts → Modules/Contacts}/Managers/ContactsSyncManager.php +0 -0
- src/{modules/contacts/models → Modules/Contacts/Models}/ContactAddressModel.php +0 -0
- src/{modules/contacts/models → Modules/Contacts/Models}/ContactFormSevenSubmission.php +0 -0
- src/{modules/contacts/models → Modules/Contacts/Models}/ContactModel.php +0 -0
- src/{modules/contacts/models → Modules/Contacts/Models}/OptActionBy.php +0 -0
- src/{modules/contacts/Processes → Modules/Contacts/Processors}/ContactsSyncBackgroundProcessor.php +0 -0
- src/{modules/contacts → Modules/Contacts}/Services/ContactsSyncService.php +0 -0
- src/{modules → Modules}/DashboardWidgetModule.php +0 -0
- src/{modules → Modules}/FeedbackNoticeModule.php +0 -0
- src/{modules/woocommerce/emails → Modules/WooCommerce/Emails}/AbandonedCartEmail.php +1 -1
- src/{modules/woocommerce/models → Modules/WooCommerce/Models}/WCInformationModel.php +0 -0
- src/{modules/woocommerce/models → Modules/WooCommerce/Models}/WCProductModel.php +0 -0
- src/{modules/woocommerce/models → Modules/WooCommerce/Models}/WCStoreInformation.php +0 -0
- src/blocks/subscribe/block.json +18 -0
- src/blocks/subscribe/deprecated/deprecated_save.js +160 -0
- src/blocks/subscribe/edit.js +142 -29
- src/blocks/subscribe/index.js +62 -0
- src/blocks/subscribe/save.js +80 -26
- src/blocks/subscribe/style.scss +52 -1
- src/views/activated-integrations.php +3 -0
- src/views/contact-sync.php +5 -1
- src/views/creative-mail-form-banner.php +69 -0
- vendor/autoload.php +1 -1
- vendor/composer/autoload_classmap.php +52 -52
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +57 -57
- vendor/composer/installed.json +57 -28
- vendor/defuse/php-encryption/.gitignore +0 -11
- vendor/defuse/php-encryption/.php_cs +0 -60
- vendor/defuse/php-encryption/README.md +24 -5
- vendor/defuse/php-encryption/composer.json +2 -3
- vendor/defuse/php-encryption/dist/Makefile +4 -2
- vendor/defuse/php-encryption/dist/signingkey-new.asc +53 -0
- vendor/defuse/php-encryption/dist/signingkey-new.asc.sig +0 -0
- vendor/defuse/php-encryption/docs/InternalDeveloperDocs.md +1 -1
- vendor/defuse/php-encryption/docs/Tutorial.md +8 -8
- vendor/defuse/php-encryption/psalm.xml +0 -13
- vendor/defuse/php-encryption/src/Core.php +11 -2
- vendor/defuse/php-encryption/src/File.php +29 -13
- vendor/firebase/php-jwt/.github/actions/entrypoint.sh +18 -0
- vendor/firebase/php-jwt/.github/workflows/tests.yml +77 -0
- vendor/firebase/php-jwt/LICENSE +1 -1
- vendor/firebase/php-jwt/README.md +52 -7
- vendor/firebase/php-jwt/src/BeforeValidException.php +1 -0
- vendor/firebase/php-jwt/src/ExpiredException.php +1 -0
- vendor/firebase/php-jwt/src/JWK.php +2 -1
- vendor/firebase/php-jwt/src/JWT.php +23 -15
- vendor/firebase/php-jwt/src/SignatureInvalidException.php +1 -0
CHANGELOG.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
Changelog
|
2 |
=========
|
3 |
|
|
|
|
|
4 |
|
5 |
#### 1.4.0 - June 15 2021
|
6 |
- Added gutenberg contact form block CreativeMail
|
1 |
Changelog
|
2 |
=========
|
3 |
|
4 |
+
#### 1.4.1 - July 12 2021
|
5 |
+
- Fixed several bugs
|
6 |
|
7 |
#### 1.4.0 - June 15 2021
|
8 |
- Added gutenberg contact form block CreativeMail
|
README.md
CHANGED
@@ -3,7 +3,7 @@ Contributors: Constant Contact
|
|
3 |
Tags: email, marketing, newsletter, subscribe, contact form, constant contact, crm, automations, ecommerce, promotion, offers, retargeting
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.7
|
6 |
-
Stable tag: 1.4.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
Requires PHP: 5.6
|
@@ -90,6 +90,7 @@ Creative Mail by Constant Contact [Privacy Notice](https://www.endurance.com/pri
|
|
90 |
6. Enhance your brand with logomaker
|
91 |
|
92 |
== Changelog ==
|
|
|
93 |
* 1.4.0 - Added gutenberg contact form block CreativeMail
|
94 |
* 1.3.9 - Include notice when you have enabled a password protection plugin.
|
95 |
* 1.3.8 - Fixes an issue with WooCommerce recommendations.
|
3 |
Tags: email, marketing, newsletter, subscribe, contact form, constant contact, crm, automations, ecommerce, promotion, offers, retargeting
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.7
|
6 |
+
Stable tag: 1.4.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
Requires PHP: 5.6
|
90 |
6. Enhance your brand with logomaker
|
91 |
|
92 |
== Changelog ==
|
93 |
+
* 1.4.1 - Fixed several bugs
|
94 |
* 1.4.0 - Added gutenberg contact form block CreativeMail
|
95 |
* 1.3.9 - Include notice when you have enabled a password protection plugin.
|
96 |
* 1.3.8 - Fixes an issue with WooCommerce recommendations.
|
assets/css/admin.css
CHANGED
@@ -535,6 +535,15 @@
|
|
535 |
}
|
536 |
}
|
537 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
538 |
.ce4wp-plugin-support-title {
|
539 |
font-size: 18px;
|
540 |
font-weight: bold;
|
@@ -981,6 +990,15 @@ p.ce4wp-subtitle {
|
|
981 |
background: rgb(246, 246, 246);
|
982 |
}
|
983 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
984 |
.ce4wp-dialog-header-title {
|
985 |
display: flex;
|
986 |
align-self: center;
|
@@ -1067,6 +1085,10 @@ p.ce4wp-subtitle {
|
|
1067 |
padding: 24px;
|
1068 |
}
|
1069 |
|
|
|
|
|
|
|
|
|
1070 |
.ce4wp-consent {
|
1071 |
background-color: rgba(122, 92, 189, 0.1);
|
1072 |
border: 1px solid rgb(209, 179, 238);
|
@@ -1261,6 +1283,43 @@ p.ce4wp-subtitle {
|
|
1261 |
stroke: currentColor;
|
1262 |
}
|
1263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1264 |
@keyframes ce4wp-loader-rotate {
|
1265 |
0% {transform-origin: 50% 50%;}
|
1266 |
100% {transform: rotate(360deg)};
|
535 |
}
|
536 |
}
|
537 |
|
538 |
+
.ce4wp-typography-body {
|
539 |
+
font-size: 16px;
|
540 |
+
}
|
541 |
+
|
542 |
+
.ce4wp_bold_link {
|
543 |
+
font-weight: bold;
|
544 |
+
text-decoration: underline;
|
545 |
+
}
|
546 |
+
|
547 |
.ce4wp-plugin-support-title {
|
548 |
font-size: 18px;
|
549 |
font-weight: bold;
|
990 |
background: rgb(246, 246, 246);
|
991 |
}
|
992 |
|
993 |
+
.ce4wp-show-me-how-modal .ce4wp-dialog-header {
|
994 |
+
height: 180px;
|
995 |
+
}
|
996 |
+
|
997 |
+
.ce4wp-show-me-how-modal .ce4wp-dialog-header-close{
|
998 |
+
align-self: initial;
|
999 |
+
vertical-align: initial;
|
1000 |
+
}
|
1001 |
+
|
1002 |
.ce4wp-dialog-header-title {
|
1003 |
display: flex;
|
1004 |
align-self: center;
|
1085 |
padding: 24px;
|
1086 |
}
|
1087 |
|
1088 |
+
.ce4wp-show-me-how-modal .ce4wp-dialog-content {
|
1089 |
+
margin-top: 180px;
|
1090 |
+
}
|
1091 |
+
|
1092 |
.ce4wp-consent {
|
1093 |
background-color: rgba(122, 92, 189, 0.1);
|
1094 |
border: 1px solid rgb(209, 179, 238);
|
1283 |
stroke: currentColor;
|
1284 |
}
|
1285 |
|
1286 |
+
.ce4wp-banner {
|
1287 |
+
background-color: #7A5CBD;
|
1288 |
+
color: white;
|
1289 |
+
padding: 12px;
|
1290 |
+
border-radius: 4px;
|
1291 |
+
margin-top: 25px;
|
1292 |
+
display: flex;
|
1293 |
+
flex-direction: row;
|
1294 |
+
}
|
1295 |
+
|
1296 |
+
.ce4wp-banner .ce4wp-content {
|
1297 |
+
margin-left: 20px;
|
1298 |
+
}
|
1299 |
+
|
1300 |
+
.ce4wp-banner .ce4wp-content h2,.ce4wp-banner .ce4wp-content a{
|
1301 |
+
color: white
|
1302 |
+
}
|
1303 |
+
|
1304 |
+
.ce4wp-banner .ce4wp-content a {
|
1305 |
+
text-decoration: underline;
|
1306 |
+
font-weight: 600;
|
1307 |
+
}
|
1308 |
+
|
1309 |
+
.ce4wp-banner .ce4wp-content a:hover {
|
1310 |
+
color: rgb( 223, 219, 219);
|
1311 |
+
cursor: pointer;
|
1312 |
+
}
|
1313 |
+
|
1314 |
+
|
1315 |
+
.ce4wp-ml-6 {
|
1316 |
+
margin-left: 24px;
|
1317 |
+
}
|
1318 |
+
|
1319 |
+
.ce4wp-show-me-how-screenshot{
|
1320 |
+
max-width: 280px;
|
1321 |
+
}
|
1322 |
+
|
1323 |
@keyframes ce4wp-loader-rotate {
|
1324 |
0% {transform-origin: 50% 50%;}
|
1325 |
100% {transform: rotate(360deg)};
|
assets/images/banner-image_collect.svg
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg width="106" height="106" viewBox="0 0 106 106" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2 |
+
<g clip-path="url(#clip0)">
|
3 |
+
<g filter="url(#filter0_d)">
|
4 |
+
<rect x="6.68945" y="13.5513" width="97.3935" height="68.5517" rx="2.30773" fill="white"/>
|
5 |
+
</g>
|
6 |
+
<rect x="13.6465" y="38.3516" width="83.4802" height="11.5565" rx="2.30773" fill="black" fill-opacity="0.05"/>
|
7 |
+
<rect x="14.2234" y="38.9285" width="82.3263" height="10.4026" rx="1.7308" stroke="black" stroke-opacity="0.1" stroke-width="1.15387"/>
|
8 |
+
<rect x="13.6465" y="22.9663" width="83.4802" height="11.5565" rx="2.30773" fill="black" fill-opacity="0.05"/>
|
9 |
+
<rect x="14.2234" y="23.5432" width="82.3263" height="10.4026" rx="1.7308" stroke="black" stroke-opacity="0.1" stroke-width="1.15387"/>
|
10 |
+
<path d="M24.8961 64.2731L20.7527 60.1298L19.3418 61.5308L24.8961 67.085L36.8194 55.1617L35.4184 53.7607L24.8961 64.2731Z" fill="#53C65E"/>
|
11 |
+
<path d="M29.0315 57.4374V68.2068H18.2621V57.4374H29.0315ZM29.0315 55.8989H18.2621C17.416 55.8989 16.7236 56.5912 16.7236 57.4374V68.2068C16.7236 69.053 17.416 69.7453 18.2621 69.7453H29.0315C29.8777 69.7453 30.57 69.053 30.57 68.2068V57.4374C30.57 56.5912 29.8777 55.8989 29.0315 55.8989Z" fill="#53C65E"/>
|
12 |
+
<rect x="43.4727" y="55.9434" width="50.5622" height="4.63779" rx="2.31889" fill="black" fill-opacity="0.1"/>
|
13 |
+
<rect x="43.4727" y="64.4458" width="32.7971" height="4.63779" rx="2.31889" fill="black" fill-opacity="0.1"/>
|
14 |
+
<g filter="url(#filter1_d)">
|
15 |
+
<rect x="-38.7002" y="54.6167" width="33.3164" height="31.1024" rx="2.30773" fill="white"/>
|
16 |
+
</g>
|
17 |
+
<g filter="url(#filter2_d)">
|
18 |
+
<rect x="63.7324" y="10.1289" width="36.4214" height="34.001" rx="2.30773" fill="white"/>
|
19 |
+
</g>
|
20 |
+
<circle cx="81.647" cy="27.2212" r="10.1919" fill="#53C65E"/>
|
21 |
+
<path d="M81.4492 27.1298C82.6826 27.1298 83.6815 26.1308 83.6815 24.8974C83.6815 23.664 82.6826 22.665 81.4492 22.665C80.2158 22.665 79.2168 23.664 79.2168 24.8974C79.2168 26.1308 80.2158 27.1298 81.4492 27.1298ZM81.4492 28.246C79.959 28.246 76.9844 28.9939 76.9844 30.4784V31.5946H85.9139V30.4784C85.9139 28.9939 82.9393 28.246 81.4492 28.246Z" fill="white"/>
|
22 |
+
<g filter="url(#filter3_d)">
|
23 |
+
<rect x="58.0732" y="71.668" width="23.8406" height="22.2562" rx="2.30773" fill="white"/>
|
24 |
+
</g>
|
25 |
+
<circle cx="69.7993" cy="82.856" r="6.67139" fill="#FA8B75"/>
|
26 |
+
<path d="M69.6696 82.7961C70.477 82.7961 71.1309 82.1422 71.1309 81.3348C71.1309 80.5275 70.477 79.8735 69.6696 79.8735C68.8623 79.8735 68.2083 80.5275 68.2083 81.3348C68.2083 82.1422 68.8623 82.7961 69.6696 82.7961ZM69.6696 83.5267C68.6942 83.5267 66.7471 84.0162 66.7471 84.988V85.7186H72.5921V84.988C72.5921 84.0162 70.645 83.5267 69.6696 83.5267Z" fill="white"/>
|
27 |
+
</g>
|
28 |
+
<defs>
|
29 |
+
<filter id="filter0_d" x="-4.84921" y="2.0126" width="120.471" height="91.629" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
30 |
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
31 |
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
|
32 |
+
<feOffset/>
|
33 |
+
<feGaussianBlur stdDeviation="5.76933"/>
|
34 |
+
<feColorMatrix type="matrix" values="0 0 0 0 0.5625 0 0 0 0 0.557813 0 0 0 0 0.529688 0 0 0 0.3 0"/>
|
35 |
+
<feBlend mode="multiply" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
36 |
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
37 |
+
</filter>
|
38 |
+
<filter id="filter1_d" x="-50.2389" y="43.078" width="56.3937" height="54.1797" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
39 |
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
40 |
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
|
41 |
+
<feOffset/>
|
42 |
+
<feGaussianBlur stdDeviation="5.76933"/>
|
43 |
+
<feColorMatrix type="matrix" values="0 0 0 0 0.5625 0 0 0 0 0.557813 0 0 0 0 0.529688 0 0 0 0.3 0"/>
|
44 |
+
<feBlend mode="multiply" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
45 |
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
46 |
+
</filter>
|
47 |
+
<filter id="filter2_d" x="52.1938" y="-1.40976" width="59.4988" height="57.0784" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
48 |
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
49 |
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
|
50 |
+
<feOffset/>
|
51 |
+
<feGaussianBlur stdDeviation="5.76933"/>
|
52 |
+
<feColorMatrix type="matrix" values="0 0 0 0 0.5625 0 0 0 0 0.557813 0 0 0 0 0.529688 0 0 0 0.3 0"/>
|
53 |
+
<feBlend mode="multiply" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
54 |
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
55 |
+
</filter>
|
56 |
+
<filter id="filter3_d" x="46.5346" y="60.1293" width="46.9179" height="45.3336" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
57 |
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
58 |
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
|
59 |
+
<feOffset/>
|
60 |
+
<feGaussianBlur stdDeviation="5.76933"/>
|
61 |
+
<feColorMatrix type="matrix" values="0 0 0 0 0.5625 0 0 0 0 0.557813 0 0 0 0 0.529688 0 0 0 0.3 0"/>
|
62 |
+
<feBlend mode="multiply" in2="BackgroundImageFix" result="effect1_dropShadow"/>
|
63 |
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
|
64 |
+
</filter>
|
65 |
+
<clipPath id="clip0">
|
66 |
+
<rect width="104" height="104" fill="white" transform="translate(0.5 1.38623) rotate(-0.423848)"/>
|
67 |
+
</clipPath>
|
68 |
+
</defs>
|
69 |
+
</svg>
|
assets/images/post-boxes.svg
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg width="702" height="179" viewBox="0 0 702 179" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2 |
+
<g clip-path="url(#clip0)">
|
3 |
+
<rect width="702" height="179" fill="#FFF3B7"/>
|
4 |
+
<path d="M399.629 8.90036C402.321 3.07262 404.376 -3.97582 404.737 -8.61646C404.86 -10.2016 404.353 -12.6036 403.609 -13.9543C402.475 -16.0202 401.86 -16.4019 399.742 -16.3554C396.561 -16.2859 393.09 -14.7324 391.035 -12.4584C390.178 -11.5103 388.308 -8.92474 386.879 -6.71335C385.45 -4.5016 381.488 1.23275 378.075 6.02926C363.115 27.0577 333.034 78.0613 334.152 80.5057C334.851 82.034 340.219 77.9332 353.888 65.4303C373.077 47.8792 392.994 23.2631 399.629 8.90036Z" fill="#FFD772"/>
|
5 |
+
<path d="M362.034 -36.132C363.661 -49.6875 363.234 -62.3229 360.775 -73.4031C359.398 -79.6081 355.769 -87.2294 351.446 -92.9943C335.698 -114 323.989 -123.729 310.27 -127.213C303.328 -128.976 294.081 -128.175 287.587 -125.249C285.87 -124.475 283.501 -124.347 276.604 -124.652C233.773 -126.548 189.062 -119.941 142.983 -104.904C69.202 -80.8283 11.0655 -42.6964 -17.4686 0.336426C-34.297 25.7159 -40.454 51.4994 -36.0962 78.347C-34.697 86.9679 -25.3101 107.455 -19.4093 114.765C-2.00389 136.327 19.6921 149.256 52.0584 157.352C70.7171 162.019 87.0672 163.585 107.743 162.684C128.408 161.784 147.726 158.485 168.775 152.26C214.335 138.787 260.194 112.554 296.156 79.3912C304.791 71.4288 319.616 55.2237 326.218 46.5306C346.356 20.017 358.719 -8.51806 362.034 -36.132Z" fill="#FFD772"/>
|
6 |
+
<path d="M162.428 174.45C164.326 173.584 165.538 172.727 166.218 171.769C168.106 169.113 166.56 168.9 157.099 170.515C146.498 172.324 136.204 176.138 135.374 178.563C134.941 179.83 140.015 180.669 144.172 180.019C148.405 179.356 158.266 176.348 162.428 174.45Z" fill="#FFD772"/>
|
7 |
+
<path d="M-62.5825 73.352C-58.0509 61.391 -55.4887 40.9316 -56.5605 25.2676C-57.362 13.5501 -61.2893 10.8294 -69.4275 16.3553C-75.598 20.5453 -85.799 34.5518 -91.887 47.1942C-96.2035 56.157 -97.1766 59.5668 -98.7663 71.2945C-100.125 81.3148 -99.4354 85.9892 -95.245 95.165C-92.1 102.05 -90.1648 104.052 -85.4965 105.241C-81.8175 106.179 -79.5783 105.924 -77.5894 104.341C-75.3291 102.541 -70.1582 95.4141 -69.4361 93.1022C-67.6217 87.2926 -64.9771 79.6732 -62.5825 73.352Z" fill="#FFD772"/>
|
8 |
+
<rect x="207.723" y="87.9922" width="17" height="168" transform="rotate(-1.3294 207.723 87.9922)" fill="#B76E3A"/>
|
9 |
+
<rect x="217.721" y="87.7603" width="7" height="168" transform="rotate(-1.3294 217.721 87.7603)" fill="#854B21"/>
|
10 |
+
<ellipse cx="220.447" cy="162.217" rx="2" ry="5.5" transform="rotate(-1.3294 220.447 162.217)" fill="#B76E3A"/>
|
11 |
+
<ellipse cx="215.032" cy="144.338" rx="1" ry="3.5" transform="rotate(-1.3294 215.032 144.338)" fill="#854B21"/>
|
12 |
+
<path d="M219.02 143.745L208.908 139.022L208.678 129.112L218.579 124.75L219.02 143.745Z" fill="#854B21"/>
|
13 |
+
<path d="M281.838 112.679L204.327 135.584L170.759 46.8387L253.092 37.0728C268.317 35.2668 281.791 46.9604 282.147 62.2886L283.271 110.715C283.292 111.618 282.705 112.423 281.838 112.679Z" fill="#C4C4C4"/>
|
14 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M210.785 133.675L204.328 135.583L171.804 49.5994C171.831 49.5946 171.857 49.5898 171.883 49.585C191.215 46.1032 209.091 60.6985 209.547 80.3359L210.785 133.675Z" fill="#7D7D7D"/>
|
15 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M277.29 47.7405L189.114 61.9169L171.884 46.7052L253.092 37.0727C262.895 35.9099 271.973 40.3436 277.29 47.7405Z" fill="#E0E0E0"/>
|
16 |
+
<path d="M143.494 78.8679C143.129 63.1064 154.297 49.4269 169.814 46.6323V46.6323C189.145 43.1505 207.021 57.7457 207.477 77.3831L208.778 133.418C208.799 134.336 208.193 135.15 207.308 135.393L201.583 136.966C201.107 137.097 200.61 137.139 200.119 137.089L146.472 131.644C145.468 131.542 144.697 130.709 144.674 129.7L143.494 78.8679Z" fill="#F1F1F1"/>
|
17 |
+
<path d="M137.496 79.0076C137.131 63.246 148.299 49.5665 163.815 46.7719V46.7719C183.147 43.2901 201.023 57.8854 201.479 77.5228L202.822 135.371C202.849 136.567 201.827 137.52 200.635 137.409L140.488 131.771C139.478 131.677 138.699 130.841 138.676 129.826L137.496 79.0076Z" fill="#C4C4C4"/>
|
18 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M163.389 50.2004C149.313 52.7203 139.175 65.1239 139.507 79.4194L140.628 127.74C140.647 128.545 141.141 129.236 141.847 129.535C141.728 129.286 141.658 129.009 141.651 128.717L140.53 80.396C140.198 66.1006 150.336 53.6969 164.412 51.1771C173.723 49.5102 182.657 52.4688 189.045 58.2789C182.609 51.8289 173.208 48.4425 163.389 50.2004Z" fill="#7D7D7D"/>
|
19 |
+
<ellipse rx="5.98969" ry="6.25283" transform="matrix(-0.997373 -0.0724384 0.0519504 0.99865 183.673 88.2373)" fill="#4D4D4D"/>
|
20 |
+
<path d="M156.189 103.342C156.459 108.518 162.695 113.152 170.118 113.691C177.542 114.23 183.342 110.471 183.072 105.295C182.803 100.119 176.932 102.515 169.509 101.976C162.086 101.437 155.92 98.1664 156.189 103.342Z" fill="#4D4D4D"/>
|
21 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M181.992 109.199C177.279 107.029 169.092 105.516 161.309 110.839C163.723 112.394 166.799 113.449 170.111 113.69C175.484 114.08 180.006 112.219 181.992 109.199Z" fill="#F1F1F1"/>
|
22 |
+
<ellipse rx="5.98969" ry="6.25283" transform="matrix(-0.997373 -0.0724384 0.0519504 0.99865 153.806 86.0649)" fill="#4D4D4D"/>
|
23 |
+
<path d="M217.221 66.266C216.598 73.8825 216.209 94.4638 216.092 103.802L218.987 99.2339C219.65 91.8832 221.125 74.9778 221.72 66.1616C222.316 57.3454 209.275 47.1119 202.68 43.0971L196.693 43.7362C203.796 48.0726 217.845 58.6495 217.221 66.266Z" fill="#C4C4C4"/>
|
24 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M198.901 43.5004L196.694 43.736C196.706 43.7433 196.718 43.7506 196.73 43.758L198.901 43.5004ZM213.721 57.9604C215.993 60.8305 217.431 63.7143 217.222 66.2658C216.598 73.8823 216.209 94.4636 216.093 103.802L218.987 99.2337C219.65 91.8831 221.125 74.9776 221.721 66.1614C221.919 63.2328 220.612 60.1478 218.536 57.1863L213.721 57.9604Z" fill="#625D5D"/>
|
25 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M216.246 102.244L219.899 30.7008C219.927 30.1457 220.403 29.7202 220.958 29.7536L242.406 31.045C242.961 31.0784 243.382 31.5574 243.344 32.1116L242.354 46.5302C242.318 47.0458 241.896 47.4495 241.379 47.4615L223.162 47.8843L219.973 96.8482C220.281 96.7507 220.6 96.696 220.928 96.6883C223.689 96.6243 226.005 99.9293 226.101 104.07C226.197 108.211 224.037 111.62 221.276 111.684C218.627 111.746 216.388 108.706 216.126 104.802L216.115 104.802L216.12 104.706C216.112 104.572 216.107 104.438 216.104 104.302C216.087 103.59 216.137 102.899 216.246 102.244Z" fill="#7A5CBD"/>
|
26 |
+
<ellipse cx="221.103" cy="104.186" rx="1" ry="2.5" transform="rotate(-1.3294 221.103 104.186)" fill="#625D5D"/>
|
27 |
+
<path d="M247.823 103.717L247.793 102.447L253.709 100.881L253.739 102.169L250.012 115.788L248.9 116.082L252.722 102.42L247.823 103.717Z" fill="#625D5D" fill-opacity="0.47"/>
|
28 |
+
<path d="M254.806 110.841C254.781 109.757 255.129 108.724 255.852 107.742C256.204 107.263 256.586 106.861 256.997 106.538C256.444 106.427 255.988 106.149 255.627 105.705C255.267 105.261 255.079 104.686 255.062 103.979C255.046 103.267 255.171 102.605 255.439 101.995C255.711 101.384 256.072 100.877 256.522 100.476C256.976 100.068 257.472 99.7928 258.009 99.6505C258.827 99.434 259.533 99.5751 260.126 100.074C260.719 100.573 261.027 101.3 261.049 102.256C261.074 103.304 260.663 104.326 259.818 105.322C259.593 105.584 259.35 105.829 259.092 106.057L259.56 106.218C260.394 106.512 260.956 106.964 261.248 107.573C261.457 107.995 261.569 108.487 261.582 109.047C261.595 109.602 261.514 110.141 261.34 110.665C261.17 111.182 260.938 111.639 260.642 112.036C260.008 112.896 259.266 113.439 258.416 113.664C257.811 113.824 257.239 113.829 256.699 113.677C256.163 113.525 255.717 113.205 255.361 112.717C255.008 112.222 254.823 111.597 254.806 110.841ZM258.04 106.823C257.426 107.206 256.895 107.751 256.448 108.457C256.005 109.163 255.791 109.833 255.806 110.466C255.821 111.094 255.955 111.579 256.208 111.923C256.696 112.584 257.417 112.789 258.37 112.536C258.745 112.437 259.077 112.254 259.366 111.987C259.66 111.72 259.888 111.466 260.051 111.227C260.42 110.676 260.596 110.029 260.578 109.285C260.562 108.567 260.347 108.026 259.934 107.663C259.586 107.363 259.128 107.132 258.561 106.97L258.04 106.823ZM256.898 105.24C257.147 105.401 257.389 105.524 257.623 105.609C257.857 105.694 257.983 105.741 258.001 105.748C258.688 105.18 259.146 104.758 259.376 104.483C259.84 103.925 260.064 103.293 260.048 102.586C260.032 101.879 259.817 101.369 259.406 101.055C258.994 100.741 258.521 100.655 257.988 100.796C257.455 100.937 256.997 101.282 256.615 101.831C256.232 102.38 256.049 103.001 256.065 103.696C256.081 104.384 256.359 104.899 256.898 105.24Z" fill="#625D5D" fill-opacity="0.47"/>
|
29 |
+
<path d="M262.852 102.965C262.832 102.1 262.978 101.243 263.29 100.394C263.637 99.4631 264.124 98.7455 264.754 98.2419C265.093 97.9682 265.466 97.7776 265.872 97.6699C266.884 97.402 267.692 97.7458 268.296 98.7014C268.904 99.6497 269.231 101.117 269.278 103.103C269.334 105.527 269.021 107.501 268.338 109.024C267.655 110.547 266.686 111.474 265.43 111.807C265.114 111.891 264.768 111.884 264.393 111.787C264.018 111.69 263.76 111.547 263.619 111.358L263.99 110.276C264.535 110.647 265.049 110.768 265.532 110.64C266.359 110.421 267.036 109.724 267.563 108.548C268.09 107.373 268.362 105.84 268.377 103.948C268.372 103.955 268.344 104.018 268.292 104.136C268.245 104.252 268.202 104.35 268.163 104.427C268.128 104.504 268.07 104.614 267.987 104.759C267.908 104.902 267.829 105.031 267.75 105.143C267.671 105.25 267.569 105.372 267.445 105.509C267.325 105.645 267.201 105.764 267.071 105.866C266.759 106.102 266.424 106.267 266.067 106.361C265.15 106.604 264.391 106.419 263.791 105.806C263.194 105.185 262.882 104.238 262.852 102.965ZM263.855 102.709C263.877 103.659 264.087 104.36 264.483 104.813C264.88 105.26 265.399 105.398 266.041 105.228C266.741 105.043 267.293 104.544 267.697 103.733C267.936 103.253 268.108 102.637 268.213 101.886C268.07 100.048 267.546 99.0163 266.641 98.7901C266.404 98.7305 266.172 98.7306 265.946 98.7904C265.72 98.8502 265.513 98.9418 265.325 99.0651C265.137 99.1884 264.95 99.3605 264.764 99.5813C264.583 99.8009 264.423 100.052 264.284 100.334C263.976 100.967 263.833 101.758 263.855 102.709Z" fill="#625D5D" fill-opacity="0.47"/>
|
30 |
+
<path d="M271.159 107.21C270.982 106.644 270.853 106.059 270.771 105.456C270.693 104.851 270.646 104.205 270.63 103.517C270.614 102.822 270.63 102.147 270.679 101.49C270.727 100.828 270.825 100.159 270.973 99.482C271.121 98.7993 271.311 98.1942 271.544 97.6666C271.782 97.1379 272.096 96.6778 272.487 96.2862C272.883 95.8874 273.329 95.6222 273.826 95.4906C274.323 95.359 274.764 95.3862 275.15 95.572C275.536 95.7578 275.852 96.0511 276.098 96.4519C276.348 96.8515 276.559 97.3471 276.732 97.9387C277.034 99.0049 277.203 100.287 277.237 101.786C277.316 105.179 276.727 107.495 275.469 108.735C275.092 109.111 274.654 109.365 274.157 109.496C273.665 109.627 273.217 109.607 272.813 109.438C272.414 109.268 272.082 108.998 271.819 108.626C271.56 108.247 271.34 107.775 271.159 107.21ZM271.634 103.269C271.683 105.408 271.958 106.876 272.458 107.675C272.855 108.324 273.417 108.552 274.145 108.36C274.944 108.148 275.502 107.584 275.817 106.667C276.017 106.087 276.137 105.494 276.178 104.889C276.239 103.984 276.26 103.148 276.242 102.38C276.224 101.613 276.199 101.003 276.166 100.553C276.132 100.102 276.081 99.6464 276.011 99.1869C275.946 98.7261 275.853 98.3309 275.732 98.0014C275.615 97.6707 275.474 97.3832 275.309 97.1387C274.97 96.6279 274.491 96.4544 273.872 96.6182C272.287 97.0381 271.54 99.2551 271.634 103.269Z" fill="#625D5D" fill-opacity="0.47"/>
|
31 |
+
<rect x="307.723" y="97.9922" width="17" height="168" transform="rotate(-1.3294 307.723 97.9922)" fill="#B76E3A"/>
|
32 |
+
<rect x="317.721" y="97.7603" width="7" height="168" transform="rotate(-1.3294 317.721 97.7603)" fill="#854B21"/>
|
33 |
+
<ellipse cx="320.447" cy="172.217" rx="2" ry="5.5" transform="rotate(-1.3294 320.447 172.217)" fill="#B76E3A"/>
|
34 |
+
<ellipse cx="315.032" cy="154.338" rx="1" ry="3.5" transform="rotate(-1.3294 315.032 154.338)" fill="#854B21"/>
|
35 |
+
<path d="M319.02 153.745L308.908 149.022L308.678 139.112L318.579 134.75L319.02 153.745Z" fill="#854B21"/>
|
36 |
+
<path d="M381.838 122.679L304.327 145.584L270.759 56.8387L353.092 47.0728C368.317 45.2668 381.791 56.9604 382.147 72.2886L383.271 120.715C383.292 121.618 382.705 122.423 381.838 122.679Z" fill="#C4C4C4"/>
|
37 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M310.785 143.675L304.328 145.583L271.804 59.5994C271.831 59.5946 271.857 59.5898 271.883 59.585C291.215 56.1032 309.091 70.6985 309.547 90.3359L310.785 143.675Z" fill="#7D7D7D"/>
|
38 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M377.29 57.7405L289.114 71.9169L271.884 56.7052L353.092 47.0727C362.895 45.9099 371.973 50.3436 377.29 57.7405Z" fill="#E0E0E0"/>
|
39 |
+
<path d="M243.494 88.8679C243.129 73.1064 254.297 59.4269 269.814 56.6323V56.6323C289.145 53.1505 307.021 67.7457 307.477 87.3831L308.778 143.418C308.799 144.336 308.193 145.15 307.308 145.393L301.583 146.966C301.107 147.097 300.61 147.139 300.119 147.089L246.472 141.644C245.468 141.542 244.697 140.709 244.674 139.7L243.494 88.8679Z" fill="#F1F1F1"/>
|
40 |
+
<path d="M237.496 89.0076C237.131 73.246 248.299 59.5665 263.815 56.7719V56.7719C283.147 53.2901 301.023 67.8854 301.479 87.5228L302.822 145.371C302.849 146.567 301.827 147.52 300.635 147.409L240.488 141.771C239.478 141.677 238.699 140.841 238.676 139.826L237.496 89.0076Z" fill="#C4C4C4"/>
|
41 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M263.389 60.2004C249.313 62.7203 239.175 75.1239 239.507 89.4194L240.628 137.74C240.647 138.545 241.141 139.236 241.847 139.535C241.728 139.286 241.658 139.009 241.651 138.717L240.53 90.396C240.198 76.1006 250.336 63.6969 264.412 61.1771C273.723 59.5102 282.657 62.4688 289.045 68.2789C282.609 61.8289 273.208 58.4425 263.389 60.2004Z" fill="#7D7D7D"/>
|
42 |
+
<ellipse rx="5.98969" ry="6.25283" transform="matrix(-0.997373 -0.0724384 0.0519504 0.99865 283.673 98.2373)" fill="#4D4D4D"/>
|
43 |
+
<path d="M256.189 113.342C256.459 118.518 262.695 123.152 270.118 123.691C277.542 124.23 283.342 120.471 283.072 115.295C282.803 110.119 276.932 112.515 269.509 111.976C262.086 111.437 255.92 108.166 256.189 113.342Z" fill="#4D4D4D"/>
|
44 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M281.992 119.199C277.279 117.029 269.092 115.516 261.309 120.839C263.723 122.394 266.799 123.449 270.111 123.69C275.484 124.08 280.006 122.219 281.992 119.199Z" fill="#F1F1F1"/>
|
45 |
+
<ellipse rx="5.98969" ry="6.25283" transform="matrix(-0.997373 -0.0724384 0.0519504 0.99865 253.806 96.0649)" fill="#4D4D4D"/>
|
46 |
+
<path d="M317.221 76.266C316.598 83.8825 316.209 104.464 316.092 113.802L318.987 109.234C319.65 101.883 321.125 84.9778 321.72 76.1616C322.316 67.3454 309.275 57.1119 302.68 53.0971L296.693 53.7362C303.796 58.0726 317.845 68.6495 317.221 76.266Z" fill="#C4C4C4"/>
|
47 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M298.901 53.5004L296.694 53.736C296.706 53.7433 296.718 53.7506 296.73 53.758L298.901 53.5004ZM313.721 67.9604C315.993 70.8305 317.431 73.7143 317.222 76.2658C316.598 83.8823 316.209 104.464 316.093 113.802L318.987 109.234C319.65 101.883 321.125 84.9776 321.721 76.1614C321.919 73.2328 320.612 70.1478 318.536 67.1863L313.721 67.9604Z" fill="#625D5D"/>
|
48 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M316.246 112.244L319.899 40.7008C319.927 40.1457 320.403 39.7202 320.958 39.7536L342.406 41.045C342.961 41.0784 343.382 41.5574 343.344 42.1116L342.354 56.5302C342.318 57.0458 341.896 57.4495 341.379 57.4615L323.162 57.8843L319.973 106.848C320.281 106.751 320.6 106.696 320.928 106.688C323.689 106.624 326.005 109.929 326.101 114.07C326.197 118.211 324.037 121.62 321.276 121.684C318.627 121.746 316.388 118.706 316.126 114.802L316.115 114.802L316.12 114.706C316.112 114.572 316.107 114.438 316.104 114.302C316.087 113.59 316.137 112.899 316.246 112.244Z" fill="#FFB800"/>
|
49 |
+
<ellipse cx="321.103" cy="114.186" rx="1" ry="2.5" transform="rotate(-1.3294 321.103 114.186)" fill="#625D5D"/>
|
50 |
+
<path d="M347.823 113.717L347.793 112.447L353.709 110.881L353.739 112.169L350.012 125.788L348.9 126.082L352.722 112.42L347.823 113.717Z" fill="#625D5D" fill-opacity="0.47"/>
|
51 |
+
<path d="M354.806 120.841C354.781 119.757 355.129 118.724 355.852 117.742C356.204 117.263 356.586 116.861 356.997 116.538C356.444 116.427 355.988 116.149 355.627 115.705C355.267 115.261 355.079 114.686 355.062 113.979C355.046 113.267 355.171 112.605 355.439 111.995C355.711 111.384 356.072 110.877 356.522 110.476C356.976 110.068 357.472 109.793 358.009 109.651C358.827 109.434 359.533 109.575 360.126 110.074C360.719 110.573 361.027 111.3 361.049 112.256C361.074 113.304 360.663 114.326 359.818 115.322C359.593 115.584 359.35 115.829 359.092 116.057L359.56 116.218C360.394 116.512 360.956 116.964 361.248 117.573C361.457 117.995 361.569 118.487 361.582 119.047C361.595 119.602 361.514 120.141 361.34 120.665C361.17 121.182 360.938 121.639 360.642 122.036C360.008 122.896 359.266 123.439 358.416 123.664C357.811 123.824 357.239 123.829 356.699 123.677C356.163 123.525 355.717 123.205 355.361 122.717C355.008 122.222 354.823 121.597 354.806 120.841ZM358.04 116.823C357.426 117.206 356.895 117.751 356.448 118.457C356.005 119.163 355.791 119.833 355.806 120.466C355.821 121.094 355.955 121.579 356.208 121.923C356.696 122.584 357.417 122.789 358.37 122.536C358.745 122.437 359.077 122.254 359.366 121.987C359.66 121.72 359.888 121.466 360.051 121.227C360.42 120.676 360.596 120.029 360.578 119.285C360.562 118.567 360.347 118.026 359.934 117.663C359.586 117.363 359.128 117.132 358.561 116.97L358.04 116.823ZM356.898 115.24C357.147 115.401 357.389 115.524 357.623 115.609C357.857 115.694 357.983 115.741 358.001 115.748C358.688 115.18 359.146 114.758 359.376 114.483C359.84 113.925 360.064 113.293 360.048 112.586C360.032 111.879 359.817 111.369 359.406 111.055C358.994 110.741 358.521 110.655 357.988 110.796C357.455 110.937 356.997 111.282 356.615 111.831C356.232 112.38 356.049 113.001 356.065 113.696C356.081 114.384 356.359 114.899 356.898 115.24Z" fill="#625D5D" fill-opacity="0.47"/>
|
52 |
+
<path d="M362.852 112.965C362.832 112.1 362.978 111.243 363.29 110.394C363.637 109.463 364.124 108.746 364.754 108.242C365.093 107.968 365.466 107.778 365.872 107.67C366.884 107.402 367.692 107.746 368.296 108.701C368.904 109.65 369.231 111.117 369.278 113.103C369.334 115.527 369.021 117.501 368.338 119.024C367.655 120.547 366.686 121.474 365.43 121.807C365.114 121.891 364.768 121.884 364.393 121.787C364.018 121.69 363.76 121.547 363.619 121.358L363.99 120.276C364.535 120.647 365.049 120.768 365.532 120.64C366.359 120.421 367.036 119.724 367.563 118.548C368.09 117.373 368.362 115.84 368.377 113.948C368.372 113.955 368.344 114.018 368.292 114.136C368.245 114.252 368.202 114.35 368.163 114.427C368.128 114.504 368.07 114.614 367.987 114.759C367.908 114.902 367.829 115.031 367.75 115.143C367.671 115.25 367.569 115.372 367.445 115.509C367.325 115.645 367.201 115.764 367.071 115.866C366.759 116.102 366.424 116.267 366.067 116.361C365.15 116.604 364.391 116.419 363.791 115.806C363.194 115.185 362.882 114.238 362.852 112.965ZM363.855 112.709C363.877 113.659 364.087 114.36 364.483 114.813C364.88 115.26 365.399 115.398 366.041 115.228C366.741 115.043 367.293 114.544 367.697 113.733C367.936 113.253 368.108 112.637 368.213 111.886C368.07 110.048 367.546 109.016 366.641 108.79C366.404 108.731 366.172 108.731 365.946 108.79C365.72 108.85 365.513 108.942 365.325 109.065C365.137 109.188 364.95 109.36 364.764 109.581C364.583 109.801 364.423 110.052 364.284 110.334C363.976 110.967 363.833 111.758 363.855 112.709Z" fill="#625D5D" fill-opacity="0.47"/>
|
53 |
+
<path d="M371.159 117.21C370.982 116.644 370.853 116.059 370.771 115.456C370.693 114.851 370.646 114.205 370.63 113.517C370.614 112.822 370.63 112.147 370.679 111.49C370.727 110.828 370.825 110.159 370.973 109.482C371.121 108.799 371.311 108.194 371.544 107.667C371.782 107.138 372.096 106.678 372.487 106.286C372.883 105.887 373.329 105.622 373.826 105.491C374.323 105.359 374.764 105.386 375.15 105.572C375.536 105.758 375.852 106.051 376.098 106.452C376.348 106.851 376.559 107.347 376.732 107.939C377.034 109.005 377.203 110.287 377.237 111.786C377.316 115.179 376.727 117.495 375.469 118.735C375.092 119.111 374.654 119.365 374.157 119.496C373.665 119.627 373.217 119.607 372.813 119.438C372.414 119.268 372.082 118.998 371.819 118.626C371.56 118.247 371.34 117.775 371.159 117.21ZM371.634 113.269C371.683 115.408 371.958 116.876 372.458 117.675C372.855 118.324 373.417 118.552 374.145 118.36C374.944 118.148 375.502 117.584 375.817 116.667C376.017 116.087 376.137 115.494 376.178 114.889C376.239 113.984 376.26 113.148 376.242 112.38C376.224 111.613 376.199 111.003 376.166 110.553C376.132 110.102 376.081 109.646 376.011 109.187C375.946 108.726 375.853 108.331 375.732 108.001C375.615 107.671 375.474 107.383 375.309 107.139C374.97 106.628 374.491 106.454 373.872 106.618C372.287 107.038 371.54 109.255 371.634 113.269Z" fill="#625D5D" fill-opacity="0.47"/>
|
54 |
+
<rect x="397.723" y="107.992" width="17" height="168" transform="rotate(-1.3294 397.723 107.992)" fill="#B76E3A"/>
|
55 |
+
<rect x="407.721" y="107.76" width="7" height="168" transform="rotate(-1.3294 407.721 107.76)" fill="#854B21"/>
|
56 |
+
<ellipse cx="410.447" cy="182.217" rx="2" ry="5.5" transform="rotate(-1.3294 410.447 182.217)" fill="#B76E3A"/>
|
57 |
+
<ellipse cx="405.032" cy="164.338" rx="1" ry="3.5" transform="rotate(-1.3294 405.032 164.338)" fill="#854B21"/>
|
58 |
+
<path d="M409.02 163.745L398.908 159.022L398.678 149.112L408.579 144.75L409.02 163.745Z" fill="#854B21"/>
|
59 |
+
<path d="M471.838 132.679L394.327 155.584L360.759 66.8387L443.092 57.0728C458.317 55.2668 471.791 66.9604 472.147 82.2886L473.271 130.715C473.292 131.618 472.705 132.423 471.838 132.679Z" fill="#C4C4C4"/>
|
60 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M400.785 153.675L394.328 155.583L361.804 69.5994C361.831 69.5946 361.857 69.5898 361.883 69.585C381.215 66.1032 399.091 80.6985 399.547 100.336L400.785 153.675Z" fill="#7D7D7D"/>
|
61 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M467.29 67.7405L379.114 81.9169L361.884 66.7052L443.092 57.0727C452.895 55.9099 461.973 60.3436 467.29 67.7405Z" fill="#E0E0E0"/>
|
62 |
+
<path d="M333.494 98.8679C333.129 83.1064 344.297 69.4269 359.814 66.6323V66.6323C379.145 63.1505 397.021 77.7457 397.477 97.3831L398.778 153.418C398.799 154.336 398.193 155.15 397.308 155.393L391.583 156.966C391.107 157.097 390.61 157.139 390.119 157.089L336.472 151.644C335.468 151.542 334.697 150.709 334.674 149.7L333.494 98.8679Z" fill="#F1F1F1"/>
|
63 |
+
<path d="M327.496 99.0076C327.131 83.246 338.299 69.5665 353.815 66.7719V66.7719C373.147 63.2901 391.023 77.8854 391.479 97.5228L392.822 155.371C392.849 156.567 391.827 157.52 390.635 157.409L330.488 151.771C329.478 151.677 328.699 150.841 328.676 149.826L327.496 99.0076Z" fill="#C4C4C4"/>
|
64 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M353.389 70.2004C339.313 72.7203 329.175 85.1239 329.507 99.4194L330.628 147.74C330.647 148.545 331.141 149.236 331.847 149.535C331.728 149.286 331.658 149.009 331.651 148.717L330.53 100.396C330.198 86.1006 340.336 73.6969 354.412 71.1771C363.723 69.5102 372.657 72.4688 379.045 78.2789C372.609 71.8289 363.208 68.4425 353.389 70.2004Z" fill="#7D7D7D"/>
|
65 |
+
<ellipse rx="5.98969" ry="6.25283" transform="matrix(-0.997373 -0.0724384 0.0519504 0.99865 373.673 108.237)" fill="#4D4D4D"/>
|
66 |
+
<path d="M346.189 123.342C346.459 128.518 352.695 133.152 360.118 133.691C367.542 134.23 373.342 130.471 373.072 125.295C372.803 120.119 366.932 122.515 359.509 121.976C352.086 121.437 345.92 118.166 346.189 123.342Z" fill="#4D4D4D"/>
|
67 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M371.992 129.199C367.279 127.029 359.092 125.516 351.309 130.839C353.723 132.394 356.799 133.449 360.111 133.69C365.484 134.08 370.006 132.219 371.992 129.199Z" fill="#F1F1F1"/>
|
68 |
+
<ellipse rx="5.98969" ry="6.25283" transform="matrix(-0.997373 -0.0724384 0.0519504 0.99865 343.806 106.065)" fill="#4D4D4D"/>
|
69 |
+
<path d="M407.221 86.266C406.598 93.8825 406.209 114.464 406.092 123.802L408.987 119.234C409.65 111.883 411.125 94.9778 411.72 86.1616C412.316 77.3454 399.275 67.1119 392.68 63.0971L386.693 63.7362C393.796 68.0726 407.845 78.6495 407.221 86.266Z" fill="#C4C4C4"/>
|
70 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M388.901 63.5004L386.694 63.736C386.706 63.7433 386.718 63.7506 386.73 63.758L388.901 63.5004ZM403.721 77.9604C405.993 80.8305 407.431 83.7143 407.222 86.2658C406.598 93.8823 406.209 114.464 406.093 123.802L408.987 119.234C409.65 111.883 411.125 94.9776 411.721 86.1614C411.919 83.2328 410.612 80.1478 408.536 77.1863L403.721 77.9604Z" fill="#625D5D"/>
|
71 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M406.246 122.244L409.899 50.7008C409.927 50.1457 410.403 49.7202 410.958 49.7536L432.406 51.045C432.961 51.0784 433.382 51.5574 433.344 52.1116L432.354 66.5302C432.318 67.0458 431.896 67.4495 431.379 67.4615L413.162 67.8843L409.973 116.848C410.281 116.751 410.6 116.696 410.928 116.688C413.689 116.624 416.005 119.929 416.101 124.07C416.197 128.211 414.037 131.62 411.276 131.684C408.627 131.746 406.388 128.706 406.126 124.802L406.115 124.802L406.12 124.706C406.112 124.572 406.107 124.438 406.104 124.302C406.087 123.59 406.137 122.899 406.246 122.244Z" fill="#00CABD"/>
|
72 |
+
<ellipse cx="411.103" cy="124.186" rx="1" ry="2.5" transform="rotate(-1.3294 411.103 124.186)" fill="#625D5D"/>
|
73 |
+
<path d="M437.823 123.717L437.793 122.447L443.709 120.881L443.739 122.169L440.012 135.788L438.9 136.082L442.722 122.42L437.823 123.717Z" fill="#625D5D" fill-opacity="0.47"/>
|
74 |
+
<path d="M444.806 130.841C444.781 129.757 445.129 128.724 445.852 127.742C446.204 127.263 446.586 126.861 446.997 126.538C446.444 126.427 445.988 126.149 445.627 125.705C445.267 125.261 445.079 124.686 445.062 123.979C445.046 123.267 445.171 122.605 445.439 121.995C445.711 121.384 446.072 120.877 446.522 120.476C446.976 120.068 447.472 119.793 448.009 119.651C448.827 119.434 449.533 119.575 450.126 120.074C450.719 120.573 451.027 121.3 451.049 122.256C451.074 123.304 450.663 124.326 449.818 125.322C449.593 125.584 449.35 125.829 449.092 126.057L449.56 126.218C450.394 126.512 450.956 126.964 451.248 127.573C451.457 127.995 451.569 128.487 451.582 129.047C451.595 129.602 451.514 130.141 451.34 130.665C451.17 131.182 450.938 131.639 450.642 132.036C450.008 132.896 449.266 133.439 448.416 133.664C447.811 133.824 447.239 133.829 446.699 133.677C446.163 133.525 445.717 133.205 445.361 132.717C445.008 132.222 444.823 131.597 444.806 130.841ZM448.04 126.823C447.426 127.206 446.895 127.751 446.448 128.457C446.005 129.163 445.791 129.833 445.806 130.466C445.821 131.094 445.955 131.579 446.208 131.923C446.696 132.584 447.417 132.789 448.37 132.536C448.745 132.437 449.077 132.254 449.366 131.987C449.66 131.72 449.888 131.466 450.051 131.227C450.42 130.676 450.596 130.029 450.578 129.285C450.562 128.567 450.347 128.026 449.934 127.663C449.586 127.363 449.128 127.132 448.561 126.97L448.04 126.823ZM446.898 125.24C447.147 125.401 447.389 125.524 447.623 125.609C447.857 125.694 447.983 125.741 448.001 125.748C448.688 125.18 449.146 124.758 449.376 124.483C449.84 123.925 450.064 123.293 450.048 122.586C450.032 121.879 449.817 121.369 449.406 121.055C448.994 120.741 448.521 120.655 447.988 120.796C447.455 120.937 446.997 121.282 446.615 121.831C446.232 122.38 446.049 123.001 446.065 123.696C446.081 124.384 446.359 124.899 446.898 125.24Z" fill="#625D5D" fill-opacity="0.47"/>
|
75 |
+
<path d="M452.852 122.965C452.832 122.1 452.978 121.243 453.29 120.394C453.637 119.463 454.124 118.746 454.754 118.242C455.093 117.968 455.466 117.778 455.872 117.67C456.884 117.402 457.692 117.746 458.296 118.701C458.904 119.65 459.231 121.117 459.278 123.103C459.334 125.527 459.021 127.501 458.338 129.024C457.655 130.547 456.686 131.474 455.43 131.807C455.114 131.891 454.768 131.884 454.393 131.787C454.018 131.69 453.76 131.547 453.619 131.358L453.99 130.276C454.535 130.647 455.049 130.768 455.532 130.64C456.359 130.421 457.036 129.724 457.563 128.548C458.09 127.373 458.362 125.84 458.377 123.948C458.372 123.955 458.344 124.018 458.292 124.136C458.245 124.252 458.202 124.35 458.163 124.427C458.128 124.504 458.07 124.614 457.987 124.759C457.908 124.902 457.829 125.031 457.75 125.143C457.671 125.25 457.569 125.372 457.445 125.509C457.325 125.645 457.201 125.764 457.071 125.866C456.759 126.102 456.424 126.267 456.067 126.361C455.15 126.604 454.391 126.419 453.791 125.806C453.194 125.185 452.882 124.238 452.852 122.965ZM453.855 122.709C453.877 123.659 454.087 124.36 454.483 124.813C454.88 125.26 455.399 125.398 456.041 125.228C456.741 125.043 457.293 124.544 457.697 123.733C457.936 123.253 458.108 122.637 458.213 121.886C458.07 120.048 457.546 119.016 456.641 118.79C456.404 118.731 456.172 118.731 455.946 118.79C455.72 118.85 455.513 118.942 455.325 119.065C455.137 119.188 454.95 119.36 454.764 119.581C454.583 119.801 454.423 120.052 454.284 120.334C453.976 120.967 453.833 121.758 453.855 122.709Z" fill="#625D5D" fill-opacity="0.47"/>
|
76 |
+
<path d="M461.159 127.21C460.982 126.644 460.853 126.059 460.771 125.456C460.693 124.851 460.646 124.205 460.63 123.517C460.614 122.822 460.63 122.147 460.679 121.49C460.727 120.828 460.825 120.159 460.973 119.482C461.121 118.799 461.311 118.194 461.544 117.667C461.782 117.138 462.096 116.678 462.487 116.286C462.883 115.887 463.329 115.622 463.826 115.491C464.323 115.359 464.764 115.386 465.15 115.572C465.536 115.758 465.852 116.051 466.098 116.452C466.348 116.851 466.559 117.347 466.732 117.939C467.034 119.005 467.203 120.287 467.237 121.786C467.316 125.179 466.727 127.495 465.469 128.735C465.092 129.111 464.654 129.365 464.157 129.496C463.665 129.627 463.217 129.607 462.813 129.438C462.414 129.268 462.082 128.998 461.819 128.626C461.56 128.247 461.34 127.775 461.159 127.21ZM461.634 123.269C461.683 125.408 461.958 126.876 462.458 127.675C462.855 128.324 463.417 128.552 464.145 128.36C464.944 128.148 465.502 127.584 465.817 126.667C466.017 126.087 466.137 125.494 466.178 124.889C466.239 123.984 466.26 123.148 466.242 122.38C466.224 121.613 466.199 121.003 466.166 120.553C466.132 120.102 466.081 119.646 466.011 119.187C465.946 118.726 465.853 118.331 465.732 118.001C465.615 117.671 465.474 117.383 465.309 117.139C464.97 116.628 464.491 116.454 463.872 116.618C462.287 117.038 461.54 119.255 461.634 123.269Z" fill="#625D5D" fill-opacity="0.47"/>
|
77 |
+
<rect x="490.723" y="117.992" width="17" height="168" transform="rotate(-1.3294 490.723 117.992)" fill="#B76E3A"/>
|
78 |
+
<rect x="500.721" y="117.76" width="7" height="168" transform="rotate(-1.3294 500.721 117.76)" fill="#854B21"/>
|
79 |
+
<ellipse cx="498.032" cy="174.338" rx="1" ry="3.5" transform="rotate(-1.3294 498.032 174.338)" fill="#854B21"/>
|
80 |
+
<path d="M502.02 173.745L491.908 169.022L491.678 159.112L501.579 154.75L502.02 173.745Z" fill="#854B21"/>
|
81 |
+
<path d="M564.838 142.679L487.327 165.584L453.759 76.8387L536.092 67.0728C551.317 65.2668 564.791 76.9604 565.147 92.2886L566.271 140.715C566.292 141.618 565.705 142.423 564.838 142.679Z" fill="#C4C4C4"/>
|
82 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M493.785 163.675L487.328 165.583L454.804 79.5994C454.831 79.5946 454.857 79.5898 454.883 79.585C474.215 76.1032 492.091 90.6985 492.547 110.336L493.785 163.675Z" fill="#7D7D7D"/>
|
83 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M560.29 77.7405L472.114 91.9169L454.884 76.7052L536.092 67.0727C545.895 65.9099 554.973 70.3436 560.29 77.7405Z" fill="#E0E0E0"/>
|
84 |
+
<path d="M426.494 108.868C426.129 93.1064 437.297 79.4269 452.814 76.6323V76.6323C472.145 73.1505 490.021 87.7457 490.477 107.383L491.778 163.418C491.799 164.336 491.193 165.15 490.308 165.393L484.583 166.966C484.107 167.097 483.61 167.139 483.119 167.089L429.472 161.644C428.468 161.542 427.697 160.709 427.674 159.7L426.494 108.868Z" fill="#F1F1F1"/>
|
85 |
+
<path d="M420.496 109.008C420.131 93.246 431.299 79.5665 446.815 76.7719V76.7719C466.147 73.2901 484.023 87.8854 484.479 107.523L485.822 165.371C485.849 166.567 484.827 167.52 483.635 167.409L423.488 161.771C422.478 161.677 421.699 160.841 421.676 159.826L420.496 109.008Z" fill="#C4C4C4"/>
|
86 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M446.389 80.2004C432.313 82.7203 422.175 95.1239 422.507 109.419L423.628 157.74C423.647 158.545 424.141 159.236 424.847 159.535C424.728 159.286 424.658 159.009 424.651 158.717L423.53 110.396C423.198 96.1006 433.336 83.6969 447.412 81.1771C456.723 79.5102 465.657 82.4688 472.045 88.2789C465.609 81.8289 456.208 78.4425 446.389 80.2004Z" fill="#7D7D7D"/>
|
87 |
+
<ellipse rx="5.98969" ry="6.25283" transform="matrix(-0.997373 -0.0724384 0.0519504 0.99865 466.673 118.237)" fill="#4D4D4D"/>
|
88 |
+
<path d="M439.189 133.342C439.459 138.518 445.695 143.152 453.118 143.691C460.542 144.23 466.342 140.471 466.072 135.295C465.803 130.119 459.932 132.515 452.509 131.976C445.086 131.437 438.92 128.166 439.189 133.342Z" fill="#4D4D4D"/>
|
89 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M464.992 139.199C460.279 137.029 452.092 135.516 444.309 140.839C446.723 142.394 449.799 143.449 453.111 143.69C458.484 144.08 463.006 142.219 464.992 139.199Z" fill="#F1F1F1"/>
|
90 |
+
<ellipse rx="5.98969" ry="6.25283" transform="matrix(-0.997373 -0.0724384 0.0519504 0.99865 436.806 116.065)" fill="#4D4D4D"/>
|
91 |
+
<path d="M500.221 96.266C499.598 103.883 499.209 124.464 499.092 133.802L501.987 129.234C502.65 121.883 504.125 104.978 504.72 96.1616C505.316 87.3454 492.275 77.1119 485.68 73.0971L479.693 73.7362C486.796 78.0726 500.845 88.6495 500.221 96.266Z" fill="#C4C4C4"/>
|
92 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M481.901 73.5004L479.694 73.736C479.706 73.7433 479.718 73.7506 479.73 73.758L481.901 73.5004ZM496.721 87.9604C498.993 90.8305 500.431 93.7143 500.222 96.2658C499.598 103.882 499.209 124.464 499.093 133.802L501.987 129.234C502.65 121.883 504.125 104.978 504.721 96.1614C504.919 93.2328 503.612 90.1478 501.536 87.1863L496.721 87.9604Z" fill="#625D5D"/>
|
93 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M499.246 132.244L502.899 60.7008C502.927 60.1457 503.403 59.7202 503.958 59.7536L525.406 61.045C525.961 61.0784 526.382 61.5574 526.344 62.1116L525.354 76.5302C525.318 77.0458 524.896 77.4495 524.379 77.4615L506.162 77.8843L502.973 126.848C503.281 126.751 503.6 126.696 503.928 126.688C506.689 126.624 509.005 129.929 509.101 134.07C509.197 138.211 507.037 141.62 504.276 141.684C501.627 141.746 499.388 138.706 499.126 134.802L499.115 134.802L499.12 134.706C499.112 134.572 499.107 134.438 499.104 134.302C499.087 133.59 499.137 132.899 499.246 132.244Z" fill="#D42424"/>
|
94 |
+
<ellipse cx="504.103" cy="134.186" rx="1" ry="2.5" transform="rotate(-1.3294 504.103 134.186)" fill="#625D5D"/>
|
95 |
+
<path d="M530.823 133.717L530.793 132.447L536.709 130.881L536.739 132.169L533.012 145.788L531.9 146.082L535.722 132.42L530.823 133.717Z" fill="#625D5D" fill-opacity="0.47"/>
|
96 |
+
<path d="M537.806 140.841C537.781 139.757 538.129 138.724 538.852 137.742C539.204 137.263 539.586 136.861 539.997 136.538C539.444 136.427 538.988 136.149 538.627 135.705C538.267 135.261 538.079 134.686 538.062 133.979C538.046 133.267 538.171 132.605 538.439 131.995C538.711 131.384 539.072 130.877 539.522 130.476C539.976 130.068 540.472 129.793 541.009 129.651C541.827 129.434 542.533 129.575 543.126 130.074C543.719 130.573 544.027 131.3 544.049 132.256C544.074 133.304 543.663 134.326 542.818 135.322C542.593 135.584 542.35 135.829 542.092 136.057L542.56 136.218C543.394 136.512 543.956 136.964 544.248 137.573C544.457 137.995 544.569 138.487 544.582 139.047C544.595 139.602 544.514 140.141 544.34 140.665C544.17 141.182 543.938 141.639 543.642 142.036C543.008 142.896 542.266 143.439 541.416 143.664C540.811 143.824 540.239 143.829 539.699 143.677C539.163 143.525 538.717 143.205 538.361 142.717C538.008 142.222 537.823 141.597 537.806 140.841ZM541.04 136.823C540.426 137.206 539.895 137.751 539.448 138.457C539.005 139.163 538.791 139.833 538.806 140.466C538.821 141.094 538.955 141.579 539.208 141.923C539.696 142.584 540.417 142.789 541.37 142.536C541.745 142.437 542.077 142.254 542.366 141.987C542.66 141.72 542.888 141.466 543.051 141.227C543.42 140.676 543.596 140.029 543.578 139.285C543.562 138.567 543.347 138.026 542.934 137.663C542.586 137.363 542.128 137.132 541.561 136.97L541.04 136.823ZM539.898 135.24C540.147 135.401 540.389 135.524 540.623 135.609C540.857 135.694 540.983 135.741 541.001 135.748C541.688 135.18 542.146 134.758 542.376 134.483C542.84 133.925 543.064 133.293 543.048 132.586C543.032 131.879 542.817 131.369 542.406 131.055C541.994 130.741 541.521 130.655 540.988 130.796C540.455 130.937 539.997 131.282 539.615 131.831C539.232 132.38 539.049 133.001 539.065 133.696C539.081 134.384 539.359 134.899 539.898 135.24Z" fill="#625D5D" fill-opacity="0.47"/>
|
97 |
+
<path d="M545.852 132.965C545.832 132.1 545.978 131.243 546.29 130.394C546.637 129.463 547.124 128.746 547.754 128.242C548.093 127.968 548.466 127.778 548.872 127.67C549.884 127.402 550.692 127.746 551.296 128.701C551.904 129.65 552.231 131.117 552.278 133.103C552.334 135.527 552.021 137.501 551.338 139.024C550.655 140.547 549.686 141.474 548.43 141.807C548.114 141.891 547.768 141.884 547.393 141.787C547.018 141.69 546.76 141.547 546.619 141.358L546.99 140.276C547.535 140.647 548.049 140.768 548.532 140.64C549.359 140.421 550.036 139.724 550.563 138.548C551.09 137.373 551.362 135.84 551.377 133.948C551.372 133.955 551.344 134.018 551.292 134.136C551.245 134.252 551.202 134.35 551.163 134.427C551.128 134.504 551.07 134.614 550.987 134.759C550.908 134.902 550.829 135.031 550.75 135.143C550.671 135.25 550.569 135.372 550.445 135.509C550.325 135.645 550.201 135.764 550.071 135.866C549.759 136.102 549.424 136.267 549.067 136.361C548.15 136.604 547.391 136.419 546.791 135.806C546.194 135.185 545.882 134.238 545.852 132.965ZM546.855 132.709C546.877 133.659 547.087 134.36 547.483 134.813C547.88 135.26 548.399 135.398 549.041 135.228C549.741 135.043 550.293 134.544 550.697 133.733C550.936 133.253 551.108 132.637 551.213 131.886C551.07 130.048 550.546 129.016 549.641 128.79C549.404 128.731 549.172 128.731 548.946 128.79C548.72 128.85 548.513 128.942 548.325 129.065C548.137 129.188 547.95 129.36 547.764 129.581C547.583 129.801 547.423 130.052 547.284 130.334C546.976 130.967 546.833 131.758 546.855 132.709Z" fill="#625D5D" fill-opacity="0.47"/>
|
98 |
+
<path d="M554.159 137.21C553.982 136.644 553.853 136.059 553.771 135.456C553.693 134.851 553.646 134.205 553.63 133.517C553.614 132.822 553.63 132.147 553.679 131.49C553.727 130.828 553.825 130.159 553.973 129.482C554.121 128.799 554.311 128.194 554.544 127.667C554.782 127.138 555.096 126.678 555.487 126.286C555.883 125.887 556.329 125.622 556.826 125.491C557.323 125.359 557.764 125.386 558.15 125.572C558.536 125.758 558.852 126.051 559.098 126.452C559.348 126.851 559.559 127.347 559.732 127.939C560.034 129.005 560.203 130.287 560.237 131.786C560.316 135.179 559.727 137.495 558.469 138.735C558.092 139.111 557.654 139.365 557.157 139.496C556.665 139.627 556.217 139.607 555.813 139.438C555.414 139.268 555.082 138.998 554.819 138.626C554.56 138.247 554.34 137.775 554.159 137.21ZM554.634 133.269C554.683 135.408 554.958 136.876 555.458 137.675C555.855 138.324 556.417 138.552 557.145 138.36C557.944 138.148 558.502 137.584 558.817 136.667C559.017 136.087 559.137 135.494 559.178 134.889C559.239 133.984 559.26 133.148 559.242 132.38C559.224 131.613 559.199 131.003 559.166 130.553C559.132 130.102 559.081 129.646 559.011 129.187C558.946 128.726 558.853 128.331 558.732 128.001C558.615 127.671 558.474 127.383 558.309 127.139C557.97 126.628 557.491 126.454 556.872 126.618C555.287 127.038 554.54 129.255 554.634 133.269Z" fill="#625D5D" fill-opacity="0.47"/>
|
99 |
+
</g>
|
100 |
+
<defs>
|
101 |
+
<clipPath id="clip0">
|
102 |
+
<rect width="702" height="179" fill="white"/>
|
103 |
+
</clipPath>
|
104 |
+
</defs>
|
105 |
+
</svg>
|
assets/images/screenshot-creative-mail-form.png
ADDED
Binary file
|
assets/js/block/submit.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t){function n(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t){function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,l=[],a=!0,i=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(l.push(r.value),!t||l.length!==t);a=!0);}catch(e){i=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(i)throw o}}return l}(e,t)||r(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t,n){if(n){var r=e.getElementsByClassName(t)[0];r&&(r.textContent=n)}}function a(e,t){for(var r=0,o=Object.entries(t);r<o.length;r++){var a=n(o[r],2);l(e,a[0],a[1])}}!function(){var e,t=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=r(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,l=function(){};return{s:l,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){u=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw a}}}}(document.getElementsByClassName("cm-contact-form"));try{for(t.s();!(e=t.n()).done;){e.value.onsubmit=function(e){var t,n,r,o,l,i,u,s;e.preventDefault();var f=e.target,c=null===(t=f.getElementsByClassName("firstName")[0])||void 0===t?void 0:t.value,m=null===(n=f.getElementsByClassName("lastName")[0])||void 0===n?void 0:n.value,d=null===(r=f.getElementsByClassName("email")[0])||void 0===r?void 0:r.value,y=null===(o=f.getElementsByClassName("telephone")[0])||void 0===o?void 0:o.value,v=null===(l=f.getElementsByClassName("consent_check")[0])||void 0===l?void 0:l.checked,p=(null===(i=f.getElementsByClassName("list_id")[0])||void 0===i?void 0:i.value)||null;jQuery.post(null===(u=ce4wp_form_submit_data)||void 0===u?void 0:u.url,{action:"ce4wp_form_submission",nonce:null===(s=ce4wp_form_submit_data)||void 0===s?void 0:s.nonce,first_name:c,last_name:m,email:d,telephone:y,consent:v,list_id:p}).done((function(){var e,t=f.parentElement,n=null===(e=t.getElementsByClassName("onSubmissionSetting")[0])||void 0===e?void 0:e.value;if("redirect"===n){var r,o=new RegExp("^(https?)://"),l=null===(r=t.getElementsByClassName("redirect")[0])||void 0===r?void 0:r.value;o.test(l)||(l="https://"+l),window.location.href=l}else{f.style.visibility="hidden","summary"===n&&a(t,{firstNameSummary:c?c+" ":null,lastNameSummary:m,telephoneSummary:y,emailSummary:d}),t.getElementsByClassName("onSubmission")[0].style.display="block"}}))}}}catch(e){t.e(e)}finally{t.f()}}()}]);
|
assets/js/block/subscribe.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '3dfa592b262000d14067391ccf4595bd');
|
assets/js/block/subscribe.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
.wp-block-ce4wp-subscribe{max-width:840px;margin:0 auto}.wp-block-ce4wp-subscribe .title{margin-bottom:0}.wp-block-ce4wp-subscribe .subTitle{margin-top:0;font-size:0.8em}.wp-block-ce4wp-subscribe .disclaimer{margin-top:5px;font-size:0.8em}.wp-block-ce4wp-subscribe .disclaimer .disclaimer-label{margin-left:10px}.wp-block-ce4wp-subscribe .inputBlock{width:100%;margin-bottom:10px}.wp-block-ce4wp-subscribe .inputBlock input{width:100%}.wp-block-ce4wp-subscribe .inputBlock label{display:inline-block}.wp-block-ce4wp-subscribe .submit-button{margin-top:
|
2 |
|
3 |
.no-flex{display:block}.sub-header{margin-bottom:1em}
|
4 |
|
1 |
+
.wp-block-ce4wp-subscribe{max-width:840px;margin:0 auto}.wp-block-ce4wp-subscribe .title{margin-bottom:0}.wp-block-ce4wp-subscribe .subTitle{margin-top:0;font-size:0.8em}.wp-block-ce4wp-subscribe .disclaimer{margin-top:5px;font-size:0.8em}.wp-block-ce4wp-subscribe .disclaimer .disclaimer-label{margin-left:10px}.wp-block-ce4wp-subscribe .inputBlock{width:100%;margin-bottom:10px}.wp-block-ce4wp-subscribe .inputBlock input{width:100%}.wp-block-ce4wp-subscribe .inputBlock label{display:inline-block}.wp-block-ce4wp-subscribe .submit-button{margin-top:25px;display:block}.wp-block-ce4wp-subscribe .required-text{display:inline-block;margin:0;padding:0;margin-left:0.3em}.wp-block-ce4wp-subscribe .onSubmission{height:0;max-width:840px;margin:0 auto}.wp-block-ce4wp-subscribe .firstNameSummary .lastNameSummary{text-transform:capitalize}.wp-block-ce4wp-subscribe .ce4wp-inline-notification{display:flex;flex-direction:row;align-items:center;padding:13px 10px;width:100%;height:40px;border-style:solid;border-color:orange;border-width:1px;border-left-width:4px;border-radius:3px;background:rgba(255,133,15,0.1);flex:none;order:0;flex-grow:1;margin:0px 0px}.wp-block-ce4wp-subscribe .ce4wp-inline-warning-text{font-style:normal;font-weight:normal;font-size:16px;line-height:20px;display:flex;align-items:center;color:#571600;margin-left:9px}.wp-block-ce4wp-subscribe .ce4wp-inline-warning-icon{color:orange}.wp-block-ce4wp-subscribe .ce4wp-inline-warning-arrow{color:#571600;margin-left:auto}.wp-block-ce4wp-subscribe .ce4wp-banner-clickable{cursor:pointer}.ce4wp-link{cursor:pointer}
|
2 |
|
3 |
.no-flex{display:block}.sub-header{margin-bottom:1em}
|
4 |
|
assets/js/block/subscribe.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function a(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,a),l.l=!0,l.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)a.d(n,l,function(t){return e[t]}.bind(null,l));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=16)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.wp.blockEditor},function(e,t){e.exports=window.wp.i18n},function(e,t,a){var n=a(13),l=a(14),c=a(6),r=a(15);e.exports=function(e,t){return n(e)||l(e,t)||c(e,t)||r()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,a){var n=a(5);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?n(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.blocks},function(e,t){e.exports=function(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,a){var n=a(10),l=a(11),c=a(6),r=a(12);e.exports=function(e){return n(e)||l(e)||c(e)||r()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,a){var n=a(5);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var a=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=a){var n,l,c=[],r=!0,o=!1;try{for(a=a.call(e);!(r=(n=a.next()).done)&&(c.push(n.value),!t||c.length!==t);r=!0);}catch(e){o=!0,l=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw l}}return c}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,a){"use strict";a.r(t);var n=a(7),l=a(8),c=a.n(l),r=a(9),o=a.n(r),s=a(4),i=a.n(s),u=a(0),m=a(3),b=a(2),p=a(1);function d(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function f(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?d(Object(a),!0).forEach((function(t){c()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):d(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var O="notshow",j="optional",y="required";Object(n.registerBlockType)("ce4wp/subscribe",{edit:function(e){var t=this,a=e.attributes,n=e.setAttributes,l=e.className,c=e.clientId;a.blockId||n({blockId:c});var r=function(){var e=React.useState([]),t=i()(e,2),a=t[0],n=t[1],l=React.useState(!1),c=i()(l,2),r=c[0],o=c[1],s=React.useState(!1),u=i()(s,2),m=u[0],b=u[1];return React.useEffect((function(){var e,t;r||m||(o(!0),jQuery.post(null===(e=ce4wp_form_submit_data)||void 0===e?void 0:e.url,{action:"ce4wp_get_all_custom_lists",nonce:null===(t=ce4wp_form_submit_data)||void 0===t?void 0:t.listNonce}).done((function(e){o(!1),b(!0),null!=(null==e?void 0:e.data)&&null!=e.data.length&&n(e.data.map((function(e){return{label:e.name,value:e.id}})))})))}),[r,m,a]),{customLists:a,loading:r,hasLoaded:m}}().customLists;return Object(u.createElement)("div",{className:"wp-block-ce4wp-subscribe ".concat(l||"")},Object(u.createElement)(b.BlockControls,{key:"setting"},Object(u.createElement)(b.InspectorControls,{key:"setting"},Object(u.createElement)(p.Panel,{header:"Settings"},Object(u.createElement)(p.PanelBody,{title:"Contact Segmentation",initialOpen:!0},Object(u.createElement)(p.PanelRow,{className:"no-flex"},Object(u.createElement)("fieldset",null,Object(u.createElement)("i",{className:"subTitle sub-header"},Object(m.__)("Automatically assign a new contact to a list when they subscribe","ce4wp"),Object(u.createElement)("br",null),Object(u.createElement)(p.ExternalLink,{onClick:function(){return ce4wpNavigateToDashboard(t,"fbcd9606-288a-4d82-be7c-449eaf5a3792",{source:"ce4wp_form_menu"},ce4wpDashboardStartCallback,ce4wpDashboardFinishCallback)}},Object(u.createElement)("span",{id:"ce4wp-manage-lists","data-link_reference":"836b20fc-9ff1-41b2-912b-a8646caf05a4"},Object(m.__)("Manage your lists","ce4wp")))),Object(u.createElement)("br",null),Object(u.createElement)("br",null),Object(u.createElement)(p.SelectControl,{label:"list",value:a.customList,options:[{label:Object(m.__)("Don't assign to a list","cewp4"),value:""}].concat(o()(r)),onChange:function(e){return n({customList:e})}})))),Object(u.createElement)(p.PanelBody,{title:"On submission",initialOpen:!0},Object(u.createElement)(p.PanelRow,null,Object(u.createElement)("fieldset",null,Object(u.createElement)(p.TextareaControl,{label:"Message text",value:a.onSubmission,onChange:function(e){return n({onSubmission:e})}})))),Object(u.createElement)(p.PanelBody,{title:"Disclaimer settings",initialOpen:!0},Object(u.createElement)(p.PanelRow,{className:"no-flex"},Object(u.createElement)("fieldset",null,Object(u.createElement)(p.SelectControl,{label:"Permission to mail",value:a.emailPermission,options:[{label:"message",value:"message"},{label:"checkbox",value:"checkbox"}],onChange:function(e){return n(f(f({},a),{},{emailPermission:e}))}})))),Object(u.createElement)(p.PanelBody,{title:"Field settings",initialOpen:!0},Object(u.createElement)(p.PanelRow,{className:"no-flex"},Object(u.createElement)("fieldset",null,Object(u.createElement)(p.SelectControl,{label:"First name field",value:a.displayFirstName,options:[{label:"Do not show",value:O},{label:"Optional",value:j},{label:"Required",value:y}],onChange:function(e){return n({displayFirstName:e})}}))),Object(u.createElement)(p.PanelRow,{className:"no-flex"},Object(u.createElement)("fieldset",null,Object(u.createElement)(p.SelectControl,{label:"Last name field",value:a.displayLastName,options:[{label:"Do not show",value:O},{label:"Optional",value:j},{label:"Required",value:y}],onChange:function(e){return n({displayLastName:e})}}))),Object(u.createElement)(p.PanelRow,{className:"no-flex"},Object(u.createElement)("fieldset",null,Object(u.createElement)(p.SelectControl,{label:"Telephone field",value:a.displayTelephone,options:[{label:"Do not show",value:O},{label:"Optional",value:j},{label:"Required",value:y}],onChange:function(e){return n({displayTelephone:e})}}))))))),Object(u.createElement)("form",{name:"contact-form"},Object(u.createElement)(b.RichText,{tagName:"h2",onChange:function(e){n({title:e})},value:a.title}),Object(u.createElement)(b.RichText,{tagName:"p",className:"subTitle",onChange:function(e){n({subTitle:e})},value:a.subTitle}),a.displayFirstName!==O&&Object(u.createElement)("div",{className:"inputBlock"},Object(u.createElement)(b.RichText,{tagName:"label",className:"firstNameLabel",onChange:function(e){n({firstNameLabel:e})},value:a.firstNameLabel}),a.displayFirstName===y&&Object(u.createElement)("p",{className:"required-text subTitle",style:{color:"#ee0000"}},"*"),Object(u.createElement)("input",{name:"first_name",type:"text"})),a.displayLastName!==O&&Object(u.createElement)("div",{className:"inputBlock"},Object(u.createElement)(b.RichText,{tagName:"label",className:"lastNameLabel",onChange:function(e){n({lastNameLabel:e})},value:a.lastNameLabel}),a.displayLastName===y&&Object(u.createElement)("p",{className:"required-text subTitle",style:{color:"#ee0000"}},"*"),Object(u.createElement)("input",{name:"last_name",type:"text"})),a.displayTelephone!==O&&Object(u.createElement)("div",{class:"inputBlock"},Object(u.createElement)(b.RichText,{tagName:"label",className:"lastNameLabel",onChange:function(e){n({telephoneLabel:e})},value:a.telephoneLabel}),a.displayTelephone===y&&Object(u.createElement)("p",{className:"required-text subTitle",style:{color:"#ee0000"}},"*"),Object(u.createElement)("input",{name:"telephone",type:"text"})),Object(u.createElement)("div",{className:"inputBlock"},Object(u.createElement)(b.RichText,{tagName:"label",className:"emailLabel",onChange:function(e){n({emailLabel:e})},value:a.emailLabel}),Object(u.createElement)("p",{className:"required-text subTitle",style:{color:"#ee0000"}},"*"),Object(u.createElement)("input",{className:"textwidget",name:"email",type:"text"})),"message"==a.emailPermission&&Object(u.createElement)("span",{className:"disclaimer"},Object(m.__)("By submitting your information, you are granting us permission to email you. You may unsubscribe at any time.","cewp4")),"checkbox"==a.emailPermission&&Object(u.createElement)("div",null,Object(u.createElement)("input",{type:"checkbox",name:"consent_check_".concat(c),id:"consent_check_".concat(c)}),Object(u.createElement)("label",{htmlFor:"consent_check_".concat(c),className:"disclaimer"},Object(m.__)("Can we send you an email from time to time?","cewp4"))),Object(u.createElement)("br",null),Object(u.createElement)("button",{className:"wp-block-button__link submit-button",type:"button"},Object(m.__)("Subscribe","cewp4"))))},save:function(e){var t=e.attributes,a=e.className;return Object(u.createElement)("div",{className:"wp-block-ce4wp-subscribe ".concat(a||"")},Object(u.createElement)("div",{className:"onSubmission",style:{display:"none"}},Object(u.createElement)(b.RichText.Content,{className:"title",tagName:"h2",value:t.title}),Object(u.createElement)("p",{className:"subTitle"},Object(m.__)(t.onSubmission,"cewp4"))),Object(u.createElement)("form",{className:"cm-contact-form",name:"contact-form"},Object(u.createElement)("input",{className:"list_id",name:"list_id",type:"hidden",value:t.customList}),Object(u.createElement)(b.RichText.Content,{className:"title",tagName:"h2",value:t.title})," ",Object(u.createElement)(b.RichText.Content,{className:"subTitle",tagName:"p",value:t.subTitle}),t.displayFirstName!==O&&Object(u.createElement)("div",{className:"inputBlock"},Object(u.createElement)(b.RichText.Content,{tagName:"label",value:t.firstNameLabel}),t.displayFirstName===y&&Object(u.createElement)("span",{className:"wp-caption-text required-text",style:{color:"#ee0000"}},"*"),Object(u.createElement)("input",{className:"firstName",name:"first_name",type:"text",required:t.displayFirstName===y})),t.displayLastName!==O&&Object(u.createElement)("div",{className:"inputBlock"},Object(u.createElement)(b.RichText.Content,{tagName:"label",value:t.lastNameLabel}),t.displayLastName===y&&Object(u.createElement)("span",{className:"wp-caption-text required-text",style:{color:"#ee0000"}},"*"),Object(u.createElement)("input",{className:"lastName",name:"last_name",type:"text",required:t.displayFirstName===y})),t.displayTelephone!==O&&Object(u.createElement)("div",{className:"inputBlock"},Object(u.createElement)(b.RichText.Content,{tagName:"label",value:t.telephoneLabel}),t.displayTelephone===y&&Object(u.createElement)("span",{className:"wp-caption-text required-text",style:{color:"#ee0000"}},"*"),Object(u.createElement)("input",{className:"telephone",name:"telephone",type:"tel",pattern:"[+]?[0-9\\(\\)\\s+-]{5,20}",oninvalid:"setCustomValidity('".concat(Object(m.__)("Please enter a valid phone number","cewp4"),"')"),oninput:"setCustomValidity('')",required:t.displayFirstName===y})),Object(u.createElement)("div",{className:"inputBlock"},Object(u.createElement)(b.RichText.Content,{tagName:"label",value:t.emailLabel}),Object(u.createElement)("span",{className:"wp-caption-text required-text",style:{color:"#ee0000"}},"*"),Object(u.createElement)("input",{className:"email",name:"email",type:"email",oninvalid:"setCustomValidity('".concat(Object(m.__)("Please enter a valid email address","cewp4"),"')"),oninput:"setCustomValidity('')",required:!0})),"message"==t.emailPermission&&Object(u.createElement)("span",{className:"disclaimer"},Object(u.createElement)("input",{className:"consent_check",name:"consent",type:"hidden",checked:!0}),Object(m.__)("By submitting your information, you are granting us permission to email you. You may unsubscribe at any time.","cewp4")),"checkbox"==t.emailPermission&&Object(u.createElement)("span",null,Object(u.createElement)("input",{className:"consent_check",name:"consent_check_".concat(t.blockId),id:"consent_check_".concat(t.blockId),type:"checkbox"}),Object(u.createElement)("label",{htmlFor:"consent_check_".concat(t.blockId),className:"disclaimer"},Object(m.__)("Can we send you an email from time to time?","cewp4"))),Object(u.createElement)("button",{className:"wp-block-button__link submit-button",type:"submit"},Object(m.__)("Subscribe","cewp4"))))},supports:{alignWide:!1}})}]);
|
1 |
+
!function(e){var t={};function a(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,a),l.l=!0,l.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)a.d(n,l,function(t){return e[t]}.bind(null,l));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=16)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.blockEditor},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.wp.i18n},function(e,t,a){var n=a(13),l=a(14),c=a(6),i=a(15);e.exports=function(e,t){return n(e)||l(e,t)||c(e,t)||i()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,a){var n=a(5);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?n(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.blocks},function(e,t){e.exports=function(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,a){var n=a(10),l=a(11),c=a(6),i=a(12);e.exports=function(e){return n(e)||l(e)||c(e)||i()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,a){var n=a(5);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){var a=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=a){var n,l,c=[],i=!0,s=!1;try{for(a=a.call(e);!(i=(n=a.next()).done)&&(c.push(n.value),!t||c.length!==t);i=!0);}catch(e){s=!0,l=e}finally{try{i||null==a.return||a.return()}finally{if(s)throw l}}return c}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,a){"use strict";a.r(t);var n=a(7),l=a(8),c=a.n(l),i=a(9),s=a.n(i),r=a(4),o=a.n(r),m=a(0),u=a(3),b=a(1),p=a(2);function d(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function O(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?d(Object(a),!0).forEach((function(t){c()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):d(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var f="notshow",j="optional",y="required",N="summary",h="message",E="redirect",v=function(e,t){var a=React.useState([]),n=o()(a,2),l=n[0],c=n[1],i=React.useState(!1),s=o()(i,2),r=s[0],m=s[1],u=React.useState(!1),b=o()(u,2),p=b[0],d=b[1];return React.useEffect((function(){var a;r||p||(m(!0),jQuery.post(null===(a=ce4wp_form_submit_data)||void 0===a?void 0:a.url,{action:e,nonce:t}).done((function(e){m(!1),d(!0),null!=(null==e?void 0:e.data)&&c(e.data)})))}),[r,p,l]),{data:l,loading:r,hasLoaded:p}};Object(n.registerBlockType)("ce4wp/subscribe",{edit:function(e){var t=this,a=e.attributes,n=e.setAttributes,l=e.className,c=e.clientId;a.blockId||n({blockId:c});var i,r,o=function(){var e,t=v("ce4wp_get_all_custom_lists",null===(e=ce4wp_form_submit_data)||void 0===e?void 0:e.listNonce),a=t.data,n=t.loading,l=t.hasLoaded,c=[];return null!=a&&null!=a.length&&(c=a.map((function(e){return{label:e.name,value:e.id}}))),{customLists:c,loading:n,hasLoaded:l}}().customLists,d={creativeEmailIsActivated:(r=v("ce4wp_creative_email_activated",null===(i=ce4wp_form_submit_data)||void 0===i?void 0:i.activatedNonce)).data,loading:r.loading,hasLoaded:r.hasLoaded}.creativeEmailIsActivated;return Object(m.createElement)("div",{className:"wp-block-ce4wp-subscribe ".concat(l||"")},Object(m.createElement)(b.BlockControls,{key:"setting"},Object(m.createElement)(b.InspectorControls,{key:"setting"},Object(m.createElement)(p.Panel,{header:"Settings"},Object(m.createElement)(p.PanelBody,{title:"Contact Segmentation",initialOpen:!0},Object(m.createElement)(p.PanelRow,{className:"no-flex"},Object(m.createElement)("fieldset",null,Object(m.createElement)("i",{className:"subTitle sub-header"},Object(u.__)("Automatically assign a new contact to a list when they subscribe","ce4wp"),Object(m.createElement)("br",null),Object(m.createElement)(p.ExternalLink,{onClick:function(){return ce4wpNavigateToDashboard(t,"fbcd9606-288a-4d82-be7c-449eaf5a3792",{source:"ce4wp_form_menu"},ce4wpDashboardStartCallback,ce4wpDashboardFinishCallback)}},Object(m.createElement)("span",{id:"ce4wp-manage-lists","data-link_reference":"836b20fc-9ff1-41b2-912b-a8646caf05a4"},Object(u.__)("Manage your lists","ce4wp")))),Object(m.createElement)("br",null),Object(m.createElement)("br",null),Object(m.createElement)(p.SelectControl,{label:"list",value:a.customList,options:[{label:Object(u.__)("Don't assign to a list","cewp4"),value:""}].concat(s()(o)),onChange:function(e){return n({customList:e})}})))),Object(m.createElement)(p.PanelBody,{title:"On submission",initialOpen:!0},Object(m.createElement)(p.PanelRow,null,Object(m.createElement)("fieldset",null,Object(m.createElement)(p.SelectControl,{label:"On submission",value:a.onSubmissionSetting,options:[{label:"Show a custom text message",value:h},{label:"Show a summary of submitted fields",value:N},{label:"Redirect",value:E}],onChange:function(e){return n({onSubmissionSetting:e})}}))),a.onSubmissionSetting===h&&Object(m.createElement)(p.PanelRow,null,Object(m.createElement)("fieldset",null,Object(m.createElement)(p.TextareaControl,{label:"Message text",value:a.onSubmission,onChange:function(e){return n({onSubmission:e})}}))),a.onSubmissionSetting===E&&Object(m.createElement)(p.PanelRow,null,Object(m.createElement)("fieldset",null,Object(m.createElement)(p.TextControl,{label:"Redirect link",value:a.redirectLink,onChange:function(e){return n({redirectLink:e})}})))),Object(m.createElement)(p.PanelBody,{title:"Disclaimer settings",initialOpen:!0},Object(m.createElement)(p.PanelRow,{className:"no-flex"},Object(m.createElement)("fieldset",null,Object(m.createElement)(p.SelectControl,{label:"Permission to mail",value:a.emailPermission,options:[{label:"message",value:"message"},{label:"checkbox",value:"checkbox"}],onChange:function(e){return n(O(O({},a),{},{emailPermission:e}))}})))),Object(m.createElement)(p.PanelBody,{title:"Field settings",initialOpen:!0},Object(m.createElement)(p.PanelRow,{className:"no-flex"},Object(m.createElement)("fieldset",null,Object(m.createElement)(p.SelectControl,{label:"First name field",value:a.displayFirstName,options:[{label:"Do not show",value:f},{label:"Optional",value:j},{label:"Required",value:y}],onChange:function(e){return n({displayFirstName:e})}}))),Object(m.createElement)(p.PanelRow,{className:"no-flex"},Object(m.createElement)("fieldset",null,Object(m.createElement)(p.SelectControl,{label:"Last name field",value:a.displayLastName,options:[{label:"Do not show",value:f},{label:"Optional",value:j},{label:"Required",value:y}],onChange:function(e){return n({displayLastName:e})}}))),Object(m.createElement)(p.PanelRow,{className:"no-flex"},Object(m.createElement)("fieldset",null,Object(m.createElement)(p.SelectControl,{label:"Telephone field",value:a.displayTelephone,options:[{label:"Do not show",value:f},{label:"Optional",value:j},{label:"Required",value:y}],onChange:function(e){return n({displayTelephone:e})}}))))))),Object(m.createElement)("form",{name:"contact-form"},Object(m.createElement)(b.RichText,{tagName:"h2",onChange:function(e){n({title:e})},value:a.title}),Object(m.createElement)(b.RichText,{tagName:"p",className:"subTitle",onChange:function(e){n({subTitle:e})},value:a.subTitle}),!1===d&&Object(m.createElement)("div",{className:"ce4wp-inline-notification ce4wp-inline-warning ce4wp-banner-clickable",onClick:function(){return ce4wpNavigateToDashboard(t,"d25f690a-217a-4d68-9c58-8693965d4673",{source:"ce4wp_form_menu"},ce4wpDashboardStartCallback,ce4wpDashboardFinishCallback)}},Object(m.createElement)(p.Dashicon,{className:"ce4wp-inline-warning-icon",icon:"warning"}),Object(m.createElement)("div",{className:"ce4wp-inline-warning-text"},Object(u.__)("Set up Creative Mail before you use this form on your website.")),Object(m.createElement)(p.Dashicon,{className:"ce4wp-inline-warning-arrow",icon:"arrow-right-alt2"})),a.displayFirstName!==f&&Object(m.createElement)("div",{className:"inputBlock"},Object(m.createElement)(b.RichText,{tagName:"label",className:"firstNameLabel",onChange:function(e){n({firstNameLabel:e})},value:a.firstNameLabel}),a.displayFirstName===y&&Object(m.createElement)("p",{className:"required-text subTitle",style:{color:"#ee0000"}},"*"),Object(m.createElement)("input",{name:"first_name",type:"text"})),a.displayLastName!==f&&Object(m.createElement)("div",{className:"inputBlock"},Object(m.createElement)(b.RichText,{tagName:"label",className:"lastNameLabel",onChange:function(e){n({lastNameLabel:e})},value:a.lastNameLabel}),a.displayLastName===y&&Object(m.createElement)("p",{className:"required-text subTitle",style:{color:"#ee0000"}},"*"),Object(m.createElement)("input",{name:"last_name",type:"text"})),a.displayTelephone!==f&&Object(m.createElement)("div",{class:"inputBlock"},Object(m.createElement)(b.RichText,{tagName:"label",className:"lastNameLabel",onChange:function(e){n({telephoneLabel:e})},value:a.telephoneLabel}),a.displayTelephone===y&&Object(m.createElement)("p",{className:"required-text subTitle",style:{color:"#ee0000"}},"*"),Object(m.createElement)("input",{name:"telephone",type:"text"})),Object(m.createElement)("div",{className:"inputBlock"},Object(m.createElement)(b.RichText,{tagName:"label",className:"emailLabel",onChange:function(e){n({emailLabel:e})},value:a.emailLabel}),Object(m.createElement)("p",{className:"required-text subTitle",style:{color:"#ee0000"}},"*"),Object(m.createElement)("input",{className:"textwidget",name:"email",type:"text"})),"message"==a.emailPermission&&Object(m.createElement)("div",{className:"disclaimer"},Object(m.createElement)(b.RichText,{tagName:"label",className:"disclaimer-text",onChange:function(e){n({disclaimer:e})},value:a.disclaimer})),"checkbox"==a.emailPermission&&Object(m.createElement)("div",{className:"disclaimer"},Object(m.createElement)("input",{type:"checkbox",name:"consent_check_".concat(c),id:"consent_check_".concat(c)}),Object(m.createElement)(b.RichText,{htmlFor:"consent_check_".concat(c),tagName:"label",className:"consentLabel disclaimer-label",onChange:function(e){n({consentLabel:e})},value:a.consentLabel})),Object(m.createElement)("button",{className:"wp-block-button__link submit-button",type:"button"},Object(u.__)("Subscribe","cewp4"))))},save:function(e){var t=e.attributes,a=e.className;return Object(m.createElement)("div",{className:"wp-block-ce4wp-subscribe ".concat(a||"")},Object(m.createElement)("div",{className:"onSubmission",style:{display:"none"}},Object(m.createElement)("input",{className:"onSubmissionSetting",name:"onSubmissionSetting",type:"hidden",value:t.onSubmissionSetting}),t.onSubmissionSetting!==h&&Object(m.createElement)("div",null,Object(m.createElement)(b.RichText.Content,{className:"title",tagName:"h2",value:t.title})),t.onSubmissionSetting===h&&Object(m.createElement)("div",null,Object(m.createElement)(b.RichText.Content,{className:"title",tagName:"h2",value:t.title}),Object(m.createElement)("p",{className:"subTitle"},Object(u.__)(t.onSubmission,"cewp4"))),t.onSubmissionSetting===N&&Object(m.createElement)("div",null,Object(m.createElement)("h3",null,"You have subscribed"),Object(m.createElement)("br",null),(t.displayFirstName!==f||t.displayLastName!==f)&&Object(m.createElement)("p",null,Object(m.createElement)("span",null,"Name: "),Object(m.createElement)("span",{className:"firstNameSummary"}),Object(m.createElement)("span",{className:"lastNameSummary"})),t.displayTelephone!==f&&Object(m.createElement)("p",null,Object(m.createElement)("span",null,"Telephone: "),Object(m.createElement)("span",{className:"telephoneSummary"})),Object(m.createElement)("p",null,Object(m.createElement)("span",null,"Email: "),Object(m.createElement)("span",{className:"emailSummary"}))),t.onSubmissionSetting===E&&Object(m.createElement)("input",{className:"redirect",name:"redirect",type:"hidden",value:t.redirectLink})),Object(m.createElement)("form",{className:"cm-contact-form",name:"contact-form"},Object(m.createElement)("input",{className:"list_id",name:"list_id",type:"hidden",value:t.customList}),Object(m.createElement)(b.RichText.Content,{className:"title",tagName:"h2",value:t.title})," ",Object(m.createElement)(b.RichText.Content,{className:"subTitle",tagName:"p",value:t.subTitle}),t.displayFirstName!==f&&Object(m.createElement)("div",{className:"inputBlock"},Object(m.createElement)(b.RichText.Content,{tagName:"label",value:t.firstNameLabel}),t.displayFirstName===y&&Object(m.createElement)("span",{className:"wp-caption-text required-text",style:{color:"#ee0000"}},"*"),Object(m.createElement)("input",{className:"firstName",name:"first_name",type:"text",required:t.displayFirstName===y})),t.displayLastName!==f&&Object(m.createElement)("div",{className:"inputBlock"},Object(m.createElement)(b.RichText.Content,{tagName:"label",value:t.lastNameLabel}),t.displayLastName===y&&Object(m.createElement)("span",{className:"wp-caption-text required-text",style:{color:"#ee0000"}},"*"),Object(m.createElement)("input",{className:"lastName",name:"last_name",type:"text",required:t.displayLastName===y})),t.displayTelephone!==f&&Object(m.createElement)("div",{className:"inputBlock"},Object(m.createElement)(b.RichText.Content,{tagName:"label",value:t.telephoneLabel}),t.displayTelephone===y&&Object(m.createElement)("span",{className:"wp-caption-text required-text",style:{color:"#ee0000"}},"*"),Object(m.createElement)("input",{className:"telephone",name:"telephone",type:"tel",pattern:"[+]?[0-9\\(\\)\\s+-]{5,20}",oninvalid:"setCustomValidity('".concat(Object(u.__)("Please enter a valid phone number","cewp4"),"')"),oninput:"setCustomValidity('')",required:t.displayTelephone===y})),Object(m.createElement)("div",{className:"inputBlock"},Object(m.createElement)(b.RichText.Content,{tagName:"label",value:t.emailLabel}),Object(m.createElement)("span",{className:"wp-caption-text required-text",style:{color:"#ee0000"}},"*"),Object(m.createElement)("input",{className:"email",name:"email",type:"email",oninvalid:"setCustomValidity('".concat(Object(u.__)("Please enter a valid email address","cewp4"),"')"),oninput:"setCustomValidity('')",required:!0})),"message"==t.emailPermission&&Object(m.createElement)("div",{className:"disclaimer"},Object(m.createElement)("input",{className:"consent_check",name:"consent",type:"hidden",checked:!0}),Object(m.createElement)(b.RichText.Content,{tagName:"label",value:t.disclaimer})),"checkbox"==t.emailPermission&&Object(m.createElement)("div",{className:"disclaimer"},Object(m.createElement)("input",{className:"consent_check",name:"consent_check_".concat(t.blockId),id:"consent_check_".concat(t.blockId),type:"checkbox"}),Object(m.createElement)(b.RichText.Content,{htmlFor:"consent_check_".concat(t.blockId),tagName:"label",value:t.consentLabel,className:"disclaimer-label"})),Object(m.createElement)("button",{className:"wp-block-button__link submit-button",type:"submit"},Object(u.__)("Subscribe","cewp4"))))},supports:{alignWide:!1},keywords:[Object(u.__)("contact"),Object(u.__)("form"),Object(u.__)("email"),Object(u.__)("mail")],deprecated:[{attributes:{blockId:{type:"string"},title:{type:"string",default:"Subscribe"},subTitle:{type:"string",default:"Sign up for our newsletter and stay up to date"},firstNameLabel:{type:"string",default:"First name"},lastNameLabel:{type:"string",default:"Last name"},emailLabel:{type:"string",default:"Email"},telephoneLabel:{type:"string",default:"Telephone"},emailPermission:{type:"string",default:"checkbox"},displayTelephone:{type:"string",default:"notshow"},displayFirstName:{type:"string",default:"optional"},displayLastName:{type:"string",default:"optional"},onSubmission:{type:"string",selector:"div",default:"Thank you for subscribing!"},customList:{type:"string",default:null}},save:function(e){var t=e.attributes,a=e.className;return Object(m.createElement)("div",{className:"wp-block-ce4wp-subscribe ".concat(a||"")},Object(m.createElement)("div",{className:"onSubmission",style:{display:"none"}},Object(m.createElement)(b.RichText.Content,{className:"title",tagName:"h2",value:t.title}),Object(m.createElement)("p",{className:"subTitle"},Object(u.__)(t.onSubmission,"cewp4"))),Object(m.createElement)("form",{className:"cm-contact-form",name:"contact-form"},Object(m.createElement)("input",{className:"list_id",name:"list_id",type:"hidden",value:t.customList}),Object(m.createElement)(b.RichText.Content,{className:"title",tagName:"h2",value:t.title})," ",Object(m.createElement)(b.RichText.Content,{className:"subTitle",tagName:"p",value:t.subTitle}),t.displayFirstName!==f&&Object(m.createElement)("div",{className:"inputBlock"},Object(m.createElement)(b.RichText.Content,{tagName:"label",value:t.firstNameLabel}),t.displayFirstName===y&&Object(m.createElement)("span",{className:"wp-caption-text required-text",style:{color:"#ee0000"}},"*"),Object(m.createElement)("input",{className:"firstName",name:"first_name",type:"text",required:t.displayFirstName===y})),t.displayLastName!==f&&Object(m.createElement)("div",{className:"inputBlock"},Object(m.createElement)(b.RichText.Content,{tagName:"label",value:t.lastNameLabel}),t.displayLastName===y&&Object(m.createElement)("span",{className:"wp-caption-text required-text",style:{color:"#ee0000"}},"*"),Object(m.createElement)("input",{className:"lastName",name:"last_name",type:"text",required:t.displayFirstName===y})),t.displayTelephone!==f&&Object(m.createElement)("div",{className:"inputBlock"},Object(m.createElement)(b.RichText.Content,{tagName:"label",value:t.telephoneLabel}),t.displayTelephone===y&&Object(m.createElement)("span",{className:"wp-caption-text required-text",style:{color:"#ee0000"}},"*"),Object(m.createElement)("input",{className:"telephone",name:"telephone",type:"tel",pattern:"[+]?[0-9\\(\\)\\s+-]{5,20}",oninvalid:"setCustomValidity('".concat(Object(u.__)("Please enter a valid phone number","cewp4"),"')"),oninput:"setCustomValidity('')",required:t.displayFirstName===y})),Object(m.createElement)("div",{className:"inputBlock"},Object(m.createElement)(b.RichText.Content,{tagName:"label",value:t.emailLabel}),Object(m.createElement)("span",{className:"wp-caption-text required-text",style:{color:"#ee0000"}},"*"),Object(m.createElement)("input",{className:"email",name:"email",type:"email",oninvalid:"setCustomValidity('".concat(Object(u.__)("Please enter a valid email address","cewp4"),"')"),oninput:"setCustomValidity('')",required:!0})),"message"==t.emailPermission&&Object(m.createElement)("span",{className:"disclaimer"},Object(m.createElement)("input",{className:"consent_check",name:"consent",type:"hidden",checked:!0}),Object(u.__)("By submitting your information, you are granting us permission to email you. You may unsubscribe at any time.","cewp4")),"checkbox"==t.emailPermission&&Object(m.createElement)("span",null,Object(m.createElement)("input",{className:"consent_check",name:"consent_check_".concat(t.blockId),id:"consent_check_".concat(t.blockId),type:"checkbox"}),Object(m.createElement)("label",{htmlFor:"consent_check_".concat(t.blockId),className:"disclaimer"},Object(u.__)("Can we send you an email from time to time?","cewp4"))),Object(m.createElement)("button",{className:"wp-block-button__link submit-button",type:"submit"},Object(u.__)("Subscribe","cewp4"))))}}]})}]);
|
assets/js/subscribe/submit.js
CHANGED
@@ -4,6 +4,18 @@
|
|
4 |
* Adds the submit function to subscribe contact forms
|
5 |
* @package CreativeMail
|
6 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
(function addOnSubmit() {
|
8 |
let submitButtons = document.getElementsByClassName("cm-contact-form");
|
9 |
for (let element of submitButtons) {
|
@@ -14,24 +26,51 @@
|
|
14 |
let lastName = formElement.getElementsByClassName("lastName")[0]?.value;
|
15 |
let email = formElement.getElementsByClassName("email")[0]?.value;
|
16 |
let telephone = formElement.getElementsByClassName("telephone")[0]?.value;
|
17 |
-
let consent = formElement.getElementsByClassName("consent_check")[0]
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
30 |
let parentElement = formElement.parentElement;
|
31 |
-
|
32 |
-
|
33 |
-
)[0];
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
});
|
36 |
};
|
37 |
}
|
4 |
* Adds the submit function to subscribe contact forms
|
5 |
* @package CreativeMail
|
6 |
*/
|
7 |
+
function setSummaryText(parentElement, name, text) {
|
8 |
+
if (!text) return;
|
9 |
+
const element = parentElement.getElementsByClassName(name)[0];
|
10 |
+
if (element) element.textContent = text;
|
11 |
+
}
|
12 |
+
|
13 |
+
function setSummary(parentElement, values) {
|
14 |
+
for (const [key, value] of Object.entries(values)) {
|
15 |
+
setSummaryText(parentElement, key, value);
|
16 |
+
}
|
17 |
+
}
|
18 |
+
|
19 |
(function addOnSubmit() {
|
20 |
let submitButtons = document.getElementsByClassName("cm-contact-form");
|
21 |
for (let element of submitButtons) {
|
26 |
let lastName = formElement.getElementsByClassName("lastName")[0]?.value;
|
27 |
let email = formElement.getElementsByClassName("email")[0]?.value;
|
28 |
let telephone = formElement.getElementsByClassName("telephone")[0]?.value;
|
29 |
+
let consent = formElement.getElementsByClassName("consent_check")[0]
|
30 |
+
?.checked;
|
31 |
+
let listId =
|
32 |
+
formElement.getElementsByClassName("list_id")[0]?.value || null;
|
33 |
+
jQuery
|
34 |
+
.post(ce4wp_form_submit_data?.url, {
|
35 |
+
action: "ce4wp_form_submission",
|
36 |
+
nonce: ce4wp_form_submit_data?.nonce,
|
37 |
+
first_name: firstName,
|
38 |
+
last_name: lastName,
|
39 |
+
email: email,
|
40 |
+
telephone: telephone,
|
41 |
+
consent: consent,
|
42 |
+
list_id: listId,
|
43 |
+
})
|
44 |
+
.done(function() {
|
45 |
let parentElement = formElement.parentElement;
|
46 |
+
const onSubmissionSetting = parentElement.getElementsByClassName(
|
47 |
+
'onSubmissionSetting'
|
48 |
+
)[0]?.value;
|
49 |
+
|
50 |
+
if (onSubmissionSetting === "redirect") {
|
51 |
+
var pattern = new RegExp('^(https?)://');
|
52 |
+
let redirectValue = parentElement.getElementsByClassName(
|
53 |
+
"redirect"
|
54 |
+
)[0]?.value;
|
55 |
+
if(!pattern.test(redirectValue)) {
|
56 |
+
redirectValue = "https://" + redirectValue;
|
57 |
+
}
|
58 |
+
window.location.href = redirectValue;
|
59 |
+
} else {
|
60 |
+
formElement.style.visibility = "hidden";
|
61 |
+
if (onSubmissionSetting === "summary") {
|
62 |
+
setSummary(parentElement, {
|
63 |
+
firstNameSummary: firstName ? firstName + " ": null,
|
64 |
+
lastNameSummary: lastName,
|
65 |
+
telephoneSummary: telephone,
|
66 |
+
emailSummary: email,
|
67 |
+
});
|
68 |
+
}
|
69 |
+
let onSubmission = parentElement.getElementsByClassName(
|
70 |
+
"onSubmission"
|
71 |
+
)[0];
|
72 |
+
onSubmission.style.display = "block";
|
73 |
+
}
|
74 |
});
|
75 |
};
|
76 |
}
|
composer.lock
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
"This file is @generated automatically"
|
6 |
],
|
7 |
-
"content-hash": "
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "a5hleyrich/wp-background-processing",
|
@@ -43,30 +43,33 @@
|
|
43 |
}
|
44 |
],
|
45 |
"description": "WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.",
|
|
|
|
|
|
|
|
|
46 |
"time": "2020-07-31T07:00:11+00:00"
|
47 |
},
|
48 |
{
|
49 |
"name": "defuse/php-encryption",
|
50 |
-
"version": "v2.
|
51 |
"source": {
|
52 |
"type": "git",
|
53 |
"url": "https://github.com/defuse/php-encryption.git",
|
54 |
-
"reference": "
|
55 |
},
|
56 |
"dist": {
|
57 |
"type": "zip",
|
58 |
-
"url": "https://api.github.com/repos/defuse/php-encryption/zipball/
|
59 |
-
"reference": "
|
60 |
"shasum": ""
|
61 |
},
|
62 |
"require": {
|
63 |
"ext-openssl": "*",
|
64 |
"paragonie/random_compat": ">= 2",
|
65 |
-
"php": ">=5.
|
66 |
},
|
67 |
"require-dev": {
|
68 |
-
"
|
69 |
-
"phpunit/phpunit": "^4|^5"
|
70 |
},
|
71 |
"bin": [
|
72 |
"bin/generate-defuse-key"
|
@@ -106,20 +109,24 @@
|
|
106 |
"security",
|
107 |
"symmetric key cryptography"
|
108 |
],
|
109 |
-
"
|
|
|
|
|
|
|
|
|
110 |
},
|
111 |
{
|
112 |
"name": "firebase/php-jwt",
|
113 |
-
"version": "v5.
|
114 |
"source": {
|
115 |
"type": "git",
|
116 |
"url": "https://github.com/firebase/php-jwt.git",
|
117 |
-
"reference": "
|
118 |
},
|
119 |
"dist": {
|
120 |
"type": "zip",
|
121 |
-
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/
|
122 |
-
"reference": "
|
123 |
"shasum": ""
|
124 |
},
|
125 |
"require": {
|
@@ -156,7 +163,11 @@
|
|
156 |
"jwt",
|
157 |
"php"
|
158 |
],
|
159 |
-
"
|
|
|
|
|
|
|
|
|
160 |
},
|
161 |
{
|
162 |
"name": "mindscape/raygun4php",
|
@@ -206,6 +217,10 @@
|
|
206 |
"logging",
|
207 |
"raygun"
|
208 |
],
|
|
|
|
|
|
|
|
|
209 |
"time": "2019-03-07T01:23:01+00:00"
|
210 |
},
|
211 |
{
|
@@ -251,20 +266,25 @@
|
|
251 |
"pseudorandom",
|
252 |
"random"
|
253 |
],
|
|
|
|
|
|
|
|
|
|
|
254 |
"time": "2020-10-15T08:29:30+00:00"
|
255 |
},
|
256 |
{
|
257 |
"name": "squizlabs/php_codesniffer",
|
258 |
-
"version": "3.
|
259 |
"source": {
|
260 |
"type": "git",
|
261 |
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
262 |
-
"reference": "
|
263 |
},
|
264 |
"dist": {
|
265 |
"type": "zip",
|
266 |
-
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/
|
267 |
-
"reference": "
|
268 |
"shasum": ""
|
269 |
},
|
270 |
"require": {
|
@@ -302,7 +322,12 @@
|
|
302 |
"phpcs",
|
303 |
"standards"
|
304 |
],
|
305 |
-
"
|
|
|
|
|
|
|
|
|
|
|
306 |
}
|
307 |
],
|
308 |
"packages-dev": [
|
@@ -362,6 +387,10 @@
|
|
362 |
"phpcs",
|
363 |
"standards"
|
364 |
],
|
|
|
|
|
|
|
|
|
365 |
"time": "2019-12-27T09:44:58+00:00"
|
366 |
}
|
367 |
],
|
@@ -372,8 +401,9 @@
|
|
372 |
"prefer-lowest": false,
|
373 |
"platform": {
|
374 |
"ext-curl": "*",
|
375 |
-
"ext-json": "*"
|
|
|
376 |
},
|
377 |
"platform-dev": [],
|
378 |
-
"plugin-api-version": "
|
379 |
}
|
4 |
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
"This file is @generated automatically"
|
6 |
],
|
7 |
+
"content-hash": "83b72bd8ee9681d20c2c9261361a957f",
|
8 |
"packages": [
|
9 |
{
|
10 |
"name": "a5hleyrich/wp-background-processing",
|
43 |
}
|
44 |
],
|
45 |
"description": "WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.",
|
46 |
+
"support": {
|
47 |
+
"issues": "https://github.com/deliciousbrains/wp-background-processing/issues",
|
48 |
+
"source": "https://github.com/deliciousbrains/wp-background-processing/tree/1.0.2"
|
49 |
+
},
|
50 |
"time": "2020-07-31T07:00:11+00:00"
|
51 |
},
|
52 |
{
|
53 |
"name": "defuse/php-encryption",
|
54 |
+
"version": "v2.3.1",
|
55 |
"source": {
|
56 |
"type": "git",
|
57 |
"url": "https://github.com/defuse/php-encryption.git",
|
58 |
+
"reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2"
|
59 |
},
|
60 |
"dist": {
|
61 |
"type": "zip",
|
62 |
+
"url": "https://api.github.com/repos/defuse/php-encryption/zipball/77880488b9954b7884c25555c2a0ea9e7053f9d2",
|
63 |
+
"reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2",
|
64 |
"shasum": ""
|
65 |
},
|
66 |
"require": {
|
67 |
"ext-openssl": "*",
|
68 |
"paragonie/random_compat": ">= 2",
|
69 |
+
"php": ">=5.6.0"
|
70 |
},
|
71 |
"require-dev": {
|
72 |
+
"phpunit/phpunit": "^4|^5|^6|^7|^8|^9"
|
|
|
73 |
},
|
74 |
"bin": [
|
75 |
"bin/generate-defuse-key"
|
109 |
"security",
|
110 |
"symmetric key cryptography"
|
111 |
],
|
112 |
+
"support": {
|
113 |
+
"issues": "https://github.com/defuse/php-encryption/issues",
|
114 |
+
"source": "https://github.com/defuse/php-encryption/tree/v2.3.1"
|
115 |
+
},
|
116 |
+
"time": "2021-04-09T23:57:26+00:00"
|
117 |
},
|
118 |
{
|
119 |
"name": "firebase/php-jwt",
|
120 |
+
"version": "v5.3.0",
|
121 |
"source": {
|
122 |
"type": "git",
|
123 |
"url": "https://github.com/firebase/php-jwt.git",
|
124 |
+
"reference": "3c2d70f2e64e2922345e89f2ceae47d2463faae1"
|
125 |
},
|
126 |
"dist": {
|
127 |
"type": "zip",
|
128 |
+
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/3c2d70f2e64e2922345e89f2ceae47d2463faae1",
|
129 |
+
"reference": "3c2d70f2e64e2922345e89f2ceae47d2463faae1",
|
130 |
"shasum": ""
|
131 |
},
|
132 |
"require": {
|
163 |
"jwt",
|
164 |
"php"
|
165 |
],
|
166 |
+
"support": {
|
167 |
+
"issues": "https://github.com/firebase/php-jwt/issues",
|
168 |
+
"source": "https://github.com/firebase/php-jwt/tree/v5.3.0"
|
169 |
+
},
|
170 |
+
"time": "2021-05-20T17:37:02+00:00"
|
171 |
},
|
172 |
{
|
173 |
"name": "mindscape/raygun4php",
|
217 |
"logging",
|
218 |
"raygun"
|
219 |
],
|
220 |
+
"support": {
|
221 |
+
"issues": "https://github.com/MindscapeHQ/raygun4php/issues",
|
222 |
+
"source": "https://github.com/MindscapeHQ/raygun4php/tree/v1.8.4"
|
223 |
+
},
|
224 |
"time": "2019-03-07T01:23:01+00:00"
|
225 |
},
|
226 |
{
|
266 |
"pseudorandom",
|
267 |
"random"
|
268 |
],
|
269 |
+
"support": {
|
270 |
+
"email": "info@paragonie.com",
|
271 |
+
"issues": "https://github.com/paragonie/random_compat/issues",
|
272 |
+
"source": "https://github.com/paragonie/random_compat"
|
273 |
+
},
|
274 |
"time": "2020-10-15T08:29:30+00:00"
|
275 |
},
|
276 |
{
|
277 |
"name": "squizlabs/php_codesniffer",
|
278 |
+
"version": "3.6.0",
|
279 |
"source": {
|
280 |
"type": "git",
|
281 |
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
282 |
+
"reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625"
|
283 |
},
|
284 |
"dist": {
|
285 |
"type": "zip",
|
286 |
+
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625",
|
287 |
+
"reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625",
|
288 |
"shasum": ""
|
289 |
},
|
290 |
"require": {
|
322 |
"phpcs",
|
323 |
"standards"
|
324 |
],
|
325 |
+
"support": {
|
326 |
+
"issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
|
327 |
+
"source": "https://github.com/squizlabs/PHP_CodeSniffer",
|
328 |
+
"wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
|
329 |
+
},
|
330 |
+
"time": "2021-04-09T00:54:41+00:00"
|
331 |
}
|
332 |
],
|
333 |
"packages-dev": [
|
387 |
"phpcs",
|
388 |
"standards"
|
389 |
],
|
390 |
+
"support": {
|
391 |
+
"issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues",
|
392 |
+
"source": "https://github.com/PHPCompatibility/PHPCompatibility"
|
393 |
+
},
|
394 |
"time": "2019-12-27T09:44:58+00:00"
|
395 |
}
|
396 |
],
|
401 |
"prefer-lowest": false,
|
402 |
"platform": {
|
403 |
"ext-curl": "*",
|
404 |
+
"ext-json": "*",
|
405 |
+
"ext-zip": "*"
|
406 |
},
|
407 |
"platform-dev": [],
|
408 |
+
"plugin-api-version": "2.0.0"
|
409 |
}
|
creative-mail-plugin.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* Plugin URI: https://wordpress.org/plugins/creative-mail-by-constant-contact/
|
10 |
* Description: Free email marketing designed specifically for WordPress, Jetpack and WooCommerce. Send newsletters, promotions, updates and transactional e-commerce emails. Simple and easy, powered by Constant Contact’s rock solid reliability.
|
11 |
* Author: Constant Contact
|
12 |
-
* Version: 1.4.
|
13 |
* Author URI: https://www.constantcontact.com
|
14 |
* WC requires at least: 3.0.0
|
15 |
* WC tested up to: 5.1.0
|
@@ -27,7 +27,7 @@ function _load_ce4wp_plugin()
|
|
27 |
define('CE4WP_PLUGIN_DIR', __DIR__ . '/');
|
28 |
define('CE4WP_PLUGIN_URL', plugin_dir_url(__FILE__) . '/');
|
29 |
define('CE4WP_PLUGIN_FILE', __FILE__);
|
30 |
-
define('CE4WP_PLUGIN_VERSION', '1.4.
|
31 |
define('CE4WP_INSTANCE_UUID_KEY', 'ce4wp_instance_uuid');
|
32 |
define('CE4WP_INSTANCE_HANDSHAKE_TOKEN', 'ce4wp_handshake_token');
|
33 |
define('CE4WP_INSTANCE_HANDSHAKE_EXPIRATION', 'ce4wp_handshake_expiration');
|
@@ -44,7 +44,7 @@ function _load_ce4wp_plugin()
|
|
44 |
define('CE4WP_APP_GATEWAY_URL', 'https://app-gateway.creativemail.com/');
|
45 |
define('CE4WP_APP_URL', 'https://app.creativemail.com/');
|
46 |
define('CE4WP_ENVIRONMENT', 'PRODUCTION');
|
47 |
-
define('CE4WP_BUILD_NUMBER', '
|
48 |
define('CE4WP_RAYGUN_PHP_KEY', 'Z85xL3mkgnW13Ri9DajGUg');
|
49 |
define('CE4WP_BATCH_SIZE', 500);
|
50 |
define('CE4WP_WC_API_KEY_ID', 'ce4wp_woocommerce_api_key_id');
|
@@ -109,7 +109,8 @@ function wpse_add_front_end_on_submit()
|
|
109 |
'siteUrl' => get_site_url(),
|
110 |
'url' => admin_url('admin-ajax.php'),
|
111 |
'nonce' => wp_create_nonce( 'ce4wp_form_submission'),
|
112 |
-
'listNonce' => wp_create_nonce( 'ce4wp_get_lists' )
|
|
|
113 |
]
|
114 |
);
|
115 |
}
|
9 |
* Plugin URI: https://wordpress.org/plugins/creative-mail-by-constant-contact/
|
10 |
* Description: Free email marketing designed specifically for WordPress, Jetpack and WooCommerce. Send newsletters, promotions, updates and transactional e-commerce emails. Simple and easy, powered by Constant Contact’s rock solid reliability.
|
11 |
* Author: Constant Contact
|
12 |
+
* Version: 1.4.1
|
13 |
* Author URI: https://www.constantcontact.com
|
14 |
* WC requires at least: 3.0.0
|
15 |
* WC tested up to: 5.1.0
|
27 |
define('CE4WP_PLUGIN_DIR', __DIR__ . '/');
|
28 |
define('CE4WP_PLUGIN_URL', plugin_dir_url(__FILE__) . '/');
|
29 |
define('CE4WP_PLUGIN_FILE', __FILE__);
|
30 |
+
define('CE4WP_PLUGIN_VERSION', '1.4.1');
|
31 |
define('CE4WP_INSTANCE_UUID_KEY', 'ce4wp_instance_uuid');
|
32 |
define('CE4WP_INSTANCE_HANDSHAKE_TOKEN', 'ce4wp_handshake_token');
|
33 |
define('CE4WP_INSTANCE_HANDSHAKE_EXPIRATION', 'ce4wp_handshake_expiration');
|
44 |
define('CE4WP_APP_GATEWAY_URL', 'https://app-gateway.creativemail.com/');
|
45 |
define('CE4WP_APP_URL', 'https://app.creativemail.com/');
|
46 |
define('CE4WP_ENVIRONMENT', 'PRODUCTION');
|
47 |
+
define('CE4WP_BUILD_NUMBER', '1347');
|
48 |
define('CE4WP_RAYGUN_PHP_KEY', 'Z85xL3mkgnW13Ri9DajGUg');
|
49 |
define('CE4WP_BATCH_SIZE', 500);
|
50 |
define('CE4WP_WC_API_KEY_ID', 'ce4wp_woocommerce_api_key_id');
|
109 |
'siteUrl' => get_site_url(),
|
110 |
'url' => admin_url('admin-ajax.php'),
|
111 |
'nonce' => wp_create_nonce( 'ce4wp_form_submission'),
|
112 |
+
'listNonce' => wp_create_nonce( 'ce4wp_get_lists' ),
|
113 |
+
'activatedNonce' => wp_create_nonce( 'ce4wp_get_creative_email_activated' )
|
114 |
]
|
115 |
);
|
116 |
}
|
readme.txt
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
Contributors: Constant Contact
|
3 |
Tags: email, marketing, newsletter, subscribe, contact form, constant contact, crm, automations, ecommerce, promotion, offers, retargeting
|
4 |
Requires at least: 4.6
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 1.4.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
Requires PHP: 5.6
|
10 |
Website: https://www.creativemail.com
|
11 |
WC requires at least: 3.0.0
|
12 |
-
WC tested up to: 5.
|
13 |
|
14 |
Creative Mail was designed specifically for WordPress and WooCommerce.
|
15 |
Our intelligent (and super fun) email editor simplifies email marketing campaign creation and pulls your WordPress blog posts, website images and WooCommerce products right into your email content.
|
@@ -25,6 +25,14 @@ It’s perfect for automatic blog post syndication, newsletters and announcement
|
|
25 |
|
26 |
Create awesome email marketing campaigns right from your WordPress Admin Dashboard that are all powered by the award-winning & rock-solid reliability of Constant Contact.
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
### [VIEW OUR DETAILED FEATURES](https://www.creativemail.com/plans)
|
29 |
|
30 |
### [WOOCOMMERCE & WORDPRESS INTEGRATION](https://www.creativemail.com):
|
@@ -39,13 +47,16 @@ Turn your WooCommerce store and your WordPress site into efficient marketing eng
|
|
39 |
- **Live Support:** With our paid plans (Awesome & Ultimate) you get access to phone and chat support to help you get answers from real live, helpful humans. Imagine that!
|
40 |
|
41 |
### [OPT-IN EMAIL FORMS](https://www.creativemail.com):
|
42 |
-
- **Jetpack
|
43 |
-
- **
|
|
|
|
|
44 |
|
45 |
### [EMAIL AUTOMATIONS](https://www.creativemail.com):
|
46 |
- **Scheduled Sends:** Schedule the time and date of outgoing email marketing campaigns based on your business or organization's preferences.
|
47 |
-
- **Single-Step Triggered Emails:** Replace your non-branded triggered emails with on-brand Creative Mail emails for deeper customer engagement.
|
48 |
-
- **
|
|
|
49 |
|
50 |
### [ANALYTICS & INSIGHTS](https://www.creativemail.com):
|
51 |
- **Realtime Email Marketing Statistics:** Bounces, opens, clicks, forwards, complaints, unsubscribes and more are easily tracked and managed. Be a control freak, it’s OK.
|
@@ -58,27 +69,25 @@ Turn your WooCommerce store and your WordPress site into efficient marketing eng
|
|
58 |
- **Custom Labels:** Further refine your marketing by adding custom labels to subscribers or customers (ex. Truck Buyers, Concert Attendee, Dog Owners, etc.).
|
59 |
|
60 |
### [IMPORT & EXPORT](https://www.creativemail.com):
|
61 |
-
- **Contacts Sync & Import:**
|
62 |
-
- **Import & Export Via CSV:**
|
63 |
|
64 |
### [CAMPAIGNS](https://www.creativemail.com):
|
65 |
- **AI Emails:** Forget templates, let our A.I. build your email marketing campaigns for you. Pull in WordPress posts or WooCommerce products for sale and you’re good to go. Let our robots do your bidding!
|
66 |
- **Email Campaign Creation:** Build your email marketing campaigns in seconds from your WordPress admin dashboard.
|
67 |
- **Awesome Deliverability:** All email marketing campaigns are sent and delivered by the award-winning power of Constant Contact technology. We got you.
|
68 |
-
- **Automated Email Marketing:** Send multi-step email campaigns automatically, with triggers you define, whether that’s based on time or behavioral actions.
|
69 |
|
70 |
### [EMAIL LIST MANAGEMENT](https://www.creativemail.com):
|
71 |
- **Contact List Growth:** Creative Mail collects leads from Jetpack forms or the top WordPress lead capture forms and adds them directly to your email lists.
|
72 |
-
- **Automate Emails:** With our “Welcome” email trigger you can send a Creative Mail welcome
|
73 |
-
- **Auto List Updater:** Creative Mail automatically updates your contact lists for
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
1. Powered by the reliability superior deliverability of Constant Contact
|
81 |
-
1. Fun, which makes life way better
|
82 |
|
83 |
## TERMS OF SERVICE & PRIVACY NOTICE
|
84 |
On behalf of our lawyers (seriously, they’re nice people), please feel free to review our:
|
@@ -95,6 +104,7 @@ Creative Mail by Constant Contact [Privacy Notice](https://www.endurance.com/pri
|
|
95 |
6. Enhance your brand with logomaker
|
96 |
|
97 |
== Changelog ==
|
|
|
98 |
* 1.4.0 - Added gutenberg contact form block CreativeMail
|
99 |
* 1.3.9 - Include notice when you have enabled a password protection plugin.
|
100 |
* 1.3.8 - Fixes an issue with WooCommerce recommendations.
|
@@ -105,4 +115,48 @@ Creative Mail by Constant Contact [Privacy Notice](https://www.endurance.com/pri
|
|
105 |
* 1.3.3 - Direct access to Creative Mail features from the left side nav in WP Admin.
|
106 |
* 1.3.2 - Fixes an issue where the contact sync might cause a critical error.
|
107 |
* 1.3.1 - Add the ability to show the amount of recovered revenue via abandoned carts.
|
108 |
-
* 1.3.0 - Support for abandoned cart emails
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
Contributors: Constant Contact
|
3 |
Tags: email, marketing, newsletter, subscribe, contact form, constant contact, crm, automations, ecommerce, promotion, offers, retargeting
|
4 |
Requires at least: 4.6
|
5 |
+
Tested up to: 5.8
|
6 |
+
Stable tag: 1.4.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
Requires PHP: 5.6
|
10 |
Website: https://www.creativemail.com
|
11 |
WC requires at least: 3.0.0
|
12 |
+
WC tested up to: 5.5.0
|
13 |
|
14 |
Creative Mail was designed specifically for WordPress and WooCommerce.
|
15 |
Our intelligent (and super fun) email editor simplifies email marketing campaign creation and pulls your WordPress blog posts, website images and WooCommerce products right into your email content.
|
25 |
|
26 |
Create awesome email marketing campaigns right from your WordPress Admin Dashboard that are all powered by the award-winning & rock-solid reliability of Constant Contact.
|
27 |
|
28 |
+
## CREATIVE MAIL IS:
|
29 |
+
1. Incredibly easy WordPress email marketing
|
30 |
+
1. Deeply connected to your website & WooCommerce store
|
31 |
+
1. Accessed from within your WP Admin Dashboard
|
32 |
+
1. Automatically syncing your contacts and building your marketing lists
|
33 |
+
1. Powered by the reliability superior deliverability of Constant Contact
|
34 |
+
1. Fun, which makes life way better
|
35 |
+
|
36 |
### [VIEW OUR DETAILED FEATURES](https://www.creativemail.com/plans)
|
37 |
|
38 |
### [WOOCOMMERCE & WORDPRESS INTEGRATION](https://www.creativemail.com):
|
47 |
- **Live Support:** With our paid plans (Awesome & Ultimate) you get access to phone and chat support to help you get answers from real live, helpful humans. Imagine that!
|
48 |
|
49 |
### [OPT-IN EMAIL FORMS](https://www.creativemail.com):
|
50 |
+
- **Jetpack Newsletter Form:** Jetpack has a JMML (join my mailing list) Newsletter Signup form. When activated, contacts who sign up for your Newsletter through the Jetpack form are brought right into your Newsletter email marketing list. Easy peasy.
|
51 |
+
- **Other WordPress Website Forms:** Creative Mail detects the current website forms used on your site, and automatically adds contacts to your email marketing lists. Automagically awesome!
|
52 |
+
- **Creative Mail Form:** If you are not using a form on your site, you can easily add your Creative Mail Gutenberg form to start collecting email addresses of your site visitors
|
53 |
+
|
54 |
|
55 |
### [EMAIL AUTOMATIONS](https://www.creativemail.com):
|
56 |
- **Scheduled Sends:** Schedule the time and date of outgoing email marketing campaigns based on your business or organization's preferences.
|
57 |
+
- **Single-Step Triggered Emails:** Replace your non-branded WooCommerce order notification triggered emails with on-brand Creative Mail emails for deeper customer engagement.
|
58 |
+
- **Abandoned Cart:** With Creative Mail and a WooCommerce store you can send emails to customers who abandon their WooCommerce shopping cart. They'll get an email that reminds them of the items they were considering before they left.
|
59 |
+
- **Multi-Step Marketing Journeys:** Develop sophisticated CLM (that’s marketing speak for - customer lifecycle marketing) campaigns by leveraging our “if this, then that” campaign automation engine that responds to a customer's actions, birthdays or purchases. Welcome your customers with email automation.
|
60 |
|
61 |
### [ANALYTICS & INSIGHTS](https://www.creativemail.com):
|
62 |
- **Realtime Email Marketing Statistics:** Bounces, opens, clicks, forwards, complaints, unsubscribes and more are easily tracked and managed. Be a control freak, it’s OK.
|
69 |
- **Custom Labels:** Further refine your marketing by adding custom labels to subscribers or customers (ex. Truck Buyers, Concert Attendee, Dog Owners, etc.).
|
70 |
|
71 |
### [IMPORT & EXPORT](https://www.creativemail.com):
|
72 |
+
- **Contacts Sync & Import:** No need anymore for complex integrations between your WordPress site and your email marketing provider. With Creative Mail it all simply works with WordPress out of the box. We do the heavy lifting to sync and import your Jetpack, WordPress, WooCommerce and most used Contact form plugins contacts automatically.
|
73 |
+
- **Import & Export Via CSV:** Import bulk email marketing lists (limits may apply), add subscribers one by one, or export your contacts into a CSV file.
|
74 |
|
75 |
### [CAMPAIGNS](https://www.creativemail.com):
|
76 |
- **AI Emails:** Forget templates, let our A.I. build your email marketing campaigns for you. Pull in WordPress posts or WooCommerce products for sale and you’re good to go. Let our robots do your bidding!
|
77 |
- **Email Campaign Creation:** Build your email marketing campaigns in seconds from your WordPress admin dashboard.
|
78 |
- **Awesome Deliverability:** All email marketing campaigns are sent and delivered by the award-winning power of Constant Contact technology. We got you.
|
79 |
+
- **Automated Email Marketing:** Send multi-step email campaigns automatically, with triggers you define, whether that’s based on time, a customer birthday or behavioral actions. Create a flow to welcome your customers and send a special discount and reminder on their birthday.
|
80 |
|
81 |
### [EMAIL LIST MANAGEMENT](https://www.creativemail.com):
|
82 |
- **Contact List Growth:** Creative Mail collects leads from Jetpack forms or the top WordPress lead capture forms and adds them directly to your email lists.
|
83 |
+
- **Automate Emails:** With our “Welcome” email trigger you can send a Creative Mail welcome email series to new subscribers and blog readers.
|
84 |
+
- **Auto List Updater:** Creative Mail automatically updates your contact lists for unsubscribes.
|
85 |
|
86 |
+
### ADD ONS
|
87 |
+
- **Social Campaigns:** Connect your social media accounts with your Creative Mail account to share your newsletters with your followers on social.
|
88 |
+
- **Marketing Calendar:** With your socials connected we give you an overview of all the newsletters and posts that you’ve sent and scheduled. An easy overview to engage with your audience.
|
89 |
+
- **Booking:** Set up Bookings for your business with the Bookingstool. Give clients and customers an easy, quick way to set up appointments with you.
|
90 |
+
- **Logomaker:** Create an amazing logo for your business or social with Logomaker and add it to your email campaigns.
|
|
|
|
|
91 |
|
92 |
## TERMS OF SERVICE & PRIVACY NOTICE
|
93 |
On behalf of our lawyers (seriously, they’re nice people), please feel free to review our:
|
104 |
6. Enhance your brand with logomaker
|
105 |
|
106 |
== Changelog ==
|
107 |
+
* 1.4.1 - Fixed several bugs
|
108 |
* 1.4.0 - Added gutenberg contact form block CreativeMail
|
109 |
* 1.3.9 - Include notice when you have enabled a password protection plugin.
|
110 |
* 1.3.8 - Fixes an issue with WooCommerce recommendations.
|
115 |
* 1.3.3 - Direct access to Creative Mail features from the left side nav in WP Admin.
|
116 |
* 1.3.2 - Fixes an issue where the contact sync might cause a critical error.
|
117 |
* 1.3.1 - Add the ability to show the amount of recovered revenue via abandoned carts.
|
118 |
+
* 1.3.0 - Support for abandoned cart emails
|
119 |
+
|
120 |
+
== Installation ==
|
121 |
+
|
122 |
+
- Go to your admin dashboard
|
123 |
+
- Click the “Plugins” menu in the left side navigation bar
|
124 |
+
- Click on “Add New”
|
125 |
+
- Search for “Creative”
|
126 |
+
- Click “Install Now”
|
127 |
+
- Click “Activate”
|
128 |
+
- You will be redirected to Creative Mail where you can setup your account
|
129 |
+
|
130 |
+
== Frequently Asked Questions ==
|
131 |
+
|
132 |
+
= Requirements =
|
133 |
+
- Your website or blog must be using WordPress.org version 4.6 or higher on your server.
|
134 |
+
- The plugin can be installed on regular Wordpress environments and also on WordPress.com sites.
|
135 |
+
|
136 |
+
= What does the Creative Mail plugin do? =
|
137 |
+
The Creative mail plugin allows you to create awesome email marketing campaigns right from your WordPress Admin Dashboard that are all powered by the award-winning & rock-solid reliability of Constant Contact.
|
138 |
+
Our intelligent (and super fun) email editor simplifies email marketing campaign creation and pulls your WordPress blog posts, website images and WooCommerce products right into your email content. Leads from your WordPress website, ecommerce store and contact forms are automatically captured and routed into our included Contacts CRM and synced with your email marketing lists.
|
139 |
+
It’s perfect for automatic blog post syndication, newsletters and announcements, event promotion, WooCommerce product specials, retargeting ecommerce shoppers, sending postcards, providing updates and more.
|
140 |
+
|
141 |
+
= Are coding skills needed to use Creative Mail? =
|
142 |
+
Creative Mail is built for non-developers, you don't even need to fill in API keys. If you know how to install a plugin on your website, you are good to go! You will have your images, blog posts and products from your WordPress site available to make campaigns without having to lift a finger.
|
143 |
+
|
144 |
+
= What is available for free with CreativeMail? =
|
145 |
+
With Creative Mail you can send campaigns to your contacts for free. Promote your blog articles, WooCommerce products, events and much more with your followers. Advanced functionality like sending Welcome series Automations and WooCommerce order notifications are part of a paid plan.
|
146 |
+
You can see the overview of all the features per plan [on our plans page](https://www.creativemail.com/plans/).
|
147 |
+
|
148 |
+
= What forms can I use in combination with Creative mail? =
|
149 |
+
You can add the Creative Mail Form to your site to gather contacts and add contacts automatically to a specific list.
|
150 |
+
Creative Mail also integrated with one of the form builders below. For those you can easily activate Contact Synchronization:
|
151 |
+
- Jetpack forms
|
152 |
+
- Contact form 7
|
153 |
+
- WPForms lite and WPForms
|
154 |
+
- Newsletter
|
155 |
+
- Gravity forms
|
156 |
+
- Elementor
|
157 |
+
- Ninja forms
|
158 |
+
- Caldera Forms
|
159 |
+
- Formidable
|
160 |
+
|
161 |
+
= Does Creative Mail support ecommerce stores? =
|
162 |
+
Creative mail is fully integrated with WooCommerce, which enables you to share your WooCommerce products via email campaigns. You can also replace your non-branded WooCommerce order notification triggered emails with on-brand Creative Mail emails for deeper customer engagement. Build one, and then all your other WooCommerce emails managed by Creative Mail will inherit the same branded look. Hey, style matters.
|
src/{clients → Clients}/CreativeMailClient.php
RENAMED
File without changes
|
src/{constants → Constants}/EnvironmentNames.php
RENAMED
File without changes
|
src/{exceptions → Exceptions}/CreativeMailException.php
RENAMED
File without changes
|
src/{helpers → Helpers}/EncryptionHelper.php
RENAMED
File without changes
|
src/{helpers → Helpers}/EnvironmentHelper.php
RENAMED
File without changes
|
src/{helpers → Helpers}/GuidHelper.php
RENAMED
File without changes
|
src/{helpers → Helpers}/OptionsHelper.php
RENAMED
File without changes
|
src/{helpers → Helpers}/SsoHelper.php
RENAMED
File without changes
|
src/{helpers → Helpers}/ValidationHelper.php
RENAMED
File without changes
|
src/{integrations → Integrations}/Integration.php
RENAMED
File without changes
|
src/{managers → Managers}/AdminManager.php
RENAMED
@@ -414,18 +414,18 @@ class AdminManager
|
|
414 |
'slug' => 'creativemail_campaigns',
|
415 |
'callback' => null
|
416 |
));
|
417 |
-
array_push($sub_actions, array(
|
418 |
-
'title' => esc_html__('WooCommerce', self::DOMAIN_CE4WP),
|
419 |
-
'text' => '<span id="ce4wp-menu-woocommerce" data-link_reference="1fabdbe2-95ed-4e1e-a2f3-ba0278f5096f">'. __( 'WooCommerce', self::DOMAIN_CE4WP) .'</span>',
|
420 |
-
'slug' => 'creativemail_woocommerce',
|
421 |
-
'callback' => null
|
422 |
-
));
|
423 |
array_push($sub_actions, array(
|
424 |
'title' => esc_html__('Contacts', self::DOMAIN_CE4WP),
|
425 |
'text' => '<span id="ce4wp-menu-contacts" data-link_reference="836b20fc-9ff1-41b2-912b-a8646caf05a4">'. __( 'Contacts', self::DOMAIN_CE4WP) .'</span>',
|
426 |
'slug' => 'creativemail_contacts',
|
427 |
'callback' => null
|
428 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
array_push($sub_actions, array(
|
430 |
'title' => esc_html__('Automation', self::DOMAIN_CE4WP),
|
431 |
'text' => '<span id="ce4wp-menu-automation" data-link_reference="d5baea05-c603-4cca-852e-f8e82414f6b0">'. __( 'Automation', self::DOMAIN_CE4WP) .'</span>',
|
414 |
'slug' => 'creativemail_campaigns',
|
415 |
'callback' => null
|
416 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
array_push($sub_actions, array(
|
418 |
'title' => esc_html__('Contacts', self::DOMAIN_CE4WP),
|
419 |
'text' => '<span id="ce4wp-menu-contacts" data-link_reference="836b20fc-9ff1-41b2-912b-a8646caf05a4">'. __( 'Contacts', self::DOMAIN_CE4WP) .'</span>',
|
420 |
'slug' => 'creativemail_contacts',
|
421 |
'callback' => null
|
422 |
));
|
423 |
+
array_push($sub_actions, array(
|
424 |
+
'title' => esc_html__('WooCommerce', self::DOMAIN_CE4WP),
|
425 |
+
'text' => '<span id="ce4wp-menu-woocommerce" data-link_reference="1fabdbe2-95ed-4e1e-a2f3-ba0278f5096f">'. __( 'WooCommerce', self::DOMAIN_CE4WP) .'</span>',
|
426 |
+
'slug' => 'creativemail_woocommerce',
|
427 |
+
'callback' => null
|
428 |
+
));
|
429 |
array_push($sub_actions, array(
|
430 |
'title' => esc_html__('Automation', self::DOMAIN_CE4WP),
|
431 |
'text' => '<span id="ce4wp-menu-automation" data-link_reference="d5baea05-c603-4cca-852e-f8e82414f6b0">'. __( 'Automation', self::DOMAIN_CE4WP) .'</span>',
|
src/{managers → Managers}/ApiManager.php
RENAMED
File without changes
|
src/{managers → Managers}/CheckoutManager.php
RENAMED
File without changes
|
src/{managers → Managers}/DatabaseManager.php
RENAMED
@@ -18,14 +18,14 @@ class DatabaseManager
|
|
18 |
*
|
19 |
* @since 1.3.0
|
20 |
*/
|
21 |
-
const
|
22 |
|
23 |
/**
|
24 |
* Option name for abandoned checkouts db version.
|
25 |
*
|
26 |
* @since 1.3.0
|
27 |
*/
|
28 |
-
const
|
29 |
|
30 |
const CHECKOUT_UUID = 'checkout_uuid';
|
31 |
|
@@ -34,14 +34,32 @@ class DatabaseManager
|
|
34 |
*
|
35 |
* @since 1.3.0
|
36 |
*/
|
37 |
-
const
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
public function add_hooks()
|
40 |
{
|
41 |
-
|
42 |
-
if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {
|
43 |
-
add_action('admin_init', array($this, 'update_database_check'), 10, 2);
|
44 |
-
}
|
45 |
}
|
46 |
|
47 |
/**
|
@@ -49,13 +67,22 @@ class DatabaseManager
|
|
49 |
*
|
50 |
* @since 1.3.0
|
51 |
*/
|
52 |
-
public function update_database_check()
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
// Fresh install: create table.
|
55 |
-
$this->
|
56 |
-
} else if(current_user_can('administrator')){
|
57 |
-
// Cleanup old expired checkouts
|
58 |
-
$this->delete_expired_checkouts();
|
59 |
}
|
60 |
}
|
61 |
|
@@ -64,12 +91,13 @@ class DatabaseManager
|
|
64 |
*
|
65 |
* @since 1.3.0
|
66 |
*/
|
67 |
-
public function remove_checkout_data($checkout_uuid)
|
|
|
68 |
global $wpdb;
|
69 |
|
70 |
// Delete current checkout data.
|
71 |
$wpdb->delete(
|
72 |
-
DatabaseManager::get_table_name(),
|
73 |
[
|
74 |
self::CHECKOUT_UUID => $checkout_uuid,
|
75 |
],
|
@@ -84,10 +112,11 @@ class DatabaseManager
|
|
84 |
*
|
85 |
* @since 1.3.0
|
86 |
*/
|
87 |
-
public function
|
|
|
88 |
global $wpdb;
|
89 |
|
90 |
-
$table_name = self::get_table_name();
|
91 |
|
92 |
$sql = "CREATE TABLE {$table_name} (
|
93 |
checkout_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
@@ -107,9 +136,36 @@ class DatabaseManager
|
|
107 |
) {$wpdb->get_charset_collate()}";
|
108 |
|
109 |
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
110 |
-
dbDelta(
|
111 |
|
112 |
-
add_option(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
}
|
114 |
|
115 |
/**
|
@@ -117,11 +173,12 @@ class DatabaseManager
|
|
117 |
*
|
118 |
* @since 1.3.0
|
119 |
*/
|
120 |
-
public function delete_expired_checkouts()
|
|
|
121 |
global $wpdb;
|
122 |
|
123 |
// Delete all checkouts at least 30 days old.
|
124 |
-
$table_name = $this->get_table_name();
|
125 |
|
126 |
$wpdb->query(
|
127 |
$wpdb->prepare(
|
@@ -129,7 +186,7 @@ class DatabaseManager
|
|
129 |
"DELETE FROM {$table_name}
|
130 |
WHERE `checkout_updated_ts` <= %s",
|
131 |
// phpcs:enable
|
132 |
-
(
|
133 |
)
|
134 |
);
|
135 |
}
|
@@ -139,10 +196,11 @@ class DatabaseManager
|
|
139 |
*
|
140 |
* @since 1.3.0
|
141 |
*/
|
142 |
-
public function upsert_checkout($checkout_uuid, $user_id, $billing_email, $content, $current_time)
|
|
|
143 |
global $wpdb;
|
144 |
|
145 |
-
$table_name = $this->get_table_name();
|
146 |
|
147 |
// phpcs:disable WordPress.DB.PreparedSQL -- Okay use of unprepared variable for table name in SQL.
|
148 |
$wpdb->query(
|
@@ -170,9 +228,9 @@ class DatabaseManager
|
|
170 |
$billing_email,
|
171 |
maybe_serialize($content),
|
172 |
$current_time,
|
173 |
-
strtotime(
|
174 |
$current_time,
|
175 |
-
strtotime(
|
176 |
$checkout_uuid
|
177 |
)
|
178 |
);
|
@@ -184,16 +242,17 @@ class DatabaseManager
|
|
184 |
*
|
185 |
* @since 1.3.0
|
186 |
*/
|
187 |
-
public function mark_checkout_recovered($checkout_uuid)
|
|
|
188 |
global $wpdb;
|
189 |
|
190 |
-
$table_name = $this->get_table_name();
|
191 |
|
192 |
-
$current_time = current_time(
|
193 |
|
194 |
$wpdb->update($table_name, array(
|
195 |
'checkout_recovered' => $current_time,
|
196 |
-
'checkout_recovered_ts' => strtotime(
|
197 |
), array(self::CHECKOUT_UUID => $checkout_uuid));
|
198 |
}
|
199 |
|
@@ -202,10 +261,11 @@ class DatabaseManager
|
|
202 |
*
|
203 |
* @since 1.3.0
|
204 |
*/
|
205 |
-
public function change_checkout_consent($checkout_uuid, $consent)
|
|
|
206 |
global $wpdb;
|
207 |
|
208 |
-
$table_name = $this->get_table_name();
|
209 |
|
210 |
$int_consent = $consent ? 1 : 0;
|
211 |
|
@@ -214,10 +274,11 @@ class DatabaseManager
|
|
214 |
), array(self::CHECKOUT_UUID => $checkout_uuid));
|
215 |
}
|
216 |
|
217 |
-
public function has_checkout_consent($checkout_uuid)
|
|
|
218 |
global $wpdb;
|
219 |
|
220 |
-
$table_name = $this->get_table_name();
|
221 |
|
222 |
$consent_value = $wpdb->get_var($wpdb->prepare("SELECT `checkout_consent` FROM $table_name WHERE `checkout_uuid` = %s", $checkout_uuid));
|
223 |
return $consent_value === "1";
|
@@ -226,24 +287,24 @@ class DatabaseManager
|
|
226 |
/**
|
227 |
* Retrieve specific user's checkout data.
|
228 |
*
|
229 |
-
* @param string $select
|
230 |
-
* @param mixed
|
231 |
-
* @param array
|
232 |
-
* @param string $order_by
|
233 |
-
* @param string $order
|
234 |
-
* @param string $limit
|
235 |
-
* @param array
|
236 |
-
*
|
237 |
-
* @since 1.3.0
|
238 |
*
|
239 |
* @return mixed Checkout data if exists, else null.
|
|
|
240 |
*/
|
241 |
-
public function get_checkout_data(
|
|
|
242 |
global $wpdb;
|
243 |
|
244 |
-
$table_name = $this->get_table_name();
|
245 |
-
$where
|
246 |
-
$where
|
247 |
|
248 |
// Construct query to return checkout data.
|
249 |
// phpcs:disable -- Disabling a number of sniffs that erroneously flag following block of code.
|
@@ -255,7 +316,7 @@ class DatabaseManager
|
|
255 |
WHERE {$where}
|
256 |
ORDER BY {$order_by} {$order}
|
257 |
{$limit}",
|
258 |
-
array_merge(
|
259 |
)
|
260 |
);
|
261 |
// phpcs:enable
|
@@ -264,12 +325,48 @@ class DatabaseManager
|
|
264 |
/**
|
265 |
* A simple utility for grabbing the full table name, including the WPDB table prefix.
|
266 |
*
|
267 |
-
* @
|
268 |
*
|
269 |
* @return string
|
|
|
270 |
*/
|
271 |
-
public static function get_table_name()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
global $wpdb;
|
273 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
}
|
275 |
}
|
18 |
*
|
19 |
* @since 1.3.0
|
20 |
*/
|
21 |
+
const ABANDONED_CART_TABLE_VERSION = '1.0';
|
22 |
|
23 |
/**
|
24 |
* Option name for abandoned checkouts db version.
|
25 |
*
|
26 |
* @since 1.3.0
|
27 |
*/
|
28 |
+
const ABANDONED_CART_TABLE_VERSION_OPTION_NAME = 'ce4wp_abandoned_checkout_db_version';
|
29 |
|
30 |
const CHECKOUT_UUID = 'checkout_uuid';
|
31 |
|
34 |
*
|
35 |
* @since 1.3.0
|
36 |
*/
|
37 |
+
const ABANDONED_CART_TABLE_NAME = 'ce4wp_abandoned_checkout';
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Current version of the contacts table.
|
41 |
+
*
|
42 |
+
* @since 1.4.0
|
43 |
+
*/
|
44 |
+
const CONTACTS_TABLE_VERSION = '1.0';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Option name for the contacts db version.
|
48 |
+
*
|
49 |
+
* @since 1.4.0
|
50 |
+
*/
|
51 |
+
const CONTACTS_TABLE_VERSION_OPTION_NAME = 'ce4wp_contacts_db_version';
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Contacts table name.
|
55 |
+
*
|
56 |
+
* @since 1.4.0
|
57 |
+
*/
|
58 |
+
const CONTACTS_TABLE_NAME = 'ce4wp_contacts';
|
59 |
|
60 |
public function add_hooks()
|
61 |
{
|
62 |
+
add_action('admin_init', array($this, 'update_database_check'), 10, 2);
|
|
|
|
|
|
|
63 |
}
|
64 |
|
65 |
/**
|
67 |
*
|
68 |
* @since 1.3.0
|
69 |
*/
|
70 |
+
public function update_database_check()
|
71 |
+
{
|
72 |
+
// check if woocommerce is active
|
73 |
+
if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {
|
74 |
+
if (!get_site_option(self::ABANDONED_CART_TABLE_VERSION_OPTION_NAME)) {
|
75 |
+
// Fresh install: create table.
|
76 |
+
$this->create_abandoned_cart_table();
|
77 |
+
} else if (current_user_can('administrator')) {
|
78 |
+
// Cleanup old expired checkouts
|
79 |
+
$this->delete_expired_checkouts();
|
80 |
+
}
|
81 |
+
}
|
82 |
+
//check if ce4wp_contacts table exists
|
83 |
+
if (!get_site_option(self::CONTACTS_TABLE_VERSION_OPTION_NAME)) {
|
84 |
// Fresh install: create table.
|
85 |
+
$this->create_contacts_table();
|
|
|
|
|
|
|
86 |
}
|
87 |
}
|
88 |
|
91 |
*
|
92 |
* @since 1.3.0
|
93 |
*/
|
94 |
+
public function remove_checkout_data($checkout_uuid)
|
95 |
+
{
|
96 |
global $wpdb;
|
97 |
|
98 |
// Delete current checkout data.
|
99 |
$wpdb->delete(
|
100 |
+
DatabaseManager::get_table_name(self::ABANDONED_CART_TABLE_NAME),
|
101 |
[
|
102 |
self::CHECKOUT_UUID => $checkout_uuid,
|
103 |
],
|
112 |
*
|
113 |
* @since 1.3.0
|
114 |
*/
|
115 |
+
public function create_abandoned_cart_table()
|
116 |
+
{
|
117 |
global $wpdb;
|
118 |
|
119 |
+
$table_name = self::get_table_name(self::ABANDONED_CART_TABLE_NAME);
|
120 |
|
121 |
$sql = "CREATE TABLE {$table_name} (
|
122 |
checkout_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
136 |
) {$wpdb->get_charset_collate()}";
|
137 |
|
138 |
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
139 |
+
dbDelta($sql);
|
140 |
|
141 |
+
add_option(self::ABANDONED_CART_TABLE_VERSION_OPTION_NAME, self::ABANDONED_CART_TABLE_VERSION);
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Create contacts table
|
146 |
+
*/
|
147 |
+
public function create_contacts_table()
|
148 |
+
{
|
149 |
+
global $wpdb;
|
150 |
+
|
151 |
+
$table_name = self::get_table_name(self::CONTACTS_TABLE_NAME);
|
152 |
+
|
153 |
+
//keep column names equal to the form submission names so we don't need additional conversion
|
154 |
+
$sql = "CREATE TABLE {$table_name} (
|
155 |
+
contact_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
156 |
+
email varchar(200) NOT NULL DEFAULT '',
|
157 |
+
first_name varchar(200) DEFAULT '',
|
158 |
+
last_name varchar(200) DEFAULT '',
|
159 |
+
telephone varchar(200) DEFAULT '',
|
160 |
+
consent varchar(200) DEFAULT '',
|
161 |
+
PRIMARY KEY (contact_id),
|
162 |
+
UNIQUE KEY email (email)
|
163 |
+
) {$wpdb->get_charset_collate()}";
|
164 |
+
|
165 |
+
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
|
166 |
+
dbDelta($sql);
|
167 |
+
|
168 |
+
add_option(self::CONTACTS_TABLE_VERSION_OPTION_NAME, self::CONTACTS_TABLE_VERSION);
|
169 |
}
|
170 |
|
171 |
/**
|
173 |
*
|
174 |
* @since 1.3.0
|
175 |
*/
|
176 |
+
public function delete_expired_checkouts()
|
177 |
+
{
|
178 |
global $wpdb;
|
179 |
|
180 |
// Delete all checkouts at least 30 days old.
|
181 |
+
$table_name = $this->get_table_name(self::ABANDONED_CART_TABLE_NAME);
|
182 |
|
183 |
$wpdb->query(
|
184 |
$wpdb->prepare(
|
186 |
"DELETE FROM {$table_name}
|
187 |
WHERE `checkout_updated_ts` <= %s",
|
188 |
// phpcs:enable
|
189 |
+
(new DateTime())->sub(new DateInterval('P30D'))->format('U')
|
190 |
)
|
191 |
);
|
192 |
}
|
196 |
*
|
197 |
* @since 1.3.0
|
198 |
*/
|
199 |
+
public function upsert_checkout($checkout_uuid, $user_id, $billing_email, $content, $current_time)
|
200 |
+
{
|
201 |
global $wpdb;
|
202 |
|
203 |
+
$table_name = $this->get_table_name(self::ABANDONED_CART_TABLE_NAME);
|
204 |
|
205 |
// phpcs:disable WordPress.DB.PreparedSQL -- Okay use of unprepared variable for table name in SQL.
|
206 |
$wpdb->query(
|
228 |
$billing_email,
|
229 |
maybe_serialize($content),
|
230 |
$current_time,
|
231 |
+
strtotime($current_time),
|
232 |
$current_time,
|
233 |
+
strtotime($current_time),
|
234 |
$checkout_uuid
|
235 |
)
|
236 |
);
|
242 |
*
|
243 |
* @since 1.3.0
|
244 |
*/
|
245 |
+
public function mark_checkout_recovered($checkout_uuid)
|
246 |
+
{
|
247 |
global $wpdb;
|
248 |
|
249 |
+
$table_name = $this->get_table_name(self::ABANDONED_CART_TABLE_NAME);
|
250 |
|
251 |
+
$current_time = current_time('mysql', 1);
|
252 |
|
253 |
$wpdb->update($table_name, array(
|
254 |
'checkout_recovered' => $current_time,
|
255 |
+
'checkout_recovered_ts' => strtotime($current_time)
|
256 |
), array(self::CHECKOUT_UUID => $checkout_uuid));
|
257 |
}
|
258 |
|
261 |
*
|
262 |
* @since 1.3.0
|
263 |
*/
|
264 |
+
public function change_checkout_consent($checkout_uuid, $consent)
|
265 |
+
{
|
266 |
global $wpdb;
|
267 |
|
268 |
+
$table_name = $this->get_table_name(self::ABANDONED_CART_TABLE_NAME);
|
269 |
|
270 |
$int_consent = $consent ? 1 : 0;
|
271 |
|
274 |
), array(self::CHECKOUT_UUID => $checkout_uuid));
|
275 |
}
|
276 |
|
277 |
+
public function has_checkout_consent($checkout_uuid)
|
278 |
+
{
|
279 |
global $wpdb;
|
280 |
|
281 |
+
$table_name = $this->get_table_name(self::ABANDONED_CART_TABLE_NAME);
|
282 |
|
283 |
$consent_value = $wpdb->get_var($wpdb->prepare("SELECT `checkout_consent` FROM $table_name WHERE `checkout_uuid` = %s", $checkout_uuid));
|
284 |
return $consent_value === "1";
|
287 |
/**
|
288 |
* Retrieve specific user's checkout data.
|
289 |
*
|
290 |
+
* @param string $select Field to return.
|
291 |
+
* @param mixed $where String or array of WHERE clause predicates, using placeholders for values.
|
292 |
+
* @param array $where_args Array of WHERE clause arguments.
|
293 |
+
* @param string $order_by Order by column.
|
294 |
+
* @param string $order Order (ASC/DESC).
|
295 |
+
* @param string $limit LIMIT clause.
|
296 |
+
* @param array $limit_args Array of LIMIT clause arguments.
|
|
|
|
|
297 |
*
|
298 |
* @return mixed Checkout data if exists, else null.
|
299 |
+
* @since 1.3.0
|
300 |
*/
|
301 |
+
public function get_checkout_data(string $select, $where, array $where_args, string $order_by = 'checkout_updated_ts', string $order = 'DESC', string $limit = '', array $limit_args = [])
|
302 |
+
{
|
303 |
global $wpdb;
|
304 |
|
305 |
+
$table_name = $this->get_table_name(self::ABANDONED_CART_TABLE_NAME);
|
306 |
+
$where = is_array($where) ? implode(' AND ', $where) : $where;
|
307 |
+
$where = empty($where) ? 1 : $where;
|
308 |
|
309 |
// Construct query to return checkout data.
|
310 |
// phpcs:disable -- Disabling a number of sniffs that erroneously flag following block of code.
|
316 |
WHERE {$where}
|
317 |
ORDER BY {$order_by} {$order}
|
318 |
{$limit}",
|
319 |
+
array_merge($where_args, $limit_args)
|
320 |
)
|
321 |
);
|
322 |
// phpcs:enable
|
325 |
/**
|
326 |
* A simple utility for grabbing the full table name, including the WPDB table prefix.
|
327 |
*
|
328 |
+
* @param string $OptionName
|
329 |
*
|
330 |
* @return string
|
331 |
+
* @since 1.3.0
|
332 |
*/
|
333 |
+
public static function get_table_name(string $OptionName): string
|
334 |
+
{
|
335 |
+
global $wpdb;
|
336 |
+
if ($OptionName == self::ABANDONED_CART_TABLE_NAME) {
|
337 |
+
return $wpdb->prefix . self::ABANDONED_CART_TABLE_NAME;
|
338 |
+
} else if ($OptionName == self::CONTACTS_TABLE_NAME) {
|
339 |
+
return $wpdb->prefix . self::CONTACTS_TABLE_NAME;
|
340 |
+
}
|
341 |
+
}
|
342 |
+
|
343 |
+
public function insert_contact($data)
|
344 |
+
{
|
345 |
global $wpdb;
|
346 |
+
|
347 |
+
$table_name = $this->get_table_name(self::CONTACTS_TABLE_NAME);
|
348 |
+
|
349 |
+
$wpdb->query(
|
350 |
+
$wpdb->prepare(
|
351 |
+
"INSERT IGNORE INTO {$table_name} (
|
352 |
+
`email`,
|
353 |
+
`first_name`,
|
354 |
+
`last_name`,
|
355 |
+
`telephone`,
|
356 |
+
`consent`
|
357 |
+
) VALUES (
|
358 |
+
%s,
|
359 |
+
%s,
|
360 |
+
%s,
|
361 |
+
%s,
|
362 |
+
%s
|
363 |
+
)",
|
364 |
+
$data['email'],
|
365 |
+
$data['first_name'],
|
366 |
+
$data['last_name'],
|
367 |
+
$data['telephone'],
|
368 |
+
$data['consent']
|
369 |
+
)
|
370 |
+
);
|
371 |
}
|
372 |
}
|
src/{managers → Managers}/EmailManager.php
RENAMED
@@ -4,7 +4,7 @@
|
|
4 |
namespace CreativeMail\Managers;
|
5 |
|
6 |
use CreativeMail\CreativeMail;
|
7 |
-
use CreativeMail\Modules\
|
8 |
use CreativeMail\Helpers\EnvironmentHelper;
|
9 |
use CreativeMail\Helpers\OptionsHelper;
|
10 |
use stdClass;
|
@@ -675,7 +675,9 @@ class EmailManager
|
|
675 |
public function redirect_managed_email_settings_to_creative_mail( $email )
|
676 |
{
|
677 |
if ($this->is_email_managed($email->id) || $email->id === 'cart_abandoned_ce4wp') {
|
678 |
-
$url = CreativeMail::get_instance()->get_admin_manager()->request_single_sign_on_url_internal("
|
|
|
|
|
679 |
wp_redirect($url);
|
680 |
exit;
|
681 |
}
|
4 |
namespace CreativeMail\Managers;
|
5 |
|
6 |
use CreativeMail\CreativeMail;
|
7 |
+
use CreativeMail\Modules\WooCommerce\Emails\AbandonedCartEmail;
|
8 |
use CreativeMail\Helpers\EnvironmentHelper;
|
9 |
use CreativeMail\Helpers\OptionsHelper;
|
10 |
use stdClass;
|
675 |
public function redirect_managed_email_settings_to_creative_mail( $email )
|
676 |
{
|
677 |
if ($this->is_email_managed($email->id) || $email->id === 'cart_abandoned_ce4wp') {
|
678 |
+
$url = CreativeMail::get_instance()->get_admin_manager()->request_single_sign_on_url_internal("66eabdb1-5d55-4bc0-a435-0415c5ada60a", array(
|
679 |
+
"woocommerceTemplateSlug" => $email->id
|
680 |
+
));
|
681 |
wp_redirect($url);
|
682 |
exit;
|
683 |
}
|
src/{managers → Managers}/FormManager.php
RENAMED
@@ -3,7 +3,9 @@
|
|
3 |
|
4 |
namespace CreativeMail\Managers;
|
5 |
|
|
|
6 |
use CreativeMail\Clients\CreativeMailClient;
|
|
|
7 |
|
8 |
/**
|
9 |
* Class CheckoutManager
|
@@ -38,9 +40,10 @@ class FormManager
|
|
38 |
*/
|
39 |
public function add_hooks()
|
40 |
{
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
44 |
}
|
45 |
|
46 |
|
@@ -67,6 +70,13 @@ class FormManager
|
|
67 |
|
68 |
do_action('ce4wp_contact_submission', $data);
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
wp_send_json_success();
|
71 |
}
|
72 |
|
@@ -87,4 +97,16 @@ class FormManager
|
|
87 |
wp_send_json_error(esc_html__('Could not retrieve data.', self::DOMAIN));
|
88 |
}
|
89 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
3 |
|
4 |
namespace CreativeMail\Managers;
|
5 |
|
6 |
+
use CreativeMail\CreativeMail;
|
7 |
use CreativeMail\Clients\CreativeMailClient;
|
8 |
+
use CreativeMail\Helpers\OptionsHelper;
|
9 |
|
10 |
/**
|
11 |
* Class CheckoutManager
|
40 |
*/
|
41 |
public function add_hooks()
|
42 |
{
|
43 |
+
add_action('wp_ajax_ce4wp_form_submission', array($this, 'submit_contact'));
|
44 |
+
add_action('wp_ajax_nopriv_ce4wp_form_submission', array($this, 'submit_contact'));
|
45 |
+
add_action('wp_ajax_ce4wp_get_all_custom_lists', array($this, 'get_all_custom_lists'));
|
46 |
+
add_action('wp_ajax_ce4wp_creative_email_activated', array($this, 'get_creative_email_activated'));
|
47 |
}
|
48 |
|
49 |
|
70 |
|
71 |
do_action('ce4wp_contact_submission', $data);
|
72 |
|
73 |
+
try {
|
74 |
+
//Insert submission into database
|
75 |
+
CreativeMail::get_instance()->get_database_manager()->insert_contact($data);
|
76 |
+
} catch (\Exception $exception) {
|
77 |
+
RaygunManager::get_instance()->exception_handler($exception);
|
78 |
+
}
|
79 |
+
|
80 |
wp_send_json_success();
|
81 |
}
|
82 |
|
97 |
wp_send_json_error(esc_html__('Could not retrieve data.', self::DOMAIN));
|
98 |
}
|
99 |
}
|
100 |
+
|
101 |
+
public function get_creative_email_activated()
|
102 |
+
{
|
103 |
+
$data = filter_input_array(INPUT_POST, [
|
104 |
+
self::NONCE => FILTER_SANITIZE_STRING
|
105 |
+
]);
|
106 |
+
|
107 |
+
if (empty($data[self::NONCE]) || !wp_verify_nonce($data[self::NONCE], 'ce4wp_get_creative_email_activated')) {
|
108 |
+
wp_send_json_error(esc_html__('Invalid nonce.', self::DOMAIN));
|
109 |
+
}
|
110 |
+
wp_send_json_success(OptionsHelper::get_instance_id() != null);
|
111 |
+
}
|
112 |
}
|
src/{managers → Managers}/InstanceManager.php
RENAMED
File without changes
|
src/{managers → Managers}/IntegrationManager.php
RENAMED
@@ -49,7 +49,8 @@ class IntegrationManager
|
|
49 |
new Integration('ninjaforms', 'Ninja Forms', 'ninja-forms/ninja-forms.php', NinjaFormsPluginHandler::class, false, admin_url('plugin-install.php?tab=plugin-information&plugin=ninja-forms&TB_iframe=true&width=772&height=1144')),
|
50 |
new Integration('caldera', 'Caldera Forms', 'caldera-forms/caldera-core.php', CalderaPluginHandler::class, false, admin_url('plugin-install.php?tab=plugin-information&plugin=caldera-forms&TB_iframe=true&width=772&height=1144')),
|
51 |
new Integration('bluehost', 'Bluehost Builder', 'wb4wp-wordpress-plugin-bluehost/wb4wp-plugin.php', BlueHostBuilderPluginHandler::class, false, 'https://www.bluehost.com/'),
|
52 |
-
new Integration('formidable', 'Formidable', 'formidable/formidable.php', FormidablePluginHandler::class, false, admin_url('plugin-install.php?tab=plugin-information&plugin=formidable&TB_iframe=true&width=772&height=1144'))
|
|
|
53 |
);
|
54 |
}
|
55 |
|
@@ -58,7 +59,6 @@ class IntegrationManager
|
|
58 |
*/
|
59 |
public function add_hooks()
|
60 |
{
|
61 |
-
$creativeMail= new Integration('creativemail', 'CreativeMail', 'creativ-email-wordpress-plugin/creative-mail-plugin.php', CreativeMailPluginHandler::class, true);
|
62 |
$active_plugins = array_filter(
|
63 |
$this->get_active_plugins(), function ($item) {
|
64 |
return array_search($item->get_slug(), $this->get_activated_plugins(), true) !== false;
|
@@ -78,16 +78,6 @@ class IntegrationManager
|
|
78 |
RaygunManager::get_instance()->exception_handler($e);
|
79 |
}
|
80 |
}
|
81 |
-
try {
|
82 |
-
// use reflection to create instance of class
|
83 |
-
$class = new ReflectionClass($creativeMail->get_integration_handler());
|
84 |
-
$this->active_integrations[$creativeMail->get_slug()] = $class->newInstance();
|
85 |
-
|
86 |
-
// register hooks for integration class
|
87 |
-
$this->active_integrations[$creativeMail->get_slug()]->registerHooks();
|
88 |
-
} catch (\Exception $e) {
|
89 |
-
RaygunManager::get_instance()->exception_handler($e);
|
90 |
-
}
|
91 |
}
|
92 |
|
93 |
/**
|
@@ -121,6 +111,12 @@ class IntegrationManager
|
|
121 |
}
|
122 |
}
|
123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
return $activated_plugins;
|
125 |
}
|
126 |
|
@@ -161,7 +157,9 @@ class IntegrationManager
|
|
161 |
if (is_array($activated_plugins)) {
|
162 |
$activated_plugins = implode(';', $activated_plugins);
|
163 |
}
|
164 |
-
|
|
|
|
|
165 |
}
|
166 |
|
167 |
/**
|
49 |
new Integration('ninjaforms', 'Ninja Forms', 'ninja-forms/ninja-forms.php', NinjaFormsPluginHandler::class, false, admin_url('plugin-install.php?tab=plugin-information&plugin=ninja-forms&TB_iframe=true&width=772&height=1144')),
|
50 |
new Integration('caldera', 'Caldera Forms', 'caldera-forms/caldera-core.php', CalderaPluginHandler::class, false, admin_url('plugin-install.php?tab=plugin-information&plugin=caldera-forms&TB_iframe=true&width=772&height=1144')),
|
51 |
new Integration('bluehost', 'Bluehost Builder', 'wb4wp-wordpress-plugin-bluehost/wb4wp-plugin.php', BlueHostBuilderPluginHandler::class, false, 'https://www.bluehost.com/'),
|
52 |
+
new Integration('formidable', 'Formidable', 'formidable/formidable.php', FormidablePluginHandler::class, false, admin_url('plugin-install.php?tab=plugin-information&plugin=formidable&TB_iframe=true&width=772&height=1144')),
|
53 |
+
new Integration('creativemail', 'CreativeMail', 'creativ-email-wordpress-plugin/creative-mail-plugin.php', CreativeMailPluginHandler::class, true, null, true)
|
54 |
);
|
55 |
}
|
56 |
|
59 |
*/
|
60 |
public function add_hooks()
|
61 |
{
|
|
|
62 |
$active_plugins = array_filter(
|
63 |
$this->get_active_plugins(), function ($item) {
|
64 |
return array_search($item->get_slug(), $this->get_activated_plugins(), true) !== false;
|
78 |
RaygunManager::get_instance()->exception_handler($e);
|
79 |
}
|
80 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
82 |
|
83 |
/**
|
111 |
}
|
112 |
}
|
113 |
|
114 |
+
if (count(array_filter($activated_plugins, function ($item) {
|
115 |
+
return $item->get_slug() == 'creativemail';
|
116 |
+
})) == 0) {
|
117 |
+
$x = array_filter($this->supported_integrations, function($item) {return $item->get_slug() == 'creativemail';});
|
118 |
+
array_push($activated_plugins, array_pop($x));
|
119 |
+
}
|
120 |
return $activated_plugins;
|
121 |
}
|
122 |
|
157 |
if (is_array($activated_plugins)) {
|
158 |
$activated_plugins = implode(';', $activated_plugins);
|
159 |
}
|
160 |
+
$plugins = explode(';', $activated_plugins);
|
161 |
+
array_push($plugins, 'creativemail');
|
162 |
+
return $plugins;
|
163 |
}
|
164 |
|
165 |
/**
|
src/{managers → Managers}/RaygunManager.php
RENAMED
File without changes
|
src/{modules/api → Modules/Api}/Models/ApiRequestItem.php
RENAMED
File without changes
|
src/{modules/api → Modules/Api}/Processes/ApiBackgroundProcess.php
RENAMED
File without changes
|
src/{modules/blog/models → Modules/Blog/Models}/BlogAttachment.php
RENAMED
File without changes
|
src/{modules/blog/models → Modules/Blog/Models}/BlogInformation.php
RENAMED
File without changes
|
src/{modules/blog/models → Modules/Blog/Models}/BlogPost.php
RENAMED
File without changes
|
src/{modules/contacts → Modules/Contacts}/Exceptions/InvalidContactSyncBackgroundRequestException.php
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
namespace CreativeMail\Modules\
|
4 |
|
5 |
use Exception;
|
6 |
|
@@ -10,4 +10,4 @@ class InvalidContactSyncBackgroundRequestException extends Exception
|
|
10 |
{
|
11 |
parent::__construct('[CreativeMail - Contact sync] ' . $message);
|
12 |
}
|
13 |
-
}
|
1 |
<?php
|
2 |
|
3 |
+
namespace CreativeMail\Modules\Contacts\Exceptions;
|
4 |
|
5 |
use Exception;
|
6 |
|
10 |
{
|
11 |
parent::__construct('[CreativeMail - Contact sync] ' . $message);
|
12 |
}
|
13 |
+
}
|
src/{modules/contacts → Modules/Contacts}/Exceptions/InvalidHandlerContactSyncRequestException.php
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
namespace CreativeMail\Modules\
|
4 |
|
5 |
use Exception;
|
6 |
|
@@ -10,4 +10,4 @@ class InvalidHandlerContactSyncRequestException extends Exception
|
|
10 |
{
|
11 |
parent::__construct('[CreativeMail - Contact sync request] ' . $message);
|
12 |
}
|
13 |
-
}
|
1 |
<?php
|
2 |
|
3 |
+
namespace CreativeMail\Modules\Contacts\Exceptions;
|
4 |
|
5 |
use Exception;
|
6 |
|
10 |
{
|
11 |
parent::__construct('[CreativeMail - Contact sync request] ' . $message);
|
12 |
}
|
13 |
+
}
|
src/{modules/contacts → Modules/Contacts}/Handlers/BaseContactFormPluginHandler.php
RENAMED
File without changes
|
src/{modules/contacts → Modules/Contacts}/Handlers/BlueHostBuilderPluginHandler.php
RENAMED
File without changes
|
src/{modules/contacts → Modules/Contacts}/Handlers/CalderaPluginHandler.php
RENAMED
File without changes
|
src/{modules/contacts → Modules/Contacts}/Handlers/ContactFormSevenPluginHandler.php
RENAMED
File without changes
|
src/{modules/contacts → Modules/Contacts}/Handlers/CreativeMailPluginHandler.php
RENAMED
@@ -19,7 +19,7 @@ class CreativeMailPluginHandler extends BaseContactFormPluginHandler
|
|
19 |
$contactModel->setOptIn(false);
|
20 |
$contactModel->setOptOut(false);
|
21 |
if (!empty($contact['consent'])) {
|
22 |
-
$consent_bool= $contact['consent'] == 'true';
|
23 |
$contactModel->setOptIn($consent_bool);
|
24 |
}
|
25 |
$contactModel->setOptActionBy(OptActionBy::Visitor);
|
@@ -63,7 +63,36 @@ class CreativeMailPluginHandler extends BaseContactFormPluginHandler
|
|
63 |
|
64 |
public function get_contacts($limit = null)
|
65 |
{
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
return null;
|
68 |
}
|
69 |
}
|
19 |
$contactModel->setOptIn(false);
|
20 |
$contactModel->setOptOut(false);
|
21 |
if (!empty($contact['consent'])) {
|
22 |
+
$consent_bool = $contact['consent'] == 'true';
|
23 |
$contactModel->setOptIn($consent_bool);
|
24 |
}
|
25 |
$contactModel->setOptActionBy(OptActionBy::Visitor);
|
63 |
|
64 |
public function get_contacts($limit = null)
|
65 |
{
|
66 |
+
if (!is_int($limit) || $limit <= 0) {
|
67 |
+
$limit = null;
|
68 |
+
}
|
69 |
+
//Get form submissions from the wp_ce4wp_contacts table
|
70 |
+
global $wpdb;
|
71 |
+
$contactsArray = array();
|
72 |
+
|
73 |
+
//get contacts
|
74 |
+
$contactsQuery = 'SELECT * FROM wp_ce4wp_contacts';
|
75 |
+
$contactsResult = $wpdb->get_results($wpdb->prepare($contactsQuery));
|
76 |
+
|
77 |
+
foreach ($contactsResult as $contact) {
|
78 |
+
$contactModel = null;
|
79 |
+
try {
|
80 |
+
$contact = $this->convertToContactModel(json_decode(json_encode($contact), true));
|
81 |
+
if (!empty($contact->getEmail())) {
|
82 |
+
array_push($contactsArray, $contact);
|
83 |
+
}
|
84 |
+
|
85 |
+
} catch (\Exception $exception) {
|
86 |
+
RaygunManager::get_instance()->exception_handler($exception);
|
87 |
+
continue;
|
88 |
+
}
|
89 |
+
if (isset($limit) && count($contactsArray) >= $limit) {
|
90 |
+
break;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
if (!empty($contactsArray)) {
|
94 |
+
return $contactsArray;
|
95 |
+
}
|
96 |
return null;
|
97 |
}
|
98 |
}
|
src/{modules/contacts → Modules/Contacts}/Handlers/ElementorPluginHandler.php
RENAMED
File without changes
|
src/{modules/contacts → Modules/Contacts}/Handlers/FormidablePluginHandler.php
RENAMED
File without changes
|
src/{modules/contacts → Modules/Contacts}/Handlers/GravityFormsPluginHandler.php
RENAMED
File without changes
|
src/{modules/contacts → Modules/Contacts}/Handlers/JetpackPluginHandler.php
RENAMED
File without changes
|
src/{modules/contacts → Modules/Contacts}/Handlers/NewsLetterContactFormPluginHandler.php
RENAMED
File without changes
|
src/{modules/contacts → Modules/Contacts}/Handlers/NinjaFormsPluginHandler.php
RENAMED
File without changes
|
src/{modules/contacts → Modules/Contacts}/Handlers/WooCommercePluginHandler.php
RENAMED
@@ -19,6 +19,7 @@ class WooCommercePluginHandler extends BaseContactFormPluginHandler
|
|
19 |
const CHECKOUT_CONSENT_CHECKBOX_ID = 'ce4wp_checkout_consent_checkbox';
|
20 |
const CHECKOUT_CONSENT_CHECKBOX_VALUE = 'ce4wp_checkout_consent';
|
21 |
const CHECKOUT_CONSENT_CHECKBOX_VALUE_OLD = 'ce_checkout_consent';
|
|
|
22 |
|
23 |
public function convertToContactModel($orderId)
|
24 |
{
|
@@ -48,7 +49,7 @@ class WooCommercePluginHandler extends BaseContactFormPluginHandler
|
|
48 |
if (!empty($contactModel->getEmail())) {
|
49 |
$contactModel->setEventType(CE4WP_WC_EVENTTYPE);
|
50 |
$contactModel->setOptActionBy(2);
|
51 |
-
$contactModel->setOptIn(
|
52 |
$contactModel->setOptOut(false);
|
53 |
}
|
54 |
|
@@ -56,30 +57,34 @@ class WooCommercePluginHandler extends BaseContactFormPluginHandler
|
|
56 |
$contactModel->setPhone($products_detail["_billing_phone"][0]);
|
57 |
}
|
58 |
|
59 |
-
$
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
} else if (!empty($products_detail[self::CHECKOUT_CONSENT_CHECKBOX_ID])) {
|
64 |
-
$checkbox_value = $products_detail[self::CHECKOUT_CONSENT_CHECKBOX_ID];
|
65 |
-
} else if (!empty($_POST[self::CHECKOUT_CONSENT_CHECKBOX_VALUE])) {
|
66 |
-
$checkbox_value = esc_attr($_POST[self::CHECKOUT_CONSENT_CHECKBOX_VALUE]);
|
67 |
-
} else if (!empty($products_detail[self::CHECKOUT_CONSENT_CHECKBOX_VALUE])) {
|
68 |
-
$checkbox_value = $products_detail[self::CHECKOUT_CONSENT_CHECKBOX_VALUE][0]; //this value appears to be in array;
|
69 |
-
} else if (!empty($products_detail[self::CHECKOUT_CONSENT_CHECKBOX_VALUE_OLD])) {
|
70 |
-
$checkbox_value = $products_detail[self::CHECKOUT_CONSENT_CHECKBOX_VALUE_OLD][0]; //this value appears to be in array;
|
71 |
-
}
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
}
|
82 |
-
return $contactModel;
|
83 |
}
|
84 |
|
85 |
function getContactAddressFromOrder($products_detail)
|
@@ -153,6 +158,7 @@ class WooCommercePluginHandler extends BaseContactFormPluginHandler
|
|
153 |
|
154 |
$contactModel = null;
|
155 |
try {
|
|
|
156 |
$contactModel = $this->convertToContactModel($products_order->ID);
|
157 |
} catch (\Exception $exception) {
|
158 |
// silent exception
|
19 |
const CHECKOUT_CONSENT_CHECKBOX_ID = 'ce4wp_checkout_consent_checkbox';
|
20 |
const CHECKOUT_CONSENT_CHECKBOX_VALUE = 'ce4wp_checkout_consent';
|
21 |
const CHECKOUT_CONSENT_CHECKBOX_VALUE_OLD = 'ce_checkout_consent';
|
22 |
+
var $isSync = false;
|
23 |
|
24 |
public function convertToContactModel($orderId)
|
25 |
{
|
49 |
if (!empty($contactModel->getEmail())) {
|
50 |
$contactModel->setEventType(CE4WP_WC_EVENTTYPE);
|
51 |
$contactModel->setOptActionBy(2);
|
52 |
+
$contactModel->setOptIn($this->isSync);
|
53 |
$contactModel->setOptOut(false);
|
54 |
}
|
55 |
|
57 |
$contactModel->setPhone($products_detail["_billing_phone"][0]);
|
58 |
}
|
59 |
|
60 |
+
$this->setConsentValues($contactModel, $products_detail);
|
61 |
+
}
|
62 |
+
return $contactModel;
|
63 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
+
function setConsentValues($contactModel, $products_detail){
|
66 |
+
$checkbox_value = null;
|
67 |
+
|
68 |
+
if (!empty($_POST[self::CHECKOUT_CONSENT_CHECKBOX_ID])) {
|
69 |
+
$checkbox_value = esc_attr($_POST[self::CHECKOUT_CONSENT_CHECKBOX_ID]);
|
70 |
+
} else if (!empty($products_detail[self::CHECKOUT_CONSENT_CHECKBOX_ID])) {
|
71 |
+
$checkbox_value = $products_detail[self::CHECKOUT_CONSENT_CHECKBOX_ID];
|
72 |
+
} else if (!empty($_POST[self::CHECKOUT_CONSENT_CHECKBOX_VALUE])) {
|
73 |
+
$checkbox_value = esc_attr($_POST[self::CHECKOUT_CONSENT_CHECKBOX_VALUE]);
|
74 |
+
} else if (!empty($products_detail[self::CHECKOUT_CONSENT_CHECKBOX_VALUE])) {
|
75 |
+
$checkbox_value = $products_detail[self::CHECKOUT_CONSENT_CHECKBOX_VALUE][0]; //this value appears to be in array;
|
76 |
+
} else if (!empty($products_detail[self::CHECKOUT_CONSENT_CHECKBOX_VALUE_OLD])) {
|
77 |
+
$checkbox_value = $products_detail[self::CHECKOUT_CONSENT_CHECKBOX_VALUE_OLD][0]; //this value appears to be in array;
|
78 |
+
}
|
79 |
+
|
80 |
+
if (!is_null($checkbox_value)) {
|
81 |
+
$contactModel->setOptActionBy(1);
|
82 |
+
if ($checkbox_value == true){
|
83 |
+
$contactModel->setOptIn(true);
|
84 |
+
} elseif ($checkbox_value == false){
|
85 |
+
$contactModel->setOptIn(false);
|
86 |
}
|
87 |
}
|
|
|
88 |
}
|
89 |
|
90 |
function getContactAddressFromOrder($products_detail)
|
158 |
|
159 |
$contactModel = null;
|
160 |
try {
|
161 |
+
$this->isSync = true;
|
162 |
$contactModel = $this->convertToContactModel($products_order->ID);
|
163 |
} catch (\Exception $exception) {
|
164 |
// silent exception
|
src/{modules/contacts → Modules/Contacts}/Handlers/WpFormsPluginHandler.php
RENAMED
File without changes
|
src/{modules/contacts → Modules/Contacts}/Managers/ContactsSyncManager.php
RENAMED
File without changes
|
src/{modules/contacts/models → Modules/Contacts/Models}/ContactAddressModel.php
RENAMED
File without changes
|
src/{modules/contacts/models → Modules/Contacts/Models}/ContactFormSevenSubmission.php
RENAMED
File without changes
|
src/{modules/contacts/models → Modules/Contacts/Models}/ContactModel.php
RENAMED
File without changes
|
src/{modules/contacts/models → Modules/Contacts/Models}/OptActionBy.php
RENAMED
File without changes
|
src/{modules/contacts/Processes → Modules/Contacts/Processors}/ContactsSyncBackgroundProcessor.php
RENAMED
File without changes
|
src/{modules/contacts → Modules/Contacts}/Services/ContactsSyncService.php
RENAMED
File without changes
|
src/{modules → Modules}/DashboardWidgetModule.php
RENAMED
File without changes
|
src/{modules → Modules}/FeedbackNoticeModule.php
RENAMED
File without changes
|
src/{modules/woocommerce/emails → Modules/WooCommerce/Emails}/AbandonedCartEmail.php
RENAMED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
namespace CreativeMail\Modules\
|
3 |
|
4 |
use WC_Email;
|
5 |
use WC_Order;
|
1 |
<?php
|
2 |
+
namespace CreativeMail\Modules\WooCommerce\Emails;
|
3 |
|
4 |
use WC_Email;
|
5 |
use WC_Order;
|
src/{modules/woocommerce/models → Modules/WooCommerce/Models}/WCInformationModel.php
RENAMED
File without changes
|
src/{modules/woocommerce/models → Modules/WooCommerce/Models}/WCProductModel.php
RENAMED
File without changes
|
src/{modules/woocommerce/models → Modules/WooCommerce/Models}/WCStoreInformation.php
RENAMED
File without changes
|
src/blocks/subscribe/block.json
CHANGED
@@ -43,14 +43,32 @@
|
|
43 |
"type": "string",
|
44 |
"default": "optional"
|
45 |
},
|
|
|
|
|
|
|
|
|
|
|
46 |
"onSubmission": {
|
47 |
"type": "string",
|
48 |
"selector": "div",
|
49 |
"default": "Thank you for subscribing!"
|
50 |
},
|
|
|
|
|
|
|
|
|
|
|
51 |
"customList": {
|
52 |
"type": "string",
|
53 |
"default": null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
}
|
55 |
},
|
56 |
"name": "ce4wp/subscribe",
|
43 |
"type": "string",
|
44 |
"default": "optional"
|
45 |
},
|
46 |
+
"onSubmissionSetting": {
|
47 |
+
"type": "string",
|
48 |
+
"selector": "div",
|
49 |
+
"default": "message"
|
50 |
+
},
|
51 |
"onSubmission": {
|
52 |
"type": "string",
|
53 |
"selector": "div",
|
54 |
"default": "Thank you for subscribing!"
|
55 |
},
|
56 |
+
"redirectLink": {
|
57 |
+
"type": "string",
|
58 |
+
"selector": "div",
|
59 |
+
"default": ""
|
60 |
+
},
|
61 |
"customList": {
|
62 |
"type": "string",
|
63 |
"default": null
|
64 |
+
},
|
65 |
+
"disclaimer": {
|
66 |
+
"type": "string",
|
67 |
+
"default": "By submitting your information, you are granting us permission to email you. You may unsubscribe at any time."
|
68 |
+
},
|
69 |
+
"consentLabel": {
|
70 |
+
"type": "string",
|
71 |
+
"default": "Can we send you an email from time to time?"
|
72 |
}
|
73 |
},
|
74 |
"name": "ce4wp/subscribe",
|
src/blocks/subscribe/deprecated/deprecated_save.js
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { __ } from "@wordpress/i18n";
|
2 |
+
import { RichText } from "@wordpress/block-editor";
|
3 |
+
import { FIELD_SETTING } from "../edit";
|
4 |
+
// phpcs:disable
|
5 |
+
/**
|
6 |
+
* addOnSubmit.
|
7 |
+
* Adds the submit function to subscribe contact forms
|
8 |
+
* @package CreativeMail
|
9 |
+
*/
|
10 |
+
export function deprecated_4_0({ attributes, className }) {
|
11 |
+
return (
|
12 |
+
<div className={`wp-block-ce4wp-subscribe ${className ? className : ''}`}>
|
13 |
+
<div className="onSubmission" style={{ display: 'none' }}>
|
14 |
+
<RichText.Content
|
15 |
+
className="title"
|
16 |
+
tagName="h2"
|
17 |
+
value={attributes.title}
|
18 |
+
/>
|
19 |
+
<p className="subTitle">{__(attributes.onSubmission, "cewp4")}</p>
|
20 |
+
</div>
|
21 |
+
<form className="cm-contact-form" name="contact-form">
|
22 |
+
<input
|
23 |
+
className="list_id"
|
24 |
+
name="list_id"
|
25 |
+
type="hidden"
|
26 |
+
value={attributes.customList}
|
27 |
+
/>
|
28 |
+
<RichText.Content
|
29 |
+
className="title"
|
30 |
+
tagName="h2"
|
31 |
+
value={attributes.title}
|
32 |
+
/>{" "}
|
33 |
+
<RichText.Content
|
34 |
+
className="subTitle"
|
35 |
+
tagName="p"
|
36 |
+
value={attributes.subTitle}
|
37 |
+
/>
|
38 |
+
{attributes.displayFirstName !== FIELD_SETTING.NOTSHOW && (
|
39 |
+
<div className="inputBlock">
|
40 |
+
<RichText.Content
|
41 |
+
tagName="label"
|
42 |
+
value={attributes.firstNameLabel}
|
43 |
+
/>
|
44 |
+
{attributes.displayFirstName === FIELD_SETTING.REQUIRED && (
|
45 |
+
<span
|
46 |
+
className="wp-caption-text required-text"
|
47 |
+
style={{ color: "#ee0000" }}
|
48 |
+
>
|
49 |
+
*
|
50 |
+
</span>
|
51 |
+
)}
|
52 |
+
<input
|
53 |
+
className="firstName"
|
54 |
+
name="first_name"
|
55 |
+
type="text"
|
56 |
+
required={attributes.displayFirstName === FIELD_SETTING.REQUIRED}
|
57 |
+
/>
|
58 |
+
</div>
|
59 |
+
)}
|
60 |
+
{attributes.displayLastName !== FIELD_SETTING.NOTSHOW && (
|
61 |
+
<div className="inputBlock">
|
62 |
+
<RichText.Content
|
63 |
+
tagName="label"
|
64 |
+
value={attributes.lastNameLabel}
|
65 |
+
/>
|
66 |
+
{attributes.displayLastName === FIELD_SETTING.REQUIRED && (
|
67 |
+
<span
|
68 |
+
className="wp-caption-text required-text"
|
69 |
+
style={{ color: "#ee0000" }}
|
70 |
+
>
|
71 |
+
*
|
72 |
+
</span>
|
73 |
+
)}
|
74 |
+
<input
|
75 |
+
className="lastName"
|
76 |
+
name="last_name"
|
77 |
+
type="text"
|
78 |
+
required={attributes.displayFirstName === FIELD_SETTING.REQUIRED}
|
79 |
+
></input>
|
80 |
+
</div>
|
81 |
+
)}
|
82 |
+
{attributes.displayTelephone !== FIELD_SETTING.NOTSHOW && (
|
83 |
+
<div className="inputBlock">
|
84 |
+
<RichText.Content
|
85 |
+
tagName="label"
|
86 |
+
value={attributes.telephoneLabel}
|
87 |
+
/>
|
88 |
+
{attributes.displayTelephone === FIELD_SETTING.REQUIRED && (
|
89 |
+
<span
|
90 |
+
className="wp-caption-text required-text"
|
91 |
+
style={{ color: "#ee0000" }}
|
92 |
+
>
|
93 |
+
*
|
94 |
+
</span>
|
95 |
+
)}
|
96 |
+
<input
|
97 |
+
className="telephone"
|
98 |
+
name="telephone"
|
99 |
+
type="tel"
|
100 |
+
pattern="[+]?[0-9\(\)\s+-]{5,20}"
|
101 |
+
oninvalid={`setCustomValidity('${__("Please enter a valid phone number", "cewp4")}')`}
|
102 |
+
oninput="setCustomValidity('')"
|
103 |
+
required={attributes.displayFirstName === FIELD_SETTING.REQUIRED}
|
104 |
+
></input>
|
105 |
+
</div>
|
106 |
+
)}
|
107 |
+
<div className="inputBlock">
|
108 |
+
<RichText.Content tagName="label" value={attributes.emailLabel} />
|
109 |
+
<span
|
110 |
+
className="wp-caption-text required-text"
|
111 |
+
style={{ color: "#ee0000" }}
|
112 |
+
>
|
113 |
+
*
|
114 |
+
</span>
|
115 |
+
<input
|
116 |
+
className="email"
|
117 |
+
name="email"
|
118 |
+
type="email"
|
119 |
+
oninvalid={`setCustomValidity('${__("Please enter a valid email address", "cewp4")}')`}
|
120 |
+
oninput="setCustomValidity('')"
|
121 |
+
required
|
122 |
+
></input>
|
123 |
+
</div>
|
124 |
+
{attributes.emailPermission == "message" && (
|
125 |
+
<span className="disclaimer">
|
126 |
+
<input
|
127 |
+
className="consent_check"
|
128 |
+
name="consent"
|
129 |
+
type="hidden"
|
130 |
+
checked
|
131 |
+
></input>
|
132 |
+
{__(
|
133 |
+
"By submitting your information, you are granting us permission to email you. You may unsubscribe at any time.",
|
134 |
+
"cewp4"
|
135 |
+
)}
|
136 |
+
</span>
|
137 |
+
)}
|
138 |
+
{attributes.emailPermission == "checkbox" && (
|
139 |
+
<span>
|
140 |
+
<input
|
141 |
+
className="consent_check"
|
142 |
+
name={`consent_check_${attributes.blockId}`}
|
143 |
+
id={`consent_check_${attributes.blockId}`}
|
144 |
+
type="checkbox"
|
145 |
+
/>
|
146 |
+
<label
|
147 |
+
htmlFor={`consent_check_${attributes.blockId}`}
|
148 |
+
className="disclaimer"
|
149 |
+
>
|
150 |
+
{__("Can we send you an email from time to time?", "cewp4")}
|
151 |
+
</label>
|
152 |
+
</span>
|
153 |
+
)}
|
154 |
+
<button className="wp-block-button__link submit-button" type="submit">
|
155 |
+
{__("Subscribe", "cewp4")}
|
156 |
+
</button>
|
157 |
+
</form>
|
158 |
+
</div>
|
159 |
+
);
|
160 |
+
}
|
src/blocks/subscribe/edit.js
CHANGED
@@ -7,10 +7,12 @@ import {
|
|
7 |
import {
|
8 |
SelectControl,
|
9 |
TextareaControl,
|
|
|
10 |
Panel,
|
11 |
PanelBody,
|
12 |
PanelRow,
|
13 |
-
ExternalLink
|
|
|
14 |
} from "@wordpress/components";
|
15 |
|
16 |
import "./editor.scss";
|
@@ -21,8 +23,14 @@ export const FIELD_SETTING = {
|
|
21 |
REQUIRED: "required",
|
22 |
};
|
23 |
|
24 |
-
const
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
const [loading, setLoading] = React.useState(false);
|
27 |
const [hasLoaded, setHasLoaded] = React.useState(false);
|
28 |
|
@@ -31,21 +39,38 @@ const useCustomLists = () => {
|
|
31 |
setLoading(true);
|
32 |
jQuery
|
33 |
.post(ce4wp_form_submit_data?.url, {
|
34 |
-
action:
|
35 |
-
nonce:
|
36 |
})
|
37 |
.done((response) => {
|
38 |
setLoading(false);
|
39 |
setHasLoaded(true);
|
40 |
-
if (response?.data != null
|
41 |
-
|
42 |
-
label: list.name,
|
43 |
-
value: list.id,
|
44 |
-
})))
|
45 |
}
|
46 |
});
|
47 |
-
}, [loading, hasLoaded,
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
return {
|
50 |
customLists,
|
51 |
loading,
|
@@ -53,6 +78,18 @@ const useCustomLists = () => {
|
|
53 |
};
|
54 |
};
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
export default function Edit({
|
57 |
attributes,
|
58 |
setAttributes,
|
@@ -63,10 +100,10 @@ export default function Edit({
|
|
63 |
if (!blockId) {
|
64 |
setAttributes({ blockId: clientId });
|
65 |
}
|
66 |
-
const { customLists } = useCustomLists()
|
67 |
-
|
68 |
return (
|
69 |
-
<div className={`wp-block-ce4wp-subscribe ${className ? className :
|
70 |
<BlockControls key="setting">
|
71 |
<InspectorControls key="setting">
|
72 |
<Panel header="Settings">
|
@@ -122,13 +159,55 @@ export default function Edit({
|
|
122 |
<PanelBody title="On submission" initialOpen={true}>
|
123 |
<PanelRow>
|
124 |
<fieldset>
|
125 |
-
<
|
126 |
-
label="
|
127 |
-
value={attributes.
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
/>
|
130 |
</fieldset>
|
131 |
</PanelRow>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
</PanelBody>
|
133 |
<PanelBody title="Disclaimer settings" initialOpen={true}>
|
134 |
<PanelRow className="no-flex">
|
@@ -258,6 +337,31 @@ export default function Edit({
|
|
258 |
}}
|
259 |
value={attributes.subTitle}
|
260 |
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
{attributes.displayFirstName !== FIELD_SETTING.NOTSHOW && (
|
262 |
<div className="inputBlock">
|
263 |
<RichText
|
@@ -336,26 +440,35 @@ export default function Edit({
|
|
336 |
<input className="textwidget" name="email" type="text"></input>
|
337 |
</div>
|
338 |
{attributes.emailPermission == "message" && (
|
339 |
-
<
|
340 |
-
|
341 |
-
"
|
342 |
-
"
|
343 |
-
|
344 |
-
|
|
|
|
|
|
|
|
|
345 |
)}
|
346 |
{attributes.emailPermission == "checkbox" && (
|
347 |
-
<div>
|
348 |
<input
|
349 |
type="checkbox"
|
350 |
name={`consent_check_${clientId}`}
|
351 |
id={`consent_check_${clientId}`}
|
352 |
/>
|
353 |
-
<
|
354 |
-
{
|
355 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
356 |
</div>
|
357 |
)}
|
358 |
-
<br />
|
359 |
<button className="wp-block-button__link submit-button" type="button">
|
360 |
{__("Subscribe", "cewp4")}
|
361 |
</button>
|
7 |
import {
|
8 |
SelectControl,
|
9 |
TextareaControl,
|
10 |
+
TextControl,
|
11 |
Panel,
|
12 |
PanelBody,
|
13 |
PanelRow,
|
14 |
+
ExternalLink,
|
15 |
+
Dashicon,
|
16 |
} from "@wordpress/components";
|
17 |
|
18 |
import "./editor.scss";
|
23 |
REQUIRED: "required",
|
24 |
};
|
25 |
|
26 |
+
export const ON_SUBMIT_SETTING = {
|
27 |
+
SUMMARY: "summary",
|
28 |
+
MESSAGE: "message",
|
29 |
+
REDIRECT: "redirect",
|
30 |
+
};
|
31 |
+
|
32 |
+
const useWPAction = (action, nonce) => {
|
33 |
+
const [data, setData] = React.useState([]);
|
34 |
const [loading, setLoading] = React.useState(false);
|
35 |
const [hasLoaded, setHasLoaded] = React.useState(false);
|
36 |
|
39 |
setLoading(true);
|
40 |
jQuery
|
41 |
.post(ce4wp_form_submit_data?.url, {
|
42 |
+
action: action,
|
43 |
+
nonce: nonce,
|
44 |
})
|
45 |
.done((response) => {
|
46 |
setLoading(false);
|
47 |
setHasLoaded(true);
|
48 |
+
if (response?.data != null) {
|
49 |
+
setData(response.data);
|
|
|
|
|
|
|
50 |
}
|
51 |
});
|
52 |
+
}, [loading, hasLoaded, data]);
|
53 |
|
54 |
+
return {
|
55 |
+
data,
|
56 |
+
loading,
|
57 |
+
hasLoaded,
|
58 |
+
};
|
59 |
+
};
|
60 |
+
|
61 |
+
const useCustomLists = () => {
|
62 |
+
const { data, loading, hasLoaded } = useWPAction(
|
63 |
+
"ce4wp_get_all_custom_lists",
|
64 |
+
ce4wp_form_submit_data?.listNonce
|
65 |
+
);
|
66 |
+
|
67 |
+
let customLists = [];
|
68 |
+
if (data != null && data.length != undefined) {
|
69 |
+
customLists = data.map((list) => ({
|
70 |
+
label: list.name,
|
71 |
+
value: list.id,
|
72 |
+
}));
|
73 |
+
}
|
74 |
return {
|
75 |
customLists,
|
76 |
loading,
|
78 |
};
|
79 |
};
|
80 |
|
81 |
+
const useIsCreativeMailActivated = () => {
|
82 |
+
const { data, loading, hasLoaded } = useWPAction(
|
83 |
+
"ce4wp_creative_email_activated",
|
84 |
+
ce4wp_form_submit_data?.activatedNonce
|
85 |
+
);
|
86 |
+
return {
|
87 |
+
creativeEmailIsActivated: data,
|
88 |
+
loading,
|
89 |
+
hasLoaded,
|
90 |
+
};
|
91 |
+
};
|
92 |
+
|
93 |
export default function Edit({
|
94 |
attributes,
|
95 |
setAttributes,
|
100 |
if (!blockId) {
|
101 |
setAttributes({ blockId: clientId });
|
102 |
}
|
103 |
+
const { customLists } = useCustomLists();
|
104 |
+
const { creativeEmailIsActivated } = useIsCreativeMailActivated();
|
105 |
return (
|
106 |
+
<div className={`wp-block-ce4wp-subscribe ${className ? className : ""}`}>
|
107 |
<BlockControls key="setting">
|
108 |
<InspectorControls key="setting">
|
109 |
<Panel header="Settings">
|
159 |
<PanelBody title="On submission" initialOpen={true}>
|
160 |
<PanelRow>
|
161 |
<fieldset>
|
162 |
+
<SelectControl
|
163 |
+
label="On submission"
|
164 |
+
value={attributes.onSubmissionSetting}
|
165 |
+
options={[
|
166 |
+
{
|
167 |
+
label: "Show a custom text message",
|
168 |
+
value: ON_SUBMIT_SETTING.MESSAGE,
|
169 |
+
},
|
170 |
+
{
|
171 |
+
label: "Show a summary of submitted fields",
|
172 |
+
value: ON_SUBMIT_SETTING.SUMMARY,
|
173 |
+
},
|
174 |
+
{
|
175 |
+
label: "Redirect",
|
176 |
+
value: ON_SUBMIT_SETTING.REDIRECT,
|
177 |
+
},
|
178 |
+
]}
|
179 |
+
onChange={(onSubmissionSetting) =>
|
180 |
+
setAttributes({ onSubmissionSetting })
|
181 |
+
}
|
182 |
/>
|
183 |
</fieldset>
|
184 |
</PanelRow>
|
185 |
+
{attributes.onSubmissionSetting === ON_SUBMIT_SETTING.MESSAGE && (
|
186 |
+
<PanelRow>
|
187 |
+
<fieldset>
|
188 |
+
<TextareaControl
|
189 |
+
label="Message text"
|
190 |
+
value={attributes.onSubmission}
|
191 |
+
onChange={(onSubmission) =>
|
192 |
+
setAttributes({ onSubmission })
|
193 |
+
}
|
194 |
+
/>
|
195 |
+
</fieldset>
|
196 |
+
</PanelRow>
|
197 |
+
)}
|
198 |
+
{attributes.onSubmissionSetting === ON_SUBMIT_SETTING.REDIRECT && (
|
199 |
+
<PanelRow>
|
200 |
+
<fieldset>
|
201 |
+
<TextControl
|
202 |
+
label="Redirect link"
|
203 |
+
value={attributes.redirectLink}
|
204 |
+
onChange={(redirectLink) =>
|
205 |
+
setAttributes({ redirectLink })
|
206 |
+
}
|
207 |
+
/>
|
208 |
+
</fieldset>
|
209 |
+
</PanelRow>
|
210 |
+
)}
|
211 |
</PanelBody>
|
212 |
<PanelBody title="Disclaimer settings" initialOpen={true}>
|
213 |
<PanelRow className="no-flex">
|
337 |
}}
|
338 |
value={attributes.subTitle}
|
339 |
/>
|
340 |
+
{creativeEmailIsActivated === false && (
|
341 |
+
<div
|
342 |
+
className="ce4wp-inline-notification ce4wp-inline-warning ce4wp-banner-clickable"
|
343 |
+
onClick={() =>
|
344 |
+
ce4wpNavigateToDashboard(
|
345 |
+
this,
|
346 |
+
"d25f690a-217a-4d68-9c58-8693965d4673",
|
347 |
+
{ source: "ce4wp_form_menu" },
|
348 |
+
ce4wpDashboardStartCallback,
|
349 |
+
ce4wpDashboardFinishCallback
|
350 |
+
)
|
351 |
+
}
|
352 |
+
>
|
353 |
+
<Dashicon className="ce4wp-inline-warning-icon" icon="warning" />
|
354 |
+
<div className="ce4wp-inline-warning-text">
|
355 |
+
{__(
|
356 |
+
"Set up Creative Mail before you use this form on your website."
|
357 |
+
)}
|
358 |
+
</div>
|
359 |
+
<Dashicon
|
360 |
+
className="ce4wp-inline-warning-arrow"
|
361 |
+
icon="arrow-right-alt2"
|
362 |
+
/>
|
363 |
+
</div>
|
364 |
+
)}
|
365 |
{attributes.displayFirstName !== FIELD_SETTING.NOTSHOW && (
|
366 |
<div className="inputBlock">
|
367 |
<RichText
|
440 |
<input className="textwidget" name="email" type="text"></input>
|
441 |
</div>
|
442 |
{attributes.emailPermission == "message" && (
|
443 |
+
<div className="disclaimer">
|
444 |
+
<RichText
|
445 |
+
tagName="label"
|
446 |
+
className="disclaimer-text"
|
447 |
+
onChange={(disclaimer) => {
|
448 |
+
setAttributes({ disclaimer });
|
449 |
+
}}
|
450 |
+
value={attributes.disclaimer}
|
451 |
+
/>
|
452 |
+
</div>
|
453 |
)}
|
454 |
{attributes.emailPermission == "checkbox" && (
|
455 |
+
<div className="disclaimer">
|
456 |
<input
|
457 |
type="checkbox"
|
458 |
name={`consent_check_${clientId}`}
|
459 |
id={`consent_check_${clientId}`}
|
460 |
/>
|
461 |
+
<RichText
|
462 |
+
htmlFor={`consent_check_${clientId}`}
|
463 |
+
tagName="label"
|
464 |
+
className="consentLabel disclaimer-label"
|
465 |
+
onChange={(consentLabel) => {
|
466 |
+
setAttributes({ consentLabel });
|
467 |
+
}}
|
468 |
+
value={attributes.consentLabel}
|
469 |
+
/>
|
470 |
</div>
|
471 |
)}
|
|
|
472 |
<button className="wp-block-button__link submit-button" type="button">
|
473 |
{__("Subscribe", "cewp4")}
|
474 |
</button>
|
src/blocks/subscribe/index.js
CHANGED
@@ -2,6 +2,8 @@ import { registerBlockType } from "@wordpress/blocks";
|
|
2 |
import "./style.scss";
|
3 |
import Edit from "./edit";
|
4 |
import save from "./save";
|
|
|
|
|
5 |
|
6 |
// phpcs:disable
|
7 |
/**
|
@@ -24,4 +26,64 @@ registerBlockType("ce4wp/subscribe", {
|
|
24 |
// Remove the support for wide alignment.
|
25 |
alignWide: false,
|
26 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
});
|
2 |
import "./style.scss";
|
3 |
import Edit from "./edit";
|
4 |
import save from "./save";
|
5 |
+
import { __ } from "@wordpress/i18n";
|
6 |
+
import { deprecated_4_0 } from "./deprecated/deprecated_save";
|
7 |
|
8 |
// phpcs:disable
|
9 |
/**
|
26 |
// Remove the support for wide alignment.
|
27 |
alignWide: false,
|
28 |
},
|
29 |
+
keywords: [__("contact"), __("form"), __("email"), __("mail")],
|
30 |
+
deprecated: [
|
31 |
+
{
|
32 |
+
attributes: {
|
33 |
+
blockId: {
|
34 |
+
type: "string",
|
35 |
+
},
|
36 |
+
title: {
|
37 |
+
type: "string",
|
38 |
+
default: "Subscribe",
|
39 |
+
},
|
40 |
+
subTitle: {
|
41 |
+
type: "string",
|
42 |
+
default: "Sign up for our newsletter and stay up to date",
|
43 |
+
},
|
44 |
+
firstNameLabel: {
|
45 |
+
type: "string",
|
46 |
+
default: "First name",
|
47 |
+
},
|
48 |
+
lastNameLabel: {
|
49 |
+
type: "string",
|
50 |
+
default: "Last name",
|
51 |
+
},
|
52 |
+
emailLabel: {
|
53 |
+
type: "string",
|
54 |
+
default: "Email",
|
55 |
+
},
|
56 |
+
telephoneLabel: {
|
57 |
+
type: "string",
|
58 |
+
default: "Telephone",
|
59 |
+
},
|
60 |
+
emailPermission: {
|
61 |
+
type: "string",
|
62 |
+
default: "checkbox",
|
63 |
+
},
|
64 |
+
displayTelephone: {
|
65 |
+
type: "string",
|
66 |
+
default: "notshow",
|
67 |
+
},
|
68 |
+
displayFirstName: {
|
69 |
+
type: "string",
|
70 |
+
default: "optional",
|
71 |
+
},
|
72 |
+
displayLastName: {
|
73 |
+
type: "string",
|
74 |
+
default: "optional",
|
75 |
+
},
|
76 |
+
onSubmission: {
|
77 |
+
type: "string",
|
78 |
+
selector: "div",
|
79 |
+
default: "Thank you for subscribing!",
|
80 |
+
},
|
81 |
+
customList: {
|
82 |
+
type: "string",
|
83 |
+
default: null,
|
84 |
+
},
|
85 |
+
},
|
86 |
+
save: deprecated_4_0,
|
87 |
+
},
|
88 |
+
],
|
89 |
});
|
src/blocks/subscribe/save.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import { __ } from "@wordpress/i18n";
|
2 |
import { useBlockProps, RichText } from "@wordpress/block-editor";
|
3 |
-
import { FIELD_SETTING } from "./edit";
|
4 |
// phpcs:disable
|
5 |
/**
|
6 |
* addOnSubmit.
|
@@ -9,14 +9,65 @@ import { FIELD_SETTING } from "./edit";
|
|
9 |
*/
|
10 |
export default function save({ attributes, className }) {
|
11 |
return (
|
12 |
-
<div className={`wp-block-ce4wp-subscribe ${className ? className :
|
13 |
-
<div className="onSubmission" style={{ display:
|
14 |
-
<
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
18 |
/>
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
</div>
|
21 |
<form className="cm-contact-form" name="contact-form">
|
22 |
<input
|
@@ -75,7 +126,7 @@ export default function save({ attributes, className }) {
|
|
75 |
className="lastName"
|
76 |
name="last_name"
|
77 |
type="text"
|
78 |
-
required={attributes.
|
79 |
></input>
|
80 |
</div>
|
81 |
)}
|
@@ -98,9 +149,12 @@ export default function save({ attributes, className }) {
|
|
98 |
name="telephone"
|
99 |
type="tel"
|
100 |
pattern="[+]?[0-9\(\)\s+-]{5,20}"
|
101 |
-
oninvalid={`setCustomValidity('${__(
|
|
|
|
|
|
|
102 |
oninput="setCustomValidity('')"
|
103 |
-
required={attributes.
|
104 |
></input>
|
105 |
</div>
|
106 |
)}
|
@@ -111,45 +165,45 @@ export default function save({ attributes, className }) {
|
|
111 |
style={{ color: "#ee0000" }}
|
112 |
>
|
113 |
*
|
114 |
-
|
115 |
<input
|
116 |
className="email"
|
117 |
name="email"
|
118 |
type="email"
|
119 |
-
oninvalid={`setCustomValidity('${__(
|
|
|
|
|
|
|
120 |
oninput="setCustomValidity('')"
|
121 |
required
|
122 |
></input>
|
123 |
</div>
|
124 |
{attributes.emailPermission == "message" && (
|
125 |
-
<
|
126 |
<input
|
127 |
className="consent_check"
|
128 |
name="consent"
|
129 |
type="hidden"
|
130 |
checked
|
131 |
></input>
|
132 |
-
{
|
133 |
-
|
134 |
-
"cewp4"
|
135 |
-
)}
|
136 |
-
</span>
|
137 |
)}
|
138 |
{attributes.emailPermission == "checkbox" && (
|
139 |
-
<
|
140 |
<input
|
141 |
className="consent_check"
|
142 |
name={`consent_check_${attributes.blockId}`}
|
143 |
id={`consent_check_${attributes.blockId}`}
|
144 |
type="checkbox"
|
145 |
/>
|
146 |
-
<
|
147 |
htmlFor={`consent_check_${attributes.blockId}`}
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
</
|
153 |
)}
|
154 |
<button className="wp-block-button__link submit-button" type="submit">
|
155 |
{__("Subscribe", "cewp4")}
|
1 |
import { __ } from "@wordpress/i18n";
|
2 |
import { useBlockProps, RichText } from "@wordpress/block-editor";
|
3 |
+
import { FIELD_SETTING, ON_SUBMIT_SETTING } from "./edit";
|
4 |
// phpcs:disable
|
5 |
/**
|
6 |
* addOnSubmit.
|
9 |
*/
|
10 |
export default function save({ attributes, className }) {
|
11 |
return (
|
12 |
+
<div className={`wp-block-ce4wp-subscribe ${className ? className : ""}`}>
|
13 |
+
<div className="onSubmission" style={{ display: "none" }}>
|
14 |
+
<input
|
15 |
+
className="onSubmissionSetting"
|
16 |
+
name="onSubmissionSetting"
|
17 |
+
type="hidden"
|
18 |
+
value={attributes.onSubmissionSetting}
|
19 |
/>
|
20 |
+
{attributes.onSubmissionSetting !== ON_SUBMIT_SETTING.MESSAGE && (
|
21 |
+
<div>
|
22 |
+
<RichText.Content
|
23 |
+
className="title"
|
24 |
+
tagName="h2"
|
25 |
+
value={attributes.title}
|
26 |
+
/>
|
27 |
+
</div>
|
28 |
+
)}
|
29 |
+
{attributes.onSubmissionSetting === ON_SUBMIT_SETTING.MESSAGE && (
|
30 |
+
<div>
|
31 |
+
<RichText.Content
|
32 |
+
className="title"
|
33 |
+
tagName="h2"
|
34 |
+
value={attributes.title}
|
35 |
+
/>
|
36 |
+
<p className="subTitle">{__(attributes.onSubmission, "cewp4")}</p>
|
37 |
+
</div>
|
38 |
+
)}
|
39 |
+
{attributes.onSubmissionSetting === ON_SUBMIT_SETTING.SUMMARY && (
|
40 |
+
<div>
|
41 |
+
<h3>You have subscribed</h3>
|
42 |
+
<br />
|
43 |
+
{(attributes.displayFirstName !== FIELD_SETTING.NOTSHOW ||
|
44 |
+
attributes.displayLastName !== FIELD_SETTING.NOTSHOW) && (
|
45 |
+
<p>
|
46 |
+
<span>Name: </span>
|
47 |
+
<span className="firstNameSummary"></span>
|
48 |
+
<span className="lastNameSummary"></span>
|
49 |
+
</p>
|
50 |
+
)}
|
51 |
+
{attributes.displayTelephone !== FIELD_SETTING.NOTSHOW && (
|
52 |
+
<p>
|
53 |
+
<span>Telephone: </span>
|
54 |
+
<span className="telephoneSummary"></span>
|
55 |
+
</p>
|
56 |
+
)}
|
57 |
+
<p>
|
58 |
+
<span>Email: </span>
|
59 |
+
<span className="emailSummary"></span>
|
60 |
+
</p>
|
61 |
+
</div>
|
62 |
+
)}
|
63 |
+
{attributes.onSubmissionSetting === ON_SUBMIT_SETTING.REDIRECT && (
|
64 |
+
<input
|
65 |
+
className="redirect"
|
66 |
+
name="redirect"
|
67 |
+
type="hidden"
|
68 |
+
value={attributes.redirectLink}
|
69 |
+
/>
|
70 |
+
)}
|
71 |
</div>
|
72 |
<form className="cm-contact-form" name="contact-form">
|
73 |
<input
|
126 |
className="lastName"
|
127 |
name="last_name"
|
128 |
type="text"
|
129 |
+
required={attributes.displayLastName === FIELD_SETTING.REQUIRED}
|
130 |
></input>
|
131 |
</div>
|
132 |
)}
|
149 |
name="telephone"
|
150 |
type="tel"
|
151 |
pattern="[+]?[0-9\(\)\s+-]{5,20}"
|
152 |
+
oninvalid={`setCustomValidity('${__(
|
153 |
+
"Please enter a valid phone number",
|
154 |
+
"cewp4"
|
155 |
+
)}')`}
|
156 |
oninput="setCustomValidity('')"
|
157 |
+
required={attributes.displayTelephone === FIELD_SETTING.REQUIRED}
|
158 |
></input>
|
159 |
</div>
|
160 |
)}
|
165 |
style={{ color: "#ee0000" }}
|
166 |
>
|
167 |
*
|
168 |
+
</span>
|
169 |
<input
|
170 |
className="email"
|
171 |
name="email"
|
172 |
type="email"
|
173 |
+
oninvalid={`setCustomValidity('${__(
|
174 |
+
"Please enter a valid email address",
|
175 |
+
"cewp4"
|
176 |
+
)}')`}
|
177 |
oninput="setCustomValidity('')"
|
178 |
required
|
179 |
></input>
|
180 |
</div>
|
181 |
{attributes.emailPermission == "message" && (
|
182 |
+
<div className="disclaimer">
|
183 |
<input
|
184 |
className="consent_check"
|
185 |
name="consent"
|
186 |
type="hidden"
|
187 |
checked
|
188 |
></input>
|
189 |
+
<RichText.Content tagName="label" value={attributes.disclaimer} />
|
190 |
+
</div>
|
|
|
|
|
|
|
191 |
)}
|
192 |
{attributes.emailPermission == "checkbox" && (
|
193 |
+
<div className="disclaimer">
|
194 |
<input
|
195 |
className="consent_check"
|
196 |
name={`consent_check_${attributes.blockId}`}
|
197 |
id={`consent_check_${attributes.blockId}`}
|
198 |
type="checkbox"
|
199 |
/>
|
200 |
+
<RichText.Content
|
201 |
htmlFor={`consent_check_${attributes.blockId}`}
|
202 |
+
tagName="label"
|
203 |
+
value={attributes.consentLabel}
|
204 |
+
className="disclaimer-label"
|
205 |
+
/>
|
206 |
+
</div>
|
207 |
)}
|
208 |
<button className="wp-block-button__link submit-button" type="submit">
|
209 |
{__("Subscribe", "cewp4")}
|
src/blocks/subscribe/style.scss
CHANGED
@@ -26,7 +26,7 @@
|
|
26 |
}
|
27 |
}
|
28 |
.submit-button {
|
29 |
-
margin-top:
|
30 |
display: block;
|
31 |
}
|
32 |
.required-text {
|
@@ -40,6 +40,57 @@
|
|
40 |
max-width: 840px;
|
41 |
margin: 0 auto;
|
42 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
}
|
44 |
|
45 |
.ce4wp-link {
|
26 |
}
|
27 |
}
|
28 |
.submit-button {
|
29 |
+
margin-top: 25px;
|
30 |
display: block;
|
31 |
}
|
32 |
.required-text {
|
40 |
max-width: 840px;
|
41 |
margin: 0 auto;
|
42 |
}
|
43 |
+
.firstNameSummary .lastNameSummary {
|
44 |
+
text-transform: capitalize;
|
45 |
+
}
|
46 |
+
.ce4wp-inline-notification {
|
47 |
+
display: flex;
|
48 |
+
flex-direction: row;
|
49 |
+
align-items: center;
|
50 |
+
padding: 13px 10px;
|
51 |
+
width: 100%;
|
52 |
+
height: 40px;
|
53 |
+
|
54 |
+
border-style: solid;
|
55 |
+
border-color: orange;
|
56 |
+
border-width: 1px;
|
57 |
+
border-left-width: 4px;
|
58 |
+
border-radius: 3px;
|
59 |
+
|
60 |
+
/* Orange/ Background */
|
61 |
+
background: rgba(255, 133, 15, 0.1);
|
62 |
+
/* Inside Auto Layout */
|
63 |
+
flex: none;
|
64 |
+
order: 0;
|
65 |
+
flex-grow: 1;
|
66 |
+
margin: 0px 0px;
|
67 |
+
}
|
68 |
+
.ce4wp-inline-warning-text {
|
69 |
+
/* Body / Body 2 */
|
70 |
+
font-style: normal;
|
71 |
+
font-weight: normal;
|
72 |
+
font-size: 16px;
|
73 |
+
line-height: 20px;
|
74 |
+
/* identical to box height, or 143% */
|
75 |
+
|
76 |
+
display: flex;
|
77 |
+
align-items: center;
|
78 |
+
|
79 |
+
/* Orange / Text */
|
80 |
+
|
81 |
+
color: #571600;
|
82 |
+
margin-left: 9px;
|
83 |
+
}
|
84 |
+
.ce4wp-inline-warning-icon {
|
85 |
+
color: orange;
|
86 |
+
}
|
87 |
+
.ce4wp-inline-warning-arrow {
|
88 |
+
color: #571600;
|
89 |
+
margin-left: auto;
|
90 |
+
}
|
91 |
+
.ce4wp-banner-clickable {
|
92 |
+
cursor: pointer;
|
93 |
+
}
|
94 |
}
|
95 |
|
96 |
.ce4wp-link {
|
src/views/activated-integrations.php
CHANGED
@@ -46,6 +46,9 @@ $activated_integrations = CreativeMail::get_instance()->get_integration_manager(
|
|
46 |
<div style="color: rgba(0, 0, 0, 0.6);" class="ce4wp-grid">
|
47 |
<?php
|
48 |
foreach ($available_integrations as $available_integration) {
|
|
|
|
|
|
|
49 |
$active = in_array($available_integration, $activated_integrations);
|
50 |
$checked = $active === true ? 'checked' : '';
|
51 |
$path = '/assets/p/universal/wordpress-plugin/'.$available_integration->get_slug() .'.png';
|
46 |
<div style="color: rgba(0, 0, 0, 0.6);" class="ce4wp-grid">
|
47 |
<?php
|
48 |
foreach ($available_integrations as $available_integration) {
|
49 |
+
if ($available_integration->is_hidden_from_suggestions()) {
|
50 |
+
continue;
|
51 |
+
}
|
52 |
$active = in_array($available_integration, $activated_integrations);
|
53 |
$checked = $active === true ? 'checked' : '';
|
54 |
$path = '/assets/p/universal/wordpress-plugin/'.$available_integration->get_slug() .'.png';
|
src/views/contact-sync.php
CHANGED
@@ -3,7 +3,10 @@ use CreativeMail\CreativeMail;
|
|
3 |
use CreativeMail\Helpers\EnvironmentHelper;
|
4 |
use CreativeMail\Helpers\OptionsHelper;
|
5 |
|
6 |
-
$
|
|
|
|
|
|
|
7 |
$supported_plugin_available = !empty(CreativeMail::get_instance()->get_integration_manager()->get_supported_integrations(true))
|
8 |
?>
|
9 |
|
@@ -17,6 +20,7 @@ use CreativeMail\Helpers\OptionsHelper;
|
|
17 |
if($supported_plugin_available){
|
18 |
include 'available-integrations.php';
|
19 |
}
|
|
|
20 |
?>
|
21 |
</div>
|
22 |
</div>
|
3 |
use CreativeMail\Helpers\EnvironmentHelper;
|
4 |
use CreativeMail\Helpers\OptionsHelper;
|
5 |
|
6 |
+
$activated_plugins = CreativeMail::get_instance()->get_integration_manager()->get_active_plugins();
|
7 |
+
$contact_sync_available = !empty(array_filter($activated_plugins, function ($item) {
|
8 |
+
return !$item->is_hidden_from_suggestions();
|
9 |
+
}));
|
10 |
$supported_plugin_available = !empty(CreativeMail::get_instance()->get_integration_manager()->get_supported_integrations(true))
|
11 |
?>
|
12 |
|
20 |
if($supported_plugin_available){
|
21 |
include 'available-integrations.php';
|
22 |
}
|
23 |
+
include 'creative-mail-form-banner.php'
|
24 |
?>
|
25 |
</div>
|
26 |
</div>
|
src/views/creative-mail-form-banner.php
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script type="application/javascript">
|
2 |
+
function ce4wpShowPluginModal() {
|
3 |
+
document.getElementById('ce4wp-show-me-how-modal').style.display = "block";
|
4 |
+
}
|
5 |
+
|
6 |
+
function ce4wpClosePluginModal() {
|
7 |
+
document.getElementById('ce4wp-show-me-how-modal').style.display = "none";
|
8 |
+
}
|
9 |
+
</script>
|
10 |
+
<div class="ce4wp-banner">
|
11 |
+
<div class="ce4wp-banner-image">
|
12 |
+
<img src="<?php echo CE4WP_PLUGIN_URL . 'assets/images/banner-image_collect.svg'; ?>" alt="Creative mail form is here">
|
13 |
+
</div>
|
14 |
+
<div class="ce4wp-content">
|
15 |
+
<h2><?= __( 'The Creative Mail form is here!', 'ce4wp' ); ?></h2>
|
16 |
+
<p class="ce4wp-typography-body">
|
17 |
+
<?= __( 'Contacts that sign up can now be assigned to a contact list automatically. Add the Creative Mail block anywhere on your site.', 'ce4wp' ); ?>
|
18 |
+
<a class="ce4wp_bold_link" onclick="ce4wpShowPluginModal()">
|
19 |
+
<?= __( 'Show me how!', 'ce4wp' ); ?>
|
20 |
+
</a>
|
21 |
+
</p>
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
<!-- show me how modal -->
|
25 |
+
<div id="ce4wp-show-me-how-modal" role="presentation" class="ce4wp-dialog-root ce4wp-show-me-how-modal" height="auto" variant="default"
|
26 |
+
style="display: none;">
|
27 |
+
<div class="ce4wp-backdrop-root" aria-hidden="true" style="opacity: 1; "></div>
|
28 |
+
|
29 |
+
<div class="ce4wp-dialog-container" role="none presentation" tabindex="-1"
|
30 |
+
style="opacity: 1; ">
|
31 |
+
|
32 |
+
<div class="ce4wp-dialog-wrapper" style="max-width: 700px" role="dialog">
|
33 |
+
<div width="100%" class="ce4wp-dialog-header ce4wp-show-me-how-header" style='background-image: url("<?php echo CE4WP_PLUGIN_URL . 'assets/images/post-boxes.svg'; ?>")'>
|
34 |
+
<div class="ce4wp-dialog-header-close">
|
35 |
+
<div class="ce4wp-dialog-header-close-wrapper" onclick="ce4wpClosePluginModal()">
|
36 |
+
<div class="ce4wp-dialog-header-close-wrapper-button">
|
37 |
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="black"
|
38 |
+
xmlns="http://www.w3.org/2000/svg">
|
39 |
+
<path
|
40 |
+
d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
|
41 |
+
</svg>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
<div height="auto" class="ce4wp-dialog-content">
|
47 |
+
<div class="ce4wp-d-flex ">
|
48 |
+
<div>
|
49 |
+
<img class="ce4wp-show-me-how-screenshot" src="<?php echo CE4WP_PLUGIN_URL . 'assets/images/screenshot-creative-mail-form.png'; ?>" alt="Creative Mail screenshot">
|
50 |
+
</div>
|
51 |
+
<div class="ce4wp-ml-6">
|
52 |
+
<p class="ce4wp-typography-body">
|
53 |
+
<?= __( 'Adding a subscription form to your WordPress site is easy. Actually we’ve already prepared a form for you.', 'ce4wp' ); ?>
|
54 |
+
</p>
|
55 |
+
</br>
|
56 |
+
<p class="ce4wp-typography-body">
|
57 |
+
<?= __( 'Just go to any page on your site in the WordPress editor and click the “Add block” button. Select the
|
58 |
+
Creative Mail contact form from the block recipes and you’re set.', 'ce4wp' ); ?>
|
59 |
+
</p>
|
60 |
+
</br>
|
61 |
+
<p class="ce4wp-typography-body">
|
62 |
+
<?= __( 'It’s that easy.', 'ce4wp' ); ?>
|
63 |
+
</p>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
</div>
|
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 ComposerAutoloaderInita6d0a402c6c28219ed112f975dab5938::getLoader();
|
vendor/composer/autoload_classmap.php
CHANGED
@@ -7,59 +7,59 @@ $baseDir = dirname($vendorDir);
|
|
7 |
|
8 |
return array(
|
9 |
'CreativeMail\\Blocks\\LoadBlock' => $baseDir . '/src/blocks/LoadBlock.php',
|
10 |
-
'CreativeMail\\Clients\\CreativeMailClient' => $baseDir . '/src/
|
11 |
-
'CreativeMail\\Constants\\EnvironmentNames' => $baseDir . '/src/
|
12 |
'CreativeMail\\CreativeMail' => $baseDir . '/src/CreativeMail.php',
|
13 |
-
'CreativeMail\\Exceptions\\CreativeMailException' => $baseDir . '/src/
|
14 |
-
'CreativeMail\\Helpers\\EncryptionHelper' => $baseDir . '/src/
|
15 |
-
'CreativeMail\\Helpers\\EnvironmentHelper' => $baseDir . '/src/
|
16 |
-
'CreativeMail\\Helpers\\GuidHelper' => $baseDir . '/src/
|
17 |
-
'CreativeMail\\Helpers\\OptionsHelper' => $baseDir . '/src/
|
18 |
-
'CreativeMail\\Helpers\\SsoHelper' => $baseDir . '/src/
|
19 |
-
'CreativeMail\\Helpers\\ValidationHelper' => $baseDir . '/src/
|
20 |
-
'CreativeMail\\Integrations\\Integration' => $baseDir . '/src/
|
21 |
-
'CreativeMail\\Managers\\AdminManager' => $baseDir . '/src/
|
22 |
-
'CreativeMail\\Managers\\ApiManager' => $baseDir . '/src/
|
23 |
-
'CreativeMail\\Managers\\CheckoutManager' => $baseDir . '/src/
|
24 |
-
'CreativeMail\\Managers\\DatabaseManager' => $baseDir . '/src/
|
25 |
-
'CreativeMail\\Managers\\EmailManager' => $baseDir . '/src/
|
26 |
-
'CreativeMail\\Managers\\FormManager' => $baseDir . '/src/
|
27 |
-
'CreativeMail\\Managers\\InstanceManager' => $baseDir . '/src/
|
28 |
-
'CreativeMail\\Managers\\IntegrationManager' => $baseDir . '/src/
|
29 |
-
'CreativeMail\\Managers\\RaygunManager' => $baseDir . '/src/
|
30 |
-
'CreativeMail\\Modules\\Api\\Models\\ApiRequestItem' => $baseDir . '/src/
|
31 |
-
'CreativeMail\\Modules\\Api\\Processes\\ApiBackgroundProcess' => $baseDir . '/src/
|
32 |
-
'CreativeMail\\Modules\\Blog\\Models\\BlogAttachment' => $baseDir . '/src/
|
33 |
-
'CreativeMail\\Modules\\Blog\\Models\\BlogInformation' => $baseDir . '/src/
|
34 |
-
'CreativeMail\\Modules\\Blog\\Models\\BlogPost' => $baseDir . '/src/
|
35 |
-
'CreativeMail\\Modules\\Contacts\\
|
36 |
-
'CreativeMail\\Modules\\Contacts\\
|
37 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
38 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
39 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
40 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
41 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
42 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
43 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
44 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
45 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
46 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
47 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
48 |
-
'CreativeMail\\Modules\\Contacts\\
|
49 |
-
'CreativeMail\\Modules\\Contacts\\
|
50 |
-
'CreativeMail\\Modules\\Contacts\\
|
51 |
-
'CreativeMail\\Modules\\Contacts\\Models\\
|
52 |
-
'CreativeMail\\Modules\\Contacts\\Models\\
|
53 |
-
'CreativeMail\\Modules\\Contacts\\
|
54 |
-
'CreativeMail\\Modules\\Contacts\\
|
55 |
-
'CreativeMail\\Modules\\
|
56 |
-
'CreativeMail\\Modules\\
|
57 |
-
'CreativeMail\\Modules\\
|
58 |
-
'CreativeMail\\Modules\\
|
59 |
-
'CreativeMail\\Modules\\WooCommerce\\
|
60 |
-
'CreativeMail\\Modules\\
|
61 |
-
'CreativeMail\\Modules\\
|
62 |
-
'CreativeMail\\Modules\\
|
63 |
'Defuse\\Crypto\\Core' => $vendorDir . '/defuse/php-encryption/src/Core.php',
|
64 |
'Defuse\\Crypto\\Crypto' => $vendorDir . '/defuse/php-encryption/src/Crypto.php',
|
65 |
'Defuse\\Crypto\\DerivedKeys' => $vendorDir . '/defuse/php-encryption/src/DerivedKeys.php',
|
7 |
|
8 |
return array(
|
9 |
'CreativeMail\\Blocks\\LoadBlock' => $baseDir . '/src/blocks/LoadBlock.php',
|
10 |
+
'CreativeMail\\Clients\\CreativeMailClient' => $baseDir . '/src/Clients/CreativeMailClient.php',
|
11 |
+
'CreativeMail\\Constants\\EnvironmentNames' => $baseDir . '/src/Constants/EnvironmentNames.php',
|
12 |
'CreativeMail\\CreativeMail' => $baseDir . '/src/CreativeMail.php',
|
13 |
+
'CreativeMail\\Exceptions\\CreativeMailException' => $baseDir . '/src/Exceptions/CreativeMailException.php',
|
14 |
+
'CreativeMail\\Helpers\\EncryptionHelper' => $baseDir . '/src/Helpers/EncryptionHelper.php',
|
15 |
+
'CreativeMail\\Helpers\\EnvironmentHelper' => $baseDir . '/src/Helpers/EnvironmentHelper.php',
|
16 |
+
'CreativeMail\\Helpers\\GuidHelper' => $baseDir . '/src/Helpers/GuidHelper.php',
|
17 |
+
'CreativeMail\\Helpers\\OptionsHelper' => $baseDir . '/src/Helpers/OptionsHelper.php',
|
18 |
+
'CreativeMail\\Helpers\\SsoHelper' => $baseDir . '/src/Helpers/SsoHelper.php',
|
19 |
+
'CreativeMail\\Helpers\\ValidationHelper' => $baseDir . '/src/Helpers/ValidationHelper.php',
|
20 |
+
'CreativeMail\\Integrations\\Integration' => $baseDir . '/src/Integrations/Integration.php',
|
21 |
+
'CreativeMail\\Managers\\AdminManager' => $baseDir . '/src/Managers/AdminManager.php',
|
22 |
+
'CreativeMail\\Managers\\ApiManager' => $baseDir . '/src/Managers/ApiManager.php',
|
23 |
+
'CreativeMail\\Managers\\CheckoutManager' => $baseDir . '/src/Managers/CheckoutManager.php',
|
24 |
+
'CreativeMail\\Managers\\DatabaseManager' => $baseDir . '/src/Managers/DatabaseManager.php',
|
25 |
+
'CreativeMail\\Managers\\EmailManager' => $baseDir . '/src/Managers/EmailManager.php',
|
26 |
+
'CreativeMail\\Managers\\FormManager' => $baseDir . '/src/Managers/FormManager.php',
|
27 |
+
'CreativeMail\\Managers\\InstanceManager' => $baseDir . '/src/Managers/InstanceManager.php',
|
28 |
+
'CreativeMail\\Managers\\IntegrationManager' => $baseDir . '/src/Managers/IntegrationManager.php',
|
29 |
+
'CreativeMail\\Managers\\RaygunManager' => $baseDir . '/src/Managers/RaygunManager.php',
|
30 |
+
'CreativeMail\\Modules\\Api\\Models\\ApiRequestItem' => $baseDir . '/src/Modules/Api/Models/ApiRequestItem.php',
|
31 |
+
'CreativeMail\\Modules\\Api\\Processes\\ApiBackgroundProcess' => $baseDir . '/src/Modules/Api/Processes/ApiBackgroundProcess.php',
|
32 |
+
'CreativeMail\\Modules\\Blog\\Models\\BlogAttachment' => $baseDir . '/src/Modules/Blog/Models/BlogAttachment.php',
|
33 |
+
'CreativeMail\\Modules\\Blog\\Models\\BlogInformation' => $baseDir . '/src/Modules/Blog/Models/BlogInformation.php',
|
34 |
+
'CreativeMail\\Modules\\Blog\\Models\\BlogPost' => $baseDir . '/src/Modules/Blog/Models/BlogPost.php',
|
35 |
+
'CreativeMail\\Modules\\Contacts\\Exceptions\\InvalidContactSyncBackgroundRequestException' => $baseDir . '/src/Modules/Contacts/Exceptions/InvalidContactSyncBackgroundRequestException.php',
|
36 |
+
'CreativeMail\\Modules\\Contacts\\Exceptions\\InvalidHandlerContactSyncRequestException' => $baseDir . '/src/Modules/Contacts/Exceptions/InvalidHandlerContactSyncRequestException.php',
|
37 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\BaseContactFormPluginHandler' => $baseDir . '/src/Modules/Contacts/Handlers/BaseContactFormPluginHandler.php',
|
38 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\BlueHostBuilderPluginHandler' => $baseDir . '/src/Modules/Contacts/Handlers/BlueHostBuilderPluginHandler.php',
|
39 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\CalderaPluginHandler' => $baseDir . '/src/Modules/Contacts/Handlers/CalderaPluginHandler.php',
|
40 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\ContactFormSevenPluginHandler' => $baseDir . '/src/Modules/Contacts/Handlers/ContactFormSevenPluginHandler.php',
|
41 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\CreativeMailPluginHandler' => $baseDir . '/src/Modules/Contacts/Handlers/CreativeMailPluginHandler.php',
|
42 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\ElementorPluginHandler' => $baseDir . '/src/Modules/Contacts/Handlers/ElementorPluginHandler.php',
|
43 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\FormidablePluginHandler' => $baseDir . '/src/Modules/Contacts/Handlers/FormidablePluginHandler.php',
|
44 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\GravityFormsPluginHandler' => $baseDir . '/src/Modules/Contacts/Handlers/GravityFormsPluginHandler.php',
|
45 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\JetpackPluginHandler' => $baseDir . '/src/Modules/Contacts/Handlers/JetpackPluginHandler.php',
|
46 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\NewsLetterContactFormPluginHandler' => $baseDir . '/src/Modules/Contacts/Handlers/NewsLetterContactFormPluginHandler.php',
|
47 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\NinjaFormsPluginHandler' => $baseDir . '/src/Modules/Contacts/Handlers/NinjaFormsPluginHandler.php',
|
48 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\WooCommercePluginHandler' => $baseDir . '/src/Modules/Contacts/Handlers/WooCommercePluginHandler.php',
|
49 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\WpFormsPluginHandler' => $baseDir . '/src/Modules/Contacts/Handlers/WpFormsPluginHandler.php',
|
50 |
+
'CreativeMail\\Modules\\Contacts\\Managers\\ContactsSyncManager' => $baseDir . '/src/Modules/Contacts/Managers/ContactsSyncManager.php',
|
51 |
+
'CreativeMail\\Modules\\Contacts\\Models\\ContactAddressModel' => $baseDir . '/src/Modules/Contacts/Models/ContactAddressModel.php',
|
52 |
+
'CreativeMail\\Modules\\Contacts\\Models\\ContactFormSevenSubmission' => $baseDir . '/src/Modules/Contacts/Models/ContactFormSevenSubmission.php',
|
53 |
+
'CreativeMail\\Modules\\Contacts\\Models\\ContactModel' => $baseDir . '/src/Modules/Contacts/Models/ContactModel.php',
|
54 |
+
'CreativeMail\\Modules\\Contacts\\Models\\OptActionBy' => $baseDir . '/src/Modules/Contacts/Models/OptActionBy.php',
|
55 |
+
'CreativeMail\\Modules\\Contacts\\Processors\\ContactsSyncBackgroundProcessor' => $baseDir . '/src/Modules/Contacts/Processors/ContactsSyncBackgroundProcessor.php',
|
56 |
+
'CreativeMail\\Modules\\Contacts\\Services\\ContactsSyncService' => $baseDir . '/src/Modules/Contacts/Services/ContactsSyncService.php',
|
57 |
+
'CreativeMail\\Modules\\DashboardWidgetModule' => $baseDir . '/src/Modules/DashboardWidgetModule.php',
|
58 |
+
'CreativeMail\\Modules\\FeedbackNoticeModule' => $baseDir . '/src/Modules/FeedbackNoticeModule.php',
|
59 |
+
'CreativeMail\\Modules\\WooCommerce\\Emails\\AbandonedCartEmail' => $baseDir . '/src/Modules/WooCommerce/Emails/AbandonedCartEmail.php',
|
60 |
+
'CreativeMail\\Modules\\WooCommerce\\Models\\WCInformationModel' => $baseDir . '/src/Modules/WooCommerce/Models/WCInformationModel.php',
|
61 |
+
'CreativeMail\\Modules\\WooCommerce\\Models\\WCProductModel' => $baseDir . '/src/Modules/WooCommerce/Models/WCProductModel.php',
|
62 |
+
'CreativeMail\\Modules\\WooCommerce\\Models\\WCStoreInformation' => $baseDir . '/src/Modules/WooCommerce/Models/WCStoreInformation.php',
|
63 |
'Defuse\\Crypto\\Core' => $vendorDir . '/defuse/php-encryption/src/Core.php',
|
64 |
'Defuse\\Crypto\\Crypto' => $vendorDir . '/defuse/php-encryption/src/Crypto.php',
|
65 |
'Defuse\\Crypto\\DerivedKeys' => $vendorDir . '/defuse/php-encryption/src/DerivedKeys.php',
|
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 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit2db489663291a087b9625ad29c014f02
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
-
spl_autoload_unregister(array('
|
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\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInita6d0a402c6c28219ed112f975dab5938
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInita6d0a402c6c28219ed112f975dab5938', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInita6d0a402c6c28219ed112f975dab5938', '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\ComposerStaticInita6d0a402c6c28219ed112f975dab5938::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'F' =>
|
@@ -78,59 +78,59 @@ class ComposerStaticInit2db489663291a087b9625ad29c014f02
|
|
78 |
|
79 |
public static $classMap = array (
|
80 |
'CreativeMail\\Blocks\\LoadBlock' => __DIR__ . '/../..' . '/src/blocks/LoadBlock.php',
|
81 |
-
'CreativeMail\\Clients\\CreativeMailClient' => __DIR__ . '/../..' . '/src/
|
82 |
-
'CreativeMail\\Constants\\EnvironmentNames' => __DIR__ . '/../..' . '/src/
|
83 |
'CreativeMail\\CreativeMail' => __DIR__ . '/../..' . '/src/CreativeMail.php',
|
84 |
-
'CreativeMail\\Exceptions\\CreativeMailException' => __DIR__ . '/../..' . '/src/
|
85 |
-
'CreativeMail\\Helpers\\EncryptionHelper' => __DIR__ . '/../..' . '/src/
|
86 |
-
'CreativeMail\\Helpers\\EnvironmentHelper' => __DIR__ . '/../..' . '/src/
|
87 |
-
'CreativeMail\\Helpers\\GuidHelper' => __DIR__ . '/../..' . '/src/
|
88 |
-
'CreativeMail\\Helpers\\OptionsHelper' => __DIR__ . '/../..' . '/src/
|
89 |
-
'CreativeMail\\Helpers\\SsoHelper' => __DIR__ . '/../..' . '/src/
|
90 |
-
'CreativeMail\\Helpers\\ValidationHelper' => __DIR__ . '/../..' . '/src/
|
91 |
-
'CreativeMail\\Integrations\\Integration' => __DIR__ . '/../..' . '/src/
|
92 |
-
'CreativeMail\\Managers\\AdminManager' => __DIR__ . '/../..' . '/src/
|
93 |
-
'CreativeMail\\Managers\\ApiManager' => __DIR__ . '/../..' . '/src/
|
94 |
-
'CreativeMail\\Managers\\CheckoutManager' => __DIR__ . '/../..' . '/src/
|
95 |
-
'CreativeMail\\Managers\\DatabaseManager' => __DIR__ . '/../..' . '/src/
|
96 |
-
'CreativeMail\\Managers\\EmailManager' => __DIR__ . '/../..' . '/src/
|
97 |
-
'CreativeMail\\Managers\\FormManager' => __DIR__ . '/../..' . '/src/
|
98 |
-
'CreativeMail\\Managers\\InstanceManager' => __DIR__ . '/../..' . '/src/
|
99 |
-
'CreativeMail\\Managers\\IntegrationManager' => __DIR__ . '/../..' . '/src/
|
100 |
-
'CreativeMail\\Managers\\RaygunManager' => __DIR__ . '/../..' . '/src/
|
101 |
-
'CreativeMail\\Modules\\Api\\Models\\ApiRequestItem' => __DIR__ . '/../..' . '/src/
|
102 |
-
'CreativeMail\\Modules\\Api\\Processes\\ApiBackgroundProcess' => __DIR__ . '/../..' . '/src/
|
103 |
-
'CreativeMail\\Modules\\Blog\\Models\\BlogAttachment' => __DIR__ . '/../..' . '/src/
|
104 |
-
'CreativeMail\\Modules\\Blog\\Models\\BlogInformation' => __DIR__ . '/../..' . '/src/
|
105 |
-
'CreativeMail\\Modules\\Blog\\Models\\BlogPost' => __DIR__ . '/../..' . '/src/
|
106 |
-
'CreativeMail\\Modules\\Contacts\\
|
107 |
-
'CreativeMail\\Modules\\Contacts\\
|
108 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
109 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
110 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
111 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
112 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
113 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
114 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
115 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
116 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
117 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
118 |
-
'CreativeMail\\Modules\\Contacts\\Handlers\\
|
119 |
-
'CreativeMail\\Modules\\Contacts\\
|
120 |
-
'CreativeMail\\Modules\\Contacts\\
|
121 |
-
'CreativeMail\\Modules\\Contacts\\
|
122 |
-
'CreativeMail\\Modules\\Contacts\\Models\\
|
123 |
-
'CreativeMail\\Modules\\Contacts\\Models\\
|
124 |
-
'CreativeMail\\Modules\\Contacts\\
|
125 |
-
'CreativeMail\\Modules\\Contacts\\
|
126 |
-
'CreativeMail\\Modules\\
|
127 |
-
'CreativeMail\\Modules\\
|
128 |
-
'CreativeMail\\Modules\\
|
129 |
-
'CreativeMail\\Modules\\
|
130 |
-
'CreativeMail\\Modules\\WooCommerce\\
|
131 |
-
'CreativeMail\\Modules\\
|
132 |
-
'CreativeMail\\Modules\\
|
133 |
-
'CreativeMail\\Modules\\
|
134 |
'Defuse\\Crypto\\Core' => __DIR__ . '/..' . '/defuse/php-encryption/src/Core.php',
|
135 |
'Defuse\\Crypto\\Crypto' => __DIR__ . '/..' . '/defuse/php-encryption/src/Crypto.php',
|
136 |
'Defuse\\Crypto\\DerivedKeys' => __DIR__ . '/..' . '/defuse/php-encryption/src/DerivedKeys.php',
|
@@ -167,10 +167,10 @@ class ComposerStaticInit2db489663291a087b9625ad29c014f02
|
|
167 |
public static function getInitializer(ClassLoader $loader)
|
168 |
{
|
169 |
return \Closure::bind(function () use ($loader) {
|
170 |
-
$loader->prefixLengthsPsr4 =
|
171 |
-
$loader->prefixDirsPsr4 =
|
172 |
-
$loader->prefixesPsr0 =
|
173 |
-
$loader->classMap =
|
174 |
|
175 |
}, null, ClassLoader::class);
|
176 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInita6d0a402c6c28219ed112f975dab5938
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'F' =>
|
78 |
|
79 |
public static $classMap = array (
|
80 |
'CreativeMail\\Blocks\\LoadBlock' => __DIR__ . '/../..' . '/src/blocks/LoadBlock.php',
|
81 |
+
'CreativeMail\\Clients\\CreativeMailClient' => __DIR__ . '/../..' . '/src/Clients/CreativeMailClient.php',
|
82 |
+
'CreativeMail\\Constants\\EnvironmentNames' => __DIR__ . '/../..' . '/src/Constants/EnvironmentNames.php',
|
83 |
'CreativeMail\\CreativeMail' => __DIR__ . '/../..' . '/src/CreativeMail.php',
|
84 |
+
'CreativeMail\\Exceptions\\CreativeMailException' => __DIR__ . '/../..' . '/src/Exceptions/CreativeMailException.php',
|
85 |
+
'CreativeMail\\Helpers\\EncryptionHelper' => __DIR__ . '/../..' . '/src/Helpers/EncryptionHelper.php',
|
86 |
+
'CreativeMail\\Helpers\\EnvironmentHelper' => __DIR__ . '/../..' . '/src/Helpers/EnvironmentHelper.php',
|
87 |
+
'CreativeMail\\Helpers\\GuidHelper' => __DIR__ . '/../..' . '/src/Helpers/GuidHelper.php',
|
88 |
+
'CreativeMail\\Helpers\\OptionsHelper' => __DIR__ . '/../..' . '/src/Helpers/OptionsHelper.php',
|
89 |
+
'CreativeMail\\Helpers\\SsoHelper' => __DIR__ . '/../..' . '/src/Helpers/SsoHelper.php',
|
90 |
+
'CreativeMail\\Helpers\\ValidationHelper' => __DIR__ . '/../..' . '/src/Helpers/ValidationHelper.php',
|
91 |
+
'CreativeMail\\Integrations\\Integration' => __DIR__ . '/../..' . '/src/Integrations/Integration.php',
|
92 |
+
'CreativeMail\\Managers\\AdminManager' => __DIR__ . '/../..' . '/src/Managers/AdminManager.php',
|
93 |
+
'CreativeMail\\Managers\\ApiManager' => __DIR__ . '/../..' . '/src/Managers/ApiManager.php',
|
94 |
+
'CreativeMail\\Managers\\CheckoutManager' => __DIR__ . '/../..' . '/src/Managers/CheckoutManager.php',
|
95 |
+
'CreativeMail\\Managers\\DatabaseManager' => __DIR__ . '/../..' . '/src/Managers/DatabaseManager.php',
|
96 |
+
'CreativeMail\\Managers\\EmailManager' => __DIR__ . '/../..' . '/src/Managers/EmailManager.php',
|
97 |
+
'CreativeMail\\Managers\\FormManager' => __DIR__ . '/../..' . '/src/Managers/FormManager.php',
|
98 |
+
'CreativeMail\\Managers\\InstanceManager' => __DIR__ . '/../..' . '/src/Managers/InstanceManager.php',
|
99 |
+
'CreativeMail\\Managers\\IntegrationManager' => __DIR__ . '/../..' . '/src/Managers/IntegrationManager.php',
|
100 |
+
'CreativeMail\\Managers\\RaygunManager' => __DIR__ . '/../..' . '/src/Managers/RaygunManager.php',
|
101 |
+
'CreativeMail\\Modules\\Api\\Models\\ApiRequestItem' => __DIR__ . '/../..' . '/src/Modules/Api/Models/ApiRequestItem.php',
|
102 |
+
'CreativeMail\\Modules\\Api\\Processes\\ApiBackgroundProcess' => __DIR__ . '/../..' . '/src/Modules/Api/Processes/ApiBackgroundProcess.php',
|
103 |
+
'CreativeMail\\Modules\\Blog\\Models\\BlogAttachment' => __DIR__ . '/../..' . '/src/Modules/Blog/Models/BlogAttachment.php',
|
104 |
+
'CreativeMail\\Modules\\Blog\\Models\\BlogInformation' => __DIR__ . '/../..' . '/src/Modules/Blog/Models/BlogInformation.php',
|
105 |
+
'CreativeMail\\Modules\\Blog\\Models\\BlogPost' => __DIR__ . '/../..' . '/src/Modules/Blog/Models/BlogPost.php',
|
106 |
+
'CreativeMail\\Modules\\Contacts\\Exceptions\\InvalidContactSyncBackgroundRequestException' => __DIR__ . '/../..' . '/src/Modules/Contacts/Exceptions/InvalidContactSyncBackgroundRequestException.php',
|
107 |
+
'CreativeMail\\Modules\\Contacts\\Exceptions\\InvalidHandlerContactSyncRequestException' => __DIR__ . '/../..' . '/src/Modules/Contacts/Exceptions/InvalidHandlerContactSyncRequestException.php',
|
108 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\BaseContactFormPluginHandler' => __DIR__ . '/../..' . '/src/Modules/Contacts/Handlers/BaseContactFormPluginHandler.php',
|
109 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\BlueHostBuilderPluginHandler' => __DIR__ . '/../..' . '/src/Modules/Contacts/Handlers/BlueHostBuilderPluginHandler.php',
|
110 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\CalderaPluginHandler' => __DIR__ . '/../..' . '/src/Modules/Contacts/Handlers/CalderaPluginHandler.php',
|
111 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\ContactFormSevenPluginHandler' => __DIR__ . '/../..' . '/src/Modules/Contacts/Handlers/ContactFormSevenPluginHandler.php',
|
112 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\CreativeMailPluginHandler' => __DIR__ . '/../..' . '/src/Modules/Contacts/Handlers/CreativeMailPluginHandler.php',
|
113 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\ElementorPluginHandler' => __DIR__ . '/../..' . '/src/Modules/Contacts/Handlers/ElementorPluginHandler.php',
|
114 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\FormidablePluginHandler' => __DIR__ . '/../..' . '/src/Modules/Contacts/Handlers/FormidablePluginHandler.php',
|
115 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\GravityFormsPluginHandler' => __DIR__ . '/../..' . '/src/Modules/Contacts/Handlers/GravityFormsPluginHandler.php',
|
116 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\JetpackPluginHandler' => __DIR__ . '/../..' . '/src/Modules/Contacts/Handlers/JetpackPluginHandler.php',
|
117 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\NewsLetterContactFormPluginHandler' => __DIR__ . '/../..' . '/src/Modules/Contacts/Handlers/NewsLetterContactFormPluginHandler.php',
|
118 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\NinjaFormsPluginHandler' => __DIR__ . '/../..' . '/src/Modules/Contacts/Handlers/NinjaFormsPluginHandler.php',
|
119 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\WooCommercePluginHandler' => __DIR__ . '/../..' . '/src/Modules/Contacts/Handlers/WooCommercePluginHandler.php',
|
120 |
+
'CreativeMail\\Modules\\Contacts\\Handlers\\WpFormsPluginHandler' => __DIR__ . '/../..' . '/src/Modules/Contacts/Handlers/WpFormsPluginHandler.php',
|
121 |
+
'CreativeMail\\Modules\\Contacts\\Managers\\ContactsSyncManager' => __DIR__ . '/../..' . '/src/Modules/Contacts/Managers/ContactsSyncManager.php',
|
122 |
+
'CreativeMail\\Modules\\Contacts\\Models\\ContactAddressModel' => __DIR__ . '/../..' . '/src/Modules/Contacts/Models/ContactAddressModel.php',
|
123 |
+
'CreativeMail\\Modules\\Contacts\\Models\\ContactFormSevenSubmission' => __DIR__ . '/../..' . '/src/Modules/Contacts/Models/ContactFormSevenSubmission.php',
|
124 |
+
'CreativeMail\\Modules\\Contacts\\Models\\ContactModel' => __DIR__ . '/../..' . '/src/Modules/Contacts/Models/ContactModel.php',
|
125 |
+
'CreativeMail\\Modules\\Contacts\\Models\\OptActionBy' => __DIR__ . '/../..' . '/src/Modules/Contacts/Models/OptActionBy.php',
|
126 |
+
'CreativeMail\\Modules\\Contacts\\Processors\\ContactsSyncBackgroundProcessor' => __DIR__ . '/../..' . '/src/Modules/Contacts/Processors/ContactsSyncBackgroundProcessor.php',
|
127 |
+
'CreativeMail\\Modules\\Contacts\\Services\\ContactsSyncService' => __DIR__ . '/../..' . '/src/Modules/Contacts/Services/ContactsSyncService.php',
|
128 |
+
'CreativeMail\\Modules\\DashboardWidgetModule' => __DIR__ . '/../..' . '/src/Modules/DashboardWidgetModule.php',
|
129 |
+
'CreativeMail\\Modules\\FeedbackNoticeModule' => __DIR__ . '/../..' . '/src/Modules/FeedbackNoticeModule.php',
|
130 |
+
'CreativeMail\\Modules\\WooCommerce\\Emails\\AbandonedCartEmail' => __DIR__ . '/../..' . '/src/Modules/WooCommerce/Emails/AbandonedCartEmail.php',
|
131 |
+
'CreativeMail\\Modules\\WooCommerce\\Models\\WCInformationModel' => __DIR__ . '/../..' . '/src/Modules/WooCommerce/Models/WCInformationModel.php',
|
132 |
+
'CreativeMail\\Modules\\WooCommerce\\Models\\WCProductModel' => __DIR__ . '/../..' . '/src/Modules/WooCommerce/Models/WCProductModel.php',
|
133 |
+
'CreativeMail\\Modules\\WooCommerce\\Models\\WCStoreInformation' => __DIR__ . '/../..' . '/src/Modules/WooCommerce/Models/WCStoreInformation.php',
|
134 |
'Defuse\\Crypto\\Core' => __DIR__ . '/..' . '/defuse/php-encryption/src/Core.php',
|
135 |
'Defuse\\Crypto\\Crypto' => __DIR__ . '/..' . '/defuse/php-encryption/src/Crypto.php',
|
136 |
'Defuse\\Crypto\\DerivedKeys' => __DIR__ . '/..' . '/defuse/php-encryption/src/DerivedKeys.php',
|
167 |
public static function getInitializer(ClassLoader $loader)
|
168 |
{
|
169 |
return \Closure::bind(function () use ($loader) {
|
170 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInita6d0a402c6c28219ed112f975dab5938::$prefixLengthsPsr4;
|
171 |
+
$loader->prefixDirsPsr4 = ComposerStaticInita6d0a402c6c28219ed112f975dab5938::$prefixDirsPsr4;
|
172 |
+
$loader->prefixesPsr0 = ComposerStaticInita6d0a402c6c28219ed112f975dab5938::$prefixesPsr0;
|
173 |
+
$loader->classMap = ComposerStaticInita6d0a402c6c28219ed112f975dab5938::$classMap;
|
174 |
|
175 |
}, null, ClassLoader::class);
|
176 |
}
|
vendor/composer/installed.json
CHANGED
@@ -38,33 +38,36 @@
|
|
38 |
"email": "nom@deliciousbrains.com"
|
39 |
}
|
40 |
],
|
41 |
-
"description": "WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks."
|
|
|
|
|
|
|
|
|
42 |
},
|
43 |
{
|
44 |
"name": "defuse/php-encryption",
|
45 |
-
"version": "v2.
|
46 |
-
"version_normalized": "2.
|
47 |
"source": {
|
48 |
"type": "git",
|
49 |
"url": "https://github.com/defuse/php-encryption.git",
|
50 |
-
"reference": "
|
51 |
},
|
52 |
"dist": {
|
53 |
"type": "zip",
|
54 |
-
"url": "https://api.github.com/repos/defuse/php-encryption/zipball/
|
55 |
-
"reference": "
|
56 |
"shasum": ""
|
57 |
},
|
58 |
"require": {
|
59 |
"ext-openssl": "*",
|
60 |
"paragonie/random_compat": ">= 2",
|
61 |
-
"php": ">=5.
|
62 |
},
|
63 |
"require-dev": {
|
64 |
-
"
|
65 |
-
"phpunit/phpunit": "^4|^5"
|
66 |
},
|
67 |
-
"time": "
|
68 |
"bin": [
|
69 |
"bin/generate-defuse-key"
|
70 |
],
|
@@ -103,21 +106,25 @@
|
|
103 |
"openssl",
|
104 |
"security",
|
105 |
"symmetric key cryptography"
|
106 |
-
]
|
|
|
|
|
|
|
|
|
107 |
},
|
108 |
{
|
109 |
"name": "firebase/php-jwt",
|
110 |
-
"version": "v5.
|
111 |
-
"version_normalized": "5.
|
112 |
"source": {
|
113 |
"type": "git",
|
114 |
"url": "https://github.com/firebase/php-jwt.git",
|
115 |
-
"reference": "
|
116 |
},
|
117 |
"dist": {
|
118 |
"type": "zip",
|
119 |
-
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/
|
120 |
-
"reference": "
|
121 |
"shasum": ""
|
122 |
},
|
123 |
"require": {
|
@@ -126,7 +133,7 @@
|
|
126 |
"require-dev": {
|
127 |
"phpunit/phpunit": ">=4.8 <=9"
|
128 |
},
|
129 |
-
"time": "
|
130 |
"type": "library",
|
131 |
"installation-source": "dist",
|
132 |
"autoload": {
|
@@ -155,7 +162,11 @@
|
|
155 |
"keywords": [
|
156 |
"jwt",
|
157 |
"php"
|
158 |
-
]
|
|
|
|
|
|
|
|
|
159 |
},
|
160 |
{
|
161 |
"name": "mindscape/raygun4php",
|
@@ -207,7 +218,11 @@
|
|
207 |
"exceptions",
|
208 |
"logging",
|
209 |
"raygun"
|
210 |
-
]
|
|
|
|
|
|
|
|
|
211 |
},
|
212 |
{
|
213 |
"name": "paragonie/random_compat",
|
@@ -254,7 +269,12 @@
|
|
254 |
"polyfill",
|
255 |
"pseudorandom",
|
256 |
"random"
|
257 |
-
]
|
|
|
|
|
|
|
|
|
|
|
258 |
},
|
259 |
{
|
260 |
"name": "phpcompatibility/php-compatibility",
|
@@ -314,21 +334,25 @@
|
|
314 |
"compatibility",
|
315 |
"phpcs",
|
316 |
"standards"
|
317 |
-
]
|
|
|
|
|
|
|
|
|
318 |
},
|
319 |
{
|
320 |
"name": "squizlabs/php_codesniffer",
|
321 |
-
"version": "3.
|
322 |
-
"version_normalized": "3.
|
323 |
"source": {
|
324 |
"type": "git",
|
325 |
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
326 |
-
"reference": "
|
327 |
},
|
328 |
"dist": {
|
329 |
"type": "zip",
|
330 |
-
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/
|
331 |
-
"reference": "
|
332 |
"shasum": ""
|
333 |
},
|
334 |
"require": {
|
@@ -340,7 +364,7 @@
|
|
340 |
"require-dev": {
|
341 |
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
|
342 |
},
|
343 |
-
"time": "
|
344 |
"bin": [
|
345 |
"bin/phpcs",
|
346 |
"bin/phpcbf"
|
@@ -367,6 +391,11 @@
|
|
367 |
"keywords": [
|
368 |
"phpcs",
|
369 |
"standards"
|
370 |
-
]
|
|
|
|
|
|
|
|
|
|
|
371 |
}
|
372 |
]
|
38 |
"email": "nom@deliciousbrains.com"
|
39 |
}
|
40 |
],
|
41 |
+
"description": "WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.",
|
42 |
+
"support": {
|
43 |
+
"issues": "https://github.com/deliciousbrains/wp-background-processing/issues",
|
44 |
+
"source": "https://github.com/deliciousbrains/wp-background-processing/tree/1.0.2"
|
45 |
+
}
|
46 |
},
|
47 |
{
|
48 |
"name": "defuse/php-encryption",
|
49 |
+
"version": "v2.3.1",
|
50 |
+
"version_normalized": "2.3.1.0",
|
51 |
"source": {
|
52 |
"type": "git",
|
53 |
"url": "https://github.com/defuse/php-encryption.git",
|
54 |
+
"reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2"
|
55 |
},
|
56 |
"dist": {
|
57 |
"type": "zip",
|
58 |
+
"url": "https://api.github.com/repos/defuse/php-encryption/zipball/77880488b9954b7884c25555c2a0ea9e7053f9d2",
|
59 |
+
"reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2",
|
60 |
"shasum": ""
|
61 |
},
|
62 |
"require": {
|
63 |
"ext-openssl": "*",
|
64 |
"paragonie/random_compat": ">= 2",
|
65 |
+
"php": ">=5.6.0"
|
66 |
},
|
67 |
"require-dev": {
|
68 |
+
"phpunit/phpunit": "^4|^5|^6|^7|^8|^9"
|
|
|
69 |
},
|
70 |
+
"time": "2021-04-09T23:57:26+00:00",
|
71 |
"bin": [
|
72 |
"bin/generate-defuse-key"
|
73 |
],
|
106 |
"openssl",
|
107 |
"security",
|
108 |
"symmetric key cryptography"
|
109 |
+
],
|
110 |
+
"support": {
|
111 |
+
"issues": "https://github.com/defuse/php-encryption/issues",
|
112 |
+
"source": "https://github.com/defuse/php-encryption/tree/v2.3.1"
|
113 |
+
}
|
114 |
},
|
115 |
{
|
116 |
"name": "firebase/php-jwt",
|
117 |
+
"version": "v5.3.0",
|
118 |
+
"version_normalized": "5.3.0.0",
|
119 |
"source": {
|
120 |
"type": "git",
|
121 |
"url": "https://github.com/firebase/php-jwt.git",
|
122 |
+
"reference": "3c2d70f2e64e2922345e89f2ceae47d2463faae1"
|
123 |
},
|
124 |
"dist": {
|
125 |
"type": "zip",
|
126 |
+
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/3c2d70f2e64e2922345e89f2ceae47d2463faae1",
|
127 |
+
"reference": "3c2d70f2e64e2922345e89f2ceae47d2463faae1",
|
128 |
"shasum": ""
|
129 |
},
|
130 |
"require": {
|
133 |
"require-dev": {
|
134 |
"phpunit/phpunit": ">=4.8 <=9"
|
135 |
},
|
136 |
+
"time": "2021-05-20T17:37:02+00:00",
|
137 |
"type": "library",
|
138 |
"installation-source": "dist",
|
139 |
"autoload": {
|
162 |
"keywords": [
|
163 |
"jwt",
|
164 |
"php"
|
165 |
+
],
|
166 |
+
"support": {
|
167 |
+
"issues": "https://github.com/firebase/php-jwt/issues",
|
168 |
+
"source": "https://github.com/firebase/php-jwt/tree/v5.3.0"
|
169 |
+
}
|
170 |
},
|
171 |
{
|
172 |
"name": "mindscape/raygun4php",
|
218 |
"exceptions",
|
219 |
"logging",
|
220 |
"raygun"
|
221 |
+
],
|
222 |
+
"support": {
|
223 |
+
"issues": "https://github.com/MindscapeHQ/raygun4php/issues",
|
224 |
+
"source": "https://github.com/MindscapeHQ/raygun4php/tree/v1.8.4"
|
225 |
+
}
|
226 |
},
|
227 |
{
|
228 |
"name": "paragonie/random_compat",
|
269 |
"polyfill",
|
270 |
"pseudorandom",
|
271 |
"random"
|
272 |
+
],
|
273 |
+
"support": {
|
274 |
+
"email": "info@paragonie.com",
|
275 |
+
"issues": "https://github.com/paragonie/random_compat/issues",
|
276 |
+
"source": "https://github.com/paragonie/random_compat"
|
277 |
+
}
|
278 |
},
|
279 |
{
|
280 |
"name": "phpcompatibility/php-compatibility",
|
334 |
"compatibility",
|
335 |
"phpcs",
|
336 |
"standards"
|
337 |
+
],
|
338 |
+
"support": {
|
339 |
+
"issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues",
|
340 |
+
"source": "https://github.com/PHPCompatibility/PHPCompatibility"
|
341 |
+
}
|
342 |
},
|
343 |
{
|
344 |
"name": "squizlabs/php_codesniffer",
|
345 |
+
"version": "3.6.0",
|
346 |
+
"version_normalized": "3.6.0.0",
|
347 |
"source": {
|
348 |
"type": "git",
|
349 |
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
350 |
+
"reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625"
|
351 |
},
|
352 |
"dist": {
|
353 |
"type": "zip",
|
354 |
+
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625",
|
355 |
+
"reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625",
|
356 |
"shasum": ""
|
357 |
},
|
358 |
"require": {
|
364 |
"require-dev": {
|
365 |
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
|
366 |
},
|
367 |
+
"time": "2021-04-09T00:54:41+00:00",
|
368 |
"bin": [
|
369 |
"bin/phpcs",
|
370 |
"bin/phpcbf"
|
391 |
"keywords": [
|
392 |
"phpcs",
|
393 |
"standards"
|
394 |
+
],
|
395 |
+
"support": {
|
396 |
+
"issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
|
397 |
+
"source": "https://github.com/squizlabs/PHP_CodeSniffer",
|
398 |
+
"wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
|
399 |
+
}
|
400 |
}
|
401 |
]
|
vendor/defuse/php-encryption/.gitignore
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
*~
|
2 |
-
/test/unit/File/big-generated-file
|
3 |
-
/composer.lock
|
4 |
-
/vendor
|
5 |
-
defuse-crypto.phar
|
6 |
-
defuse-crypto.phar.sig
|
7 |
-
composer.phar
|
8 |
-
box.phar
|
9 |
-
phpunit.phar
|
10 |
-
phpunit.phar.asc
|
11 |
-
test/unit/File/tmp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/defuse/php-encryption/.php_cs
DELETED
@@ -1,60 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$config = Symfony\CS\Config\Config::create()
|
4 |
-
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
|
5 |
-
->fixers([
|
6 |
-
'blankline_after_open_tag',
|
7 |
-
'empty_return',
|
8 |
-
'extra_empty_lines',
|
9 |
-
'function_typehint_space',
|
10 |
-
'join_function',
|
11 |
-
'method_argument_default_value',
|
12 |
-
'multiline_array_trailing_comma',
|
13 |
-
'no_blank_lines_after_class_opening',
|
14 |
-
'no_empty_lines_after_phpdocs',
|
15 |
-
'phpdoc_indent',
|
16 |
-
'phpdoc_no_access',
|
17 |
-
'phpdoc_no_empty_return',
|
18 |
-
'phpdoc_no_package',
|
19 |
-
'phpdoc_params',
|
20 |
-
'phpdoc_scalar',
|
21 |
-
'phpdoc_separation',
|
22 |
-
'phpdoc_trim',
|
23 |
-
'phpdoc_type_to_var',
|
24 |
-
'phpdoc_types',
|
25 |
-
'phpdoc_var_without_name',
|
26 |
-
'remove_leading_slash_use',
|
27 |
-
'remove_lines_between_uses',
|
28 |
-
'short_bool_cast',
|
29 |
-
'single_quote',
|
30 |
-
'spaces_after_semicolon',
|
31 |
-
'spaces_before_semicolon',
|
32 |
-
'spaces_cast',
|
33 |
-
'standardize_not_equal',
|
34 |
-
'ternary_spaces',
|
35 |
-
'trim_array_spaces',
|
36 |
-
'unneeded_control_parentheses',
|
37 |
-
'unused_use',
|
38 |
-
'whitespacy_lines',
|
39 |
-
'align_double_arrow',
|
40 |
-
'concat_with_spaces',
|
41 |
-
'logical_not_operators_with_successor_space',
|
42 |
-
'multiline_spaces_before_semicolon',
|
43 |
-
'newline_after_open_tag',
|
44 |
-
'ordered_use',
|
45 |
-
'php_unit_construct',
|
46 |
-
'phpdoc_order',
|
47 |
-
'short_array_syntax',
|
48 |
-
]);
|
49 |
-
|
50 |
-
if (null === $input->getArgument('path')) {
|
51 |
-
$config
|
52 |
-
->finder(
|
53 |
-
Symfony\CS\Finder\DefaultFinder::create()
|
54 |
-
->in('src')
|
55 |
-
->in('test')
|
56 |
-
->exclude('vendor')
|
57 |
-
);
|
58 |
-
}
|
59 |
-
|
60 |
-
return $config;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/defuse/php-encryption/README.md
CHANGED
@@ -4,14 +4,23 @@ php-encryption
|
|
4 |
[![Build Status](https://travis-ci.org/defuse/php-encryption.svg?branch=master)](https://travis-ci.org/defuse/php-encryption)
|
5 |
[![codecov](https://codecov.io/gh/defuse/php-encryption/branch/master/graph/badge.svg)](https://codecov.io/gh/defuse/php-encryption)
|
6 |
[![Latest Stable Version](https://poser.pugx.org/defuse/php-encryption/v/stable)](https://packagist.org/packages/defuse/php-encryption)
|
7 |
-
[![Latest Unstable Version](https://poser.pugx.org/defuse/php-encryption/v/unstable)](https://packagist.org/packages/defuse/php-encryption)
|
8 |
[![License](https://poser.pugx.org/defuse/php-encryption/license)](https://packagist.org/packages/defuse/php-encryption)
|
9 |
[![Downloads](https://img.shields.io/packagist/dt/defuse/php-encryption.svg)](https://packagist.org/packages/defuse/php-encryption)
|
10 |
|
|
|
|
|
|
|
|
|
11 |
This is a library for encrypting data with a key or password in PHP. **It
|
12 |
-
requires PHP 5.6 or newer and OpenSSL 1.0.1 or newer.**
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
The library is a joint effort between [Taylor Hornby](https://defuse.ca/) and
|
17 |
[Scott Arciszewski](https://paragonie.com/blog/author/scott-arcizewski) as well
|
@@ -90,7 +99,7 @@ a formal audit, please [contact Taylor Hornby](https://defuse.ca/contact.htm).
|
|
90 |
Public Keys
|
91 |
------------
|
92 |
|
93 |
-
The GnuPG public key used to sign releases is available in
|
94 |
[dist/signingkey.asc](https://github.com/defuse/php-encryption/raw/master/dist/signingkey.asc). Its fingerprint is:
|
95 |
|
96 |
```
|
@@ -100,3 +109,13 @@ The GnuPG public key used to sign releases is available in
|
|
100 |
You can verify it against Taylor Hornby's [contact
|
101 |
page](https://defuse.ca/contact.htm) and
|
102 |
[twitter](https://twitter.com/DefuseSec/status/723741424253059074).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
[![Build Status](https://travis-ci.org/defuse/php-encryption.svg?branch=master)](https://travis-ci.org/defuse/php-encryption)
|
5 |
[![codecov](https://codecov.io/gh/defuse/php-encryption/branch/master/graph/badge.svg)](https://codecov.io/gh/defuse/php-encryption)
|
6 |
[![Latest Stable Version](https://poser.pugx.org/defuse/php-encryption/v/stable)](https://packagist.org/packages/defuse/php-encryption)
|
|
|
7 |
[![License](https://poser.pugx.org/defuse/php-encryption/license)](https://packagist.org/packages/defuse/php-encryption)
|
8 |
[![Downloads](https://img.shields.io/packagist/dt/defuse/php-encryption.svg)](https://packagist.org/packages/defuse/php-encryption)
|
9 |
|
10 |
+
```terminal
|
11 |
+
composer require defuse/php-encryption
|
12 |
+
```
|
13 |
+
|
14 |
This is a library for encrypting data with a key or password in PHP. **It
|
15 |
+
requires PHP 5.6 or newer and OpenSSL 1.0.1 or newer.** We recommend using a
|
16 |
+
version of PHP that [still has security
|
17 |
+
support](https://www.php.net/supported-versions.php), which at the time of
|
18 |
+
writing means PHP 7.3 or later. Using this library with an unsupported
|
19 |
+
version of PHP could lead to security vulnerabilities.
|
20 |
+
|
21 |
+
The current version of `php-encryption` is v2.3.1. This library is expected to
|
22 |
+
remain stable and supported by its authors with security and bugfixes until at
|
23 |
+
least January 1st, 2022.
|
24 |
|
25 |
The library is a joint effort between [Taylor Hornby](https://defuse.ca/) and
|
26 |
[Scott Arciszewski](https://paragonie.com/blog/author/scott-arcizewski) as well
|
99 |
Public Keys
|
100 |
------------
|
101 |
|
102 |
+
The GnuPG public key used to sign current and older releases is available in
|
103 |
[dist/signingkey.asc](https://github.com/defuse/php-encryption/raw/master/dist/signingkey.asc). Its fingerprint is:
|
104 |
|
105 |
```
|
109 |
You can verify it against Taylor Hornby's [contact
|
110 |
page](https://defuse.ca/contact.htm) and
|
111 |
[twitter](https://twitter.com/DefuseSec/status/723741424253059074).
|
112 |
+
|
113 |
+
Due to the old key expiring, new releases will be signed with a new public key
|
114 |
+
available in [dist/signingkey-new.asc](https://github.com/defuse/php-encryption/raw/master/dist/signingkey-new.asc). Its fingerprint is:
|
115 |
+
|
116 |
+
```
|
117 |
+
6DD6 E677 0281 5846 FC85 25A3 DD2E 507F 7BDB 1669
|
118 |
+
```
|
119 |
+
|
120 |
+
A signature of this new key by the old key is available in
|
121 |
+
[dist/signingkey-new.asc.sig](https://github.com/defuse/php-encryption/raw/master/dist/signingkey-new.asc.sig).
|
vendor/defuse/php-encryption/composer.json
CHANGED
@@ -23,11 +23,10 @@
|
|
23 |
"require": {
|
24 |
"paragonie/random_compat": ">= 2",
|
25 |
"ext-openssl": "*",
|
26 |
-
"php": ">=5.
|
27 |
},
|
28 |
"require-dev": {
|
29 |
-
"phpunit/phpunit": "^4|^5"
|
30 |
-
"nikic/php-parser": "^2.0|^3.0|^4.0"
|
31 |
},
|
32 |
"bin": [
|
33 |
"bin/generate-defuse-key"
|
23 |
"require": {
|
24 |
"paragonie/random_compat": ">= 2",
|
25 |
"ext-openssl": "*",
|
26 |
+
"php": ">=5.6.0"
|
27 |
},
|
28 |
"require-dev": {
|
29 |
+
"phpunit/phpunit": "^4|^5|^6|^7|^8|^9"
|
|
|
30 |
},
|
31 |
"bin": [
|
32 |
"bin/generate-defuse-key"
|
vendor/defuse/php-encryption/dist/Makefile
CHANGED
@@ -2,14 +2,15 @@
|
|
2 |
# must be installed and in your $PATH. Run it from inside the dist/ directory.
|
3 |
|
4 |
box := $(shell which box)
|
5 |
-
composer :=
|
|
|
6 |
|
7 |
.PHONY: all
|
8 |
all: build-phar
|
9 |
|
10 |
.PHONY: sign-phar
|
11 |
sign-phar:
|
12 |
-
gpg -u
|
13 |
|
14 |
# ensure we run in clean tree. export git tree and run there.
|
15 |
.PHONY: build-phar
|
@@ -33,5 +34,6 @@ defuse-crypto.phar: dist/box.json composer.lock
|
|
33 |
php -d phar.readonly=0 $(box) build -c box.json -v
|
34 |
|
35 |
composer.lock:
|
|
|
36 |
$(composer) install --no-dev
|
37 |
|
2 |
# must be installed and in your $PATH. Run it from inside the dist/ directory.
|
3 |
|
4 |
box := $(shell which box)
|
5 |
+
composer := $(shell which composer)
|
6 |
+
gitcommit := $(shell git rev-parse HEAD)
|
7 |
|
8 |
.PHONY: all
|
9 |
all: build-phar
|
10 |
|
11 |
.PHONY: sign-phar
|
12 |
sign-phar:
|
13 |
+
gpg -u DD2E507F7BDB1669 --armor --output defuse-crypto.phar.sig --detach-sig defuse-crypto.phar
|
14 |
|
15 |
# ensure we run in clean tree. export git tree and run there.
|
16 |
.PHONY: build-phar
|
34 |
php -d phar.readonly=0 $(box) build -c box.json -v
|
35 |
|
36 |
composer.lock:
|
37 |
+
$(composer) config autoloader-suffix $(gitcommit)
|
38 |
$(composer) install --no-dev
|
39 |
|
vendor/defuse/php-encryption/dist/signingkey-new.asc
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
2 |
+
|
3 |
+
mQINBF5V4TABEAC4G2BkHDaqbip3gj1oOqKh3V6LQa9QAd/f/hyhmR5hXpciPxf3
|
4 |
+
NNHAxzoGAuB51f1YPJTNO59mGKHDuCFfr0pI94HDGoW4WgxqnUyqHBj2+/JhQPqO
|
5 |
+
lgDT0QDcfxmUd0wfZl/Ur+8SsaBYvfFWNmPaXHp9m4MMRtw9uZNIW6LlZ24JqmGy
|
6 |
+
/YUELUSH7P+uJ4HQEdixaqQ0VgIomRDI+5IwdJMtq4TSNazQm3nNmH9Em37cdi6J
|
7 |
+
NDfFRy2QxJDmuqlg8mkpS5TvrrNy/UJwIeXO9PuGaBODr8GAKWvhkpfGlxN+hWMY
|
8 |
+
01bOFnuEnOcuXw8BjPAKHqwOuGvinNmQ7lX1Rj3ssd31sTUimop0oNjOTZztpJBR
|
9 |
+
m6wO2/YGMjt+eL02NgBBDIsV837PeWuJmymTJDGQuBjZ3JWUfyT3AnkA8OU5vKjs
|
10 |
+
pM8AjIiuU7C8zQhUSHDnukTKWpBmMdOXeWNb5Ye6n60wJWzWFGlm+cYalPs+q3H8
|
11 |
+
bxHxHEdFT0rUpxB05bc9zsZ3gGkc2NTNW/00a6gvTyX1UsBAeNgvVSHBHQGfow6o
|
12 |
+
ZKG+LnVxd+cl97ay6kP29eLypXffbXQ3hMXe9tUNBjAeiok9tssU70Epr9wTh/Fm
|
13 |
+
/iEbGc8VhS4TSk3c+3eS16rvlQ51FmAlmG6kAnN/ah+BiM4syPrWcJHIDQARAQAB
|
14 |
+
tG1kZWZ1c2UvcGhwLWVuY3J5cHRpb24gbWFpbnRhaW5lcnMgKGRlZnVzZS9waHAt
|
15 |
+
ZW5jcnlwdGlvbiByZWxlYXNlIHNpZ25pbmcga2V5KSA8cGhwLWVuY3J5cHRpb25A
|
16 |
+
ZGVmdXNlLmludmFsaWQ+iQJUBBMBCAA+FiEEbdbmdwKBWEb8hSWj3S5Qf3vbFmkF
|
17 |
+
Al5V4TACGwMFCQlmAYAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ3S5Qf3vb
|
18 |
+
FmnQ4Q//bHAwDI7CcTlDDktdRCP0YCRtb5zMa6vSqnZLi5aTqzmL1yQCAp1/JTwf
|
19 |
+
nlHn5xt60eKwfjIKj7Kj0n8WDFYnlOu30H5fNtFHis0xeS7GkH60tIE/pQUZILlB
|
20 |
+
Wcnx/ZPnlxccjtfSbnpelSPdvIoHVRNhh1ZYG/49kuuv8TMbMIi2FBAzGEatPoLN
|
21 |
+
f4wntoOKGvl8R2rPc2geapXTz++X+HJkddHCISR61obDRl9P0t9x+0M7gGSVMGfC
|
22 |
+
GC4wh3JB6/ha8l+DI+l88/64IKRG+M33bBwLGQ0RIhotHIy442gLJTm6TeoH8iUz
|
23 |
+
xCBwPYW+Ta1wZi17PIjHdTkNGBeEj/Hr5tTVV3oxrQVgHCymzasnz9IwcCCMwpKK
|
24 |
+
ZOMFl0+PT3TSBKLnUByvOB64YOjxU7t+sRf53Biz3yKzto5VdHGW64OG2vGFy/Xz
|
25 |
+
vI5RqU34wjtEHxWfz8y2GBnhD2TzEFCIIWPAX3TDG64NBSEBjhUraOmoVoaYJlP6
|
26 |
+
rqxIQo4yhC+f5rnr2ZA48Hnrg0jEdVvN07FegoOnQQPpYBBkOrkTDWChn8oiXMfg
|
27 |
+
9bjv19zDOBVXl9EU+P8AhwTHz/pBKmhb97N9nYp/pbmejA+I0Kw1vZo7gaMxL938
|
28 |
+
oQkdtWT70ZzcpcZfeKVXoZa/ddAmuxzNknZA8ZnjQ9Qhv7aNX2O5Ag0EXlXhMAEQ
|
29 |
+
AM8od4/85i7ZPmM6C1M4n4XcXeKsuZKHLvLLcRHFGkjVdXRSaxpbk2yDJiLnB9hX
|
30 |
+
GSJG2gUCT+yrimjQ71bJ4q9K2+mkVHVjdtCrCtoOYEIpMLzsRtqyAWotcVmdv8Zv
|
31 |
+
4IIjxfdxpTkj9gZmUfDIe6tbN2iBCAo1HArXq1qSdof3ui8SqdWeinkd7lZMesFm
|
32 |
+
dGQaAcHbmEakO5mRzljme8IBs3UY9j/zxEG1JbsHx9ua7CVwJ7lxi2SgSW6nF9k5
|
33 |
+
CX5zbrDqlqSJNtDs+KbjCbI2eK+qe4qZWHPiw4bNBn6EWf97/4Os8w7Vrrpyd2eO
|
34 |
+
1JENwjlG6WG9mbJdIWWwakZ0CeH5LnJo6dV47KZbbbB6ncavaL+VpfbTCgdOGsCc
|
35 |
+
GcYUVl90/v5pPm2owx4Dg9hSfcp8fesQuq4b79NAcjF7meu5wgNdvFlfuXony+UC
|
36 |
+
W2wNi0mi9lzLD0n0j0GDzWyd3r7yXmPTL4LhrQu/pIcWIljKI3GUAQZqIYbGAO3G
|
37 |
+
7hEFT8rDWg2vKRtMag4iy5FvZFqR+7TwWJAcWnHJBZ95F9NzeYIFhp9a3hxbKXqD
|
38 |
+
xEnyGgzAszUycq29BApT4/4rDZQuXuOBd4lJp8tSzctLjvo7D3la+MWD6AlDkYT4
|
39 |
+
bGKN9NfRCzYr2Zq3jOByAV3d5hGgyzdJlZSqXAGtbHHdABEBAAGJAjwEGAEIACYW
|
40 |
+
IQRt1uZ3AoFYRvyFJaPdLlB/e9sWaQUCXlXhMAIbDAUJCWYBgAAKCRDdLlB/e9sW
|
41 |
+
aSGfD/wPeq6lGu8ocHIkO74VPioJRKRXDVLsY02xKP64p0RHUGFTOqqB3A3UV0ue
|
42 |
+
tkizoUdfF5xkgJ18gbxXo8lotBq+Ita5hoYAfqJnTnucAPGovREJ+X1HfdK4pJqW
|
43 |
+
KNJElBz+fC4chqksiUAuH7IMImmy0/lA+LqZagzkQJU10MvmiFZ6kn+X5Mb4izRl
|
44 |
+
vAHo16eI4psApdT8Bs7mwAjgCHxS9Re46uOElB4Bx3iFPd/PEwHWnfr8x9TJZYKW
|
45 |
+
fsShG31+vfBRCfGtfKGxiAkp3EEM11lzbbfMcC3lai5iJQ/FmHgoIDeIG2Ebuk4w
|
46 |
+
/PYakSrpvkEYoMP31pVHDhzopVeURS2lpvQJ4CvTP5CVQtKrbuygow6GF8N/drCE
|
47 |
+
hdEx22pzW02ADS9fgzrlDztIOlOvC9a+epISIaEjfrc9dWhrw6chZEoWIil2MVQR
|
48 |
+
Sj0jZ8w/H7P88oHTOcFVel73ZEPg9eRUkqMnIn3DWUuqLI2SX/AtVnhdYHWTiOkq
|
49 |
+
knsGofWxUSu3RZR2ZElK9hjNKdVbGDzHGAYeJihieTKIOXpCf6Ix5B32tmFpfmBV
|
50 |
+
Q9YP3JLsRTxIMbXsJImand/r6fSjdmTpk2PovYPtE1HTJKaVHeagQdsrWw5LaJv0
|
51 |
+
ZWuwJm0y0WJXcAEjwOHhBs0nvq2CXuZi2ZTPtY+DbsSFWhaN7g==
|
52 |
+
=Ysgx
|
53 |
+
-----END PGP PUBLIC KEY BLOCK-----
|
vendor/defuse/php-encryption/dist/signingkey-new.asc.sig
ADDED
Binary file
|
vendor/defuse/php-encryption/docs/InternalDeveloperDocs.md
CHANGED
@@ -154,7 +154,7 @@ make sign-phar
|
|
154 |
Tag the release:
|
155 |
|
156 |
```
|
157 |
-
git -c user.signingkey=
|
158 |
```
|
159 |
|
160 |
`<TAG NAME>` should be in the format `v2.0.0` and `<TAG MESSAGE>` should look
|
154 |
Tag the release:
|
155 |
|
156 |
```
|
157 |
+
git -c user.signingkey=DD2E507F7BDB1669 tag -s "<TAG NAME>" -m "<TAG MESSAGE>"
|
158 |
```
|
159 |
|
160 |
`<TAG NAME>` should be in the format `v2.0.0` and `<TAG MESSAGE>` should look
|
vendor/defuse/php-encryption/docs/Tutorial.md
CHANGED
@@ -229,10 +229,10 @@ application is using don't compute it either.
|
|
229 |
|
230 |
Then, when the user logs in, Dave's code will load the protected key from the
|
231 |
user's account record, unlock it to get a `Key` object, and save the `Key`
|
232 |
-
object somewhere safe (like temporary memory-backed session storage
|
233 |
-
wherever Dave's code saves the key, it must be destroyed
|
234 |
-
or else the attacker might be able to find users' keys
|
235 |
-
logged in during the attack.
|
236 |
|
237 |
```php
|
238 |
<?php
|
@@ -245,7 +245,7 @@ $protected_key_encoded = // ... load it from the user's account record
|
|
245 |
$protected_key = KeyProtectedByPassword::loadFromAsciiSafeString($protected_key_encoded);
|
246 |
$user_key = $protected_key->unlockKey($password);
|
247 |
$user_key_encoded = $user_key->saveToAsciiSafeString();
|
248 |
-
// ... save $user_key_encoded in
|
249 |
```
|
250 |
|
251 |
```php
|
@@ -255,7 +255,7 @@ $user_key_encoded = $user_key->saveToAsciiSafeString();
|
|
255 |
```
|
256 |
|
257 |
When a user adds their credit card number, Dave's code will get the key from the
|
258 |
-
session and use it to encrypt the credit card number:
|
259 |
|
260 |
```php
|
261 |
<?php
|
@@ -264,7 +264,7 @@ use Defuse\Crypto\Key;
|
|
264 |
|
265 |
// ...
|
266 |
|
267 |
-
$user_key_encoded = // ... get it out of the
|
268 |
$user_key = Key::loadFromAsciiSafeString($user_key_encoded);
|
269 |
|
270 |
// ...
|
@@ -283,7 +283,7 @@ use Defuse\Crypto\Key;
|
|
283 |
|
284 |
// ...
|
285 |
|
286 |
-
$user_key_encoded = // ... get it out of the
|
287 |
$user_key = Key::loadFromAsciiSafeString($user_key_encoded);
|
288 |
|
289 |
// ...
|
229 |
|
230 |
Then, when the user logs in, Dave's code will load the protected key from the
|
231 |
user's account record, unlock it to get a `Key` object, and save the `Key`
|
232 |
+
object somewhere safe (like temporary memory-backed session storage or
|
233 |
+
a cookie). Note that wherever Dave's code saves the key, it must be destroyed
|
234 |
+
once the user logs out, or else the attacker might be able to find users' keys
|
235 |
+
even if they were never logged in during the attack.
|
236 |
|
237 |
```php
|
238 |
<?php
|
245 |
$protected_key = KeyProtectedByPassword::loadFromAsciiSafeString($protected_key_encoded);
|
246 |
$user_key = $protected_key->unlockKey($password);
|
247 |
$user_key_encoded = $user_key->saveToAsciiSafeString();
|
248 |
+
// ... save $user_key_encoded in a cookie
|
249 |
```
|
250 |
|
251 |
```php
|
255 |
```
|
256 |
|
257 |
When a user adds their credit card number, Dave's code will get the key from the
|
258 |
+
memory-backed session or cookie and use it to encrypt the credit card number:
|
259 |
|
260 |
```php
|
261 |
<?php
|
264 |
|
265 |
// ...
|
266 |
|
267 |
+
$user_key_encoded = // ... get it out of the cookie ...
|
268 |
$user_key = Key::loadFromAsciiSafeString($user_key_encoded);
|
269 |
|
270 |
// ...
|
283 |
|
284 |
// ...
|
285 |
|
286 |
+
$user_key_encoded = // ... get it out of the cookie
|
287 |
$user_key = Key::loadFromAsciiSafeString($user_key_encoded);
|
288 |
|
289 |
// ...
|
vendor/defuse/php-encryption/psalm.xml
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<psalm
|
3 |
-
useDocblockTypes="true"
|
4 |
-
>
|
5 |
-
<projectFiles>
|
6 |
-
<directory name="src" />
|
7 |
-
</projectFiles>
|
8 |
-
<issueHandlers>
|
9 |
-
<DocblockTypeContradiction errorLevel="info" />
|
10 |
-
<RedundantCondition errorLevel="info" />
|
11 |
-
<RedundantConditionGivenDocblockType errorLevel="info" />
|
12 |
-
</issueHandlers>
|
13 |
-
</psalm>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/defuse/php-encryption/src/Core.php
CHANGED
@@ -228,7 +228,10 @@ final class Core
|
|
228 |
*/
|
229 |
public static function ensureConstantExists($name)
|
230 |
{
|
231 |
-
Core::ensureTrue(
|
|
|
|
|
|
|
232 |
}
|
233 |
|
234 |
/**
|
@@ -241,7 +244,10 @@ final class Core
|
|
241 |
*/
|
242 |
public static function ensureFunctionExists($name)
|
243 |
{
|
244 |
-
Core::ensureTrue(
|
|
|
|
|
|
|
245 |
}
|
246 |
|
247 |
/**
|
@@ -434,6 +440,9 @@ final class Core
|
|
434 |
$last = $xorsum = \hash_hmac($algorithm, $last, $password, true);
|
435 |
// perform the other $count - 1 iterations
|
436 |
for ($j = 1; $j < $count; $j++) {
|
|
|
|
|
|
|
437 |
$xorsum ^= ($last = \hash_hmac($algorithm, $last, $password, true));
|
438 |
}
|
439 |
$output .= $xorsum;
|
228 |
*/
|
229 |
public static function ensureConstantExists($name)
|
230 |
{
|
231 |
+
Core::ensureTrue(
|
232 |
+
\defined($name),
|
233 |
+
'Constant '.$name.' does not exists'
|
234 |
+
);
|
235 |
}
|
236 |
|
237 |
/**
|
244 |
*/
|
245 |
public static function ensureFunctionExists($name)
|
246 |
{
|
247 |
+
Core::ensureTrue(
|
248 |
+
\function_exists($name),
|
249 |
+
'function '.$name.' does not exists'
|
250 |
+
);
|
251 |
}
|
252 |
|
253 |
/**
|
440 |
$last = $xorsum = \hash_hmac($algorithm, $last, $password, true);
|
441 |
// perform the other $count - 1 iterations
|
442 |
for ($j = 1; $j < $count; $j++) {
|
443 |
+
/**
|
444 |
+
* @psalm-suppress InvalidOperand
|
445 |
+
*/
|
446 |
$xorsum ^= ($last = \hash_hmac($algorithm, $last, $password, true));
|
447 |
}
|
448 |
$output .= $xorsum;
|
vendor/defuse/php-encryption/src/File.php
CHANGED
@@ -191,6 +191,10 @@ final class File
|
|
191 |
*/
|
192 |
private static function encryptFileInternal($inputFilename, $outputFilename, KeyOrPassword $secret)
|
193 |
{
|
|
|
|
|
|
|
|
|
194 |
/* Open the input file. */
|
195 |
$if = @\fopen($inputFilename, 'rb');
|
196 |
if ($if === false) {
|
@@ -256,6 +260,10 @@ final class File
|
|
256 |
*/
|
257 |
private static function decryptFileInternal($inputFilename, $outputFilename, KeyOrPassword $secret)
|
258 |
{
|
|
|
|
|
|
|
|
|
259 |
/* Open the input file. */
|
260 |
$if = @\fopen($inputFilename, 'rb');
|
261 |
if ($if === false) {
|
@@ -320,6 +328,9 @@ final class File
|
|
320 |
*
|
321 |
* @throws Ex\EnvironmentIsBrokenException
|
322 |
* @throws Ex\IOException
|
|
|
|
|
|
|
323 |
*/
|
324 |
private static function encryptResourceInternal($inputHandle, $outputHandle, KeyOrPassword $secret)
|
325 |
{
|
@@ -346,7 +357,7 @@ final class File
|
|
346 |
$iv = Core::secureRandom($ivsize);
|
347 |
|
348 |
/* Initialize a streaming HMAC state. */
|
349 |
-
/** @var
|
350 |
$hmac = \hash_init(Core::HASH_FUNCTION_NAME, HASH_HMAC, $akey);
|
351 |
Core::ensureTrue(
|
352 |
\is_resource($hmac) || \is_object($hmac),
|
@@ -369,6 +380,9 @@ final class File
|
|
369 |
$thisIv = $iv;
|
370 |
|
371 |
/* How many blocks do we encrypt at a time? We increment by this value. */
|
|
|
|
|
|
|
372 |
$inc = (int) (Core::BUFFER_BYTE_SIZE / Core::BLOCK_BYTE_SIZE);
|
373 |
|
374 |
/* Loop until we reach the end of the input file. */
|
@@ -436,6 +450,9 @@ final class File
|
|
436 |
* @throws Ex\EnvironmentIsBrokenException
|
437 |
* @throws Ex\IOException
|
438 |
* @throws Ex\WrongKeyOrModifiedCiphertextException
|
|
|
|
|
|
|
439 |
*/
|
440 |
public static function decryptResourceInternal($inputHandle, $outputHandle, KeyOrPassword $secret)
|
441 |
{
|
@@ -486,10 +503,13 @@ final class File
|
|
486 |
$thisIv = $iv;
|
487 |
|
488 |
/* How many blocks do we encrypt at a time? We increment by this value. */
|
|
|
|
|
|
|
489 |
$inc = (int) (Core::BUFFER_BYTE_SIZE / Core::BLOCK_BYTE_SIZE);
|
490 |
|
491 |
/* Get the HMAC. */
|
492 |
-
if (\fseek($inputHandle, (-1 * Core::MAC_BYTE_SIZE), SEEK_END) ===
|
493 |
throw new Ex\IOException(
|
494 |
'Cannot seek to beginning of MAC within input file'
|
495 |
);
|
@@ -511,19 +531,19 @@ final class File
|
|
511 |
$stored_mac = self::readBytes($inputHandle, Core::MAC_BYTE_SIZE);
|
512 |
|
513 |
/* Initialize a streaming HMAC state. */
|
514 |
-
/** @var
|
515 |
$hmac = \hash_init(Core::HASH_FUNCTION_NAME, HASH_HMAC, $akey);
|
516 |
Core::ensureTrue(\is_resource($hmac) || \is_object($hmac), 'Cannot initialize a hash context');
|
517 |
|
518 |
/* Reset file pointer to the beginning of the file after the header */
|
519 |
-
if (\fseek($inputHandle, Core::HEADER_VERSION_SIZE, SEEK_SET) ===
|
520 |
throw new Ex\IOException(
|
521 |
'Cannot read seek within input file'
|
522 |
);
|
523 |
}
|
524 |
|
525 |
/* Seek to the start of the actual ciphertext. */
|
526 |
-
if (\fseek($inputHandle, Core::SALT_BYTE_SIZE + $ivsize, SEEK_CUR) ===
|
527 |
throw new Ex\IOException(
|
528 |
'Cannot seek input file to beginning of ciphertext'
|
529 |
);
|
@@ -534,7 +554,7 @@ final class File
|
|
534 |
\hash_update($hmac, $header);
|
535 |
\hash_update($hmac, $file_salt);
|
536 |
\hash_update($hmac, $iv);
|
537 |
-
/** @var
|
538 |
$hmac2 = \hash_copy($hmac);
|
539 |
|
540 |
$break = false;
|
@@ -565,7 +585,7 @@ final class File
|
|
565 |
\hash_update($hmac, $read);
|
566 |
|
567 |
/* Remember this buffer-sized chunk's HMAC. */
|
568 |
-
/** @var
|
569 |
$chunk_mac = \hash_copy($hmac);
|
570 |
Core::ensureTrue(\is_resource($chunk_mac) || \is_object($chunk_mac), 'Cannot duplicate a hash context');
|
571 |
$macs []= \hash_final($chunk_mac);
|
@@ -585,7 +605,7 @@ final class File
|
|
585 |
/* PASS #2: Decrypt and write output. */
|
586 |
|
587 |
/* Rewind to the start of the actual ciphertext. */
|
588 |
-
if (\fseek($inputHandle, Core::SALT_BYTE_SIZE + $ivsize + Core::HEADER_VERSION_SIZE, SEEK_SET) ===
|
589 |
throw new Ex\IOException(
|
590 |
'Could not move the input file pointer during decryption'
|
591 |
);
|
@@ -619,7 +639,7 @@ final class File
|
|
619 |
* remembered from pass #1 to ensure attackers didn't change the
|
620 |
* ciphertext after MAC verification. */
|
621 |
\hash_update($hmac2, $read);
|
622 |
-
/** @var
|
623 |
$calc_mac = \hash_copy($hmac2);
|
624 |
Core::ensureTrue(\is_resource($calc_mac) || \is_object($calc_mac), 'Cannot duplicate a hash context');
|
625 |
$calc = \hash_final($calc_mac);
|
@@ -670,8 +690,6 @@ final class File
|
|
670 |
*
|
671 |
* @throws Ex\IOException
|
672 |
* @throws Ex\EnvironmentIsBrokenException
|
673 |
-
*
|
674 |
-
* @return string
|
675 |
*/
|
676 |
public static function readBytes($stream, $num_bytes)
|
677 |
{
|
@@ -711,8 +729,6 @@ final class File
|
|
711 |
* @return int
|
712 |
*
|
713 |
* @throws Ex\IOException
|
714 |
-
*
|
715 |
-
* @return string
|
716 |
*/
|
717 |
public static function writeBytes($stream, $buf, $num_bytes = null)
|
718 |
{
|
191 |
*/
|
192 |
private static function encryptFileInternal($inputFilename, $outputFilename, KeyOrPassword $secret)
|
193 |
{
|
194 |
+
if (file_exists($inputFilename) && file_exists($outputFilename) && realpath($inputFilename) === realpath($outputFilename)) {
|
195 |
+
throw new Ex\IOException('Input and output filenames must be different.');
|
196 |
+
}
|
197 |
+
|
198 |
/* Open the input file. */
|
199 |
$if = @\fopen($inputFilename, 'rb');
|
200 |
if ($if === false) {
|
260 |
*/
|
261 |
private static function decryptFileInternal($inputFilename, $outputFilename, KeyOrPassword $secret)
|
262 |
{
|
263 |
+
if (file_exists($inputFilename) && file_exists($outputFilename) && realpath($inputFilename) === realpath($outputFilename)) {
|
264 |
+
throw new Ex\IOException('Input and output filenames must be different.');
|
265 |
+
}
|
266 |
+
|
267 |
/* Open the input file. */
|
268 |
$if = @\fopen($inputFilename, 'rb');
|
269 |
if ($if === false) {
|
328 |
*
|
329 |
* @throws Ex\EnvironmentIsBrokenException
|
330 |
* @throws Ex\IOException
|
331 |
+
* @psalm-suppress PossiblyInvalidArgument
|
332 |
+
* Fixes erroneous errors caused by PHP 7.2 switching the return value
|
333 |
+
* of hash_init from a resource to a HashContext.
|
334 |
*/
|
335 |
private static function encryptResourceInternal($inputHandle, $outputHandle, KeyOrPassword $secret)
|
336 |
{
|
357 |
$iv = Core::secureRandom($ivsize);
|
358 |
|
359 |
/* Initialize a streaming HMAC state. */
|
360 |
+
/** @var mixed $hmac */
|
361 |
$hmac = \hash_init(Core::HASH_FUNCTION_NAME, HASH_HMAC, $akey);
|
362 |
Core::ensureTrue(
|
363 |
\is_resource($hmac) || \is_object($hmac),
|
380 |
$thisIv = $iv;
|
381 |
|
382 |
/* How many blocks do we encrypt at a time? We increment by this value. */
|
383 |
+
/**
|
384 |
+
* @psalm-suppress RedundantCast
|
385 |
+
*/
|
386 |
$inc = (int) (Core::BUFFER_BYTE_SIZE / Core::BLOCK_BYTE_SIZE);
|
387 |
|
388 |
/* Loop until we reach the end of the input file. */
|
450 |
* @throws Ex\EnvironmentIsBrokenException
|
451 |
* @throws Ex\IOException
|
452 |
* @throws Ex\WrongKeyOrModifiedCiphertextException
|
453 |
+
* @psalm-suppress PossiblyInvalidArgument
|
454 |
+
* Fixes erroneous errors caused by PHP 7.2 switching the return value
|
455 |
+
* of hash_init from a resource to a HashContext.
|
456 |
*/
|
457 |
public static function decryptResourceInternal($inputHandle, $outputHandle, KeyOrPassword $secret)
|
458 |
{
|
503 |
$thisIv = $iv;
|
504 |
|
505 |
/* How many blocks do we encrypt at a time? We increment by this value. */
|
506 |
+
/**
|
507 |
+
* @psalm-suppress RedundantCast
|
508 |
+
*/
|
509 |
$inc = (int) (Core::BUFFER_BYTE_SIZE / Core::BLOCK_BYTE_SIZE);
|
510 |
|
511 |
/* Get the HMAC. */
|
512 |
+
if (\fseek($inputHandle, (-1 * Core::MAC_BYTE_SIZE), SEEK_END) === -1) {
|
513 |
throw new Ex\IOException(
|
514 |
'Cannot seek to beginning of MAC within input file'
|
515 |
);
|
531 |
$stored_mac = self::readBytes($inputHandle, Core::MAC_BYTE_SIZE);
|
532 |
|
533 |
/* Initialize a streaming HMAC state. */
|
534 |
+
/** @var mixed $hmac */
|
535 |
$hmac = \hash_init(Core::HASH_FUNCTION_NAME, HASH_HMAC, $akey);
|
536 |
Core::ensureTrue(\is_resource($hmac) || \is_object($hmac), 'Cannot initialize a hash context');
|
537 |
|
538 |
/* Reset file pointer to the beginning of the file after the header */
|
539 |
+
if (\fseek($inputHandle, Core::HEADER_VERSION_SIZE, SEEK_SET) === -1) {
|
540 |
throw new Ex\IOException(
|
541 |
'Cannot read seek within input file'
|
542 |
);
|
543 |
}
|
544 |
|
545 |
/* Seek to the start of the actual ciphertext. */
|
546 |
+
if (\fseek($inputHandle, Core::SALT_BYTE_SIZE + $ivsize, SEEK_CUR) === -1) {
|
547 |
throw new Ex\IOException(
|
548 |
'Cannot seek input file to beginning of ciphertext'
|
549 |
);
|
554 |
\hash_update($hmac, $header);
|
555 |
\hash_update($hmac, $file_salt);
|
556 |
\hash_update($hmac, $iv);
|
557 |
+
/** @var mixed $hmac2 */
|
558 |
$hmac2 = \hash_copy($hmac);
|
559 |
|
560 |
$break = false;
|
585 |
\hash_update($hmac, $read);
|
586 |
|
587 |
/* Remember this buffer-sized chunk's HMAC. */
|
588 |
+
/** @var mixed $chunk_mac */
|
589 |
$chunk_mac = \hash_copy($hmac);
|
590 |
Core::ensureTrue(\is_resource($chunk_mac) || \is_object($chunk_mac), 'Cannot duplicate a hash context');
|
591 |
$macs []= \hash_final($chunk_mac);
|
605 |
/* PASS #2: Decrypt and write output. */
|
606 |
|
607 |
/* Rewind to the start of the actual ciphertext. */
|
608 |
+
if (\fseek($inputHandle, Core::SALT_BYTE_SIZE + $ivsize + Core::HEADER_VERSION_SIZE, SEEK_SET) === -1) {
|
609 |
throw new Ex\IOException(
|
610 |
'Could not move the input file pointer during decryption'
|
611 |
);
|
639 |
* remembered from pass #1 to ensure attackers didn't change the
|
640 |
* ciphertext after MAC verification. */
|
641 |
\hash_update($hmac2, $read);
|
642 |
+
/** @var mixed $calc_mac */
|
643 |
$calc_mac = \hash_copy($hmac2);
|
644 |
Core::ensureTrue(\is_resource($calc_mac) || \is_object($calc_mac), 'Cannot duplicate a hash context');
|
645 |
$calc = \hash_final($calc_mac);
|
690 |
*
|
691 |
* @throws Ex\IOException
|
692 |
* @throws Ex\EnvironmentIsBrokenException
|
|
|
|
|
693 |
*/
|
694 |
public static function readBytes($stream, $num_bytes)
|
695 |
{
|
729 |
* @return int
|
730 |
*
|
731 |
* @throws Ex\IOException
|
|
|
|
|
732 |
*/
|
733 |
public static function writeBytes($stream, $buf, $num_bytes = null)
|
734 |
{
|
vendor/firebase/php-jwt/.github/actions/entrypoint.sh
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/sh -l
|
2 |
+
|
3 |
+
apt-get update && \
|
4 |
+
apt-get install -y --no-install-recommends \
|
5 |
+
git \
|
6 |
+
zip \
|
7 |
+
curl \
|
8 |
+
unzip \
|
9 |
+
wget
|
10 |
+
|
11 |
+
curl --silent --show-error https://getcomposer.org/installer | php
|
12 |
+
php composer.phar self-update
|
13 |
+
|
14 |
+
echo "---Installing dependencies ---"
|
15 |
+
php composer.phar update
|
16 |
+
|
17 |
+
echo "---Running unit tests ---"
|
18 |
+
vendor/bin/phpunit
|
vendor/firebase/php-jwt/.github/workflows/tests.yml
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Test Suite
|
2 |
+
on:
|
3 |
+
push:
|
4 |
+
branches:
|
5 |
+
- master
|
6 |
+
pull_request:
|
7 |
+
|
8 |
+
jobs:
|
9 |
+
test:
|
10 |
+
runs-on: ubuntu-latest
|
11 |
+
strategy:
|
12 |
+
matrix:
|
13 |
+
php: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0" ]
|
14 |
+
name: PHP ${{matrix.php }} Unit Test
|
15 |
+
steps:
|
16 |
+
- uses: actions/checkout@v2
|
17 |
+
- name: Setup PHP
|
18 |
+
uses: shivammathur/setup-php@v2
|
19 |
+
with:
|
20 |
+
php-version: ${{ matrix.php }}
|
21 |
+
- name: Install Dependencies
|
22 |
+
uses: nick-invision/retry@v1
|
23 |
+
with:
|
24 |
+
timeout_minutes: 10
|
25 |
+
max_attempts: 3
|
26 |
+
command: composer install
|
27 |
+
- name: Run Script
|
28 |
+
run: vendor/bin/phpunit
|
29 |
+
|
30 |
+
# use dockerfiles for old versions of php (setup-php times out for those).
|
31 |
+
test_php55:
|
32 |
+
name: "PHP 5.5 Unit Test"
|
33 |
+
runs-on: ubuntu-latest
|
34 |
+
steps:
|
35 |
+
- name: Checkout
|
36 |
+
uses: actions/checkout@v2
|
37 |
+
- name: Run Unit Tests
|
38 |
+
uses: docker://php:5.5-cli
|
39 |
+
with:
|
40 |
+
entrypoint: ./.github/actions/entrypoint.sh
|
41 |
+
|
42 |
+
test_php54:
|
43 |
+
name: "PHP 5.4 Unit Test"
|
44 |
+
runs-on: ubuntu-latest
|
45 |
+
steps:
|
46 |
+
- name: Checkout
|
47 |
+
uses: actions/checkout@v2
|
48 |
+
- name: Run Unit Tests
|
49 |
+
uses: docker://php:5.4-cli
|
50 |
+
with:
|
51 |
+
entrypoint: ./.github/actions/entrypoint.sh
|
52 |
+
|
53 |
+
test_php53:
|
54 |
+
name: "PHP 5.3 Unit Test"
|
55 |
+
runs-on: ubuntu-latest
|
56 |
+
steps:
|
57 |
+
- name: Checkout
|
58 |
+
uses: actions/checkout@v2
|
59 |
+
- name: Run Unit Tests
|
60 |
+
uses: docker://tomsowerby/php-5.3:cli
|
61 |
+
with:
|
62 |
+
entrypoint: ./.github/actions/entrypoint.sh
|
63 |
+
|
64 |
+
style:
|
65 |
+
runs-on: ubuntu-latest
|
66 |
+
name: PHP Style Check
|
67 |
+
steps:
|
68 |
+
- uses: actions/checkout@v2
|
69 |
+
- name: Setup PHP
|
70 |
+
uses: shivammathur/setup-php@v2
|
71 |
+
with:
|
72 |
+
php-version: "7.0"
|
73 |
+
- name: Run Script
|
74 |
+
run: |
|
75 |
+
composer require friendsofphp/php-cs-fixer
|
76 |
+
vendor/bin/php-cs-fixer fix --diff --dry-run .
|
77 |
+
vendor/bin/php-cs-fixer fix --rules=native_function_invocation --allow-risky=yes --diff src
|
vendor/firebase/php-jwt/LICENSE
CHANGED
@@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are met:
|
|
13 |
disclaimer in the documentation and/or other materials provided
|
14 |
with the distribution.
|
15 |
|
16 |
-
* Neither the name of
|
17 |
contributors may be used to endorse or promote products derived
|
18 |
from this software without specific prior written permission.
|
19 |
|
13 |
disclaimer in the documentation and/or other materials provided
|
14 |
with the distribution.
|
15 |
|
16 |
+
* Neither the name of the copyright holder nor the names of other
|
17 |
contributors may be used to endorse or promote products derived
|
18 |
from this software without specific prior written permission.
|
19 |
|
vendor/firebase/php-jwt/README.md
CHANGED
@@ -19,8 +19,7 @@ composer require firebase/php-jwt
|
|
19 |
Example
|
20 |
-------
|
21 |
```php
|
22 |
-
|
23 |
-
use \Firebase\JWT\JWT;
|
24 |
|
25 |
$key = "example_key";
|
26 |
$payload = array(
|
@@ -57,14 +56,11 @@ $decoded_array = (array) $decoded;
|
|
57 |
*/
|
58 |
JWT::$leeway = 60; // $leeway in seconds
|
59 |
$decoded = JWT::decode($jwt, $key, array('HS256'));
|
60 |
-
|
61 |
-
?>
|
62 |
```
|
63 |
Example with RS256 (openssl)
|
64 |
----------------------------
|
65 |
```php
|
66 |
-
|
67 |
-
use \Firebase\JWT\JWT;
|
68 |
|
69 |
$privateKey = <<<EOD
|
70 |
-----BEGIN RSA PRIVATE KEY-----
|
@@ -112,7 +108,56 @@ $decoded = JWT::decode($jwt, $publicKey, array('RS256'));
|
|
112 |
|
113 |
$decoded_array = (array) $decoded;
|
114 |
echo "Decode:\n" . print_r($decoded_array, true) . "\n";
|
115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
```
|
117 |
|
118 |
Changelog
|
19 |
Example
|
20 |
-------
|
21 |
```php
|
22 |
+
use Firebase\JWT\JWT;
|
|
|
23 |
|
24 |
$key = "example_key";
|
25 |
$payload = array(
|
56 |
*/
|
57 |
JWT::$leeway = 60; // $leeway in seconds
|
58 |
$decoded = JWT::decode($jwt, $key, array('HS256'));
|
|
|
|
|
59 |
```
|
60 |
Example with RS256 (openssl)
|
61 |
----------------------------
|
62 |
```php
|
63 |
+
use Firebase\JWT\JWT;
|
|
|
64 |
|
65 |
$privateKey = <<<EOD
|
66 |
-----BEGIN RSA PRIVATE KEY-----
|
108 |
|
109 |
$decoded_array = (array) $decoded;
|
110 |
echo "Decode:\n" . print_r($decoded_array, true) . "\n";
|
111 |
+
```
|
112 |
+
|
113 |
+
Example with a passphrase
|
114 |
+
-------------------------
|
115 |
+
|
116 |
+
```php
|
117 |
+
// Your passphrase
|
118 |
+
$passphrase = '[YOUR_PASSPHRASE]';
|
119 |
+
|
120 |
+
// Your private key file with passphrase
|
121 |
+
// Can be generated with "ssh-keygen -t rsa -m pem"
|
122 |
+
$privateKeyFile = '/path/to/key-with-passphrase.pem';
|
123 |
+
|
124 |
+
// Create a private key of type "resource"
|
125 |
+
$privateKey = openssl_pkey_get_private(
|
126 |
+
file_get_contents($privateKeyFile),
|
127 |
+
$passphrase
|
128 |
+
);
|
129 |
+
|
130 |
+
$payload = array(
|
131 |
+
"iss" => "example.org",
|
132 |
+
"aud" => "example.com",
|
133 |
+
"iat" => 1356999524,
|
134 |
+
"nbf" => 1357000000
|
135 |
+
);
|
136 |
+
|
137 |
+
$jwt = JWT::encode($payload, $privateKey, 'RS256');
|
138 |
+
echo "Encode:\n" . print_r($jwt, true) . "\n";
|
139 |
+
|
140 |
+
// Get public key from the private key, or pull from from a file.
|
141 |
+
$publicKey = openssl_pkey_get_details($privateKey)['key'];
|
142 |
+
|
143 |
+
$decoded = JWT::decode($jwt, $publicKey, array('RS256'));
|
144 |
+
echo "Decode:\n" . print_r((array) $decoded, true) . "\n";
|
145 |
+
```
|
146 |
+
|
147 |
+
Using JWKs
|
148 |
+
----------
|
149 |
+
|
150 |
+
```php
|
151 |
+
use Firebase\JWT\JWK;
|
152 |
+
use Firebase\JWT\JWT;
|
153 |
+
|
154 |
+
// Set of keys. The "keys" key is required. For example, the JSON response to
|
155 |
+
// this endpoint: https://www.gstatic.com/iap/verify/public_key-jwk
|
156 |
+
$jwks = ['keys' => []];
|
157 |
+
|
158 |
+
// JWK::parseKeySet($jwks) returns an associative array of **kid** to private
|
159 |
+
// key. Pass this as the second parameter to JWT::decode.
|
160 |
+
JWT::decode($payload, JWK::parseKeySet($jwks), $supportedAlgorithm);
|
161 |
```
|
162 |
|
163 |
Changelog
|
vendor/firebase/php-jwt/src/BeforeValidException.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
namespace Firebase\JWT;
|
3 |
|
4 |
class BeforeValidException extends \UnexpectedValueException
|
1 |
<?php
|
2 |
+
|
3 |
namespace Firebase\JWT;
|
4 |
|
5 |
class BeforeValidException extends \UnexpectedValueException
|
vendor/firebase/php-jwt/src/ExpiredException.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
namespace Firebase\JWT;
|
3 |
|
4 |
class ExpiredException extends \UnexpectedValueException
|
1 |
<?php
|
2 |
+
|
3 |
namespace Firebase\JWT;
|
4 |
|
5 |
class ExpiredException extends \UnexpectedValueException
|
vendor/firebase/php-jwt/src/JWK.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
namespace Firebase\JWT;
|
4 |
|
5 |
use DomainException;
|
|
|
6 |
use UnexpectedValueException;
|
7 |
|
8 |
/**
|
@@ -81,7 +82,7 @@ class JWK
|
|
81 |
|
82 |
switch ($jwk['kty']) {
|
83 |
case 'RSA':
|
84 |
-
if (
|
85 |
throw new UnexpectedValueException('RSA private keys are not supported');
|
86 |
}
|
87 |
if (!isset($jwk['n']) || !isset($jwk['e'])) {
|
3 |
namespace Firebase\JWT;
|
4 |
|
5 |
use DomainException;
|
6 |
+
use InvalidArgumentException;
|
7 |
use UnexpectedValueException;
|
8 |
|
9 |
/**
|
82 |
|
83 |
switch ($jwk['kty']) {
|
84 |
case 'RSA':
|
85 |
+
if (!empty($jwk['d'])) {
|
86 |
throw new UnexpectedValueException('RSA private keys are not supported');
|
87 |
}
|
88 |
if (!isset($jwk['n']) || !isset($jwk['e'])) {
|
vendor/firebase/php-jwt/src/JWT.php
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
|
3 |
namespace Firebase\JWT;
|
4 |
|
5 |
-
use
|
6 |
-
use
|
7 |
-
use
|
8 |
-
use
|
9 |
|
10 |
/**
|
11 |
* JSON Web Token implementation, based on this spec:
|
@@ -42,6 +42,7 @@ class JWT
|
|
42 |
public static $timestamp = null;
|
43 |
|
44 |
public static $supported_algs = array(
|
|
|
45 |
'ES256' => array('openssl', 'SHA256'),
|
46 |
'HS256' => array('hash_hmac', 'SHA256'),
|
47 |
'HS384' => array('hash_hmac', 'SHA384'),
|
@@ -58,10 +59,12 @@ class JWT
|
|
58 |
* @param string|array|resource $key The key, or map of keys.
|
59 |
* If the algorithm used is asymmetric, this is the public key
|
60 |
* @param array $allowed_algs List of supported verification algorithms
|
61 |
-
* Supported algorithms are 'ES256', 'HS256', 'HS384',
|
|
|
62 |
*
|
63 |
* @return object The JWT's payload as a PHP object
|
64 |
*
|
|
|
65 |
* @throws UnexpectedValueException Provided JWT was invalid
|
66 |
* @throws SignatureInvalidException Provided JWT was invalid because the signature verification failed
|
67 |
* @throws BeforeValidException Provided JWT is trying to be used before it's eligible as defined by 'nbf'
|
@@ -101,8 +104,8 @@ class JWT
|
|
101 |
if (!\in_array($header->alg, $allowed_algs)) {
|
102 |
throw new UnexpectedValueException('Algorithm not allowed');
|
103 |
}
|
104 |
-
if ($header->alg === 'ES256') {
|
105 |
-
// OpenSSL expects an ASN.1 DER sequence for ES256 signatures
|
106 |
$sig = self::signatureToDER($sig);
|
107 |
}
|
108 |
|
@@ -150,13 +153,14 @@ class JWT
|
|
150 |
/**
|
151 |
* Converts and signs a PHP object or array into a JWT string.
|
152 |
*
|
153 |
-
* @param object|array
|
154 |
-
* @param string
|
155 |
-
*
|
156 |
-
* @param string
|
157 |
-
*
|
158 |
-
*
|
159 |
-
* @param
|
|
|
160 |
*
|
161 |
* @return string A signed JWT
|
162 |
*
|
@@ -189,7 +193,8 @@ class JWT
|
|
189 |
* @param string $msg The message to sign
|
190 |
* @param string|resource $key The secret key
|
191 |
* @param string $alg The signing algorithm.
|
192 |
-
* Supported algorithms are 'ES256', 'HS256', 'HS384',
|
|
|
193 |
*
|
194 |
* @return string An encrypted message
|
195 |
*
|
@@ -213,6 +218,9 @@ class JWT
|
|
213 |
if ($alg === 'ES256') {
|
214 |
$signature = self::signatureFromDER($signature, 256);
|
215 |
}
|
|
|
|
|
|
|
216 |
return $signature;
|
217 |
}
|
218 |
}
|
2 |
|
3 |
namespace Firebase\JWT;
|
4 |
|
5 |
+
use DomainException;
|
6 |
+
use InvalidArgumentException;
|
7 |
+
use UnexpectedValueException;
|
8 |
+
use DateTime;
|
9 |
|
10 |
/**
|
11 |
* JSON Web Token implementation, based on this spec:
|
42 |
public static $timestamp = null;
|
43 |
|
44 |
public static $supported_algs = array(
|
45 |
+
'ES384' => array('openssl', 'SHA384'),
|
46 |
'ES256' => array('openssl', 'SHA256'),
|
47 |
'HS256' => array('hash_hmac', 'SHA256'),
|
48 |
'HS384' => array('hash_hmac', 'SHA384'),
|
59 |
* @param string|array|resource $key The key, or map of keys.
|
60 |
* If the algorithm used is asymmetric, this is the public key
|
61 |
* @param array $allowed_algs List of supported verification algorithms
|
62 |
+
* Supported algorithms are 'ES384','ES256', 'HS256', 'HS384',
|
63 |
+
* 'HS512', 'RS256', 'RS384', and 'RS512'
|
64 |
*
|
65 |
* @return object The JWT's payload as a PHP object
|
66 |
*
|
67 |
+
* @throws InvalidArgumentException Provided JWT was empty
|
68 |
* @throws UnexpectedValueException Provided JWT was invalid
|
69 |
* @throws SignatureInvalidException Provided JWT was invalid because the signature verification failed
|
70 |
* @throws BeforeValidException Provided JWT is trying to be used before it's eligible as defined by 'nbf'
|
104 |
if (!\in_array($header->alg, $allowed_algs)) {
|
105 |
throw new UnexpectedValueException('Algorithm not allowed');
|
106 |
}
|
107 |
+
if ($header->alg === 'ES256' || $header->alg === 'ES384') {
|
108 |
+
// OpenSSL expects an ASN.1 DER sequence for ES256/ES384 signatures
|
109 |
$sig = self::signatureToDER($sig);
|
110 |
}
|
111 |
|
153 |
/**
|
154 |
* Converts and signs a PHP object or array into a JWT string.
|
155 |
*
|
156 |
+
* @param object|array $payload PHP object or array
|
157 |
+
* @param string|resource $key The secret key.
|
158 |
+
* If the algorithm used is asymmetric, this is the private key
|
159 |
+
* @param string $alg The signing algorithm.
|
160 |
+
* Supported algorithms are 'ES384','ES256', 'HS256', 'HS384',
|
161 |
+
* 'HS512', 'RS256', 'RS384', and 'RS512'
|
162 |
+
* @param mixed $keyId
|
163 |
+
* @param array $head An array with header elements to attach
|
164 |
*
|
165 |
* @return string A signed JWT
|
166 |
*
|
193 |
* @param string $msg The message to sign
|
194 |
* @param string|resource $key The secret key
|
195 |
* @param string $alg The signing algorithm.
|
196 |
+
* Supported algorithms are 'ES384','ES256', 'HS256', 'HS384',
|
197 |
+
* 'HS512', 'RS256', 'RS384', and 'RS512'
|
198 |
*
|
199 |
* @return string An encrypted message
|
200 |
*
|
218 |
if ($alg === 'ES256') {
|
219 |
$signature = self::signatureFromDER($signature, 256);
|
220 |
}
|
221 |
+
if ($alg === 'ES384') {
|
222 |
+
$signature = self::signatureFromDER($signature, 384);
|
223 |
+
}
|
224 |
return $signature;
|
225 |
}
|
226 |
}
|
vendor/firebase/php-jwt/src/SignatureInvalidException.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
namespace Firebase\JWT;
|
3 |
|
4 |
class SignatureInvalidException extends \UnexpectedValueException
|
1 |
<?php
|
2 |
+
|
3 |
namespace Firebase\JWT;
|
4 |
|
5 |
class SignatureInvalidException extends \UnexpectedValueException
|