Version Description
- 2017/09/18
- big UX improvements and more coming soon
- redesigned admin bar menu
- added favicon to all themes
- fixed Skype icon; it got broken in v2.40
- minor code improvements
Download this release
Release Info
Developer | WebFactory |
Plugin | Under Construction |
Version | 2.55 |
Comparing to | |
See all releases |
Code changes from version 2.50 to 2.55
- css/ucp-admin.css +154 -51
- images/ucp_icon.png +0 -0
- images/ucp_icon_disabled.png +0 -0
- images/ucp_icon_enabled.png +0 -0
- images/ucp_pro_logo.png +0 -0
- js/ucp-admin.js +73 -10
- readme.txt +9 -1
- themes/css/common.css +5 -0
- themes/images/favicon.png +0 -0
- under-construction.php +212 -56
css/ucp-admin.css
CHANGED
@@ -83,7 +83,8 @@ p.submit {
|
|
83 |
}
|
84 |
|
85 |
div.ucp-thumb, .ucp-thumb-special {
|
86 |
-
width: 300px;
|
|
|
87 |
margin: 0 10px 5px 0;
|
88 |
display: inline-block;
|
89 |
text-align: center;
|
@@ -148,6 +149,7 @@ input.datepicker {
|
|
148 |
-moz-border-radius: 0;
|
149 |
-webkit-border-radius: 0;
|
150 |
border: 1px solid silver;
|
|
|
151 |
}
|
152 |
|
153 |
.settings_page_ucp .AnyTime-pkr .AnyTime-hdr {
|
@@ -358,6 +360,7 @@ span.select2-container .select2-search--inline .select2-search__field {
|
|
358 |
padding: 0;
|
359 |
text-align: center;
|
360 |
letter-spacing: .5px;
|
|
|
361 |
}
|
362 |
|
363 |
.settings_page_ucp .ui-tabs ul.ui-tabs-nav li .label {
|
@@ -389,6 +392,14 @@ span.select2-container .select2-search--inline .select2-search__field {
|
|
389 |
-webkit-box-shadow: none;
|
390 |
}
|
391 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
392 |
@media screen and (max-width: 782px) {
|
393 |
.settings_page_ucp .ui-tabs .ui-tabs-nav li a {
|
394 |
padding: 5px 10px;
|
@@ -400,56 +411,6 @@ span.select2-container .select2-search--inline .select2-search__field {
|
|
400 |
|
401 |
/* tabs */
|
402 |
|
403 |
-
/* on/off switch */
|
404 |
-
|
405 |
-
.onoffswitch {
|
406 |
-
position: relative; width: 90px;
|
407 |
-
-webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
|
408 |
-
}
|
409 |
-
.onoffswitch .onoffswitch-checkbox {
|
410 |
-
display: none;
|
411 |
-
}
|
412 |
-
.onoffswitch-label {
|
413 |
-
display: block; overflow: hidden; cursor: pointer;
|
414 |
-
border: 2px solid #999999; border-radius: 20px;
|
415 |
-
}
|
416 |
-
.onoffswitch-inner {
|
417 |
-
display: block; width: 200%; margin-left: -100%;
|
418 |
-
transition: margin 0.3s ease-in 0s;
|
419 |
-
}
|
420 |
-
.onoffswitch-inner:before, .onoffswitch-inner:after {
|
421 |
-
display: block; float: left; width: 50%; height: 30px; padding: 0; line-height: 30px;
|
422 |
-
font-size: 14px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold;
|
423 |
-
box-sizing: border-box;
|
424 |
-
}
|
425 |
-
.onoffswitch-inner:before {
|
426 |
-
content: "ON";
|
427 |
-
padding-left: 10px;
|
428 |
-
background-color: #008EC2; color: #FFFFFF;
|
429 |
-
}
|
430 |
-
.onoffswitch-inner:after {
|
431 |
-
content: "OFF";
|
432 |
-
padding-right: 10px;
|
433 |
-
background-color: #EEEEEE; color: #999999;
|
434 |
-
text-align: right;
|
435 |
-
}
|
436 |
-
.onoffswitch-switch {
|
437 |
-
display: block; width: 18px; margin: 6px;
|
438 |
-
background: #FFFFFF;
|
439 |
-
position: absolute; top: 0; bottom: 0;
|
440 |
-
right: 56px;
|
441 |
-
border: 2px solid #999999; border-radius: 20px;
|
442 |
-
transition: all 0.3s ease-in 0s;
|
443 |
-
}
|
444 |
-
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
|
445 |
-
margin-left: 0;
|
446 |
-
}
|
447 |
-
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
|
448 |
-
right: 0px;
|
449 |
-
}
|
450 |
-
|
451 |
-
/* on/off switch */
|
452 |
-
|
453 |
|
454 |
/* anytime.5.1.2.min.css
|
455 |
Copyright 2008-2015 Andrew M. Andrews III.
|
@@ -478,4 +439,146 @@ Any+Time is a trademark of Andrew M. Andrews III */
|
|
478 |
-webkit-transform: rotate(359deg);
|
479 |
transform: rotate(359deg);
|
480 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
481 |
}
|
83 |
}
|
84 |
|
85 |
div.ucp-thumb, .ucp-thumb-special {
|
86 |
+
max-width: 300px;
|
87 |
+
width: calc(31% - 20px);
|
88 |
margin: 0 10px 5px 0;
|
89 |
display: inline-block;
|
90 |
text-align: center;
|
149 |
-moz-border-radius: 0;
|
150 |
-webkit-border-radius: 0;
|
151 |
border: 1px solid silver;
|
152 |
+
z-index: 99;
|
153 |
}
|
154 |
|
155 |
.settings_page_ucp .AnyTime-pkr .AnyTime-hdr {
|
360 |
padding: 0;
|
361 |
text-align: center;
|
362 |
letter-spacing: .5px;
|
363 |
+
min-width: 105px;
|
364 |
}
|
365 |
|
366 |
.settings_page_ucp .ui-tabs ul.ui-tabs-nav li .label {
|
392 |
-webkit-box-shadow: none;
|
393 |
}
|
394 |
|
395 |
+
#ucp_tabs li span.dashicons-star-filled {
|
396 |
+
color: #FFC107;
|
397 |
+
}
|
398 |
+
|
399 |
+
.ucp-tab-content {
|
400 |
+
max-width: 1050px;
|
401 |
+
}
|
402 |
+
|
403 |
@media screen and (max-width: 782px) {
|
404 |
.settings_page_ucp .ui-tabs .ui-tabs-nav li a {
|
405 |
padding: 5px 10px;
|
411 |
|
412 |
/* tabs */
|
413 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
|
415 |
/* anytime.5.1.2.min.css
|
416 |
Copyright 2008-2015 Andrew M. Andrews III.
|
439 |
-webkit-transform: rotate(359deg);
|
440 |
transform: rotate(359deg);
|
441 |
}
|
442 |
+
}
|
443 |
+
|
444 |
+
|
445 |
+
.toggle-wrapper {
|
446 |
+
position: relative;
|
447 |
+
overflow: hidden;
|
448 |
+
display: inline-block;
|
449 |
+
}
|
450 |
+
.toggle-wrapper input {
|
451 |
+
position: absolute;
|
452 |
+
left: -99em;
|
453 |
+
}
|
454 |
+
.toggle-wrapper .toggle {
|
455 |
+
cursor: pointer;
|
456 |
+
display: inline-block;
|
457 |
+
position: relative;
|
458 |
+
width: 121px;
|
459 |
+
height: 30px;
|
460 |
+
font-weight: 600;
|
461 |
+
background: transparent;
|
462 |
+
border: 2px solid #f1f1f1;
|
463 |
+
-webkit-transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
|
464 |
+
transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
|
465 |
+
}
|
466 |
+
.toggle-wrapper .toggle:before, .toggle-wrapper .toggle:after {
|
467 |
+
position: absolute;
|
468 |
+
line-height: 30px;
|
469 |
+
font-size: 14px;
|
470 |
+
z-index: 2;
|
471 |
+
-webkit-transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
|
472 |
+
transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
|
473 |
+
}
|
474 |
+
.toggle-wrapper .toggle:before {
|
475 |
+
content: "OFF";
|
476 |
+
left: 18px;
|
477 |
+
color: #ffffff;
|
478 |
+
}
|
479 |
+
.toggle-wrapper .toggle:after {
|
480 |
+
content: "ON";
|
481 |
+
right: 20px;
|
482 |
+
color: #23282d;
|
483 |
+
}
|
484 |
+
.toggle-wrapper .toggle_handler {
|
485 |
+
display: inline-block;
|
486 |
+
position: relative;
|
487 |
+
z-index: 1;
|
488 |
+
background: #ea1919;
|
489 |
+
width: 55px;
|
490 |
+
height: 24px;
|
491 |
+
top: 3px;
|
492 |
+
left: 3px;
|
493 |
+
-webkit-transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
|
494 |
+
transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
|
495 |
+
-webkit-transform: translateX(0px);
|
496 |
+
transform: translateX(0px);
|
497 |
+
}
|
498 |
+
.toggle-wrapper input:checked + .toggle {
|
499 |
+
background: transparent;
|
500 |
+
}
|
501 |
+
.toggle-wrapper input:checked + .toggle:before {
|
502 |
+
color: #23282d;
|
503 |
+
}
|
504 |
+
.toggle-wrapper input:checked + .toggle:after {
|
505 |
+
color: #fff;
|
506 |
+
}
|
507 |
+
.toggle-wrapper input:checked + .toggle .toggle_handler {
|
508 |
+
width: 55px;
|
509 |
+
-webkit-transform: translateX(60px);
|
510 |
+
transform: translateX(60px);
|
511 |
+
background: #66b317;
|
512 |
+
}
|
513 |
+
|
514 |
+
.gmw-pro-feature {
|
515 |
+
display: inline-block;
|
516 |
+
width: 32%;
|
517 |
+
background: rgba(128, 128, 128, 0.03);
|
518 |
+
margin: 0 5px 30px 5px;
|
519 |
+
padding: 10px;
|
520 |
+
box-sizing: border-box;
|
521 |
+
vertical-align: top;
|
522 |
+
position: relative;
|
523 |
+
min-width: 300px;
|
524 |
+
border-top: 1px solid rgba(255, 121, 0, 0.54);
|
525 |
+
}
|
526 |
+
|
527 |
+
#ucp-earlybird {
|
528 |
+
width: calc(96% + 20px);
|
529 |
+
background: rgba(128, 128, 128, 0.03);
|
530 |
+
border-top: 1px solid rgba(255, 121, 0, 0.54);
|
531 |
+
padding: 10px 0 10px 0;
|
532 |
+
margin: 40px 5px 50px 5px;
|
533 |
+
}
|
534 |
+
|
535 |
+
.ucp-small-title {
|
536 |
+
text-align: center;
|
537 |
+
font-family: Roboto, sans-serif;
|
538 |
+
}
|
539 |
+
|
540 |
+
#ucp-earlybird span {
|
541 |
+
text-align: center;
|
542 |
+
display: block;
|
543 |
+
font-weight: bold;
|
544 |
+
font-family: Roboto, sans-serif;
|
545 |
+
font-size: 14px;
|
546 |
+
}
|
547 |
+
|
548 |
+
#ucp-earlybird p {
|
549 |
+
text-align: center;
|
550 |
+
}
|
551 |
+
|
552 |
+
.gmw-pro-feature span {
|
553 |
+
text-align: center;
|
554 |
+
display: block;
|
555 |
+
font-weight: bold;
|
556 |
+
font-family: Roboto, sans-serif;
|
557 |
+
font-size: 14px;
|
558 |
+
}
|
559 |
+
|
560 |
+
.gmw-pro-feature p {
|
561 |
+
margin-bottom: 0;
|
562 |
+
text-align: justify;
|
563 |
+
}
|
564 |
+
|
565 |
+
h3.ucp-pro-logo {
|
566 |
+
font-variant: small-caps;
|
567 |
+
font-family: Roboto, sans-serif;
|
568 |
+
font-weight: 900;
|
569 |
+
margin: 10px 0 40px 0;
|
570 |
+
text-align: center;
|
571 |
+
font-size: 40px;
|
572 |
+
}
|
573 |
+
|
574 |
+
h3.ucp-pro-logo img {
|
575 |
+
height: 40px;
|
576 |
+
margin-right: 10px;
|
577 |
+
margin-bottom: -2px;
|
578 |
+
}
|
579 |
+
|
580 |
+
h3.ucp-pro-logo span {
|
581 |
+
color: #FF7900;
|
582 |
+
vertical-align: super;
|
583 |
+
font-size: smaller;
|
584 |
}
|
images/ucp_icon.png
ADDED
Binary file
|
images/ucp_icon_disabled.png
DELETED
Binary file
|
images/ucp_icon_enabled.png
DELETED
Binary file
|
images/ucp_pro_logo.png
ADDED
Binary file
|
js/ucp-admin.js
CHANGED
@@ -96,6 +96,7 @@ jQuery(document).ready(function($) {
|
|
96 |
return false;
|
97 |
});
|
98 |
|
|
|
99 |
// send support message
|
100 |
$('#ucp-send-support-message').on('click', function(e) {
|
101 |
e.preventDefault();
|
@@ -133,7 +134,46 @@ jQuery(document).ready(function($) {
|
|
133 |
|
134 |
return false;
|
135 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
|
|
|
|
|
|
|
|
|
137 |
// select theme via thumb
|
138 |
$('.ucp-thumb').on('click', function(e) {
|
139 |
e.preventDefault();
|
@@ -151,16 +191,6 @@ jQuery(document).ready(function($) {
|
|
151 |
$('.datepicker').AnyTime_picker({ format: "%Y-%m-%d %H:%i", firstDOW: 1, earliest: new Date(), labelTitle: "Select the date & time when construction mode will be disabled" } );
|
152 |
|
153 |
|
154 |
-
// reset/clear datepicker
|
155 |
-
$('.clear-datepicker').on('click', function(e) {
|
156 |
-
e.preventDefault();
|
157 |
-
|
158 |
-
$(this).prevAll('input.datepicker').val('');
|
159 |
-
|
160 |
-
return false;
|
161 |
-
});
|
162 |
-
|
163 |
-
|
164 |
// fix when opening datepicker
|
165 |
$('.show-datepicker').on('click', function(e) {
|
166 |
e.preventDefault();
|
@@ -170,6 +200,39 @@ jQuery(document).ready(function($) {
|
|
170 |
return false;
|
171 |
});
|
172 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
|
174 |
// warning if there are unsaved changes when previewing
|
175 |
$('.settings_page_ucp .wrap').on('click', '#ucp_preview', function(e) {
|
96 |
return false;
|
97 |
});
|
98 |
|
99 |
+
|
100 |
// send support message
|
101 |
$('#ucp-send-support-message').on('click', function(e) {
|
102 |
e.preventDefault();
|
134 |
|
135 |
return false;
|
136 |
});
|
137 |
+
|
138 |
+
|
139 |
+
// get on earlybird list
|
140 |
+
$('#ucp-earlybird-submit').on('click', function(e) {
|
141 |
+
e.preventDefault();
|
142 |
+
button = $(this);
|
143 |
+
|
144 |
+
if ($('#ucp-earlybird-email').val().length < 5 || $('#ucp-earlybird-email').is(':invalid')) {
|
145 |
+
alert('Please double-check your email.');
|
146 |
+
$('#ucp-earlybird-email').select().focus();
|
147 |
+
return false;
|
148 |
+
}
|
149 |
+
|
150 |
+
if ($('#ucp-earlybird-type').val() == '0') {
|
151 |
+
alert('Please tell us how you use UCP.');
|
152 |
+
$('#ucp-earlybird-type').select().focus();
|
153 |
+
return false;
|
154 |
+
}
|
155 |
+
|
156 |
+
button.addClass('loading');
|
157 |
+
$.post(ajaxurl, { email: $('#ucp-earlybird-email').val(),
|
158 |
+
type: $('#ucp-earlybird-type').val(),
|
159 |
+
_ajax_nonce: ucp.nonce_submit_earlybird,
|
160 |
+
action: 'ucp_submit_earlybird'},
|
161 |
+
function(data) {
|
162 |
+
if (data.success) {
|
163 |
+
alert('You made it on the list! Expect an email from us soon!');
|
164 |
+
} else {
|
165 |
+
alert(data.message);
|
166 |
+
}
|
167 |
+
}).fail(function() {
|
168 |
+
alert('Something is not right. Please reload the page and try again');
|
169 |
+
}).always(function() {
|
170 |
+
button.removeClass('loading');
|
171 |
+
});
|
172 |
|
173 |
+
return false;
|
174 |
+
}); // earlybird list
|
175 |
+
|
176 |
+
|
177 |
// select theme via thumb
|
178 |
$('.ucp-thumb').on('click', function(e) {
|
179 |
e.preventDefault();
|
191 |
$('.datepicker').AnyTime_picker({ format: "%Y-%m-%d %H:%i", firstDOW: 1, earliest: new Date(), labelTitle: "Select the date & time when construction mode will be disabled" } );
|
192 |
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
// fix when opening datepicker
|
195 |
$('.show-datepicker').on('click', function(e) {
|
196 |
e.preventDefault();
|
200 |
return false;
|
201 |
});
|
202 |
|
203 |
+
|
204 |
+
$('#ga_tracking_id_toggle').on('change', function(e, is_triggered) {
|
205 |
+
if ($(this).is(':checked')) {
|
206 |
+
if (is_triggered) {
|
207 |
+
$('#ga_tracking_id_wrapper').show();
|
208 |
+
} else {
|
209 |
+
$('#ga_tracking_id_wrapper').slideDown();
|
210 |
+
}
|
211 |
+
} else {
|
212 |
+
if (is_triggered) {
|
213 |
+
$('#ga_tracking_id_wrapper').hide();
|
214 |
+
} else {
|
215 |
+
$('#ga_tracking_id_wrapper').slideUp();
|
216 |
+
}
|
217 |
+
}
|
218 |
+
}).triggerHandler('change', true);
|
219 |
+
|
220 |
+
$('#end_date_toggle').on('change', function(e, is_triggered) {
|
221 |
+
if ($(this).is(':checked')) {
|
222 |
+
if (is_triggered) {
|
223 |
+
$('#end_date_wrapper').show();
|
224 |
+
} else {
|
225 |
+
$('#end_date_wrapper').slideDown();
|
226 |
+
}
|
227 |
+
} else {
|
228 |
+
if (is_triggered) {
|
229 |
+
$('#end_date_wrapper').hide();
|
230 |
+
} else {
|
231 |
+
$('#end_date_wrapper').slideUp();
|
232 |
+
}
|
233 |
+
}
|
234 |
+
}).triggerHandler('change', true);
|
235 |
+
|
236 |
|
237 |
// warning if there are unsaved changes when previewing
|
238 |
$('.settings_page_ucp .wrap').on('click', '#ucp_preview', function(e) {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: maintenance mode, maintenance page, coming soon page, landing page, under
|
|
4 |
Requires at least: 4.0
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 4.8
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -119,6 +119,14 @@ Or if needed, upload manually;
|
|
119 |
|
120 |
== Changelog ==
|
121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
= 2.50 =
|
123 |
* 2017/09/04
|
124 |
* CDNs are no longer used except for Google Fonts
|
4 |
Requires at least: 4.0
|
5 |
Requires PHP: 5.2
|
6 |
Tested up to: 4.8
|
7 |
+
Stable tag: 2.55
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
119 |
|
120 |
== Changelog ==
|
121 |
|
122 |
+
= 2.55 =
|
123 |
+
* 2017/09/18
|
124 |
+
* big UX improvements and more coming soon
|
125 |
+
* redesigned admin bar menu
|
126 |
+
* added favicon to all themes
|
127 |
+
* fixed Skype icon; it got broken in v2.40
|
128 |
+
* minor code improvements
|
129 |
+
|
130 |
= 2.50 =
|
131 |
* 2017/09/04
|
132 |
* CDNs are no longer used except for Google Fonts
|
themes/css/common.css
CHANGED
@@ -5,6 +5,11 @@
|
|
5 |
*/
|
6 |
|
7 |
|
|
|
|
|
|
|
|
|
|
|
8 |
#linkback {
|
9 |
font-size: small;
|
10 |
text-align: center;
|
5 |
*/
|
6 |
|
7 |
|
8 |
+
.content img {
|
9 |
+
max-width: 100%;
|
10 |
+
height: auto;
|
11 |
+
}
|
12 |
+
|
13 |
#linkback {
|
14 |
font-size: small;
|
15 |
text-align: center;
|
themes/images/favicon.png
ADDED
Binary file
|
under-construction.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin URI: https://underconstructionpage.com/
|
5 |
Description: Put your site behind a great looking under construction page while you do maintenance work.
|
6 |
Author: Web factory Ltd
|
7 |
-
Version: 2.
|
8 |
Author URI: http://www.webfactoryltd.com/
|
9 |
Text Domain: under-construction-page
|
10 |
Domain Path: lang
|
@@ -90,6 +90,7 @@ class UCP {
|
|
90 |
add_action('wp_ajax_ucp_dismiss_pointer', array(__CLASS__, 'dismiss_pointer_ajax'));
|
91 |
add_action('wp_ajax_ucp_dismiss_survey', array(__CLASS__, 'dismiss_survey_ajax'));
|
92 |
add_action('wp_ajax_ucp_submit_survey', array(__CLASS__, 'submit_survey_ajax'));
|
|
|
93 |
add_action('wp_ajax_ucp_submit_support_message', array(__CLASS__, 'submit_support_message_ajax'));
|
94 |
} else {
|
95 |
// main plugin logic
|
@@ -289,6 +290,7 @@ class UCP {
|
|
289 |
'open_survey' => $open_survey,
|
290 |
'nonce_dismiss_survey' => wp_create_nonce('ucp_dismiss_survey'),
|
291 |
'nonce_submit_survey' => wp_create_nonce('ucp_submit_survey'),
|
|
|
292 |
'nonce_submit_support_message' => wp_create_nonce('ucp_submit_support_message'),
|
293 |
'deactivate_confirmation' => __('Are you sure you want to deactivate UnderConstruction plugin?' . "\n" . 'If you are removing it because of a problem please contact our support. They will be more than happy to help.', 'under-construction-page'));
|
294 |
|
@@ -425,8 +427,45 @@ class UCP {
|
|
425 |
|
426 |
wp_send_json_success();
|
427 |
} // submit_survey_ajax
|
|
|
|
|
|
|
|
|
|
|
428 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
|
|
|
|
|
430 |
static function encode_email($email) {
|
431 |
$len = strlen($email);
|
432 |
$out = '';
|
@@ -522,10 +561,12 @@ class UCP {
|
|
522 |
static function generate_head($options, $template_id) {
|
523 |
$out = '';
|
524 |
|
525 |
-
$out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes') . '
|
526 |
-
$out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes') . '
|
527 |
$out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/' . $template_id) . 'style.css?v=' . self::$version . '" type="text/css">' . "\n";
|
528 |
-
$out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes') . '
|
|
|
|
|
529 |
|
530 |
if (!empty($options['ga_tracking_id'])) {
|
531 |
$out .= "
|
@@ -751,7 +792,7 @@ class UCP {
|
|
751 |
}
|
752 |
|
753 |
// no sense in loading a new CSS file for 2 lines of CSS
|
754 |
-
$custom_css = '<style type="text/css">#wpadminbar ul li#wp-admin-bar-ucp-info { padding: 5px 0; } #wpadminbar ul li#wp-admin-bar-ucp-settings, #wpadminbar ul li#wp-admin-bar-ucp-status {
|
755 |
|
756 |
echo $custom_css;
|
757 |
} // admin_bar_style
|
@@ -767,17 +808,19 @@ class UCP {
|
|
767 |
}
|
768 |
|
769 |
if (self::is_construction_mode_enabled(true)) {
|
770 |
-
$main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . '/images/
|
771 |
$class = 'ucp-enabled';
|
772 |
$status = 'Under construction mode is <b style="font-weight: bold;">enabled</b>';
|
773 |
-
$action = __('Disable under construction mode', 'under-construction-page');
|
774 |
$action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'disabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
|
|
|
|
775 |
} else {
|
776 |
-
$main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . '/images/
|
777 |
$class = 'ucp-disabled';
|
778 |
$status = 'Under construction mode is <b style="font-weight: bold;">disabled</b>';
|
779 |
-
$action = __('Enable under construction mode', 'under-construction-page');
|
780 |
$action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'enabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
|
|
|
|
781 |
}
|
782 |
|
783 |
$wp_admin_bar->add_menu(array(
|
@@ -787,16 +830,10 @@ class UCP {
|
|
787 |
'href' => admin_url('options-general.php?page=ucp'),
|
788 |
'meta' => array('class' => $class)
|
789 |
));
|
790 |
-
$wp_admin_bar->add_node( array(
|
791 |
-
'id' => 'ucp-info',
|
792 |
-
'title' => $status,
|
793 |
-
'href' => false,
|
794 |
-
'parent'=> 'under-construction-page'
|
795 |
-
));
|
796 |
$wp_admin_bar->add_node( array(
|
797 |
'id' => 'ucp-status',
|
798 |
'title' => $action,
|
799 |
-
'href' =>
|
800 |
'parent'=> 'under-construction-page'
|
801 |
));
|
802 |
$wp_admin_bar->add_node( array(
|
@@ -953,13 +990,21 @@ class UCP {
|
|
953 |
$options['whitelisted_users'] = empty($options['whitelisted_users'])? array(): $options['whitelisted_users'];
|
954 |
$options = self::check_var_isset($options, array('status' => 0, 'linkback' => 0, 'login_button' => 0));
|
955 |
|
|
|
|
|
|
|
956 |
if ($options['end_date'] == '0000-00-00 00:00') {
|
957 |
$options['end_date'] = '';
|
958 |
}
|
959 |
-
|
|
|
|
|
|
|
|
|
960 |
if (!empty($options['ga_tracking_id']) && preg_match('/^UA-\d{3,}-\d{1,3}$/', $options['ga_tracking_id']) === 0) {
|
961 |
-
add_settings_error('ucp', 'ga_tracking_id', __('Please enter a valid Google Analytics Tracking ID
|
962 |
}
|
|
|
963 |
|
964 |
// empty cache in 3rd party plugins
|
965 |
if ($options != $old_options) {
|
@@ -1053,35 +1098,46 @@ class UCP {
|
|
1053 |
$options = self::get_options();
|
1054 |
$default_options = self::default_options();
|
1055 |
|
|
|
1056 |
echo '<table class="form-table">';
|
1057 |
|
1058 |
echo '<tr valign="top">
|
1059 |
-
<th scope="row"><label for="status">' . __('
|
1060 |
-
<td
|
1061 |
-
|
1062 |
-
<
|
1063 |
-
|
1064 |
-
|
1065 |
-
</label>
|
1066 |
</div>';
|
1067 |
|
1068 |
-
echo '<p class="description">By enabling construction mode
|
1069 |
echo '</td></tr>';
|
1070 |
|
1071 |
echo '<tr valign="top">
|
1072 |
-
<th scope="row"><label for="
|
1073 |
-
<td
|
|
|
|
|
|
|
|
|
|
|
1074 |
echo '<p class="description">If enabled, construction mode will automatically stop showing on the selected date.<br>
|
1075 |
-
This option will not "auto-enable" construction mode. Status has to be set to "On".</p>';
|
1076 |
echo '</td></tr>';
|
1077 |
|
1078 |
echo '<tr valign="top">
|
1079 |
-
<th scope="row"><label for="
|
1080 |
-
<td
|
1081 |
-
echo '<
|
|
|
|
|
|
|
|
|
|
|
1082 |
echo '</td></tr>';
|
1083 |
|
1084 |
echo '</table>';
|
|
|
1085 |
|
1086 |
self::footer_buttons();
|
1087 |
} // tab_main
|
@@ -1091,6 +1147,7 @@ class UCP {
|
|
1091 |
$options = self::get_options();
|
1092 |
$default_options = self::default_options();
|
1093 |
|
|
|
1094 |
echo '<table class="form-table">';
|
1095 |
|
1096 |
echo '<tr valign="top">
|
@@ -1128,24 +1185,20 @@ class UCP {
|
|
1128 |
|
1129 |
echo '<tr valign="top" id="login_button_wrap">
|
1130 |
<th scope="row"><label for="login_button">Login Button</label></th>
|
1131 |
-
<td
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
<span class="onoffswitch-switch"></span>
|
1136 |
-
</label>
|
1137 |
</div>';
|
1138 |
echo '<p class="description">Show a descrete link to the login form, or WP admin if you\'re logged in, in the lower right corner of the page.</p>';
|
1139 |
echo '</td></tr>';
|
1140 |
|
1141 |
echo '<tr valign="top">
|
1142 |
<th scope="row"><label for="linkback">Show Some Love</label></th>
|
1143 |
-
<td
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
<span class="onoffswitch-switch"></span>
|
1148 |
-
</label>
|
1149 |
</div>';
|
1150 |
echo '<p class="description">Please help others learn about this free plugin by placing a small link in the footer. Thank you very much!</p>';
|
1151 |
echo '</td></tr>';
|
@@ -1229,6 +1282,12 @@ class UCP {
|
|
1229 |
<td><input id="social_telegram" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_telegram]" value="' . esc_attr($options['social_telegram']) . '" placeholder="Telegram group, channel or account URL">';
|
1230 |
echo '<p class="description">Complete URL, with https prefix to Telegram group, channel or account.</p>';
|
1231 |
echo '</td></tr>';
|
|
|
|
|
|
|
|
|
|
|
|
|
1232 |
|
1233 |
echo '<tr valign="top" class="hidden">
|
1234 |
<th scope="row"><label for="social_whatsapp">WhatsApp Phone Number</label></th>
|
@@ -1248,9 +1307,10 @@ class UCP {
|
|
1248 |
echo '<p class="description">Complete phone number in international format.</p>';
|
1249 |
echo '</td></tr>';
|
1250 |
|
1251 |
-
echo '<tr><th colspan="2"><a id="show-social-icons" href="#" class="js-action">Show
|
1252 |
|
1253 |
echo '</table>';
|
|
|
1254 |
|
1255 |
self::footer_buttons();
|
1256 |
} // tab_content
|
@@ -1298,8 +1358,7 @@ class UCP {
|
|
1298 |
|
1299 |
echo '<table class="form-table">';
|
1300 |
echo '<tr valign="top">
|
1301 |
-
<
|
1302 |
-
<td>';
|
1303 |
echo '<input type="hidden" id="theme_id" name="' . UCP_OPTIONS_KEY . '[theme]" value="' . $options['theme'] . '">';
|
1304 |
|
1305 |
foreach ($themes as $theme_id => $theme_name) {
|
@@ -1358,6 +1417,7 @@ class UCP {
|
|
1358 |
$users[] = array('val' => $user->id, 'label' => $user->display_name);
|
1359 |
}
|
1360 |
|
|
|
1361 |
echo '<table class="form-table">';
|
1362 |
|
1363 |
echo '<tr valign="top" id="whitelisted-roles">
|
@@ -1379,6 +1439,7 @@ class UCP {
|
|
1379 |
echo '</td></tr>';
|
1380 |
|
1381 |
echo '</table>';
|
|
|
1382 |
|
1383 |
self::footer_buttons();
|
1384 |
} // tab_access
|
@@ -1386,6 +1447,7 @@ class UCP {
|
|
1386 |
|
1387 |
// support tab - FAQ and links
|
1388 |
static function tab_support() {
|
|
|
1389 |
echo '<h2>' . __('FAQ', 'under-construction-page') . '</h2>';
|
1390 |
|
1391 |
echo '<p><b>How can I work on my site while construction mode is enabled?</b><br>Make sure your user role (probably admin) is selected under <a class="change_tab" data-tab="3" href="#whitelisted-roles">Access - Whitelisted User Roles</a> and open the site while logged in.</p>';
|
@@ -1400,7 +1462,9 @@ class UCP {
|
|
1400 |
|
1401 |
echo '<p><b>How can I edit designs?</b><br>There is an option to add <a class="change_tab" data-tab="1" href="#custom_css">custom CSS</a>. If you want more than that you will have to edit the source files located in <code>/under-construction-page/themes/</code>.</p>';
|
1402 |
|
1403 |
-
echo '<p><b>I have disabled UCP but the under construction page is still visible. How do I remove it?</b><br>Open your site and force refresh browser cache (Ctrl or Shift + F5). If that doesn\'t help it means you have a caching plugin installed. Purge/delete cache in that plugin or disable it
|
|
|
|
|
1404 |
|
1405 |
echo '<h2 id="contact">' . __('Contact Support', 'under-construction-page') . '</h2>';
|
1406 |
$user = wp_get_current_user();
|
@@ -1423,13 +1487,11 @@ class UCP {
|
|
1423 |
|
1424 |
echo '<tr valign="top">
|
1425 |
<th scope="row"><label for="support_info">Send Extra Site Info to Support Agents</label></th>
|
1426 |
-
<td
|
1427 |
-
<
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
</label>
|
1432 |
-
</div>';
|
1433 |
echo '<p class="description">Our support agents need this info to provide faster & better support. Only the following data will be added to your message;</p>';
|
1434 |
echo '<p>WordPress version: <code>' . get_bloginfo('version') . '</code><br>';
|
1435 |
echo 'UCP version: <code>' . self::$version . '</code><br>';
|
@@ -1442,7 +1504,100 @@ class UCP {
|
|
1442 |
echo '<a id="ucp-send-support-message" href="#" class="js-action button button-primary"><span class="dashicons dashicons-update"></span>Send Message to Support</a>';
|
1443 |
echo '</td></tr>';
|
1444 |
echo '</table>';
|
|
|
1445 |
} // tab_support
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1446 |
|
1447 |
|
1448 |
// output the whole options page
|
@@ -1462,7 +1617,7 @@ class UCP {
|
|
1462 |
}
|
1463 |
|
1464 |
echo '<div class="wrap">
|
1465 |
-
<h1 class="ucp-logo"><img src="' . UCP_PLUGIN_URL . '
|
1466 |
|
1467 |
echo '<form action="options.php" method="post" id="ucp_form">';
|
1468 |
settings_fields(UCP_OPTIONS_KEY);
|
@@ -1473,6 +1628,7 @@ class UCP {
|
|
1473 |
$tabs[] = array('id' => 'ucp_content', 'icon' => 'dashicons-format-aside', 'class' => '', 'label' => __('Content', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_content'));
|
1474 |
$tabs[] = array('id' => 'ucp_access', 'icon' => 'dashicons-shield', 'class' => '', 'label' => __('Access', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_access'));
|
1475 |
$tabs[] = array('id' => 'ucp_support', 'icon' => 'dashicons-sos', 'class' => '', 'label' => __('Support', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_support'));
|
|
|
1476 |
$tabs = apply_filters('ucp_tabs', $tabs);
|
1477 |
|
1478 |
echo '<div id="ucp_tabs" class="ui-tabs" style="display: none;">';
|
4 |
Plugin URI: https://underconstructionpage.com/
|
5 |
Description: Put your site behind a great looking under construction page while you do maintenance work.
|
6 |
Author: Web factory Ltd
|
7 |
+
Version: 2.55
|
8 |
Author URI: http://www.webfactoryltd.com/
|
9 |
Text Domain: under-construction-page
|
10 |
Domain Path: lang
|
90 |
add_action('wp_ajax_ucp_dismiss_pointer', array(__CLASS__, 'dismiss_pointer_ajax'));
|
91 |
add_action('wp_ajax_ucp_dismiss_survey', array(__CLASS__, 'dismiss_survey_ajax'));
|
92 |
add_action('wp_ajax_ucp_submit_survey', array(__CLASS__, 'submit_survey_ajax'));
|
93 |
+
add_action('wp_ajax_ucp_submit_earlybird', array(__CLASS__, 'submit_earlybird_ajax'));
|
94 |
add_action('wp_ajax_ucp_submit_support_message', array(__CLASS__, 'submit_support_message_ajax'));
|
95 |
} else {
|
96 |
// main plugin logic
|
290 |
'open_survey' => $open_survey,
|
291 |
'nonce_dismiss_survey' => wp_create_nonce('ucp_dismiss_survey'),
|
292 |
'nonce_submit_survey' => wp_create_nonce('ucp_submit_survey'),
|
293 |
+
'nonce_submit_earlybird' => wp_create_nonce('ucp_submit_earlybird'),
|
294 |
'nonce_submit_support_message' => wp_create_nonce('ucp_submit_support_message'),
|
295 |
'deactivate_confirmation' => __('Are you sure you want to deactivate UnderConstruction plugin?' . "\n" . 'If you are removing it because of a problem please contact our support. They will be more than happy to help.', 'under-construction-page'));
|
296 |
|
427 |
|
428 |
wp_send_json_success();
|
429 |
} // submit_survey_ajax
|
430 |
+
|
431 |
+
|
432 |
+
// submit earlybird email
|
433 |
+
static function submit_earlybird_ajax() {
|
434 |
+
check_ajax_referer('ucp_submit_earlybird');
|
435 |
|
436 |
+
$options = self::get_options();
|
437 |
+
$meta = self::get_meta();
|
438 |
+
|
439 |
+
$vars = wp_parse_args($_POST, array('type' => '', 'email' => ''));
|
440 |
+
|
441 |
+
if (empty($vars['email']) || empty($vars['type'])) {
|
442 |
+
wp_send_json_error('Please tell us your email and how you use UCP.');
|
443 |
+
}
|
444 |
+
|
445 |
+
$request_params = array('sslverify' => false, 'timeout' => 15, 'redirection' => 2);
|
446 |
+
$request_args = array('action' => 'submit_survey',
|
447 |
+
'survey' => 'earlybird',
|
448 |
+
'email' => $vars['email'],
|
449 |
+
'answers' => $vars['type'],
|
450 |
+
'custom_answer' => $options['theme'],
|
451 |
+
'first_version' => $meta['first_version'],
|
452 |
+
'version' => UCP::$version,
|
453 |
+
'codebase' => 'free',
|
454 |
+
'site' => get_home_url());
|
455 |
+
|
456 |
+
$url = add_query_arg($request_args, self::$licensing_servers[0]);
|
457 |
+
$response = wp_remote_get(esc_url_raw($url), $request_params);
|
458 |
+
|
459 |
+
if (is_wp_error($response) || !wp_remote_retrieve_body($response)) {
|
460 |
+
$url = add_query_arg($request_args, self::$licensing_servers[1]);
|
461 |
+
$response = wp_remote_get(esc_url_raw($url), $request_params);
|
462 |
+
}
|
463 |
+
|
464 |
+
wp_send_json_success();
|
465 |
+
} // submit_earlybird_ajax
|
466 |
|
467 |
+
|
468 |
+
// encode email for frontend use
|
469 |
static function encode_email($email) {
|
470 |
$len = strlen($email);
|
471 |
$out = '';
|
561 |
static function generate_head($options, $template_id) {
|
562 |
$out = '';
|
563 |
|
564 |
+
$out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/css') . 'bootstrap.min.css?v=' . self::$version . '" type="text/css">' . "\n";
|
565 |
+
$out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/css') . 'common.css?v=' . self::$version . '" type="text/css">' . "\n";
|
566 |
$out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/' . $template_id) . 'style.css?v=' . self::$version . '" type="text/css">' . "\n";
|
567 |
+
$out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/css') . 'font-awesome.min.css?v=' . self::$version . '" type="text/css">' . "\n";
|
568 |
+
|
569 |
+
$out .= '<link rel="shortcut icon" type="image/png" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/images') . 'favicon.png" />';
|
570 |
|
571 |
if (!empty($options['ga_tracking_id'])) {
|
572 |
$out .= "
|
792 |
}
|
793 |
|
794 |
// no sense in loading a new CSS file for 2 lines of CSS
|
795 |
+
$custom_css = '<style type="text/css">#wpadminbar ul li#wp-admin-bar-ucp-info { padding: 5px 0; } #wpadminbar ul li#wp-admin-bar-ucp-settings, #wpadminbar ul li#wp-admin-bar-ucp-status { } #wpadminbar i.ucp-status-dot { font-size: 17px; margin-top: -7px; color: #02ca02; height: 17px; display: inline-block; } #wpadminbar i.ucp-status-dot-enabled { color: #87c826; } #wpadminbar i.ucp-status-dot-disabled { color: #ea1919; } #wpadminbar #ucp-status-wrapper { display: inline; border: 1px solid rgba(240,245,250,.7); padding: 0; margin: 0 0 0 5px; background: rgb(35, 40, 45); } #wpadminbar .ucp-status-btn { padding: 0 7px; color: #fff; } #wpadminbar #ucp-status-wrapper.off #ucp-status-off { background: #ea1919;} #wpadminbar #ucp-status-wrapper.on #ucp-status-on { background: #66b317; } </style>';
|
796 |
|
797 |
echo $custom_css;
|
798 |
} // admin_bar_style
|
808 |
}
|
809 |
|
810 |
if (self::is_construction_mode_enabled(true)) {
|
811 |
+
$main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . '/images/ucp_icon.png" alt="' . __('Under construction mode is enabled', 'under-construction-page') . '" title="' . __('Under construction mode is enabled', 'under-construction-page') . '"> <span class="ab-label">' . __('UnderConstruction', 'under-construction-page') . ' <i class="ucp-status-dot ucp-status-dot-enabled">●</i></span>';
|
812 |
$class = 'ucp-enabled';
|
813 |
$status = 'Under construction mode is <b style="font-weight: bold;">enabled</b>';
|
|
|
814 |
$action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'disabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
815 |
+
$action = __('Under Construction Mode', 'under-construction-page');
|
816 |
+
$action .= '<a href="' . $action_url . '" id="ucp-status-wrapper" class="on"><span id="ucp-status-off" class="ucp-status-btn">OFF</span><span id="ucp-status-on" class="ucp-status-btn">ON</span></a>';
|
817 |
} else {
|
818 |
+
$main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . '/images/ucp_icon.png" alt="' . __('Under construction mode is disabled', 'under-construction-page') . '" title="' . __('Under construction mode is disabled', 'under-construction-page') . '"> <span class="ab-label">' . __('UnderConstruction', 'under-construction-page') . ' <i class="ucp-status-dot ucp-status-dot-disabled">●</i></span>';
|
819 |
$class = 'ucp-disabled';
|
820 |
$status = 'Under construction mode is <b style="font-weight: bold;">disabled</b>';
|
|
|
821 |
$action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'enabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
822 |
+
$action = __('Under Construction Mode', 'under-construction-page');
|
823 |
+
$action .= '<a href="' . $action_url . '" id="ucp-status-wrapper" class="off"><span id="ucp-status-off" class="ucp-status-btn">OFF</span><span id="ucp-status-on" class="ucp-status-btn">ON</span></a>';
|
824 |
}
|
825 |
|
826 |
$wp_admin_bar->add_menu(array(
|
830 |
'href' => admin_url('options-general.php?page=ucp'),
|
831 |
'meta' => array('class' => $class)
|
832 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
833 |
$wp_admin_bar->add_node( array(
|
834 |
'id' => 'ucp-status',
|
835 |
'title' => $action,
|
836 |
+
'href' => false,
|
837 |
'parent'=> 'under-construction-page'
|
838 |
));
|
839 |
$wp_admin_bar->add_node( array(
|
990 |
$options['whitelisted_users'] = empty($options['whitelisted_users'])? array(): $options['whitelisted_users'];
|
991 |
$options = self::check_var_isset($options, array('status' => 0, 'linkback' => 0, 'login_button' => 0));
|
992 |
|
993 |
+
if (empty($options['end_date_toggle'])) {
|
994 |
+
$options['end_date'] = '';
|
995 |
+
}
|
996 |
if ($options['end_date'] == '0000-00-00 00:00') {
|
997 |
$options['end_date'] = '';
|
998 |
}
|
999 |
+
unset($options['end_date_toggle']);
|
1000 |
+
|
1001 |
+
if (empty($options['ga_tracking_toggle'])) {
|
1002 |
+
$options['ga_tracking_id'] = '';
|
1003 |
+
}
|
1004 |
if (!empty($options['ga_tracking_id']) && preg_match('/^UA-\d{3,}-\d{1,3}$/', $options['ga_tracking_id']) === 0) {
|
1005 |
+
add_settings_error('ucp', 'ga_tracking_id', __('Please enter a valid Google Analytics Tracking ID or disable tracking.', 'under-construction-page'));
|
1006 |
}
|
1007 |
+
unset($options['ga_tracking_toggle']);
|
1008 |
|
1009 |
// empty cache in 3rd party plugins
|
1010 |
if ($options != $old_options) {
|
1098 |
$options = self::get_options();
|
1099 |
$default_options = self::default_options();
|
1100 |
|
1101 |
+
echo '<div class="ucp-tab-content">';
|
1102 |
echo '<table class="form-table">';
|
1103 |
|
1104 |
echo '<tr valign="top">
|
1105 |
+
<th scope="row"><label for="status">' . __('Under Construction Mode', 'under-construction-page') . '</label></th>
|
1106 |
+
<td>';
|
1107 |
+
|
1108 |
+
echo '<div class="toggle-wrapper">
|
1109 |
+
<input type="checkbox" id="status" class="dn" ' . self::checked(1, $options['status']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[status]">
|
1110 |
+
<label for="status" class="toggle"><span class="toggle_handler"></span></label>
|
|
|
1111 |
</div>';
|
1112 |
|
1113 |
+
echo '<p class="description">By enabling construction mode users will not be able to access the site\'s content. They will only see the under construction page.<br> To configure exceptions set <a class="change_tab" data-tab="3" href="#whitelisted-roles">whitelisted user roles</a>.</p>';
|
1114 |
echo '</td></tr>';
|
1115 |
|
1116 |
echo '<tr valign="top">
|
1117 |
+
<th scope="row"><label for="end_date_toggle">' . __('Automatic End Date & Time', 'under-construction-page') . '</label></th>
|
1118 |
+
<td>';
|
1119 |
+
echo '<div class="toggle-wrapper">
|
1120 |
+
<input type="checkbox" id="end_date_toggle" class="dn" ' . self::checked(1, (empty($options['end_date']) || $options['end_date'] == '0000-00-00 00:00')? 0: 1) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[end_date_toggle]">
|
1121 |
+
<label for="end_date_toggle" class="toggle"><span class="toggle_handler"></span></label>
|
1122 |
+
</div>';
|
1123 |
+
echo '<div id="end_date_wrapper"><input id="end_date" type="text" class="datepicker" name="' . UCP_OPTIONS_KEY . '[end_date]" value="' . esc_attr($options['end_date']) . '" placeholder="yyyy-mm-dd hh:mm"><span title="' . __('Open date & time picker', 'under-construction-page') . '" alt="' . __('Open date & time picker', 'under-construction-page') . '" class="show-datepicker dashicons dashicons-calendar-alt"></span>';
|
1124 |
echo '<p class="description">If enabled, construction mode will automatically stop showing on the selected date.<br>
|
1125 |
+
This option will not "auto-enable" construction mode. Status has to be set to "On".</p></div>';
|
1126 |
echo '</td></tr>';
|
1127 |
|
1128 |
echo '<tr valign="top">
|
1129 |
+
<th scope="row"><label for="ga_tracking_id_toggle">' . __('Google Analytics Tracking', 'under-construction-page') . '</label></th>
|
1130 |
+
<td>';
|
1131 |
+
echo '<div class="toggle-wrapper">
|
1132 |
+
<input type="checkbox" id="ga_tracking_id_toggle" class="dn" ' . self::checked(1, empty($options['ga_tracking_id'])? 0: 1) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[ga_tracking_toggle]">
|
1133 |
+
<label for="ga_tracking_id_toggle" class="toggle"><span class="toggle_handler"></span></label>
|
1134 |
+
</div>';
|
1135 |
+
echo '<div id="ga_tracking_id_wrapper"><input id="ga_tracking_id" type="text" class="code" name="' . UCP_OPTIONS_KEY . '[ga_tracking_id]" value="' . esc_attr($options['ga_tracking_id']) . '" placeholder="UA-xxxxxx-xx">';
|
1136 |
+
echo '<p class="description">Enter the unique tracking ID found in your GA tracking profile settings to track visits to pages.</p></div>';
|
1137 |
echo '</td></tr>';
|
1138 |
|
1139 |
echo '</table>';
|
1140 |
+
echo '</div>';
|
1141 |
|
1142 |
self::footer_buttons();
|
1143 |
} // tab_main
|
1147 |
$options = self::get_options();
|
1148 |
$default_options = self::default_options();
|
1149 |
|
1150 |
+
echo '<div class="ucp-tab-content">';
|
1151 |
echo '<table class="form-table">';
|
1152 |
|
1153 |
echo '<tr valign="top">
|
1185 |
|
1186 |
echo '<tr valign="top" id="login_button_wrap">
|
1187 |
<th scope="row"><label for="login_button">Login Button</label></th>
|
1188 |
+
<td>';
|
1189 |
+
echo '<div class="toggle-wrapper">
|
1190 |
+
<input type="checkbox" id="login_button" class="dn" ' . self::checked(1, $options['login_button']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[login_button]">
|
1191 |
+
<label for="login_button" class="toggle"><span class="toggle_handler"></span></label>
|
|
|
|
|
1192 |
</div>';
|
1193 |
echo '<p class="description">Show a descrete link to the login form, or WP admin if you\'re logged in, in the lower right corner of the page.</p>';
|
1194 |
echo '</td></tr>';
|
1195 |
|
1196 |
echo '<tr valign="top">
|
1197 |
<th scope="row"><label for="linkback">Show Some Love</label></th>
|
1198 |
+
<td>';
|
1199 |
+
echo '<div class="toggle-wrapper">
|
1200 |
+
<input type="checkbox" id="linkback" class="dn" ' . self::checked(1, $options['linkback']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[linkback]">
|
1201 |
+
<label for="linkback" class="toggle"><span class="toggle_handler"></span></label>
|
|
|
|
|
1202 |
</div>';
|
1203 |
echo '<p class="description">Please help others learn about this free plugin by placing a small link in the footer. Thank you very much!</p>';
|
1204 |
echo '</td></tr>';
|
1282 |
<td><input id="social_telegram" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_telegram]" value="' . esc_attr($options['social_telegram']) . '" placeholder="Telegram group, channel or account URL">';
|
1283 |
echo '<p class="description">Complete URL, with https prefix to Telegram group, channel or account.</p>';
|
1284 |
echo '</td></tr>';
|
1285 |
+
|
1286 |
+
echo '<tr valign="top" class="hidden">
|
1287 |
+
<th scope="row"><label for="social_skype">Skype Username</label></th>
|
1288 |
+
<td><input id="social_skype" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_skype]" value="' . esc_attr($options['social_skype']) . '" placeholder="Skype username / account name">';
|
1289 |
+
echo '<p class="description">Skype username / account name.</p>';
|
1290 |
+
echo '</td></tr>';
|
1291 |
|
1292 |
echo '<tr valign="top" class="hidden">
|
1293 |
<th scope="row"><label for="social_whatsapp">WhatsApp Phone Number</label></th>
|
1307 |
echo '<p class="description">Complete phone number in international format.</p>';
|
1308 |
echo '</td></tr>';
|
1309 |
|
1310 |
+
echo '<tr><th colspan="2"><a id="show-social-icons" href="#" class="js-action">Show more Social & Contact Icons</a></th></tr>';
|
1311 |
|
1312 |
echo '</table>';
|
1313 |
+
echo '</div>';
|
1314 |
|
1315 |
self::footer_buttons();
|
1316 |
} // tab_content
|
1358 |
|
1359 |
echo '<table class="form-table">';
|
1360 |
echo '<tr valign="top">
|
1361 |
+
<td colspan="2"><b style="margin-bottom: 10px; display: inline-block;">' . __('Theme', 'under-construction-page') . '</b><br>';
|
|
|
1362 |
echo '<input type="hidden" id="theme_id" name="' . UCP_OPTIONS_KEY . '[theme]" value="' . $options['theme'] . '">';
|
1363 |
|
1364 |
foreach ($themes as $theme_id => $theme_name) {
|
1417 |
$users[] = array('val' => $user->id, 'label' => $user->display_name);
|
1418 |
}
|
1419 |
|
1420 |
+
echo '<div class="ucp-tab-content">';
|
1421 |
echo '<table class="form-table">';
|
1422 |
|
1423 |
echo '<tr valign="top" id="whitelisted-roles">
|
1439 |
echo '</td></tr>';
|
1440 |
|
1441 |
echo '</table>';
|
1442 |
+
echo '</div>';
|
1443 |
|
1444 |
self::footer_buttons();
|
1445 |
} // tab_access
|
1447 |
|
1448 |
// support tab - FAQ and links
|
1449 |
static function tab_support() {
|
1450 |
+
echo '<div class="ucp-tab-content">';
|
1451 |
echo '<h2>' . __('FAQ', 'under-construction-page') . '</h2>';
|
1452 |
|
1453 |
echo '<p><b>How can I work on my site while construction mode is enabled?</b><br>Make sure your user role (probably admin) is selected under <a class="change_tab" data-tab="3" href="#whitelisted-roles">Access - Whitelisted User Roles</a> and open the site while logged in.</p>';
|
1462 |
|
1463 |
echo '<p><b>How can I edit designs?</b><br>There is an option to add <a class="change_tab" data-tab="1" href="#custom_css">custom CSS</a>. If you want more than that you will have to edit the source files located in <code>/under-construction-page/themes/</code>.</p>';
|
1464 |
|
1465 |
+
echo '<p><b>I have disabled UCP but the under construction page is still visible. How do I remove it?</b><br>Open your site and force refresh browser cache (Ctrl or Shift + F5). If that doesn\'t help it means you have a caching plugin installed. Purge/delete cache in that plugin or disable it. If that fails too contact your hosting provider and ask to empty the site cache for you.</p>';
|
1466 |
+
|
1467 |
+
echo '<p><b>I have disabled UCP but the site\'s favicon is still the UCP logo. How do I change/remove it?</b><br>Make sure your theme has a favicon defined and empty all caches - browser and server ones. Open the site and force refresh browser cache (Ctrl or Shift + F5). If that doesn\'t help it means you have a caching plugin installed. Purge/delete cache in that plugin or disable it. If that fails too contact your hosting provider and ask to empty the site cache for you.</p>';
|
1468 |
|
1469 |
echo '<h2 id="contact">' . __('Contact Support', 'under-construction-page') . '</h2>';
|
1470 |
$user = wp_get_current_user();
|
1487 |
|
1488 |
echo '<tr valign="top">
|
1489 |
<th scope="row"><label for="support_info">Send Extra Site Info to Support Agents</label></th>
|
1490 |
+
<td>';
|
1491 |
+
echo '<div class="toggle-wrapper">
|
1492 |
+
<input type="checkbox" id="support_info" class="dn" checked type="checkbox" value="1" name="support_info">
|
1493 |
+
<label for="support_info" class="toggle"><span class="toggle_handler"></span></label>
|
1494 |
+
</div>';
|
|
|
|
|
1495 |
echo '<p class="description">Our support agents need this info to provide faster & better support. Only the following data will be added to your message;</p>';
|
1496 |
echo '<p>WordPress version: <code>' . get_bloginfo('version') . '</code><br>';
|
1497 |
echo 'UCP version: <code>' . self::$version . '</code><br>';
|
1504 |
echo '<a id="ucp-send-support-message" href="#" class="js-action button button-primary"><span class="dashicons dashicons-update"></span>Send Message to Support</a>';
|
1505 |
echo '</td></tr>';
|
1506 |
echo '</table>';
|
1507 |
+
echo '</div>';
|
1508 |
} // tab_support
|
1509 |
+
|
1510 |
+
|
1511 |
+
// tab PRO
|
1512 |
+
static function tab_pro() {
|
1513 |
+
$user = wp_get_current_user();
|
1514 |
+
|
1515 |
+
echo '<div class="ucp-tab-content">';
|
1516 |
+
echo '<h3 class="ucp-pro-logo"><img src="' . UCP_PLUGIN_URL . 'images/ucp_pro_logo.png" alt="UnderConstructionPage PRO" title="UnderConstructionPage">UnderConstructionPage<span>pro</span></h3>';
|
1517 |
+
|
1518 |
+
echo '<div id="ucp-earlybird"><span>UCP PRO comes out on October 23rd. Get on the earlybird list - get it cheaper & a week before others!</span>';
|
1519 |
+
echo '<p><input value="' . $user->user_email .'" type="email" placeholder="Your best email address" class="skip-save regular-text" id="ucp-earlybird-email"> <select id="ucp-earlybird-type"><option value="0">- How do you use UCP? Please select -</option><option value="solo-use">I use it only on one site</option><option value="multi-site">I use it on multiple sites I own</option><option value="webmaster">I use it on multiple sites I build/maintain for others</option></select> <a href="#" class="button button-primary" id="ucp-earlybird-submit">Put me on the Earlybird List!</a></p>';
|
1520 |
+
echo '</div>';
|
1521 |
+
|
1522 |
+
echo '<h3 class="ucp-small-title">Some of the features available in the PRO version</h3>';
|
1523 |
+
|
1524 |
+
echo '<div class="gmw-pro-feature">';
|
1525 |
+
echo '<span>Versatile & User-friendly Drag&Drop</span>';
|
1526 |
+
echo '<p>Need more control over your pages? Change, adjust & configure everything! From countdown timers, forms and videos, to animated backgrounds and custom layouts.</p>';
|
1527 |
+
echo '</div>';
|
1528 |
+
|
1529 |
+
echo '<div class="gmw-pro-feature">';
|
1530 |
+
echo '<span>Local Emails/Leads Storage</span>';
|
1531 |
+
echo '<p>Hate paying & setting up 3rd party autoresponder services? We have your back! No setup, no fees. All leads are stored in UCP and can easily be viewed, searched and exported.</p>';
|
1532 |
+
echo '</div>';
|
1533 |
+
|
1534 |
+
echo '<div class="gmw-pro-feature">';
|
1535 |
+
echo '<span>Native MailChimp Support</span>';
|
1536 |
+
echo '<p>Full MailChimp API support is built-in. Lists, list segments and double-optin configuration. Just enter your API key and you\'re good to collect emails.</p>';
|
1537 |
+
echo '</div>';
|
1538 |
+
|
1539 |
+
echo '<div class="gmw-pro-feature">';
|
1540 |
+
echo '<span>Universal 3rd Party Autoresponder Support</span>';
|
1541 |
+
echo '<p>Using GetResponse, ActiveCampaign, Aweber, CampaignMonitor, Drip, MadMimi or any other mailing service? No worries! They\'re fully supported too.</p>';
|
1542 |
+
echo '</div>';
|
1543 |
+
|
1544 |
+
echo '<div class="gmw-pro-feature">';
|
1545 |
+
echo '<span>Custom Private Access Links</span>';
|
1546 |
+
echo '<p>Want to show the new sparkling site only to your client? Create a private access link that expires after one session or after one day. Create as many links as you need with custom expire settings.</p>';
|
1547 |
+
echo '</div>';
|
1548 |
+
|
1549 |
+
echo '<div class="gmw-pro-feature">';
|
1550 |
+
echo '<span>Conversion Tracking</span>';
|
1551 |
+
echo '<p>Conversions from newsletter signups and contact form submits are tracked automatically but you can track any action. From button clicks to video plays. Data is sent to Google & built-in analytics.</p>';
|
1552 |
+
echo '</div>';
|
1553 |
+
|
1554 |
+
echo '<div class="gmw-pro-feature">';
|
1555 |
+
echo '<span>Track Referrals & Affiliates</span>';
|
1556 |
+
echo '<p>Create a unique access link for every referral and track how many sessions, clicks and conversions it brings in. The perfect solution for tracking quality of various traffic sources.</p>';
|
1557 |
+
echo '</div>';
|
1558 |
+
|
1559 |
+
echo '<div class="gmw-pro-feature">';
|
1560 |
+
echo '<span>+300,000 Searchable Photos Library</span>';
|
1561 |
+
echo '<p>There\'s nothing worse than searching Google just to find that the perfect image you need is either copyrighted or too small. Enjoy a huge library of 4HD+ sized images - categorised & copyright free!</p>';
|
1562 |
+
echo '</div>';
|
1563 |
+
|
1564 |
+
echo '<div class="gmw-pro-feature">';
|
1565 |
+
echo '<span>Built-in Analytics</span>';
|
1566 |
+
echo '<p>Don\'t like Google Analytics? Don\'t have time to set it up? No need to! Built-in analytics work with absolutely no setup at all. They provide a great, quick overview of your stats at a glance.</p>';
|
1567 |
+
echo '</div>';
|
1568 |
+
|
1569 |
+
echo '<div class="gmw-pro-feature">';
|
1570 |
+
echo '<span>Custom Access & Page Rules</span>';
|
1571 |
+
echo '<p>Allow visitors to view your full site based on IP, role, or username. Selected pages can be whitelisted or blacklisted so that they are always or never hidden by UCP.</p>';
|
1572 |
+
echo '</div>';
|
1573 |
+
|
1574 |
+
echo '<div class="gmw-pro-feature">';
|
1575 |
+
echo '<span>Integrated Contact Form</span>';
|
1576 |
+
echo '<p>Building a landing page? Add a contact form in a second. Besides the email you get and the confirmation email the visitor receives, the form data is saved in the site\'s database for backup.</p>';
|
1577 |
+
echo '</div>';
|
1578 |
+
|
1579 |
+
echo '<div class="gmw-pro-feature">';
|
1580 |
+
echo '<span>+100 Templates for Everything</span>';
|
1581 |
+
echo '<p>UCP PRO is so much more than an under construction page builder. Landing pages, sales pages, coming soon pages - you can build them all. Templates are available for everything.</p>';
|
1582 |
+
echo '</div>';
|
1583 |
+
|
1584 |
+
echo '<div class="gmw-pro-feature">';
|
1585 |
+
echo '<span>Extreme ease-of-use You Love</span>';
|
1586 |
+
echo '<p>You\'re busy, we know that and don\'t have time to read manuals. That\'s why we spent days optimising the GUI and default options to make everything as intuitive and easy to use as possible.</p>';
|
1587 |
+
echo '</div>';
|
1588 |
+
|
1589 |
+
echo '<div class="gmw-pro-feature">';
|
1590 |
+
echo '<span>Top-notch Quality & Continuous Updates</span>';
|
1591 |
+
echo '<p>You\'ve seen how much energy we put into the free version of UCP. We do the same with UCP PRO which means continuous updates, properly tested code and a bug-free experience.</p>';
|
1592 |
+
echo '</div>';
|
1593 |
+
|
1594 |
+
echo '<div class="gmw-pro-feature">';
|
1595 |
+
echo '<span>Superior Support</span>';
|
1596 |
+
echo '<p>We don\'t outsource support! That\'s why it\'s awesome! Super fast and friendly USA based crew is always prepared to help you. Don\'t believe us? <a class="change_tab" data-tab="4" href="#contact">Try out our support now.</a></p>';
|
1597 |
+
echo '</div>';
|
1598 |
+
|
1599 |
+
echo '</div>';
|
1600 |
+
} // tab_pro
|
1601 |
|
1602 |
|
1603 |
// output the whole options page
|
1617 |
}
|
1618 |
|
1619 |
echo '<div class="wrap">
|
1620 |
+
<h1 class="ucp-logo"><img src="' . UCP_PLUGIN_URL . 'images/ucp_logo.png" alt="UnderConstructionPage" title="UnderConstructionPage">UnderConstructionPage</h1>';
|
1621 |
|
1622 |
echo '<form action="options.php" method="post" id="ucp_form">';
|
1623 |
settings_fields(UCP_OPTIONS_KEY);
|
1628 |
$tabs[] = array('id' => 'ucp_content', 'icon' => 'dashicons-format-aside', 'class' => '', 'label' => __('Content', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_content'));
|
1629 |
$tabs[] = array('id' => 'ucp_access', 'icon' => 'dashicons-shield', 'class' => '', 'label' => __('Access', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_access'));
|
1630 |
$tabs[] = array('id' => 'ucp_support', 'icon' => 'dashicons-sos', 'class' => '', 'label' => __('Support', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_support'));
|
1631 |
+
$tabs[] = array('id' => 'ucp_pro', 'icon' => 'dashicons-star-filled', 'class' => '', 'label' => __('PRO', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_pro'));
|
1632 |
$tabs = apply_filters('ucp_tabs', $tabs);
|
1633 |
|
1634 |
echo '<div id="ucp_tabs" class="ui-tabs" style="display: none;">';
|