Version Description
Download this release
Release Info
Developer | themeisle |
Plugin | WP Maintenance Mode |
Version | 2.5.0 |
Comparing to | |
See all releases |
Code changes from version 2.4.7 to 2.5.0
- CHANGELOG.md +5 -0
- README.md +9 -1
- assets/css/style-admin.css +116 -4
- assets/css/style-admin.min.css +1 -1
- assets/css/style-wizard.css +283 -0
- assets/css/style-wizard.min.css +1 -0
- assets/css/style.bot.css +52 -65
- assets/css/style.bot.min.css +1 -1
- assets/css/style.css +1 -7
- assets/images/chatbot.png +0 -0
- assets/images/external.svg +4 -0
- assets/images/finish-setup.svg +45 -0
- assets/images/subscribe.svg +45 -0
- assets/js/bot.js +366 -377
- assets/js/bot.min.js +1 -1
- assets/js/scripts-admin-global.js +22 -21
- assets/js/scripts-admin-global.min.js +1 -1
- assets/js/scripts-admin.js +542 -187
- assets/js/scripts-admin.min.js +1 -1
- assets/templates/coming-soon/coming-soon-cover/blocks-export.json +6 -0
- assets/templates/coming-soon/coming-soon-cover/screenshot.png +0 -0
- assets/templates/coming-soon/coming-soon-minimal/blocks-export.json +6 -0
- assets/templates/coming-soon/coming-soon-minimal/screenshot.png +0 -0
- assets/templates/coming-soon/coming-soon-modern/blocks-export.json +6 -0
- assets/templates/coming-soon/coming-soon-modern/screenshot.png +0 -0
- assets/templates/maintenance/maintenance-cover/blocks-export.json +6 -0
- assets/templates/maintenance/maintenance-cover/screenshot.png +0 -0
- assets/templates/maintenance/maintenance-minimal/blocks-export.json +6 -0
- assets/templates/maintenance/maintenance-minimal/screenshot.png +0 -0
- assets/templates/maintenance/maintenance-modern/blocks-export.json +6 -0
- assets/templates/maintenance/maintenance-modern/screenshot.png +0 -0
- includes/classes/wp-maintenance-mode-admin.php +363 -13
- includes/classes/wp-maintenance-mode.php +215 -20
- includes/functions/helpers.php +1 -1
- includes/functions/hooks.php +2 -0
- readme.txt +9 -1
- vendor/autoload.php +1 -1
- vendor/codeinwp/themeisle-sdk/CHANGELOG.md +13 -0
- vendor/codeinwp/themeisle-sdk/assets/images/animation.jpg +0 -0
- vendor/codeinwp/themeisle-sdk/assets/images/conditions.jpg +0 -0
- vendor/codeinwp/themeisle-sdk/assets/images/css.jpg +0 -0
- vendor/codeinwp/themeisle-sdk/assets/js/build/index.asset.php +1 -0
- vendor/codeinwp/themeisle-sdk/assets/js/build/index.js +1 -0
- vendor/codeinwp/themeisle-sdk/load.php +1 -1
- vendor/codeinwp/themeisle-sdk/src/Loader.php +1 -1
- vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php +4 -0
- vendor/codeinwp/themeisle-sdk/src/Modules/Promotions.php +192 -0
- vendor/codeinwp/themeisle-sdk/src/Modules/Rollback.php +17 -1
- vendor/codeinwp/themeisle-sdk/src/Product.php +9 -0
- vendor/codeinwp/themeisle-sdk/start.php +1 -0
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +2 -2
- vendor/composer/installed.json +7 -7
- vendor/composer/installed.php +7 -7
- views/maintenance.php +22 -22
- views/settings.php +240 -31
- views/sidebar.php +9 -3
- views/wpmm-page-template.php +48 -0
- wp-maintenance-mode.php +10 -1
CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 2.4.7](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.6...v2.4.7) (2022-08-08)
|
2 |
|
3 |
##### Fixes
|
1 |
+
#### [Version 2.5.0](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.7...v2.5.0) (2022-09-08)
|
2 |
+
|
3 |
+
- New Feature: Adds compatibility with Block Editor or any page builder for building the maintenance mode page.
|
4 |
+
- New Feature: Adds coming soon and maintenance mode starting templates.
|
5 |
+
|
6 |
##### [Version 2.4.7](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.6...v2.4.7) (2022-08-08)
|
7 |
|
8 |
##### Fixes
|
README.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
**Tags:** maintenance mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
|
8 |
**Requires at least:** 3.5
|
9 |
**Tested up to:** 6.0
|
10 |
-
**Stable tag:** 2.
|
11 |
**Requires PHP:** 5.6
|
12 |
**License:** GPL-2.0+
|
13 |
|
@@ -91,6 +91,14 @@ Notice: `wp-cron.php` is excluded by default.
|
|
91 |
|
92 |
## Changelog ##
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
##### [Version 2.4.7](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.6...v2.4.7) (2022-08-08)
|
95 |
|
96 |
##### Fixes
|
7 |
**Tags:** maintenance mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
|
8 |
**Requires at least:** 3.5
|
9 |
**Tested up to:** 6.0
|
10 |
+
**Stable tag:** 2.5.0
|
11 |
**Requires PHP:** 5.6
|
12 |
**License:** GPL-2.0+
|
13 |
|
91 |
|
92 |
## Changelog ##
|
93 |
|
94 |
+
#### [Version 2.5.0](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.7...v2.5.0) (2022-09-08)
|
95 |
+
|
96 |
+
- New Feature: Adds compatibility with Block Editor or any page builder for building the maintenance mode page.
|
97 |
+
- New Feature: Adds coming soon and maintenance mode starting templates.
|
98 |
+
|
99 |
+
|
100 |
+
|
101 |
+
|
102 |
##### [Version 2.4.7](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.6...v2.4.7) (2022-08-08)
|
103 |
|
104 |
##### Fixes
|
assets/css/style-admin.css
CHANGED
@@ -114,7 +114,7 @@ h2.wpmm-title {
|
|
114 |
|
115 |
.tabs-content td.has-inline-color-picker {
|
116 |
display: flex;
|
117 |
-
align-items: center;
|
118 |
}
|
119 |
|
120 |
.tabs-content td.has-inline-color-picker .wp-picker-container .wp-color-result {
|
@@ -145,6 +145,58 @@ h2.wpmm-title {
|
|
145 |
display: block;
|
146 |
}
|
147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
@media screen and (max-width: 782px) {
|
149 |
.tabs-content td.has-inline-color-picker {
|
150 |
display: flex;
|
@@ -182,8 +234,8 @@ h2.wpmm-title {
|
|
182 |
color: #fff;
|
183 |
}
|
184 |
|
185 |
-
.tabs-content .bot-button {
|
186 |
-
display: inline-block;
|
187 |
}
|
188 |
|
189 |
/* SIDEBARS */
|
@@ -226,8 +278,68 @@ h2.wpmm-title {
|
|
226 |
background-image: none !important;
|
227 |
}
|
228 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
/* FOOTER RATING */
|
230 |
#footer-left .wpmm_rating:hover {
|
231 |
text-decoration: none !important;
|
232 |
color: #FFB900 !important;
|
233 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
.tabs-content td.has-inline-color-picker {
|
116 |
display: flex;
|
117 |
+
align-items: center;
|
118 |
}
|
119 |
|
120 |
.tabs-content td.has-inline-color-picker .wp-picker-container .wp-color-result {
|
145 |
display: block;
|
146 |
}
|
147 |
|
148 |
+
.category-select-wrap {
|
149 |
+
text-align: center;
|
150 |
+
}
|
151 |
+
|
152 |
+
.templates {
|
153 |
+
display: flex;
|
154 |
+
flex-wrap: wrap;
|
155 |
+
gap: 20px;
|
156 |
+
}
|
157 |
+
|
158 |
+
.template-wrap {
|
159 |
+
width: calc( 100% / 3 - 20px);
|
160 |
+
max-width: 380px;
|
161 |
+
}
|
162 |
+
|
163 |
+
.template-image-wrap {
|
164 |
+
background-color: #fff;
|
165 |
+
line-height: 0;
|
166 |
+
}
|
167 |
+
|
168 |
+
.template-image-wrap img {
|
169 |
+
width: 100%;
|
170 |
+
}
|
171 |
+
|
172 |
+
.template-image-wrap.can-import:hover img,
|
173 |
+
.template-image-wrap.importing img {
|
174 |
+
opacity: .1;
|
175 |
+
}
|
176 |
+
|
177 |
+
.template-image-wrap {
|
178 |
+
position: relative;
|
179 |
+
}
|
180 |
+
|
181 |
+
.template-wrap .template-image-wrap .button-import {
|
182 |
+
display: none;
|
183 |
+
position: absolute;
|
184 |
+
top: 50%;
|
185 |
+
left: 50%;
|
186 |
+
transform: translate(-50%, -50%) !important;
|
187 |
+
}
|
188 |
+
|
189 |
+
.button-import .dashicons.dashicons-update {
|
190 |
+
margin-right: 5px;
|
191 |
+
animation: spin 2s linear infinite;
|
192 |
+
}
|
193 |
+
|
194 |
+
.template-image-wrap.can-import:hover .button-import,
|
195 |
+
.template-image-wrap.importing .button-import {
|
196 |
+
display: flex;
|
197 |
+
align-items: center;
|
198 |
+
}
|
199 |
+
|
200 |
@media screen and (max-width: 782px) {
|
201 |
.tabs-content td.has-inline-color-picker {
|
202 |
display: flex;
|
234 |
color: #fff;
|
235 |
}
|
236 |
|
237 |
+
.tabs-content .bot-button {
|
238 |
+
display: inline-block;
|
239 |
}
|
240 |
|
241 |
/* SIDEBARS */
|
278 |
background-image: none !important;
|
279 |
}
|
280 |
|
281 |
+
.button-big {
|
282 |
+
min-height: 40px !important;
|
283 |
+
padding: 12px 30px !important;
|
284 |
+
font-size: 16px !important;
|
285 |
+
line-height: 18px !important;
|
286 |
+
font-weight: 700;
|
287 |
+
}
|
288 |
+
|
289 |
/* FOOTER RATING */
|
290 |
#footer-left .wpmm_rating:hover {
|
291 |
text-decoration: none !important;
|
292 |
color: #FFB900 !important;
|
293 |
+
}
|
294 |
+
|
295 |
+
/* MODAL */
|
296 |
+
.has-modal {
|
297 |
+
overflow: hidden !important;
|
298 |
+
}
|
299 |
+
|
300 |
+
.modal-overlay {
|
301 |
+
position: fixed;
|
302 |
+
top: 0;
|
303 |
+
right: 0;
|
304 |
+
bottom: 0;
|
305 |
+
left: 0;
|
306 |
+
background-color: rgba(0, 0, 0, 0.35);
|
307 |
+
z-index: 100000;
|
308 |
+
display: flex;
|
309 |
+
}
|
310 |
+
|
311 |
+
.modal-frame {
|
312 |
+
background-color: #fff;
|
313 |
+
box-shadow: 0 0 10px rgba(0,0,0,.5);
|
314 |
+
margin: auto;
|
315 |
+
max-width: 480px;
|
316 |
+
}
|
317 |
+
|
318 |
+
.modal-content {
|
319 |
+
padding: 45px 40px;
|
320 |
+
}
|
321 |
+
|
322 |
+
.modal-header {
|
323 |
+
font-weight: 700;
|
324 |
+
font-size: 20px;
|
325 |
+
line-height: 23px;
|
326 |
+
margin: 0;
|
327 |
+
}
|
328 |
+
|
329 |
+
.modal-text {
|
330 |
+
margin: 30px 0 40px 0;
|
331 |
+
}
|
332 |
+
|
333 |
+
.buttons-wrap {
|
334 |
+
gap: 10px;
|
335 |
+
display: flex;
|
336 |
+
}
|
337 |
+
|
338 |
+
@keyframes spin {
|
339 |
+
from {
|
340 |
+
transform: rotate(0deg);
|
341 |
+
}
|
342 |
+
to {
|
343 |
+
transform: rotate(360deg);
|
344 |
+
}
|
345 |
+
}
|
assets/css/style-admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
h2.wpmm-title{background:url(../images/icon-48.png) no-repeat 0;line-height:42px!important;margin-bottom:30px!important;height:48px;padding-left:55px!important}.wpmm-wrapper{display:table;width:100%}.wpmm-wrapper #content{min-width:800px}.wpmm-wrapper #sidebar{padding:0 0 0 20px;width:280px;vertical-align:top}.wpmm-wrapper #sidebar .sidebar_box{background:none repeat scroll 0 0 #fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);min-width:255px;line-height:1;margin-bottom:20px;padding:0}.wpmm-wrapper #sidebar .sidebar_box h3{margin:0;padding:8px 12px;border-bottom:1px solid #ececec}.wpmm-wrapper #sidebar .sidebar_box .inside{margin:6px 0 0;font-size:13px;line-height:1.4em;padding:0 12px 12px}.wpmm-wrapper .wrapper-cell{display:table-cell}.wpmm-wrapper .hidden{display:none}.nav-tab-wrapper{border-bottom:1px solid #ccc;padding-bottom:0;padding-top:0!important}.nav-tab-wrapper a{font-size:15px;font-weight:700;line-height:24px;padding:6px 10px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.nav-tab-wrapper a .nav-tab-icon{width:16px;height:16px;margin-right:3px}.tabs-content{margin-top:20px;padding-left:10px}.tabs-content .wp-color-result{margin-bottom:-2px}.tabs-content ul.bg_list{float:left}.tabs-content ul.bg_list li{float:left;margin-right:7px;opacity:.4}.tabs-content ul.bg_list li.active{opacity:1}.tabs-content ul.bg_list li input{display:none}.tabs-content .countdown_details input{width:70px}.tabs-content .countdown_details .margin_left{margin-left:30px}.tabs-content td.has-inline-color-picker{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.tabs-content td.has-inline-color-picker .wp-picker-container .wp-color-result{margin:0 6px}.tabs-content .shortcodes-list-wrapper{margin-top:4px;margin-bottom:0;color:#646970}.tabs-content ul.shortcodes-list{list-style-type:disc;padding-left:15px;font-size:12px;display:none}.tabs-content ul.shortcodes-list span{background-color:#d3d3d3;padding:2px 3px;margin-top:4px;display:inline-block}.tabs-content ul.shortcodes-list.show{display:block}@media screen and (max-width:782px){.tabs-content td.has-inline-color-picker{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.tabs-content td.has-inline-color-picker .wp-picker-container{margin-top:6px}.tabs-content .countdown_details .margin_left,.tabs-content td.has-inline-color-picker .wp-picker-container .wp-color-result{margin-left:0}}.tabs-content .wp-picker-holder{position:absolute;z-index:9999999}.tabs-content #subscribers_wrap .buttons{margin-top:8px}.tabs-content .bot-hint{background:#9f9f9f;padding:10px;float:right;border-radius:5px;color:#fff}.tabs-content .bot-button{display:inline-block}#sidebar .info_box ul{margin-top:10px;margin-bottom:-5px}#sidebar .resources_box ul,#sidebar .themes_box ul{margin-top:10px;margin-bottom:-15px}#sidebar .resources_box li,#sidebar .themes_box li{margin-bottom:10px}.chosen-container,.chosen-select{width:195px!important}.chosen-container-active .chosen-choices{-webkit-box-shadow:none!important;box-shadow:none!important;background-image:none!important}.chosen-container-multi .chosen-choices{border:1px solid #ddd!important;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.07) inset!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)!important;background-image:none!important}.chosen-container .chosen-results li.highlighted{background-color:#0074a2!important;background-image:none!important}#footer-left .wpmm_rating:hover{text-decoration:none!important;color:#ffb900!important}
|
1 |
+
h2.wpmm-title{background:url(../images/icon-48.png) no-repeat 0;line-height:42px!important;margin-bottom:30px!important;height:48px;padding-left:55px!important}.wpmm-wrapper{display:table;width:100%}.wpmm-wrapper #content{min-width:800px}.wpmm-wrapper #sidebar{padding:0 0 0 20px;width:280px;vertical-align:top}.wpmm-wrapper #sidebar .sidebar_box{background:none repeat scroll 0 0 #fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);min-width:255px;line-height:1;margin-bottom:20px;padding:0}.wpmm-wrapper #sidebar .sidebar_box h3{margin:0;padding:8px 12px;border-bottom:1px solid #ececec}.wpmm-wrapper #sidebar .sidebar_box .inside{margin:6px 0 0;font-size:13px;line-height:1.4em;padding:0 12px 12px}.wpmm-wrapper .wrapper-cell{display:table-cell}.wpmm-wrapper .hidden{display:none}.nav-tab-wrapper{border-bottom:1px solid #ccc;padding-bottom:0;padding-top:0!important}.nav-tab-wrapper a{font-size:15px;font-weight:700;line-height:24px;padding:6px 10px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.nav-tab-wrapper a .nav-tab-icon{width:16px;height:16px;margin-right:3px}.tabs-content{margin-top:20px;padding-left:10px}.tabs-content .wp-color-result{margin-bottom:-2px}.tabs-content ul.bg_list{float:left}.tabs-content ul.bg_list li{float:left;margin-right:7px;opacity:.4}.tabs-content ul.bg_list li.active{opacity:1}.tabs-content ul.bg_list li input{display:none}.tabs-content .countdown_details input{width:70px}.tabs-content .countdown_details .margin_left{margin-left:30px}.tabs-content td.has-inline-color-picker{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.tabs-content td.has-inline-color-picker .wp-picker-container .wp-color-result{margin:0 6px}.tabs-content .shortcodes-list-wrapper{margin-top:4px;margin-bottom:0;color:#646970}.tabs-content ul.shortcodes-list{list-style-type:disc;padding-left:15px;font-size:12px;display:none}.tabs-content ul.shortcodes-list span{background-color:#d3d3d3;padding:2px 3px;margin-top:4px;display:inline-block}.tabs-content ul.shortcodes-list.show{display:block}.category-select-wrap{text-align:center}.templates{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:20px}.template-wrap{width:calc(33.33333% - 20px);max-width:380px}.template-image-wrap{background-color:#fff;line-height:0}.template-image-wrap img{width:100%}.template-image-wrap.can-import:hover img,.template-image-wrap.importing img{opacity:.1}.template-image-wrap{position:relative}.template-wrap .template-image-wrap .button-import{display:none;position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%)!important;transform:translate(-50%,-50%)!important}.button-import .dashicons.dashicons-update{margin-right:5px;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.template-image-wrap.can-import:hover .button-import,.template-image-wrap.importing .button-import{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}@media screen and (max-width:782px){.tabs-content td.has-inline-color-picker{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.tabs-content td.has-inline-color-picker .wp-picker-container{margin-top:6px}.tabs-content .countdown_details .margin_left,.tabs-content td.has-inline-color-picker .wp-picker-container .wp-color-result{margin-left:0}}.tabs-content .wp-picker-holder{position:absolute;z-index:9999999}.tabs-content #subscribers_wrap .buttons{margin-top:8px}.tabs-content .bot-hint{background:#9f9f9f;padding:10px;float:right;border-radius:5px;color:#fff}.tabs-content .bot-button{display:inline-block}#sidebar .info_box ul{margin-top:10px;margin-bottom:-5px}#sidebar .resources_box ul,#sidebar .themes_box ul{margin-top:10px;margin-bottom:-15px}#sidebar .resources_box li,#sidebar .themes_box li{margin-bottom:10px}.chosen-container,.chosen-select{width:195px!important}.chosen-container-active .chosen-choices{-webkit-box-shadow:none!important;box-shadow:none!important;background-image:none!important}.chosen-container-multi .chosen-choices{border:1px solid #ddd!important;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.07) inset!important;box-shadow:inset 0 1px 2px rgba(0,0,0,.07)!important;background-image:none!important}.chosen-container .chosen-results li.highlighted{background-color:#0074a2!important;background-image:none!important}.button-big{min-height:40px!important;padding:12px 30px!important;font-size:16px!important;line-height:18px!important;font-weight:700}#footer-left .wpmm_rating:hover{text-decoration:none!important;color:#ffb900!important}.has-modal{overflow:hidden!important}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.35);z-index:100000;display:-webkit-box;display:-ms-flexbox;display:flex}.modal-frame{background-color:#fff;-webkit-box-shadow:0 0 10px rgba(0,0,0,.5);box-shadow:0 0 10px rgba(0,0,0,.5);margin:auto;max-width:480px}.modal-content{padding:45px 40px}.modal-header{font-weight:700;font-size:20px;line-height:23px;margin:0}.modal-text{margin:30px 0 40px}.buttons-wrap{gap:10px;display:-webkit-box;display:-ms-flexbox;display:flex}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}
|
assets/css/style-wizard.css
ADDED
@@ -0,0 +1,283 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wpmm-wizard-fullscreen #adminmenumain,
|
2 |
+
.wpmm-wizard-fullscreen #wpadminbar,
|
3 |
+
.wpmm-wizard-fullscreen .notice,
|
4 |
+
.wpmm-wizard-fullscreen .wrap .notice,
|
5 |
+
.wpmm-wizard-fullscreen .wrap .error,
|
6 |
+
.wpmm-wizard-fullscreen .wrap .updated,
|
7 |
+
.wpmm-wizard-fullscreen #wpfooter {
|
8 |
+
display: none !important;
|
9 |
+
}
|
10 |
+
|
11 |
+
.wp-toolbar .wpmm-wizard-fullscreen {
|
12 |
+
margin-top: -32px;
|
13 |
+
}
|
14 |
+
|
15 |
+
#wpwrap {
|
16 |
+
height: 100%;
|
17 |
+
}
|
18 |
+
|
19 |
+
#wp-content {
|
20 |
+
height: 100%;
|
21 |
+
}
|
22 |
+
|
23 |
+
#wpbody {
|
24 |
+
height: 100%;
|
25 |
+
}
|
26 |
+
|
27 |
+
#wpbody-content {
|
28 |
+
height: 100%;
|
29 |
+
padding: 0;
|
30 |
+
}
|
31 |
+
|
32 |
+
.wrap {
|
33 |
+
margin: 0;
|
34 |
+
height: 100%;
|
35 |
+
display: flex;
|
36 |
+
flex-direction: column;
|
37 |
+
}
|
38 |
+
|
39 |
+
.wpmm-wrapper {
|
40 |
+
flex-grow: 1;
|
41 |
+
display: flex;
|
42 |
+
}
|
43 |
+
|
44 |
+
h2.wpmm-title {
|
45 |
+
margin: 0 !important;
|
46 |
+
padding: 8px 48px 8px 188px !important;
|
47 |
+
background-color: #fff;
|
48 |
+
background-position: 130px;
|
49 |
+
position: relative;
|
50 |
+
}
|
51 |
+
|
52 |
+
h2.wpmm-title span {
|
53 |
+
position: absolute;
|
54 |
+
right: 75px;
|
55 |
+
top: 50%;
|
56 |
+
transform: translateY(-50%);
|
57 |
+
cursor: pointer;
|
58 |
+
}
|
59 |
+
|
60 |
+
h2.wpmm-title span img {
|
61 |
+
width: 25px;
|
62 |
+
}
|
63 |
+
|
64 |
+
.wpmm-wizard-fullscreen #wpcontent {
|
65 |
+
margin: 0;
|
66 |
+
padding: 0;
|
67 |
+
}
|
68 |
+
|
69 |
+
#wpmm-wizard-wrapper {
|
70 |
+
background-color: #f4f4f4;
|
71 |
+
overflow: hidden;
|
72 |
+
color: #1b1b1b;
|
73 |
+
width: 100%;
|
74 |
+
}
|
75 |
+
|
76 |
+
#wpmm-wizard-wrapper .slider-wrap {
|
77 |
+
width: 300%;
|
78 |
+
display: flex;
|
79 |
+
transition: 0.4s ease-in-out;
|
80 |
+
height: 100%;
|
81 |
+
}
|
82 |
+
|
83 |
+
.move-to-subscribe {
|
84 |
+
transform: translateX( calc( -100% / 3 ) );
|
85 |
+
}
|
86 |
+
|
87 |
+
.move-to-finish {
|
88 |
+
transform: translateX( calc( -100% / 3 * 2 ) );
|
89 |
+
}
|
90 |
+
|
91 |
+
#wpmm-wizard-wrapper .step-wrap {
|
92 |
+
width: calc( 100% / 3 );
|
93 |
+
display: flex;
|
94 |
+
}
|
95 |
+
|
96 |
+
.step.import-step {
|
97 |
+
margin-left: 130px;
|
98 |
+
margin-top: 100px;
|
99 |
+
}
|
100 |
+
|
101 |
+
.import-step .header {
|
102 |
+
font-size: 24px;
|
103 |
+
line-height: 28px;
|
104 |
+
margin-top: 0;
|
105 |
+
margin-bottom: 10px;
|
106 |
+
}
|
107 |
+
|
108 |
+
.import-step .description {
|
109 |
+
line-height: 30px;
|
110 |
+
font-size: 18px;
|
111 |
+
font-weight: 400;
|
112 |
+
color: currentColor;
|
113 |
+
max-width: 600px;
|
114 |
+
}
|
115 |
+
|
116 |
+
.templates-radio form {
|
117 |
+
display: flex;
|
118 |
+
flex-wrap: wrap;
|
119 |
+
margin-top: 65px;
|
120 |
+
max-width: 800px;
|
121 |
+
width: 100%;
|
122 |
+
gap: 35px;
|
123 |
+
}
|
124 |
+
|
125 |
+
.templates-radio [type=radio], .bullets-wrap [type=radio] {
|
126 |
+
position: absolute;
|
127 |
+
opacity: 0;
|
128 |
+
}
|
129 |
+
|
130 |
+
.templates-radio [type=radio] + .template {
|
131 |
+
cursor: pointer;
|
132 |
+
background-color: #fff;
|
133 |
+
width: 240px;
|
134 |
+
height: 250px;
|
135 |
+
display: block;
|
136 |
+
}
|
137 |
+
|
138 |
+
.templates-radio [type=radio]:checked + .template {
|
139 |
+
outline: 2px solid #0065A6;
|
140 |
+
}
|
141 |
+
|
142 |
+
.templates-radio .template {
|
143 |
+
position: relative;
|
144 |
+
border: 1px solid rgba(0, 0, 0, 0.2);
|
145 |
+
}
|
146 |
+
|
147 |
+
.templates-radio .template img {
|
148 |
+
width: 100%;
|
149 |
+
height: 100%;
|
150 |
+
object-fit: cover;
|
151 |
+
}
|
152 |
+
|
153 |
+
.templates-radio .template p {
|
154 |
+
position: absolute;
|
155 |
+
bottom: 15px;
|
156 |
+
transform: translateX(-50%);
|
157 |
+
left: 50%;
|
158 |
+
white-space: nowrap;
|
159 |
+
}
|
160 |
+
|
161 |
+
.import-button {
|
162 |
+
margin-top: 45px;
|
163 |
+
}
|
164 |
+
|
165 |
+
.dashicons-update {
|
166 |
+
position: absolute;
|
167 |
+
top: 50%;
|
168 |
+
left: 50%;
|
169 |
+
animation: abs-spin 2s linear infinite;
|
170 |
+
}
|
171 |
+
|
172 |
+
.templates-radio .template.loading img {
|
173 |
+
opacity: .2;
|
174 |
+
}
|
175 |
+
|
176 |
+
.import-text {
|
177 |
+
color: #717A84;
|
178 |
+
}
|
179 |
+
|
180 |
+
.templates-radio [type=radio] + .template {
|
181 |
+
width: 340px;
|
182 |
+
height: 357px;
|
183 |
+
}
|
184 |
+
|
185 |
+
.templates-radio .tag {
|
186 |
+
font-size: 15px;
|
187 |
+
margin: 0 0 12px 0;
|
188 |
+
color: #7a7979;
|
189 |
+
}
|
190 |
+
|
191 |
+
.finish-step, .subscribe-step {
|
192 |
+
display: flex;
|
193 |
+
flex-direction: column;
|
194 |
+
align-items: center;
|
195 |
+
text-align: center;
|
196 |
+
margin-top: 150px;
|
197 |
+
margin-left: auto;
|
198 |
+
margin-right: auto;
|
199 |
+
}
|
200 |
+
|
201 |
+
.finish-step h4 {
|
202 |
+
font-size: 24px;
|
203 |
+
max-width: 350px;
|
204 |
+
line-height: 28px;
|
205 |
+
}
|
206 |
+
|
207 |
+
.finish-step .buttons-wrap {
|
208 |
+
margin-top: 30px;
|
209 |
+
display: flex;
|
210 |
+
column-gap: 15px;
|
211 |
+
}
|
212 |
+
|
213 |
+
#view-page-button{
|
214 |
+
color: #555D66;
|
215 |
+
border-color: #555D66;
|
216 |
+
}
|
217 |
+
|
218 |
+
.finish-step p {
|
219 |
+
font-size: 18px;
|
220 |
+
max-width: 440px;
|
221 |
+
line-height: 31px;
|
222 |
+
}
|
223 |
+
|
224 |
+
.subscribe-step {
|
225 |
+
max-width: 365px;
|
226 |
+
}
|
227 |
+
|
228 |
+
.subscribe-step .skip-link {
|
229 |
+
margin-top: 15px;
|
230 |
+
color: #717A84 !important;
|
231 |
+
font-style: italic;
|
232 |
+
padding: 0 10px;
|
233 |
+
}
|
234 |
+
|
235 |
+
.subscribe-step h4 {
|
236 |
+
font-size: 24px;
|
237 |
+
}
|
238 |
+
|
239 |
+
.subscribe-step p {
|
240 |
+
color: #272626;
|
241 |
+
font-size: 18px;
|
242 |
+
}
|
243 |
+
|
244 |
+
#email-input-wrap {
|
245 |
+
position: relative;
|
246 |
+
display: flex;
|
247 |
+
flex-direction: column;
|
248 |
+
row-gap: 9px;
|
249 |
+
width: 100%;
|
250 |
+
}
|
251 |
+
|
252 |
+
#email-input-wrap input[type=text] {
|
253 |
+
color: #757575;
|
254 |
+
height: 43px;
|
255 |
+
}
|
256 |
+
|
257 |
+
input.invalid {
|
258 |
+
border-color: red !important;
|
259 |
+
border-width: 2px !important;
|
260 |
+
}
|
261 |
+
|
262 |
+
input.invalid:focus {
|
263 |
+
box-shadow: 0 0 1px red;
|
264 |
+
}
|
265 |
+
|
266 |
+
#email-input-wrap .subscribe-message {
|
267 |
+
font-size: inherit;
|
268 |
+
position: absolute;
|
269 |
+
right: -10px;
|
270 |
+
top: 0;
|
271 |
+
transform: translate(100%, -15%);
|
272 |
+
color: #717A84;
|
273 |
+
}
|
274 |
+
|
275 |
+
@keyframes abs-spin {
|
276 |
+
from {
|
277 |
+
transform: translate(-50%, -50%) rotate(0deg);
|
278 |
+
}
|
279 |
+
to {
|
280 |
+
transform: translate(-50%, -50%) rotate(360deg);
|
281 |
+
}
|
282 |
+
}
|
283 |
+
|
assets/css/style-wizard.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.wpmm-wizard-fullscreen #adminmenumain,.wpmm-wizard-fullscreen #wpadminbar,.wpmm-wizard-fullscreen #wpfooter,.wpmm-wizard-fullscreen .notice,.wpmm-wizard-fullscreen .wrap .error,.wpmm-wizard-fullscreen .wrap .notice,.wpmm-wizard-fullscreen .wrap .updated{display:none!important}.wp-toolbar .wpmm-wizard-fullscreen{margin-top:-32px}#wp-content,#wpbody,#wpwrap{height:100%}#wpbody-content{height:100%;padding:0}.wrap{margin:0;height:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.wpmm-wrapper,.wrap{display:-webkit-box;display:-ms-flexbox;display:flex}.wpmm-wrapper{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}h2.wpmm-title{margin:0!important;padding:8px 48px 8px 188px!important;background-color:#fff;background-position:130px;position:relative}h2.wpmm-title span{position:absolute;right:75px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);cursor:pointer}h2.wpmm-title span img{width:25px}.wpmm-wizard-fullscreen #wpcontent{margin:0;padding:0}#wpmm-wizard-wrapper{background-color:#f4f4f4;overflow:hidden;color:#1b1b1b;width:100%}#wpmm-wizard-wrapper .slider-wrap{width:300%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-transition:.4s ease-in-out;transition:.4s ease-in-out;height:100%}.move-to-subscribe{-webkit-transform:translateX(-33.33333%);transform:translateX(-33.33333%)}.move-to-finish{-webkit-transform:translateX(-66.66667%);transform:translateX(-66.66667%)}#wpmm-wizard-wrapper .step-wrap{width:33.33333%;display:-webkit-box;display:-ms-flexbox;display:flex}.step.import-step{margin-left:130px;margin-top:100px}.import-step .header{font-size:24px;line-height:28px;margin-top:0;margin-bottom:10px}.import-step .description{line-height:30px;font-size:18px;font-weight:400;color:currentColor;max-width:600px}.templates-radio form{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:65px;max-width:800px;width:100%;gap:35px}.bullets-wrap [type=radio],.templates-radio [type=radio]{position:absolute;opacity:0}.templates-radio [type=radio]+.template{cursor:pointer;background-color:#fff;width:240px;height:250px;display:block}.templates-radio [type=radio]:checked+.template{outline:2px solid #0065a6}.templates-radio .template{position:relative;border:1px solid rgba(0,0,0,.2)}.templates-radio .template img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.templates-radio .template p{position:absolute;bottom:15px;-webkit-transform:translateX(-50%);transform:translateX(-50%);left:50%;white-space:nowrap}.import-button{margin-top:45px}.dashicons-update{position:absolute;top:50%;left:50%;-webkit-animation:abs-spin 2s linear infinite;animation:abs-spin 2s linear infinite}.templates-radio .template.loading img{opacity:.2}.import-text{color:#717a84}.templates-radio [type=radio]+.template{width:340px;height:357px}.templates-radio .tag{font-size:15px;margin:0 0 12px;color:#7a7979}.finish-step,.subscribe-step{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;text-align:center;margin-top:150px;margin-left:auto;margin-right:auto}.finish-step h4{font-size:24px;max-width:350px;line-height:28px}.finish-step .buttons-wrap{margin-top:30px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px}#view-page-button{color:#555d66;border-color:#555d66}.finish-step p{font-size:18px;max-width:440px;line-height:31px}.subscribe-step{max-width:365px}.subscribe-step .skip-link{margin-top:15px;color:#717a84!important;font-style:italic;padding:0 10px}.subscribe-step h4{font-size:24px}.subscribe-step p{color:#272626;font-size:18px}#email-input-wrap{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;row-gap:9px;width:100%}#email-input-wrap input[type=text]{color:#757575;height:43px}input.invalid{border-color:red!important;border-width:2px!important}input.invalid:focus{-webkit-box-shadow:0 0 1px red;box-shadow:0 0 1px red}#email-input-wrap .subscribe-message{font-size:inherit;position:absolute;right:-10px;top:0;-webkit-transform:translate(100%,-15%);transform:translate(100%,-15%);color:#717a84}@-webkit-keyframes abs-spin{0%{-webkit-transform:translate(-50%,-50%) rotate(0deg);transform:translate(-50%,-50%) rotate(0deg)}to{-webkit-transform:translate(-50%,-50%) rotate(1turn);transform:translate(-50%,-50%) rotate(1turn)}}@keyframes abs-spin{0%{-webkit-transform:translate(-50%,-50%) rotate(0deg);transform:translate(-50%,-50%) rotate(0deg)}to{-webkit-transform:translate(-50%,-50%) rotate(1turn);transform:translate(-50%,-50%) rotate(1turn)}}
|
assets/css/style.bot.css
CHANGED
@@ -4,7 +4,6 @@
|
|
4 |
*/
|
5 |
.bot .wrap { margin-top: 60px; }
|
6 |
.bot .wrap h1 { margin-bottom: 50px; }
|
7 |
-
.wrap.under-bot { margin-top: 50px; }
|
8 |
.wrap.under-bot .countdown { margin-bottom: 50px; }
|
9 |
.wrap.under-bot .social { margin-bottom: 50px; }
|
10 |
|
@@ -29,17 +28,23 @@
|
|
29 |
}
|
30 |
|
31 |
.bot-container {
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
|
37 |
.background .bot-chat-wrapper {
|
38 |
border-radius: 10px;
|
39 |
background-color: rgb(255, 255, 255);
|
40 |
-
box-shadow:
|
41 |
-
max-width: 720px;
|
42 |
-
padding-left: 110px;
|
43 |
}
|
44 |
|
45 |
.chat-message-wrapper {
|
@@ -48,7 +53,6 @@
|
|
48 |
align-items: center;
|
49 |
margin-bottom: 16px;
|
50 |
width: 100%;
|
51 |
-
padding-left: 80px;
|
52 |
}
|
53 |
.chat-message-wrapper .chat-message {
|
54 |
max-width: 100%;
|
@@ -67,16 +71,6 @@
|
|
67 |
position: relative;
|
68 |
}
|
69 |
|
70 |
-
/* Show bot-avatar on last message. */
|
71 |
-
.chat-message-wrapper .bot-avatar {
|
72 |
-
display: none;
|
73 |
-
top: -18px;
|
74 |
-
}
|
75 |
-
.chat-message-wrapper:last-child .bot-avatar {
|
76 |
-
display: block;
|
77 |
-
}
|
78 |
-
/* ------------------------------ */
|
79 |
-
|
80 |
.chat-message-wrapper .message-date {
|
81 |
font-size: 12px;
|
82 |
color: #c3c3c3;
|
@@ -95,15 +89,20 @@ CHAT BOT STYLING
|
|
95 |
// CHAT BOT & TYPING WRAPPER
|
96 |
*/
|
97 |
.bot-chat-wrapper {
|
98 |
-
|
99 |
-
|
100 |
-
height: 460px;
|
101 |
-
padding-top: 45px;
|
102 |
-
padding-right: 40px;
|
103 |
-
padding-bottom: 45px;
|
104 |
-
padding-left: 75px;
|
105 |
overflow-y: scroll;
|
106 |
overflow-x: hidden;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
}
|
108 |
|
109 |
.typing-wrapper {
|
@@ -118,16 +117,20 @@ CHAT BOT STYLING
|
|
118 |
width: 60px;
|
119 |
height: 60px;
|
120 |
|
121 |
-
position:
|
122 |
-
|
123 |
-
|
124 |
|
125 |
background-size: cover;
|
126 |
background-repeat: no-repeat;
|
127 |
background-position: center;
|
128 |
|
129 |
border-radius: 50%;
|
130 |
-
|
|
|
|
|
|
|
|
|
131 |
}
|
132 |
|
133 |
.typing-wrapper .bot-name {
|
@@ -135,7 +138,6 @@ CHAT BOT STYLING
|
|
135 |
font-weight: bold;
|
136 |
}
|
137 |
|
138 |
-
|
139 |
/*
|
140 |
// CHAT MESSAGE LINE
|
141 |
*/
|
@@ -161,7 +163,6 @@ CHAT BOT STYLING
|
|
161 |
border-color: transparent #f4f4f4 transparent transparent;
|
162 |
}
|
163 |
|
164 |
-
|
165 |
/*
|
166 |
// HELPERS
|
167 |
*/
|
@@ -175,11 +176,12 @@ CHAT BOT STYLING
|
|
175 |
clear: both;
|
176 |
}
|
177 |
|
178 |
-
|
179 |
/*
|
180 |
// USER
|
181 |
*/
|
182 |
.chat-message.user {
|
|
|
|
|
183 |
animation: fade-in-right 0.2s linear 0.4s both;
|
184 |
background: #a0a0a0;
|
185 |
color: #fff;
|
@@ -197,7 +199,6 @@ CHAT BOT STYLING
|
|
197 |
color: #38a9d9;
|
198 |
}
|
199 |
|
200 |
-
|
201 |
/*
|
202 |
// USER CHOICES BUTTONS
|
203 |
*/
|
@@ -225,7 +226,6 @@ CHAT BOT STYLING
|
|
225 |
color: #fff;
|
226 |
}
|
227 |
|
228 |
-
|
229 |
/*
|
230 |
// NAME/EMAIL INPUT
|
231 |
*/
|
@@ -234,22 +234,23 @@ CHAT BOT STYLING
|
|
234 |
background: transparent;
|
235 |
border-bottom: 2px solid #6ecff9;
|
236 |
border-radius: 0;
|
237 |
-
padding: 10px;
|
|
|
|
|
238 |
}
|
239 |
|
240 |
.input { animation: fadeInGrownIn 0.5s ease; }
|
241 |
|
242 |
-
.input input {
|
|
|
243 |
border: none;
|
244 |
-
border-color: #fff;
|
245 |
color: #000;
|
246 |
background: none;
|
247 |
box-shadow: none;
|
248 |
-
margin-right: 60px;
|
249 |
font-size: 14px;
|
250 |
}
|
251 |
|
252 |
-
.input input:focus { outline: none; }
|
253 |
.input input::-webkit-input-placeholder { color: #c3c3c3; }
|
254 |
.input input:-ms-input-placeholder { color: #c3c3c3; }
|
255 |
.input input::-moz-placeholder { color: #c3c3c3; }
|
@@ -265,14 +266,19 @@ CHAT BOT STYLING
|
|
265 |
}
|
266 |
|
267 |
.bot-error {
|
268 |
-
|
269 |
-
|
270 |
-
line-height: 65px;
|
271 |
padding: 0 50px;
|
272 |
color: #fff;
|
273 |
-
font-size: 20px;
|
274 |
position: fixed;
|
275 |
-
bottom:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
}
|
277 |
|
278 |
/*
|
@@ -282,7 +288,7 @@ CHAT BOT STYLING
|
|
282 |
.typing {
|
283 |
border-radius: 5px;
|
284 |
background-color: #fff;
|
285 |
-
box-shadow:
|
286 |
width: 120px;
|
287 |
height: 40px;
|
288 |
display: flex;
|
@@ -290,7 +296,6 @@ CHAT BOT STYLING
|
|
290 |
align-items: center;
|
291 |
position: relative;
|
292 |
animation: fadeInGrownIn 0.5s ease;
|
293 |
-
/*margin-left: 90px;*/
|
294 |
}
|
295 |
|
296 |
/* Typing Dots ----*/
|
@@ -384,10 +389,7 @@ CHAT BOT STYLING
|
|
384 |
|
385 |
.bot-chat-wrapper,
|
386 |
.bg-image .bot-chat-wrapper {
|
387 |
-
|
388 |
-
padding-top: 20px;
|
389 |
-
padding-right: 20px;
|
390 |
-
padding-bottom: 20px;
|
391 |
}
|
392 |
|
393 |
.bg-image .bot-chat-wrapper {
|
@@ -403,18 +405,3 @@ CHAT BOT STYLING
|
|
403 |
font-size: 16px;
|
404 |
}
|
405 |
}
|
406 |
-
|
407 |
-
|
408 |
-
/*
|
409 |
-
// CUSTOM SCROLL BAR
|
410 |
-
*/
|
411 |
-
|
412 |
-
/* Hide scrollbar in Chrome (Webkit) */
|
413 |
-
.bot-chat-wrapper::-webkit-scrollbar {
|
414 |
-
width: 0px;
|
415 |
-
}
|
416 |
-
|
417 |
-
/* Hide scrollbar in Firefox */
|
418 |
-
.bot-chat-wrapper {
|
419 |
-
scrollbar-width: none;
|
420 |
-
}
|
4 |
*/
|
5 |
.bot .wrap { margin-top: 60px; }
|
6 |
.bot .wrap h1 { margin-bottom: 50px; }
|
|
|
7 |
.wrap.under-bot .countdown { margin-bottom: 50px; }
|
8 |
.wrap.under-bot .social { margin-bottom: 50px; }
|
9 |
|
28 |
}
|
29 |
|
30 |
.bot-container {
|
31 |
+
position: absolute;
|
32 |
+
bottom: 30px;
|
33 |
+
right: 30px;
|
34 |
+
}
|
35 |
+
|
36 |
+
.avatar-notice {
|
37 |
+
position: absolute;
|
38 |
+
top: 0;
|
39 |
+
right: 0;
|
40 |
+
border: 8px solid #df1c44;
|
41 |
+
border-radius: 100%;
|
42 |
}
|
43 |
|
44 |
.background .bot-chat-wrapper {
|
45 |
border-radius: 10px;
|
46 |
background-color: rgb(255, 255, 255);
|
47 |
+
box-shadow: 0 4px 40px rgba(0, 0, 0, 0.2);
|
|
|
|
|
48 |
}
|
49 |
|
50 |
.chat-message-wrapper {
|
53 |
align-items: center;
|
54 |
margin-bottom: 16px;
|
55 |
width: 100%;
|
|
|
56 |
}
|
57 |
.chat-message-wrapper .chat-message {
|
58 |
max-width: 100%;
|
71 |
position: relative;
|
72 |
}
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
.chat-message-wrapper .message-date {
|
75 |
font-size: 12px;
|
76 |
color: #c3c3c3;
|
89 |
// CHAT BOT & TYPING WRAPPER
|
90 |
*/
|
91 |
.bot-chat-wrapper {
|
92 |
+
height: 350px;
|
93 |
+
padding: 10px 40px;
|
|
|
|
|
|
|
|
|
|
|
94 |
overflow-y: scroll;
|
95 |
overflow-x: hidden;
|
96 |
+
|
97 |
+
width: 400px;
|
98 |
+
font-size: 16px;
|
99 |
+
position: fixed;
|
100 |
+
right: 30px;
|
101 |
+
bottom: 130px;
|
102 |
+
background-color: #fff;
|
103 |
+
|
104 |
+
box-shadow: rgba(0, 0, 0, 0.1) 0 12px 24px 0;
|
105 |
+
border-radius: 8px;
|
106 |
}
|
107 |
|
108 |
.typing-wrapper {
|
117 |
width: 60px;
|
118 |
height: 60px;
|
119 |
|
120 |
+
position: fixed;
|
121 |
+
bottom: 57px;
|
122 |
+
right: 30px;
|
123 |
|
124 |
background-size: cover;
|
125 |
background-repeat: no-repeat;
|
126 |
background-position: center;
|
127 |
|
128 |
border-radius: 50%;
|
129 |
+
box-shadow: rgba(0, 0, 0, 0.1) 0 12px 24px 0;
|
130 |
+
background-color: #fff;
|
131 |
+
|
132 |
+
z-index: 1;
|
133 |
+
cursor: pointer;
|
134 |
}
|
135 |
|
136 |
.typing-wrapper .bot-name {
|
138 |
font-weight: bold;
|
139 |
}
|
140 |
|
|
|
141 |
/*
|
142 |
// CHAT MESSAGE LINE
|
143 |
*/
|
163 |
border-color: transparent #f4f4f4 transparent transparent;
|
164 |
}
|
165 |
|
|
|
166 |
/*
|
167 |
// HELPERS
|
168 |
*/
|
176 |
clear: both;
|
177 |
}
|
178 |
|
|
|
179 |
/*
|
180 |
// USER
|
181 |
*/
|
182 |
.chat-message.user {
|
183 |
+
display: flex;
|
184 |
+
align-items: center;
|
185 |
animation: fade-in-right 0.2s linear 0.4s both;
|
186 |
background: #a0a0a0;
|
187 |
color: #fff;
|
199 |
color: #38a9d9;
|
200 |
}
|
201 |
|
|
|
202 |
/*
|
203 |
// USER CHOICES BUTTONS
|
204 |
*/
|
226 |
color: #fff;
|
227 |
}
|
228 |
|
|
|
229 |
/*
|
230 |
// NAME/EMAIL INPUT
|
231 |
*/
|
234 |
background: transparent;
|
235 |
border-bottom: 2px solid #6ecff9;
|
236 |
border-radius: 0;
|
237 |
+
padding: 10px 10px 10px 0;
|
238 |
+
white-space: nowrap;
|
239 |
+
max-width: unset;
|
240 |
}
|
241 |
|
242 |
.input { animation: fadeInGrownIn 0.5s ease; }
|
243 |
|
244 |
+
.bot-container .input input {
|
245 |
+
padding: 0 10px;
|
246 |
border: none;
|
|
|
247 |
color: #000;
|
248 |
background: none;
|
249 |
box-shadow: none;
|
|
|
250 |
font-size: 14px;
|
251 |
}
|
252 |
|
253 |
+
.input input:focus { outline: none !important; box-shadow: none !important; }
|
254 |
.input input::-webkit-input-placeholder { color: #c3c3c3; }
|
255 |
.input input:-ms-input-placeholder { color: #c3c3c3; }
|
256 |
.input input::-moz-placeholder { color: #c3c3c3; }
|
266 |
}
|
267 |
|
268 |
.bot-error {
|
269 |
+
background: #000;
|
270 |
+
line-height: 50px;
|
|
|
271 |
padding: 0 50px;
|
272 |
color: #fff;
|
|
|
273 |
position: fixed;
|
274 |
+
bottom: 20px;
|
275 |
+
right: 20px;
|
276 |
+
border-radius: 5px;
|
277 |
+
z-index: 5;
|
278 |
+
}
|
279 |
+
|
280 |
+
.bot-error p {
|
281 |
+
margin: 0;
|
282 |
}
|
283 |
|
284 |
/*
|
288 |
.typing {
|
289 |
border-radius: 5px;
|
290 |
background-color: #fff;
|
291 |
+
box-shadow: 0 7px 15px 0 rgba(0, 0, 0, 0.1);
|
292 |
width: 120px;
|
293 |
height: 40px;
|
294 |
display: flex;
|
296 |
align-items: center;
|
297 |
position: relative;
|
298 |
animation: fadeInGrownIn 0.5s ease;
|
|
|
299 |
}
|
300 |
|
301 |
/* Typing Dots ----*/
|
389 |
|
390 |
.bot-chat-wrapper,
|
391 |
.bg-image .bot-chat-wrapper {
|
392 |
+
padding: 20px;
|
|
|
|
|
|
|
393 |
}
|
394 |
|
395 |
.bg-image .bot-chat-wrapper {
|
405 |
font-size: 16px;
|
406 |
}
|
407 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/style.bot.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.bot .wrap{margin-top:60px}.bot .wrap h1
|
1 |
+
.bot .wrap{margin-top:60px}.bot .wrap h1,.wrap.under-bot .countdown,.wrap.under-bot .social{margin-bottom:50px}.bot-container *,.bot-container :after,.bot-container :before{-webkit-box-sizing:border-box;box-sizing:border-box}.bot-container p{margin-top:0;margin-bottom:16px}.bot-container a{text-decoration:none;cursor:pointer}.bot-container ul{list-style-type:none;padding-left:0}.bot-container{position:absolute;bottom:30px;right:30px}.avatar-notice{position:absolute;top:0;right:0;border:8px solid #df1c44;border-radius:100%}.background .bot-chat-wrapper{border-radius:10px;background-color:#fff;-webkit-box-shadow:0 4px 40px rgba(0,0,0,.2);box-shadow:0 4px 40px rgba(0,0,0,.2)}.chat-message-wrapper{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:16px;width:100%}.chat-message-wrapper .chat-message{max-width:100%;width:100%;color:#3a3e45;line-height:24px}.absolute-wrapper{position:absolute;left:0;bottom:20%}.message-details{position:relative}.chat-message-wrapper .message-date{font-size:12px;color:#c3c3c3}.chat-message-wrapper p,.typing-wrapper p{margin-bottom:0}.bot-chat-wrapper{height:350px;padding:10px 40px;overflow-y:scroll;overflow-x:hidden;width:400px;font-size:16px;position:fixed;right:30px;bottom:130px;background-color:#fff;-webkit-box-shadow:rgba(0,0,0,.1) 0 12px 24px 0;box-shadow:0 12px 24px 0 rgba(0,0,0,.1);border-radius:8px}.typing-wrapper{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:16px;position:relative}.bot-avatar{width:60px;height:60px;position:fixed;bottom:57px;right:30px;background-size:cover;background-repeat:no-repeat;background-position:50%;border-radius:50%;-webkit-box-shadow:rgba(0,0,0,.1) 0 12px 24px 0;box-shadow:0 12px 24px 0 rgba(0,0,0,.1);background-color:#fff;z-index:1;cursor:pointer}.typing-wrapper .bot-name{margin-right:22px;font-weight:700}.chat-message{background-color:#f4f4f4;border-radius:5px;padding:15px;max-width:75%;clear:both;position:relative;float:left;-webkit-animation:fade-in-left .2s linear both;animation:fade-in-left .2s linear both}.chat-message:before{content:" ";position:absolute;width:0;height:0;left:-20px;bottom:20%;border:10px solid transparent;border-right-color:#f4f4f4}.cf:after,.cf:before{content:" ";display:table}.cf:after{clear:both}.chat-message.user{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-animation:fade-in-right .2s linear .4s both;animation:fade-in-right .2s linear .4s both;background:#a0a0a0;color:#fff;float:right;padding:15px;font-size:14px}.chat-message a{color:#6ecff9;text-decoration:underline;-webkit-transition:all .3s ease;transition:all .3s ease}.chat-message a:hover{color:#38a9d9}.choices{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.choices .chat-message{background:none;color:#6ecff9;border:2px solid #6ecff9;cursor:pointer;-webkit-animation:fadeInGrownIn .5s ease;animation:fadeInGrownIn .5s ease;float:none;display:inline-block;-webkit-transition:all .3s ease;transition:all .3s ease}.choices .chat-message:first-child{margin-right:10px}.choices .chat-message:hover{background:#6ecff9;color:#fff}.input .chat-message.user{background:transparent;border-bottom:2px solid #6ecff9;border-radius:0;padding:10px 10px 10px 0;white-space:nowrap;max-width:unset}.input{-webkit-animation:fadeInGrownIn .5s ease;animation:fadeInGrownIn .5s ease}.bot-container .input input{padding:0 10px;border:none;color:#000;background:none;-webkit-box-shadow:none;box-shadow:none;font-size:14px}.input input:focus{outline:none!important;-webkit-box-shadow:none!important;box-shadow:none!important}.input input::-webkit-input-placeholder{color:#c3c3c3}.input input:-ms-input-placeholder{color:#c3c3c3}.input input:-moz-placeholder,.input input::-moz-placeholder{color:#c3c3c3}.input a{color:#6ecff9;text-decoration:none;text-transform:uppercase;cursor:pointer;font-size:14px;font-weight:700}.bot-error{background:#000;line-height:50px;padding:0 50px;color:#fff;position:fixed;bottom:20px;right:20px;border-radius:5px;z-index:5}.bot-error p{margin:0}.typing{border-radius:5px;background-color:#fff;-webkit-box-shadow:0 7px 15px 0 rgba(0,0,0,.1);box-shadow:0 7px 15px 0 rgba(0,0,0,.1);width:120px;height:40px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative;-webkit-animation:fadeInGrownIn .5s ease;animation:fadeInGrownIn .5s ease}.typing .dot{border-radius:50%;width:8px;height:8px;display:block;margin-right:12px;-webkit-animation:wave .9s linear infinite;animation:wave .9s linear infinite}.typing .dot:first-child{background-color:#4f3beb}.typing .dot:nth-child(2){background-color:#6292f3;-webkit-animation-delay:-.7s;animation-delay:-.7s}.typing .dot:nth-child(3){background-color:#6ecff9;-webkit-animation-delay:-.5s;animation-delay:-.5s;margin-right:0}.bot-chat-wrapper .chat-message.user:before,.typing:before{content:"";display:none}@-webkit-keyframes fadeInGrownIn{0%{opacity:0;-webkit-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes fadeInGrownIn{0%{opacity:0;-webkit-transform:scale(.9);transform:scale(.9)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes fade-in-left{0%{-webkit-transform:translateX(-50px);transform:translateX(-50px);opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@keyframes fade-in-left{0%{-webkit-transform:translateX(-50px);transform:translateX(-50px);opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@-webkit-keyframes fade-in-right{0%{-webkit-transform:translateX(50px);transform:translateX(50px);opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@keyframes fade-in-right{0%{-webkit-transform:translateX(50px);transform:translateX(50px);opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}}@-webkit-keyframes wave{0%,60%,to{-webkit-transform:initial;transform:none}30%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}}@keyframes wave{0%,60%,to{-webkit-transform:initial;transform:none}30%{-webkit-transform:translateY(-10px);transform:translateY(-10px)}}@media screen and (max-width:700px){.bot-avatar{display:none!important}.bg-image .bot-chat-wrapper,.bot-chat-wrapper{padding:20px}.bg-image .bot-chat-wrapper{margin-left:10px;margin-right:10px}.chat-message{max-width:100%}.input input{font-size:16px}}
|
assets/css/style.css
CHANGED
@@ -29,7 +29,6 @@ blockquote:before, blockquote:after, q:before, q:after {
|
|
29 |
content: none;
|
30 |
}
|
31 |
input, button {
|
32 |
-
/* -webkit-appearance: none; */
|
33 |
border-radius: 0;
|
34 |
}
|
35 |
table {
|
@@ -67,7 +66,6 @@ a {
|
|
67 |
}
|
68 |
body, html {
|
69 |
min-height: 100%;
|
70 |
-
/*height: 100%;*/
|
71 |
}
|
72 |
body {
|
73 |
background-color: #fff;
|
@@ -141,11 +139,7 @@ body {
|
|
141 |
background-color: #fff; /*2.3.0*/
|
142 |
}
|
143 |
.wrap form.subscribe_form {
|
144 |
-
/* box-sizing: border-box;
|
145 |
-
width: 450px; */
|
146 |
margin: 0 0 75px;
|
147 |
-
/* display: inline-block; */
|
148 |
-
/* border: 3px solid #e0e0e0; */
|
149 |
overflow: hidden;
|
150 |
text-align: center;
|
151 |
}
|
@@ -565,4 +559,4 @@ body {
|
|
565 |
top: 28px;
|
566 |
left: 32%;
|
567 |
}
|
568 |
-
}
|
29 |
content: none;
|
30 |
}
|
31 |
input, button {
|
|
|
32 |
border-radius: 0;
|
33 |
}
|
34 |
table {
|
66 |
}
|
67 |
body, html {
|
68 |
min-height: 100%;
|
|
|
69 |
}
|
70 |
body {
|
71 |
background-color: #fff;
|
139 |
background-color: #fff; /*2.3.0*/
|
140 |
}
|
141 |
.wrap form.subscribe_form {
|
|
|
|
|
142 |
margin: 0 0 75px;
|
|
|
|
|
143 |
overflow: hidden;
|
144 |
text-align: center;
|
145 |
}
|
559 |
top: 28px;
|
560 |
left: 32%;
|
561 |
}
|
562 |
+
}
|
assets/images/chatbot.png
ADDED
Binary file
|
assets/images/external.svg
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.71875 6.12524C3.71875 4.79631 4.79606 3.71899 6.125 3.71899H8.96875V5.03149H6.125C5.52094 5.03149 5.03125 5.52118 5.03125 6.12524V14.8752C5.03125 15.4793 5.52094 15.969 6.125 15.969H14.875C15.4791 15.969 15.9688 15.4793 15.9688 14.8752V11.6912H17.2813V14.8752C17.2813 16.2042 16.2039 17.2815 14.875 17.2815H6.125C4.79607 17.2815 3.71875 16.2042 3.71875 14.8752V6.12524Z" fill="#1E1E1E"/>
|
3 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.2955 3.95486L13.0358 3.96959L13.0299 2.65711L18.5489 2.63217L18.5016 8.1315L17.1891 8.1202L17.217 4.88953L11.6301 10.4763L10.7021 9.54826L16.2955 3.95486Z" fill="#1E1E1E"/>
|
4 |
+
</svg>
|
assets/images/finish-setup.svg
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg width="201" height="122" viewBox="0 0 201 122" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2 |
+
<path d="M157.477 76.922C158.353 93.0649 126.793 125.889 87.892 113.74C69.7997 108.089 71.3322 98.7092 57.5751 86.3477C49.3749 78.9801 37.5928 73.4091 34.3159 62.6995C31.4851 53.4558 33.2211 43.5203 38.1288 37.0577C49.1665 22.5237 71.4494 12.5716 93.4048 35.4708C115.36 58.37 155.213 35.2883 157.477 76.922Z" fill="url(#paint0_linear_285_614)"/>
|
3 |
+
<path d="M143.782 35.5714C140.89 40.733 134.556 41.4422 124.408 40.4612C116.777 39.7221 109.817 39.1503 102.185 34.989C96.8428 32.0785 92.6141 28.1408 89.5279 24.3161C86.1834 20.173 81.515 15.4444 83.8036 10.7465C86.9484 4.2935 105.135 -1.14183 122.795 7.74617C142.195 17.5127 146.611 30.5265 143.782 35.5714Z" fill="url(#paint1_linear_285_614)"/>
|
4 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M73.7296 100.076C72.767 100.593 71.6786 100.829 70.5886 100.757C69.4985 100.685 68.4505 100.309 67.564 99.6702C66.6774 99.0319 65.988 98.1574 65.5742 97.1464C65.1604 96.1354 65.0389 95.0284 65.2235 93.9517L69.4426 69.5366L51.5748 52.2375C50.8008 51.476 50.2546 50.5137 49.9978 49.4588C49.741 48.4038 49.7837 47.2982 50.1211 46.2662C50.4585 45.2342 51.0772 44.3168 51.9076 43.6174C52.7381 42.9179 53.7472 42.4641 54.8216 42.307L79.5235 38.7442L90.5572 16.5117C91.0458 15.5353 91.7966 14.7143 92.7255 14.1404C93.6544 13.5666 94.7246 13.2627 95.8165 13.2627C96.9083 13.2627 97.9785 13.5666 98.9074 14.1404C99.8363 14.7143 100.587 15.5353 101.076 16.5117L112.109 38.7442L136.811 42.307C137.886 42.4639 138.895 42.9175 139.726 43.617C140.556 44.3164 141.175 45.2338 141.513 46.2658C141.85 47.2979 141.893 48.4037 141.636 49.4587C141.379 50.5138 140.833 51.4761 140.058 52.2375L122.181 69.527L126.4 93.9421C126.586 95.0195 126.466 96.1275 126.053 97.1398C125.64 98.1521 124.951 99.028 124.064 99.6675C123.177 100.307 122.128 100.684 121.037 100.757C119.946 100.829 118.857 100.593 117.894 100.076L95.8069 88.5612L73.7296 100.076ZM16.1462 100.434C15.67 100.689 15.1315 100.806 14.5922 100.771C14.0528 100.735 13.5343 100.549 13.0956 100.233C12.6569 99.9174 12.3158 99.4847 12.111 98.9845C11.9063 98.4842 11.8462 97.9366 11.9375 97.4038L14.025 85.3246L5.18429 76.7661C4.8012 76.3894 4.53087 75.9133 4.40374 75.3913C4.2766 74.8693 4.29772 74.3222 4.4647 73.8116C4.63169 73.3009 4.93791 72.847 5.34889 72.501C5.75987 72.155 6.25929 71.9305 6.79092 71.853L19.013 70.0903L24.4723 59.091C24.7141 58.608 25.0856 58.2018 25.5452 57.918C26.0048 57.6341 26.5343 57.4838 27.0744 57.4838C27.6146 57.4838 28.1441 57.6341 28.6037 57.918C29.0633 58.2018 29.4348 58.608 29.6766 59.091L35.1359 70.0903L47.3582 71.853C47.8898 71.9306 48.3892 72.155 48.8002 72.5011C49.2111 72.8471 49.5173 73.301 49.6843 73.8117C49.8512 74.3223 49.8723 74.8694 49.7452 75.3914C49.618 75.9133 49.3477 76.3895 48.9646 76.7661L40.1191 85.3198L42.2066 97.399C42.299 97.9321 42.2397 98.4805 42.0354 98.9815C41.8311 99.4825 41.49 99.916 41.0512 100.232C40.6123 100.549 40.0933 100.736 39.5534 100.771C39.0135 100.807 38.4745 100.69 37.9979 100.434L27.0698 94.737L16.1462 100.434ZM153.61 100.434C153.134 100.689 152.596 100.806 152.056 100.771C151.517 100.735 150.998 100.549 150.56 100.233C150.121 99.9174 149.78 99.4847 149.575 98.9845C149.37 98.4842 149.31 97.9366 149.402 97.4038L151.489 85.3246L142.648 76.7661C142.265 76.3894 141.995 75.9133 141.868 75.3913C141.741 74.8693 141.762 74.3222 141.929 73.8116C142.096 73.3009 142.402 72.847 142.813 72.501C143.224 72.155 143.723 71.9305 144.255 71.853L156.477 70.0903L161.936 59.091C162.178 58.608 162.55 58.2018 163.009 57.918C163.469 57.6341 163.998 57.4838 164.538 57.4838C165.079 57.4838 165.608 57.6341 166.068 57.918C166.527 58.2018 166.899 58.608 167.141 59.091L172.6 70.0903L184.822 71.853C185.354 71.9306 185.853 72.1551 186.264 72.5012C186.675 72.8472 186.981 73.3011 187.148 73.8117C187.315 74.3223 187.336 74.8693 187.209 75.3913C187.082 75.9133 186.812 76.3894 186.429 76.7661L177.583 85.3198L179.671 97.399C179.763 97.9321 179.704 98.4804 179.499 98.9813C179.295 99.4822 178.954 99.9156 178.515 100.232C178.076 100.548 177.557 100.735 177.017 100.771C176.478 100.806 175.939 100.69 175.462 100.434L164.534 94.737L153.61 100.434Z" fill="#63A18F" stroke="#63A18F" stroke-width="7.28784" stroke-linecap="round" stroke-linejoin="round"/>
|
5 |
+
<path d="M103.909 55.3918L93.7842 65.5166L87.7036 59.4408" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
|
6 |
+
<path d="M171.755 54.0817C165.947 55.4577 159.805 50.5321 159.805 50.5321C159.805 50.5321 163.082 43.3787 168.892 42.0069C174.7 40.631 180.841 45.5523 180.841 45.5523C180.841 45.5523 177.563 52.7058 171.755 54.0817Z" fill="url(#paint2_linear_285_614)"/>
|
7 |
+
<path d="M192.205 95.3401C195.64 97.7064 200.889 96.0524 200.889 96.0524C200.889 96.0524 200.564 90.5622 197.126 88.1981C193.691 85.8319 188.444 87.4836 188.444 87.4836C188.444 87.4836 188.769 92.9738 192.205 95.3401Z" fill="url(#paint3_linear_285_614)"/>
|
8 |
+
<path d="M50.8889 112.929C53.5397 115.627 58.4968 115.058 58.4968 115.058C58.4968 115.058 59.1525 110.115 56.4995 107.419C53.8487 104.721 48.8942 105.288 48.8942 105.288C48.8942 105.288 48.2382 110.231 50.8889 112.929Z" fill="url(#paint4_linear_285_614)"/>
|
9 |
+
<path d="M177.416 72.4417C175.073 72.4417 173.174 74.2584 173.174 76.4994C173.174 78.7404 175.073 80.5571 177.416 80.5571C179.759 80.5571 181.658 78.7404 181.658 76.4994C181.658 74.2584 179.759 72.4417 177.416 72.4417Z" fill="#63A18F"/>
|
10 |
+
<path d="M95.9941 110.91C92.8362 110.91 90.2762 113.387 90.2762 116.443C90.2762 119.499 92.8362 121.976 95.9941 121.976C99.152 121.976 101.712 119.499 101.712 116.443C101.712 113.387 99.152 110.91 95.9941 110.91Z" fill="#63A18F"/>
|
11 |
+
<path d="M31.216 40.3153C28.9164 40.3153 27.0521 38.4511 27.0521 36.1514C27.0521 33.8518 28.9164 31.9875 31.216 31.9875C33.5157 31.9875 35.3799 33.8518 35.3799 36.1514C35.3799 38.4511 33.5157 40.3153 31.216 40.3153Z" fill="#63A18F"/>
|
12 |
+
<path d="M122.227 25.5148C120.088 25.5148 118.354 23.7806 118.354 21.6413C118.354 19.502 120.088 17.7678 122.227 17.7678C124.366 17.7678 126.101 19.502 126.101 21.6413C126.101 23.7806 124.366 25.5148 122.227 25.5148Z" fill="#63A18F"/>
|
13 |
+
<path d="M168.916 116.566C166.992 116.566 165.432 115.007 165.432 113.083C165.432 111.159 166.992 109.599 168.916 109.599C170.84 109.599 172.399 111.159 172.399 113.083C172.399 115.007 170.84 116.566 168.916 116.566Z" fill="#E1E4E5"/>
|
14 |
+
<path d="M15.0275 99.3983C13.7844 99.3983 12.7767 98.3906 12.7767 97.1475C12.7767 95.9044 13.7844 94.8967 15.0275 94.8967C16.2706 94.8967 17.2783 95.9044 17.2783 97.1475C17.2783 98.3906 16.2706 99.3983 15.0275 99.3983Z" fill="white"/>
|
15 |
+
<path d="M75.6491 121.473C74.652 121.473 73.8436 120.664 73.8436 119.667C73.8436 118.67 74.652 117.862 75.6491 117.862C76.6462 117.862 77.4546 118.67 77.4546 119.667C77.4546 120.664 76.6462 121.473 75.6491 121.473Z" fill="#E1E4E5"/>
|
16 |
+
<path d="M150.632 25.5628C149.11 25.5628 147.877 24.3291 147.877 22.8073C147.877 21.2855 149.11 20.0518 150.632 20.0518C152.154 20.0518 153.388 21.2855 153.388 22.8073C153.388 24.3291 152.154 25.5628 150.632 25.5628Z" fill="#E1E4E5"/>
|
17 |
+
<path d="M32.9186 67.7775C33.1763 68.739 32.6057 69.7273 31.6442 69.9849C30.6827 70.2426 29.6943 69.672 29.4367 68.7105C29.1791 67.7489 29.7497 66.7606 30.7112 66.503C31.6727 66.2454 32.661 66.816 32.9186 67.7775Z" fill="white"/>
|
18 |
+
<path d="M68.9733 28.8027C67.649 28.8027 66.5754 27.7292 66.5754 26.4049C66.5754 25.0806 67.649 24.0071 68.9733 24.0071C70.2975 24.0071 71.3711 25.0806 71.3711 26.4049C71.3711 27.7292 70.2975 28.8027 68.9733 28.8027Z" fill="#E1E4E5"/>
|
19 |
+
<path d="M148.054 74.3598C147.035 74.3598 146.21 73.6991 146.21 72.8841C146.21 72.0691 147.035 71.4084 148.054 71.4084C149.073 71.4084 149.898 72.0691 149.898 72.8841C149.898 73.6991 149.073 74.3598 148.054 74.3598Z" fill="white"/>
|
20 |
+
<path d="M177.845 99.7371C176.355 100.464 174.682 100.1 174.108 98.9234C173.534 97.7471 174.277 96.2041 175.767 95.4772C177.257 94.7502 178.93 95.1145 179.504 96.2909C180.078 97.4672 179.335 99.0102 177.845 99.7371Z" fill="white"/>
|
21 |
+
<path d="M114.04 3.99403C114.539 5.8562 113.433 7.77028 111.571 8.26925C109.709 8.76821 107.795 7.66312 107.296 5.80095C106.797 3.93878 107.902 2.02471 109.764 1.52574C111.626 1.02677 113.541 2.13187 114.04 3.99403Z" fill="#E1E4E5"/>
|
22 |
+
<path d="M191.177 55.4113H191.225C191.511 59.4597 194.521 59.5219 194.521 59.5219C194.521 59.5219 191.201 59.5867 191.201 64.2646C191.201 59.5867 187.881 59.5219 187.881 59.5219C187.881 59.5219 190.891 59.4597 191.177 55.4113ZM53.2905 4.73071H53.3736C53.8657 11.8155 59.0509 11.9245 59.0509 11.9245C59.0509 11.9245 53.3331 12.038 53.3331 20.2241C53.3331 12.038 47.6152 11.9245 47.6152 11.9245C47.6152 11.9245 52.7985 11.8155 53.2905 4.73071Z" fill="#E1E4E5"/>
|
23 |
+
<defs>
|
24 |
+
<linearGradient id="paint0_linear_285_614" x1="119.756" y1="173.685" x2="60.7199" y2="-92.6641" gradientUnits="userSpaceOnUse">
|
25 |
+
<stop stop-color="white"/>
|
26 |
+
<stop offset="1" stop-color="#EEEEEE"/>
|
27 |
+
</linearGradient>
|
28 |
+
<linearGradient id="paint1_linear_285_614" x1="124.299" y1="69.023" x2="98.5207" y2="-46.813" gradientUnits="userSpaceOnUse">
|
29 |
+
<stop stop-color="white"/>
|
30 |
+
<stop offset="1" stop-color="#EEEEEE"/>
|
31 |
+
</linearGradient>
|
32 |
+
<linearGradient id="paint2_linear_285_614" x1="149.884" y1="57.5026" x2="200.726" y2="33.4834" gradientUnits="userSpaceOnUse">
|
33 |
+
<stop stop-color="white"/>
|
34 |
+
<stop offset="1" stop-color="#EEEEEE"/>
|
35 |
+
</linearGradient>
|
36 |
+
<linearGradient id="paint3_linear_285_614" x1="205.588" y1="103.105" x2="178.544" y2="74.5877" gradientUnits="userSpaceOnUse">
|
37 |
+
<stop stop-color="white"/>
|
38 |
+
<stop offset="1" stop-color="#EEEEEE"/>
|
39 |
+
</linearGradient>
|
40 |
+
<linearGradient id="paint4_linear_285_614" x1="61.465" y1="122.145" x2="42.3015" y2="92.104" gradientUnits="userSpaceOnUse">
|
41 |
+
<stop stop-color="white"/>
|
42 |
+
<stop offset="1" stop-color="#EEEEEE"/>
|
43 |
+
</linearGradient>
|
44 |
+
</defs>
|
45 |
+
</svg>
|
assets/images/subscribe.svg
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg width="199" height="156" viewBox="0 0 199 156" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2 |
+
<path d="M163.846 102.564C180.535 106.518 198.187 92.3636 198.187 92.3636C198.187 92.3636 188.768 71.8065 172.072 67.8649C155.382 63.9109 137.735 78.0531 137.735 78.0531C137.735 78.0531 147.155 98.6103 163.846 102.564Z" fill="url(#paint0_linear_333_629)"/>
|
3 |
+
<path d="M57.6574 62.3048C42.5258 72.7269 19.4092 65.4413 19.4092 65.4413C19.4092 65.4413 20.8405 41.2604 35.982 30.8482C51.1136 20.4261 74.2199 27.7013 74.2199 27.7013C74.2199 27.7013 72.7886 51.8823 57.6574 62.3048Z" fill="url(#paint1_linear_333_629)"/>
|
4 |
+
<path d="M91.7018 27.9272C94.567 27.9272 96.8898 25.6044 96.8898 22.7391C96.8898 19.8738 94.567 17.551 91.7018 17.551C88.8365 17.551 86.5137 19.8738 86.5137 22.7391C86.5137 25.6044 88.8365 27.9272 91.7018 27.9272Z" fill="#E1E4E5"/>
|
5 |
+
<path d="M152.147 127.577C153.723 127.577 155 126.619 155 125.437C155 124.255 153.723 123.297 152.147 123.297C150.571 123.297 149.293 124.255 149.293 125.437C149.293 126.619 150.571 127.577 152.147 127.577Z" fill="#E1E4E5"/>
|
6 |
+
<path d="M189.24 66.5866C190.816 66.5866 192.093 65.6285 192.093 64.4466C192.093 63.2648 190.816 62.3066 189.24 62.3066C187.664 62.3066 186.387 63.2648 186.387 64.4466C186.387 65.6285 187.664 66.5866 189.24 66.5866Z" fill="#E1E4E5"/>
|
7 |
+
<path d="M72.9666 121.157C74.5425 121.157 75.8199 120.199 75.8199 119.017C75.8199 117.835 74.5425 116.877 72.9666 116.877C71.3908 116.877 70.1133 117.835 70.1133 119.017C70.1133 120.199 71.3908 121.157 72.9666 121.157Z" fill="#E1E4E5"/>
|
8 |
+
<path d="M161.42 46.6133C162.996 46.6133 164.274 45.6551 164.274 44.4733C164.274 43.2914 162.996 42.3333 161.42 42.3333C159.844 42.3333 158.567 43.2914 158.567 44.4733C158.567 45.6551 159.844 46.6133 161.42 46.6133Z" fill="#E1E4E5"/>
|
9 |
+
<path d="M22.5859 98.6575H22.4995C21.9884 105.775 16.6021 105.885 16.6021 105.885C16.6021 105.885 22.5416 105.999 22.5416 114.223C22.5416 105.999 28.4812 105.885 28.4812 105.885C28.4812 105.885 23.0973 105.775 22.5859 98.6575Z" fill="#E1E4E5"/>
|
10 |
+
<path d="M111.13 146.123H94.0098V104.393H111.13V146.123Z" fill="white" stroke="#E1E4E5" stroke-width="3.92333"/>
|
11 |
+
<path d="M124.327 153.257H80.4565V142.2H124.327V153.257Z" fill="white" stroke="#E1E4E5" stroke-width="3.92333" stroke-linejoin="round"/>
|
12 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M137.602 43.2432H62.8297C49.6904 43.2432 39.0386 53.895 39.0386 67.0343V104.42C39.0386 108.173 42.0841 111.218 45.8363 111.218H154.595C158.348 111.218 161.393 108.173 161.393 104.42V67.0343C161.393 53.895 150.741 43.2432 137.602 43.2432Z" fill="white" stroke="#E1E4E5" stroke-width="3.92333"/>
|
13 |
+
<path d="M113.811 22.8511V70.4333" stroke="#E1E4E5" stroke-width="3.92333"/>
|
14 |
+
<path d="M113.804 67.8835C113.128 67.8868 112.482 68.1575 112.005 68.6365C111.529 69.1155 111.261 69.7638 111.262 70.4394C111.262 71.8465 112.404 72.9885 113.811 72.9817C114.487 72.9815 115.135 72.7128 115.613 72.2348C116.091 71.7568 116.36 71.1086 116.36 70.4326C116.36 69.0256 115.218 67.8835 113.804 67.8835Z" stroke="#E1E4E5" stroke-width="4.71906" stroke-linecap="round" stroke-linejoin="round"/>
|
15 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M62.8301 43.2432C75.9697 43.2432 86.6212 53.895 86.6212 67.0343V111.218" fill="white"/>
|
16 |
+
<path d="M62.8301 43.2432C75.9697 43.2432 86.6212 53.895 86.6212 67.0343V111.218" stroke="#E1E4E5" stroke-width="3.92333"/>
|
17 |
+
<path d="M161.88 28.0688C162.341 28.8524 161.776 29.84 160.867 29.84H112.049C111.737 29.84 111.438 29.7161 111.217 29.4957C110.997 29.2752 110.873 28.9762 110.873 28.6644V4.37897C110.873 2.48863 112.402 0.959961 114.292 0.959961H160.902C161.813 0.959961 162.377 1.94971 161.915 2.73331L154.787 14.8036C154.68 14.9844 154.624 15.1903 154.623 15.4002C154.623 15.61 154.679 15.8161 154.785 15.997L161.88 28.0688Z" fill="#63A18F"/>
|
18 |
+
<path d="M18.0887 52.5475L10.1857 80.1688C10.0569 80.6177 10.0178 81.0876 10.0707 81.5516C10.1235 82.0157 10.2673 82.4647 10.4937 82.8732C10.7201 83.2817 11.0247 83.6416 11.3902 83.9323C11.7557 84.223 12.1749 84.4389 12.6239 84.5676L60.5945 98.2903C62.0811 98.7144 63.6172 98.1259 64.4657 96.9336C64.7011 96.6044 64.8782 96.2373 64.9893 95.8482L72.8881 68.2383C73.4309 66.3505 72.3377 64.3824 70.4538 63.8438L22.4832 50.1171C20.5993 49.5782 18.6387 50.6636 18.0887 52.5475Z" fill="white" stroke="#E1E4E5" stroke-width="3.92333"/>
|
19 |
+
<path d="M10.0591 81.3844C10.1082 82.1142 10.3811 82.811 10.8406 83.38C11.3002 83.9491 11.924 84.3625 12.6271 84.5641L60.5941 98.2908C61.3004 98.4923 62.0519 98.47 62.745 98.2271C63.4382 97.9841 64.0391 97.5324 64.465 96.934L40.0344 74.6741L10.0591 81.3844Z" fill="white" stroke="#E1E4E5" stroke-width="3.92333"/>
|
20 |
+
<path d="M18.0889 52.5475L39.5652 79.2137L72.4834 69.6521L72.8882 68.2383C73.431 66.3505 72.3379 64.3824 70.4539 63.8438L22.4834 50.1171C20.5994 49.5782 18.6388 50.6636 18.0889 52.5475Z" fill="white" stroke="#E1E4E5" stroke-width="3.92333"/>
|
21 |
+
<path d="M18.7532 66.9434C28.9963 66.9434 37.2999 58.6398 37.2999 48.3968C37.2999 38.1537 28.9963 29.8501 18.7532 29.8501C8.51017 29.8501 0.206543 38.1537 0.206543 48.3968C0.206543 58.6398 8.51017 66.9434 18.7532 66.9434Z" fill="#63A18F"/>
|
22 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.5471 39.8367C11.0867 39.8367 8.7666 43.0253 8.7666 45.9945C8.7666 52.0218 18.3995 56.9567 18.5749 56.9567C18.7504 56.9567 28.3833 52.0218 28.3833 45.9945C28.3833 43.0253 26.0632 39.8367 22.6028 39.8367C20.6247 39.8367 19.3257 40.805 18.5749 41.6674C17.8242 40.805 16.5248 39.8367 14.5471 39.8367ZM141.09 155.04V142.2V155.04Z" fill="white"/>
|
23 |
+
<path d="M141.09 155.04V142.2" stroke="#E1E4E5" stroke-width="3.92333"/>
|
24 |
+
<path d="M166.057 155.04V147.193" stroke="#E1E4E5" stroke-width="3.92333"/>
|
25 |
+
<path d="M135.383 155.04V146.123" stroke="#E1E4E5" stroke-width="3.92333"/>
|
26 |
+
<path d="M160.35 155.04V149.69" stroke="#E1E4E5" stroke-width="3.92333"/>
|
27 |
+
<path d="M146.44 155.04V146.123" stroke="#E1E4E5" stroke-width="3.92333"/>
|
28 |
+
<path d="M171.407 155.04V149.69" stroke="#E1E4E5" stroke-width="3.92333"/>
|
29 |
+
<path d="M64.0498 155.04V142.2" stroke="#E1E4E5" stroke-width="3.92333"/>
|
30 |
+
<path d="M39.0835 155.04V147.193" stroke="#E1E4E5" stroke-width="3.92333"/>
|
31 |
+
<path d="M69.7568 155.04V146.123" stroke="#E1E4E5" stroke-width="3.92333"/>
|
32 |
+
<path d="M44.79 155.04V149.69" stroke="#E1E4E5" stroke-width="3.92333"/>
|
33 |
+
<path d="M58.7002 155.04V146.123" stroke="#E1E4E5" stroke-width="3.92333"/>
|
34 |
+
<path d="M33.7334 155.04V149.69" stroke="#E1E4E5" stroke-width="3.92333"/>
|
35 |
+
<defs>
|
36 |
+
<linearGradient id="paint0_linear_333_629" x1="226.695" y1="112.395" x2="80.592" y2="43.3705" gradientUnits="userSpaceOnUse">
|
37 |
+
<stop stop-color="white"/>
|
38 |
+
<stop offset="1" stop-color="#EEEEEE"/>
|
39 |
+
</linearGradient>
|
40 |
+
<linearGradient id="paint1_linear_333_629" x1="-1.28569" y1="96.5016" x2="117.825" y2="-29.0971" gradientUnits="userSpaceOnUse">
|
41 |
+
<stop stop-color="white"/>
|
42 |
+
<stop offset="1" stop-color="#EEEEEE"/>
|
43 |
+
</linearGradient>
|
44 |
+
</defs>
|
45 |
+
</svg>
|
assets/js/bot.js
CHANGED
@@ -1,13 +1,15 @@
|
|
1 |
-
|
|
|
|
|
2 |
|
3 |
// User info retrieved from chats is store in this object
|
4 |
-
|
5 |
|
6 |
// Cache conversation position
|
7 |
-
|
8 |
|
9 |
// Cache conversation status
|
10 |
-
|
11 |
|
12 |
/*
|
13 |
---------------
|
@@ -15,178 +17,167 @@ var conversationStarted = false;
|
|
15 |
---------------
|
16 |
*/
|
17 |
|
18 |
-
function getCurrentTime() {
|
19 |
-
var date = new Date();
|
20 |
-
var hours = date.getHours();
|
21 |
-
var minutes = date.getMinutes();
|
22 |
-
var ampm = hours >= 12 ? 'PM' : 'AM';
|
23 |
-
hours = hours % 12;
|
24 |
-
hours = hours ? hours : 12;
|
25 |
-
minutes = minutes < 10 ? '0' + minutes : minutes;
|
26 |
-
var strTime = hours + ':' + minutes + ' ' + ampm;
|
27 |
-
return strTime;
|
28 |
-
}
|
29 |
-
|
30 |
/**
|
31 |
* Cast string
|
32 |
-
*
|
33 |
-
* @param
|
34 |
-
* @
|
35 |
*/
|
36 |
-
function _phpCastString(value) {
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
}
|
72 |
|
73 |
/**
|
74 |
* Strip tags from a string
|
75 |
-
*
|
76 |
* big thanks to http://locutus.io/php/strings/strip_tags/
|
77 |
-
*
|
78 |
-
* @param
|
79 |
-
* @param
|
80 |
-
* @
|
|
|
|
|
81 |
*/
|
82 |
-
function
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
}
|
106 |
|
107 |
-
function renderStatement(statement) {
|
108 |
-
|
109 |
-
|
110 |
|
111 |
-
|
112 |
}
|
113 |
|
114 |
function showTyping() {
|
115 |
-
|
116 |
}
|
117 |
|
118 |
function hideTyping() {
|
119 |
-
|
120 |
}
|
121 |
|
122 |
-
|
123 |
|
124 |
function scrollToBottom() {
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
}
|
129 |
|
130 |
/**
|
131 |
* Input checking
|
|
|
|
|
132 |
*/
|
133 |
-
function inputError(msg) {
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
}
|
140 |
|
141 |
-
function checkInput(option) {
|
142 |
-
|
143 |
|
144 |
-
|
145 |
-
|
146 |
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
|
153 |
-
|
154 |
}
|
155 |
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
inputError(botVars.validationEmail);
|
179 |
-
}
|
180 |
-
return false;
|
181 |
}
|
182 |
|
183 |
function clearChat() {
|
184 |
-
|
185 |
}
|
186 |
|
187 |
function clearFooter() {
|
188 |
-
|
189 |
-
|
190 |
}
|
191 |
|
192 |
/*
|
@@ -195,28 +186,26 @@ function clearFooter() {
|
|
195 |
------------------------
|
196 |
*/
|
197 |
|
198 |
-
function startConversation(conv, pos) {
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
conversationStarted = true;
|
205 |
|
206 |
-
|
207 |
-
clearChat();
|
208 |
|
209 |
-
|
210 |
-
|
211 |
-
conversationPos = conv;
|
212 |
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
showStatement(pos);
|
217 |
-
|
218 |
-
});
|
219 |
|
|
|
|
|
|
|
|
|
|
|
220 |
}
|
221 |
|
222 |
/*
|
@@ -224,268 +213,251 @@ function startConversation(conv, pos) {
|
|
224 |
Show Bot Statement
|
225 |
-------------------
|
226 |
*/
|
227 |
-
function showStatement(pos) {
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
|
|
|
|
|
|
248 |
------------------------
|
249 |
Render Bot Statement(s)
|
250 |
------------------------
|
251 |
Run this function over each statement
|
252 |
*/
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
hideTyping();
|
274 |
-
renderStatement(item);
|
275 |
-
scrollToBottom();
|
276 |
-
|
277 |
-
callback();
|
278 |
-
}, delay);
|
279 |
-
},
|
280 |
-
/*
|
281 |
----------------------
|
282 |
Render User Option(s)
|
283 |
----------------------
|
284 |
This is the final callback of the series
|
285 |
*/
|
286 |
-
|
287 |
-
|
288 |
-
/*
|
289 |
----------------------------
|
290 |
If User Option is Button(s)
|
291 |
----------------------------
|
292 |
*/
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
}).appendTo('.choices');
|
337 |
-
}
|
338 |
-
|
339 |
-
}, 750);
|
340 |
-
|
341 |
-
}
|
342 |
-
|
343 |
-
/*
|
344 |
------------------------
|
345 |
If User Option is Input
|
346 |
------------------------
|
347 |
*/
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
|
352 |
-
|
353 |
|
354 |
-
|
355 |
-
/*
|
356 |
Render Input
|
357 |
---------------
|
358 |
*/
|
359 |
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
------------------------
|
395 |
If User Option is Email
|
396 |
------------------------
|
397 |
*/
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
|
402 |
-
|
403 |
|
404 |
-
|
405 |
Render Input
|
406 |
---------------
|
407 |
*/
|
408 |
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
}
|
455 |
|
456 |
/*
|
457 |
---------------------
|
458 |
Render User Response
|
459 |
---------------------
|
460 |
*/
|
461 |
-
function showResponse(option) {
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
}
|
489 |
}
|
490 |
|
491 |
/*
|
@@ -494,4 +466,21 @@ function showResponse(option) {
|
|
494 |
-------------------
|
495 |
*/
|
496 |
|
497 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global jQuery, botVars */
|
2 |
+
|
3 |
+
const DEBUG = false;
|
4 |
|
5 |
// User info retrieved from chats is store in this object
|
6 |
+
const context = {};
|
7 |
|
8 |
// Cache conversation position
|
9 |
+
let conversationPos;
|
10 |
|
11 |
// Cache conversation status
|
12 |
+
let conversationStarted = false;
|
13 |
|
14 |
/*
|
15 |
---------------
|
17 |
---------------
|
18 |
*/
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
/**
|
21 |
* Cast string
|
22 |
+
*
|
23 |
+
* @param value
|
24 |
+
* @return string
|
25 |
*/
|
26 |
+
function _phpCastString( value ) {
|
27 |
+
const type = typeof value;
|
28 |
+
|
29 |
+
switch ( type ) {
|
30 |
+
case 'boolean':
|
31 |
+
return value ? '1' : '';
|
32 |
+
case 'string':
|
33 |
+
return value;
|
34 |
+
case 'number':
|
35 |
+
if ( isNaN( value ) ) {
|
36 |
+
return 'NAN';
|
37 |
+
}
|
38 |
+
|
39 |
+
if ( ! isFinite( value ) ) {
|
40 |
+
return ( value < 0 ? '-' : '' ) + 'INF';
|
41 |
+
}
|
42 |
+
|
43 |
+
return value + '';
|
44 |
+
case 'undefined':
|
45 |
+
return '';
|
46 |
+
case 'object':
|
47 |
+
if ( Array.isArray( value ) ) {
|
48 |
+
return 'Array';
|
49 |
+
}
|
50 |
+
|
51 |
+
if ( value !== null ) {
|
52 |
+
return 'Object';
|
53 |
+
}
|
54 |
+
|
55 |
+
return '';
|
56 |
+
case 'function':
|
57 |
+
// fall through
|
58 |
+
default:
|
59 |
+
throw new Error( 'Unsupported value type' );
|
60 |
+
}
|
61 |
}
|
62 |
|
63 |
/**
|
64 |
* Strip tags from a string
|
65 |
+
*
|
66 |
* big thanks to http://locutus.io/php/strings/strip_tags/
|
67 |
+
*
|
68 |
+
* @param string input
|
69 |
+
* @param string allowed
|
70 |
+
* @param input
|
71 |
+
* @param allowed
|
72 |
+
* @return string
|
73 |
*/
|
74 |
+
function stripTags( input, allowed ) {
|
75 |
+
// making sure the allowed arg is a string containing only tags in lowercase (<a><b><c>)
|
76 |
+
allowed = ( ( ( allowed || '' ) + '' ).toLowerCase().match( /<[a-z][a-z0-9]*>/g ) || [] ).join( '' );
|
77 |
+
|
78 |
+
const tags = /<\/?([a-z0-9]*)\b[^>]*>?/gi;
|
79 |
+
const commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;
|
80 |
+
|
81 |
+
let after = _phpCastString( input );
|
82 |
+
// removes tha '<' char at the end of the string to replicate PHP's behaviour
|
83 |
+
after = ( after.substring( after.length - 1 ) === '<' ) ? after.substring( 0, after.length - 1 ) : after;
|
84 |
+
|
85 |
+
// recursively remove tags to ensure that the returned string doesn't contain forbidden tags after previous passes (e.g. '<<bait/>switch/>')
|
86 |
+
while ( true ) {
|
87 |
+
const before = after;
|
88 |
+
after = before.replace( commentsAndPhpTags, '' ).replace( tags, function( $0, $1 ) {
|
89 |
+
return allowed.indexOf( '<' + $1.toLowerCase() + '>' ) > -1 ? $0 : '';
|
90 |
+
} );
|
91 |
+
|
92 |
+
// return once no more tags are removed
|
93 |
+
if ( before === after ) {
|
94 |
+
return after;
|
95 |
+
}
|
96 |
+
}
|
97 |
}
|
98 |
|
99 |
+
function renderStatement( statement ) {
|
100 |
+
// Strip html tags from statement
|
101 |
+
statement = stripTags( statement );
|
102 |
|
103 |
+
jQuery( '.chat-container' ).append( '<div class="chat-message-wrapper"><p class="chat-message">' + statement + '</p></div>' );
|
104 |
}
|
105 |
|
106 |
function showTyping() {
|
107 |
+
jQuery( '.chat-container' ).append( '<div class="typing-wrapper"><p class="chat-message typing"><span class="dot"></span><span class="dot"></span><span class="dot"></span></p></div>' );
|
108 |
}
|
109 |
|
110 |
function hideTyping() {
|
111 |
+
jQuery( '.typing-wrapper' ).remove();
|
112 |
}
|
113 |
|
114 |
+
const chatWrapper = jQuery( '.bot-chat-wrapper' );
|
115 |
|
116 |
function scrollToBottom() {
|
117 |
+
chatWrapper.animate( {
|
118 |
+
scrollTop: 600,
|
119 |
+
}, 'slow' );
|
120 |
}
|
121 |
|
122 |
/**
|
123 |
* Input checking
|
124 |
+
*
|
125 |
+
* @param msg
|
126 |
*/
|
127 |
+
function inputError( msg ) {
|
128 |
+
jQuery( '.bot-error p' ).text( msg );
|
129 |
+
jQuery( '.bot-error' )
|
130 |
+
.animate( { bottom: '20px' }, 500 )
|
131 |
+
.delay( 3000 )
|
132 |
+
.animate( { bottom: '-70px' }, 500 );
|
133 |
}
|
134 |
|
135 |
+
function checkInput( option ) {
|
136 |
+
let input = jQuery( '.bot-container input[type=text]' ).val();
|
137 |
|
138 |
+
// Strip html tags from input
|
139 |
+
input = stripTags( input );
|
140 |
|
141 |
+
if ( input.length > 2 ) {
|
142 |
+
showResponse( option );
|
143 |
+
} else {
|
144 |
+
inputError( botVars.validationName );
|
145 |
+
}
|
146 |
|
147 |
+
return false;
|
148 |
}
|
149 |
|
150 |
+
function checkEmail( option ) {
|
151 |
+
const input = jQuery( '.bot-container input[type=email]' ).val();
|
152 |
+
const regex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
153 |
+
const result = regex.test( String( input.toLowerCase() ) );
|
154 |
+
|
155 |
+
if ( input.length > 7 && result === true ) {
|
156 |
+
// Add new entry to our db
|
157 |
+
const botSubscribeForm = jQuery( '.bot_subscribe_form' ).serialize();
|
158 |
+
const subscribeBotData = 'action=wpmm_add_subscriber&' + botSubscribeForm;
|
159 |
+
|
160 |
+
jQuery.post( wpmmVars.ajaxURL, subscribeBotData, function( response ) {
|
161 |
+
if ( ! response.success ) {
|
162 |
+
alert( response.data );
|
163 |
+
return false;
|
164 |
+
}
|
165 |
+
}, 'json' );
|
166 |
+
|
167 |
+
showResponse( option );
|
168 |
+
} else {
|
169 |
+
inputError( botVars.validationEmail );
|
170 |
+
}
|
171 |
+
return false;
|
|
|
|
|
|
|
172 |
}
|
173 |
|
174 |
function clearChat() {
|
175 |
+
jQuery( '.chat-container' ).empty();
|
176 |
}
|
177 |
|
178 |
function clearFooter() {
|
179 |
+
jQuery( '.choices' ).empty();
|
180 |
+
jQuery( '.input' ).empty();
|
181 |
}
|
182 |
|
183 |
/*
|
186 |
------------------------
|
187 |
*/
|
188 |
|
189 |
+
function startConversation( conv, pos ) {
|
190 |
+
/* We need this to maintain backward compatibility because we moved startConversation() from /views/maintenance.php to bot.js */
|
191 |
+
if ( conversationStarted ) {
|
192 |
+
return false;
|
193 |
+
}
|
|
|
|
|
194 |
|
195 |
+
conversationStarted = true;
|
|
|
196 |
|
197 |
+
clearFooter();
|
198 |
+
clearChat();
|
|
|
199 |
|
200 |
+
// Set conversation position
|
201 |
+
// 'conversation' is in the global scope
|
202 |
+
conversationPos = conv;
|
|
|
|
|
|
|
203 |
|
204 |
+
// Load conversation data
|
205 |
+
jQuery.getScript( botVars.uploadsBaseUrl + 'data.js', function( data ) {
|
206 |
+
// Show first bot statement
|
207 |
+
showStatement( pos );
|
208 |
+
} );
|
209 |
}
|
210 |
|
211 |
/*
|
213 |
Show Bot Statement
|
214 |
-------------------
|
215 |
*/
|
216 |
+
function showStatement( pos ) {
|
217 |
+
// Where are we in conversationData?
|
218 |
+
const node = conversationData[ conversationPos ][ pos ];
|
219 |
+
|
220 |
+
// If there is a side effect execute that within the context
|
221 |
+
if ( 'sideeffect' in node && jQuery.type( node.sideeffect === 'function' ) ) {
|
222 |
+
node.sideeffect( context );
|
223 |
+
}
|
224 |
+
|
225 |
+
// Wrap the statements in an array (if they're not already)
|
226 |
+
let statements;
|
227 |
+
if ( jQuery.type( node.statement ) === 'array' ) {
|
228 |
+
statements = node.statement;
|
229 |
+
} else if ( jQuery.type( node.statement ) === 'string' ) {
|
230 |
+
statements = [ node.statement ];
|
231 |
+
} else if ( jQuery.type( node.statement ) === 'function' ) {
|
232 |
+
statements = node.statement( context );
|
233 |
+
}
|
234 |
+
|
235 |
+
if ( pos === 1.5 || pos === 1.6 ) {
|
236 |
+
jQuery( '.avatar-notice' ).remove();
|
237 |
+
}
|
238 |
+
|
239 |
+
/*
|
240 |
------------------------
|
241 |
Render Bot Statement(s)
|
242 |
------------------------
|
243 |
Run this function over each statement
|
244 |
*/
|
245 |
+
async.eachSeries( statements, function( item, callback ) {
|
246 |
+
// Emulate typing then scroll to bottom
|
247 |
+
showTyping();
|
248 |
+
scrollToBottom();
|
249 |
+
|
250 |
+
let delay = 900;
|
251 |
+
|
252 |
+
if ( DEBUG || ! jQuery( '.bot-chat-wrapper' )[ 0 ] ) {
|
253 |
+
delay = 0;
|
254 |
+
}
|
255 |
+
|
256 |
+
setTimeout( function() {
|
257 |
+
hideTyping();
|
258 |
+
renderStatement( item );
|
259 |
+
scrollToBottom();
|
260 |
+
|
261 |
+
callback();
|
262 |
+
}, delay );
|
263 |
+
},
|
264 |
+
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
----------------------
|
266 |
Render User Option(s)
|
267 |
----------------------
|
268 |
This is the final callback of the series
|
269 |
*/
|
270 |
+
function( err ) {
|
271 |
+
/*
|
|
|
272 |
----------------------------
|
273 |
If User Option is Button(s)
|
274 |
----------------------------
|
275 |
*/
|
276 |
+
if ( 'options' in node ) {
|
277 |
+
jQuery( '.input' ).hide();
|
278 |
+
jQuery( '.choices' ).show();
|
279 |
+
|
280 |
+
// Get the options' data
|
281 |
+
const options = node.options;
|
282 |
+
|
283 |
+
// If there are options render them
|
284 |
+
// Otherwise this is the end
|
285 |
+
if ( options.length > 0 ) {
|
286 |
+
// Pause 750ms, then render options
|
287 |
+
setTimeout( function() {
|
288 |
+
for ( let i = 0; i < options.length; i++ ) {
|
289 |
+
const option = options[ i ];
|
290 |
+
var extraClass;
|
291 |
+
var clickFunction;
|
292 |
+
|
293 |
+
// Check option for a consequence
|
294 |
+
if ( option.consequence === null ) {
|
295 |
+
// The consequence is null meaning this is a branch we won't be exploring
|
296 |
+
// The button is given class 'disabled' and does nothing on click
|
297 |
+
clickFunction = null;
|
298 |
+
extraClass = 'disabled';
|
299 |
+
} else {
|
300 |
+
// Else, click function (showResponse) is binded to it
|
301 |
+
clickFunction = function( option ) {
|
302 |
+
showResponse( option );
|
303 |
+
}.bind( null, option );
|
304 |
+
|
305 |
+
extraClass = '';
|
306 |
+
}
|
307 |
+
|
308 |
+
// Render button
|
309 |
+
const button = jQuery( '<p/>', {
|
310 |
+
text: option.choice,
|
311 |
+
class: 'chat-message user',
|
312 |
+
click: clickFunction,
|
313 |
+
} ).appendTo( '.choices' );
|
314 |
+
}
|
315 |
+
}, 750 );
|
316 |
+
}
|
317 |
+
|
318 |
+
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
------------------------
|
320 |
If User Option is Input
|
321 |
------------------------
|
322 |
*/
|
323 |
+
} else if ( 'input' in node ) {
|
324 |
+
jQuery( '.input' ).show();
|
325 |
+
jQuery( '.choices' ).hide();
|
326 |
|
327 |
+
var option = node.input;
|
328 |
|
329 |
+
/*
|
|
|
330 |
Render Input
|
331 |
---------------
|
332 |
*/
|
333 |
|
334 |
+
// Create a form to hold our input and submit button
|
335 |
+
var form = jQuery( '<form/>', {
|
336 |
+
submit: checkInput.bind( null, option ),
|
337 |
+
} );
|
338 |
+
|
339 |
+
// Create a user bubble, append to form
|
340 |
+
var inputBubble = jQuery( '<p/>', {
|
341 |
+
class: 'chat-message user',
|
342 |
+
} ).appendTo( form );
|
343 |
+
|
344 |
+
// Create an input, append to user bubble
|
345 |
+
var input = jQuery( '<input/>', {
|
346 |
+
type: 'text',
|
347 |
+
placeholder: botVars.typeName,
|
348 |
+
name: option.name,
|
349 |
+
autocomplete: 'off',
|
350 |
+
required: true,
|
351 |
+
} ).appendTo( inputBubble );
|
352 |
+
|
353 |
+
// Create an input button, append to user bubble
|
354 |
+
var button = jQuery( '<a/>', {
|
355 |
+
text: botVars.send,
|
356 |
+
click: checkInput.bind( null, option ),
|
357 |
+
} ).appendTo( inputBubble );
|
358 |
+
|
359 |
+
// Append form to div.input
|
360 |
+
form.appendTo( '.input' );
|
361 |
+
|
362 |
+
// Focus on the input we just put into the DOM
|
363 |
+
async.nextTick( function() {
|
364 |
+
input.focus();
|
365 |
+
} );
|
366 |
+
|
367 |
+
/*
|
368 |
------------------------
|
369 |
If User Option is Email
|
370 |
------------------------
|
371 |
*/
|
372 |
+
} else if ( 'email' in node ) {
|
373 |
+
jQuery( '.input' ).show();
|
374 |
+
jQuery( '.choices' ).hide();
|
375 |
|
376 |
+
var option = node.email;
|
377 |
|
378 |
+
/*
|
379 |
Render Input
|
380 |
---------------
|
381 |
*/
|
382 |
|
383 |
+
// Create a form to hold our input and submit button
|
384 |
+
var form = jQuery( '<form/>', {
|
385 |
+
class: 'bot_subscribe_form',
|
386 |
+
submit: checkEmail.bind( null, option ),
|
387 |
+
} );
|
388 |
+
|
389 |
+
// Create a user bubble, append to form
|
390 |
+
var inputBubble = jQuery( '<p/>', {
|
391 |
+
class: 'chat-message user',
|
392 |
+
} ).appendTo( form );
|
393 |
+
|
394 |
+
// Create hidden input, append to user bubble
|
395 |
+
var input = jQuery( '<input/>', {
|
396 |
+
type: 'hidden',
|
397 |
+
name: '_wpnonce',
|
398 |
+
value: botVars.wpnonce,
|
399 |
+
} ).appendTo( inputBubble );
|
400 |
+
|
401 |
+
// Create email input, append to user bubble
|
402 |
+
var input = jQuery( '<input/>', {
|
403 |
+
type: 'email',
|
404 |
+
placeholder: botVars.typeEmail,
|
405 |
+
name: option.email,
|
406 |
+
autocomplete: 'off',
|
407 |
+
} ).appendTo( inputBubble );
|
408 |
+
|
409 |
+
// Create an input button, append to user bubble
|
410 |
+
var button = jQuery( '<a/>', {
|
411 |
+
text: botVars.send,
|
412 |
+
// "class": "user-email-trigger",
|
413 |
+
click: checkEmail.bind( null, option ),
|
414 |
+
} ).appendTo( inputBubble );
|
415 |
+
|
416 |
+
// Append form to div.input
|
417 |
+
form.appendTo( '.input' );
|
418 |
+
|
419 |
+
// Focus on the input we just put into the DOM
|
420 |
+
async.nextTick( function() {
|
421 |
+
input.focus();
|
422 |
+
} );
|
423 |
+
}
|
424 |
+
|
425 |
+
scrollToBottom();
|
426 |
+
} );
|
427 |
+
}
|
|
|
428 |
|
429 |
/*
|
430 |
---------------------
|
431 |
Render User Response
|
432 |
---------------------
|
433 |
*/
|
434 |
+
function showResponse( option ) {
|
435 |
+
// If there was an input element, put that into the global context
|
436 |
+
let feedback = '';
|
437 |
+
|
438 |
+
if ( 'name' in option ) {
|
439 |
+
context[ option.name ] = jQuery( '.bot-container input[type=text]' ).val();
|
440 |
+
feedback = context[ option.name ];
|
441 |
+
} else if ( 'email' in option ) {
|
442 |
+
context[ option.email ] = jQuery( '.bot-container input[type=email]' ).val();
|
443 |
+
feedback = context[ option.email ];
|
444 |
+
} else {
|
445 |
+
feedback = option.choice;
|
446 |
+
}
|
447 |
+
|
448 |
+
clearFooter();
|
449 |
+
|
450 |
+
// Strip html tags from feedback
|
451 |
+
feedback = stripTags( feedback );
|
452 |
+
|
453 |
+
// Show what the user chose
|
454 |
+
jQuery( '.chat-container' ).append( '<p class="chat-message user">' + feedback + '</p>' );
|
455 |
+
|
456 |
+
if ( 'consequence' in option ) {
|
457 |
+
showStatement( option.consequence );
|
458 |
+
} else {
|
459 |
+
// xxx
|
460 |
+
}
|
|
|
461 |
}
|
462 |
|
463 |
/*
|
466 |
-------------------
|
467 |
*/
|
468 |
|
469 |
+
let isOpen = false;
|
470 |
+
|
471 |
+
jQuery( '.bot-avatar' ).on( 'click', function() {
|
472 |
+
const chatWrap = jQuery( '.bot-chat-wrapper' )[ 0 ];
|
473 |
+
|
474 |
+
if ( ! isOpen ) {
|
475 |
+
isOpen = true;
|
476 |
+
startConversation( 'homepage', 1 );
|
477 |
+
}
|
478 |
+
|
479 |
+
if ( chatWrap.style.display !== 'none' ) {
|
480 |
+
jQuery( '.avatar-notice' ).show();
|
481 |
+
jQuery( '.bot-chat-wrapper' ).hide();
|
482 |
+
} else {
|
483 |
+
jQuery( '.bot-chat-wrapper' ).show();
|
484 |
+
jQuery( '.avatar-notice' ).hide();
|
485 |
+
}
|
486 |
+
} );
|
assets/js/bot.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(){var n,t={};function e(){}function r(n){return n}function i(n){return!!n}function o(n){return!n}var u="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this;function a(n){return function(){if(null===n)throw new Error("Callback was already called.");n.apply(this,arguments),n=null}}function c(n){return function(){null!==n&&(n.apply(this,arguments),n=null)}}null!=u&&(n=u.async),t.noConflict=function(){return u.async=n,t};var s=Object.prototype.toString,l=Array.isArray||function(n){return"[object Array]"===s.call(n)};function f(n){return l(n)||"number"==typeof n.length&&n.length>=0&&n.length%1==0}function p(n,t){for(var e=-1,r=n.length;++e<r;)t(n[e],e,n)}function h(n,t){for(var e=-1,r=n.length,i=Array(r);++e<r;)i[e]=t(n[e],e,n);return i}function y(n){return h(Array(n),function(n,t){return t})}function m(n,t){p(v(n),function(e){t(n[e],e)})}function d(n,t){for(var e=0;e<n.length;e++)if(n[e]===t)return e;return-1}var v=Object.keys||function(n){var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push(e);return t};function g(n){var t,e,r=-1;return f(n)?(t=n.length,function(){return++r<t?r:null}):(e=v(n),t=e.length,function(){return++r<t?e[r]:null})}function b(n,t){return t=null==t?n.length-1:+t,function(){for(var e=Math.max(arguments.length-t,0),r=Array(e),i=0;i<e;i++)r[i]=arguments[i+t];switch(t){case 0:return n.call(this,r);case 1:return n.call(this,arguments[0],r);case 2:return n.call(this,arguments[0],arguments[1],r)}}}function k(n){return function(t,e,r){return n(t,r)}}var w="function"==typeof setImmediate&&setImmediate,j=w?function(n){w(n)}:function(n){setTimeout(n,0)};function Q(n){return function(t,r,i){i=c(i||e);var o=g(t=t||[]);if(n<=0)return i(null);var u=!1,s=0,l=!1;!function e(){if(u&&s<=0)return i(null);for(;s<n&&!l;){var c=o();if(null===c)return u=!0,void(s<=0&&i(null));s+=1,r(t[c],c,a(function(n){s-=1,n?(i(n),l=!0):e()}))}}()}}function x(n){return function(e,r,i){return n(t.eachOf,e,r,i)}}function S(n){return function(t,e,r,i){return n(Q(e),t,r,i)}}function T(n){return function(e,r,i){return n(t.eachOfSeries,e,r,i)}}function E(n,t,r,i){i=c(i||e);var o=[];n(t,function(n,t,e){r(n,function(n,r){o[t]=r,e(n)})},function(n){i(n,o)})}function O(n,t,e,r){var i=[];n(t,function(n,t,r){e(n,function(e){e&&i.push({index:t,value:n}),r()})},function(){r(h(i.sort(function(n,t){return n.index-t.index}),function(n){return n.value}))})}function I(n,t,e,r){O(n,t,function(n,t){e(n,function(n){t(!n)})},r)}function L(n,t,e){return function(r,i,o,u){function a(){u&&u(e(!1,void 0))}function c(n,r,i){if(!u)return i();o(n,function(r){u&&t(r)&&(u(e(!0,n)),u=o=!1),i()})}arguments.length>3?n(r,i,c,a):(u=o,o=i,n(r,c,a))}}function A(n,t){return t}function _(n,t,r){r=r||e;var i=f(t)?[]:{};n(t,function(n,t,e){n(b(function(n,r){r.length<=1&&(r=r[0]),i[t]=r,e(n)}))},function(n){r(n,i)})}function C(n,t,e,r){var i=[];n(t,function(n,t,r){e(n,function(n,t){i=i.concat(t||[]),r(n)})},function(n){r(n,i)})}function z(n,r,i){if(null==r)r=1;else if(0===r)throw new Error("Concurrency must not be zero");function o(n,r,i,o){if(null!=o&&"function"!=typeof o)throw new Error("task callback must be a function");if(n.started=!0,l(r)||(r=[r]),0===r.length&&n.idle())return t.setImmediate(function(){n.drain()});p(r,function(t){var r={data:t,callback:o||e};i?n.tasks.unshift(r):n.tasks.push(r),n.tasks.length===n.concurrency&&n.saturated()}),t.setImmediate(n.process)}function u(n,t){return function(){c-=1;var e=arguments;p(t,function(n){n.callback.apply(n,e)}),n.tasks.length+c===0&&n.drain(),n.process()}}var c=0,s={tasks:[],concurrency:r,payload:i,saturated:e,empty:e,drain:e,started:!1,paused:!1,push:function(n,t){o(s,n,!1,t)},kill:function(){s.drain=e,s.tasks=[]},unshift:function(n,t){o(s,n,!0,t)},process:function(){if(!s.paused&&c<s.concurrency&&s.tasks.length)for(;c<s.concurrency&&s.tasks.length;){var t=s.payload?s.tasks.splice(0,s.payload):s.tasks.splice(0,s.tasks.length),e=h(t,function(n){return n.data});0===s.tasks.length&&s.empty(),c+=1;var r=a(u(s,t));n(e,r)}},length:function(){return s.tasks.length},running:function(){return c},idle:function(){return s.tasks.length+c===0},pause:function(){s.paused=!0},resume:function(){if(!1!==s.paused){s.paused=!1;for(var n=Math.min(s.concurrency,s.tasks.length),e=1;e<=n;e++)t.setImmediate(s.process)}}};return s}function q(n){return b(function(t,e){t.apply(null,e.concat([b(function(t,e){"undefined"!=typeof console&&(t?console.error&&console.error(t):console[n]&&p(e,function(t){console[n](t)}))})]))})}function B(n){return function(t,e,r){n(y(t),e,r)}}function N(n){return b(function(t,e){var r=b(function(e){var r=this,i=e.pop();return n(t,function(n,t,i){n.apply(r,e.concat([i]))},i)});return e.length?r.apply(this,e):r})}function V(n){return b(function(e){var r=e.pop();e.push(function(){var n=arguments;i?t.setImmediate(function(){r.apply(null,n)}):r.apply(null,n)});var i=!0;n.apply(this,e),i=!1})}"object"==typeof process&&"function"==typeof process.nextTick?t.nextTick=process.nextTick:t.nextTick=j,t.setImmediate=w?j:t.nextTick,t.forEach=t.each=function(n,e,r){return t.eachOf(n,k(e),r)},t.forEachSeries=t.eachSeries=function(n,e,r){return t.eachOfSeries(n,k(e),r)},t.forEachLimit=t.eachLimit=function(n,t,e,r){return Q(t)(n,k(e),r)},t.forEachOf=t.eachOf=function(n,t,r){r=c(r||e);var i=f(n=n||[])?n.length:v(n).length,o=0;if(!i)return r(null);function u(n){n?r(n):(o+=1)>=i&&r(null)}!function(n,t){f(n)?p(n,t):m(n,t)}(n,function(e,r){t(n[r],r,a(u))})},t.forEachOfSeries=t.eachOfSeries=function(n,r,i){i=c(i||e);var o=g(n=n||[]),u=o();!function e(){var c=!0;if(null===u)return i(null);r(n[u],u,a(function(n){if(n)i(n);else{if(null===(u=o()))return i(null);c?t.nextTick(e):e()}})),c=!1}()},t.forEachOfLimit=t.eachOfLimit=function(n,t,e,r){Q(t)(n,e,r)},t.map=x(E),t.mapSeries=T(E),t.mapLimit=S(E),t.inject=t.foldl=t.reduce=function(n,e,r,i){t.eachOfSeries(n,function(n,t,i){r(e,n,function(n,t){e=t,i(n)})},function(n){i(n||null,e)})},t.foldr=t.reduceRight=function(n,e,r,i){var o=h(n,function(n){return n}).reverse();t.reduce(o,e,r,i)},t.select=t.filter=x(O),t.selectLimit=t.filterLimit=S(O),t.selectSeries=t.filterSeries=T(O),t.reject=x(I),t.rejectLimit=S(I),t.rejectSeries=T(I),t.any=t.some=L(t.eachOf,i,r),t.someLimit=L(t.eachOfLimit,i,r),t.all=t.every=L(t.eachOf,o,o),t.everyLimit=L(t.eachOfLimit,o,o),t.detect=L(t.eachOf,r,A),t.detectSeries=L(t.eachOfSeries,r,A),t.sortBy=function(n,e,r){function i(n,t){var e=n.criteria,r=t.criteria;return e<r?-1:e>r?1:0}t.map(n,function(n,t){e(n,function(e,r){e?t(e):t(null,{value:n,criteria:r})})},function(n,t){if(n)return r(n);r(null,h(t.sort(i),function(n){return n.value}))})},t.auto=function(n,r){r=c(r||e);var i=v(n),o=i.length;if(!o)return r(null);var u={},a=[];function s(n){a.unshift(n)}function f(){o--,p(a.slice(0),function(n){n()})}s(function(){o||r(null,u)}),p(i,function(e){for(var i,o=l(n[e])?n[e]:[n[e]],c=b(function(n,i){if(i.length<=1&&(i=i[0]),n){var o={};m(u,function(n,t){o[t]=n}),o[e]=i,r(n,o)}else u[e]=i,t.setImmediate(f)}),h=o.slice(0,o.length-1),y=h.length;y--;){if(!(i=n[h[y]]))throw new Error("Has inexistant dependency");if(l(i)&&d(i,e)>=0)throw new Error("Has cyclic dependencies")}function v(){return n=function(n,t){return n&&u.hasOwnProperty(t)},t=!0,p(h,function(e,r,i){t=n(t,e,r,i)}),t&&!u.hasOwnProperty(e);var n,t}v()?o[o.length-1](c,u):s(function n(){v()&&((t=d(a,n))>=0&&a.splice(t,1),o[o.length-1](c,u));var t})})},t.retry=function(n,e,r){var i=5,o=0,u=[],a={times:i,interval:o};var c=arguments.length;if(c<1||c>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");function s(n,e){function r(n,t){return function(r){n(function(n,e){r(!n||t,{err:n,result:e})},e)}}function i(n){return function(t){setTimeout(function(){t(null)},n)}}for(;a.times;){var o=!(a.times-=1);u.push(r(a.task,o)),!o&&a.interval>0&&u.push(i(a.interval))}t.series(u,function(t,e){e=e[e.length-1],(n||a.callback)(e.err,e.result)})}return c<=2&&"function"==typeof n&&(r=e,e=n),"function"!=typeof n&&function(n,t){if("number"==typeof t)n.times=parseInt(t,10)||i;else{if("object"!=typeof t)throw new Error("Unsupported argument type for 'times': "+typeof t);n.times=parseInt(t.times,10)||i,n.interval=parseInt(t.interval,10)||o}}(a,n),a.callback=r,a.task=e,a.callback?s():s},t.waterfall=function(n,r){if(r=c(r||e),!l(n)){var i=new Error("First argument to waterfall must be an array of functions");return r(i)}if(!n.length)return r();!function n(t){return b(function(e,i){if(e)r.apply(null,[e].concat(i));else{var o=t.next();o?i.push(n(o)):i.push(r),V(t).apply(null,i)}})}(t.iterator(n))()},t.parallel=function(n,e){_(t.eachOf,n,e)},t.parallelLimit=function(n,t,e){_(Q(t),n,e)},t.series=function(n,e){_(t.eachOfSeries,n,e)},t.iterator=function(n){return function t(e){function r(){return n.length&&n[e].apply(null,arguments),r.next()}return r.next=function(){return e<n.length-1?t(e+1):null},r}(0)},t.apply=b(function(n,t){return b(function(e){return n.apply(null,t.concat(e))})}),t.concat=x(C),t.concatSeries=T(C),t.whilst=function(n,t,r){if(r=r||e,n()){var i=b(function(e,o){e?r(e):n.apply(this,o)?t(i):r(null)});t(i)}else r(null)},t.doWhilst=function(n,e,r){var i=0;return t.whilst(function(){return++i<=1||e.apply(this,arguments)},n,r)},t.until=function(n,e,r){return t.whilst(function(){return!n.apply(this,arguments)},e,r)},t.doUntil=function(n,e,r){return t.doWhilst(n,function(){return!e.apply(this,arguments)},r)},t.during=function(n,t,r){r=r||e;var i=b(function(t,e){t?r(t):(e.push(o),n.apply(this,e))}),o=function(n,e){n?r(n):e?t(i):r(null)};n(o)},t.doDuring=function(n,e,r){var i=0;t.during(function(n){i++<1?n(null,!0):e.apply(this,arguments)},n,r)},t.queue=function(n,t){return z(function(t,e){n(t[0],e)},t,1)},t.priorityQueue=function(n,r){function i(n,t){return n.priority-t.priority}var o=t.queue(n,r);return o.push=function(n,r,u){!function(n,r,o,u){if(null!=u&&"function"!=typeof u)throw new Error("task callback must be a function");if(n.started=!0,l(r)||(r=[r]),0===r.length)return t.setImmediate(function(){n.drain()});p(r,function(r){var a={data:r,priority:o,callback:"function"==typeof u?u:e};n.tasks.splice(function(n,t,e){for(var r=-1,i=n.length-1;r<i;){var o=r+(i-r+1>>>1);e(t,n[o])>=0?r=o:i=o-1}return r}(n.tasks,a,i)+1,0,a),n.tasks.length===n.concurrency&&n.saturated(),t.setImmediate(n.process)})}(o,n,r,u)},delete o.unshift,o},t.cargo=function(n,t){return z(n,1,t)},t.log=q("log"),t.dir=q("dir"),t.memoize=function(n,e){var r={},i={};e=e||function(n){return n};var o=b(function(o){var u=o.pop(),a=e.apply(null,o);a in r?t.nextTick(function(){u.apply(null,r[a])}):a in i?i[a].push(u):(i[a]=[u],n.apply(null,o.concat([b(function(n){r[a]=n;var t=i[a];delete i[a];for(var e=0,o=t.length;e<o;e++)t[e].apply(null,n)})])))});return o.memo=r,o.unmemoized=n,o},t.unmemoize=function(n){return function(){return(n.unmemoized||n).apply(null,arguments)}},t.times=B(t.map),t.timesSeries=B(t.mapSeries),t.timesLimit=function(n,e,r,i){return t.mapLimit(y(n),e,r,i)},t.seq=function(){var n=arguments;return b(function(r){var i=this,o=r[r.length-1];"function"==typeof o?r.pop():o=e,t.reduce(n,r,function(n,t,e){t.apply(i,n.concat([b(function(n,t){e(n,t)})]))},function(n,t){o.apply(i,[n].concat(t))})})},t.compose=function(){return t.seq.apply(null,Array.prototype.reverse.call(arguments))},t.applyEach=N(t.eachOf),t.applyEachSeries=N(t.eachOfSeries),t.forever=function(n,t){var r=a(t||e),i=V(n);!function n(t){if(t)return r(t);i(n)}()},t.ensureAsync=V,t.constant=b(function(n){var t=[null].concat(n);return function(n){return n.apply(this,t)}}),t.wrapSync=t.asyncify=function(n){return b(function(t){var e,r=t.pop();try{e=n.apply(this,t)}catch(n){return r(n)}r(null,e)})},"undefined"!=typeof module&&module.exports?module.exports=t:"undefined"!=typeof define&&define.amd?define([],function(){return t}):u.async=t}();var conversationPos,DEBUG=!1,context={},conversationStarted=!1;function getCurrentTime(){var n=new Date,t=n.getHours(),e=n.getMinutes(),r=t>=12?"PM":"AM";return(t=(t%=12)||12)+":"+(e=e<10?"0"+e:e)+" "+r}function _phpCastString(n){switch(typeof n){case"boolean":return n?"1":"";case"string":return n;case"number":return isNaN(n)?"NAN":isFinite(n)?n+"":(n<0?"-":"")+"INF";case"undefined":return"";case"object":return Array.isArray(n)?"Array":null!==n?"Object":"";case"function":default:throw new Error("Unsupported value type")}}function strip_tags(n,t){t=(((t||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var e=/<\/?([a-z0-9]*)\b[^>]*>?/gi,r=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi,i=_phpCastString(n);for(i="<"===i.substring(i.length-1)?i.substring(0,i.length-1):i;;){if(i===(i=i.replace(r,"").replace(e,function(n,e){return t.indexOf("<"+e.toLowerCase()+">")>-1?n:""})))return i}}function renderStatement(n){n=strip_tags(n),jQuery(".chat-container").append('<div class="chat-message-wrapper"><div class="absolute-wrapper"><div class="message-details"><div class="bot-avatar"></div><span class="message-date">'+getCurrentTime()+'</span></div></div><p class="chat-message">'+n+"</p></div>")}function showTyping(){jQuery(".chat-container").append('<div class="typing-wrapper"><div class="bot-avatar"></div><span class="bot-name">'+botName+'</span><p class="chat-message typing"><span class="dot"></span><span class="dot"></span><span class="dot"></span></p></div>')}function hideTyping(){jQuery(".typing-wrapper").remove()}var chatWrapper=jQuery(".bot-chat-wrapper");function scrollToBottom(){chatWrapper.animate({scrollTop:600},"slow")}function inputError(n){jQuery(".bot-error p").text(n),jQuery(".bot-error").animate({bottom:0},500).delay(3e3).animate({bottom:"-70px"},500)}function checkInput(n){var t=jQuery(".bot-container input[type=text]").val();return(t=strip_tags(t)).length>2?showResponse(n):inputError(botVars.validationName),!1}function checkEmail(n){var t=jQuery(".bot-container input[type=email]").val(),e=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t.toLowerCase()));if(t.length>7&&!0===e){var r="action=wpmm_add_subscriber&"+jQuery(".bot_subscribe_form").serialize();jQuery.post(wpmm_vars.ajax_url,r,function(n){if(!n.success)return alert(n.data),!1},"json"),showResponse(n)}else inputError(botVars.validationEmail);return!1}function clearChat(){jQuery(".chat-container").empty()}function clearFooter(){jQuery(".choices").empty(),jQuery(".input").empty()}function startConversation(n,t){if(conversationStarted)return!1;conversationStarted=!0,clearFooter(),clearChat(),conversationPos=n,jQuery.getScript(botVars.uploadsBaseUrl+"data.js",function(n){showStatement(t)})}function showStatement(n){var t,e=conversationData[conversationPos][n];"sideeffect"in e&&jQuery.type("function"===e.sideeffect)&&e.sideeffect(context),"array"===jQuery.type(e.statement)?t=e.statement:"string"===jQuery.type(e.statement)?t=[e.statement]:"function"===jQuery.type(e.statement)&&(t=e.statement(context)),async.eachSeries(t,function(n,t){if(showTyping(),scrollToBottom(),n.length<=50)var e=1800;else e=n.length/3*30*(Math.floor(5*Math.random())+1.2);DEBUG&&(e=0),setTimeout(function(){hideTyping(),renderStatement(n),scrollToBottom(),t()},e)},function(n){if("options"in e){jQuery(".input").hide(),jQuery(".choices").show();var t=e.options;t.length>0&&setTimeout(function(){for(var n=0;n<t.length;n++){var e,r=t[n];null===r.consequence?(e=null,"disabled"):(e=function(n){showResponse(n)}.bind(null,r),"");jQuery("<p/>",{text:r.choice,class:"chat-message user",click:e}).appendTo(".choices")}},750)}else if("input"in e){jQuery(".input").show(),jQuery(".choices").hide();var r=e.input,i=jQuery("<form/>",{submit:checkInput.bind(null,r)}),o=jQuery("<p/>",{class:"chat-message user"}).appendTo(i),u=jQuery("<input/>",{type:"text",placeholder:botVars.typeName,name:r.name,autocomplete:"off",required:!0}).appendTo(o);jQuery("<a/>",{text:botVars.send,click:checkInput.bind(null,r)}).appendTo(o);i.appendTo(".input"),async.nextTick(function(){u.focus()})}else if("email"in e){jQuery(".input").show(),jQuery(".choices").hide();r=e.email,i=jQuery("<form/>",{class:"bot_subscribe_form",submit:checkEmail.bind(null,r)}),o=jQuery("<p/>",{class:"chat-message user"}).appendTo(i),u=jQuery("<input/>",{type:"hidden",name:"_wpnonce",value:botVars.wpnonce}).appendTo(o),u=jQuery("<input/>",{type:"email",placeholder:botVars.typeEmail,name:r.email,autocomplete:"off"}).appendTo(o),jQuery("<a/>",{text:botVars.send,click:checkEmail.bind(null,r)}).appendTo(o);i.appendTo(".input"),async.nextTick(function(){u.focus()})}scrollToBottom()})}function showResponse(n){var t="";"name"in n?(context[n.name]=jQuery(".bot-container input[type=text]").val(),t=context[n.name]):"email"in n?(context[n.email]=jQuery(".bot-container input[type=email]").val(),t=context[n.email]):t=n.choice,clearFooter(),t=strip_tags(t),jQuery(".chat-container").append('<p class="chat-message user">'+t+"</p>"),"consequence"in n&&showStatement(n.consequence)}startConversation("homepage",1);
|
1 |
+
!function(){var n,t={};function e(){}function r(n){return n}function i(n){return!!n}function o(n){return!n}var u="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this;function c(n){return function(){if(null===n)throw new Error("Callback was already called.");n.apply(this,arguments),n=null}}function a(n){return function(){null!==n&&(n.apply(this,arguments),n=null)}}null!=u&&(n=u.async),t.noConflict=function(){return u.async=n,t};var s=Object.prototype.toString,l=Array.isArray||function(n){return"[object Array]"===s.call(n)};function f(n){return l(n)||"number"==typeof n.length&&n.length>=0&&n.length%1==0}function p(n,t){for(var e=-1,r=n.length;++e<r;)t(n[e],e,n)}function h(n,t){for(var e=-1,r=n.length,i=Array(r);++e<r;)i[e]=t(n[e],e,n);return i}function y(n){return h(Array(n),function(n,t){return t})}function m(n,t){p(v(n),function(e){t(n[e],e)})}function d(n,t){for(var e=0;e<n.length;e++)if(n[e]===t)return e;return-1}var v=Object.keys||function(n){var t=[];for(var e in n)n.hasOwnProperty(e)&&t.push(e);return t};function g(n){var t,e,r=-1;return f(n)?(t=n.length,function(){return++r<t?r:null}):(e=v(n),t=e.length,function(){return++r<t?e[r]:null})}function b(n,t){return t=null==t?n.length-1:+t,function(){for(var e=Math.max(arguments.length-t,0),r=Array(e),i=0;i<e;i++)r[i]=arguments[i+t];switch(t){case 0:return n.call(this,r);case 1:return n.call(this,arguments[0],r);case 2:return n.call(this,arguments[0],arguments[1],r)}}}function j(n){return function(t,e,r){return n(t,r)}}var w="function"==typeof setImmediate&&setImmediate,k=w?function(n){w(n)}:function(n){setTimeout(n,0)};function Q(n){return function(t,r,i){i=a(i||e);var o=g(t=t||[]);if(n<=0)return i(null);var u=!1,s=0,l=!1;!function e(){if(u&&s<=0)return i(null);for(;s<n&&!l;){var a=o();if(null===a)return u=!0,void(s<=0&&i(null));s+=1,r(t[a],a,c(function(n){s-=1,n?(i(n),l=!0):e()}))}}()}}function x(n){return function(e,r,i){return n(t.eachOf,e,r,i)}}function S(n){return function(t,e,r,i){return n(Q(e),t,r,i)}}function T(n){return function(e,r,i){return n(t.eachOfSeries,e,r,i)}}function O(n,t,r,i){i=a(i||e);var o=[];n(t,function(n,t,e){r(n,function(n,r){o[t]=r,e(n)})},function(n){i(n,o)})}function E(n,t,e,r){var i=[];n(t,function(n,t,r){e(n,function(e){e&&i.push({index:t,value:n}),r()})},function(){r(h(i.sort(function(n,t){return n.index-t.index}),function(n){return n.value}))})}function L(n,t,e,r){E(n,t,function(n,t){e(n,function(n){t(!n)})},r)}function I(n,t,e){return function(r,i,o,u){function c(){u&&u(e(!1,void 0))}function a(n,r,i){if(!u)return i();o(n,function(r){u&&t(r)&&(u(e(!0,n)),u=o=!1),i()})}arguments.length>3?n(r,i,a,c):(u=o,o=i,n(r,a,c))}}function A(n,t){return t}function C(n,t,r){r=r||e;var i=f(t)?[]:{};n(t,function(n,t,e){n(b(function(n,r){r.length<=1&&(r=r[0]),i[t]=r,e(n)}))},function(n){r(n,i)})}function z(n,t,e,r){var i=[];n(t,function(n,t,r){e(n,function(n,t){i=i.concat(t||[]),r(n)})},function(n){r(n,i)})}function V(n,r,i){if(null==r)r=1;else if(0===r)throw new Error("Concurrency must not be zero");function o(n,r,i,o){if(null!=o&&"function"!=typeof o)throw new Error("task callback must be a function");if(n.started=!0,l(r)||(r=[r]),0===r.length&&n.idle())return t.setImmediate(function(){n.drain()});p(r,function(t){var r={data:t,callback:o||e};i?n.tasks.unshift(r):n.tasks.push(r),n.tasks.length===n.concurrency&&n.saturated()}),t.setImmediate(n.process)}function u(n,t){return function(){a-=1;var e=arguments;p(t,function(n){n.callback.apply(n,e)}),n.tasks.length+a===0&&n.drain(),n.process()}}var a=0,s={tasks:[],concurrency:r,payload:i,saturated:e,empty:e,drain:e,started:!1,paused:!1,push:function(n,t){o(s,n,!1,t)},kill:function(){s.drain=e,s.tasks=[]},unshift:function(n,t){o(s,n,!0,t)},process:function(){if(!s.paused&&a<s.concurrency&&s.tasks.length)for(;a<s.concurrency&&s.tasks.length;){var t=s.payload?s.tasks.splice(0,s.payload):s.tasks.splice(0,s.tasks.length),e=h(t,function(n){return n.data});0===s.tasks.length&&s.empty(),a+=1;var r=c(u(s,t));n(e,r)}},length:function(){return s.tasks.length},running:function(){return a},idle:function(){return s.tasks.length+a===0},pause:function(){s.paused=!0},resume:function(){if(!1!==s.paused){s.paused=!1;for(var n=Math.min(s.concurrency,s.tasks.length),e=1;e<=n;e++)t.setImmediate(s.process)}}};return s}function _(n){return b(function(t,e){t.apply(null,e.concat([b(function(t,e){"undefined"!=typeof console&&(t?console.error&&console.error(t):console[n]&&p(e,function(t){console[n](t)}))})]))})}function q(n){return function(t,e,r){n(y(t),e,r)}}function B(n){return b(function(t,e){var r=b(function(e){var r=this,i=e.pop();return n(t,function(n,t,i){n.apply(r,e.concat([i]))},i)});return e.length?r.apply(this,e):r})}function N(n){return b(function(e){var r=e.pop();e.push(function(){var n=arguments;i?t.setImmediate(function(){r.apply(null,n)}):r.apply(null,n)});var i=!0;n.apply(this,e),i=!1})}"object"==typeof process&&"function"==typeof process.nextTick?t.nextTick=process.nextTick:t.nextTick=k,t.setImmediate=w?k:t.nextTick,t.forEach=t.each=function(n,e,r){return t.eachOf(n,j(e),r)},t.forEachSeries=t.eachSeries=function(n,e,r){return t.eachOfSeries(n,j(e),r)},t.forEachLimit=t.eachLimit=function(n,t,e,r){return Q(t)(n,j(e),r)},t.forEachOf=t.eachOf=function(n,t,r){r=a(r||e);var i=f(n=n||[])?n.length:v(n).length,o=0;if(!i)return r(null);function u(n){n?r(n):(o+=1)>=i&&r(null)}!function(n,t){f(n)?p(n,t):m(n,t)}(n,function(e,r){t(n[r],r,c(u))})},t.forEachOfSeries=t.eachOfSeries=function(n,r,i){i=a(i||e);var o=g(n=n||[]),u=o();!function e(){var a=!0;if(null===u)return i(null);r(n[u],u,c(function(n){if(n)i(n);else{if(null===(u=o()))return i(null);a?t.nextTick(e):e()}})),a=!1}()},t.forEachOfLimit=t.eachOfLimit=function(n,t,e,r){Q(t)(n,e,r)},t.map=x(O),t.mapSeries=T(O),t.mapLimit=S(O),t.inject=t.foldl=t.reduce=function(n,e,r,i){t.eachOfSeries(n,function(n,t,i){r(e,n,function(n,t){e=t,i(n)})},function(n){i(n||null,e)})},t.foldr=t.reduceRight=function(n,e,r,i){var o=h(n,function(n){return n}).reverse();t.reduce(o,e,r,i)},t.select=t.filter=x(E),t.selectLimit=t.filterLimit=S(E),t.selectSeries=t.filterSeries=T(E),t.reject=x(L),t.rejectLimit=S(L),t.rejectSeries=T(L),t.any=t.some=I(t.eachOf,i,r),t.someLimit=I(t.eachOfLimit,i,r),t.all=t.every=I(t.eachOf,o,o),t.everyLimit=I(t.eachOfLimit,o,o),t.detect=I(t.eachOf,r,A),t.detectSeries=I(t.eachOfSeries,r,A),t.sortBy=function(n,e,r){function i(n,t){var e=n.criteria,r=t.criteria;return e<r?-1:e>r?1:0}t.map(n,function(n,t){e(n,function(e,r){e?t(e):t(null,{value:n,criteria:r})})},function(n,t){if(n)return r(n);r(null,h(t.sort(i),function(n){return n.value}))})},t.auto=function(n,r){r=a(r||e);var i=v(n),o=i.length;if(!o)return r(null);var u={},c=[];function s(n){c.unshift(n)}function f(){o--,p(c.slice(0),function(n){n()})}s(function(){o||r(null,u)}),p(i,function(e){for(var i,o=l(n[e])?n[e]:[n[e]],a=b(function(n,i){if(i.length<=1&&(i=i[0]),n){var o={};m(u,function(n,t){o[t]=n}),o[e]=i,r(n,o)}else u[e]=i,t.setImmediate(f)}),h=o.slice(0,o.length-1),y=h.length;y--;){if(!(i=n[h[y]]))throw new Error("Has inexistant dependency");if(l(i)&&d(i,e)>=0)throw new Error("Has cyclic dependencies")}function v(){return n=function(n,t){return n&&u.hasOwnProperty(t)},t=!0,p(h,function(e,r,i){t=n(t,e,r,i)}),t&&!u.hasOwnProperty(e);var n,t}v()?o[o.length-1](a,u):s(function n(){v()&&((t=d(c,n))>=0&&c.splice(t,1),o[o.length-1](a,u));var t})})},t.retry=function(n,e,r){var i=5,o=0,u=[],c={times:i,interval:o};var a=arguments.length;if(a<1||a>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");function s(n,e){function r(n,t){return function(r){n(function(n,e){r(!n||t,{err:n,result:e})},e)}}function i(n){return function(t){setTimeout(function(){t(null)},n)}}for(;c.times;){var o=!(c.times-=1);u.push(r(c.task,o)),!o&&c.interval>0&&u.push(i(c.interval))}t.series(u,function(t,e){e=e[e.length-1],(n||c.callback)(e.err,e.result)})}return a<=2&&"function"==typeof n&&(r=e,e=n),"function"!=typeof n&&function(n,t){if("number"==typeof t)n.times=parseInt(t,10)||i;else{if("object"!=typeof t)throw new Error("Unsupported argument type for 'times': "+typeof t);n.times=parseInt(t.times,10)||i,n.interval=parseInt(t.interval,10)||o}}(c,n),c.callback=r,c.task=e,c.callback?s():s},t.waterfall=function(n,r){if(r=a(r||e),!l(n)){var i=new Error("First argument to waterfall must be an array of functions");return r(i)}if(!n.length)return r();!function n(t){return b(function(e,i){if(e)r.apply(null,[e].concat(i));else{var o=t.next();o?i.push(n(o)):i.push(r),N(t).apply(null,i)}})}(t.iterator(n))()},t.parallel=function(n,e){C(t.eachOf,n,e)},t.parallelLimit=function(n,t,e){C(Q(t),n,e)},t.series=function(n,e){C(t.eachOfSeries,n,e)},t.iterator=function(n){return function t(e){function r(){return n.length&&n[e].apply(null,arguments),r.next()}return r.next=function(){return e<n.length-1?t(e+1):null},r}(0)},t.apply=b(function(n,t){return b(function(e){return n.apply(null,t.concat(e))})}),t.concat=x(z),t.concatSeries=T(z),t.whilst=function(n,t,r){if(r=r||e,n()){var i=b(function(e,o){e?r(e):n.apply(this,o)?t(i):r(null)});t(i)}else r(null)},t.doWhilst=function(n,e,r){var i=0;return t.whilst(function(){return++i<=1||e.apply(this,arguments)},n,r)},t.until=function(n,e,r){return t.whilst(function(){return!n.apply(this,arguments)},e,r)},t.doUntil=function(n,e,r){return t.doWhilst(n,function(){return!e.apply(this,arguments)},r)},t.during=function(n,t,r){r=r||e;var i=b(function(t,e){t?r(t):(e.push(o),n.apply(this,e))}),o=function(n,e){n?r(n):e?t(i):r(null)};n(o)},t.doDuring=function(n,e,r){var i=0;t.during(function(n){i++<1?n(null,!0):e.apply(this,arguments)},n,r)},t.queue=function(n,t){return V(function(t,e){n(t[0],e)},t,1)},t.priorityQueue=function(n,r){function i(n,t){return n.priority-t.priority}var o=t.queue(n,r);return o.push=function(n,r,u){!function(n,r,o,u){if(null!=u&&"function"!=typeof u)throw new Error("task callback must be a function");if(n.started=!0,l(r)||(r=[r]),0===r.length)return t.setImmediate(function(){n.drain()});p(r,function(r){var c={data:r,priority:o,callback:"function"==typeof u?u:e};n.tasks.splice(function(n,t,e){for(var r=-1,i=n.length-1;r<i;){var o=r+(i-r+1>>>1);e(t,n[o])>=0?r=o:i=o-1}return r}(n.tasks,c,i)+1,0,c),n.tasks.length===n.concurrency&&n.saturated(),t.setImmediate(n.process)})}(o,n,r,u)},delete o.unshift,o},t.cargo=function(n,t){return V(n,1,t)},t.log=_("log"),t.dir=_("dir"),t.memoize=function(n,e){var r={},i={};e=e||function(n){return n};var o=b(function(o){var u=o.pop(),c=e.apply(null,o);c in r?t.nextTick(function(){u.apply(null,r[c])}):c in i?i[c].push(u):(i[c]=[u],n.apply(null,o.concat([b(function(n){r[c]=n;var t=i[c];delete i[c];for(var e=0,o=t.length;e<o;e++)t[e].apply(null,n)})])))});return o.memo=r,o.unmemoized=n,o},t.unmemoize=function(n){return function(){return(n.unmemoized||n).apply(null,arguments)}},t.times=q(t.map),t.timesSeries=q(t.mapSeries),t.timesLimit=function(n,e,r,i){return t.mapLimit(y(n),e,r,i)},t.seq=function(){var n=arguments;return b(function(r){var i=this,o=r[r.length-1];"function"==typeof o?r.pop():o=e,t.reduce(n,r,function(n,t,e){t.apply(i,n.concat([b(function(n,t){e(n,t)})]))},function(n,t){o.apply(i,[n].concat(t))})})},t.compose=function(){return t.seq.apply(null,Array.prototype.reverse.call(arguments))},t.applyEach=B(t.eachOf),t.applyEachSeries=B(t.eachOfSeries),t.forever=function(n,t){var r=c(t||e),i=N(n);!function n(t){if(t)return r(t);i(n)}()},t.ensureAsync=N,t.constant=b(function(n){var t=[null].concat(n);return function(n){return n.apply(this,t)}}),t.wrapSync=t.asyncify=function(n){return b(function(t){var e,r=t.pop();try{e=n.apply(this,t)}catch(n){return r(n)}r(null,e)})},"undefined"!=typeof module&&module.exports?module.exports=t:"undefined"!=typeof define&&define.amd?define([],function(){return t}):u.async=t}();const DEBUG=!1,context={};let conversationPos,conversationStarted=!1;function _phpCastString(n){switch(typeof n){case"boolean":return n?"1":"";case"string":return n;case"number":return isNaN(n)?"NAN":isFinite(n)?n+"":(n<0?"-":"")+"INF";case"undefined":return"";case"object":return Array.isArray(n)?"Array":null!==n?"Object":"";case"function":default:throw new Error("Unsupported value type")}}function stripTags(n,t){t=(((t||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");const e=/<\/?([a-z0-9]*)\b[^>]*>?/gi,r=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;let i=_phpCastString(n);for(i="<"===i.substring(i.length-1)?i.substring(0,i.length-1):i;;){if(i===(i=i.replace(r,"").replace(e,function(n,e){return t.indexOf("<"+e.toLowerCase()+">")>-1?n:""})))return i}}function renderStatement(n){n=stripTags(n),jQuery(".chat-container").append('<div class="chat-message-wrapper"><p class="chat-message">'+n+"</p></div>")}function showTyping(){jQuery(".chat-container").append('<div class="typing-wrapper"><p class="chat-message typing"><span class="dot"></span><span class="dot"></span><span class="dot"></span></p></div>')}function hideTyping(){jQuery(".typing-wrapper").remove()}const chatWrapper=jQuery(".bot-chat-wrapper");function scrollToBottom(){chatWrapper.animate({scrollTop:600},"slow")}function inputError(n){jQuery(".bot-error p").text(n),jQuery(".bot-error").animate({bottom:"20px"},500).delay(3e3).animate({bottom:"-70px"},500)}function checkInput(n){let t=jQuery(".bot-container input[type=text]").val();return(t=stripTags(t)).length>2?showResponse(n):inputError(botVars.validationName),!1}function checkEmail(n){const t=jQuery(".bot-container input[type=email]").val(),e=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t.toLowerCase()));if(t.length>7&&!0===e){const t="action=wpmm_add_subscriber&"+jQuery(".bot_subscribe_form").serialize();jQuery.post(wpmmVars.ajaxURL,t,function(n){if(!n.success)return alert(n.data),!1},"json"),showResponse(n)}else inputError(botVars.validationEmail);return!1}function clearChat(){jQuery(".chat-container").empty()}function clearFooter(){jQuery(".choices").empty(),jQuery(".input").empty()}function startConversation(n,t){if(conversationStarted)return!1;conversationStarted=!0,clearFooter(),clearChat(),conversationPos=n,jQuery.getScript(botVars.uploadsBaseUrl+"data.js",function(n){showStatement(t)})}function showStatement(n){const t=conversationData[conversationPos][n];let e;"sideeffect"in t&&jQuery.type("function"===t.sideeffect)&&t.sideeffect(context),"array"===jQuery.type(t.statement)?e=t.statement:"string"===jQuery.type(t.statement)?e=[t.statement]:"function"===jQuery.type(t.statement)&&(e=t.statement(context)),1.5!==n&&1.6!==n||jQuery(".avatar-notice").remove(),async.eachSeries(e,function(n,t){showTyping(),scrollToBottom();let e=900;!DEBUG&&jQuery(".bot-chat-wrapper")[0]||(e=0),setTimeout(function(){hideTyping(),renderStatement(n),scrollToBottom(),t()},e)},function(n){if("options"in t){jQuery(".input").hide(),jQuery(".choices").show();const n=t.options;n.length>0&&setTimeout(function(){for(let e=0;e<n.length;e++){const r=n[e];var t;null===r.consequence?(t=null,"disabled"):(t=function(n){showResponse(n)}.bind(null,r),"");jQuery("<p/>",{text:r.choice,class:"chat-message user",click:t}).appendTo(".choices")}},750)}else if("input"in t){jQuery(".input").show(),jQuery(".choices").hide();var e=t.input,r=jQuery("<form/>",{submit:checkInput.bind(null,e)}),i=jQuery("<p/>",{class:"chat-message user"}).appendTo(r),o=jQuery("<input/>",{type:"text",placeholder:botVars.typeName,name:e.name,autocomplete:"off",required:!0}).appendTo(i);jQuery("<a/>",{text:botVars.send,click:checkInput.bind(null,e)}).appendTo(i);r.appendTo(".input"),async.nextTick(function(){o.focus()})}else if("email"in t){jQuery(".input").show(),jQuery(".choices").hide();e=t.email,r=jQuery("<form/>",{class:"bot_subscribe_form",submit:checkEmail.bind(null,e)}),i=jQuery("<p/>",{class:"chat-message user"}).appendTo(r),o=jQuery("<input/>",{type:"hidden",name:"_wpnonce",value:botVars.wpnonce}).appendTo(i),o=jQuery("<input/>",{type:"email",placeholder:botVars.typeEmail,name:e.email,autocomplete:"off"}).appendTo(i),jQuery("<a/>",{text:botVars.send,click:checkEmail.bind(null,e)}).appendTo(i);r.appendTo(".input"),async.nextTick(function(){o.focus()})}scrollToBottom()})}function showResponse(n){let t="";"name"in n?(context[n.name]=jQuery(".bot-container input[type=text]").val(),t=context[n.name]):"email"in n?(context[n.email]=jQuery(".bot-container input[type=email]").val(),t=context[n.email]):t=n.choice,clearFooter(),t=stripTags(t),jQuery(".chat-container").append('<p class="chat-message user">'+t+"</p>"),"consequence"in n&&showStatement(n.consequence)}let isOpen=!1;jQuery(".bot-avatar").on("click",function(){const n=jQuery(".bot-chat-wrapper")[0];isOpen||(isOpen=!0,startConversation("homepage",1)),"none"!==n.style.display?(jQuery(".avatar-notice").show(),jQuery(".bot-chat-wrapper").hide()):(jQuery(".bot-chat-wrapper").show(),jQuery(".avatar-notice").hide())});
|
assets/js/scripts-admin-global.js
CHANGED
@@ -1,21 +1,22 @@
|
|
1 |
-
jQuery
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
});
|
|
1 |
+
/* global jQuery */
|
2 |
+
|
3 |
+
jQuery( function( $ ) {
|
4 |
+
/**
|
5 |
+
* DISMISS NOTICES
|
6 |
+
*
|
7 |
+
* @since 2.0.4
|
8 |
+
*/
|
9 |
+
$( '.wpmm_notices' ).on( 'click', '.notice-dismiss', function() {
|
10 |
+
const noticeKey = $( this ).parent().data( 'key' );
|
11 |
+
const noticeNonce = $( this ).parent().data( 'nonce' );
|
12 |
+
$.post( ajaxurl, {
|
13 |
+
action: 'wpmm_dismiss_notices',
|
14 |
+
notice_key: noticeKey,
|
15 |
+
_nonce: noticeNonce,
|
16 |
+
}, function( response ) {
|
17 |
+
if ( ! response.success ) {
|
18 |
+
return false;
|
19 |
+
}
|
20 |
+
}, 'json' );
|
21 |
+
} );
|
22 |
+
} );
|
assets/js/scripts-admin-global.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(n){n(".wpmm_notices").on("click",".notice-dismiss",function(){
|
1 |
+
jQuery(function(n){n(".wpmm_notices").on("click",".notice-dismiss",function(){const t=n(this).parent().data("key"),i=n(this).parent().data("nonce");n.post(ajaxurl,{action:"wpmm_dismiss_notices",notice_key:t,_nonce:i},function(n){if(!n.success)return!1},"json")})});
|
assets/js/scripts-admin.js
CHANGED
@@ -1,187 +1,542 @@
|
|
1 |
-
jQuery
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global jQuery, wpmmVars */
|
2 |
+
|
3 |
+
jQuery( function( $ ) {
|
4 |
+
function isEmailValid( email ) {
|
5 |
+
const regex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
6 |
+
const result = regex.test( String( email.toLowerCase() ) );
|
7 |
+
|
8 |
+
return email.length > 7 && result === true;
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Migration & Rollback
|
13 |
+
*/
|
14 |
+
$( '#wpmm-migrate, #wpmm-rollback' ).on( 'click', function() {
|
15 |
+
$.post( wpmmVars.ajaxURL, {
|
16 |
+
action: 'wpmm_toggle_gutenberg',
|
17 |
+
source: this.parentElement.parentElement.dataset.key,
|
18 |
+
_wpnonce: this.parentElement.parentElement.dataset.nonce,
|
19 |
+
}, function( response ) {
|
20 |
+
if ( ! response.success ) {
|
21 |
+
alert( response );
|
22 |
+
return false;
|
23 |
+
}
|
24 |
+
|
25 |
+
window.location.reload();
|
26 |
+
}, 'json' );
|
27 |
+
} );
|
28 |
+
|
29 |
+
/**
|
30 |
+
* TABS
|
31 |
+
*/
|
32 |
+
const hash = window.location.hash;
|
33 |
+
if ( hash !== '' ) {
|
34 |
+
$( '.nav-tab-wrapper' ).children().removeClass( 'nav-tab-active' );
|
35 |
+
$( '.nav-tab-wrapper a[href="' + hash + '"]' ).addClass( 'nav-tab-active' );
|
36 |
+
|
37 |
+
// active tab content
|
38 |
+
$( '.tabs-content' ).children().addClass( 'hidden' );
|
39 |
+
$( '.tabs-content div' + hash.replace( '#', '#tab-' ) ).removeClass( 'hidden' );
|
40 |
+
|
41 |
+
// trigger `show_{name}_tab_content` event (we use it to refresh codemirror instance on design tab)
|
42 |
+
$( 'body' ).trigger( 'show_' + hash.replace( '#', '' ) + '_tab_content' );
|
43 |
+
}
|
44 |
+
|
45 |
+
$( '.nav-tab-wrapper' ).on( 'click', 'a', function() {
|
46 |
+
const tabHash = $( this ).attr( 'href' ),
|
47 |
+
tabId = tabHash.replace( '#', '#tab-' );
|
48 |
+
|
49 |
+
// active tab
|
50 |
+
$( this ).parent().children().removeClass( 'nav-tab-active' );
|
51 |
+
$( this ).addClass( 'nav-tab-active' );
|
52 |
+
|
53 |
+
// active tab content
|
54 |
+
$( '.tabs-content' ).children().addClass( 'hidden' );
|
55 |
+
$( '.tabs-content div' + tabId ).removeClass( 'hidden' );
|
56 |
+
|
57 |
+
// trigger `show_{name}_tab_content` event (we use it to refresh codemirror instance on design tab)
|
58 |
+
$( 'body' ).trigger( 'show_' + tabHash.replace( '#', '' ) + '_tab_content' );
|
59 |
+
} );
|
60 |
+
|
61 |
+
/**
|
62 |
+
* COLOR PICKER
|
63 |
+
*/
|
64 |
+
$( '.color_picker_trigger' ).wpColorPicker();
|
65 |
+
|
66 |
+
/**
|
67 |
+
* AVAILABLE SHORTCODES
|
68 |
+
*/
|
69 |
+
$( '.shortcodes-list-wrapper' ).on( 'click', '.toggle-shortcodes-list', function( e ) {
|
70 |
+
e.preventDefault();
|
71 |
+
|
72 |
+
const hideText = $( this ).data( 'hide' ),
|
73 |
+
showText = $( this ).data( 'show' ),
|
74 |
+
list = $( this ).next( '.shortcodes-list' );
|
75 |
+
|
76 |
+
list.toggleClass( 'show' );
|
77 |
+
|
78 |
+
const currentText = list.hasClass( 'show' ) ? hideText : showText;
|
79 |
+
|
80 |
+
$( this ).text( currentText );
|
81 |
+
} );
|
82 |
+
|
83 |
+
/**
|
84 |
+
* CHOSEN.JS MULTISELECT
|
85 |
+
*
|
86 |
+
* @used for "Backend role" and "Frontend role" -> General tab
|
87 |
+
*/
|
88 |
+
$( '.chosen-select' ).chosen( { disable_search_threshold: 10 } );
|
89 |
+
|
90 |
+
/**
|
91 |
+
* IMAGE UPLOADER
|
92 |
+
*/
|
93 |
+
const imageUploaders = {};
|
94 |
+
|
95 |
+
$( 'body' ).on( 'click', '.image_uploader_trigger', function( e ) {
|
96 |
+
e.preventDefault();
|
97 |
+
|
98 |
+
const name = $( this ).data( 'name' ) || '',
|
99 |
+
title = $( this ).data( 'title' ) || wpmmVars.imageUploaderDefaults.title,
|
100 |
+
buttonText = $( this ).data( 'button-text' ) || wpmmVars.imageUploaderDefaults.buttonText,
|
101 |
+
toSelector = $( this ).data( 'to-selector' ) || '';
|
102 |
+
|
103 |
+
if ( name === '' || toSelector === '' ) {
|
104 |
+
alert( 'Required `data` attributes: name, to-selector' );
|
105 |
+
return;
|
106 |
+
}
|
107 |
+
|
108 |
+
// If the uploader object has already been created, reopen the dialog
|
109 |
+
if ( imageUploaders.hasOwnProperty( name ) ) {
|
110 |
+
imageUploaders[ name ].open();
|
111 |
+
return;
|
112 |
+
}
|
113 |
+
|
114 |
+
// Extend the wp.media object
|
115 |
+
imageUploaders[ name ] = wp.media.frames.file_frame = wp.media( {
|
116 |
+
title,
|
117 |
+
button: {
|
118 |
+
text: buttonText,
|
119 |
+
},
|
120 |
+
multiple: false,
|
121 |
+
} );
|
122 |
+
|
123 |
+
// When a file is selected, grab the URL and set it as the text field's value
|
124 |
+
imageUploaders[ name ].on( 'select', function() {
|
125 |
+
const attachment = imageUploaders[ name ].state().get( 'selection' ).first().toJSON();
|
126 |
+
const url = attachment.url || '';
|
127 |
+
|
128 |
+
$( toSelector ).val( url );
|
129 |
+
} );
|
130 |
+
|
131 |
+
// Open the uploader dialog
|
132 |
+
imageUploaders[ name ].open();
|
133 |
+
} );
|
134 |
+
|
135 |
+
/**
|
136 |
+
* SHOW DESIGN BACKGROUND TYPE BASED ON SELECTED FIELD
|
137 |
+
*
|
138 |
+
* @param selectedVal
|
139 |
+
*/
|
140 |
+
const showBgType = function( selectedVal ) {
|
141 |
+
$( '.design_bg_types' ).hide();
|
142 |
+
$( '#show_' + selectedVal ).show();
|
143 |
+
};
|
144 |
+
|
145 |
+
showBgType( $( '#design_bg_type' ).val() );
|
146 |
+
|
147 |
+
$( 'body' ).on( 'change', '#design_bg_type', function() {
|
148 |
+
const selectedVal = $( this ).val();
|
149 |
+
|
150 |
+
showBgType( selectedVal );
|
151 |
+
} );
|
152 |
+
|
153 |
+
/**
|
154 |
+
* PREDEFINED BACKGROUND
|
155 |
+
*/
|
156 |
+
$( 'ul.bg_list' ).on( 'click', 'li', function() {
|
157 |
+
$( this ).parent().children().removeClass( 'active' );
|
158 |
+
$( this ).addClass( 'active' );
|
159 |
+
} );
|
160 |
+
|
161 |
+
/**
|
162 |
+
* SUBSCRIBERS EXPORT
|
163 |
+
*/
|
164 |
+
$( '#subscribers_wrap' ).on( 'click', '#subscribers-export', function() {
|
165 |
+
const nonce = $( '#tab-modules #_wpnonce' ).val();
|
166 |
+
$( '<iframe />' ).attr( 'src', wpmmVars.ajaxURL + '?action=wpmm_subscribers_export&_wpnonce=' + encodeURI( nonce ) ).appendTo( 'body' ).hide();
|
167 |
+
} );
|
168 |
+
|
169 |
+
/**
|
170 |
+
* SUBSCRIBERS EMPTY LIST
|
171 |
+
*
|
172 |
+
* @since 2.0.4
|
173 |
+
*/
|
174 |
+
$( '#subscribers_wrap' ).on( 'click', '#subscribers-empty-list', function() {
|
175 |
+
const nonce = $( '#tab-modules #_wpnonce' ).val();
|
176 |
+
|
177 |
+
$.post( wpmmVars.ajaxURL, {
|
178 |
+
action: 'wpmm_subscribers_empty_list',
|
179 |
+
_wpnonce: nonce,
|
180 |
+
}, function( response ) {
|
181 |
+
if ( ! response.success ) {
|
182 |
+
alert( response.data );
|
183 |
+
return false;
|
184 |
+
}
|
185 |
+
|
186 |
+
$( '#subscribers_wrap' ).html( response.data );
|
187 |
+
}, 'json' );
|
188 |
+
} );
|
189 |
+
|
190 |
+
/**
|
191 |
+
* RESET SETTINGS
|
192 |
+
*/
|
193 |
+
$( 'body' ).on( 'click', '.reset_settings', function() {
|
194 |
+
const tab = $( this ).data( 'tab' ),
|
195 |
+
nonce = $( '#tab-' + tab + ' #_wpnonce' ).val();
|
196 |
+
|
197 |
+
$.post( wpmmVars.ajaxURL, {
|
198 |
+
action: 'wpmm_reset_settings',
|
199 |
+
tab,
|
200 |
+
_wpnonce: nonce,
|
201 |
+
}, function( response ) {
|
202 |
+
if ( ! response.success ) {
|
203 |
+
alert( response.data );
|
204 |
+
return false;
|
205 |
+
}
|
206 |
+
|
207 |
+
window.location.reload( true );
|
208 |
+
}, 'json' );
|
209 |
+
} );
|
210 |
+
|
211 |
+
/**
|
212 |
+
* COUNTDOWN TIMEPICKER
|
213 |
+
*/
|
214 |
+
$( '.countdown_start' ).datetimepicker( { timeFormat: 'HH:mm:ss', dateFormat: 'dd-mm-yy' } );
|
215 |
+
|
216 |
+
/**
|
217 |
+
* TEMPLATES
|
218 |
+
*/
|
219 |
+
let pageEditURL = '#';
|
220 |
+
const templateWrap = $( '.template-image-wrap' );
|
221 |
+
|
222 |
+
templateWrap.on( 'click', '.button-import', function() {
|
223 |
+
/* If the page has some content inside, show a confirmation prompt to let the use know the
|
224 |
+
content will be replaced and fire the import only after confirmation */
|
225 |
+
if ( this.dataset.replace !== '0' ) {
|
226 |
+
openModal( {
|
227 |
+
title: wpmmVars.confirmModalTexts.title,
|
228 |
+
description: wpmmVars.confirmModalTexts.description,
|
229 |
+
first_button: `<button class="button button-primary button-big confirm button-import">${ wpmmVars.confirmModalTexts.buttonContinue }</button>`,
|
230 |
+
second_button: `<button class="button button-secondary button-big go-back">${ wpmmVars.confirmModalTexts.buttonGoBack }</button>`,
|
231 |
+
} );
|
232 |
+
|
233 |
+
const importButton = this;
|
234 |
+
$( 'button.confirm' ).on( 'click', function() {
|
235 |
+
$( this ).html( '<span class="dashicons dashicons-update"></span>' + wpmmVars.importingText + '...' );
|
236 |
+
$( '.modal-content' ).find( $( '.go-back' ) ).addClass( 'disabled' );
|
237 |
+
fireImport( importButton );
|
238 |
+
} );
|
239 |
+
|
240 |
+
$( 'button.go-back' ).on( 'click', function() {
|
241 |
+
$( '.modal-overlay' ).remove();
|
242 |
+
} );
|
243 |
+
} else {
|
244 |
+
fireImport( this );
|
245 |
+
}
|
246 |
+
} );
|
247 |
+
|
248 |
+
function fireImport( button ) {
|
249 |
+
const nonce = $( '#tab-design #_wpnonce' ).val();
|
250 |
+
const templateSlug = button.dataset.slug;
|
251 |
+
const category = button.dataset.category;
|
252 |
+
|
253 |
+
const data = {
|
254 |
+
_wpnonce: nonce,
|
255 |
+
source: 'tab-design',
|
256 |
+
template_slug: templateSlug,
|
257 |
+
category,
|
258 |
+
};
|
259 |
+
|
260 |
+
$( button ).html( '<span class="dashicons dashicons-update"></span>' + wpmmVars.importingText + '...' );
|
261 |
+
$( '.button-import' ).addClass( 'disabled' ).css( 'pointer-events', 'none' );
|
262 |
+
|
263 |
+
templateWrap.removeClass( 'can-import' );
|
264 |
+
$( button ).parent().addClass( 'importing' );
|
265 |
+
|
266 |
+
importTemplate( data, function( response ) {
|
267 |
+
pageEditURL = response.pageEditURL.replace( /&/g, '&' );
|
268 |
+
|
269 |
+
$( '.importing .button-import' ).html( wpmmVars.importDone );
|
270 |
+
openModal( {
|
271 |
+
title: wpmmVars.modalTexts.title,
|
272 |
+
description: wpmmVars.modalTexts.description,
|
273 |
+
first_button: `<a href="${ pageEditURL }" class="button button-primary button-big">${ wpmmVars.modalTexts.buttonPage }</a>`,
|
274 |
+
second_button: `<button class="button button-secondary button-big" onClick="window.location.reload()">${ wpmmVars.modalTexts.buttonSettings }</button>`,
|
275 |
+
} );
|
276 |
+
} );
|
277 |
+
}
|
278 |
+
|
279 |
+
function openModal( content ) {
|
280 |
+
const modalOverlay = $(
|
281 |
+
'<div class="modal-overlay">' +
|
282 |
+
'<div class="modal-frame">' +
|
283 |
+
'<div class="modal-content">' +
|
284 |
+
`<h4 class="modal-header">${ content.title }</h4>` +
|
285 |
+
`<p class="modal-text">${ content.description }</p>` +
|
286 |
+
'<div class="buttons-wrap">' +
|
287 |
+
content.first_button +
|
288 |
+
content.second_button +
|
289 |
+
'</div>' +
|
290 |
+
'</div>' +
|
291 |
+
'</div>' +
|
292 |
+
'</div>'
|
293 |
+
);
|
294 |
+
|
295 |
+
$( 'body' ).addClass( 'has-modal' );
|
296 |
+
|
297 |
+
if ( $( '.modal-overlay' ).length ) {
|
298 |
+
$( '.modal-overlay' ).replaceWith( modalOverlay );
|
299 |
+
} else {
|
300 |
+
$( modalOverlay ).appendTo( 'body' );
|
301 |
+
}
|
302 |
+
}
|
303 |
+
|
304 |
+
$( 'select[name="options[design][template_category]"]' ).on( 'change', function() {
|
305 |
+
const nonce = $( '#tab-design #_wpnonce' ).val();
|
306 |
+
|
307 |
+
$.post( wpmmVars.ajaxURL, {
|
308 |
+
action: 'wpmm_change_template_category',
|
309 |
+
category: this.value,
|
310 |
+
_wpnonce: nonce,
|
311 |
+
}, function( response ) {
|
312 |
+
if ( ! response.success ) {
|
313 |
+
alert( response );
|
314 |
+
return false;
|
315 |
+
}
|
316 |
+
|
317 |
+
window.location.reload();
|
318 |
+
}, 'json' );
|
319 |
+
} );
|
320 |
+
|
321 |
+
$( 'select[name="options[design][page_id]"]' ).on( 'change', function() {
|
322 |
+
const nonce = $( '#tab-design #_wpnonce' ).val();
|
323 |
+
|
324 |
+
$.post( wpmmVars.ajaxURL, {
|
325 |
+
action: 'wpmm_select_page',
|
326 |
+
page_id: this.value,
|
327 |
+
_wpnonce: nonce,
|
328 |
+
}, function( response ) {
|
329 |
+
if ( ! response.success ) {
|
330 |
+
alert( response.data );
|
331 |
+
return false;
|
332 |
+
}
|
333 |
+
|
334 |
+
window.location.reload();
|
335 |
+
}, 'json' );
|
336 |
+
} );
|
337 |
+
|
338 |
+
/**
|
339 |
+
* WIZARD
|
340 |
+
*/
|
341 |
+
$( 'h2.wpmm-title span' ).on( 'click', function() {
|
342 |
+
window.location.href = wpmmVars.adminURL;
|
343 |
+
} );
|
344 |
+
|
345 |
+
if ( $( 'input[name="wizard-template"]:checked' ).val() ) {
|
346 |
+
$( '#wpmm-wizard-wrapper .button-import' ).removeClass( 'disabled' );
|
347 |
+
} else {
|
348 |
+
$( 'input[name="wizard-template"]' ).on( 'change', function() {
|
349 |
+
$( '#wpmm-wizard-wrapper .button-import' ).removeClass( 'disabled' );
|
350 |
+
$( 'input[name="wizard-template"]' ).off( 'change' );
|
351 |
+
} );
|
352 |
+
}
|
353 |
+
|
354 |
+
$( '#wizard-import-button' ).on( 'click', '.button-import:not(.disabled)', function() {
|
355 |
+
const templateSelect = $( 'input[name="wizard-template"]:checked' );
|
356 |
+
const templateSlug = templateSelect.val();
|
357 |
+
const category = templateSelect[ 0 ].dataset.category;
|
358 |
+
|
359 |
+
const data = {
|
360 |
+
_wpnonce: wpmmVars.wizardNonce,
|
361 |
+
source: 'wizard',
|
362 |
+
template_slug: templateSlug,
|
363 |
+
category,
|
364 |
+
};
|
365 |
+
|
366 |
+
importInProgress( data.template_slug );
|
367 |
+
importTemplate( data, function( response ) {
|
368 |
+
moveToStep( 'import', 'subscribe' );
|
369 |
+
pageEditURL = response.pageEditURL.replace( /&/g, '&' );
|
370 |
+
|
371 |
+
$( '#wpmm-wizard-wrapper .finish-step .heading' ).text( wpmmVars.finishWizardStrings[ category ] );
|
372 |
+
} );
|
373 |
+
} );
|
374 |
+
|
375 |
+
$( '#email-input-wrap input[type="text"]' ).on( 'keypress', ( e ) => {
|
376 |
+
if ( e.key === 'Enter' ) {
|
377 |
+
const button = $( '#email-input-wrap .subscribe-button' );
|
378 |
+
button.trigger( 'click' );
|
379 |
+
}
|
380 |
+
} );
|
381 |
+
|
382 |
+
$( '#email-input-wrap' ).on( 'click', '.subscribe-button', function( event ) {
|
383 |
+
event.preventDefault();
|
384 |
+
|
385 |
+
const emailInput = $( '#email-input-wrap input[type="text"]' );
|
386 |
+
const email = emailInput.val();
|
387 |
+
|
388 |
+
if ( ! isEmailValid( email ) ) {
|
389 |
+
$( '#email-input-wrap' ).append( `<p class="subscribe-message email-error"><i>${ wpmmVars.invalidEmailString }</i></p>` );
|
390 |
+
emailInput.addClass( 'invalid' );
|
391 |
+
|
392 |
+
setTimeout( function() {
|
393 |
+
$( '.email-error' ).remove();
|
394 |
+
}, 1500 );
|
395 |
+
|
396 |
+
return;
|
397 |
+
}
|
398 |
+
|
399 |
+
emailInput.removeClass( 'invalid' );
|
400 |
+
|
401 |
+
$.post( wpmmVars.ajaxURL, {
|
402 |
+
action: 'wpmm_subscribe',
|
403 |
+
email,
|
404 |
+
_wpnonce: wpmmVars.wizardNonce,
|
405 |
+
}, function( response ) {
|
406 |
+
if ( ! response.success ) {
|
407 |
+
alert( response.data );
|
408 |
+
}
|
409 |
+
|
410 |
+
moveToStep( 'subscribe', 'finish' );
|
411 |
+
} );
|
412 |
+
|
413 |
+
return false;
|
414 |
+
} );
|
415 |
+
|
416 |
+
$( '#skip-subscribe' ).on( 'click', function() {
|
417 |
+
moveToStep( 'subscribe', 'finish' );
|
418 |
+
} );
|
419 |
+
|
420 |
+
$( '#view-page-button' ).on( 'click', function() {
|
421 |
+
window.location.href = pageEditURL;
|
422 |
+
} );
|
423 |
+
|
424 |
+
$( '#refresh-button' ).on( 'click', function() {
|
425 |
+
window.location.reload();
|
426 |
+
} );
|
427 |
+
|
428 |
+
/**
|
429 |
+
* Adds elements and CSS when importing from wizard
|
430 |
+
*
|
431 |
+
* @param {string} slug The template that will be imported
|
432 |
+
*/
|
433 |
+
function importInProgress( slug ) {
|
434 |
+
const template = $( 'input[value=' + slug + '] + .template' );
|
435 |
+
|
436 |
+
template.addClass( 'loading' );
|
437 |
+
template.append( '<span class="dashicons dashicons-update"></span><p><i>' + wpmmVars.loadingString + '</i></p>' );
|
438 |
+
|
439 |
+
$( '.button-import' ).attr( 'disabled', 'disabled' );
|
440 |
+
$( '#wpmm-wizard-wrapper .templates-radio label' ).css( 'pointer-events', 'none' );
|
441 |
+
}
|
442 |
+
|
443 |
+
/**
|
444 |
+
* Goes to the next step from wizard
|
445 |
+
*
|
446 |
+
* @param {string} prevStep
|
447 |
+
* @param {string} nextStep
|
448 |
+
*/
|
449 |
+
function moveToStep( prevStep, nextStep ) {
|
450 |
+
$( '.slider-wrap' ).removeClass( `move-to-${ prevStep }` ).addClass( `move-to-${ nextStep }` );
|
451 |
+
|
452 |
+
$( `.${ prevStep }-step` ).attr( 'aria-hidden', 'true' ).css( 'display', 'none' );
|
453 |
+
$( `.${ nextStep }-step` ).removeAttr( 'aria-hidden' ).removeAttr( 'style' );
|
454 |
+
}
|
455 |
+
|
456 |
+
/**
|
457 |
+
* Installs or activates Otter and adds the template after
|
458 |
+
*
|
459 |
+
* @param {Object} data
|
460 |
+
* @param {Function} callback
|
461 |
+
*/
|
462 |
+
function importTemplate( data, callback ) {
|
463 |
+
if ( ! wpmmVars.isOtterInstalled ) {
|
464 |
+
installAndActivateOtter( () => addToPage( data, callback ) );
|
465 |
+
} else if ( ! wpmmVars.isOtterActivated ) {
|
466 |
+
activateOtter( () => addToPage( data, callback ) );
|
467 |
+
}
|
468 |
+
}
|
469 |
+
|
470 |
+
/**
|
471 |
+
* Adds the template content to the Maintenance Page
|
472 |
+
* and calls the callback after
|
473 |
+
*
|
474 |
+
* @param {Object} data
|
475 |
+
* @param {Function} callback
|
476 |
+
*/
|
477 |
+
function addToPage( data, callback ) {
|
478 |
+
data.action = 'wpmm_insert_template';
|
479 |
+
$.post( wpmmVars.ajaxURL, data, function( response ) {
|
480 |
+
if ( ! response.success ) {
|
481 |
+
alert( response.data );
|
482 |
+
$( '.dashicons-update' ).remove();
|
483 |
+
$( '<p class="error import-error">' + wpmmVars.errorString + '</p>' ).insertAfter( '#wizard-import-button' );
|
484 |
+
return false;
|
485 |
+
}
|
486 |
+
|
487 |
+
callback( response.data );
|
488 |
+
}, 'json' );
|
489 |
+
}
|
490 |
+
|
491 |
+
/**
|
492 |
+
* Installs Otter then calls the activation function with the callback
|
493 |
+
*
|
494 |
+
* @param {Function} callback
|
495 |
+
*/
|
496 |
+
function installAndActivateOtter( callback ) {
|
497 |
+
$.post( wpmmVars.ajaxURL, {
|
498 |
+
action: 'wp_ajax_install_plugin',
|
499 |
+
_ajax_nonce: wpmmVars.pluginInstallNonce,
|
500 |
+
slug: 'otter-blocks',
|
501 |
+
}, function( response ) {
|
502 |
+
if ( ! response.success ) {
|
503 |
+
alert( response.data.errorMessage );
|
504 |
+
$( '.dashicons-update' ).remove();
|
505 |
+
$( '<p class="error import-error">' + wpmmVars.errorString + '</p>' ).insertAfter( '#wizard-import-button' );
|
506 |
+
|
507 |
+
window.location.reload();
|
508 |
+
return false;
|
509 |
+
}
|
510 |
+
|
511 |
+
updateSDKOptions();
|
512 |
+
activateOtter( callback );
|
513 |
+
} );
|
514 |
+
}
|
515 |
+
|
516 |
+
/**
|
517 |
+
* Activates Otter and calls a callback
|
518 |
+
*
|
519 |
+
* @param {Function} callback
|
520 |
+
*/
|
521 |
+
function activateOtter( callback ) {
|
522 |
+
$.get( wpmmVars.otterActivationLink, function() {
|
523 |
+
callback();
|
524 |
+
} );
|
525 |
+
}
|
526 |
+
|
527 |
+
/**
|
528 |
+
* Updates options to track Otter traffic.
|
529 |
+
* Fires when Otter is installed.
|
530 |
+
*/
|
531 |
+
function updateSDKOptions() {
|
532 |
+
$.post( wpmmVars.ajaxURL, {
|
533 |
+
action: 'wpmm_update_sdk_options',
|
534 |
+
_wpnonce: wpmmVars.ajaxNonce,
|
535 |
+
}, function( response ) {
|
536 |
+
if ( ! response.success ) {
|
537 |
+
// eslint-disable-next-line no-console
|
538 |
+
console.error( response.data );
|
539 |
+
}
|
540 |
+
} );
|
541 |
+
}
|
542 |
+
} );
|
assets/js/scripts-admin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(function(t){
|
1 |
+
jQuery(function(t){t("#wpmm-migrate, #wpmm-rollback").on("click",function(){t.post(wpmmVars.ajaxURL,{action:"wpmm_toggle_gutenberg",source:this.parentElement.parentElement.dataset.key,_wpnonce:this.parentElement.parentElement.dataset.nonce},function(t){if(!t.success)return alert(t),!1;window.location.reload()},"json")});const e=window.location.hash;""!==e&&(t(".nav-tab-wrapper").children().removeClass("nav-tab-active"),t('.nav-tab-wrapper a[href="'+e+'"]').addClass("nav-tab-active"),t(".tabs-content").children().addClass("hidden"),t(".tabs-content div"+e.replace("#","#tab-")).removeClass("hidden"),t("body").trigger("show_"+e.replace("#","")+"_tab_content")),t(".nav-tab-wrapper").on("click","a",function(){const e=t(this).attr("href"),a=e.replace("#","#tab-");t(this).parent().children().removeClass("nav-tab-active"),t(this).addClass("nav-tab-active"),t(".tabs-content").children().addClass("hidden"),t(".tabs-content div"+a).removeClass("hidden"),t("body").trigger("show_"+e.replace("#","")+"_tab_content")}),t(".color_picker_trigger").wpColorPicker(),t(".shortcodes-list-wrapper").on("click",".toggle-shortcodes-list",function(e){e.preventDefault();const a=t(this).data("hide"),n=t(this).data("show"),o=t(this).next(".shortcodes-list");o.toggleClass("show");const s=o.hasClass("show")?a:n;t(this).text(s)}),t(".chosen-select").chosen({disable_search_threshold:10});const a={};t("body").on("click",".image_uploader_trigger",function(e){e.preventDefault();const n=t(this).data("name")||"",o=t(this).data("title")||wpmmVars.imageUploaderDefaults.title,s=t(this).data("button-text")||wpmmVars.imageUploaderDefaults.buttonText,i=t(this).data("to-selector")||"";""!==n&&""!==i?a.hasOwnProperty(n)?a[n].open():(a[n]=wp.media.frames.file_frame=wp.media({title:o,button:{text:s},multiple:!1}),a[n].on("select",function(){const e=a[n].state().get("selection").first().toJSON().url||"";t(i).val(e)}),a[n].open()):alert("Required `data` attributes: name, to-selector")});const n=function(e){t(".design_bg_types").hide(),t("#show_"+e).show()};n(t("#design_bg_type").val()),t("body").on("change","#design_bg_type",function(){const e=t(this).val();n(e)}),t("ul.bg_list").on("click","li",function(){t(this).parent().children().removeClass("active"),t(this).addClass("active")}),t("#subscribers_wrap").on("click","#subscribers-export",function(){const e=t("#tab-modules #_wpnonce").val();t("<iframe />").attr("src",wpmmVars.ajaxURL+"?action=wpmm_subscribers_export&_wpnonce="+encodeURI(e)).appendTo("body").hide()}),t("#subscribers_wrap").on("click","#subscribers-empty-list",function(){const e=t("#tab-modules #_wpnonce").val();t.post(wpmmVars.ajaxURL,{action:"wpmm_subscribers_empty_list",_wpnonce:e},function(e){if(!e.success)return alert(e.data),!1;t("#subscribers_wrap").html(e.data)},"json")}),t("body").on("click",".reset_settings",function(){const e=t(this).data("tab"),a=t("#tab-"+e+" #_wpnonce").val();t.post(wpmmVars.ajaxURL,{action:"wpmm_reset_settings",tab:e,_wpnonce:a},function(t){if(!t.success)return alert(t.data),!1;window.location.reload(!0)},"json")}),t(".countdown_start").datetimepicker({timeFormat:"HH:mm:ss",dateFormat:"dd-mm-yy"});let o="#";const s=t(".template-image-wrap");function i(e){const a={_wpnonce:t("#tab-design #_wpnonce").val(),source:"tab-design",template_slug:e.dataset.slug,category:e.dataset.category};t(e).html('<span class="dashicons dashicons-update"></span>'+wpmmVars.importingText+"..."),t(".button-import").addClass("disabled").css("pointer-events","none"),s.removeClass("can-import"),t(e).parent().addClass("importing"),l(a,function(e){o=e.pageEditURL.replace(/&/g,"&"),t(".importing .button-import").html(wpmmVars.importDone),r({title:wpmmVars.modalTexts.title,description:wpmmVars.modalTexts.description,first_button:`<a href="${o}" class="button button-primary button-big">${wpmmVars.modalTexts.buttonPage}</a>`,second_button:`<button class="button button-secondary button-big" onClick="window.location.reload()">${wpmmVars.modalTexts.buttonSettings}</button>`})})}function r(e){const a=t('<div class="modal-overlay"><div class="modal-frame"><div class="modal-content">'+`<h4 class="modal-header">${e.title}</h4>`+`<p class="modal-text">${e.description}</p>`+'<div class="buttons-wrap">'+e.first_button+e.second_button+"</div></div></div></div>");t("body").addClass("has-modal"),t(".modal-overlay").length?t(".modal-overlay").replaceWith(a):t(a).appendTo("body")}function c(e,a){t(".slider-wrap").removeClass(`move-to-${e}`).addClass(`move-to-${a}`),t(`.${e}-step`).attr("aria-hidden","true").css("display","none"),t(`.${a}-step`).removeAttr("aria-hidden").removeAttr("style")}function l(e,a){wpmmVars.isOtterInstalled?wpmmVars.isOtterActivated||m(()=>p(e,a)):function(e){t.post(wpmmVars.ajaxURL,{action:"wp_ajax_install_plugin",_ajax_nonce:wpmmVars.pluginInstallNonce,slug:"otter-blocks"},function(a){if(!a.success)return alert(a.data.errorMessage),t(".dashicons-update").remove(),t('<p class="error import-error">'+wpmmVars.errorString+"</p>").insertAfter("#wizard-import-button"),window.location.reload(),!1;t.post(wpmmVars.ajaxURL,{action:"wpmm_update_sdk_options",_wpnonce:wpmmVars.ajaxNonce},function(t){t.success||console.error(t.data)}),m(e)})}(()=>p(e,a))}function p(e,a){e.action="wpmm_insert_template",t.post(wpmmVars.ajaxURL,e,function(e){if(!e.success)return alert(e.data),t(".dashicons-update").remove(),t('<p class="error import-error">'+wpmmVars.errorString+"</p>").insertAfter("#wizard-import-button"),!1;a(e.data)},"json")}function m(e){t.get(wpmmVars.otterActivationLink,function(){e()})}s.on("click",".button-import",function(){if("0"!==this.dataset.replace){r({title:wpmmVars.confirmModalTexts.title,description:wpmmVars.confirmModalTexts.description,first_button:`<button class="button button-primary button-big confirm button-import">${wpmmVars.confirmModalTexts.buttonContinue}</button>`,second_button:`<button class="button button-secondary button-big go-back">${wpmmVars.confirmModalTexts.buttonGoBack}</button>`});const e=this;t("button.confirm").on("click",function(){t(this).html('<span class="dashicons dashicons-update"></span>'+wpmmVars.importingText+"..."),t(".modal-content").find(t(".go-back")).addClass("disabled"),i(e)}),t("button.go-back").on("click",function(){t(".modal-overlay").remove()})}else i(this)}),t('select[name="options[design][template_category]"]').on("change",function(){const e=t("#tab-design #_wpnonce").val();t.post(wpmmVars.ajaxURL,{action:"wpmm_change_template_category",category:this.value,_wpnonce:e},function(t){if(!t.success)return alert(t),!1;window.location.reload()},"json")}),t('select[name="options[design][page_id]"]').on("change",function(){const e=t("#tab-design #_wpnonce").val();t.post(wpmmVars.ajaxURL,{action:"wpmm_select_page",page_id:this.value,_wpnonce:e},function(t){if(!t.success)return alert(t.data),!1;window.location.reload()},"json")}),t("h2.wpmm-title span").on("click",function(){window.location.href=wpmmVars.adminURL}),t('input[name="wizard-template"]:checked').val()?t("#wpmm-wizard-wrapper .button-import").removeClass("disabled"):t('input[name="wizard-template"]').on("change",function(){t("#wpmm-wizard-wrapper .button-import").removeClass("disabled"),t('input[name="wizard-template"]').off("change")}),t("#wizard-import-button").on("click",".button-import:not(.disabled)",function(){const e=t('input[name="wizard-template"]:checked'),a=e.val(),n=e[0].dataset.category,s={_wpnonce:wpmmVars.wizardNonce,source:"wizard",template_slug:a,category:n};!function(e){const a=t("input[value="+e+"] + .template");a.addClass("loading"),a.append('<span class="dashicons dashicons-update"></span><p><i>'+wpmmVars.loadingString+"</i></p>"),t(".button-import").attr("disabled","disabled"),t("#wpmm-wizard-wrapper .templates-radio label").css("pointer-events","none")}(s.template_slug),l(s,function(e){c("import","subscribe"),o=e.pageEditURL.replace(/&/g,"&"),t("#wpmm-wizard-wrapper .finish-step .heading").text(wpmmVars.finishWizardStrings[n])})}),t('#email-input-wrap input[type="text"]').on("keypress",e=>{if("Enter"===e.key){t("#email-input-wrap .subscribe-button").trigger("click")}}),t("#email-input-wrap").on("click",".subscribe-button",function(e){e.preventDefault();const a=t('#email-input-wrap input[type="text"]'),n=a.val();return function(t){const e=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(t.toLowerCase()));return t.length>7&&!0===e}(n)?(a.removeClass("invalid"),t.post(wpmmVars.ajaxURL,{action:"wpmm_subscribe",email:n,_wpnonce:wpmmVars.wizardNonce},function(t){t.success||alert(t.data),c("subscribe","finish")}),!1):(t("#email-input-wrap").append(`<p class="subscribe-message email-error"><i>${wpmmVars.invalidEmailString}</i></p>`),a.addClass("invalid"),void setTimeout(function(){t(".email-error").remove()},1500))}),t("#skip-subscribe").on("click",function(){c("subscribe","finish")}),t("#view-page-button").on("click",function(){window.location.href=o}),t("#refresh-button").on("click",function(){window.location.reload()})});
|
assets/templates/coming-soon/coming-soon-cover/blocks-export.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"label": "Coming Soon - cover",
|
3 |
+
"__file": "wp_export",
|
4 |
+
"version": 2,
|
5 |
+
"content": "<!-- wp:themeisle-blocks/advanced-columns {\"id\":\"wp-block-themeisle-blocks-advanced-columns-0d617423\",\"columns\":1,\"layout\":\"equal\",\"padding\":{\"top\":\"80px\",\"right\":\"32px\",\"bottom\":\"80px\",\"left\":\"32px\"},\"paddingTablet\":{\"top\":\"64px\",\"right\":\"24px\",\"bottom\":\"64px\",\"left\":\"24px\"},\"paddingMobile\":{\"top\":\"40px\",\"right\":\"20px\",\"bottom\":\"40px\",\"left\":\"20px\"},\"margin\":{\"top\":\"0px\",\"bottom\":\"0px\"},\"columnsWidth\":947,\"horizontalAlign\":\"center\",\"columnsHeight\":\"100vh\",\"verticalAlign\":\"center\",\"backgroundColor\":\"#191717\",\"backgroundOverlayType\":\"image\",\"backgroundOverlayImage\":{\"id\":193,\"url\":\"https://demosites.io/otter/wp-content/uploads/sites/664/2022/08/S2JLQ3IWFS-1.png\"},\"backgroundOverlayPosition\":{\"x\":\"0.37\",\"y\":\"0.15\"},\"backgroundOverlayRepeat\":\"no-repeat\",\"backgroundOverlaySize\":\"cover\",\"align\":\"full\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-columns-0d617423\" class=\"wp-block-themeisle-blocks-advanced-columns alignfull has-1-columns has-desktop-equal-layout has-tablet-equal-layout has-mobile-equal-layout has-vertical-center\"><div class=\"wp-block-themeisle-blocks-advanced-columns-overlay\"></div><div class=\"innerblocks-wrap\"><!-- wp:themeisle-blocks/advanced-column {\"id\":\"wp-block-themeisle-blocks-advanced-column-7a21d599\",\"padding\":{\"top\":\"24px\",\"right\":\"24px\",\"bottom\":\"24px\",\"left\":\"24px\"},\"paddingMobile\":{\"top\":\"16px\",\"right\":\"16px\",\"bottom\":\"16px\",\"left\":\"16px\"},\"columnWidth\":\"100\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-column-7a21d599\" class=\"wp-block-themeisle-blocks-advanced-column\"><!-- wp:group {\"textColor\":\"white\"} -->\n<div class=\"wp-block-group has-white-color has-text-color\"><!-- wp:themeisle-blocks/advanced-heading {\"id\":\"wp-block-themeisle-blocks-advanced-heading-84bfa495\",\"tag\":\"h1\",\"align\":\"center\",\"fontSize\":80,\"fontSizeTablet\":40,\"fontSizeMobile\":32,\"fontFamily\":\"Barlow\",\"fontVariant\":\"800\",\"fontStyle\":\"normal\",\"textTransform\":\"uppercase\"} -->\n<h1 id=\"wp-block-themeisle-blocks-advanced-heading-84bfa495\" class=\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-84bfa495\">Our Website is Coming soon. Stay tuned!</h1>\n<!-- /wp:themeisle-blocks/advanced-heading -->\n\n<!-- wp:spacer {\"height\":\"40px\"} -->\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:themeisle-blocks/countdown {\"id\":\"wp-block-themeisle-blocks-countdown-f473e0f3\",\"date\":\"2022-08-30T13:14:00\",\"valueColor\":\"#ffffff\",\"labelColor\":\"#ffffff\",\"gap\":24,\"height\":186,\"heightTablet\":185,\"heightMobile\":160,\"borderRadiusBox\":{\"left\":\"8px\",\"right\":\"8px\",\"bottom\":\"8px\",\"top\":\"8px\"},\"borderColor\":\"#ffffff\",\"valueFontSize\":\"64px\",\"valueFontSizeTablet\":\"40px\",\"valueFontSizeMobile\":\"32px\",\"labelFontSize\":\"16px\",\"labelFontSizeMobile\":\"14px\"} -->\n<div id=\"wp-block-themeisle-blocks-countdown-f473e0f3\" data-date=\"2022-08-30T13:14:00\" class=\"wp-block-themeisle-blocks-countdown\"><div class=\"otter-countdown__container\"><div class=\"otter-countdown__display\"><div name=\"day\" class=\"otter-countdown__display-area is-main-component\"><div class=\"otter-countdown__value\">0</div><div class=\"otter-countdown__label\">Day</div></div><div name=\"hour\" class=\"otter-countdown__display-area is-main-component\"><div class=\"otter-countdown__value\">0</div><div class=\"otter-countdown__label\">Hour</div></div><div name=\"minute\" class=\"otter-countdown__display-area is-main-component\"><div class=\"otter-countdown__value\">0</div><div class=\"otter-countdown__label\">Minute</div></div><div name=\"second\" class=\"otter-countdown__display-area is-main-component\"><div class=\"otter-countdown__value\">0</div><div class=\"otter-countdown__label\">Second</div></div></div></div></div>\n<!-- /wp:themeisle-blocks/countdown -->\n\n<!-- wp:spacer {\"height\":\"40px\"} -->\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:themeisle-blocks/advanced-heading {\"id\":\"wp-block-themeisle-blocks-advanced-heading-a458b450\",\"tag\":\"p\",\"align\":\"center\",\"fontSize\":27,\"fontSizeMobile\":18,\"fontFamily\":\"Inter\",\"fontVariant\":\"regular\",\"fontStyle\":\"normal\"} -->\n<p id=\"wp-block-themeisle-blocks-advanced-heading-a458b450\" class=\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-a458b450\">Thanks for checking in! While we are getting ready, make sure to follow us on Social to know when we launch!</p>\n<!-- /wp:themeisle-blocks/advanced-heading -->\n\n<!-- wp:spacer {\"height\":\"40px\"} -->\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:social-links {\"iconColor\":\"white\",\"iconColorValue\":\"#ffffff\",\"openInNewTab\":true,\"size\":\"has-large-icon-size\",\"className\":\"is-style-logos-only animated bounce delay-1s\",\"layout\":{\"type\":\"flex\",\"justifyContent\":\"center\"}} -->\n<ul class=\"wp-block-social-links has-large-icon-size has-icon-color is-style-logos-only animated bounce delay-1s\"><!-- wp:social-link {\"url\":\"#\",\"service\":\"twitter\"} /-->\n\n<!-- wp:social-link {\"url\":\"#\",\"service\":\"facebook\"} /-->\n\n<!-- wp:social-link {\"url\":\"#\",\"service\":\"dribbble\"} /--></ul>\n<!-- /wp:social-links --></div>\n<!-- /wp:group --></div>\n<!-- /wp:themeisle-blocks/advanced-column --></div></div>\n<!-- /wp:themeisle-blocks/advanced-columns -->"
|
6 |
+
}
|
assets/templates/coming-soon/coming-soon-cover/screenshot.png
ADDED
Binary file
|
assets/templates/coming-soon/coming-soon-minimal/blocks-export.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"label": "Coming Soon - minimal",
|
3 |
+
"__file": "wp_export",
|
4 |
+
"version": 2,
|
5 |
+
"content": "<!-- wp:themeisle-blocks/advanced-columns {\"id\":\"wp-block-themeisle-blocks-advanced-columns-0d617423\",\"columns\":1,\"layout\":\"equal\",\"padding\":{\"top\":\"80px\",\"right\":\"32px\",\"bottom\":\"80px\",\"left\":\"32px\"},\"paddingTablet\":{\"top\":\"64px\",\"right\":\"24px\",\"bottom\":\"64px\",\"left\":\"24px\"},\"paddingMobile\":{\"top\":\"40px\",\"right\":\"20px\",\"bottom\":\"40px\",\"left\":\"20px\"},\"margin\":{\"top\":\"0px\",\"bottom\":\"0px\"},\"columnsWidth\":947,\"horizontalAlign\":\"center\",\"columnsHeight\":\"100vh\",\"verticalAlign\":\"center\",\"backgroundColor\":\"var(\\u002d\\u002dnv-text-dark-bg)\",\"align\":\"full\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-columns-0d617423\" class=\"wp-block-themeisle-blocks-advanced-columns alignfull has-1-columns has-desktop-equal-layout has-tablet-equal-layout has-mobile-equal-layout has-vertical-center\"><div class=\"wp-block-themeisle-blocks-advanced-columns-overlay\"></div><div class=\"innerblocks-wrap\"><!-- wp:themeisle-blocks/advanced-column {\"id\":\"wp-block-themeisle-blocks-advanced-column-7a21d599\",\"padding\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"paddingMobile\":{\"top\":\"16px\",\"right\":\"16px\",\"bottom\":\"16px\",\"left\":\"16px\"},\"columnWidth\":\"100\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-column-7a21d599\" class=\"wp-block-themeisle-blocks-advanced-column\"><!-- wp:group -->\n<div class=\"wp-block-group\"><!-- wp:themeisle-blocks/advanced-heading {\"id\":\"wp-block-themeisle-blocks-advanced-heading-84bfa495\",\"tag\":\"h1\",\"align\":\"center\",\"alignTablet\":\"center\",\"alignMobile\":\"center\",\"headingColor\":\"#000000\",\"fontSize\":80,\"fontSizeTablet\":40,\"fontSizeMobile\":32,\"fontFamily\":\"DM Serif Display\",\"fontVariant\":\"normal\",\"fontStyle\":\"normal\",\"textTransform\":\"none\",\"className\":\"animated fadeIn\"} -->\n<h1 id=\"wp-block-themeisle-blocks-advanced-heading-84bfa495\" class=\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-84bfa495 animated fadeIn\">Our new website is launching soon!</h1>\n<!-- /wp:themeisle-blocks/advanced-heading -->\n\n<!-- wp:spacer {\"height\":\"40px\"} -->\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:themeisle-blocks/countdown {\"id\":\"wp-block-themeisle-blocks-countdown-f473e0f3\",\"date\":\"2022-09-25T13:14:00\",\"gap\":24,\"height\":186,\"heightTablet\":185,\"heightMobile\":160,\"borderRadiusBox\":{\"left\":\"8px\",\"right\":\"8px\",\"bottom\":\"8px\",\"top\":\"8px\"},\"borderColor\":\"#ffffff\",\"valueFontSize\":\"64px\",\"valueFontSizeTablet\":\"40px\",\"valueFontSizeMobile\":\"32px\",\"labelFontSize\":\"16px\",\"labelFontSizeMobile\":\"14px\"} -->\n<div id=\"wp-block-themeisle-blocks-countdown-f473e0f3\" data-date=\"2022-09-25T13:14:00\" class=\"wp-block-themeisle-blocks-countdown\"><div class=\"otter-countdown__container\"><div class=\"otter-countdown__display\"><div name=\"day\" class=\"otter-countdown__display-area is-main-component\"><div class=\"otter-countdown__value\">0</div><div class=\"otter-countdown__label\">Day</div></div><div name=\"hour\" class=\"otter-countdown__display-area is-main-component\"><div class=\"otter-countdown__value\">0</div><div class=\"otter-countdown__label\">Hour</div></div><div name=\"minute\" class=\"otter-countdown__display-area is-main-component\"><div class=\"otter-countdown__value\">0</div><div class=\"otter-countdown__label\">Minute</div></div><div name=\"second\" class=\"otter-countdown__display-area is-main-component\"><div class=\"otter-countdown__value\">0</div><div class=\"otter-countdown__label\">Second</div></div></div></div></div>\n<!-- /wp:themeisle-blocks/countdown -->\n\n<!-- wp:spacer {\"height\":\"40px\"} -->\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:themeisle-blocks/advanced-heading {\"id\":\"wp-block-themeisle-blocks-advanced-heading-a458b450\",\"tag\":\"p\",\"align\":\"center\",\"alignTablet\":\"center\",\"fontSize\":27,\"fontSizeMobile\":18,\"fontFamily\":\"DM Sans\",\"fontVariant\":\"normal\",\"fontStyle\":\"normal\"} -->\n<p id=\"wp-block-themeisle-blocks-advanced-heading-a458b450\" class=\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-a458b450\">Thanks for checking in! While we are getting ready, make sure to follow us on Social to know when we launch!</p>\n<!-- /wp:themeisle-blocks/advanced-heading -->\n\n<!-- wp:social-links {\"iconColor\":\"neve-text-color\",\"iconColorValue\":\"var(\\u002d\\u002dnv-text-color)\",\"size\":\"has-large-icon-size\",\"className\":\"is-style-logos-only ticss-1c969deb\",\"layout\":{\"type\":\"flex\",\"justifyContent\":\"center\"},\"hasCustomCSS\":true} -->\n<ul class=\"wp-block-social-links has-large-icon-size has-icon-color is-style-logos-only ticss-1c969deb\"><!-- wp:social-link {\"url\":\"#\",\"service\":\"twitter\"} /-->\n\n<!-- wp:social-link {\"url\":\"#\",\"service\":\"facebook\"} /-->\n\n<!-- wp:social-link {\"url\":\"#\",\"service\":\"linkedin\"} /--></ul>\n<!-- /wp:social-links --></div>\n<!-- /wp:group --></div>\n<!-- /wp:themeisle-blocks/advanced-column --></div></div>\n<!-- /wp:themeisle-blocks/advanced-columns -->"
|
6 |
+
}
|
assets/templates/coming-soon/coming-soon-minimal/screenshot.png
ADDED
Binary file
|
assets/templates/coming-soon/coming-soon-modern/blocks-export.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"label": "Coming Soon - modern",
|
3 |
+
"__file": "wp_export",
|
4 |
+
"version": 2,
|
5 |
+
"content": "<!-- wp:themeisle-blocks/advanced-columns {\"id\":\"wp-block-themeisle-blocks-advanced-columns-0d617423\",\"columns\":1,\"layout\":\"equal\",\"padding\":{\"top\":\"80px\",\"right\":\"20px\",\"bottom\":\"80px\",\"left\":\"20px\"},\"paddingTablet\":{\"top\":\"80px\",\"right\":\"20px\",\"bottom\":\"80px\",\"left\":\"20px\"},\"paddingMobile\":{\"top\":\"40px\",\"right\":\"20px\",\"bottom\":\"40px\",\"left\":\"20px\"},\"margin\":{\"top\":\"0px\",\"bottom\":\"0px\"},\"columnsWidth\":900,\"horizontalAlign\":\"center\",\"verticalAlign\":\"center\",\"backgroundColor\":\"#ffffff\",\"backgroundOverlayType\":\"image\",\"align\":\"full\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-columns-0d617423\" class=\"wp-block-themeisle-blocks-advanced-columns alignfull has-1-columns has-desktop-equal-layout has-tablet-equal-layout has-mobile-equal-layout has-vertical-center\"><div class=\"wp-block-themeisle-blocks-advanced-columns-overlay\"></div><div class=\"innerblocks-wrap\"><!-- wp:themeisle-blocks/advanced-column {\"id\":\"wp-block-themeisle-blocks-advanced-column-09847c7b\",\"padding\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"paddingMobile\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"columnWidth\":\"100\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-column-09847c7b\" class=\"wp-block-themeisle-blocks-advanced-column\"><!-- wp:image {\"align\":\"center\",\"id\":135,\"sizeSlug\":\"large\",\"linkDestination\":\"none\",\"className\":\"ticss-3f08ab9a\",\"hasCustomCSS\":true,\"customCSS\":\".ticss-3f08ab9a {\\n}\\n\"} -->\n<figure class=\"wp-block-image aligncenter size-large ticss-3f08ab9a\"><img src=\"https://demosites.io/otter/wp-content/uploads/sites/664/2022/08/coming_soon_img.svg\" alt=\"\" class=\"wp-image-135\"/></figure>\n<!-- /wp:image -->\n\n<!-- wp:themeisle-blocks/advanced-heading {\"id\":\"wp-block-themeisle-blocks-advanced-heading-84bfa495\",\"tag\":\"h1\",\"align\":\"center\",\"alignTablet\":\"center\",\"alignMobile\":\"center\",\"headingColor\":\"#282525\",\"fontSize\":80,\"fontSizeTablet\":48,\"fontSizeMobile\":40,\"fontFamily\":\"Outfit\",\"fontVariant\":\"800\",\"fontStyle\":\"normal\",\"textTransform\":\"none\"} -->\n<h1 id=\"wp-block-themeisle-blocks-advanced-heading-84bfa495\" class=\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-84bfa495\">Our Website is Coming soon.</h1>\n<!-- /wp:themeisle-blocks/advanced-heading -->\n\n<!-- wp:spacer {\"height\":\"40px\"} -->\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:themeisle-blocks/countdown {\"id\":\"wp-block-themeisle-blocks-countdown-aead0e2a\",\"date\":\"2023-05-17T18:46:07\",\"backgroundColor\":\"#efece5\",\"valueColor\":\"#202020\",\"labelColor\":\"#9c9c9c\",\"gap\":16,\"width\":193,\"containerWidth\":\"100%\",\"height\":156,\"heightMobile\":125,\"borderRadiusBox\":{\"left\":\"5px\",\"right\":\"5px\",\"bottom\":\"5px\",\"top\":\"5px\"},\"borderStyle\":\"solid\",\"borderWidth\":0,\"valueFontSize\":64,\"valueFontSizeTablet\":\"40px\",\"valueFontSizeMobile\":\"32px\",\"labelFontSize\":\"16px\",\"labelFontSizeTablet\":\"13px\",\"labelFontSizeMobile\":\"14px\",\"hasSeparators\":false,\"valueFontWeight\":\"600\",\"labelFontWeight\":\"600\"} -->\n<div id=\"wp-block-themeisle-blocks-countdown-aead0e2a\" data-date=\"2023-05-17T18:46:07\" class=\"wp-block-themeisle-blocks-countdown\"><div class=\"otter-countdown__container\"><div class=\"otter-countdown__display\"><div name=\"day\" class=\"otter-countdown__display-area is-main-component\"><div class=\"otter-countdown__value\">0</div><div class=\"otter-countdown__label\">Day</div></div><div name=\"hour\" class=\"otter-countdown__display-area is-main-component\"><div class=\"otter-countdown__value\">0</div><div class=\"otter-countdown__label\">Hour</div></div><div name=\"minute\" class=\"otter-countdown__display-area is-main-component\"><div class=\"otter-countdown__value\">0</div><div class=\"otter-countdown__label\">Minute</div></div><div name=\"second\" class=\"otter-countdown__display-area is-main-component\"><div class=\"otter-countdown__value\">0</div><div class=\"otter-countdown__label\">Second</div></div></div></div></div>\n<!-- /wp:themeisle-blocks/countdown -->\n\n<!-- wp:spacer {\"height\":\"40px\"} -->\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:themeisle-blocks/advanced-heading {\"id\":\"wp-block-themeisle-blocks-advanced-heading-4956a7c6\",\"tag\":\"p\",\"align\":\"center\",\"alignTablet\":\"center\",\"alignMobile\":\"center\",\"headingColor\":\"#282525\",\"fontSize\":27,\"fontSizeTablet\":24,\"fontSizeMobile\":22,\"fontFamily\":\"Outfit\",\"fontVariant\":\"normal\",\"fontStyle\":\"normal\"} -->\n<p id=\"wp-block-themeisle-blocks-advanced-heading-4956a7c6\" class=\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-4956a7c6\">We are working to deliver the best experience for our visitors. Meanwhile, follow us on Social.</p>\n<!-- /wp:themeisle-blocks/advanced-heading -->\n\n<!-- wp:social-links {\"iconColor\":\"white\",\"iconColorValue\":\"#ffffff\",\"customIconBackgroundColor\":\"#63a18f\",\"iconBackgroundColorValue\":\"#63a18f\",\"size\":\"has-large-icon-size\",\"className\":\"is-style-default\",\"layout\":{\"type\":\"flex\",\"justifyContent\":\"center\"}} -->\n<ul class=\"wp-block-social-links has-large-icon-size has-icon-color has-icon-background-color is-style-default\"><!-- wp:social-link {\"url\":\"#\",\"service\":\"twitter\"} /-->\n\n<!-- wp:social-link {\"url\":\"#\",\"service\":\"facebook\"} /-->\n\n<!-- wp:social-link {\"url\":\"#\",\"service\":\"instagram\"} /--></ul>\n<!-- /wp:social-links --></div>\n<!-- /wp:themeisle-blocks/advanced-column --></div></div>\n<!-- /wp:themeisle-blocks/advanced-columns --><!-- wp:themeisle-blocks/advanced-columns {\"id\":\"wp-block-themeisle-blocks-advanced-columns-9258d0fb\",\"columns\":1,\"layout\":\"equal\",\"padding\":{\"top\":\"80px\",\"right\":\"20px\",\"bottom\":\"80px\",\"left\":\"20px\"},\"paddingTablet\":{\"top\":\"80px\",\"right\":\"20px\",\"bottom\":\"80px\",\"left\":\"20px\"},\"paddingMobile\":{\"top\":\"40px\",\"right\":\"20px\",\"bottom\":\"40px\",\"left\":\"20px\"},\"margin\":{\"top\":\"0px\",\"bottom\":\"0px\"},\"columnsWidth\":600,\"horizontalAlign\":\"center\",\"verticalAlign\":\"center\",\"backgroundColor\":\"#efece5\",\"backgroundOverlayType\":\"image\",\"align\":\"full\",\"className\":\"ticss-a5d12595\",\"hasCustomCSS\":true,\"customCSS\":\".ticss-a5d12595 {\\n \\n}\\n\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-columns-9258d0fb\" class=\"wp-block-themeisle-blocks-advanced-columns alignfull has-1-columns has-desktop-equal-layout has-tablet-equal-layout has-mobile-equal-layout has-vertical-center ticss-a5d12595\"><div class=\"wp-block-themeisle-blocks-advanced-columns-overlay\"></div><div class=\"innerblocks-wrap\"><!-- wp:themeisle-blocks/advanced-column {\"id\":\"wp-block-themeisle-blocks-advanced-column-104ab98e\",\"padding\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"paddingMobile\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"columnWidth\":\"100\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-column-104ab98e\" class=\"wp-block-themeisle-blocks-advanced-column\"><!-- wp:themeisle-blocks/advanced-columns {\"id\":\"wp-block-themeisle-blocks-advanced-columns-1c3dfa33\",\"columns\":1,\"layout\":\"oneTwo\",\"layoutTablet\":\"collapsedRows\",\"layoutMobile\":\"collapsedRows\",\"padding\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"paddingTablet\":{\"top\":\"64px\",\"right\":\"24px\",\"bottom\":\"64px\",\"left\":\"24px\"},\"paddingMobile\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"margin\":{\"top\":\"0px\",\"bottom\":\"0px\"}} -->\n<div id=\"wp-block-themeisle-blocks-advanced-columns-1c3dfa33\" class=\"wp-block-themeisle-blocks-advanced-columns has-1-columns has-desktop-oneTwo-layout has-tablet-collapsedRows-layout has-mobile-collapsedRows-layout has-vertical-unset\"><div class=\"wp-block-themeisle-blocks-advanced-columns-overlay\"></div><div class=\"innerblocks-wrap\"><!-- wp:themeisle-blocks/advanced-column {\"id\":\"wp-block-themeisle-blocks-advanced-column-dcc8c6af\",\"padding\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"paddingMobile\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"columnWidth\":\"100\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-column-dcc8c6af\" class=\"wp-block-themeisle-blocks-advanced-column\"><!-- wp:themeisle-blocks/advanced-heading {\"id\":\"wp-block-themeisle-blocks-advanced-heading-b25cf246\",\"align\":\"left\",\"alignTablet\":\"center\",\"alignMobile\":\"center\",\"headingColor\":\"#282525\",\"fontSize\":40,\"fontSizeTablet\":48,\"fontSizeMobile\":40,\"fontFamily\":\"Outfit\",\"fontVariant\":\"800\",\"fontStyle\":\"normal\",\"textTransform\":\"none\"} -->\n<h2 id=\"wp-block-themeisle-blocks-advanced-heading-b25cf246\" class=\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-b25cf246\">Stay in the loop!</h2>\n<!-- /wp:themeisle-blocks/advanced-heading -->\n\n<!-- wp:themeisle-blocks/advanced-heading {\"id\":\"wp-block-themeisle-blocks-advanced-heading-4122f520\",\"tag\":\"p\",\"align\":\"left\",\"alignTablet\":\"center\",\"alignMobile\":\"center\",\"headingColor\":\"#282525\",\"fontSize\":22,\"fontSizeTablet\":22,\"fontSizeMobile\":20,\"fontFamily\":\"Outfit\",\"fontVariant\":\"normal\",\"fontStyle\":\"normal\"} -->\n<p id=\"wp-block-themeisle-blocks-advanced-heading-4122f520\" class=\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-4122f520\">Leave your email and we will send you a heads-up when our site launches.</p>\n<!-- /wp:themeisle-blocks/advanced-heading -->\n\n<!-- wp:themeisle-blocks/form {\"id\":\"wp-block-themeisle-blocks-form-f9b364b5\",\"optionName\":\"158_f9b364b5\",\"submitLabel\":\"Keep me updated\",\"inputPadding\":{\"top\":\"16px\",\"right\":\"16px\",\"bottom\":\"16px\",\"left\":\"16px\"},\"labelColor\":\"#282525\",\"helpLabelColor\":\"#282525\",\"inputRequiredColor\":\"var(\\u002d\\u002dnv-c-2)\",\"inputBorderColor\":\"#bbbbbb\",\"submitMessageColor\":\"#457843\",\"submitMessageErrorColor\":\"#c66262\",\"submitBackgroundColor\":\"#282525\",\"inputGap\":2,\"inputColor\":\"#131313\",\"inputsGap\":16,\"submitFontSize\":\"1em\"} -->\n<div id=\"wp-block-themeisle-blocks-form-f9b364b5\" class=\"wp-block-themeisle-blocks-form\" data-option-name=\"158_f9b364b5\"><form class=\"otter-form__container\"><!-- wp:themeisle-blocks/form-input {\"id\":\"wp-block-themeisle-blocks-form-input-dee32220\",\"label\":\"Name\",\"placeholder\":\"Your Name\",\"isRequired\":true,\"className\":\"ticss-6f3ea31f\",\"hasCustomCSS\":true} -->\n<div id=\"wp-block-themeisle-blocks-form-input-dee32220\" class=\"wp-block-themeisle-blocks-form-input ticss-6f3ea31f\"><label for=\"wp-block-themeisle-blocks-form-input-dee32220-input\" class=\"otter-form-input-label\"><span class=\"otter-form-input-label__label\">Name</span><span class=\"required\">*</span></label><input type=\"text\" id=\"wp-block-themeisle-blocks-form-input-dee32220-input\" required placeholder=\"Your Name\" class=\"otter-form-input\"/></div>\n<!-- /wp:themeisle-blocks/form-input -->\n\n<!-- wp:themeisle-blocks/form-input {\"id\":\"wp-block-themeisle-blocks-form-input-ed39daf2\",\"type\":\"email\",\"label\":\"Email\",\"placeholder\":\"Your email\",\"isRequired\":true} -->\n<div id=\"wp-block-themeisle-blocks-form-input-ed39daf2\" class=\"wp-block-themeisle-blocks-form-input\"><label for=\"wp-block-themeisle-blocks-form-input-ed39daf2-input\" class=\"otter-form-input-label\"><span class=\"otter-form-input-label__label\">Email</span><span class=\"required\">*</span></label><input type=\"email\" id=\"wp-block-themeisle-blocks-form-input-ed39daf2-input\" required placeholder=\"Your email\" class=\"otter-form-input\"/></div>\n<!-- /wp:themeisle-blocks/form-input -->\n\n<!-- wp:themeisle-blocks/form-nonce {\"formId\":\"wp-block-themeisle-blocks-form-f9b364b5\"} /-->\n\n<!-- wp:paragraph {\"fontSize\":\"small\"} -->\n<p class=\"has-small-font-size\">This form collects your name and email so that we can reach you back. Check out our <a href=\"#\">Privacy Policy</a> page to fully understand how we protect and manage your submitted data.</p>\n<!-- /wp:paragraph --><div class=\"wp-block-button\"><button class=\"wp-block-button__link\" type=\"submit\">Keep me updated</button></div></form></div>\n<!-- /wp:themeisle-blocks/form --></div>\n<!-- /wp:themeisle-blocks/advanced-column --></div></div>\n<!-- /wp:themeisle-blocks/advanced-columns --></div>\n<!-- /wp:themeisle-blocks/advanced-column --></div></div>\n<!-- /wp:themeisle-blocks/advanced-columns -->"
|
6 |
+
}
|
assets/templates/coming-soon/coming-soon-modern/screenshot.png
ADDED
Binary file
|
assets/templates/maintenance/maintenance-cover/blocks-export.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"label": "Maintenance - cover",
|
3 |
+
"__file": "wp_export",
|
4 |
+
"version": 2,
|
5 |
+
"content": "<!-- wp:themeisle-blocks/advanced-columns {\"id\":\"wp-block-themeisle-blocks-advanced-columns-bf315cc5\",\"columns\":1,\"layout\":\"equal\",\"padding\":{\"top\":\"80px\",\"right\":\"32px\",\"bottom\":\"80px\",\"left\":\"32px\"},\"paddingTablet\":{\"top\":\"64px\",\"right\":\"24px\",\"bottom\":\"64px\",\"left\":\"24px\"},\"paddingMobile\":{\"top\":\"40px\",\"right\":\"20px\",\"bottom\":\"40px\",\"left\":\"20px\"},\"margin\":{\"top\":\"0px\",\"bottom\":\"0px\"},\"columnsWidth\":947,\"horizontalAlign\":\"center\",\"columnsHeight\":\"100vh\",\"verticalAlign\":\"center\",\"backgroundColor\":\"#191717\",\"backgroundOverlayType\":\"image\",\"backgroundOverlayImage\":{\"id\":196,\"url\":\"https://demosites.io/otter/wp-content/uploads/sites/664/2022/08/maintenance-cover.jpg\"},\"backgroundOverlayPosition\":{\"x\":\"0.37\",\"y\":\"0.15\"},\"backgroundOverlayRepeat\":\"no-repeat\",\"backgroundOverlaySize\":\"cover\",\"backgroundOverlayBlend\":\"screen\",\"align\":\"full\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-columns-bf315cc5\" class=\"wp-block-themeisle-blocks-advanced-columns alignfull has-1-columns has-desktop-equal-layout has-tablet-equal-layout has-mobile-equal-layout has-vertical-center\"><div class=\"wp-block-themeisle-blocks-advanced-columns-overlay\"></div><div class=\"innerblocks-wrap\"><!-- wp:themeisle-blocks/advanced-column {\"id\":\"wp-block-themeisle-blocks-advanced-column-7b61437b\",\"padding\":{\"top\":\"24px\",\"right\":\"24px\",\"bottom\":\"24px\",\"left\":\"24px\"},\"paddingMobile\":{\"top\":\"16px\",\"right\":\"16px\",\"bottom\":\"16px\",\"left\":\"16px\"},\"columnWidth\":\"100\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-column-7b61437b\" class=\"wp-block-themeisle-blocks-advanced-column\"><!-- wp:group {\"textColor\":\"white\"} -->\n<div class=\"wp-block-group has-white-color has-text-color\"><!-- wp:themeisle-blocks/advanced-heading {\"id\":\"wp-block-themeisle-blocks-advanced-heading-81277ea5\",\"tag\":\"h1\",\"align\":\"center\",\"alignTablet\":\"center\",\"alignMobile\":\"center\",\"fontSize\":80,\"fontSizeTablet\":60,\"fontSizeMobile\":32,\"fontFamily\":\"Barlow\",\"fontVariant\":\"800\",\"fontStyle\":\"normal\",\"textTransform\":\"uppercase\"} -->\n<h1 id=\"wp-block-themeisle-blocks-advanced-heading-81277ea5\" class=\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-81277ea5\">Website is under maintenance</h1>\n<!-- /wp:themeisle-blocks/advanced-heading -->\n\n<!-- wp:spacer {\"height\":\"40px\"} -->\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:themeisle-blocks/advanced-heading {\"id\":\"wp-block-themeisle-blocks-advanced-heading-a458b450\",\"tag\":\"p\",\"align\":\"center\",\"alignTablet\":\"center\",\"alignMobile\":\"center\",\"fontSize\":27,\"fontSizeTablet\":20,\"fontSizeMobile\":18,\"fontFamily\":\"Inter\",\"fontVariant\":\"regular\",\"fontStyle\":\"normal\"} -->\n<p id=\"wp-block-themeisle-blocks-advanced-heading-a458b450\" class=\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-a458b450\">We are doing some updates on our site, and we need to be offline for a while. We will be back with you shortly! Meanwhile, follow us on Social.</p>\n<!-- /wp:themeisle-blocks/advanced-heading -->\n\n<!-- wp:spacer {\"height\":\"40px\"} -->\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:social-links {\"iconColor\":\"white\",\"iconColorValue\":\"#ffffff\",\"openInNewTab\":true,\"size\":\"has-large-icon-size\",\"className\":\"is-style-logos-only animated bounce delay-1s\",\"layout\":{\"type\":\"flex\",\"justifyContent\":\"center\"}} -->\n<ul class=\"wp-block-social-links has-large-icon-size has-icon-color is-style-logos-only animated bounce delay-1s\"><!-- wp:social-link {\"url\":\"#\",\"service\":\"twitter\"} /-->\n\n<!-- wp:social-link {\"url\":\"#\",\"service\":\"facebook\"} /-->\n\n<!-- wp:social-link {\"url\":\"#\",\"service\":\"dribbble\"} /--></ul>\n<!-- /wp:social-links --></div>\n<!-- /wp:group --></div>\n<!-- /wp:themeisle-blocks/advanced-column --></div></div>\n<!-- /wp:themeisle-blocks/advanced-columns -->"
|
6 |
+
}
|
assets/templates/maintenance/maintenance-cover/screenshot.png
ADDED
Binary file
|
assets/templates/maintenance/maintenance-minimal/blocks-export.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"label": "Maintenance - minimal",
|
3 |
+
"__file": "wp_export",
|
4 |
+
"version": 2,
|
5 |
+
"content": "<!-- wp:themeisle-blocks/advanced-columns {\"id\":\"wp-block-themeisle-blocks-advanced-columns-0d617423\",\"columns\":1,\"layout\":\"equal\",\"padding\":{\"top\":\"80px\",\"right\":\"32px\",\"bottom\":\"80px\",\"left\":\"32px\"},\"paddingTablet\":{\"top\":\"64px\",\"right\":\"24px\",\"bottom\":\"64px\",\"left\":\"24px\"},\"paddingMobile\":{\"top\":\"40px\",\"right\":\"20px\",\"bottom\":\"40px\",\"left\":\"20px\"},\"margin\":{\"top\":\"0px\",\"bottom\":\"0px\"},\"columnsWidth\":947,\"horizontalAlign\":\"center\",\"columnsHeight\":\"100vh\",\"verticalAlign\":\"center\",\"backgroundColor\":\"var(\\u002d\\u002dnv-text-dark-bg)\",\"align\":\"full\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-columns-0d617423\" class=\"wp-block-themeisle-blocks-advanced-columns alignfull has-1-columns has-desktop-equal-layout has-tablet-equal-layout has-mobile-equal-layout has-vertical-center\"><div class=\"wp-block-themeisle-blocks-advanced-columns-overlay\"></div><div class=\"innerblocks-wrap\"><!-- wp:themeisle-blocks/advanced-column {\"id\":\"wp-block-themeisle-blocks-advanced-column-7a21d599\",\"padding\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"paddingMobile\":{\"top\":\"16px\",\"right\":\"16px\",\"bottom\":\"16px\",\"left\":\"16px\"},\"columnWidth\":\"100\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-column-7a21d599\" class=\"wp-block-themeisle-blocks-advanced-column\"><!-- wp:themeisle-blocks/advanced-heading {\"id\":\"wp-block-themeisle-blocks-advanced-heading-84bfa495\",\"tag\":\"h1\",\"align\":\"center\",\"alignTablet\":\"center\",\"alignMobile\":\"center\",\"headingColor\":\"#000000\",\"fontSize\":80,\"fontSizeTablet\":40,\"fontSizeMobile\":32,\"fontFamily\":\"DM Serif Display\",\"fontVariant\":\"normal\",\"fontStyle\":\"normal\",\"textTransform\":\"none\",\"className\":\"animated fadeIn\"} -->\n<h1 id=\"wp-block-themeisle-blocks-advanced-heading-84bfa495\" class=\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-84bfa495 animated fadeIn\">Website is under maintenance</h1>\n<!-- /wp:themeisle-blocks/advanced-heading -->\n\n<!-- wp:spacer {\"height\":\"40px\"} -->\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:themeisle-blocks/advanced-heading {\"id\":\"wp-block-themeisle-blocks-advanced-heading-a458b450\",\"tag\":\"p\",\"align\":\"center\",\"alignTablet\":\"center\",\"headingColor\":\"#000000\",\"fontSize\":27,\"fontSizeMobile\":18,\"fontFamily\":\"DM Sans\",\"fontVariant\":\"normal\",\"fontStyle\":\"normal\"} -->\n<p id=\"wp-block-themeisle-blocks-advanced-heading-a458b450\" class=\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-a458b450\">We are doing some maintenance on our website to improve your experience. Meanwhile, follow us on Social Media</p>\n<!-- /wp:themeisle-blocks/advanced-heading -->\n\n<!-- wp:spacer {\"height\":\"40px\"} -->\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"></div>\n<!-- /wp:spacer -->\n\n<!-- wp:social-links {\"iconColor\":\"black\",\"iconColorValue\":\"#000000\",\"size\":\"has-large-icon-size\",\"className\":\"is-style-logos-only ticss-1c969deb\",\"layout\":{\"type\":\"flex\",\"justifyContent\":\"center\"},\"hasCustomCSS\":true} -->\n<ul class=\"wp-block-social-links has-large-icon-size has-icon-color is-style-logos-only ticss-1c969deb\"><!-- wp:social-link {\"url\":\"#\",\"service\":\"twitter\"} /-->\n\n<!-- wp:social-link {\"url\":\"#\",\"service\":\"facebook\"} /-->\n\n<!-- wp:social-link {\"url\":\"#\",\"service\":\"linkedin\"} /--></ul>\n<!-- /wp:social-links --></div>\n<!-- /wp:themeisle-blocks/advanced-column --></div></div>\n<!-- /wp:themeisle-blocks/advanced-columns -->"
|
6 |
+
}
|
assets/templates/maintenance/maintenance-minimal/screenshot.png
ADDED
Binary file
|
assets/templates/maintenance/maintenance-modern/blocks-export.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"label": "Maintenance - modern",
|
3 |
+
"__file": "wp_export",
|
4 |
+
"version": 2,
|
5 |
+
"content": "<!-- wp:themeisle-blocks/advanced-columns {\"id\":\"wp-block-themeisle-blocks-advanced-columns-0d617423\",\"columns\":1,\"layout\":\"equal\",\"padding\":{\"top\":\"40px\",\"right\":\"20px\",\"bottom\":\"40px\",\"left\":\"20px\"},\"paddingTablet\":{\"top\":\"80px\",\"right\":\"20px\",\"bottom\":\"80px\",\"left\":\"20px\"},\"paddingMobile\":{\"top\":\"40px\",\"right\":\"20px\",\"bottom\":\"40px\",\"left\":\"20px\"},\"margin\":{\"top\":\"0px\",\"bottom\":\"0px\"},\"columnsWidth\":900,\"horizontalAlign\":\"center\",\"verticalAlign\":\"center\",\"backgroundColor\":\"#ffffff\",\"backgroundOverlayType\":\"image\",\"align\":\"full\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-columns-0d617423\" class=\"wp-block-themeisle-blocks-advanced-columns alignfull has-1-columns has-desktop-equal-layout has-tablet-equal-layout has-mobile-equal-layout has-vertical-center\"><div class=\"wp-block-themeisle-blocks-advanced-columns-overlay\"></div><div class=\"innerblocks-wrap\"><!-- wp:themeisle-blocks/advanced-column {\"id\":\"wp-block-themeisle-blocks-advanced-column-09847c7b\",\"padding\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"paddingMobile\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"columnWidth\":\"100\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-column-09847c7b\" class=\"wp-block-themeisle-blocks-advanced-column\"><!-- wp:image {\"align\":\"center\",\"id\":181,\"width\":477,\"height\":349,\"sizeSlug\":\"large\",\"linkDestination\":\"none\",\"className\":\"ticss-3f08ab9a\",\"hasCustomCSS\":true,\"customCSS\":\".ticss-3f08ab9a {\\n margin-right:-180px;\\n}\\n\"} -->\n<figure class=\"wp-block-image aligncenter size-large is-resized ticss-3f08ab9a\"><img src=\"https://demosites.io/otter/wp-content/uploads/sites/664/2022/08/maintenance_image_hero.svg\" alt=\"\" class=\"wp-image-181\" width=\"477\" height=\"349\"/></figure>\n<!-- /wp:image -->\n\n<!-- wp:themeisle-blocks/advanced-heading {\"id\":\"wp-block-themeisle-blocks-advanced-heading-84bfa495\",\"tag\":\"h1\",\"align\":\"center\",\"alignTablet\":\"center\",\"alignMobile\":\"center\",\"headingColor\":\"#282525\",\"fontSize\":80,\"fontSizeTablet\":48,\"fontSizeMobile\":40,\"fontFamily\":\"Outfit\",\"fontVariant\":\"800\",\"fontStyle\":\"normal\",\"textTransform\":\"none\"} -->\n<h1 id=\"wp-block-themeisle-blocks-advanced-heading-84bfa495\" class=\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-84bfa495\">Website is under maintenance</h1>\n<!-- /wp:themeisle-blocks/advanced-heading -->\n\n<!-- wp:themeisle-blocks/advanced-heading {\"id\":\"wp-block-themeisle-blocks-advanced-heading-4956a7c6\",\"tag\":\"p\",\"align\":\"center\",\"alignTablet\":\"center\",\"alignMobile\":\"center\",\"headingColor\":\"#282525\",\"fontSize\":27,\"fontSizeTablet\":24,\"fontSizeMobile\":22,\"fontFamily\":\"Outfit\",\"fontVariant\":\"normal\",\"fontStyle\":\"normal\"} -->\n<p id=\"wp-block-themeisle-blocks-advanced-heading-4956a7c6\" class=\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-4956a7c6\">We are doing some updates on our site, and we need to be offline for a while. We will be back with you shortly!</p>\n<!-- /wp:themeisle-blocks/advanced-heading -->\n\n<!-- wp:social-links {\"customIconColor\":\"#282525\",\"iconColorValue\":\"#282525\",\"size\":\"has-large-icon-size\",\"className\":\"is-style-logos-only\",\"layout\":{\"type\":\"flex\",\"justifyContent\":\"center\"}} -->\n<ul class=\"wp-block-social-links has-large-icon-size has-icon-color is-style-logos-only\"><!-- wp:social-link {\"url\":\"#\",\"service\":\"twitter\"} /-->\n\n<!-- wp:social-link {\"url\":\"#\",\"service\":\"facebook\"} /-->\n\n<!-- wp:social-link {\"url\":\"#\",\"service\":\"instagram\"} /--></ul>\n<!-- /wp:social-links --></div>\n<!-- /wp:themeisle-blocks/advanced-column --></div></div>\n<!-- /wp:themeisle-blocks/advanced-columns --><!-- wp:themeisle-blocks/advanced-columns {\"id\":\"wp-block-themeisle-blocks-advanced-columns-5d630746\",\"columns\":1,\"layout\":\"equal\",\"padding\":{\"top\":\"80px\",\"right\":\"20px\",\"bottom\":\"80px\",\"left\":\"20px\"},\"paddingTablet\":{\"top\":\"80px\",\"right\":\"20px\",\"bottom\":\"80px\",\"left\":\"20px\"},\"paddingMobile\":{\"top\":\"40px\",\"right\":\"20px\",\"bottom\":\"40px\",\"left\":\"20px\"},\"margin\":{\"top\":\"0px\",\"bottom\":\"0px\"},\"columnsWidth\":1140,\"horizontalAlign\":\"center\",\"verticalAlign\":\"center\",\"backgroundColor\":\"#efece5\",\"backgroundOverlayType\":\"image\",\"align\":\"full\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-columns-5d630746\" class=\"wp-block-themeisle-blocks-advanced-columns alignfull has-1-columns has-desktop-equal-layout has-tablet-equal-layout has-mobile-equal-layout has-vertical-center\"><div class=\"wp-block-themeisle-blocks-advanced-columns-overlay\"></div><div class=\"innerblocks-wrap\"><!-- wp:themeisle-blocks/advanced-column {\"id\":\"wp-block-themeisle-blocks-advanced-column-e9363a5a\",\"padding\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"paddingMobile\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"columnWidth\":\"100\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-column-e9363a5a\" class=\"wp-block-themeisle-blocks-advanced-column\"><!-- wp:themeisle-blocks/advanced-columns {\"id\":\"wp-block-themeisle-blocks-advanced-columns-cd4b7a17\",\"columns\":2,\"layout\":\"oneTwo\",\"layoutTablet\":\"collapsedRows\",\"layoutMobile\":\"collapsedRows\",\"padding\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"paddingTablet\":{\"top\":\"64px\",\"right\":\"24px\",\"bottom\":\"64px\",\"left\":\"24px\"},\"paddingMobile\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"margin\":{\"top\":\"0px\",\"bottom\":\"0px\"}} -->\n<div id=\"wp-block-themeisle-blocks-advanced-columns-cd4b7a17\" class=\"wp-block-themeisle-blocks-advanced-columns has-2-columns has-desktop-oneTwo-layout has-tablet-collapsedRows-layout has-mobile-collapsedRows-layout has-vertical-unset\"><div class=\"wp-block-themeisle-blocks-advanced-columns-overlay\"></div><div class=\"innerblocks-wrap\"><!-- wp:themeisle-blocks/advanced-column {\"id\":\"wp-block-themeisle-blocks-advanced-column-915f5db4\",\"padding\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"paddingMobile\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"columnWidth\":\"50.00\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-column-915f5db4\" class=\"wp-block-themeisle-blocks-advanced-column\"><!-- wp:image {\"id\":164,\"sizeSlug\":\"large\",\"linkDestination\":\"none\"} -->\n<figure class=\"wp-block-image size-large\"><img src=\"https://demosites.io/otter/wp-content/uploads/sites/664/2022/08/165-1.svg\" alt=\"\" class=\"wp-image-164\"/></figure>\n<!-- /wp:image --></div>\n<!-- /wp:themeisle-blocks/advanced-column -->\n\n<!-- wp:themeisle-blocks/advanced-column {\"id\":\"wp-block-themeisle-blocks-advanced-column-31d8f751\",\"padding\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"paddingMobile\":{\"top\":\"0px\",\"right\":\"0px\",\"bottom\":\"0px\",\"left\":\"0px\"},\"columnWidth\":\"50.00\"} -->\n<div id=\"wp-block-themeisle-blocks-advanced-column-31d8f751\" class=\"wp-block-themeisle-blocks-advanced-column\"><!-- wp:themeisle-blocks/advanced-heading {\"id\":\"wp-block-themeisle-blocks-advanced-heading-948398ab\",\"fontSize\":40,\"fontFamily\":\"Outfit\",\"fontVariant\":\"600\",\"fontStyle\":\"normal\"} -->\n<h2 id=\"wp-block-themeisle-blocks-advanced-heading-948398ab\" class=\"wp-block-themeisle-blocks-advanced-heading wp-block-themeisle-blocks-advanced-heading-948398ab\">Can't wait?</h2>\n<!-- /wp:themeisle-blocks/advanced-heading -->\n\n<!-- wp:paragraph -->\n<p>Send us a message and we will get back to you asap!</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:themeisle-blocks/form {\"id\":\"wp-block-themeisle-blocks-form-f9b364b5\",\"optionName\":\"171_f9b364b5\",\"hasCaptcha\":false,\"submitLabel\":\"Send message!\",\"inputPadding\":{\"top\":\"16px\",\"right\":\"16px\",\"bottom\":\"16px\",\"left\":\"16px\"},\"inputRequiredColor\":\"#c66262\",\"inputBorderColor\":\"#bbbbbb\",\"submitMessageColor\":\"#457843\",\"submitMessageErrorColor\":\"#c66262\",\"submitBackgroundColor\":\"#282525\",\"inputGap\":8,\"inputColor\":\"var(\\u002d\\u002dnv-text-color)\",\"inputsGap\":16,\"submitFontSize\":\"1em\"} -->\n<div id=\"wp-block-themeisle-blocks-form-f9b364b5\" class=\"wp-block-themeisle-blocks-form\" data-option-name=\"171_f9b364b5\"><form class=\"otter-form__container\"><!-- wp:themeisle-blocks/form-input {\"id\":\"wp-block-themeisle-blocks-form-input-dee32220\",\"label\":\"Name\",\"placeholder\":\"Your Name\",\"isRequired\":true} -->\n<div id=\"wp-block-themeisle-blocks-form-input-dee32220\" class=\"wp-block-themeisle-blocks-form-input\"><label for=\"wp-block-themeisle-blocks-form-input-dee32220-input\" class=\"otter-form-input-label\"><span class=\"otter-form-input-label__label\">Name</span><span class=\"required\">*</span></label><input type=\"text\" id=\"wp-block-themeisle-blocks-form-input-dee32220-input\" required placeholder=\"Your Name\" class=\"otter-form-input\"/></div>\n<!-- /wp:themeisle-blocks/form-input -->\n\n<!-- wp:themeisle-blocks/form-input {\"id\":\"wp-block-themeisle-blocks-form-input-ed39daf2\",\"type\":\"email\",\"label\":\"Email\",\"placeholder\":\"Your email\",\"isRequired\":true} -->\n<div id=\"wp-block-themeisle-blocks-form-input-ed39daf2\" class=\"wp-block-themeisle-blocks-form-input\"><label for=\"wp-block-themeisle-blocks-form-input-ed39daf2-input\" class=\"otter-form-input-label\"><span class=\"otter-form-input-label__label\">Email</span><span class=\"required\">*</span></label><input type=\"email\" id=\"wp-block-themeisle-blocks-form-input-ed39daf2-input\" required placeholder=\"Your email\" class=\"otter-form-input\"/></div>\n<!-- /wp:themeisle-blocks/form-input -->\n\n<!-- wp:themeisle-blocks/form-nonce {\"formId\":\"wp-block-themeisle-blocks-form-f9b364b5\"} /-->\n\n<!-- wp:themeisle-blocks/form-textarea {\"id\":\"wp-block-themeisle-blocks-form-textarea-16e85dea\",\"label\":\"Your message\",\"placeholder\":\"Add your message here\"} -->\n<div id=\"wp-block-themeisle-blocks-form-textarea-16e85dea\" class=\"wp-block-themeisle-blocks-form-textarea\"><label for=\"wp-block-themeisle-blocks-form-textarea-16e85dea-input\" class=\"otter-form-textarea-label\"><span class=\"otter-form-textarea-label__label\">Your message</span></label><textarea id=\"wp-block-themeisle-blocks-form-textarea-16e85dea-input\" placeholder=\"Add your message here\" rows=\"10\" class=\"otter-form-textarea-input\"></textarea></div>\n<!-- /wp:themeisle-blocks/form-textarea -->\n\n<!-- wp:paragraph {\"align\":\"left\",\"textColor\":\"neve-text-color\",\"fontSize\":\"small\"} -->\n<p class=\"has-text-align-left has-neve-text-color-color has-text-color has-small-font-size\">This form collects your name and email so that we can reach you back. Check out our <a href=\"#\">Privacy Policy</a> page to fully understand how we protect and manage your submitted data.</p>\n<!-- /wp:paragraph --><div class=\"wp-block-button\"><button class=\"wp-block-button__link\" type=\"submit\">Send message!</button></div></form></div>\n<!-- /wp:themeisle-blocks/form --></div>\n<!-- /wp:themeisle-blocks/advanced-column --></div></div>\n<!-- /wp:themeisle-blocks/advanced-columns --></div>\n<!-- /wp:themeisle-blocks/advanced-column --></div></div>\n<!-- /wp:themeisle-blocks/advanced-columns -->"
|
6 |
+
}
|
assets/templates/maintenance/maintenance-modern/screenshot.png
ADDED
Binary file
|
includes/classes/wp-maintenance-mode-admin.php
CHANGED
@@ -2,10 +2,14 @@
|
|
2 |
|
3 |
defined( 'ABSPATH' ) || exit;
|
4 |
|
|
|
|
|
5 |
if ( ! class_exists( 'WP_Maintenance_Mode_Admin' ) ) {
|
6 |
|
7 |
class WP_Maintenance_Mode_Admin {
|
8 |
|
|
|
|
|
9 |
protected static $instance = null;
|
10 |
protected $plugin_slug;
|
11 |
protected $plugin_settings;
|
@@ -31,6 +35,8 @@ if ( ! class_exists( 'WP_Maintenance_Mode_Admin' ) ) {
|
|
31 |
// Add the options page and menu item.
|
32 |
add_action( 'admin_menu', array( $this, 'add_plugin_menu' ) );
|
33 |
|
|
|
|
|
34 |
// Add an action link pointing to the options page
|
35 |
if ( is_multisite() && is_plugin_active_for_network( $this->plugin_basename ) ) {
|
36 |
// settings link will point to admin_url of the main blog, not to network_admin_url
|
@@ -47,12 +53,24 @@ if ( ! class_exists( 'WP_Maintenance_Mode_Admin' ) ) {
|
|
47 |
add_action( 'wp_ajax_wpmm_subscribers_empty_list', array( $this, 'subscribers_empty_list' ) );
|
48 |
add_action( 'wp_ajax_wpmm_dismiss_notices', array( $this, 'dismiss_notices' ) );
|
49 |
add_action( 'wp_ajax_wpmm_reset_settings', array( $this, 'reset_plugin_settings' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
// Add admin_post_$action
|
52 |
add_action( 'admin_post_wpmm_save_settings', array( $this, 'save_plugin_settings' ) );
|
53 |
|
54 |
// Add text to footer
|
55 |
add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 5 );
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
}
|
57 |
|
58 |
/**
|
@@ -72,7 +90,7 @@ if ( ! class_exists( 'WP_Maintenance_Mode_Admin' ) ) {
|
|
72 |
* Load CSS files
|
73 |
*
|
74 |
* @since 2.0.0
|
75 |
-
* @return
|
76 |
*/
|
77 |
public function enqueue_admin_styles() {
|
78 |
if ( ! isset( $this->plugin_screen_hook_suffix ) ) {
|
@@ -93,6 +111,11 @@ if ( ! class_exists( 'WP_Maintenance_Mode_Admin' ) ) {
|
|
93 |
wp_enqueue_style( $this->plugin_slug . '-admin-chosen', WPMM_CSS_URL . 'chosen' . WPMM_ASSETS_SUFFIX . '.css', array(), WP_Maintenance_Mode::VERSION );
|
94 |
wp_enqueue_style( $this->plugin_slug . '-admin-timepicker-addon-script', WPMM_CSS_URL . 'jquery-ui-timepicker-addon' . WPMM_ASSETS_SUFFIX . '.css', array(), WP_Maintenance_Mode::VERSION );
|
95 |
wp_enqueue_style( $this->plugin_slug . '-admin-styles', WPMM_CSS_URL . 'style-admin' . WPMM_ASSETS_SUFFIX . '.css', array( 'wp-color-picker' ), WP_Maintenance_Mode::VERSION );
|
|
|
|
|
|
|
|
|
|
|
96 |
}
|
97 |
}
|
98 |
|
@@ -114,19 +137,56 @@ if ( ! class_exists( 'WP_Maintenance_Mode_Admin' ) ) {
|
|
114 |
wp_enqueue_script( $this->plugin_slug . '-admin-chosen', WPMM_JS_URL . 'chosen.jquery' . WPMM_ASSETS_SUFFIX . '.js', array(), WP_Maintenance_Mode::VERSION, true );
|
115 |
wp_localize_script(
|
116 |
$this->plugin_slug . '-admin-script',
|
117 |
-
'
|
118 |
array(
|
119 |
-
'
|
120 |
-
'
|
121 |
-
'
|
122 |
-
|
123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
),
|
125 |
)
|
126 |
);
|
127 |
|
128 |
// add code editor (Code Mirror) to the `other_custom_css` textarea
|
129 |
-
if ( isset( $GLOBALS['wp_version'] ) && version_compare( $GLOBALS['wp_version'], '4.9.0', '>=' ) && function_exists( 'wp_enqueue_code_editor' ) ) {
|
130 |
$settings = wp_enqueue_code_editor(
|
131 |
array(
|
132 |
'type' => 'text/css',
|
@@ -244,6 +304,24 @@ if ( ! class_exists( 'WP_Maintenance_Mode_Admin' ) ) {
|
|
244 |
);
|
245 |
}
|
246 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
/**
|
248 |
* Settings page
|
249 |
*
|
@@ -383,7 +461,7 @@ if ( ! class_exists( 'WP_Maintenance_Mode_Admin' ) ) {
|
|
383 |
$_POST['options']['modules']['contact_email'] = sanitize_text_field( $_POST['options']['modules']['contact_email'] );
|
384 |
$_POST['options']['modules']['contact_effects'] = sanitize_text_field( $_POST['options']['modules']['contact_effects'] );
|
385 |
|
386 |
-
// Google
|
387 |
$_POST['options']['modules']['ga_status'] = (int) $_POST['options']['modules']['ga_status'];
|
388 |
$_POST['options']['modules']['ga_anonymize_ip'] = (int) $_POST['options']['modules']['ga_anonymize_ip'];
|
389 |
$_POST['options']['modules']['ga_code'] = wpmm_sanitize_ga_code( $_POST['options']['modules']['ga_code'] );
|
@@ -499,6 +577,215 @@ if ( ! class_exists( 'WP_Maintenance_Mode_Admin' ) ) {
|
|
499 |
}
|
500 |
}
|
501 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
502 |
/**
|
503 |
* Add new safe inline style css (use by wp_kses_attr in wp_kses_post)
|
504 |
* - bug discovered by cokemorgan: https://github.com/andrianvaleanu/WP-Maintenance-Mode/issues/56
|
@@ -625,12 +912,48 @@ if ( ! class_exists( 'WP_Maintenance_Mode_Admin' ) ) {
|
|
625 |
);
|
626 |
}
|
627 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
628 |
// show notice if plugin has a notice saved
|
629 |
$wpmm_notice = get_option( 'wpmm_notice' );
|
630 |
if ( ! empty( $wpmm_notice ) && is_array( $wpmm_notice ) ) {
|
631 |
$notices['other'] = $wpmm_notice;
|
632 |
}
|
633 |
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
634 |
// delete wpmm_notice
|
635 |
delete_option( 'wpmm_notice' );
|
636 |
}
|
@@ -654,12 +977,12 @@ if ( ! class_exists( 'WP_Maintenance_Mode_Admin' ) ) {
|
|
654 |
if ( empty( $notice_key ) ) {
|
655 |
throw new Exception( __( 'Notice key cannot be empty.', 'wp-maintenance-mode' ) );
|
656 |
}
|
657 |
-
if ( empty( $_POST['
|
658 |
throw new Exception( __( 'The nonce field must not be empty.', 'wp-maintenance-mode' ) );
|
659 |
}
|
660 |
|
661 |
// check nonce validation
|
662 |
-
if ( ! wp_verify_nonce( $_POST['
|
663 |
throw new Exception( __( 'Security check.', 'wp-maintenance-mode' ) );
|
664 |
}
|
665 |
|
@@ -716,6 +1039,35 @@ if ( ! class_exists( 'WP_Maintenance_Mode_Admin' ) ) {
|
|
716 |
return $text;
|
717 |
}
|
718 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
719 |
/**
|
720 |
* Return if policy is available. Useful for older WordPress versions.
|
721 |
*
|
@@ -763,7 +1115,5 @@ if ( ! class_exists( 'WP_Maintenance_Mode_Admin' ) ) {
|
|
763 |
return __( 'No privacy features detected for your WordPress version. Update WordPress to get this field automatically filled in or type in the URL that points to your privacy policy page.', 'wp-maintenance-mode' );
|
764 |
}
|
765 |
}
|
766 |
-
|
767 |
}
|
768 |
-
|
769 |
}
|
2 |
|
3 |
defined( 'ABSPATH' ) || exit;
|
4 |
|
5 |
+
use ThemeIsle\GutenbergBlocks\CSS\CSS_Handler;
|
6 |
+
|
7 |
if ( ! class_exists( 'WP_Maintenance_Mode_Admin' ) ) {
|
8 |
|
9 |
class WP_Maintenance_Mode_Admin {
|
10 |
|
11 |
+
const SUBSCRIBE_ROUTE = 'https://api.themeisle.com/tracking/subscribe';
|
12 |
+
|
13 |
protected static $instance = null;
|
14 |
protected $plugin_slug;
|
15 |
protected $plugin_settings;
|
35 |
// Add the options page and menu item.
|
36 |
add_action( 'admin_menu', array( $this, 'add_plugin_menu' ) );
|
37 |
|
38 |
+
add_action( 'admin_init', array( $this, 'maybe_redirect' ) );
|
39 |
+
|
40 |
// Add an action link pointing to the options page
|
41 |
if ( is_multisite() && is_plugin_active_for_network( $this->plugin_basename ) ) {
|
42 |
// settings link will point to admin_url of the main blog, not to network_admin_url
|
53 |
add_action( 'wp_ajax_wpmm_subscribers_empty_list', array( $this, 'subscribers_empty_list' ) );
|
54 |
add_action( 'wp_ajax_wpmm_dismiss_notices', array( $this, 'dismiss_notices' ) );
|
55 |
add_action( 'wp_ajax_wpmm_reset_settings', array( $this, 'reset_plugin_settings' ) );
|
56 |
+
add_action( 'wp_ajax_wpmm_select_page', array( $this, 'select_page' ) );
|
57 |
+
add_action( 'wp_ajax_wpmm_insert_template', array( $this, 'insert_template' ) );
|
58 |
+
add_action( 'wp_ajax_wpmm_subscribe', array( $this, 'subscribe_newsletter' ) );
|
59 |
+
add_action( 'wp_ajax_wpmm_change_template_category', array( $this, 'change_template_category' ) );
|
60 |
+
add_action( 'wp_ajax_wpmm_toggle_gutenberg', array( $this, 'toggle_gutenberg' ) );
|
61 |
+
add_action( 'wp_ajax_wpmm_update_sdk_options', array( $this, 'wpmm_update_sdk_options' ) );
|
62 |
|
63 |
// Add admin_post_$action
|
64 |
add_action( 'admin_post_wpmm_save_settings', array( $this, 'save_plugin_settings' ) );
|
65 |
|
66 |
// Add text to footer
|
67 |
add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 5 );
|
68 |
+
|
69 |
+
// Wizard screen setup
|
70 |
+
add_filter( 'admin_body_class', array( $this, 'add_wizard_classes' ) );
|
71 |
+
|
72 |
+
// Display custom page state
|
73 |
+
add_filter( 'display_post_states', array( $this, 'add_display_post_states' ), 10, 2 );
|
74 |
}
|
75 |
|
76 |
/**
|
90 |
* Load CSS files
|
91 |
*
|
92 |
* @since 2.0.0
|
93 |
+
* @return void
|
94 |
*/
|
95 |
public function enqueue_admin_styles() {
|
96 |
if ( ! isset( $this->plugin_screen_hook_suffix ) ) {
|
111 |
wp_enqueue_style( $this->plugin_slug . '-admin-chosen', WPMM_CSS_URL . 'chosen' . WPMM_ASSETS_SUFFIX . '.css', array(), WP_Maintenance_Mode::VERSION );
|
112 |
wp_enqueue_style( $this->plugin_slug . '-admin-timepicker-addon-script', WPMM_CSS_URL . 'jquery-ui-timepicker-addon' . WPMM_ASSETS_SUFFIX . '.css', array(), WP_Maintenance_Mode::VERSION );
|
113 |
wp_enqueue_style( $this->plugin_slug . '-admin-styles', WPMM_CSS_URL . 'style-admin' . WPMM_ASSETS_SUFFIX . '.css', array( 'wp-color-picker' ), WP_Maintenance_Mode::VERSION );
|
114 |
+
|
115 |
+
// wizard stylesheet
|
116 |
+
if ( get_option( 'wpmm_fresh_install', false ) ) {
|
117 |
+
wp_enqueue_style( $this->plugin_slug . '-wizard-styles', WPMM_CSS_URL . 'style-wizard' . WPMM_ASSETS_SUFFIX . '.css', array(), WP_Maintenance_Mode::VERSION );
|
118 |
+
}
|
119 |
}
|
120 |
}
|
121 |
|
137 |
wp_enqueue_script( $this->plugin_slug . '-admin-chosen', WPMM_JS_URL . 'chosen.jquery' . WPMM_ASSETS_SUFFIX . '.js', array(), WP_Maintenance_Mode::VERSION, true );
|
138 |
wp_localize_script(
|
139 |
$this->plugin_slug . '-admin-script',
|
140 |
+
'wpmmVars',
|
141 |
array(
|
142 |
+
'ajaxURL' => admin_url( 'admin-ajax.php' ),
|
143 |
+
'pluginURL' => add_query_arg( array( 'page' => $this->plugin_slug ), admin_url( 'options-general.php' ) ),
|
144 |
+
'ajaxNonce' => wp_create_nonce( 'ajax' ),
|
145 |
+
'wizardNonce' => wp_create_nonce( 'wizard' ),
|
146 |
+
'pluginInstallNonce' => wp_create_nonce( 'updates' ),
|
147 |
+
'isOtterInstalled' => file_exists( ABSPATH . 'wp-content/plugins/otter-blocks/otter-blocks.php' ),
|
148 |
+
'isOtterActive' => is_plugin_active( 'otter-blocks/otter-blocks.php' ),
|
149 |
+
'errorString' => __( 'Something went wrong, please try again.', 'wp-maintenance-mode' ),
|
150 |
+
'loadingString' => __( 'Doing some magic...', 'wp-maintenance-mode' ),
|
151 |
+
'importingText' => __( 'Importing', 'wp-maintenance-mode' ),
|
152 |
+
'importDone' => __( 'Done', 'wp-maintenance-mode' ),
|
153 |
+
'invalidEmailString' => __( 'Invalid email, please try again.', 'wp-maintenance-mode' ),
|
154 |
+
'finishWizardStrings' => array(
|
155 |
+
'maintenance' => __( 'Your maintenance page is ready!', 'wp-maintenance-mode' ),
|
156 |
+
'coming-soon' => __( 'Your coming soon page is ready!', 'wp-maintenance-mode' ),
|
157 |
+
),
|
158 |
+
'adminURL' => get_admin_url(),
|
159 |
+
'otterActivationLink' => add_query_arg(
|
160 |
+
array(
|
161 |
+
'action' => 'activate',
|
162 |
+
'plugin' => rawurlencode( 'otter-blocks/otter-blocks.php' ),
|
163 |
+
'plugin_status' => 'all',
|
164 |
+
'paged' => '1',
|
165 |
+
'_wpnonce' => wp_create_nonce( 'activate-plugin_otter-blocks/otter-blocks.php' ),
|
166 |
+
),
|
167 |
+
esc_url( network_admin_url( 'plugins.php' ) )
|
168 |
+
),
|
169 |
+
'modalTexts' => array(
|
170 |
+
'title' => __( 'The template has been imported!', 'wp-maintenance-mode' ),
|
171 |
+
'description' => __( 'The template has been imported to a new draft page. You can take a look and enable it from plugin settings.', 'wp-maintenance-mode' ),
|
172 |
+
'buttonPage' => __( 'Go to page', 'wp-maintenance-mode' ),
|
173 |
+
'buttonSettings' => __( 'Go to Settings', 'wp-maintenance-mode' ),
|
174 |
+
),
|
175 |
+
'confirmModalTexts' => array(
|
176 |
+
'title' => __( 'Import this template?', 'wp-maintenance-mode' ),
|
177 |
+
'description' => __( 'By importing this template, the existing content on your Maintenance Page will be replaced. Do you wish to continue?', 'wp-maintenance-mode' ),
|
178 |
+
'buttonContinue' => __( 'Continue', 'wp-maintenance-mode' ),
|
179 |
+
'buttonGoBack' => __( 'Go back', 'wp-maintenance-mode' ),
|
180 |
+
),
|
181 |
+
'imageUploaderDefaults' => array(
|
182 |
+
'title' => _x( 'Upload Image', 'image_uploader default title', 'wp-maintenance-mode' ),
|
183 |
+
'buttonText' => _x( 'Choose Image', 'image_uploader default button_text', 'wp-maintenance-mode' ),
|
184 |
),
|
185 |
)
|
186 |
);
|
187 |
|
188 |
// add code editor (Code Mirror) to the `other_custom_css` textarea
|
189 |
+
if ( ! get_option( 'wpmm_new_look' ) && isset( $GLOBALS['wp_version'] ) && version_compare( $GLOBALS['wp_version'], '4.9.0', '>=' ) && function_exists( 'wp_enqueue_code_editor' ) ) {
|
190 |
$settings = wp_enqueue_code_editor(
|
191 |
array(
|
192 |
'type' => 'text/css',
|
304 |
);
|
305 |
}
|
306 |
|
307 |
+
public function maybe_redirect() {
|
308 |
+
if ( ! get_option( 'wpmm_fresh_install', false ) || ! get_option( 'wpmm_settings_redirect', '1' ) ) {
|
309 |
+
return;
|
310 |
+
}
|
311 |
+
|
312 |
+
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
|
313 |
+
return;
|
314 |
+
}
|
315 |
+
|
316 |
+
if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {
|
317 |
+
return;
|
318 |
+
}
|
319 |
+
|
320 |
+
update_option( 'wpmm_settings_redirect', '0' );
|
321 |
+
wp_safe_redirect( admin_url( 'options-general.php?page=wp-maintenance-mode' ) );
|
322 |
+
exit;
|
323 |
+
}
|
324 |
+
|
325 |
/**
|
326 |
* Settings page
|
327 |
*
|
461 |
$_POST['options']['modules']['contact_email'] = sanitize_text_field( $_POST['options']['modules']['contact_email'] );
|
462 |
$_POST['options']['modules']['contact_effects'] = sanitize_text_field( $_POST['options']['modules']['contact_effects'] );
|
463 |
|
464 |
+
// Google Analytics
|
465 |
$_POST['options']['modules']['ga_status'] = (int) $_POST['options']['modules']['ga_status'];
|
466 |
$_POST['options']['modules']['ga_anonymize_ip'] = (int) $_POST['options']['modules']['ga_anonymize_ip'];
|
467 |
$_POST['options']['modules']['ga_code'] = wpmm_sanitize_ga_code( $_POST['options']['modules']['ga_code'] );
|
577 |
}
|
578 |
}
|
579 |
|
580 |
+
/**
|
581 |
+
* Select a page as Maintenance Page
|
582 |
+
*
|
583 |
+
* @return void
|
584 |
+
*/
|
585 |
+
public function select_page() {
|
586 |
+
// check nonce existence
|
587 |
+
if ( empty( $_POST['_wpnonce'] ) ) {
|
588 |
+
die( esc_html__( 'The nonce field must not be empty.', 'wp-maintenance-mode' ) );
|
589 |
+
}
|
590 |
+
|
591 |
+
// check nonce validation
|
592 |
+
if ( ! wp_verify_nonce( $_POST['_wpnonce'], 'tab-design' ) ) {
|
593 |
+
die( esc_html__( 'Security check.', 'wp-maintenance-mode' ) );
|
594 |
+
}
|
595 |
+
|
596 |
+
$this->plugin_settings['design']['page_id'] = $_POST['page_id'];
|
597 |
+
wp_update_post(
|
598 |
+
array(
|
599 |
+
'ID' => $this->plugin_settings['design']['page_id'],
|
600 |
+
'page_template' => 'templates/wpmm-page-template.php',
|
601 |
+
)
|
602 |
+
);
|
603 |
+
|
604 |
+
update_option( 'wpmm_settings', $this->plugin_settings );
|
605 |
+
|
606 |
+
wp_send_json_success();
|
607 |
+
}
|
608 |
+
|
609 |
+
/**
|
610 |
+
* Insert the content from the template to the Maintenance Page
|
611 |
+
* If no Maintenance Page exists, create one.
|
612 |
+
*
|
613 |
+
* @return void
|
614 |
+
*/
|
615 |
+
public function insert_template() {
|
616 |
+
if ( ! is_plugin_active( 'otter-blocks/otter-blocks.php' ) ) {
|
617 |
+
wp_send_json_error( array( 'error' => 'Otter Blocks is not activated' ) );
|
618 |
+
}
|
619 |
+
|
620 |
+
// check nonce existence
|
621 |
+
if ( empty( $_POST['_wpnonce'] ) ) {
|
622 |
+
die( esc_html__( 'The nonce field must not be empty.', 'wp-maintenance-mode' ) );
|
623 |
+
}
|
624 |
+
|
625 |
+
// check nonce validation
|
626 |
+
if ( ! wp_verify_nonce( $_POST['_wpnonce'], $_POST['source'] ) ) {
|
627 |
+
die( esc_html__( 'Security check.', 'wp-maintenance-mode' ) );
|
628 |
+
}
|
629 |
+
|
630 |
+
$template_slug = $_POST['template_slug'];
|
631 |
+
$category = $_POST['category'];
|
632 |
+
$template = json_decode( file_get_contents( WPMM_TEMPLATES_PATH . $category . '/' . $template_slug . '/blocks-export.json' ) );
|
633 |
+
|
634 |
+
$blocks = str_replace( '\n', '', $template->content );
|
635 |
+
|
636 |
+
$post_arr = array(
|
637 |
+
'post_type' => 'page',
|
638 |
+
'post_status' => 'private',
|
639 |
+
'post_content' => $blocks,
|
640 |
+
'page_template' => 'templates/wpmm-page-template.php',
|
641 |
+
);
|
642 |
+
|
643 |
+
if ( isset( $this->plugin_settings['design']['page_id'] ) && get_post_status( $this->plugin_settings['design']['page_id'] ) && get_post_status( $this->plugin_settings['design']['page_id'] ) !== 'trash' ) {
|
644 |
+
$post_arr['ID'] = $this->plugin_settings['design']['page_id'];
|
645 |
+
$page_id = wp_update_post( $post_arr );
|
646 |
+
} else {
|
647 |
+
$post_arr['post_title'] = 'Maintenance Page';
|
648 |
+
$page_id = wp_insert_post( $post_arr );
|
649 |
+
}
|
650 |
+
|
651 |
+
if ( $page_id === 0 || $page_id instanceof WP_Error ) {
|
652 |
+
wp_send_json_error( array( 'error' => 'Could not get the page' ) );
|
653 |
+
}
|
654 |
+
|
655 |
+
$this->plugin_settings['design']['page_id'] = $page_id;
|
656 |
+
CSS_Handler::generate_css_file( $page_id );
|
657 |
+
|
658 |
+
if ( 'wizard' === $_POST['source'] ) {
|
659 |
+
$this->plugin_settings['general']['status'] = 1;
|
660 |
+
update_option( 'wpmm_fresh_install', false );
|
661 |
+
}
|
662 |
+
|
663 |
+
update_option( 'wpmm_settings', $this->plugin_settings );
|
664 |
+
wp_send_json_success( array( 'pageEditURL' => get_edit_post_link( $page_id ) ) );
|
665 |
+
}
|
666 |
+
|
667 |
+
/**
|
668 |
+
* Subscribe user to plugin newsletter
|
669 |
+
*
|
670 |
+
* @return void
|
671 |
+
*/
|
672 |
+
public function subscribe_newsletter() {
|
673 |
+
// check nonce existence
|
674 |
+
if ( empty( $_POST['_wpnonce'] ) ) {
|
675 |
+
die( esc_html__( 'The nonce field must not be empty.', 'wp-maintenance-mode' ) );
|
676 |
+
}
|
677 |
+
|
678 |
+
// check nonce validation
|
679 |
+
if ( ! wp_verify_nonce( $_POST['_wpnonce'], 'wizard' ) ) {
|
680 |
+
die( esc_html__( 'Security check.', 'wp-maintenance-mode' ) );
|
681 |
+
}
|
682 |
+
|
683 |
+
if ( ! isset( $_POST['email'] ) ) {
|
684 |
+
die( esc_html__( 'Empty field: email', 'wp-maintenance-mode' ) );
|
685 |
+
}
|
686 |
+
|
687 |
+
$response = wp_remote_post(
|
688 |
+
self::SUBSCRIBE_ROUTE,
|
689 |
+
array(
|
690 |
+
'headers' => array(
|
691 |
+
'Content-Type' => 'application/json',
|
692 |
+
),
|
693 |
+
'body' => wp_json_encode(
|
694 |
+
array(
|
695 |
+
'slug' => 'wp-maintenance-mode',
|
696 |
+
'site' => get_site_url(),
|
697 |
+
'email' => $_POST['email'],
|
698 |
+
)
|
699 |
+
),
|
700 |
+
)
|
701 |
+
);
|
702 |
+
|
703 |
+
if ( is_wp_error( $response ) ) {
|
704 |
+
wp_send_json_error( $response->get_error_message() );
|
705 |
+
}
|
706 |
+
|
707 |
+
wp_send_json_success( $response );
|
708 |
+
}
|
709 |
+
|
710 |
+
/**
|
711 |
+
* Change the category of templates to display
|
712 |
+
*
|
713 |
+
* @return void
|
714 |
+
*/
|
715 |
+
public function change_template_category() {
|
716 |
+
// check nonce existence
|
717 |
+
if ( empty( $_POST['_wpnonce'] ) ) {
|
718 |
+
die( esc_html__( 'The nonce field must not be empty.', 'wp-maintenance-mode' ) );
|
719 |
+
}
|
720 |
+
|
721 |
+
// check nonce validation
|
722 |
+
if ( ! wp_verify_nonce( $_POST['_wpnonce'], 'tab-design' ) ) {
|
723 |
+
die( esc_html__( 'Security check.', 'wp-maintenance-mode' ) );
|
724 |
+
}
|
725 |
+
|
726 |
+
if ( empty( $_POST['category'] ) ) {
|
727 |
+
die( esc_html__( 'Empty field: category.', 'wp-maintenance-mode' ) );
|
728 |
+
}
|
729 |
+
|
730 |
+
$this->plugin_settings['design']['template_category'] = $_POST['category'];
|
731 |
+
update_option( 'wpmm_settings', $this->plugin_settings );
|
732 |
+
|
733 |
+
wp_send_json_success();
|
734 |
+
}
|
735 |
+
|
736 |
+
/**
|
737 |
+
* Migrate to the new method of building the maintenance page or downgrade to the old one.
|
738 |
+
* Used from the migration notice.
|
739 |
+
*
|
740 |
+
* @return void
|
741 |
+
*/
|
742 |
+
public function toggle_gutenberg() {
|
743 |
+
if ( empty( $_POST['source'] ) ) {
|
744 |
+
die( esc_html__( 'The source filed must not be empty.', 'wp-maintenance-mode' ) );
|
745 |
+
}
|
746 |
+
|
747 |
+
// check nonce existence
|
748 |
+
if ( empty( $_POST['_wpnonce'] ) ) {
|
749 |
+
die( esc_html__( 'The nonce field must not be empty.', 'wp-maintenance-mode' ) );
|
750 |
+
}
|
751 |
+
|
752 |
+
// check nonce validation
|
753 |
+
if ( ! wp_verify_nonce( $_POST['_wpnonce'], 'notice_nonce_' . $_POST['source'] ) ) {
|
754 |
+
die( esc_html__( 'Security check.', 'wp-maintenance-mode' ) );
|
755 |
+
}
|
756 |
+
|
757 |
+
$current_option = get_option( 'wpmm_new_look', false );
|
758 |
+
update_option( 'wpmm_new_look', ! $current_option );
|
759 |
+
|
760 |
+
if ( ! $current_option && ! get_option( 'wpmm_migration_time' ) ) {
|
761 |
+
update_option( 'wpmm_migration_time', time() );
|
762 |
+
}
|
763 |
+
|
764 |
+
wp_send_json_success();
|
765 |
+
}
|
766 |
+
|
767 |
+
/**
|
768 |
+
* Updates options to track Otter traffic
|
769 |
+
*
|
770 |
+
* @return void
|
771 |
+
*/
|
772 |
+
function wpmm_update_sdk_options() {
|
773 |
+
// check nonce existence
|
774 |
+
if ( empty( $_POST['_wpnonce'] ) ) {
|
775 |
+
die( esc_html__( 'The nonce field must not be empty.', 'wp-maintenance-mode' ) );
|
776 |
+
}
|
777 |
+
|
778 |
+
// check nonce validation
|
779 |
+
if ( ! wp_verify_nonce( $_POST['_wpnonce'], 'ajax' ) ) {
|
780 |
+
die( esc_html__( 'Security check.', 'wp-maintenance-mode' ) );
|
781 |
+
}
|
782 |
+
|
783 |
+
update_option( 'themeisle_sdk_promotions_otter_installed', true );
|
784 |
+
update_option( 'otter_reference_key', 'wp-maintenance-mode' );
|
785 |
+
|
786 |
+
wp_send_json_success();
|
787 |
+
}
|
788 |
+
|
789 |
/**
|
790 |
* Add new safe inline style css (use by wp_kses_attr in wp_kses_post)
|
791 |
* - bug discovered by cokemorgan: https://github.com/andrianvaleanu/WP-Maintenance-Mode/issues/56
|
912 |
);
|
913 |
}
|
914 |
|
915 |
+
if ( ! get_option( 'wpmm_fresh_install' ) && get_option( 'wpmm_new_look' ) && $this->plugin_settings['general']['status'] === 1 ) {
|
916 |
+
if ( isset( $this->plugin_settings['design']['page_id'] ) ) {
|
917 |
+
$maintenance_page = get_post( $this->plugin_settings['design']['page_id'] );
|
918 |
+
|
919 |
+
if ( ( $maintenance_page instanceof WP_Post ) && $maintenance_page->post_status !== 'publish' && $maintenance_page->post_status !== 'private' ) {
|
920 |
+
$notices['maintenance_page_deleted'] = array(
|
921 |
+
'class' => 'error',
|
922 |
+
'msg' => $maintenance_page->post_status === 'draft' ?
|
923 |
+
sprintf( __( '<strong>Action required</strong>: your Maintenance page is drafted. Visit the page to <a href="%s">publish</a> it.', 'wp-maintenance-mode' ), get_edit_post_link( $maintenance_page ) ) :
|
924 |
+
sprintf( __( '<strong>Action required</strong>: your Maintenance page has been deleted. Visit <a href="%s">settings page</a> to address this issue.', 'wp-maintenance-mode' ), get_admin_url() . 'options-general.php?page=wp-maintenance-mode#design' ),
|
925 |
+
);
|
926 |
+
}
|
927 |
+
}
|
928 |
+
|
929 |
+
if ( ! get_post( $this->plugin_settings['design']['page_id'] ) ) {
|
930 |
+
$notices['maintenance_page_not_found'] = array(
|
931 |
+
'class' => 'error',
|
932 |
+
'msg' => sprintf( __( '<strong>Action required</strong>: you don\'t have a page as Maintenance page. Visit <a href="%s">settings page</a> to select one.', 'wp-maintenance-mode' ), get_admin_url() . 'options-general.php?page=wp-maintenance-mode#design' ),
|
933 |
+
);
|
934 |
+
}
|
935 |
+
}
|
936 |
+
|
937 |
// show notice if plugin has a notice saved
|
938 |
$wpmm_notice = get_option( 'wpmm_notice' );
|
939 |
if ( ! empty( $wpmm_notice ) && is_array( $wpmm_notice ) ) {
|
940 |
$notices['other'] = $wpmm_notice;
|
941 |
}
|
942 |
} else {
|
943 |
+
if ( get_option( 'wpmm_show_migration', true ) ) {
|
944 |
+
if ( ! get_option( 'wpmm_new_look' ) ) {
|
945 |
+
$notices['migration'] = array(
|
946 |
+
'class' => 'notice notice-success',
|
947 |
+
'msg' => __( 'We upgraded the way maintenance pages are build. Migrate to use Gutenberg for your page! <button id="wpmm-migrate" class="button button-primary">Migrate</button>', 'wp-maintenance-mode' ),
|
948 |
+
);
|
949 |
+
} else {
|
950 |
+
$notices['rollback'] = array(
|
951 |
+
'class' => 'notice wpmm_notices notice-info is-dismissible',
|
952 |
+
'msg' => __( 'You migrated to use Gutenberg for building the Maintenance page. <button id="wpmm-rollback" class="button button-link button-link-delete">Rollback</button>', 'wp-maintenance-mode' ),
|
953 |
+
);
|
954 |
+
}
|
955 |
+
}
|
956 |
+
|
957 |
// delete wpmm_notice
|
958 |
delete_option( 'wpmm_notice' );
|
959 |
}
|
977 |
if ( empty( $notice_key ) ) {
|
978 |
throw new Exception( __( 'Notice key cannot be empty.', 'wp-maintenance-mode' ) );
|
979 |
}
|
980 |
+
if ( empty( $_POST['_nonce'] ) ) {
|
981 |
throw new Exception( __( 'The nonce field must not be empty.', 'wp-maintenance-mode' ) );
|
982 |
}
|
983 |
|
984 |
// check nonce validation
|
985 |
+
if ( ! wp_verify_nonce( $_POST['_nonce'], 'notice_nonce_' . $notice_key ) ) {
|
986 |
throw new Exception( __( 'Security check.', 'wp-maintenance-mode' ) );
|
987 |
}
|
988 |
|
1039 |
return $text;
|
1040 |
}
|
1041 |
|
1042 |
+
/**
|
1043 |
+
* Add custom state to the maintenance page
|
1044 |
+
*
|
1045 |
+
* @param array $post_states Post states.
|
1046 |
+
* @param WP_Post $post Current post.
|
1047 |
+
* @return array
|
1048 |
+
*/
|
1049 |
+
public function add_display_post_states( $post_states, $post ) {
|
1050 |
+
if ( isset( $this->plugin_settings['design']['page_id'] ) && $this->plugin_settings['design']['page_id'] == $post->ID ) {
|
1051 |
+
$post_states['wpmm_for_maintenance'] = __( 'Maintenance Page', 'wp-maintenance-mode' );
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
return $post_states;
|
1055 |
+
}
|
1056 |
+
|
1057 |
+
/**
|
1058 |
+
* Add classes to make the wizard full screen
|
1059 |
+
*
|
1060 |
+
* @param string $classes Body classes.
|
1061 |
+
* @return string
|
1062 |
+
*/
|
1063 |
+
public function add_wizard_classes( $classes ) {
|
1064 |
+
if ( get_option( 'wpmm_fresh_install', false ) ) {
|
1065 |
+
$classes .= 'wpmm-wizard-fullscreen';
|
1066 |
+
}
|
1067 |
+
|
1068 |
+
return $classes;
|
1069 |
+
}
|
1070 |
+
|
1071 |
/**
|
1072 |
* Return if policy is available. Useful for older WordPress versions.
|
1073 |
*
|
1115 |
return __( 'No privacy features detected for your WordPress version. Update WordPress to get this field automatically filled in or type in the URL that points to your privacy policy page.', 'wp-maintenance-mode' );
|
1116 |
}
|
1117 |
}
|
|
|
1118 |
}
|
|
|
1119 |
}
|
includes/classes/wp-maintenance-mode.php
CHANGED
@@ -1,22 +1,39 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
defined( 'ABSPATH' ) || exit;
|
4 |
|
5 |
if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
|
6 |
|
7 |
class WP_Maintenance_Mode {
|
8 |
|
9 |
-
const VERSION = '2.
|
10 |
|
11 |
protected $plugin_slug = 'wp-maintenance-mode';
|
12 |
protected $plugin_settings;
|
13 |
protected $plugin_basename;
|
14 |
protected static $instance = null;
|
15 |
|
|
|
|
|
16 |
/**
|
17 |
* 3, 2, 1... Start!
|
18 |
*/
|
19 |
private function __construct() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
$this->plugin_settings = wpmm_get_option( 'wpmm_settings', array() );
|
21 |
$this->plugin_basename = plugin_basename( WPMM_PATH . $this->plugin_slug . '.php' );
|
22 |
|
@@ -33,6 +50,16 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
|
|
33 |
// Check update
|
34 |
add_action( 'admin_init', array( $this, 'check_update' ) );
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
if ( ! empty( $this->plugin_settings['general']['status'] ) && $this->plugin_settings['general']['status'] === 1 ) {
|
37 |
// INIT
|
38 |
add_action( ( is_admin() ? 'init' : 'template_redirect' ), array( $this, 'init' ) );
|
@@ -43,6 +70,32 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
|
|
43 |
add_action( 'wp_ajax_nopriv_wpmm_send_contact', array( $this, 'send_contact' ) );
|
44 |
add_action( 'wp_ajax_wpmm_send_contact', array( $this, 'send_contact' ) );
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
// Redirect
|
47 |
add_action( 'init', array( $this, 'redirect' ), 9 );
|
48 |
|
@@ -56,6 +109,24 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
|
|
56 |
// Enqueue Javascript files and add inline javascript
|
57 |
add_action( 'wpmm_before_scripts', array( $this, 'add_bot_extras' ) );
|
58 |
add_action( 'wpmm_footer', array( $this, 'add_js_files' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
60 |
}
|
61 |
|
@@ -128,6 +199,7 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
|
|
128 |
'bg_custom' => '',
|
129 |
'bg_predefined' => 'bg1.jpg',
|
130 |
'other_custom_css' => '',
|
|
|
131 |
),
|
132 |
'modules' => array(
|
133 |
'countdown_status' => 0,
|
@@ -220,6 +292,8 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
|
|
220 |
self::single_activate();
|
221 |
}
|
222 |
|
|
|
|
|
223 |
// delete old options
|
224 |
delete_option( 'wp-maintenance-mode' );
|
225 |
delete_option( 'wp-maintenance-mode-msqld' );
|
@@ -576,6 +650,11 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
|
|
576 |
! $this->check_search_bots() &&
|
577 |
! ( defined( 'WP_CLI' ) && WP_CLI )
|
578 |
) {
|
|
|
|
|
|
|
|
|
|
|
579 |
// HEADER STUFF
|
580 |
$protocol = ! empty( $_SERVER['SERVER_PROTOCOL'] ) && in_array( $_SERVER['SERVER_PROTOCOL'], array( 'HTTP/1.1', 'HTTP/1.0' ), true ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0';
|
581 |
$charset = get_bloginfo( 'charset' ) ? get_bloginfo( 'charset' ) : 'UTF-8';
|
@@ -633,8 +712,6 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
|
|
633 |
// load maintenance mode template
|
634 |
include_once wpmm_get_template_path( 'maintenance.php', true );
|
635 |
ob_flush();
|
636 |
-
|
637 |
-
exit();
|
638 |
}
|
639 |
}
|
640 |
|
@@ -876,9 +953,12 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
|
|
876 |
* @since 2.4.0
|
877 |
*/
|
878 |
public function add_css_files() {
|
879 |
-
$styles = array(
|
880 |
-
|
881 |
-
|
|
|
|
|
|
|
882 |
|
883 |
if ( ! empty( $this->plugin_settings['bot']['status'] ) && $this->plugin_settings['bot']['status'] === 1 ) {
|
884 |
$styles['bot'] = WPMM_CSS_URL . 'style.bot' . WPMM_ASSETS_SUFFIX . '.css?ver=' . self::VERSION;
|
@@ -889,6 +969,105 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
|
|
889 |
}
|
890 |
}
|
891 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
892 |
/**
|
893 |
* Add inline CSS style
|
894 |
*
|
@@ -897,6 +1076,23 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
|
|
897 |
public function add_inline_css_style() {
|
898 |
$css_rules = array();
|
899 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
900 |
// "Design > Content > Heading" color
|
901 |
if ( ! empty( $this->plugin_settings['design']['heading_color'] ) ) {
|
902 |
$css_rules['design.heading_color'] = sprintf( '.wrap h1 { color: %s; }', sanitize_hex_color( $this->plugin_settings['design']['heading_color'] ) );
|
@@ -941,11 +1137,6 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
|
|
941 |
$css_rules['modules.subscribe_text_color'] = sprintf( '.wrap h3, .wrap .subscribe_wrapper { color: %s; }', sanitize_hex_color( $this->plugin_settings['modules']['subscribe_text_color'] ) );
|
942 |
}
|
943 |
|
944 |
-
// "Manage Bot > Upload avatar" url
|
945 |
-
if ( ! empty( $this->plugin_settings['bot']['avatar'] ) ) {
|
946 |
-
$css_rules['bot.avatar'] = sprintf( '.bot-avatar { background-image: url("%s"); }', esc_url( $this->plugin_settings['bot']['avatar'] ) );
|
947 |
-
}
|
948 |
-
|
949 |
// "Design > Other > Custom CSS"
|
950 |
if ( ! empty( $this->plugin_settings['design']['other_custom_css'] ) ) {
|
951 |
$css_rules['design.other_custom_css'] = sanitize_textarea_field( $this->plugin_settings['design']['other_custom_css'] );
|
@@ -964,23 +1155,27 @@ if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
|
|
964 |
* @since 2.4.0
|
965 |
*/
|
966 |
public function add_js_files() {
|
967 |
-
|
968 |
$scripts = array(
|
969 |
'jquery' => site_url( '/wp-includes/js/jquery/jquery' . WPMM_ASSETS_SUFFIX . '.js' ),
|
970 |
'fitvids' => WPMM_JS_URL . 'jquery.fitvids' . WPMM_ASSETS_SUFFIX . '.js',
|
971 |
'frontend' => WPMM_JS_URL . 'scripts' . WPMM_ASSETS_SUFFIX . '.js?ver=' . self::VERSION,
|
972 |
);
|
973 |
|
974 |
-
if ( !
|
975 |
-
$
|
976 |
-
|
977 |
-
|
|
|
978 |
|
979 |
-
|
980 |
( ! empty( $this->plugin_settings['modules']['contact_status'] ) && $this->plugin_settings['modules']['contact_status'] === 1 ) ||
|
981 |
-
( ! empty( $this->plugin_settings['modules']['subscribe_status'] ) && $this->plugin_settings['modules']['subscribe_status'] === 1 )
|
982 |
-
|
983 |
-
|
|
|
|
|
|
|
|
|
984 |
$scripts['validate'] = WPMM_JS_URL . 'jquery.validate' . WPMM_ASSETS_SUFFIX . '.js';
|
985 |
}
|
986 |
|
1 |
<?php
|
2 |
|
3 |
+
use ThemeIsle\GutenbergBlocks\CSS\Block_Frontend;
|
4 |
+
|
5 |
defined( 'ABSPATH' ) || exit;
|
6 |
|
7 |
if ( ! class_exists( 'WP_Maintenance_Mode' ) ) {
|
8 |
|
9 |
class WP_Maintenance_Mode {
|
10 |
|
11 |
+
const VERSION = '2.5.0';
|
12 |
|
13 |
protected $plugin_slug = 'wp-maintenance-mode';
|
14 |
protected $plugin_settings;
|
15 |
protected $plugin_basename;
|
16 |
protected static $instance = null;
|
17 |
|
18 |
+
private $style_buffer;
|
19 |
+
|
20 |
/**
|
21 |
* 3, 2, 1... Start!
|
22 |
*/
|
23 |
private function __construct() {
|
24 |
+
if ( ! get_option( 'wpmm_settings' ) || get_option( 'wpmm_settings' ) === '' ) {
|
25 |
+
update_option( 'wpmm_show_migration', '0' );
|
26 |
+
update_option( 'wpmm_new_look', '1' );
|
27 |
+
|
28 |
+
if ( version_compare( $GLOBALS['wp_version'], '5.8', '>=' ) ) {
|
29 |
+
update_option( 'wpmm_fresh_install', '1' );
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
if ( get_option( 'wpmm_migration_time' ) && ( ( time() - intval( get_option( 'wpmm_migration_time' ) ) > WEEK_IN_SECONDS ) ) ) {
|
34 |
+
update_option( 'wpmm_show_migration', '0' );
|
35 |
+
}
|
36 |
+
|
37 |
$this->plugin_settings = wpmm_get_option( 'wpmm_settings', array() );
|
38 |
$this->plugin_basename = plugin_basename( WPMM_PATH . $this->plugin_slug . '.php' );
|
39 |
|
50 |
// Check update
|
51 |
add_action( 'admin_init', array( $this, 'check_update' ) );
|
52 |
|
53 |
+
// Add maintenance page template
|
54 |
+
add_filter( 'theme_page_templates', array( $this, 'add_maintenance_template' ) );
|
55 |
+
add_filter( 'template_include', array( $this, 'use_maintenance_template' ) );
|
56 |
+
|
57 |
+
// This is a fix for some styles not being loaded on block themes
|
58 |
+
if ( function_exists( 'wp_is_block_theme' ) && wp_is_block_theme() ) {
|
59 |
+
add_action( 'wpmm_head', array( $this, 'remember_style_fse' ) );
|
60 |
+
add_action( 'wpmm_footer', array( $this, 'add_style_fse' ) );
|
61 |
+
}
|
62 |
+
|
63 |
if ( ! empty( $this->plugin_settings['general']['status'] ) && $this->plugin_settings['general']['status'] === 1 ) {
|
64 |
// INIT
|
65 |
add_action( ( is_admin() ? 'init' : 'template_redirect' ), array( $this, 'init' ) );
|
70 |
add_action( 'wp_ajax_nopriv_wpmm_send_contact', array( $this, 'send_contact' ) );
|
71 |
add_action( 'wp_ajax_wpmm_send_contact', array( $this, 'send_contact' ) );
|
72 |
|
73 |
+
if ( isset( $this->plugin_settings['design']['page_id'] ) && get_option( 'wpmm_new_look' ) && get_post_status( $this->plugin_settings['design']['page_id'] ) === 'private' ) {
|
74 |
+
wp_publish_post( $this->plugin_settings['design']['page_id'] );
|
75 |
+
}
|
76 |
+
|
77 |
+
update_option( 'show_on_front', 'page' );
|
78 |
+
add_filter(
|
79 |
+
'pre_option_page_on_front',
|
80 |
+
function ( $value ) {
|
81 |
+
if ( ! is_user_logged_in() && isset( $this->plugin_settings['design']['page_id'] ) && get_option( 'wpmm_new_look' ) ) {
|
82 |
+
$page_id = $this->plugin_settings['design']['page_id'];
|
83 |
+
|
84 |
+
if ( ! function_exists( 'is_plugin_active' ) ) {
|
85 |
+
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
86 |
+
}
|
87 |
+
|
88 |
+
if ( is_plugin_active( 'otter-blocks/otter-blocks.php' ) ) {
|
89 |
+
Block_Frontend::$instance->enqueue_google_fonts( $page_id );
|
90 |
+
}
|
91 |
+
|
92 |
+
return $page_id;
|
93 |
+
}
|
94 |
+
|
95 |
+
return $value;
|
96 |
+
}
|
97 |
+
);
|
98 |
+
|
99 |
// Redirect
|
100 |
add_action( 'init', array( $this, 'redirect' ), 9 );
|
101 |
|
109 |
// Enqueue Javascript files and add inline javascript
|
110 |
add_action( 'wpmm_before_scripts', array( $this, 'add_bot_extras' ) );
|
111 |
add_action( 'wpmm_footer', array( $this, 'add_js_files' ) );
|
112 |
+
} else {
|
113 |
+
// make maintenance page private when maintenance mode is disabled
|
114 |
+
add_action(
|
115 |
+
'init',
|
116 |
+
function() {
|
117 |
+
if ( ! isset( $this->plugin_settings['design']['page_id'] ) ) {
|
118 |
+
return;
|
119 |
+
}
|
120 |
+
if ( get_post_status( $this->plugin_settings['design']['page_id'] ) === 'publish' ) {
|
121 |
+
wp_update_post(
|
122 |
+
array(
|
123 |
+
'ID' => $this->plugin_settings['design']['page_id'],
|
124 |
+
'post_status' => 'private',
|
125 |
+
)
|
126 |
+
);
|
127 |
+
}
|
128 |
+
}
|
129 |
+
);
|
130 |
}
|
131 |
}
|
132 |
|
199 |
'bg_custom' => '',
|
200 |
'bg_predefined' => 'bg1.jpg',
|
201 |
'other_custom_css' => '',
|
202 |
+
'template_category' => 'all',
|
203 |
),
|
204 |
'modules' => array(
|
205 |
'countdown_status' => 0,
|
292 |
self::single_activate();
|
293 |
}
|
294 |
|
295 |
+
update_option( 'wpmm_activated', time() );
|
296 |
+
|
297 |
// delete old options
|
298 |
delete_option( 'wp-maintenance-mode' );
|
299 |
delete_option( 'wp-maintenance-mode-msqld' );
|
650 |
! $this->check_search_bots() &&
|
651 |
! ( defined( 'WP_CLI' ) && WP_CLI )
|
652 |
) {
|
653 |
+
if ( get_option( 'wpmm_new_look' ) ) {
|
654 |
+
include_once wpmm_get_template_path( 'maintenance.php', true );
|
655 |
+
return;
|
656 |
+
}
|
657 |
+
|
658 |
// HEADER STUFF
|
659 |
$protocol = ! empty( $_SERVER['SERVER_PROTOCOL'] ) && in_array( $_SERVER['SERVER_PROTOCOL'], array( 'HTTP/1.1', 'HTTP/1.0' ), true ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0';
|
660 |
$charset = get_bloginfo( 'charset' ) ? get_bloginfo( 'charset' ) : 'UTF-8';
|
712 |
// load maintenance mode template
|
713 |
include_once wpmm_get_template_path( 'maintenance.php', true );
|
714 |
ob_flush();
|
|
|
|
|
715 |
}
|
716 |
}
|
717 |
|
953 |
* @since 2.4.0
|
954 |
*/
|
955 |
public function add_css_files() {
|
956 |
+
$styles = array();
|
957 |
+
if ( ! get_option( 'wpmm_new_look' ) || ! ( isset( $this->plugin_settings['design']['page_id'] ) ) ) {
|
958 |
+
$styles = array(
|
959 |
+
'frontend' => WPMM_CSS_URL . 'style' . WPMM_ASSETS_SUFFIX . '.css?ver=' . self::VERSION,
|
960 |
+
);
|
961 |
+
}
|
962 |
|
963 |
if ( ! empty( $this->plugin_settings['bot']['status'] ) && $this->plugin_settings['bot']['status'] === 1 ) {
|
964 |
$styles['bot'] = WPMM_CSS_URL . 'style.bot' . WPMM_ASSETS_SUFFIX . '.css?ver=' . self::VERSION;
|
969 |
}
|
970 |
}
|
971 |
|
972 |
+
/**
|
973 |
+
* Adds the maintenance page template to the templates dropdown
|
974 |
+
*
|
975 |
+
* @param $templates
|
976 |
+
* @return mixed
|
977 |
+
*/
|
978 |
+
public function add_maintenance_template( $templates ) {
|
979 |
+
return array_merge(
|
980 |
+
$templates,
|
981 |
+
array(
|
982 |
+
'templates/wpmm-page-template.php' => html_entity_decode( '↔ ' ) . __( 'WP Maintenance Mode', 'wp-maintenance-mode' ),
|
983 |
+
)
|
984 |
+
);
|
985 |
+
}
|
986 |
+
|
987 |
+
/**
|
988 |
+
* Applies the maintenance page template to the page
|
989 |
+
*
|
990 |
+
* @param $template
|
991 |
+
* @return mixed|string
|
992 |
+
*/
|
993 |
+
public function use_maintenance_template( $template ) {
|
994 |
+
global $post;
|
995 |
+
if ( empty( $post ) ) {
|
996 |
+
return $template;
|
997 |
+
}
|
998 |
+
|
999 |
+
$current_template = get_post_meta( $post->ID, '_wp_page_template', true );
|
1000 |
+
if ( 'templates/wpmm-page-template.php' !== $current_template ) {
|
1001 |
+
return $template;
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
$file = WPMM_VIEWS_PATH . '/wpmm-page-template.php';
|
1005 |
+
if ( file_exists( $file ) ) {
|
1006 |
+
return $file;
|
1007 |
+
}
|
1008 |
+
|
1009 |
+
return $template;
|
1010 |
+
}
|
1011 |
+
|
1012 |
+
/**
|
1013 |
+
* Calls `wp_head()` and remembers all the stylesheets rendered in the
|
1014 |
+
* `style_buffer` variable.
|
1015 |
+
* This is a fix for block themes.
|
1016 |
+
*
|
1017 |
+
* @return void
|
1018 |
+
*/
|
1019 |
+
public function remember_style_fse() {
|
1020 |
+
ob_start();
|
1021 |
+
wp_head();
|
1022 |
+
$output = ob_get_contents();
|
1023 |
+
ob_end_clean();
|
1024 |
+
|
1025 |
+
echo $output;
|
1026 |
+
|
1027 |
+
$doc = new DOMDocument();
|
1028 |
+
$doc->loadHTML( '<html>' . $output . '</html>' );
|
1029 |
+
$this->style_buffer = $doc->getElementsByTagName( 'style' );
|
1030 |
+
}
|
1031 |
+
|
1032 |
+
/**
|
1033 |
+
* Calls `wp_head()` at the end of file so that the missing stylesheets from the header
|
1034 |
+
* are added. Checks the `style_buffer` variable to not have duplicated styles.
|
1035 |
+
* This is a fix for block themes.
|
1036 |
+
*
|
1037 |
+
* @return void
|
1038 |
+
*/
|
1039 |
+
public function add_style_fse() {
|
1040 |
+
ob_start();
|
1041 |
+
wp_head();
|
1042 |
+
$output = ob_get_contents();
|
1043 |
+
ob_end_clean();
|
1044 |
+
|
1045 |
+
$doc = new DOMDocument();
|
1046 |
+
$doc->loadHTML( '<html>' . $output . '</html>' );
|
1047 |
+
$elems = $doc->getElementsByTagName( 'style' );
|
1048 |
+
$css = '';
|
1049 |
+
|
1050 |
+
$common_positions = array();
|
1051 |
+
|
1052 |
+
foreach ( $elems as $i => $elem ) {
|
1053 |
+
foreach ( $this->style_buffer as $style ) {
|
1054 |
+
if ( $elems->item( $i )->C14N() == $style->C14N() ) {
|
1055 |
+
$common_positions[] = $i;
|
1056 |
+
};
|
1057 |
+
}
|
1058 |
+
}
|
1059 |
+
|
1060 |
+
foreach ( $elems as $i => $elem ) {
|
1061 |
+
if ( in_array( $i, $common_positions ) ) {
|
1062 |
+
continue;
|
1063 |
+
}
|
1064 |
+
|
1065 |
+
$css .= $elems->item( $i )->C14N();
|
1066 |
+
}
|
1067 |
+
|
1068 |
+
echo $css;
|
1069 |
+
}
|
1070 |
+
|
1071 |
/**
|
1072 |
* Add inline CSS style
|
1073 |
*
|
1076 |
public function add_inline_css_style() {
|
1077 |
$css_rules = array();
|
1078 |
|
1079 |
+
// "Manage Bot > Upload avatar" url
|
1080 |
+
if ( ! empty( $this->plugin_settings['bot']['avatar'] ) ) {
|
1081 |
+
$css_rules['bot.avatar'] = sprintf( '.bot-avatar { background-image: url("%s"); }', esc_url( $this->plugin_settings['bot']['avatar'] ) );
|
1082 |
+
} else {
|
1083 |
+
$css_rules['bot.avatar'] = sprintf( '.bot-avatar { background-image: url("%s"); }', esc_url( WPMM_IMAGES_URL . 'chatbot.png' ) );
|
1084 |
+
}
|
1085 |
+
|
1086 |
+
// style below is not necessary in the new look
|
1087 |
+
if ( get_option( 'wpmm_new_look' ) && isset( $this->plugin_settings['design']['page_id'] ) ) {
|
1088 |
+
if ( empty( $css_rules ) ) {
|
1089 |
+
return;
|
1090 |
+
}
|
1091 |
+
|
1092 |
+
printf( "<style type=\"text/css\">\n%s\n</style>\n", wp_strip_all_tags( implode( "\n", $css_rules ) ) );
|
1093 |
+
return;
|
1094 |
+
}
|
1095 |
+
|
1096 |
// "Design > Content > Heading" color
|
1097 |
if ( ! empty( $this->plugin_settings['design']['heading_color'] ) ) {
|
1098 |
$css_rules['design.heading_color'] = sprintf( '.wrap h1 { color: %s; }', sanitize_hex_color( $this->plugin_settings['design']['heading_color'] ) );
|
1137 |
$css_rules['modules.subscribe_text_color'] = sprintf( '.wrap h3, .wrap .subscribe_wrapper { color: %s; }', sanitize_hex_color( $this->plugin_settings['modules']['subscribe_text_color'] ) );
|
1138 |
}
|
1139 |
|
|
|
|
|
|
|
|
|
|
|
1140 |
// "Design > Other > Custom CSS"
|
1141 |
if ( ! empty( $this->plugin_settings['design']['other_custom_css'] ) ) {
|
1142 |
$css_rules['design.other_custom_css'] = sanitize_textarea_field( $this->plugin_settings['design']['other_custom_css'] );
|
1155 |
* @since 2.4.0
|
1156 |
*/
|
1157 |
public function add_js_files() {
|
|
|
1158 |
$scripts = array(
|
1159 |
'jquery' => site_url( '/wp-includes/js/jquery/jquery' . WPMM_ASSETS_SUFFIX . '.js' ),
|
1160 |
'fitvids' => WPMM_JS_URL . 'jquery.fitvids' . WPMM_ASSETS_SUFFIX . '.js',
|
1161 |
'frontend' => WPMM_JS_URL . 'scripts' . WPMM_ASSETS_SUFFIX . '.js?ver=' . self::VERSION,
|
1162 |
);
|
1163 |
|
1164 |
+
if ( ! get_option( 'wpmm_new_look' ) || ! ( isset( $this->plugin_settings['design']['page_id'] ) ) ) {
|
1165 |
+
if ( ! empty( $this->plugin_settings['modules']['countdown_status'] ) && $this->plugin_settings['modules']['countdown_status'] === 1 ) {
|
1166 |
+
$scripts['countdown-dependency'] = WPMM_JS_URL . 'jquery.plugin' . WPMM_ASSETS_SUFFIX . '.js';
|
1167 |
+
$scripts['countdown'] = WPMM_JS_URL . 'jquery.countdown' . WPMM_ASSETS_SUFFIX . '.js';
|
1168 |
+
}
|
1169 |
|
1170 |
+
if (
|
1171 |
( ! empty( $this->plugin_settings['modules']['contact_status'] ) && $this->plugin_settings['modules']['contact_status'] === 1 ) ||
|
1172 |
+
( ! empty( $this->plugin_settings['modules']['subscribe_status'] ) && $this->plugin_settings['modules']['subscribe_status'] === 1 )
|
1173 |
+
) {
|
1174 |
+
$scripts['validate'] = WPMM_JS_URL . 'jquery.validate' . WPMM_ASSETS_SUFFIX . '.js';
|
1175 |
+
}
|
1176 |
+
}
|
1177 |
+
|
1178 |
+
if ( ! empty( $this->plugin_settings['bot']['status'] ) && $this->plugin_settings['bot']['status'] === 1 ) {
|
1179 |
$scripts['validate'] = WPMM_JS_URL . 'jquery.validate' . WPMM_ASSETS_SUFFIX . '.js';
|
1180 |
}
|
1181 |
|
includes/functions/helpers.php
CHANGED
@@ -66,7 +66,7 @@ function wpmm_get_utmized_url( $url, $utms = array() ) {
|
|
66 |
$utms = wp_parse_args(
|
67 |
$utms,
|
68 |
array(
|
69 |
-
'source' =>
|
70 |
'medium' => 'wpmaintenance',
|
71 |
'campaign' => null,
|
72 |
'term' => null,
|
66 |
$utms = wp_parse_args(
|
67 |
$utms,
|
68 |
array(
|
69 |
+
'source' => 'wpadmin',
|
70 |
'medium' => 'wpmaintenance',
|
71 |
'campaign' => null,
|
72 |
'term' => null,
|
includes/functions/hooks.php
CHANGED
@@ -30,3 +30,5 @@ function wpmm_add_extra_plugin_headers( $headers ) {
|
|
30 |
function wpmm_change_mail_content_type( $content_type ) {
|
31 |
return 'text/html';
|
32 |
}
|
|
|
|
30 |
function wpmm_change_mail_content_type( $content_type ) {
|
31 |
return 'text/html';
|
32 |
}
|
33 |
+
|
34 |
+
add_action( 'wp_ajax_wp_ajax_install_plugin', 'wp_ajax_install_plugin' );
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ Author URI: https://themeisle.com/
|
|
7 |
Tags: maintenance mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
|
8 |
Requires at least: 3.5
|
9 |
Tested up to: 6.0
|
10 |
-
Stable tag: 2.
|
11 |
Requires PHP: 5.6
|
12 |
License: GPL-2.0+
|
13 |
|
@@ -91,6 +91,14 @@ Notice: `wp-cron.php` is excluded by default.
|
|
91 |
|
92 |
== Changelog ==
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
##### [Version 2.4.7](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.6...v2.4.7) (2022-08-08)
|
95 |
|
96 |
##### Fixes
|
7 |
Tags: maintenance mode, admin, administration, unavailable, coming soon, multisite, landing page, under construction, contact form, subscribe, countdown
|
8 |
Requires at least: 3.5
|
9 |
Tested up to: 6.0
|
10 |
+
Stable tag: 2.5.0
|
11 |
Requires PHP: 5.6
|
12 |
License: GPL-2.0+
|
13 |
|
91 |
|
92 |
== Changelog ==
|
93 |
|
94 |
+
#### [Version 2.5.0](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.7...v2.5.0) (2022-09-08)
|
95 |
+
|
96 |
+
- New Feature: Adds compatibility with Block Editor or any page builder for building the maintenance mode page.
|
97 |
+
- New Feature: Adds coming soon and maintenance mode starting templates.
|
98 |
+
|
99 |
+
|
100 |
+
|
101 |
+
|
102 |
##### [Version 2.4.7](https://github.com/Codeinwp/wp-maintenance-mode/compare/v2.4.6...v2.4.7) (2022-08-08)
|
103 |
|
104 |
##### Fixes
|
vendor/autoload.php
CHANGED
@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
-
return
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
+
return ComposerAutoloaderInitc3b45c029325a3ed8b91591aad87cb1c::getLoader();
|
vendor/codeinwp/themeisle-sdk/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 3.2.24](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.23...v3.2.24) (2022-02-09)
|
2 |
|
3 |
Fix edge case issue on dismiss
|
1 |
+
##### [Version 3.2.27](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.26...v3.2.27) (2022-08-23)
|
2 |
+
|
3 |
+
- Add Promotion Module
|
4 |
+
Add the Promotion module for free plugins
|
5 |
+
|
6 |
+
##### [Version 3.2.26](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.25...v3.2.26) (2022-05-12)
|
7 |
+
|
8 |
+
- [Fix] Solve rollback sometimes not available
|
9 |
+
|
10 |
+
##### [Version 3.2.25](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.24...v3.2.25) (2022-03-28)
|
11 |
+
|
12 |
+
- Force update request after rollback
|
13 |
+
|
14 |
##### [Version 3.2.24](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.23...v3.2.24) (2022-02-09)
|
15 |
|
16 |
Fix edge case issue on dismiss
|
vendor/codeinwp/themeisle-sdk/assets/images/animation.jpg
ADDED
Binary file
|
vendor/codeinwp/themeisle-sdk/assets/images/conditions.jpg
ADDED
Binary file
|
vendor/codeinwp/themeisle-sdk/assets/images/css.jpg
ADDED
Binary file
|
vendor/codeinwp/themeisle-sdk/assets/js/build/index.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('wp-api', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => 'a1e161cc7b075bdd9250');
|
vendor/codeinwp/themeisle-sdk/assets/js/build/index.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.element,o=window.wp.i18n,n=window.wp.blockEditor,s=window.wp.components,i=window.wp.compose,r=window.wp.data,a=window.wp.hooks,l=window.wp.api;var c=e.n(l);const d={button:{display:"flex",justifyContent:"center",width:"100%"},image:{padding:"20px 0"},skip:{container:{display:"flex",flexDirection:"column",alignItems:"center"},button:{fontSize:"9px"},poweredby:{fontSize:"9px",textTransform:"uppercase"}}},m={"blocks-css":{title:(0,o.__)("Custom CSS","otter-blocks"),description:(0,o.__)("Enable Otter and add your Custom CSS for this block."),image:"css.jpg"},"blocks-animation":{title:(0,o.__)("Animations","otter-blocks"),description:(0,o.__)("Enable Otter to add Animations to this block."),image:"animation.jpg"},"blocks-conditions":{title:(0,o.__)("Visibility Conditions","otter-blocks"),description:(0,o.__)("Enable Otter to add Visibility Conditions to this block."),image:"conditions.jpg"}},w=e=>{let{onClick:n}=e;return(0,t.createElement)("div",{style:d.skip.container},(0,t.createElement)(s.Button,{style:d.skip.button,variant:"tertiary",onClick:n},(0,o.__)("Skip for now")),(0,t.createElement)("span",{style:d.skip.poweredby},(0,o.__)("Recommended by ")+window.themeisleSDKPromotions.product))},p=(0,i.createHigherOrderComponent)((e=>i=>{if(i.isSelected&&Boolean(window.themeisleSDKPromotions.showPromotion)){const[a,l]=(0,t.useState)(!1),[p,u]=(0,t.useState)("default"),[b,_]=(0,t.useState)(!1),[k,y,h]=(()=>{const{createNotice:e}=(0,r.dispatch)("core/notices"),[n,s]=(0,t.useState)({}),[i,a]=(0,t.useState)("loading"),l=()=>{c().loadPromise.then((async()=>{try{const e=new(c().models.Settings),t=await e.fetch();s(t)}catch(e){a("error")}finally{a("loaded")}}))};return(0,t.useEffect)((()=>{l()}),[]),[e=>null==n?void 0:n[e],function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(0,o.__)("Settings saved.","textdomain");a("saving");const i=new(c().models.Settings)({[t]:n}).save();i.success(((t,n)=>{"success"===n&&(a("loaded"),e("success",s,{isDismissible:!0,type:"snackbar"})),"error"===n&&(a("error"),e("error",(0,o.__)("An unknown error occurred.","textdomain"),{isDismissible:!0,type:"snackbar"})),l()})),i.error((t=>{a("error"),e("error",t.responseJSON.message?t.responseJSON.message:(0,o.__)("An unknown error occurred.","textdomain"),{isDismissible:!0,type:"snackbar"})}))},i]})(),g=async()=>{var e;l(!0),await("otter-blocks",new Promise((e=>{wp.updates.ajax("install-plugin",{slug:"otter-blocks",success:()=>{e({success:!0})},error:t=>{e({success:!1,code:t.errorCode})}})}))),await(e=window.themeisleSDKPromotions.activationUrl,new Promise((t=>{jQuery.get(e).done((()=>{t({success:!0})})).fail((()=>{t({success:!1})}))}))),l(!1),u("installed")},S=()=>"installed"===p?(0,t.createElement)("p",null,(0,o.__)("Awesome! Refresh the page to see Otter in action.")):(0,t.createElement)(s.Button,{variant:"secondary",onClick:g,isBusy:a,style:d.button},(0,o.__)("Install & Activate Otter")),f=()=>{const e=JSON.parse(window.themeisleSDKPromotions.promotions_otter);e[window.themeisleSDKPromotions.showPromotion]=(new Date).getTime()/1e3|0,y("themeisle_sdk_promotions_otter",JSON.stringify(e)),window.themeisleSDKPromotions.showPromotion=!1};return(0,t.useEffect)((()=>{b&&f()}),[b]),b?(0,t.createElement)(e,i):(0,t.createElement)(t.Fragment,null,(0,t.createElement)(e,i),(0,t.createElement)(n.InspectorControls,null,Object.keys(m).map((e=>{if(e===window.themeisleSDKPromotions.showPromotion){const o=m[e];return(0,t.createElement)(s.PanelBody,{title:o.title,initialOpen:!1},(0,t.createElement)("p",null,o.description),(0,t.createElement)(S,null),(0,t.createElement)("img",{style:d.image,src:window.themeisleSDKPromotions.assets+o.image}),(0,t.createElement)(w,{onClick:()=>_(!0)}))}}))))}return(0,t.createElement)(e,i)}),"withInspectorControl");(0,r.select)("core/edit-site")||(0,a.addFilter)("editor.BlockEdit","themeisle-sdk/with-inspector-controls",p)})();
|
vendor/codeinwp/themeisle-sdk/load.php
CHANGED
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
14 |
return;
|
15 |
}
|
16 |
// Current SDK version and path.
|
17 |
-
$themeisle_sdk_version = '3.2.
|
18 |
$themeisle_sdk_path = dirname( __FILE__ );
|
19 |
|
20 |
global $themeisle_sdk_max_version;
|
14 |
return;
|
15 |
}
|
16 |
// Current SDK version and path.
|
17 |
+
$themeisle_sdk_version = '3.2.27';
|
18 |
$themeisle_sdk_path = dirname( __FILE__ );
|
19 |
|
20 |
global $themeisle_sdk_max_version;
|
vendor/codeinwp/themeisle-sdk/src/Loader.php
CHANGED
@@ -55,7 +55,7 @@ final class Loader {
|
|
55 |
'review',
|
56 |
'recommendation',
|
57 |
'notification',
|
58 |
-
|
59 |
];
|
60 |
|
61 |
/**
|
55 |
'review',
|
56 |
'recommendation',
|
57 |
'notification',
|
58 |
+
'promotions',
|
59 |
];
|
60 |
|
61 |
/**
|
vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php
CHANGED
@@ -522,6 +522,10 @@ class Licenser extends Abstract_Module {
|
|
522 |
return new \WP_Error( 'themeisle-license-invalid', 'ERROR: Invalid license provided.' );
|
523 |
}
|
524 |
|
|
|
|
|
|
|
|
|
525 |
return true;
|
526 |
}
|
527 |
|
522 |
return new \WP_Error( 'themeisle-license-invalid', 'ERROR: Invalid license provided.' );
|
523 |
}
|
524 |
|
525 |
+
// Remove the versions transient upon activation so that newer version for rollback can be acquired.
|
526 |
+
$versions_cache = $this->product->get_cache_key();
|
527 |
+
delete_transient( $versions_cache );
|
528 |
+
|
529 |
return true;
|
530 |
}
|
531 |
|
vendor/codeinwp/themeisle-sdk/src/Modules/Promotions.php
ADDED
@@ -0,0 +1,192 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The promotions model class for ThemeIsle SDK
|
4 |
+
*
|
5 |
+
* Here's how to hook it in your plugin: add_filter( 'menu_icons_load_promotions', function() { return array( 'otter' ); } );
|
6 |
+
*
|
7 |
+
* @package ThemeIsleSDK
|
8 |
+
* @subpackage Modules
|
9 |
+
* @copyright Copyright (c) 2017, Marius Cristea
|
10 |
+
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
11 |
+
* @since 1.0.0
|
12 |
+
*/
|
13 |
+
|
14 |
+
namespace ThemeisleSDK\Modules;
|
15 |
+
|
16 |
+
use ThemeisleSDK\Common\Abstract_Module;
|
17 |
+
use ThemeisleSDK\Product;
|
18 |
+
|
19 |
+
// Exit if accessed directly.
|
20 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
21 |
+
exit;
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Promotions module for ThemeIsle SDK.
|
26 |
+
*/
|
27 |
+
class Promotions extends Abstract_Module {
|
28 |
+
/**
|
29 |
+
* Fetched feeds items.
|
30 |
+
*
|
31 |
+
* @var array Feed items.
|
32 |
+
*/
|
33 |
+
private $promotions_to_load = array();
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Should we load this module.
|
37 |
+
*
|
38 |
+
* @param Product $product Product object.
|
39 |
+
*
|
40 |
+
* @return bool
|
41 |
+
*/
|
42 |
+
public function can_load( $product ) {
|
43 |
+
if ( $this->is_from_partner( $product ) ) {
|
44 |
+
return false;
|
45 |
+
}
|
46 |
+
|
47 |
+
$this->promotions_to_load = apply_filters( $product->get_key() . '_load_promotions', array() );
|
48 |
+
|
49 |
+
if ( 0 === count( $this->promotions_to_load ) ) {
|
50 |
+
return false;
|
51 |
+
}
|
52 |
+
|
53 |
+
return true;
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Registers the hooks.
|
58 |
+
*
|
59 |
+
* @param Product $product Product to load.
|
60 |
+
*
|
61 |
+
* @return Promotions Module instance.
|
62 |
+
*/
|
63 |
+
public function load( $product ) {
|
64 |
+
if ( 0 === count( $this->promotions_to_load ) ) {
|
65 |
+
return;
|
66 |
+
}
|
67 |
+
|
68 |
+
$this->product = $product;
|
69 |
+
|
70 |
+
if ( in_array( 'otter', $this->promotions_to_load ) && false === apply_filters( 'themeisle_sdk_load_promotions_otter', false ) && ! ( defined( 'OTTER_BLOCKS_VERSION' ) || $this->is_otter_installed() ) && version_compare( get_bloginfo( 'version' ), '5.8', '>=' ) ) {
|
71 |
+
add_filter( 'themeisle_sdk_load_promotions_otter', '__return_true' );
|
72 |
+
add_action( 'init', array( $this, 'register_settings' ), 99 );
|
73 |
+
|
74 |
+
if ( false !== $this->show_otter_promotion() ) {
|
75 |
+
add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_editor_assets' ) );
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
return $this;
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Register Settings
|
84 |
+
*
|
85 |
+
* @since 1.2.0
|
86 |
+
* @access public
|
87 |
+
*/
|
88 |
+
public function register_settings() {
|
89 |
+
register_setting(
|
90 |
+
'themeisle_sdk_settings',
|
91 |
+
'themeisle_sdk_promotions_otter',
|
92 |
+
array(
|
93 |
+
'type' => 'string',
|
94 |
+
'sanitize_callback' => 'sanitize_text_field',
|
95 |
+
'show_in_rest' => true,
|
96 |
+
'default' => '{}',
|
97 |
+
)
|
98 |
+
);
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Get the Otter Blocks plugin status.
|
103 |
+
*
|
104 |
+
* @return string
|
105 |
+
*/
|
106 |
+
private function is_otter_installed() {
|
107 |
+
$status = false;
|
108 |
+
|
109 |
+
if ( file_exists( ABSPATH . 'wp-content/plugins/otter-blocks/otter-blocks.php' ) ) {
|
110 |
+
return true;
|
111 |
+
}
|
112 |
+
|
113 |
+
return $status;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Get status of Otter promotion message.
|
118 |
+
*
|
119 |
+
* @return mixed
|
120 |
+
*/
|
121 |
+
public function show_otter_promotion() {
|
122 |
+
$promotions = array(
|
123 |
+
'blocks_css',
|
124 |
+
'blocks_animation',
|
125 |
+
'blocks_conditions',
|
126 |
+
);
|
127 |
+
|
128 |
+
$option = json_decode( get_option( 'themeisle_sdk_promotions_otter', '{}' ), true );
|
129 |
+
|
130 |
+
if ( 0 === count( $option ) ) {
|
131 |
+
return 'blocks-css';
|
132 |
+
}
|
133 |
+
|
134 |
+
if ( isset( $option['blocks-css'] ) && ! isset( $option['blocks-animation'] ) && $option['blocks-css'] < strtotime( '-7 days' ) ) {
|
135 |
+
return 'blocks-animation';
|
136 |
+
}
|
137 |
+
|
138 |
+
if ( isset( $option['blocks-animation'] ) && ! isset( $option['blocks-conditions'] ) && $option['blocks-animation'] < strtotime( '-7 days' ) ) {
|
139 |
+
return 'blocks-conditions';
|
140 |
+
}
|
141 |
+
|
142 |
+
return false;
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Load Gutenberg editor assets.
|
147 |
+
*
|
148 |
+
* @since 1.0.0
|
149 |
+
* @access public
|
150 |
+
*/
|
151 |
+
public function enqueue_editor_assets() {
|
152 |
+
global $themeisle_sdk_max_path;
|
153 |
+
|
154 |
+
$themeisle_sdk_path = dirname( $themeisle_sdk_max_path );
|
155 |
+
$themeisle_sdk_src = plugins_url( '/', $themeisle_sdk_max_path );
|
156 |
+
|
157 |
+
$asset_file = include $themeisle_sdk_path . '/themeisle-sdk/assets/js/build/index.asset.php';
|
158 |
+
|
159 |
+
wp_enqueue_script(
|
160 |
+
'themeisle-sdk-otter-promotions',
|
161 |
+
$themeisle_sdk_src . 'themeisle-sdk/assets/js/build/index.js',
|
162 |
+
array_merge( $asset_file['dependencies'], [ 'updates' ] ),
|
163 |
+
$asset_file['version'],
|
164 |
+
true
|
165 |
+
);
|
166 |
+
|
167 |
+
$option = get_option( 'themeisle_sdk_promotions_otter', '{}' );
|
168 |
+
|
169 |
+
wp_localize_script(
|
170 |
+
'themeisle-sdk-otter-promotions',
|
171 |
+
'themeisleSDKPromotions',
|
172 |
+
array(
|
173 |
+
'product' => $this->product->get_name(),
|
174 |
+
'assets' => $themeisle_sdk_src . 'themeisle-sdk/assets/images/',
|
175 |
+
'showPromotion' => $this->show_otter_promotion(),
|
176 |
+
'promotions_otter' => $option,
|
177 |
+
'activationUrl' => esc_url(
|
178 |
+
add_query_arg(
|
179 |
+
array(
|
180 |
+
'plugin_status' => 'all',
|
181 |
+
'paged' => '1',
|
182 |
+
'action' => 'activate',
|
183 |
+
'plugin' => rawurlencode( 'otter-blocks/otter-blocks.php' ),
|
184 |
+
'_wpnonce' => wp_create_nonce( 'activate-plugin_otter-blocks/otter-blocks.php' ),
|
185 |
+
),
|
186 |
+
admin_url( 'plugins.php' )
|
187 |
+
)
|
188 |
+
),
|
189 |
+
)
|
190 |
+
);
|
191 |
+
}
|
192 |
+
}
|
vendor/codeinwp/themeisle-sdk/src/Modules/Rollback.php
CHANGED
@@ -98,7 +98,7 @@ class Rollback extends Abstract_Module {
|
|
98 |
*/
|
99 |
private function get_api_versions() {
|
100 |
|
101 |
-
$cache_key = $this->product->
|
102 |
$cache_versions = get_transient( $cache_key );
|
103 |
if ( false === $cache_versions ) {
|
104 |
$versions = $this->get_remote_versions();
|
@@ -374,11 +374,27 @@ class Rollback extends Abstract_Module {
|
|
374 |
);
|
375 |
}
|
376 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
/**
|
378 |
* Set the rollback hook. Strangely, this does not work if placed in the ThemeIsle_SDK_Rollback class, so it is being called from there instead.
|
379 |
*/
|
380 |
public function add_hooks() {
|
381 |
add_action( 'admin_post_' . $this->product->get_key() . '_rollback', array( $this, 'start_rollback' ) );
|
382 |
add_action( 'admin_footer', array( $this, 'add_footer' ) );
|
|
|
|
|
|
|
|
|
383 |
}
|
384 |
}
|
98 |
*/
|
99 |
private function get_api_versions() {
|
100 |
|
101 |
+
$cache_key = $this->product->get_cache_key();
|
102 |
$cache_versions = get_transient( $cache_key );
|
103 |
if ( false === $cache_versions ) {
|
104 |
$versions = $this->get_remote_versions();
|
374 |
);
|
375 |
}
|
376 |
|
377 |
+
/**
|
378 |
+
* Fires after the option has been updated.
|
379 |
+
*
|
380 |
+
* @param mixed $old_value The old option value.
|
381 |
+
* @param mixed $value The new option value.
|
382 |
+
* @param string $option Option name.
|
383 |
+
*/
|
384 |
+
public function update_active_plugins_action( $old_value, $value, $option ) {
|
385 |
+
delete_site_transient( 'update_plugins' );
|
386 |
+
wp_cache_delete( 'plugins', 'plugins' );
|
387 |
+
}
|
388 |
+
|
389 |
/**
|
390 |
* Set the rollback hook. Strangely, this does not work if placed in the ThemeIsle_SDK_Rollback class, so it is being called from there instead.
|
391 |
*/
|
392 |
public function add_hooks() {
|
393 |
add_action( 'admin_post_' . $this->product->get_key() . '_rollback', array( $this, 'start_rollback' ) );
|
394 |
add_action( 'admin_footer', array( $this, 'add_footer' ) );
|
395 |
+
|
396 |
+
// This hook will be invoked after the plugin activation.
|
397 |
+
// We use this to force an update of the cache so that Update is present immediate after a rollback.
|
398 |
+
add_action( 'update_option_active_plugins', array( $this, 'update_active_plugins_action' ), 10, 3 );
|
399 |
}
|
400 |
}
|
vendor/codeinwp/themeisle-sdk/src/Product.php
CHANGED
@@ -322,6 +322,15 @@ class Product {
|
|
322 |
return $name;
|
323 |
}
|
324 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
/**
|
326 |
* Getter for product name.
|
327 |
*
|
322 |
return $name;
|
323 |
}
|
324 |
|
325 |
+
/**
|
326 |
+
* Return the product version cache key.
|
327 |
+
*
|
328 |
+
* @return string The product version cache key.
|
329 |
+
*/
|
330 |
+
public function get_cache_key() {
|
331 |
+
return $this->get_key() . '_' . preg_replace( '/[^0-9a-zA-Z ]/m', '', $this->get_version() ) . 'versions';
|
332 |
+
}
|
333 |
+
|
334 |
/**
|
335 |
* Getter for product name.
|
336 |
*
|
vendor/codeinwp/themeisle-sdk/start.php
CHANGED
@@ -32,6 +32,7 @@ $files_to_load = [
|
|
32 |
$themeisle_library_path . '/src/Modules/Translate.php',
|
33 |
$themeisle_library_path . '/src/Modules/Review.php',
|
34 |
$themeisle_library_path . '/src/Modules/Recommendation.php',
|
|
|
35 |
];
|
36 |
|
37 |
$files_to_load = array_merge( $files_to_load, apply_filters( 'themeisle_sdk_required_files', [] ) );
|
32 |
$themeisle_library_path . '/src/Modules/Translate.php',
|
33 |
$themeisle_library_path . '/src/Modules/Review.php',
|
34 |
$themeisle_library_path . '/src/Modules/Recommendation.php',
|
35 |
+
$themeisle_library_path . '/src/Modules/Promotions.php',
|
36 |
];
|
37 |
|
38 |
$files_to_load = array_merge( $files_to_load, apply_filters( 'themeisle_sdk_required_files', [] ) );
|
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,18 +22,18 @@ class ComposerAutoloaderInita66cc34bb600909a53f8f21f57d9450c
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
require __DIR__ . '/autoload_static.php';
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
|
32 |
$loader->register(true);
|
33 |
|
34 |
-
$includeFiles = \Composer\Autoload\
|
35 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
36 |
-
|
37 |
}
|
38 |
|
39 |
return $loader;
|
@@ -45,7 +45,7 @@ class ComposerAutoloaderInita66cc34bb600909a53f8f21f57d9450c
|
|
45 |
* @param string $file
|
46 |
* @return void
|
47 |
*/
|
48 |
-
function
|
49 |
{
|
50 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
51 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitc3b45c029325a3ed8b91591aad87cb1c
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInitc3b45c029325a3ed8b91591aad87cb1c', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitc3b45c029325a3ed8b91591aad87cb1c', 'loadClassLoader'));
|
28 |
|
29 |
require __DIR__ . '/autoload_static.php';
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitc3b45c029325a3ed8b91591aad87cb1c::getInitializer($loader));
|
31 |
|
32 |
$loader->register(true);
|
33 |
|
34 |
+
$includeFiles = \Composer\Autoload\ComposerStaticInitc3b45c029325a3ed8b91591aad87cb1c::$files;
|
35 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
36 |
+
composerRequirec3b45c029325a3ed8b91591aad87cb1c($fileIdentifier, $file);
|
37 |
}
|
38 |
|
39 |
return $loader;
|
45 |
* @param string $file
|
46 |
* @return void
|
47 |
*/
|
48 |
+
function composerRequirec3b45c029325a3ed8b91591aad87cb1c($fileIdentifier, $file)
|
49 |
{
|
50 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
51 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'7c3f92ec501ce72fe4f09265dc506991' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
|
@@ -17,7 +17,7 @@ class ComposerStaticInita66cc34bb600909a53f8f21f57d9450c
|
|
17 |
public static function getInitializer(ClassLoader $loader)
|
18 |
{
|
19 |
return \Closure::bind(function () use ($loader) {
|
20 |
-
$loader->classMap =
|
21 |
|
22 |
}, null, ClassLoader::class);
|
23 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitc3b45c029325a3ed8b91591aad87cb1c
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'7c3f92ec501ce72fe4f09265dc506991' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
|
17 |
public static function getInitializer(ClassLoader $loader)
|
18 |
{
|
19 |
return \Closure::bind(function () use ($loader) {
|
20 |
+
$loader->classMap = ComposerStaticInitc3b45c029325a3ed8b91591aad87cb1c::$classMap;
|
21 |
|
22 |
}, null, ClassLoader::class);
|
23 |
}
|
vendor/composer/installed.json
CHANGED
@@ -2,23 +2,23 @@
|
|
2 |
"packages": [
|
3 |
{
|
4 |
"name": "codeinwp/themeisle-sdk",
|
5 |
-
"version": "3.2.
|
6 |
-
"version_normalized": "3.2.
|
7 |
"source": {
|
8 |
"type": "git",
|
9 |
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
|
10 |
-
"reference": "
|
11 |
},
|
12 |
"dist": {
|
13 |
"type": "zip",
|
14 |
-
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/
|
15 |
-
"reference": "
|
16 |
"shasum": ""
|
17 |
},
|
18 |
"require-dev": {
|
19 |
"codeinwp/phpcs-ruleset": "dev-main"
|
20 |
},
|
21 |
-
"time": "2022-
|
22 |
"type": "library",
|
23 |
"installation-source": "dist",
|
24 |
"notification-url": "https://packagist.org/downloads/",
|
@@ -39,7 +39,7 @@
|
|
39 |
],
|
40 |
"support": {
|
41 |
"issues": "https://github.com/Codeinwp/themeisle-sdk/issues",
|
42 |
-
"source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.2.
|
43 |
},
|
44 |
"install-path": "../codeinwp/themeisle-sdk"
|
45 |
}
|
2 |
"packages": [
|
3 |
{
|
4 |
"name": "codeinwp/themeisle-sdk",
|
5 |
+
"version": "3.2.27",
|
6 |
+
"version_normalized": "3.2.27.0",
|
7 |
"source": {
|
8 |
"type": "git",
|
9 |
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
|
10 |
+
"reference": "bab0314e1f6e2f811116a2da7736b94cbe6af90f"
|
11 |
},
|
12 |
"dist": {
|
13 |
"type": "zip",
|
14 |
+
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/bab0314e1f6e2f811116a2da7736b94cbe6af90f",
|
15 |
+
"reference": "bab0314e1f6e2f811116a2da7736b94cbe6af90f",
|
16 |
"shasum": ""
|
17 |
},
|
18 |
"require-dev": {
|
19 |
"codeinwp/phpcs-ruleset": "dev-main"
|
20 |
},
|
21 |
+
"time": "2022-08-23T13:09:40+00:00",
|
22 |
"type": "library",
|
23 |
"installation-source": "dist",
|
24 |
"notification-url": "https://packagist.org/downloads/",
|
39 |
],
|
40 |
"support": {
|
41 |
"issues": "https://github.com/Codeinwp/themeisle-sdk/issues",
|
42 |
+
"source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.2.27"
|
43 |
},
|
44 |
"install-path": "../codeinwp/themeisle-sdk"
|
45 |
}
|
vendor/composer/installed.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
'name' => 'codeinwp/wp-maintenance-mode',
|
4 |
-
'pretty_version' => '2.
|
5 |
-
'version' => '2.
|
6 |
'reference' => NULL,
|
7 |
'type' => 'wordpress-plugin',
|
8 |
'install_path' => __DIR__ . '/../../',
|
@@ -11,17 +11,17 @@
|
|
11 |
),
|
12 |
'versions' => array(
|
13 |
'codeinwp/themeisle-sdk' => array(
|
14 |
-
'pretty_version' => '3.2.
|
15 |
-
'version' => '3.2.
|
16 |
-
'reference' => '
|
17 |
'type' => 'library',
|
18 |
'install_path' => __DIR__ . '/../codeinwp/themeisle-sdk',
|
19 |
'aliases' => array(),
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'codeinwp/wp-maintenance-mode' => array(
|
23 |
-
'pretty_version' => '2.
|
24 |
-
'version' => '2.
|
25 |
'reference' => NULL,
|
26 |
'type' => 'wordpress-plugin',
|
27 |
'install_path' => __DIR__ . '/../../',
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
'name' => 'codeinwp/wp-maintenance-mode',
|
4 |
+
'pretty_version' => '2.5.0',
|
5 |
+
'version' => '2.5.0.0',
|
6 |
'reference' => NULL,
|
7 |
'type' => 'wordpress-plugin',
|
8 |
'install_path' => __DIR__ . '/../../',
|
11 |
),
|
12 |
'versions' => array(
|
13 |
'codeinwp/themeisle-sdk' => array(
|
14 |
+
'pretty_version' => '3.2.27',
|
15 |
+
'version' => '3.2.27.0',
|
16 |
+
'reference' => 'bab0314e1f6e2f811116a2da7736b94cbe6af90f',
|
17 |
'type' => 'library',
|
18 |
'install_path' => __DIR__ . '/../codeinwp/themeisle-sdk',
|
19 |
'aliases' => array(),
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'codeinwp/wp-maintenance-mode' => array(
|
23 |
+
'pretty_version' => '2.5.0',
|
24 |
+
'version' => '2.5.0.0',
|
25 |
'reference' => NULL,
|
26 |
'type' => 'wordpress-plugin',
|
27 |
'install_path' => __DIR__ . '/../../',
|
views/maintenance.php
CHANGED
@@ -16,7 +16,13 @@
|
|
16 |
*/
|
17 |
|
18 |
defined( 'ABSPATH' ) || exit;
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
<!DOCTYPE html>
|
21 |
<html <?php language_attributes(); ?> >
|
22 |
<head>
|
@@ -43,10 +49,9 @@ defined( 'ABSPATH' ) || exit;
|
|
43 |
|
44 |
<?php
|
45 |
/**
|
46 |
-
*
|
47 |
-
* Also, we don't escape the $text, because wp_kses_post was applied before do_shortcode. So it's safe to output it.
|
48 |
*/
|
49 |
-
if ( ! empty( $text )
|
50 |
$allowed_html = wp_kses_allowed_html( 'post' );
|
51 |
|
52 |
$allowed_html['form'] = array(
|
@@ -75,18 +80,15 @@ defined( 'ABSPATH' ) || exit;
|
|
75 |
|
76 |
<!-- Bot -->
|
77 |
<div class="bot-container">
|
78 |
-
<div class="bot-
|
79 |
-
|
80 |
<div class="chat-container cf"></div>
|
81 |
-
<!-- User input -->
|
82 |
<div class="input"></div>
|
83 |
-
<!-- User choices -->
|
84 |
<div class="choices cf"></div>
|
85 |
</div>
|
86 |
</div>
|
87 |
|
88 |
<div class="bot-error"><p></p></div>
|
89 |
-
|
90 |
<div class="wrap under-bot">
|
91 |
<?php } ?>
|
92 |
|
@@ -96,13 +98,7 @@ defined( 'ABSPATH' ) || exit;
|
|
96 |
<?php } ?>
|
97 |
|
98 |
<?php
|
99 |
-
|
100 |
-
* When the bot feature is enabled, the subscribe form is not displayed anymore.
|
101 |
-
*/
|
102 |
-
if (
|
103 |
-
( ! empty( $this->plugin_settings['modules']['subscribe_status'] ) && $this->plugin_settings['modules']['subscribe_status'] === 1 ) &&
|
104 |
-
( isset( $this->plugin_settings['bot']['status'] ) && $this->plugin_settings['bot']['status'] === 0 )
|
105 |
-
) {
|
106 |
?>
|
107 |
<!-- Subscribe -->
|
108 |
<?php if ( ! empty( $this->plugin_settings['modules']['subscribe_text'] ) ) { ?>
|
@@ -134,7 +130,7 @@ defined( 'ABSPATH' ) || exit;
|
|
134 |
<?php } ?>
|
135 |
|
136 |
<?php if ( ! empty( $this->plugin_settings['modules']['social_status'] ) && $this->plugin_settings['modules']['social_status'] === 1 ) { ?>
|
137 |
-
<!-- Social networks -->
|
138 |
<div class="social" data-target="<?php echo ! empty( $this->plugin_settings['modules']['social_target'] ) ? 1 : 0; ?>">
|
139 |
<?php if ( ! empty( $this->plugin_settings['modules']['social_twitter'] ) ) { ?>
|
140 |
<a class="tw" href="<?php echo esc_url( $this->plugin_settings['modules']['social_twitter'] ); ?>">twitter</a>
|
@@ -146,7 +142,7 @@ defined( 'ABSPATH' ) || exit;
|
|
146 |
|
147 |
<?php if ( ! empty( $this->plugin_settings['modules']['social_instagram'] ) ) { ?>
|
148 |
<a class="instagram" href="<?php echo esc_url( $this->plugin_settings['modules']['social_instagram'] ); ?>">instagram</a>
|
149 |
-
<?php } ?>
|
150 |
|
151 |
<?php if ( ! empty( $this->plugin_settings['modules']['social_pinterest'] ) ) { ?>
|
152 |
<a class="pin" href="<?php echo esc_url( $this->plugin_settings['modules']['social_pinterest'] ); ?>">pinterest</a>
|
@@ -225,14 +221,14 @@ defined( 'ABSPATH' ) || exit;
|
|
225 |
|
226 |
<?php
|
227 |
if (
|
228 |
-
|
229 |
-
|
230 |
) {
|
231 |
?>
|
232 |
<!-- Footer links -->
|
233 |
<div class="footer_links">
|
234 |
<?php if ( $this->plugin_settings['general']['admin_link'] === 1 ) { ?>
|
235 |
-
<a href="<?php echo esc_url( admin_url() ); ?>"><?php esc_html_e( 'Dashboard', 'wp-maintenance-mode' ); ?></a>
|
236 |
<?php } ?>
|
237 |
|
238 |
<?php if ( $this->plugin_settings['gdpr']['status'] === 1 ) { ?>
|
@@ -243,7 +239,7 @@ defined( 'ABSPATH' ) || exit;
|
|
243 |
</div>
|
244 |
|
245 |
<script type='text/javascript'>
|
246 |
-
|
247 |
</script>
|
248 |
|
249 |
<?php
|
@@ -252,3 +248,7 @@ defined( 'ABSPATH' ) || exit;
|
|
252 |
?>
|
253 |
</body>
|
254 |
</html>
|
|
|
|
|
|
|
|
16 |
*/
|
17 |
|
18 |
defined( 'ABSPATH' ) || exit;
|
19 |
+
|
20 |
+
if ( isset( $this->plugin_settings['design']['page_id'] ) && get_option( 'wpmm_new_look' ) ) {
|
21 |
+
if ( ! is_front_page() ) {
|
22 |
+
wp_redirect( home_url() );
|
23 |
+
}
|
24 |
+
} else {
|
25 |
+
?>
|
26 |
<!DOCTYPE html>
|
27 |
<html <?php language_attributes(); ?> >
|
28 |
<head>
|
49 |
|
50 |
<?php
|
51 |
/**
|
52 |
+
* We don't escape the $text, because wp_kses_post was applied before do_shortcode. So it's safe to output it.
|
|
|
53 |
*/
|
54 |
+
if ( ! empty( $text ) ) {
|
55 |
$allowed_html = wp_kses_allowed_html( 'post' );
|
56 |
|
57 |
$allowed_html['form'] = array(
|
80 |
|
81 |
<!-- Bot -->
|
82 |
<div class="bot-container">
|
83 |
+
<div class="bot-avatar"><div class="avatar-notice"></div></div>
|
84 |
+
<div class="bot-chat-wrapper" style="display: none">
|
85 |
<div class="chat-container cf"></div>
|
|
|
86 |
<div class="input"></div>
|
|
|
87 |
<div class="choices cf"></div>
|
88 |
</div>
|
89 |
</div>
|
90 |
|
91 |
<div class="bot-error"><p></p></div>
|
|
|
92 |
<div class="wrap under-bot">
|
93 |
<?php } ?>
|
94 |
|
98 |
<?php } ?>
|
99 |
|
100 |
<?php
|
101 |
+
if ( ( ! empty( $this->plugin_settings['modules']['subscribe_status'] ) && $this->plugin_settings['modules']['subscribe_status'] === 1 ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
?>
|
103 |
<!-- Subscribe -->
|
104 |
<?php if ( ! empty( $this->plugin_settings['modules']['subscribe_text'] ) ) { ?>
|
130 |
<?php } ?>
|
131 |
|
132 |
<?php if ( ! empty( $this->plugin_settings['modules']['social_status'] ) && $this->plugin_settings['modules']['social_status'] === 1 ) { ?>
|
133 |
+
<!-- Social networks -->
|
134 |
<div class="social" data-target="<?php echo ! empty( $this->plugin_settings['modules']['social_target'] ) ? 1 : 0; ?>">
|
135 |
<?php if ( ! empty( $this->plugin_settings['modules']['social_twitter'] ) ) { ?>
|
136 |
<a class="tw" href="<?php echo esc_url( $this->plugin_settings['modules']['social_twitter'] ); ?>">twitter</a>
|
142 |
|
143 |
<?php if ( ! empty( $this->plugin_settings['modules']['social_instagram'] ) ) { ?>
|
144 |
<a class="instagram" href="<?php echo esc_url( $this->plugin_settings['modules']['social_instagram'] ); ?>">instagram</a>
|
145 |
+
<?php } ?>
|
146 |
|
147 |
<?php if ( ! empty( $this->plugin_settings['modules']['social_pinterest'] ) ) { ?>
|
148 |
<a class="pin" href="<?php echo esc_url( $this->plugin_settings['modules']['social_pinterest'] ); ?>">pinterest</a>
|
221 |
|
222 |
<?php
|
223 |
if (
|
224 |
+
( ! empty( $this->plugin_settings['general']['admin_link'] ) && $this->plugin_settings['general']['admin_link'] === 1 ) ||
|
225 |
+
( ! empty( $this->plugin_settings['gdpr']['status'] ) && $this->plugin_settings['gdpr']['status'] === 1 )
|
226 |
) {
|
227 |
?>
|
228 |
<!-- Footer links -->
|
229 |
<div class="footer_links">
|
230 |
<?php if ( $this->plugin_settings['general']['admin_link'] === 1 ) { ?>
|
231 |
+
<a href="<?php echo esc_url( admin_url() ); ?>"><?php esc_html_e( 'Dashboard', 'wp-maintenance-mode' ); ?></a>
|
232 |
<?php } ?>
|
233 |
|
234 |
<?php if ( $this->plugin_settings['gdpr']['status'] === 1 ) { ?>
|
239 |
</div>
|
240 |
|
241 |
<script type='text/javascript'>
|
242 |
+
const wpmmVars = {"ajaxURL": "<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>"};
|
243 |
</script>
|
244 |
|
245 |
<?php
|
248 |
?>
|
249 |
</body>
|
250 |
</html>
|
251 |
+
<?php
|
252 |
+
exit();
|
253 |
+
}
|
254 |
+
?>
|
views/settings.php
CHANGED
@@ -6,47 +6,119 @@
|
|
6 |
*/
|
7 |
|
8 |
defined( 'ABSPATH' ) || exit;
|
|
|
|
|
9 |
?>
|
10 |
<div class="wrap">
|
11 |
-
<h2 class="wpmm-title"><?php echo esc_html( get_admin_page_title() );
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
<div class="wpmm-wrapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
<div id="content" class="wrapper-cell">
|
15 |
<div class="nav-tab-wrapper">
|
16 |
<a class="nav-tab nav-tab-active" href="#general">
|
17 |
-
<svg class="nav-tab-icon" xmlns="http://www.w3.org/2000/svg"
|
18 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4" />
|
19 |
</svg>
|
20 |
|
21 |
<?php esc_html_e( 'General', 'wp-maintenance-mode' ); ?>
|
22 |
</a>
|
23 |
<a class="nav-tab" href="#design">
|
24 |
-
<svg class="nav-tab-icon" xmlns="http://www.w3.org/2000/svg"
|
25 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" />
|
26 |
</svg>
|
27 |
|
28 |
<?php esc_html_e( 'Design', 'wp-maintenance-mode' ); ?></a>
|
29 |
<a class="nav-tab" href="#modules">
|
30 |
-
<svg class="nav-tab-icon" xmlns="http://www.w3.org/2000/svg"
|
31 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 14v6m-3-3h6M6 10h2a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2zm10 0h2a2 2 0 002-2V6a2 2 0 00-2-2h-2a2 2 0 00-2 2v2a2 2 0 002 2zM6 20h2a2 2 0 002-2v-2a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2z" />
|
32 |
</svg>
|
33 |
|
34 |
<?php esc_html_e( 'Modules', 'wp-maintenance-mode' ); ?>
|
35 |
</a>
|
36 |
<a class="nav-tab" href="#bot">
|
37 |
-
<svg class="nav-tab-icon" xmlns="http://www.w3.org/2000/svg"
|
38 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z" />
|
39 |
</svg>
|
40 |
|
41 |
<?php esc_html_e( 'Manage Bot', 'wp-maintenance-mode' ); ?>
|
42 |
</a>
|
|
|
43 |
<a class="nav-tab" href="#gdpr">
|
44 |
-
<svg class="nav-tab-icon" xmlns="http://www.w3.org/2000/svg"
|
45 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
|
46 |
</svg>
|
47 |
|
48 |
<?php esc_html_e( 'GDPR', 'wp-maintenance-mode' ); ?>
|
49 |
-
</a>
|
50 |
</div>
|
51 |
|
52 |
<div class="tabs-content">
|
@@ -146,6 +218,7 @@ defined( 'ABSPATH' ) || exit;
|
|
146 |
<p class="description"><?php esc_html_e( 'Do you want to see notices when maintenance mode is activated?', 'wp-maintenance-mode' ); ?></p>
|
147 |
</td>
|
148 |
</tr>
|
|
|
149 |
<tr valign="top">
|
150 |
<th scope="row">
|
151 |
<label for="options[general][admin_link]"><?php esc_html_e( 'Dashboard link', 'wp-maintenance-mode' ); ?></label>
|
@@ -157,7 +230,7 @@ defined( 'ABSPATH' ) || exit;
|
|
157 |
</select>
|
158 |
<p class="description"><?php esc_html_e( 'Do you want to add a link to the dashboard on your maintenance mode page?', 'wp-maintenance-mode' ); ?></p>
|
159 |
</td>
|
160 |
-
</tr>
|
161 |
</tbody>
|
162 |
</table>
|
163 |
|
@@ -169,8 +242,108 @@ defined( 'ABSPATH' ) || exit;
|
|
169 |
|
170 |
<div id="tab-design" class="hidden">
|
171 |
<form action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="post">
|
172 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
<table class="form-table">
|
175 |
<tbody>
|
176 |
<tr valign="top">
|
@@ -280,14 +453,14 @@ defined( 'ABSPATH' ) || exit;
|
|
280 |
<td>
|
281 |
<input type="text" value="<?php echo esc_url( $this->plugin_settings['design']['bg_custom'] ); ?>" name="options[design][bg_custom]" class="background_url" />
|
282 |
<input
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
<p class="description"><?php esc_html_e( 'Backgrounds should have 1920x1280 px size.', 'wp-maintenance-mode' ); ?></p>
|
292 |
</td>
|
293 |
</tr>
|
@@ -299,11 +472,11 @@ defined( 'ABSPATH' ) || exit;
|
|
299 |
<?php
|
300 |
printf(
|
301 |
wp_kses(
|
302 |
-
|
303 |
__( '* source <a href="%s" target="_blank">Free Photos</a>', 'wp-maintenance-mode' ),
|
304 |
wpmm_translated_string_allowed_html()
|
305 |
),
|
306 |
-
esc_url( wpmm_get_utmized_url( 'https://themeisle.com/blog/wordpress-stock-photos/', array( '
|
307 |
);
|
308 |
?>
|
309 |
</p>
|
@@ -340,14 +513,19 @@ defined( 'ABSPATH' ) || exit;
|
|
340 |
</tbody>
|
341 |
</table>
|
342 |
|
343 |
-
<?php wpmm_form_hidden_fields( 'design' ); ?>
|
344 |
<input type="submit" value="<?php esc_attr_e( 'Save settings', 'wp-maintenance-mode' ); ?>" class="button button-primary" name="submit" />
|
345 |
<input type="button" value="<?php esc_attr_e( 'Reset settings', 'wp-maintenance-mode' ); ?>" class="button button-secondary reset_settings" data-tab="design" name="submit" />
|
|
|
|
|
|
|
|
|
|
|
346 |
</form>
|
347 |
</div>
|
348 |
|
349 |
<div id="tab-modules" class="hidden">
|
350 |
<form action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="post">
|
|
|
351 |
<h3>» <?php esc_html_e( 'Countdown', 'wp-maintenance-mode' ); ?></h3>
|
352 |
|
353 |
<table class="form-table">
|
@@ -580,6 +758,34 @@ defined( 'ABSPATH' ) || exit;
|
|
580 |
</tr>
|
581 |
</tbody>
|
582 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
583 |
|
584 |
<h3>» <?php esc_html_e( 'Google Analytics', 'wp-maintenance-mode' ); ?></h3>
|
585 |
|
@@ -609,7 +815,7 @@ defined( 'ABSPATH' ) || exit;
|
|
609 |
<?php
|
610 |
printf(
|
611 |
wp_kses(
|
612 |
-
|
613 |
__( 'Read about IP anonymization on <a href="%s" rel="noreferrer" target="_blank">Google Analytics</a> docs. It is always enabled on Google Analytics 4.', 'wp-maintenance-mode' ),
|
614 |
wpmm_translated_string_allowed_html()
|
615 |
),
|
@@ -636,6 +842,7 @@ defined( 'ABSPATH' ) || exit;
|
|
636 |
<input type="button" value="<?php esc_attr_e( 'Reset settings', 'wp-maintenance-mode' ); ?>" class="button button-secondary reset_settings" data-tab="modules" name="submit" />
|
637 |
</form>
|
638 |
</div>
|
|
|
639 |
<div id="tab-bot" class="hidden">
|
640 |
<form action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="post">
|
641 |
<table class="form-table">
|
@@ -673,14 +880,14 @@ defined( 'ABSPATH' ) || exit;
|
|
673 |
<td>
|
674 |
<input type="text" value="<?php echo esc_url( $this->plugin_settings['bot']['avatar'] ); ?>" name="options[bot][avatar]" id="options[bot][avatar]" class="avatar_url" />
|
675 |
<input
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
<p class="description"><?php esc_html_e( 'A 512 x 512 px will work just fine.', 'wp-maintenance-mode' ); ?></p>
|
685 |
</td>
|
686 |
</tr>
|
@@ -823,6 +1030,8 @@ defined( 'ABSPATH' ) || exit;
|
|
823 |
<input type="button" value="<?php esc_attr_e( 'Reset settings', 'wp-maintenance-mode' ); ?>" class="button button-secondary reset_settings" data-tab="bot" name="submit" />
|
824 |
</form>
|
825 |
</div>
|
|
|
|
|
826 |
<div id="tab-gdpr" class="hidden">
|
827 |
<form action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="post">
|
828 |
<table class="form-table">
|
@@ -898,10 +1107,10 @@ defined( 'ABSPATH' ) || exit;
|
|
898 |
<input type="submit" value="<?php esc_attr_e( 'Save settings', 'wp-maintenance-mode' ); ?>" class="button button-primary" name="submit" />
|
899 |
<input type="button" value="<?php esc_attr_e( 'Reset settings', 'wp-maintenance-mode' ); ?>" class="button button-secondary reset_settings" data-tab="gdpr" name="submit" />
|
900 |
</form>
|
901 |
-
</div>
|
902 |
</div>
|
903 |
</div>
|
904 |
|
905 |
-
<?php require_once 'sidebar.php'; ?>
|
906 |
</div>
|
907 |
</div>
|
6 |
*/
|
7 |
|
8 |
defined( 'ABSPATH' ) || exit;
|
9 |
+
|
10 |
+
$is_old_version = version_compare( $GLOBALS['wp_version'], '5.8', '<' );
|
11 |
?>
|
12 |
<div class="wrap">
|
13 |
+
<h2 class="wpmm-title"><?php echo esc_html( get_admin_page_title() ); ?>
|
14 |
+
<?php
|
15 |
+
if ( get_option( 'wpmm_fresh_install', false ) ) {
|
16 |
+
?>
|
17 |
+
<span id="wizard-exit"><img src="<?php echo esc_attr( WPMM_IMAGES_URL . 'external.svg' ); ?>" alt="exit"></span><?php } ?>
|
18 |
+
</h2>
|
19 |
|
20 |
<div class="wpmm-wrapper">
|
21 |
+
<?php
|
22 |
+
if ( get_option( 'wpmm_fresh_install', false ) ) {
|
23 |
+
$maintenance_slug = 'maintenance-modern';
|
24 |
+
$coming_soon_slug = 'coming-soon-modern';
|
25 |
+
|
26 |
+
$maintenance_thumbnail = WPMM_TEMPLATES_URL . 'maintenance/' . $maintenance_slug . '/screenshot.png';
|
27 |
+
$coming_soon_thumbnail = WPMM_TEMPLATES_URL . 'coming-soon/' . $coming_soon_slug . '/screenshot.png';
|
28 |
+
?>
|
29 |
+
<div id="wpmm-wizard-wrapper">
|
30 |
+
<div class="slider-wrap">
|
31 |
+
<div class="step-wrap">
|
32 |
+
<div class="step import-step">
|
33 |
+
<h4 class="header"><?php esc_html_e( 'Get started with a free template.', 'wp-maintenance-mode' ); ?></h4>
|
34 |
+
<p class="description"><?php esc_html_e( 'Just click on one of the pre-written templates below to get started. You can always edit and customize later, so these are a perfect starting point!', 'wp-maintenance-mode' ); ?></p>
|
35 |
+
<div class="templates-radio">
|
36 |
+
<form>
|
37 |
+
<div>
|
38 |
+
<h6 class="tag"><?php esc_html_e( 'Maintenance', 'wp-maintenance-mode' ); ?></h6>
|
39 |
+
<input id="<?php echo esc_attr( $maintenance_slug ); ?>" type="radio" name="wizard-template" value="<?php echo esc_attr( $maintenance_slug ); ?>" data-category="maintenance" checked="checked">
|
40 |
+
<label for="<?php echo esc_attr( $maintenance_slug ); ?>" class="template">
|
41 |
+
<img src="<?php echo esc_url( $maintenance_thumbnail ); ?>" alt="<?php echo esc_attr( $maintenance_slug ); ?>"/>
|
42 |
+
</label>
|
43 |
+
</div>
|
44 |
+
<div>
|
45 |
+
<h6 class="tag"><?php esc_html_e( 'Coming Soon', 'wp-maintenance-mode' ); ?></h6>
|
46 |
+
<input id="<?php echo esc_attr( $coming_soon_slug ); ?>" type="radio" name="wizard-template" value="<?php echo esc_attr( $coming_soon_slug ); ?>" data-category="coming-soon">
|
47 |
+
<label for="<?php echo esc_attr( $coming_soon_slug ); ?>" class="template">
|
48 |
+
<img src="<?php echo esc_url( $coming_soon_thumbnail ); ?>" alt="<?php echo esc_attr( $coming_soon_slug ); ?>"/>
|
49 |
+
</label>
|
50 |
+
</div>
|
51 |
+
</form>
|
52 |
+
</div>
|
53 |
+
<div id="wizard-import-button" class="import-button">
|
54 |
+
<input type="button" class="button button-big button-primary disabled button-import" value="<?php esc_html_e( 'Continue', 'wp-maintenance-mode' ); ?>"/>
|
55 |
+
</div>
|
56 |
+
<p class="import-text"><i><?php esc_html_e( 'This template uses Otter Blocks plugin which will be installed on import.', 'wp-maintenance-mode' ); ?></i></p>
|
57 |
+
</div>
|
58 |
+
</div>
|
59 |
+
<div class="step-wrap">
|
60 |
+
<div class="step subscribe-step" aria-hidden="true" style="display: none">
|
61 |
+
<img width="250px" src="<?php echo WPMM_IMAGES_URL . 'subscribe.svg'; ?>" alt="subscribe"/>
|
62 |
+
<h4><?php esc_html_e( 'Stay in the loop!', 'wp-maintenance-mode' ); ?></h4>
|
63 |
+
<p><?php esc_html_e( 'Keep up with feature announcements, promotions, tutorials, and new template releases.', 'wp-maintenance-mode' ); ?></p>
|
64 |
+
<div id="email-input-wrap">
|
65 |
+
<input type="text" value="<?php echo esc_attr( get_bloginfo( 'admin_email' ) ); ?>" />
|
66 |
+
<input type="button" class="button button-primary button-big subscribe-button" value="<?php esc_attr_e( 'Sign me up', 'wp-maintenance-mode' ); ?>" />
|
67 |
+
</div>
|
68 |
+
<input id="skip-subscribe" type="button" class="button button-link skip-link" value="<?php esc_attr_e( 'I\'ll skip for now, thanks!', 'wp-maintenance-mode' ); ?>" />
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
<div class="step-wrap">
|
72 |
+
<div class="step finish-step" aria-hidden="true" style="display: none">
|
73 |
+
<img width="250px" src="<?php echo WPMM_IMAGES_URL . 'finish-setup.svg'; ?>" alt="finish-setup"/>
|
74 |
+
<h4 class="heading"><?php esc_html_e( 'Your page is ready!', 'wp-maintenance-mode' ); ?></h4>
|
75 |
+
<p><?php esc_html_e( 'Head over to the settings page to activate your Coming soon page', 'wp-maintenance-mode' ); ?></p>
|
76 |
+
<div class="buttons-wrap">
|
77 |
+
<input id="view-page-button" type="button" class="button-big button" value="<?php esc_attr_e( 'View page', 'wp-maintenance-mode' ); ?>"/>
|
78 |
+
<input id="refresh-button" type="button" class="button-big button button-primary" value="<?php esc_attr_e( 'Go to settings', 'wp-maintenance-mode' ); ?>"/>
|
79 |
+
</div>
|
80 |
+
</div>
|
81 |
+
</div>
|
82 |
+
</div>
|
83 |
+
</div>
|
84 |
+
<?php } else { ?>
|
85 |
<div id="content" class="wrapper-cell">
|
86 |
<div class="nav-tab-wrapper">
|
87 |
<a class="nav-tab nav-tab-active" href="#general">
|
88 |
+
<svg class="nav-tab-icon h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
89 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4" />
|
90 |
</svg>
|
91 |
|
92 |
<?php esc_html_e( 'General', 'wp-maintenance-mode' ); ?>
|
93 |
</a>
|
94 |
<a class="nav-tab" href="#design">
|
95 |
+
<svg class="nav-tab-icon h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
96 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z" />
|
97 |
</svg>
|
98 |
|
99 |
<?php esc_html_e( 'Design', 'wp-maintenance-mode' ); ?></a>
|
100 |
<a class="nav-tab" href="#modules">
|
101 |
+
<svg class="nav-tab-icon h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
102 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 14v6m-3-3h6M6 10h2a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2zm10 0h2a2 2 0 002-2V6a2 2 0 00-2-2h-2a2 2 0 00-2 2v2a2 2 0 002 2zM6 20h2a2 2 0 002-2v-2a2 2 0 00-2-2H6a2 2 0 00-2 2v2a2 2 0 002 2z" />
|
103 |
</svg>
|
104 |
|
105 |
<?php esc_html_e( 'Modules', 'wp-maintenance-mode' ); ?>
|
106 |
</a>
|
107 |
<a class="nav-tab" href="#bot">
|
108 |
+
<svg class="nav-tab-icon h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
109 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z" />
|
110 |
</svg>
|
111 |
|
112 |
<?php esc_html_e( 'Manage Bot', 'wp-maintenance-mode' ); ?>
|
113 |
</a>
|
114 |
+
<?php if ( ! get_option( 'wpmm_new_look' ) ) { ?>
|
115 |
<a class="nav-tab" href="#gdpr">
|
116 |
+
<svg class="nav-tab-icon h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
117 |
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
|
118 |
</svg>
|
119 |
|
120 |
<?php esc_html_e( 'GDPR', 'wp-maintenance-mode' ); ?>
|
121 |
+
</a> <?php } ?>
|
122 |
</div>
|
123 |
|
124 |
<div class="tabs-content">
|
218 |
<p class="description"><?php esc_html_e( 'Do you want to see notices when maintenance mode is activated?', 'wp-maintenance-mode' ); ?></p>
|
219 |
</td>
|
220 |
</tr>
|
221 |
+
<?php if ( ! get_option( 'wpmm_new_look' ) ) { ?>
|
222 |
<tr valign="top">
|
223 |
<th scope="row">
|
224 |
<label for="options[general][admin_link]"><?php esc_html_e( 'Dashboard link', 'wp-maintenance-mode' ); ?></label>
|
230 |
</select>
|
231 |
<p class="description"><?php esc_html_e( 'Do you want to add a link to the dashboard on your maintenance mode page?', 'wp-maintenance-mode' ); ?></p>
|
232 |
</td>
|
233 |
+
</tr> <?php } ?>
|
234 |
</tbody>
|
235 |
</table>
|
236 |
|
242 |
|
243 |
<div id="tab-design" class="hidden">
|
244 |
<form action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="post">
|
245 |
+
<?php
|
246 |
+
if ( get_option( 'wpmm_new_look' ) ) {
|
247 |
+
if ( ( ! get_post( $this->plugin_settings['design']['page_id'] ) || get_post_status( $this->plugin_settings['design']['page_id'] ) === 'trash' ) && $this->plugin_settings['general']['status'] === 1 ) {
|
248 |
+
?>
|
249 |
+
<p class="notice notice-error"><?php esc_html_e( 'You don\'t have a maintenance page or your Maintenance Page has been deleted. Please select another one from the dropdown below or import a template and a new one will be created.', 'wp-maintenance-mode' ); ?></p><?php } ?>
|
250 |
+
<table class="form-table">
|
251 |
+
<tbody>
|
252 |
+
<tr valign="top">
|
253 |
+
<th scope="row">
|
254 |
+
<label for="design_page_id"><?php esc_html_e( 'Select page', 'wp-maintenance-mode' ); ?></label>
|
255 |
+
</th>
|
256 |
+
<td>
|
257 |
+
<?php
|
258 |
+
wp_dropdown_pages(
|
259 |
+
array(
|
260 |
+
'selected' => $this->plugin_settings['design']['page_id'],
|
261 |
+
'name' => 'options[design][page_id]',
|
262 |
+
'id' => 'design_page_id',
|
263 |
+
'option_none_value' => '',
|
264 |
+
'show_option_no_change' => 'Select page',
|
265 |
+
'post_status' => array( 'publish', 'private' ),
|
266 |
+
)
|
267 |
+
);
|
268 |
+
|
269 |
+
$page_status = get_post_status( $this->plugin_settings['design']['page_id'] );
|
270 |
+
if ( $page_status && $page_status !== 'trash' ) {
|
271 |
+
?>
|
272 |
+
<a href="<?php echo get_edit_post_link( $this->plugin_settings['design']['page_id'] ); ?>"><?php esc_html_e( 'Edit page', 'wp-maintenance-mode' ); ?></a> <?php } ?>
|
273 |
+
<p class="description"><?php esc_html_e( 'Select the page that will be used as your maintenance or coming soon page', 'wp-maintenance-mode' ); ?></p>
|
274 |
+
</td>
|
275 |
+
</tr>
|
276 |
+
</tbody>
|
277 |
+
</table>
|
278 |
+
<table class="form-table">
|
279 |
+
<tbody>
|
280 |
+
<tr valign="top">
|
281 |
+
<th scope="row">
|
282 |
+
<label for="dashboard-template"><?php esc_html_e( 'Pick a template', 'wp-maintenance-mode' ); ?></label>
|
283 |
+
</th>
|
284 |
+
<td class="category-select-wrap">
|
285 |
+
<select name="options[design][template_category]" id="template-category">
|
286 |
+
<option value="all"<?php selected( $this->plugin_settings['design']['template_category'], 'all' ); ?>><?php esc_html_e( 'All Templates', 'wp-maintenance-mode' ); ?></option>
|
287 |
+
<option value="coming-soon"<?php selected( $this->plugin_settings['design']['template_category'], 'coming-soon' ); ?>><?php esc_html_e( 'Coming Soon', 'wp-maintenance-mode' ); ?></option>
|
288 |
+
<option value="maintenance"<?php selected( $this->plugin_settings['design']['template_category'], 'predefined' ); ?>><?php esc_html_e( 'Maintenance Mode', 'wp-maintenance-mode' ); ?></option>
|
289 |
+
</select>
|
290 |
+
</td>
|
291 |
+
</tr>
|
292 |
+
</tbody>
|
293 |
+
</table>
|
294 |
+
<?php if ( $is_old_version ) { ?>
|
295 |
+
<p class="description"><i><?php echo __( '<b>Note</b>: You need at least WP 5.8 to use new generation maintenance pages.', 'wp-maintenance-mode' ); ?></i></p>
|
296 |
+
<?php } else { ?>
|
297 |
+
<p class="description"><?php esc_html_e( 'Pick one of our starter templates for your maintenance or coming soon page. You can always customize them based on your needs. Stay in the loop for more templates!', 'wp-maintenance-mode' ); ?></p>
|
298 |
+
<br/>
|
299 |
+
<p class="description"><i><?php esc_html_e( 'This templates use Otter Blocks plugin which will be installed on import.', 'wp-maintenance-mode' ); ?></i></p>
|
300 |
+
<?php } ?>
|
301 |
+
<div class="templates">
|
302 |
+
<?php
|
303 |
+
if ( ! isset( $this->plugin_settings['design']['template_category'] ) ) {
|
304 |
+
$this->plugin_settings['design']['template_category'] = 'all';
|
305 |
+
update_option( 'wpmm_settings', $this->plugin_settings );
|
306 |
+
}
|
307 |
|
308 |
+
$selected_category = $this->plugin_settings['design']['template_category'];
|
309 |
+
$categories = array();
|
310 |
+
|
311 |
+
if ( $selected_category === 'maintenance' || $selected_category === 'all' ) {
|
312 |
+
$categories['maintenance'] = __( 'Maintenance', 'wp-maintenance-mode' );
|
313 |
+
}
|
314 |
+
|
315 |
+
if ( $selected_category === 'coming-soon' || $selected_category === 'all' ) {
|
316 |
+
$categories['coming-soon'] = __( 'Coming Soon', 'wp-maintenance-mode' );
|
317 |
+
}
|
318 |
+
|
319 |
+
$will_replace = ! ( ! get_post( $this->plugin_settings['design']['page_id'] ) ||
|
320 |
+
empty( trim( get_post( $this->plugin_settings['design']['page_id'] )->post_content ) ) ||
|
321 |
+
get_post( $this->plugin_settings['design']['page_id'] )->post_status === 'trash' );
|
322 |
+
|
323 |
+
foreach ( $categories as $category => $label ) {
|
324 |
+
$templates = list_files( WPMM_TEMPLATES_PATH . $category . '/', 1 );
|
325 |
+
foreach ( $templates as $template ) {
|
326 |
+
$name = basename( $template );
|
327 |
+
$thumbnail = WPMM_TEMPLATES_URL . $category . '/' . $name . '/screenshot.png';
|
328 |
+
$content = WPMM_TEMPLATES_PATH . $category . '/' . $name . '/blocks-export.json';
|
329 |
+
|
330 |
+
$template_label = json_decode( file_get_contents( $content ) )->label;
|
331 |
+
?>
|
332 |
+
<div class="template-wrap">
|
333 |
+
<div class="template-image-wrap <?php echo $is_old_version ? '' : 'can-import'; ?>">
|
334 |
+
<img src="<?php echo $thumbnail; ?>" alt="<?php echo $name; ?>"/>
|
335 |
+
<?php if ( ! $is_old_version ) { ?>
|
336 |
+
<button type="button" class="button button-primary button-import" data-tab="design" data-slug="<?php echo esc_attr( $name ); ?>" data-category="<?php echo esc_attr( $category ); ?>" data-replace="<?php echo (int) $will_replace; ?>"><?php esc_html_e( 'Import template', 'wp-maintenance-mode' ); ?></button>
|
337 |
+
<?php } ?>
|
338 |
+
</div>
|
339 |
+
<p class="description"><?php echo $template_label; ?></p>
|
340 |
+
</div>
|
341 |
+
<?php
|
342 |
+
}
|
343 |
+
}
|
344 |
+
?>
|
345 |
+
</div>
|
346 |
+
<?php } else { /* legacy code */ ?>
|
347 |
<table class="form-table">
|
348 |
<tbody>
|
349 |
<tr valign="top">
|
453 |
<td>
|
454 |
<input type="text" value="<?php echo esc_url( $this->plugin_settings['design']['bg_custom'] ); ?>" name="options[design][bg_custom]" class="background_url" />
|
455 |
<input
|
456 |
+
type="button"
|
457 |
+
value="<?php echo esc_attr_x( 'Upload', 'upload background button', 'wp-maintenance-mode' ); ?>"
|
458 |
+
class="button image_uploader_trigger"
|
459 |
+
data-name="background"
|
460 |
+
data-title="<?php esc_attr_e( 'Upload Background', 'wp-maintenance-mode' ); ?>"
|
461 |
+
data-button-text="<?php esc_attr_e( 'Choose Background', 'wp-maintenance-mode' ); ?>"
|
462 |
+
data-to-selector=".background_url"
|
463 |
+
/>
|
464 |
<p class="description"><?php esc_html_e( 'Backgrounds should have 1920x1280 px size.', 'wp-maintenance-mode' ); ?></p>
|
465 |
</td>
|
466 |
</tr>
|
472 |
<?php
|
473 |
printf(
|
474 |
wp_kses(
|
475 |
+
/* translators: free photos url */
|
476 |
__( '* source <a href="%s" target="_blank">Free Photos</a>', 'wp-maintenance-mode' ),
|
477 |
wpmm_translated_string_allowed_html()
|
478 |
),
|
479 |
+
esc_url( wpmm_get_utmized_url( 'https://themeisle.com/blog/wordpress-stock-photos/', array( 'campaign' => 'settings' ) ) )
|
480 |
);
|
481 |
?>
|
482 |
</p>
|
513 |
</tbody>
|
514 |
</table>
|
515 |
|
|
|
516 |
<input type="submit" value="<?php esc_attr_e( 'Save settings', 'wp-maintenance-mode' ); ?>" class="button button-primary" name="submit" />
|
517 |
<input type="button" value="<?php esc_attr_e( 'Reset settings', 'wp-maintenance-mode' ); ?>" class="button button-secondary reset_settings" data-tab="design" name="submit" />
|
518 |
+
|
519 |
+
<?php
|
520 |
+
} /* end of legacy code */
|
521 |
+
wpmm_form_hidden_fields( 'design' );
|
522 |
+
?>
|
523 |
</form>
|
524 |
</div>
|
525 |
|
526 |
<div id="tab-modules" class="hidden">
|
527 |
<form action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="post">
|
528 |
+
<?php if ( ! get_option( 'wpmm_new_look' ) ) { ?>
|
529 |
<h3>» <?php esc_html_e( 'Countdown', 'wp-maintenance-mode' ); ?></h3>
|
530 |
|
531 |
<table class="form-table">
|
758 |
</tr>
|
759 |
</tbody>
|
760 |
</table>
|
761 |
+
<?php } ?>
|
762 |
+
|
763 |
+
<h3>» <?php esc_html_e( 'Subscribe', 'wp-maintenance-mode' ); ?></h3>
|
764 |
+
|
765 |
+
<table class="form-table">
|
766 |
+
<tbody>
|
767 |
+
<tr valign="top">
|
768 |
+
<th scope="row">
|
769 |
+
<label for="options[modules][stats]"><?php esc_html_e( 'Stats', 'wp-maintenance-mode' ); ?></label>
|
770 |
+
</th>
|
771 |
+
<td id="subscribers_wrap">
|
772 |
+
<?php
|
773 |
+
$subscribers_no = wpmm_get_subscribers_count();
|
774 |
+
|
775 |
+
/* translators: number of subscribers */
|
776 |
+
echo esc_html( sprintf( _nx( 'You have %d subscriber', 'You have %d subscribers', $subscribers_no, 'settings page', 'wp-maintenance-mode' ), $subscribers_no ) );
|
777 |
+
|
778 |
+
if ( current_user_can( wpmm_get_capability( 'subscribers' ) ) && $subscribers_no > 0 ) {
|
779 |
+
?>
|
780 |
+
<div class="buttons">
|
781 |
+
<a class="button button-primary" id="subscribers-export" href="javascript:void(0);"><?php esc_html_e( 'Export as CSV', 'wp-maintenance-mode' ); ?></a>
|
782 |
+
<a class="button button-secondary" id="subscribers-empty-list" href="javascript:void(0);"><?php esc_html_e( 'Empty subscribers list', 'wp-maintenance-mode' ); ?></a>
|
783 |
+
</div>
|
784 |
+
<?php } ?>
|
785 |
+
</td>
|
786 |
+
</tr>
|
787 |
+
</tbody>
|
788 |
+
</table>
|
789 |
|
790 |
<h3>» <?php esc_html_e( 'Google Analytics', 'wp-maintenance-mode' ); ?></h3>
|
791 |
|
815 |
<?php
|
816 |
printf(
|
817 |
wp_kses(
|
818 |
+
/* translators: Google Analytics documentation url */
|
819 |
__( 'Read about IP anonymization on <a href="%s" rel="noreferrer" target="_blank">Google Analytics</a> docs. It is always enabled on Google Analytics 4.', 'wp-maintenance-mode' ),
|
820 |
wpmm_translated_string_allowed_html()
|
821 |
),
|
842 |
<input type="button" value="<?php esc_attr_e( 'Reset settings', 'wp-maintenance-mode' ); ?>" class="button button-secondary reset_settings" data-tab="modules" name="submit" />
|
843 |
</form>
|
844 |
</div>
|
845 |
+
|
846 |
<div id="tab-bot" class="hidden">
|
847 |
<form action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="post">
|
848 |
<table class="form-table">
|
880 |
<td>
|
881 |
<input type="text" value="<?php echo esc_url( $this->plugin_settings['bot']['avatar'] ); ?>" name="options[bot][avatar]" id="options[bot][avatar]" class="avatar_url" />
|
882 |
<input
|
883 |
+
type="button"
|
884 |
+
value="<?php echo esc_attr_x( 'Upload', 'upload avatar button', 'wp-maintenance-mode' ); ?>"
|
885 |
+
class="button image_uploader_trigger"
|
886 |
+
data-name="avatar"
|
887 |
+
data-title="<?php esc_attr_e( 'Upload Avatar', 'wp-maintenance-mode' ); ?>"
|
888 |
+
data-button-text="<?php esc_attr_e( 'Choose picture', 'wp-maintenance-mode' ); ?>"
|
889 |
+
data-to-selector=".avatar_url"
|
890 |
+
/>
|
891 |
<p class="description"><?php esc_html_e( 'A 512 x 512 px will work just fine.', 'wp-maintenance-mode' ); ?></p>
|
892 |
</td>
|
893 |
</tr>
|
1030 |
<input type="button" value="<?php esc_attr_e( 'Reset settings', 'wp-maintenance-mode' ); ?>" class="button button-secondary reset_settings" data-tab="bot" name="submit" />
|
1031 |
</form>
|
1032 |
</div>
|
1033 |
+
|
1034 |
+
<?php if ( ! get_option( 'wpmm_new_look' ) ) { ?>
|
1035 |
<div id="tab-gdpr" class="hidden">
|
1036 |
<form action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>" method="post">
|
1037 |
<table class="form-table">
|
1107 |
<input type="submit" value="<?php esc_attr_e( 'Save settings', 'wp-maintenance-mode' ); ?>" class="button button-primary" name="submit" />
|
1108 |
<input type="button" value="<?php esc_attr_e( 'Reset settings', 'wp-maintenance-mode' ); ?>" class="button button-secondary reset_settings" data-tab="gdpr" name="submit" />
|
1109 |
</form>
|
1110 |
+
</div> <?php } ?>
|
1111 |
</div>
|
1112 |
</div>
|
1113 |
|
1114 |
+
<?php require_once 'sidebar.php'; } ?>
|
1115 |
</div>
|
1116 |
</div>
|
views/sidebar.php
CHANGED
@@ -20,9 +20,9 @@ defined( 'ABSPATH' ) || exit;
|
|
20 |
?>
|
21 |
</li>
|
22 |
<li><?php esc_html_e( 'Author', 'wp-maintenance-mode' ); ?>: <?php echo ! empty( $plugin_data['AuthorName'] ) ? esc_html( $plugin_data['AuthorName'] ) : ''; ?></li>
|
23 |
-
<li><?php esc_html_e( 'Website', 'wp-maintenance-mode' ); ?>: <?php echo ! empty( $plugin_data['AuthorURI'] ) ? '<a href="' . esc_url( wpmm_get_utmized_url( $plugin_data['AuthorURI'], array( '
|
24 |
<li><?php esc_html_e( 'Twitter', 'wp-maintenance-mode' ); ?>: <?php echo ! empty( $plugin_data['Twitter'] ) ? '<a href="' . esc_url( 'https://twitter.com/' . $plugin_data['Twitter'] ) . '" target="_blank">@' . esc_html( $plugin_data['Twitter'] ) . '</a>' : ''; ?></li>
|
25 |
-
<li><?php esc_html_e( 'GitHub', 'wp-maintenance-mode' ); ?>: <?php echo ! empty( $plugin_data['GitHub Plugin URI'] ) ? '<a href="' . esc_url( wpmm_get_utmized_url( $plugin_data['GitHub Plugin URI'], array( '
|
26 |
</ul>
|
27 |
</div>
|
28 |
</div>
|
@@ -41,7 +41,13 @@ defined( 'ABSPATH' ) || exit;
|
|
41 |
$item['image'] = wpmm_get_banner_url( $item['image'] );
|
42 |
|
43 |
if ( $item['utm'] ) {
|
44 |
-
$item['link'] = wpmm_get_utmized_url(
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
}
|
46 |
|
47 |
printf( '<li><a href="%s" target="_blank" title="%s"><img src="%s" alt="%s" width="280" height="160" /></a></li>', esc_url( $item['link'] ), esc_attr( $item['title'] ), esc_url( $item['image'] ), esc_attr( $item['title'] ) );
|
20 |
?>
|
21 |
</li>
|
22 |
<li><?php esc_html_e( 'Author', 'wp-maintenance-mode' ); ?>: <?php echo ! empty( $plugin_data['AuthorName'] ) ? esc_html( $plugin_data['AuthorName'] ) : ''; ?></li>
|
23 |
+
<li><?php esc_html_e( 'Website', 'wp-maintenance-mode' ); ?>: <?php echo ! empty( $plugin_data['AuthorURI'] ) ? '<a href="' . esc_url( wpmm_get_utmized_url( $plugin_data['AuthorURI'], array( 'campaign' => 'plugininfo' ) ) ) . '" target="_blank">' . esc_html( $plugin_data['AuthorName'] ) . '</a>' : ''; ?></li>
|
24 |
<li><?php esc_html_e( 'Twitter', 'wp-maintenance-mode' ); ?>: <?php echo ! empty( $plugin_data['Twitter'] ) ? '<a href="' . esc_url( 'https://twitter.com/' . $plugin_data['Twitter'] ) . '" target="_blank">@' . esc_html( $plugin_data['Twitter'] ) . '</a>' : ''; ?></li>
|
25 |
+
<li><?php esc_html_e( 'GitHub', 'wp-maintenance-mode' ); ?>: <?php echo ! empty( $plugin_data['GitHub Plugin URI'] ) ? '<a href="' . esc_url( wpmm_get_utmized_url( $plugin_data['GitHub Plugin URI'], array( 'campaign' => 'plugininfo' ) ) ) . '" target="_blank">' . esc_html( basename( $plugin_data['GitHub Plugin URI'] ) ) . '</a>' : ''; ?></li>
|
26 |
</ul>
|
27 |
</div>
|
28 |
</div>
|
41 |
$item['image'] = wpmm_get_banner_url( $item['image'] );
|
42 |
|
43 |
if ( $item['utm'] ) {
|
44 |
+
$item['link'] = wpmm_get_utmized_url(
|
45 |
+
$item['link'],
|
46 |
+
array(
|
47 |
+
'campaign' => 'recommended',
|
48 |
+
'content' => sanitize_key( $item['title'] ),
|
49 |
+
)
|
50 |
+
);
|
51 |
}
|
52 |
|
53 |
printf( '<li><a href="%s" target="_blank" title="%s"><img src="%s" alt="%s" width="280" height="160" /></a></li>', esc_url( $item['link'] ), esc_attr( $item['title'] ), esc_url( $item['image'] ), esc_attr( $item['title'] ) );
|
views/wpmm-page-template.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template Name: Full Width for Maintenance Page
|
4 |
+
*/
|
5 |
+
|
6 |
+
?><!DOCTYPE html>
|
7 |
+
<html <?php language_attributes(); ?>>
|
8 |
+
<head>
|
9 |
+
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
10 |
+
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
11 |
+
<link rel="profile" href="http://gmpg.org/xfn/11">
|
12 |
+
<?php do_action( 'wpmm_head' ); ?>
|
13 |
+
<?php wp_head(); ?>
|
14 |
+
</head>
|
15 |
+
<body <?php body_class(); ?>>
|
16 |
+
<?php
|
17 |
+
wp_body_open();
|
18 |
+
|
19 |
+
the_post();
|
20 |
+
the_content();
|
21 |
+
|
22 |
+
$settings = WP_Maintenance_Mode::get_instance()->get_plugin_settings();
|
23 |
+
if ( isset( $settings['bot']['status'] ) && $settings['bot']['status'] === 1 ) {
|
24 |
+
?>
|
25 |
+
<div class="bot-container">
|
26 |
+
<div class="bot-avatar"><div class="avatar-notice"></div></div>
|
27 |
+
<div class="bot-chat-wrapper" style="display: none">
|
28 |
+
<div class="chat-container cf"></div>
|
29 |
+
<div class="input"></div>
|
30 |
+
<div class="choices cf"></div>
|
31 |
+
</div>
|
32 |
+
</div>
|
33 |
+
<div class="bot-error"><p></p></div>
|
34 |
+
<div class="wrap under-bot">
|
35 |
+
<?php
|
36 |
+
}
|
37 |
+
?>
|
38 |
+
|
39 |
+
<script type='text/javascript'>
|
40 |
+
var wpmmVars = {"ajaxURL": "<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>"};
|
41 |
+
</script>
|
42 |
+
|
43 |
+
<?php
|
44 |
+
wp_footer();
|
45 |
+
do_action( 'wpmm_footer' );
|
46 |
+
?>
|
47 |
+
</body>
|
48 |
+
</html>
|
wp-maintenance-mode.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* Plugin Name: WP Maintenance Mode & Coming Soon
|
6 |
* Description: Adds a splash page to your site that lets visitors know your site is down for maintenance. It's perfect for a coming soon page.
|
7 |
-
* Version: 2.
|
8 |
* Author: Themeisle
|
9 |
* Author URI: https://themeisle.com/
|
10 |
* Twitter: themeisle
|
@@ -28,6 +28,7 @@ define( 'WPMM_FUNCTIONS_PATH', WPMM_PATH . 'includes/functions/' );
|
|
28 |
define( 'WPMM_LANGUAGES_PATH', basename( WPMM_PATH ) . '/languages/' );
|
29 |
define( 'WPMM_VIEWS_PATH', WPMM_PATH . 'views/' );
|
30 |
define( 'WPMM_CSS_PATH', WPMM_PATH . 'assets/css/' );
|
|
|
31 |
|
32 |
/**
|
33 |
* DEFINE URLS
|
@@ -36,6 +37,7 @@ define( 'WPMM_URL', plugin_dir_url( __FILE__ ) );
|
|
36 |
define( 'WPMM_JS_URL', WPMM_URL . 'assets/js/' );
|
37 |
define( 'WPMM_CSS_URL', WPMM_URL . 'assets/css/' );
|
38 |
define( 'WPMM_IMAGES_URL', WPMM_URL . 'assets/images/' );
|
|
|
39 |
|
40 |
/**
|
41 |
* OTHER DEFINES
|
@@ -88,3 +90,10 @@ $autoload_path = __DIR__ . '/vendor/autoload.php';
|
|
88 |
if ( is_file( $autoload_path ) ) {
|
89 |
require_once $autoload_path;
|
90 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
*
|
5 |
* Plugin Name: WP Maintenance Mode & Coming Soon
|
6 |
* Description: Adds a splash page to your site that lets visitors know your site is down for maintenance. It's perfect for a coming soon page.
|
7 |
+
* Version: 2.5.0
|
8 |
* Author: Themeisle
|
9 |
* Author URI: https://themeisle.com/
|
10 |
* Twitter: themeisle
|
28 |
define( 'WPMM_LANGUAGES_PATH', basename( WPMM_PATH ) . '/languages/' );
|
29 |
define( 'WPMM_VIEWS_PATH', WPMM_PATH . 'views/' );
|
30 |
define( 'WPMM_CSS_PATH', WPMM_PATH . 'assets/css/' );
|
31 |
+
define( 'WPMM_TEMPLATES_PATH', WPMM_PATH . 'assets/templates/' );
|
32 |
|
33 |
/**
|
34 |
* DEFINE URLS
|
37 |
define( 'WPMM_JS_URL', WPMM_URL . 'assets/js/' );
|
38 |
define( 'WPMM_CSS_URL', WPMM_URL . 'assets/css/' );
|
39 |
define( 'WPMM_IMAGES_URL', WPMM_URL . 'assets/images/' );
|
40 |
+
define( 'WPMM_TEMPLATES_URL', WPMM_URL . 'assets/templates/' );
|
41 |
|
42 |
/**
|
43 |
* OTHER DEFINES
|
90 |
if ( is_file( $autoload_path ) ) {
|
91 |
require_once $autoload_path;
|
92 |
}
|
93 |
+
|
94 |
+
add_filter(
|
95 |
+
'wp_maintenance_mode_load_promotions',
|
96 |
+
function() {
|
97 |
+
return array( 'otter' );
|
98 |
+
}
|
99 |
+
);
|