Version Description
- 2022/01/05
- security fixes
- added ad for our WP Force SSL plugin
Download this release
Release Info
| Developer | WebFactory |
| Plugin | |
| Version | 3.90 |
| Comparing to | |
| See all releases | |
Code changes from version 3.89 to 3.90
- css/ucp-admin.css +61 -23
- images/thumbnails/pro/animated-green.jpg +0 -0
- images/thumbnails/pro/business-statistics.jpg +0 -0
- images/thumbnails/pro/cloud-business-inc.jpg +0 -0
- images/thumbnails/pro/custom.jpg +0 -0
- images/thumbnails/pro/fitness-studio.jpg +0 -0
- images/thumbnails/pro/forest-in-the-fog.jpg +0 -0
- images/thumbnails/pro/grayscale-city.jpg +0 -0
- images/thumbnails/pro/model-portfolio.jpg +0 -0
- images/thumbnails/pro/mountain.jpg +0 -0
- images/thumbnails/pro/photography.jpg +0 -0
- images/thumbnails/pro/pink-lips.jpg +0 -0
- images/thumbnails/pro/relaxing-screensaver.jpg +0 -0
- images/thumbnails/pro/simple-beige.jpg +0 -0
- images/thumbnails/pro/simple-office-theme.jpg +0 -0
- images/thumbnails/pro/small-office.jpg +0 -0
- images/thumbnails/pro/smoothie.jpg +0 -0
- images/thumbnails/pro/soothing-nature.jpg +0 -0
- images/thumbnails/pro/sport-shop.jpg +0 -0
- images/thumbnails/pro/stunning-nature.jpg +0 -0
- images/thumbnails/pro/sunset.jpg +0 -0
- images/thumbnails/pro/travel-blog.jpg +0 -0
- images/thumbnails/pro/watch-company.jpg +0 -0
- images/thumbnails/pro/wedding.jpg +0 -0
- images/wp-force-ssl-logo.png +0 -0
- js/ucp-admin-pointers.js +1 -1
- js/ucp-admin.js +26 -1
- js/ucp-jquery-plugins.js +1 -1
- readme.txt +8 -2
- ucp-license.php +1 -1
- under-construction.php +2379 -1911
- wf-flyout/config.php +2 -1
- wf-flyout/icons/wp-ssl.png +0 -0
- wf-flyout/wf-flyout.css +1 -1
- wf-flyout/wf-flyout.js +1 -1
- wf-flyout/wf-flyout.php +3 -3
css/ucp-admin.css
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
/*
|
| 2 |
* UnderConstructionPage
|
| 3 |
* Main backend CSS
|
| 4 |
-
* (c) Web factory Ltd, 2015 -
|
| 5 |
*/
|
| 6 |
|
| 7 |
-
@import url(
|
| 8 |
|
| 9 |
.settings_page_ucp .button-primary,
|
| 10 |
.settings_page_ucp .button.button-primary {
|
|
@@ -180,7 +180,7 @@ div.ucp-thumb .ribbon::before,
|
|
| 180 |
div.ucp-thumb .ribbon::after {
|
| 181 |
position: absolute;
|
| 182 |
z-index: -1;
|
| 183 |
-
content:
|
| 184 |
display: block;
|
| 185 |
}
|
| 186 |
div.ucp-thumb .ribbon i {
|
|
@@ -260,9 +260,9 @@ div.ucp-thumb img,
|
|
| 260 |
line-height: 150%;
|
| 261 |
}
|
| 262 |
|
| 263 |
-
input[type=
|
| 264 |
-
input[type=
|
| 265 |
-
input[type=
|
| 266 |
border-color: #ea1919;
|
| 267 |
-webkit-box-shadow: 0 0 2px rgba(234, 25, 25, 1);
|
| 268 |
box-shadow: 0 0 2px rgba(234, 25, 25, 1);
|
|
@@ -313,10 +313,7 @@ input.datepicker {
|
|
| 313 |
background-color: #ffffff;
|
| 314 |
}
|
| 315 |
|
| 316 |
-
.select2-container--default
|
| 317 |
-
.select2-selection--multiple
|
| 318 |
-
.select2-selection__rendered
|
| 319 |
-
li {
|
| 320 |
margin-top: 6px;
|
| 321 |
margin-bottom: 0px;
|
| 322 |
}
|
|
@@ -325,7 +322,7 @@ span.select2-container .select2-search--inline .select2-search__field {
|
|
| 325 |
margin-top: 0px;
|
| 326 |
}
|
| 327 |
|
| 328 |
-
.select2-container .select2-search__field:not([placeholder=
|
| 329 |
width: 100% !important;
|
| 330 |
margin-right: 100000px;
|
| 331 |
}
|
|
@@ -439,7 +436,7 @@ span.select2-container .select2-search--inline .select2-search__field {
|
|
| 439 |
}
|
| 440 |
|
| 441 |
@media screen and (max-width: 782px) {
|
| 442 |
-
.settings_page_ucp input[type=
|
| 443 |
max-width: 80%;
|
| 444 |
display: inline-block;
|
| 445 |
}
|
|
@@ -456,7 +453,8 @@ span.select2-container .select2-search--inline .select2-search__field {
|
|
| 456 |
/* tabs */
|
| 457 |
|
| 458 |
.settings_page_ucp .ui-tabs {
|
| 459 |
-
max-width:
|
|
|
|
| 460 |
position: relative;
|
| 461 |
padding: 0px;
|
| 462 |
zoom: 1;
|
|
@@ -493,11 +491,7 @@ span.select2-container .select2-search--inline .select2-search__field {
|
|
| 493 |
cursor: text;
|
| 494 |
}
|
| 495 |
.settings_page_ucp .ui-tabs .ui-tabs-nav li a,
|
| 496 |
-
.settings_page_ucp
|
| 497 |
-
.ui-tabs.ui-tabs-collapsible
|
| 498 |
-
.ui-tabs-nav
|
| 499 |
-
li.ui-tabs-selected
|
| 500 |
-
a {
|
| 501 |
cursor: pointer;
|
| 502 |
} /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
| 503 |
.settings_page_ucp .ui-tabs .ui-tabs-panel {
|
|
@@ -525,7 +519,7 @@ span.select2-container .select2-search--inline .select2-search__field {
|
|
| 525 |
}
|
| 526 |
|
| 527 |
.settings_page_ucp .ui-tabs-nav:after {
|
| 528 |
-
content:
|
| 529 |
clear: both;
|
| 530 |
display: block;
|
| 531 |
}
|
|
@@ -636,7 +630,7 @@ span.select2-container .select2-search--inline .select2-search__field {
|
|
| 636 |
|
| 637 |
s.settings_page_ucp .ucp-tabs-2nd-level li.ui-state-active a:before {
|
| 638 |
display: inline-block;
|
| 639 |
-
content:
|
| 640 |
position: absolute;
|
| 641 |
width: 100%;
|
| 642 |
height: 2px;
|
|
@@ -759,7 +753,7 @@ Any+Time is a trademark of Andrew M. Andrews III */
|
|
| 759 |
width: 20em;
|
| 760 |
}
|
| 761 |
.AnyTime-pkr .AnyTime-mons:after {
|
| 762 |
-
content:
|
| 763 |
display: table;
|
| 764 |
clear: both;
|
| 765 |
}
|
|
@@ -937,12 +931,12 @@ Any+Time is a trademark of Andrew M. Andrews III */
|
|
| 937 |
transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
|
| 938 |
}
|
| 939 |
.toggle-wrapper .toggle:before {
|
| 940 |
-
content:
|
| 941 |
left: 18px;
|
| 942 |
color: #ffffff;
|
| 943 |
}
|
| 944 |
.toggle-wrapper .toggle:after {
|
| 945 |
-
content:
|
| 946 |
right: 20px;
|
| 947 |
color: #23282d;
|
| 948 |
}
|
|
@@ -1262,3 +1256,47 @@ option.weglot-promo {
|
|
| 1262 |
.settings_page_ucp div.fs-notice {
|
| 1263 |
display: none !important;
|
| 1264 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
/*
|
| 2 |
* UnderConstructionPage
|
| 3 |
* Main backend CSS
|
| 4 |
+
* (c) Web factory Ltd, 2015 - 2022
|
| 5 |
*/
|
| 6 |
|
| 7 |
+
@import url('//fonts.googleapis.com/css?family=Roboto:900');
|
| 8 |
|
| 9 |
.settings_page_ucp .button-primary,
|
| 10 |
.settings_page_ucp .button.button-primary {
|
| 180 |
div.ucp-thumb .ribbon::after {
|
| 181 |
position: absolute;
|
| 182 |
z-index: -1;
|
| 183 |
+
content: '';
|
| 184 |
display: block;
|
| 185 |
}
|
| 186 |
div.ucp-thumb .ribbon i {
|
| 260 |
line-height: 150%;
|
| 261 |
}
|
| 262 |
|
| 263 |
+
input[type='url']:invalid,
|
| 264 |
+
input[type='email']:invalid,
|
| 265 |
+
input[type='tel']:invalid {
|
| 266 |
border-color: #ea1919;
|
| 267 |
-webkit-box-shadow: 0 0 2px rgba(234, 25, 25, 1);
|
| 268 |
box-shadow: 0 0 2px rgba(234, 25, 25, 1);
|
| 313 |
background-color: #ffffff;
|
| 314 |
}
|
| 315 |
|
| 316 |
+
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
|
|
|
|
|
|
|
|
|
| 317 |
margin-top: 6px;
|
| 318 |
margin-bottom: 0px;
|
| 319 |
}
|
| 322 |
margin-top: 0px;
|
| 323 |
}
|
| 324 |
|
| 325 |
+
.select2-container .select2-search__field:not([placeholder='']) {
|
| 326 |
width: 100% !important;
|
| 327 |
margin-right: 100000px;
|
| 328 |
}
|
| 436 |
}
|
| 437 |
|
| 438 |
@media screen and (max-width: 782px) {
|
| 439 |
+
.settings_page_ucp input[type='text'].datepicker {
|
| 440 |
max-width: 80%;
|
| 441 |
display: inline-block;
|
| 442 |
}
|
| 453 |
/* tabs */
|
| 454 |
|
| 455 |
.settings_page_ucp .ui-tabs {
|
| 456 |
+
max-width: 1000px;
|
| 457 |
+
width: 100%;
|
| 458 |
position: relative;
|
| 459 |
padding: 0px;
|
| 460 |
zoom: 1;
|
| 491 |
cursor: text;
|
| 492 |
}
|
| 493 |
.settings_page_ucp .ui-tabs .ui-tabs-nav li a,
|
| 494 |
+
.settings_page_ucp .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 495 |
cursor: pointer;
|
| 496 |
} /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
| 497 |
.settings_page_ucp .ui-tabs .ui-tabs-panel {
|
| 519 |
}
|
| 520 |
|
| 521 |
.settings_page_ucp .ui-tabs-nav:after {
|
| 522 |
+
content: '';
|
| 523 |
clear: both;
|
| 524 |
display: block;
|
| 525 |
}
|
| 630 |
|
| 631 |
s.settings_page_ucp .ucp-tabs-2nd-level li.ui-state-active a:before {
|
| 632 |
display: inline-block;
|
| 633 |
+
content: ' ';
|
| 634 |
position: absolute;
|
| 635 |
width: 100%;
|
| 636 |
height: 2px;
|
| 753 |
width: 20em;
|
| 754 |
}
|
| 755 |
.AnyTime-pkr .AnyTime-mons:after {
|
| 756 |
+
content: '';
|
| 757 |
display: table;
|
| 758 |
clear: both;
|
| 759 |
}
|
| 931 |
transition: all 200ms cubic-bezier(0.445, 0.05, 0.55, 0.95);
|
| 932 |
}
|
| 933 |
.toggle-wrapper .toggle:before {
|
| 934 |
+
content: 'OFF';
|
| 935 |
left: 18px;
|
| 936 |
color: #ffffff;
|
| 937 |
}
|
| 938 |
.toggle-wrapper .toggle:after {
|
| 939 |
+
content: 'ON';
|
| 940 |
right: 20px;
|
| 941 |
color: #23282d;
|
| 942 |
}
|
| 1256 |
.settings_page_ucp div.fs-notice {
|
| 1257 |
display: none !important;
|
| 1258 |
}
|
| 1259 |
+
|
| 1260 |
+
#wpfssl-ad {
|
| 1261 |
+
border: 3px solid #42982e;
|
| 1262 |
+
min-width: 300px;
|
| 1263 |
+
max-width: 400px;
|
| 1264 |
+
padding: 10px 20px;
|
| 1265 |
+
background: white;
|
| 1266 |
+
position: absolute;
|
| 1267 |
+
top: 160px;
|
| 1268 |
+
left: 1030px;
|
| 1269 |
+
sdisplay: none;
|
| 1270 |
+
}
|
| 1271 |
+
|
| 1272 |
+
@media screen and (max-width: 1600px) {
|
| 1273 |
+
#wpfssl-ad {
|
| 1274 |
+
display: none !important;
|
| 1275 |
+
}
|
| 1276 |
+
}
|
| 1277 |
+
|
| 1278 |
+
#wpfssl-ad a.button {
|
| 1279 |
+
padding: 11px 20px;
|
| 1280 |
+
color: white;
|
| 1281 |
+
background: #42982e;
|
| 1282 |
+
font-weight: 600;
|
| 1283 |
+
border: none;
|
| 1284 |
+
line-height: 1.5;
|
| 1285 |
+
height: auto;
|
| 1286 |
+
margin-bottom: 10px;
|
| 1287 |
+
white-space: normal;
|
| 1288 |
+
max-width: 90%;
|
| 1289 |
+
}
|
| 1290 |
+
|
| 1291 |
+
#wpfssl-ad a.button:hover,
|
| 1292 |
+
#wpfssl-ad a.button:active,
|
| 1293 |
+
#wpfssl-ad a.button:focus {
|
| 1294 |
+
box-shadow: 0px 0px 10px 0px rgb(50 138 210 / 52%);
|
| 1295 |
+
background: #42982e;
|
| 1296 |
+
color: white;
|
| 1297 |
+
border: none;
|
| 1298 |
+
}
|
| 1299 |
+
|
| 1300 |
+
.textcenter {
|
| 1301 |
+
text-align: center;
|
| 1302 |
+
}
|
images/thumbnails/pro/animated-green.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/business-statistics.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/cloud-business-inc.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/custom.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/fitness-studio.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/forest-in-the-fog.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/grayscale-city.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/model-portfolio.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/mountain.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/photography.jpg
ADDED
|
Binary file
|
images/thumbnails/pro/pink-lips.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/relaxing-screensaver.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/simple-beige.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/simple-office-theme.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/small-office.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/smoothie.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/soothing-nature.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/sport-shop.jpg
ADDED
|
Binary file
|
images/thumbnails/pro/stunning-nature.jpg
ADDED
|
Binary file
|
images/thumbnails/pro/sunset.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/travel-blog.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/watch-company.jpg
CHANGED
|
Binary file
|
images/thumbnails/pro/wedding.jpg
CHANGED
|
Binary file
|
images/wp-force-ssl-logo.png
ADDED
|
Binary file
|
js/ucp-admin-pointers.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
/*
|
| 2 |
* UnderConstructionPage
|
| 3 |
* Backend GUI pointers
|
| 4 |
-
* (c) WebFactory Ltd, 2015 -
|
| 5 |
*/
|
| 6 |
|
| 7 |
|
| 1 |
/*
|
| 2 |
* UnderConstructionPage
|
| 3 |
* Backend GUI pointers
|
| 4 |
+
* (c) WebFactory Ltd, 2015 - 2022
|
| 5 |
*/
|
| 6 |
|
| 7 |
|
js/ucp-admin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
/*
|
| 2 |
* UnderConstructionPage
|
| 3 |
* Main backend JS
|
| 4 |
-
* (c) WebFactory Ltd, 2015 -
|
| 5 |
*/
|
| 6 |
|
| 7 |
|
|
@@ -462,6 +462,31 @@ jQuery(document).ready(function($) {
|
|
| 462 |
if (ucp.promo_countdown) {
|
| 463 |
ucp_countdown_interval = setInterval(ucp_update_timer, 1000);
|
| 464 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 465 |
}); // on ready
|
| 466 |
|
| 467 |
|
| 1 |
/*
|
| 2 |
* UnderConstructionPage
|
| 3 |
* Main backend JS
|
| 4 |
+
* (c) WebFactory Ltd, 2015 - 2022
|
| 5 |
*/
|
| 6 |
|
| 7 |
|
| 462 |
if (ucp.promo_countdown) {
|
| 463 |
ucp_countdown_interval = setInterval(ucp_update_timer, 1000);
|
| 464 |
}
|
| 465 |
+
|
| 466 |
+
function ucp_position_wpfssl_ad() {
|
| 467 |
+
pos_left = Math.round($('#ucp_tabs').width()) + 40;
|
| 468 |
+
pos_top = Math.round($('#ucp_tabs').offset().top) + 45;
|
| 469 |
+
|
| 470 |
+
$('#wpfssl-ad').css('top', pos_top + 'px').css('left', pos_left + 'px');
|
| 471 |
+
$('#wpfssl-ad').show();
|
| 472 |
+
} // ucp_position_wpfssl_ad
|
| 473 |
+
|
| 474 |
+
ucp_position_wpfssl_ad();
|
| 475 |
+
$(window).on('resize', function() {
|
| 476 |
+
ucp_position_wpfssl_ad();
|
| 477 |
+
})
|
| 478 |
+
|
| 479 |
+
$('.install-wpfssl').on('click',function(e){
|
| 480 |
+
if (!confirm('The free WP Force SSL plugin will be installed & activated from the official WordPress repository.')) {
|
| 481 |
+
return;
|
| 482 |
+
}
|
| 483 |
+
|
| 484 |
+
jQuery('body').append('<div style="width:550px;height:450px; position:fixed;top:10%;left:50%;margin-left:-275px; color:#444; background-color: #fbfbfb;border:1px solid #DDD; border-radius:4px;box-shadow: 0px 0px 0px 4000px rgba(0, 0, 0, 0.85);z-index: 9999999;"><iframe src="' + ucp.wpfssl_install_url + '" style="width:100%;height:100%;border:none;" /></div>');
|
| 485 |
+
jQuery('#wpwrap').css('pointer-events', 'none');
|
| 486 |
+
|
| 487 |
+
e.preventDefault();
|
| 488 |
+
return false;
|
| 489 |
+
});
|
| 490 |
}); // on ready
|
| 491 |
|
| 492 |
|
js/ucp-jquery-plugins.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
/*
|
| 2 |
* UnderConstructionPage
|
| 3 |
* jQuery plugins
|
| 4 |
-
* (c) WebFactory Ltd, 2015 -
|
| 5 |
*/
|
| 6 |
|
| 7 |
/**
|
| 1 |
/*
|
| 2 |
* UnderConstructionPage
|
| 3 |
* jQuery plugins
|
| 4 |
+
* (c) WebFactory Ltd, 2015 - 2022
|
| 5 |
*/
|
| 6 |
|
| 7 |
/**
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Tags: coming soon page, under construction mode, under construction, under const
|
|
| 4 |
Requires at least: 4.0
|
| 5 |
Requires PHP: 5.2
|
| 6 |
Tested up to: 5.8
|
| 7 |
-
Stable tag: 3.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
|
@@ -17,12 +17,13 @@ Create an Under Construction Page, Maintenance Mode Page, Coming Soon Page or a
|
|
| 17 |
|
| 18 |
[youtube https://www.youtube.com/watch?v=fqqWrQENSDc]
|
| 19 |
|
| 20 |
-
> **PRO** version offers more than 50 extra features and options including the drag&drop builder, over a million hi-res searchable images,
|
| 21 |
|
| 22 |
A simple, no-nonsense under construction plugin for all those situations when you have to hide the site behind an Under Construction page for a while. Live examples are available on the <a href="https://underconstructionpage.com/">Under Construction website</a>. Give us a shout on Twitter <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a> or check out the <a href="https://youtu.be/fqqWrQENSDc">video</a>.
|
| 23 |
|
| 24 |
Thanks to our partnership with <a href="https://wordpress.org/plugins/weglot/">Weglot</a>, UCP is fully multilanguage ready and you can instantly translate your under construction page to 100+ languages with one click.
|
| 25 |
|
|
|
|
| 26 |
|
| 27 |
**Options**
|
| 28 |
|
|
@@ -134,6 +135,11 @@ Or if needed, upload manually;
|
|
| 134 |
|
| 135 |
== Changelog ==
|
| 136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
= 3.89 =
|
| 138 |
* 2021/07/23
|
| 139 |
* bug fix for Weglot
|
| 4 |
Requires at least: 4.0
|
| 5 |
Requires PHP: 5.2
|
| 6 |
Tested up to: 5.8
|
| 7 |
+
Stable tag: 3.90
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
| 17 |
|
| 18 |
[youtube https://www.youtube.com/watch?v=fqqWrQENSDc]
|
| 19 |
|
| 20 |
+
> **PRO** version offers more than 50 extra features and options including the drag&drop builder, over a million hi-res searchable images, 300+ templates, affiliate&traffic tracking, advanced access control, MailChimp, Zapier & universal autoresponder integration, white-label license mode and priority support. Find out more on the <a href="https://underconstructionpage.com/">official plugin site</a>.
|
| 21 |
|
| 22 |
A simple, no-nonsense under construction plugin for all those situations when you have to hide the site behind an Under Construction page for a while. Live examples are available on the <a href="https://underconstructionpage.com/">Under Construction website</a>. Give us a shout on Twitter <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a> or check out the <a href="https://youtu.be/fqqWrQENSDc">video</a>.
|
| 23 |
|
| 24 |
Thanks to our partnership with <a href="https://wordpress.org/plugins/weglot/">Weglot</a>, UCP is fully multilanguage ready and you can instantly translate your under construction page to 100+ languages with one click.
|
| 25 |
|
| 26 |
+
If you're having problems with SSL or HTTPS try our free <a href="https://wordpress.org/plugins/wp-force-ssl/">WP Force SSL</a> plugin. It's a great plugin to enable SSL.
|
| 27 |
|
| 28 |
**Options**
|
| 29 |
|
| 135 |
|
| 136 |
== Changelog ==
|
| 137 |
|
| 138 |
+
= 3.90 =
|
| 139 |
+
* 2022/01/05
|
| 140 |
+
* security fixes
|
| 141 |
+
* added ad for our WP Force SSL plugin
|
| 142 |
+
|
| 143 |
= 3.89 =
|
| 144 |
* 2021/07/23
|
| 145 |
* bug fix for Weglot
|
ucp-license.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
/*
|
| 3 |
* UnderConstructionPage
|
| 4 |
* PRO license related functions
|
| 5 |
-
* (c) WebFactory Ltd, 2015 -
|
| 6 |
*/
|
| 7 |
|
| 8 |
class UCP_license extends UCP {
|
| 2 |
/*
|
| 3 |
* UnderConstructionPage
|
| 4 |
* PRO license related functions
|
| 5 |
+
* (c) WebFactory Ltd, 2015 - 2022
|
| 6 |
*/
|
| 7 |
|
| 8 |
class UCP_license extends UCP {
|
under-construction.php
CHANGED
|
@@ -4,14 +4,14 @@
|
|
| 4 |
Plugin URI: https://underconstructionpage.com/
|
| 5 |
Description: Put your site behind a great looking under construction, coming soon, maintenance mode or landing page.
|
| 6 |
Author: WebFactory Ltd
|
| 7 |
-
Version: 3.
|
| 8 |
Requires at least: 4.0
|
| 9 |
Requires PHP: 5.2
|
| 10 |
Tested up to: 5.8
|
| 11 |
Author URI: https://www.webfactoryltd.com/
|
| 12 |
Text Domain: under-construction-page
|
| 13 |
|
| 14 |
-
Copyright 2015 -
|
| 15 |
|
| 16 |
This program is free software; you can redistribute it and/or modify
|
| 17 |
it under the terms of the GNU General Public License, version 2, as
|
|
@@ -29,7 +29,7 @@
|
|
| 29 |
|
| 30 |
// this is an include only WP file
|
| 31 |
if (!defined('ABSPATH')) {
|
| 32 |
-
|
| 33 |
}
|
| 34 |
|
| 35 |
|
|
@@ -48,551 +48,584 @@ require_once UCP_PLUGIN_DIR . 'ucp-license.php';
|
|
| 48 |
|
| 49 |
|
| 50 |
// main plugin class
|
| 51 |
-
class UCP
|
| 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 |
-
// disable feeds
|
| 112 |
-
add_action('do_feed_rdf', array(__CLASS__, 'disable_feed'), 0, 1);
|
| 113 |
-
add_action('do_feed_rss', array(__CLASS__, 'disable_feed'), 0, 1);
|
| 114 |
-
add_action('do_feed_rss2', array(__CLASS__, 'disable_feed'), 0, 1);
|
| 115 |
-
add_action('do_feed_atom', array(__CLASS__, 'disable_feed'), 0, 1);
|
| 116 |
-
|
| 117 |
-
add_action('wp_footer', array(__CLASS__, 'whitelisted_notice'));
|
| 118 |
-
} // if not admin
|
| 119 |
-
|
| 120 |
-
// admin bar notice for frontend & backend
|
| 121 |
-
add_action('wp_before_admin_bar_render', array(__CLASS__, 'admin_bar'));
|
| 122 |
-
add_action('wp_head', array(__CLASS__, 'admin_bar_style'));
|
| 123 |
-
add_action('admin_head', array(__CLASS__, 'admin_bar_style'));
|
| 124 |
-
|
| 125 |
-
UCP_license::init();
|
| 126 |
-
} // init
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
// check if user has the minimal WP version required by UCP
|
| 130 |
-
static function check_wp_version($min_version) {
|
| 131 |
-
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
| 132 |
-
add_action('admin_notices', array(__CLASS__, 'notice_min_wp_version'));
|
| 133 |
-
return false;
|
| 134 |
-
} else {
|
| 135 |
-
return true;
|
| 136 |
-
}
|
| 137 |
-
} // check_wp_version
|
| 138 |
|
|
|
|
|
|
|
| 139 |
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
|
|
|
| 144 |
|
|
|
|
|
|
|
| 145 |
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
|
|
|
| 149 |
|
| 150 |
-
|
| 151 |
-
|
| 152 |
|
| 153 |
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
|
| 159 |
-
// added in v1.70 to rename roles to whitelisted_roles
|
| 160 |
-
if (isset($options['roles'])) {
|
| 161 |
-
$options['whitelisted_roles'] = $options['roles'];
|
| 162 |
-
unset($options['roles']);
|
| 163 |
-
update_option(UCP_OPTIONS_KEY, $options);
|
| 164 |
-
}
|
| 165 |
|
| 166 |
-
//
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
|
|
|
| 170 |
|
| 171 |
-
if (get_option('set_size') || get_option('set_tweet') || get_option('set_fb') || get_option('set_font') || get_option('set_msg') || get_option('set_opt') || get_option('set_admin')) {
|
| 172 |
-
// convert old options to new
|
| 173 |
-
$options['status'] = (get_option('set_opt') === 'Yes')? '1': '0';
|
| 174 |
-
$options['content'] = trim(get_option('set_msg'));
|
| 175 |
-
$options['whitelisted_roles'] = (get_option('set_admin') === 'No')? array('administrator'): array();
|
| 176 |
-
$options['social_facebook'] = trim(get_option('set_fb'));
|
| 177 |
-
$options['social_twitter'] = trim(get_option('set_tweet'));
|
| 178 |
-
update_option(UCP_OPTIONS_KEY, $options);
|
| 179 |
-
|
| 180 |
-
delete_option('set_size');
|
| 181 |
-
delete_option('set_tweet');
|
| 182 |
-
delete_option('set_fb');
|
| 183 |
-
delete_option('set_font');
|
| 184 |
-
delete_option('set_msg');
|
| 185 |
-
delete_option('set_opt');
|
| 186 |
-
delete_option('set_admin');
|
| 187 |
-
|
| 188 |
-
self::reset_pointers();
|
| 189 |
-
}
|
| 190 |
|
| 191 |
-
//
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
|
|
|
|
|
|
|
| 196 |
|
| 197 |
-
// get plugin's options
|
| 198 |
-
static function get_options() {
|
| 199 |
-
$options = get_option(UCP_OPTIONS_KEY, array());
|
| 200 |
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
|
|
|
| 205 |
|
| 206 |
-
|
| 207 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 208 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 213 |
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
}
|
| 219 |
|
| 220 |
-
return $meta;
|
| 221 |
-
} // get_meta
|
| 222 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 223 |
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
return false;
|
| 232 |
-
}
|
| 233 |
-
if (defined('DOING_AJAX') && DOING_AJAX) {
|
| 234 |
-
return false;
|
| 235 |
-
}
|
| 236 |
-
if (defined('WP_CLI') && WP_CLI) {
|
| 237 |
-
return false;
|
| 238 |
-
}
|
| 239 |
|
| 240 |
-
// some URLs have to be accessible at all times
|
| 241 |
-
if ($request_uri == '/wp-admin/' ||
|
| 242 |
-
$request_uri == '/feed/' ||
|
| 243 |
-
$request_uri == '/feed/rss/' ||
|
| 244 |
-
$request_uri == '/feed/rss2/' ||
|
| 245 |
-
$request_uri == '/feed/rdf/' ||
|
| 246 |
-
$request_uri == '/feed/atom/' ||
|
| 247 |
-
$request_uri == '/admin/' ||
|
| 248 |
-
$request_uri == '/wp-login.php') {
|
| 249 |
-
return;
|
| 250 |
-
}
|
| 251 |
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
} else {
|
| 257 |
-
header('Retry-After: ' . DAY_IN_SECONDS);
|
| 258 |
-
}
|
| 259 |
-
|
| 260 |
-
$themes = self::get_themes();
|
| 261 |
-
if (!empty($_GET['theme']) && substr($_GET['theme'], 5) != '_pro_' && !empty($themes[$_GET['theme']])) {
|
| 262 |
-
$theme = $_GET['theme'];
|
| 263 |
-
} else {
|
| 264 |
-
$theme = $options['theme'];
|
| 265 |
-
}
|
| 266 |
-
|
| 267 |
-
echo self::get_template($theme);
|
| 268 |
-
die();
|
| 269 |
-
}
|
| 270 |
-
} // display_construction_page
|
| 271 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 272 |
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
$protocol = $_SERVER['SERVER_PROTOCOL'];
|
| 276 |
-
if (!in_array($protocol, array('HTTP/1.1', 'HTTP/2', 'HTTP/2.0'))) {
|
| 277 |
-
$protocol = 'HTTP/1.0';
|
| 278 |
-
}
|
| 279 |
|
| 280 |
-
return $protocol;
|
| 281 |
-
} // wp_get_server_protocol
|
| 282 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 283 |
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
|
|
|
|
|
|
|
|
|
| 291 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 292 |
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 298 |
|
| 299 |
-
// auto remove welcome pointer when options are opened
|
| 300 |
-
if (self::is_plugin_page()) {
|
| 301 |
-
unset($pointers['welcome']);
|
| 302 |
-
update_option(UCP_POINTERS_KEY, $pointers);
|
| 303 |
-
}
|
| 304 |
|
| 305 |
-
//
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
$countdown = $meta['first_install'] + HOUR_IN_SECONDS;
|
| 316 |
-
} else {
|
| 317 |
-
$countdown = 0;
|
| 318 |
-
}
|
| 319 |
|
| 320 |
-
$js_localize = array('undocumented_error' => __('An undocumented error has occured. Please refresh the page and try again.', 'under-construction-page'),
|
| 321 |
-
'plugin_name' => __('UnderConstructionPage', 'under-construction-page'),
|
| 322 |
-
'settings_url' => admin_url('options-general.php?page=ucp'),
|
| 323 |
-
'whitelisted_users_placeholder' => __('Select whitelisted user(s)', 'under-construction-page'),
|
| 324 |
-
'open_survey' => $open_survey,
|
| 325 |
-
'promo_countdown' => $countdown,
|
| 326 |
-
'is_activated' => UCP_license::is_activated(),
|
| 327 |
-
'dialog_upsell_title' => '<img alt="' . __('UnderConstructionPage PRO', 'under-construction-page') . '" title="' . __('UnderConstructionPage PRO', 'under-construction-page') . '" src="' . UCP_PLUGIN_URL . 'images/ucp_pro_logo_white.png' . '">',
|
| 328 |
-
'weglot_dialog_upsell_title' => '<img alt="' . __('Weglot', 'under-construction-page') . '" title="' . __('Weglot', 'under-construction-page') . '" src="' . UCP_PLUGIN_URL . 'images/weglot-logo-white.png' . '">',
|
| 329 |
-
'weglot_install_url' => add_query_arg(array('action' => 'install_weglot'), admin_url('admin.php')),
|
| 330 |
-
'nonce_dismiss_survey' => wp_create_nonce('ucp_dismiss_survey'),
|
| 331 |
-
'nonce_submit_survey' => wp_create_nonce('ucp_submit_survey'),
|
| 332 |
-
'nonce_submit_support_message' => wp_create_nonce('ucp_submit_support_message'),
|
| 333 |
-
'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'));
|
| 334 |
-
|
| 335 |
-
if (self::is_plugin_page()) {
|
| 336 |
-
remove_editor_styles();
|
| 337 |
-
wp_enqueue_style('wp-jquery-ui-dialog');
|
| 338 |
-
wp_enqueue_style('ucp-select2', UCP_PLUGIN_URL . 'css/select2.min.css', array(), self::$version);
|
| 339 |
-
wp_enqueue_style('ucp-admin', UCP_PLUGIN_URL . 'css/ucp-admin.css', array(), self::$version);
|
| 340 |
-
|
| 341 |
-
wp_enqueue_script('jquery-ui-tabs');
|
| 342 |
-
wp_enqueue_script('jquery-ui-dialog');
|
| 343 |
-
wp_enqueue_script('ucp-jquery-plugins', UCP_PLUGIN_URL . 'js/ucp-jquery-plugins.js', array('jquery'), self::$version, true);
|
| 344 |
-
wp_enqueue_script('ucp-select2', UCP_PLUGIN_URL . 'js/select2.min.js', array(), self::$version, true);
|
| 345 |
-
wp_enqueue_script('ucp-admin', UCP_PLUGIN_URL . 'js/ucp-admin.js', array('jquery'), self::$version, true);
|
| 346 |
-
wp_localize_script('ucp-admin', 'ucp', $js_localize);
|
| 347 |
-
|
| 348 |
-
// fix for agressive plugins
|
| 349 |
-
wp_dequeue_style('uiStyleSheet');
|
| 350 |
-
wp_dequeue_style('wpcufpnAdmin' );
|
| 351 |
-
wp_dequeue_style('unifStyleSheet' );
|
| 352 |
-
wp_dequeue_style('wpcufpn_codemirror');
|
| 353 |
-
wp_dequeue_style('wpcufpn_codemirrorTheme');
|
| 354 |
-
wp_dequeue_style('collapse-admin-css');
|
| 355 |
-
wp_dequeue_style('jquery-ui-css');
|
| 356 |
-
wp_dequeue_style('tribe-common-admin');
|
| 357 |
-
wp_dequeue_style('file-manager__jquery-ui-css');
|
| 358 |
-
wp_dequeue_style('file-manager__jquery-ui-css-theme');
|
| 359 |
-
wp_dequeue_style('wpmegmaps-jqueryui');
|
| 360 |
-
wp_dequeue_style('wp-botwatch-css');
|
| 361 |
-
}
|
| 362 |
|
| 363 |
-
if
|
| 364 |
-
|
| 365 |
-
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
}
|
| 371 |
-
} // admin_enqueue_scripts
|
| 372 |
|
| 373 |
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
|
|
|
|
|
|
|
|
|
|
| 377 |
|
| 378 |
-
|
| 379 |
-
|
|
|
|
|
|
|
|
|
|
| 380 |
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 384 |
|
| 385 |
-
|
| 386 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 387 |
|
| 388 |
-
|
| 389 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 390 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 391 |
|
| 392 |
-
// permanently dismiss a survey
|
| 393 |
-
static function dismiss_survey_ajax() {
|
| 394 |
-
check_ajax_referer('ucp_dismiss_survey');
|
| 395 |
|
| 396 |
-
|
| 397 |
-
|
|
|
|
|
|
|
| 398 |
|
| 399 |
-
|
| 400 |
-
|
| 401 |
|
| 402 |
-
|
| 403 |
-
|
|
|
|
| 404 |
|
|
|
|
|
|
|
| 405 |
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
check_ajax_referer('ucp_submit_support_message');
|
| 409 |
|
| 410 |
-
$options = self::get_options();
|
| 411 |
|
| 412 |
-
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
|
| 416 |
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
$body = $message;
|
| 420 |
-
if (!empty($_POST['support_info'])) {
|
| 421 |
-
$theme = wp_get_theme();
|
| 422 |
-
$body .= "\r\n\r\nSite details:\r\n";
|
| 423 |
-
$body .= ' WordPress version: ' . get_bloginfo('version') . "\r\n";
|
| 424 |
-
$body .= ' UCP version: ' . self::$version . "\r\n";
|
| 425 |
-
$body .= ' PHP version: ' . PHP_VERSION . "\r\n";
|
| 426 |
-
$body .= ' Site URL: ' . get_bloginfo('url') . "\r\n";
|
| 427 |
-
$body .= ' WordPress URL: ' . get_bloginfo('wpurl') . "\r\n";
|
| 428 |
-
$body .= ' Theme: ' . $theme->get('Name') . ' v' . $theme->get('Version') . "\r\n";
|
| 429 |
-
$body .= ' Options: ' . "\r\n" . serialize($options) . "\r\n";
|
| 430 |
-
}
|
| 431 |
-
$headers = 'From: ' . $email . "\r\n" . 'Reply-To: ' . $email;
|
| 432 |
|
| 433 |
-
|
| 434 |
-
|
| 435 |
-
} else {
|
| 436 |
-
wp_send_json_error(__('Something is not right with your wp_mail() function. Please email as at ucp@webfactoryltd.com.', 'under-construction-page'));
|
| 437 |
-
}
|
| 438 |
-
} // submit_support_message
|
| 439 |
|
|
|
|
|
|
|
| 440 |
|
| 441 |
-
// submit survey
|
| 442 |
-
static function submit_survey_ajax() {
|
| 443 |
-
check_ajax_referer('ucp_submit_survey');
|
| 444 |
|
| 445 |
-
|
| 446 |
-
|
| 447 |
-
|
|
|
|
| 448 |
|
| 449 |
-
|
| 450 |
-
$vars['answers'] = trim($vars['answers'], ',');
|
| 451 |
-
$vars['custom_answer'] = trim(strip_tags($vars['custom_answer']));
|
| 452 |
|
| 453 |
-
|
| 454 |
-
|
|
|
|
|
|
|
| 455 |
|
| 456 |
-
|
| 457 |
-
|
| 458 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 459 |
|
| 460 |
-
|
| 461 |
-
|
| 462 |
-
|
| 463 |
-
|
| 464 |
-
|
| 465 |
-
|
| 466 |
-
'first_version' => $meta['first_version'],
|
| 467 |
-
'version' => UCP::$version,
|
| 468 |
-
'codebase' => 'free',
|
| 469 |
-
'site' => get_home_url());
|
| 470 |
-
|
| 471 |
-
$url = add_query_arg($request_args, self::$licensing_servers[0]);
|
| 472 |
-
$response = wp_remote_get(esc_url_raw($url), $request_params);
|
| 473 |
-
|
| 474 |
-
if (is_wp_error($response) || !wp_remote_retrieve_body($response)) {
|
| 475 |
-
$url = add_query_arg($request_args, self::$licensing_servers[1]);
|
| 476 |
-
$response = wp_remote_get(esc_url_raw($url), $request_params);
|
| 477 |
-
}
|
| 478 |
|
| 479 |
-
$surveys[$vars['survey']] = time();
|
| 480 |
-
update_option(UCP_SURVEYS_KEY, $surveys);
|
| 481 |
|
| 482 |
-
|
| 483 |
-
|
|
|
|
|
|
|
| 484 |
|
|
|
|
|
|
|
|
|
|
| 485 |
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
| 489 |
-
$out = '';
|
| 490 |
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
}
|
| 494 |
|
| 495 |
-
|
| 496 |
-
|
|
|
|
| 497 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 498 |
|
| 499 |
-
|
| 500 |
-
|
| 501 |
-
$org_string = $string;
|
| 502 |
|
| 503 |
-
|
| 504 |
-
|
| 505 |
-
'site-description' => get_bloginfo('description'),
|
| 506 |
-
'site-url' => trailingslashit(get_home_url()),
|
| 507 |
-
'wp-url' => trailingslashit(get_site_url()),
|
| 508 |
-
'site-login-url' => get_site_url() . '/wp-login.php');
|
| 509 |
|
| 510 |
-
foreach ($vars as $var_name => $var_value) {
|
| 511 |
-
$var_name = '[' . $var_name . ']';
|
| 512 |
-
$string = str_ireplace($var_name, $var_value, $string);
|
| 513 |
-
}
|
| 514 |
|
| 515 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 516 |
|
| 517 |
-
|
| 518 |
-
|
|
|
|
| 519 |
|
|
|
|
|
|
|
| 520 |
|
| 521 |
-
// generate HTML from social icons
|
| 522 |
-
static function generate_social_icons($options, $template_id) {
|
| 523 |
-
$out = '';
|
| 524 |
|
| 525 |
-
|
| 526 |
-
|
| 527 |
-
|
| 528 |
-
|
| 529 |
-
$out .= '<a title="Twitter" href="' . esc_attr($options['social_twitter']) . '" target="_blank"><i class="fa fa-twitter-square fa-3x"></i></a>';
|
| 530 |
-
}
|
| 531 |
-
if (!empty($options['social_linkedin'])) {
|
| 532 |
-
$out .= '<a title="LinkedIn" href="' . esc_attr($options['social_linkedin']) . '" target="_blank"><i class="fa fa-linkedin-square fa-3x"></i></a>';
|
| 533 |
-
}
|
| 534 |
-
if (!empty($options['social_youtube'])) {
|
| 535 |
-
$out .= '<a title="YouTube" href="' . esc_attr($options['social_youtube']) . '" target="_blank"><i class="fa fa-youtube-square fa-3x"></i></a>';
|
| 536 |
-
}
|
| 537 |
-
if (!empty($options['social_vimeo'])) {
|
| 538 |
-
$out .= '<a title="Vimeo" href="' . esc_attr($options['social_vimeo']) . '" target="_blank"><i class="fa fa-vimeo-square fa-3x"></i></a>';
|
| 539 |
-
}
|
| 540 |
-
if (!empty($options['social_pinterest'])) {
|
| 541 |
-
$out .= '<a title="Pinterest" href="' . esc_attr($options['social_pinterest']) . '" target="_blank"><i class="fa fa-pinterest-square fa-3x"></i></a>';
|
| 542 |
-
}
|
| 543 |
-
if (!empty($options['social_dribbble'])) {
|
| 544 |
-
$out .= '<a title="Dribbble" href="' . esc_attr($options['social_dribbble']) . '" target="_blank"><i class="fa fa-dribbble fa-3x"></i></a>';
|
| 545 |
-
}
|
| 546 |
-
if (!empty($options['social_behance'])) {
|
| 547 |
-
$out .= '<a title="Behance" href="' . esc_attr($options['social_behance']) . '" target="_blank"><i class="fa fa-behance-square fa-3x"></i></a>';
|
| 548 |
-
}
|
| 549 |
-
if (!empty($options['social_instagram'])) {
|
| 550 |
-
$out .= '<a title="Instagram" href="' . esc_attr($options['social_instagram']) . '" target="_blank"><i class="fa fa-instagram fa-3x"></i></a>';
|
| 551 |
-
}
|
| 552 |
-
if (!empty($options['social_tumblr'])) {
|
| 553 |
-
$out .= '<a title="Tumblr" href="' . esc_attr($options['social_tumblr']) . '" target="_blank"><i class="fa fa-tumblr-square fa-3x"></i></a>';
|
| 554 |
-
}
|
| 555 |
-
if (!empty($options['social_vk'])) {
|
| 556 |
-
$out .= '<a title="VK" href="' . esc_attr($options['social_vk']) . '" target="_blank"><i class="fa fa-vk fa-3x"></i></a>';
|
| 557 |
-
}
|
| 558 |
-
if (!empty($options['social_skype'])) {
|
| 559 |
-
$out .= '<a title="Skype" href="skype:' . esc_attr($options['social_skype']) . '?chat"><i class="fa fa-skype fa-3x"></i></a>';
|
| 560 |
-
}
|
| 561 |
-
if (!empty($options['social_whatsapp'])) {
|
| 562 |
-
$out .= '<a title="WhatsApp" href="https://api.whatsapp.com/send?phone=' . str_replace('+', '', esc_attr($options['social_whatsapp'])) . '"><i class="fa fa-whatsapp fa-3x"></i></a>';
|
| 563 |
-
}
|
| 564 |
-
if (!empty($options['social_telegram'])) {
|
| 565 |
-
$out .= '<a title="Telegram" href="' . esc_attr($options['social_telegram']) . '"><i class="fa fa-telegram fa-3x"></i></a>';
|
| 566 |
-
}
|
| 567 |
-
if (!empty($options['social_email'])) {
|
| 568 |
-
$out .= '<a title="Email" href="mailto:' . esc_attr(self::encode_email($options['social_email'])) . '"><i class="fa fa-envelope fa-3x"></i></a>';
|
| 569 |
-
}
|
| 570 |
-
if (!empty($options['social_phone'])) {
|
| 571 |
-
$out .= '<a title="Phone" href="tel:' . esc_attr($options['social_phone']) . '"><i class="fa fa-phone-square fa-3x"></i></a>';
|
| 572 |
-
}
|
| 573 |
|
| 574 |
-
|
| 575 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 576 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 577 |
|
| 578 |
-
|
| 579 |
-
static function generate_head($options, $template_id) {
|
| 580 |
-
$out = '';
|
| 581 |
|
| 582 |
-
|
| 583 |
-
|
| 584 |
-
$out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/' . $template_id) . 'style.css?v=' . self::$version . '" type="text/css">' . "\n";
|
| 585 |
-
$out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/css') . 'font-awesome.min.css?v=' . self::$version . '" type="text/css">' . "\n";
|
| 586 |
|
| 587 |
-
$out .= '<link rel="icon" sizes="128x128" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/images') . 'favicon.png" />';
|
| 588 |
|
| 589 |
-
|
| 590 |
-
|
| 591 |
-
|
| 592 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 593 |
|
| 594 |
-
|
| 595 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 596 |
<script>
|
| 597 |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
| 598 |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
@@ -601,902 +634,943 @@ class UCP {
|
|
| 601 |
ga('create', '{$options['ga_tracking_id']}', 'auto');
|
| 602 |
ga('send', 'pageview');
|
| 603 |
</script>";
|
| 604 |
-
|
| 605 |
-
|
| 606 |
-
if (!empty($options['custom_css'])) {
|
| 607 |
-
$out .= "\n" . '<style type="text/css">' . $options['custom_css'] . '</style>';
|
| 608 |
-
}
|
| 609 |
-
|
| 610 |
-
$out = apply_filters('ucp_head', $out, $options, $template_id);
|
| 611 |
-
|
| 612 |
-
return trim($out);
|
| 613 |
-
} // generate_head
|
| 614 |
-
|
| 615 |
-
|
| 616 |
-
// shortcode for inserting things in footer
|
| 617 |
-
static function generate_footer($options, $template_id) {
|
| 618 |
-
$out = '';
|
| 619 |
-
|
| 620 |
-
if ($options['linkback'] == '1') {
|
| 621 |
-
$tmp = md5(get_site_url());
|
| 622 |
-
if ($tmp[0] < '4') {
|
| 623 |
-
$out .= '<p id="linkback">Create stunning <a href="' . self::generate_web_link('show-love-1') . '" target="_blank">under construction pages for WordPress</a>. Completely free.</p>';
|
| 624 |
-
} elseif ($tmp[0] < '8') {
|
| 625 |
-
$out .= '<p id="linkback">Create a <a href="' . self::generate_web_link('show-love-2') . '" target="_blank">free under construction page for WordPress</a> like this one in under a minute.</p>';
|
| 626 |
-
} elseif ($tmp[0] < 'c') {
|
| 627 |
-
$out .= '<p id="linkback">Join more than 400,000 happy people using the <a href="https://wordpress.org/plugins/under-construction-page/" target="_blank">free Under Construction Page plugin for WordPress</a>.</p>';
|
| 628 |
-
} else {
|
| 629 |
-
$out .= '<p id="linkback">Create free <a href="' . self::generate_web_link('show-love-3') . '" target="_blank">under construction pages for WordPress</a>.</p>';
|
| 630 |
-
}
|
| 631 |
-
}
|
| 632 |
-
|
| 633 |
-
if ($options['login_button'] == '1') {
|
| 634 |
-
if (is_user_logged_in()) {
|
| 635 |
-
$out .= '<div id="login-button" class="loggedin">';
|
| 636 |
-
$out .= '<a title="' . __('Open WordPress admin', 'under-construction-page') . '" href="' . get_site_url() . '/wp-admin/"><i class="fa fa-wordpress fa-2x" aria-hidden="true"></i></a>';
|
| 637 |
-
} else {
|
| 638 |
-
$out .= '<div id="login-button" class="loggedout">';
|
| 639 |
-
$out .= '<a title="' . __('Log in to WordPress admin', 'under-construction-page') . '" href="' . get_site_url() . '/wp-login.php"><i class="fa fa-wordpress fa-2x" aria-hidden="true"></i></a>';
|
| 640 |
-
}
|
| 641 |
-
$out .= '</div>';
|
| 642 |
-
}
|
| 643 |
-
|
| 644 |
-
$out = apply_filters('ucp_footer', $out, $options, $template_id);
|
| 645 |
-
|
| 646 |
-
return $out;
|
| 647 |
-
} // generate_footer
|
| 648 |
-
|
| 649 |
-
|
| 650 |
-
// returnes parsed template
|
| 651 |
-
static function get_template($template_id) {
|
| 652 |
-
$vars = array();
|
| 653 |
-
$options = self::get_options();
|
| 654 |
-
|
| 655 |
-
$vars['version'] = self::$version;
|
| 656 |
-
$vars['site-url'] = trailingslashit(get_home_url());
|
| 657 |
-
$vars['wp-url'] = trailingslashit(get_site_url());
|
| 658 |
-
$vars['theme-url'] = trailingslashit(UCP_PLUGIN_URL . 'themes/' . $template_id);
|
| 659 |
-
$vars['theme-url-common'] = trailingslashit(UCP_PLUGIN_URL . 'themes');
|
| 660 |
-
$vars['title'] = self::parse_vars($options['title']);
|
| 661 |
-
$vars['generator'] = __('Free UnderConstructionPage plugin for WordPress', 'under-construction-page');
|
| 662 |
-
$vars['heading1'] = self::parse_vars($options['heading1']);
|
| 663 |
-
$vars['content'] = nl2br(self::parse_vars($options['content']));
|
| 664 |
-
$vars['description'] = self::parse_vars($options['description']);
|
| 665 |
-
$vars['social-icons'] = self::generate_social_icons($options, $template_id);
|
| 666 |
-
$vars['head'] = self::generate_head($options, $template_id);
|
| 667 |
-
$vars['footer'] = self::generate_footer($options, $template_id);
|
| 668 |
-
|
| 669 |
-
$vars = apply_filters('ucp_get_template_vars', $vars, $template_id, $options);
|
| 670 |
-
|
| 671 |
-
ob_start();
|
| 672 |
-
require UCP_PLUGIN_DIR . 'themes/' . $template_id . '/index.php';
|
| 673 |
-
$template = ob_get_clean();
|
| 674 |
-
|
| 675 |
-
foreach ($vars as $var_name => $var_value) {
|
| 676 |
-
$var_name = '[' . $var_name . ']';
|
| 677 |
-
$template = str_ireplace($var_name, $var_value, $template);
|
| 678 |
-
}
|
| 679 |
-
|
| 680 |
-
$template = apply_filters('ucp_get_template', $template, $vars, $options);
|
| 681 |
-
|
| 682 |
-
return $template;
|
| 683 |
-
} // get_template
|
| 684 |
-
|
| 685 |
-
|
| 686 |
-
// checks if construction mode is enabled for the current visitor
|
| 687 |
-
static function is_construction_mode_enabled($settings_only = false) {
|
| 688 |
-
$options = self::get_options();
|
| 689 |
-
$current_user = wp_get_current_user();
|
| 690 |
-
|
| 691 |
-
$override_status = apply_filters('ucp_is_construction_mode_enabled', null, $options);
|
| 692 |
-
if (is_bool($override_status)) {
|
| 693 |
-
return $override_status;
|
| 694 |
-
}
|
| 695 |
-
|
| 696 |
-
// just check if it's generally enabled
|
| 697 |
-
if ($settings_only) {
|
| 698 |
-
if ($options['status']) {
|
| 699 |
-
return true;
|
| 700 |
-
} else {
|
| 701 |
-
return false;
|
| 702 |
-
}
|
| 703 |
-
} else {
|
| 704 |
-
// check if enabled for current user
|
| 705 |
-
if (!$options['status']) {
|
| 706 |
-
return false;
|
| 707 |
-
} elseif (self::user_has_role($options['whitelisted_roles'])) {
|
| 708 |
-
return false;
|
| 709 |
-
} elseif (in_array($current_user->ID, $options['whitelisted_users'])) {
|
| 710 |
-
return false;
|
| 711 |
-
} elseif (strlen($options['end_date']) === 16 && $options['end_date'] !== '0000-00-00 00:00' && $options['end_date'] < current_time('mysql')) {
|
| 712 |
-
return false;
|
| 713 |
-
} else {
|
| 714 |
-
return true;
|
| 715 |
-
}
|
| 716 |
-
}
|
| 717 |
-
} // is_construction_mode_enabled
|
| 718 |
-
|
| 719 |
-
|
| 720 |
-
// check if user has the specified role
|
| 721 |
-
static function user_has_role($roles) {
|
| 722 |
-
$current_user = wp_get_current_user();
|
| 723 |
|
| 724 |
-
|
| 725 |
-
|
| 726 |
-
|
| 727 |
-
$user_role = 'guest';
|
| 728 |
-
}
|
| 729 |
|
| 730 |
-
|
| 731 |
-
} // user_has_role
|
| 732 |
|
|
|
|
|
|
|
| 733 |
|
| 734 |
-
// frontend notification when UCP is enabled but current user is whitelisted
|
| 735 |
-
static function whitelisted_notice() {
|
| 736 |
-
$notices = get_option(UCP_NOTICES_KEY);
|
| 737 |
-
$dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'whitelisted', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
| 738 |
|
| 739 |
-
|
| 740 |
-
|
| 741 |
-
|
| 742 |
-
|
| 743 |
-
// keeping everything inline due to minimal CSS
|
| 744 |
-
echo '<div style="background-color: #333; line-height: 140%; font-size: 14px; position: fixed; display: block; top: 50px; z-index: 99999; color: #fefefe; padding: 20px 35px 20px 20px; width: 500px; border: thin solid #fefefe; left: -1px;"><a style="color: #ea1919; font-weight: 900; text-decoration: none; position: absolute; top: 7px; right: 10px;" href="' . $dismiss_url . '" alt="Dismiss notice" onclick="window.location.href = \'' . $dismiss_url . '\'; return false;" title="Dismiss notice">X</a><b>' . __('<b>Under Construction Mode is enabled</b> but you are whitelisted so you see the normal site.', 'under-construction-page') . '<br><a href="' . get_home_url() . '/?ucp_preview" style="text-decoration: underline; color: #fefefe;">' . __('Preview UnderConstructionPage', 'under-construction-page') . '</a><br><a href="' . admin_url('options-general.php?page=ucp') . '" style="text-decoration: underline; color: #fefefe;">' . __('Configure UnderConstructionPage', 'under-construction-page') . '</a></div>';
|
| 745 |
-
} // whitelisted_notification
|
| 746 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 747 |
|
| 748 |
-
|
| 749 |
-
|
| 750 |
-
|
| 751 |
-
|
| 752 |
-
|
| 753 |
-
|
| 754 |
-
|
| 755 |
-
|
|
|
|
|
|
|
| 756 |
|
| 757 |
-
|
| 758 |
-
|
| 759 |
-
|
| 760 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 761 |
|
| 762 |
-
|
| 763 |
-
if (self::is_plugin_page() && UCP_license::is_activated()) {
|
| 764 |
-
echo '<div id="ucp_update_pro" class="notice-error notice">';
|
| 765 |
-
echo '<p class="center">Thank you for purchasing UnderConstructionPage PRO! <b>Your license has been verified and activated.</b><br>To start using the PRO version, please follow these steps:</p>';
|
| 766 |
-
echo '<ol>';
|
| 767 |
-
echo '<li><a href="https://underconstructionpage.com/pro-download/" target="_blank">Download</a> the latest version of the PRO plugin.</li>';
|
| 768 |
-
echo '<li>Go to <a href="' . admin_url('plugin-install.php') . '">Plugins - Add New - Upload Plugin</a> and upload the ZIP you just downloaded.</li>';
|
| 769 |
-
echo '<li>If asked to replace (overwrite) the free version - confirm it.</li>';
|
| 770 |
-
echo '<li>Activate the plugin.</li>';
|
| 771 |
-
echo '<li>That\'s it, no more steps.</li>';
|
| 772 |
-
echo '</ol>';
|
| 773 |
-
echo '</div>';
|
| 774 |
-
$shown = true;
|
| 775 |
-
|
| 776 |
-
return;
|
| 777 |
-
}
|
| 778 |
|
| 779 |
-
|
| 780 |
-
|
| 781 |
-
(time() - $meta['first_install']) > (DAY_IN_SECONDS * 1.0)) {
|
| 782 |
-
$rate_url = 'https://wordpress.org/support/plugin/under-construction-page/reviews/?filter=5&rate=5#new-post';
|
| 783 |
-
$dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'rate', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
| 784 |
|
| 785 |
-
echo '<div id="ucp_rate_notice" class="notice-info notice"><p>Hi' . $name . '!<br>We saw you\'ve been using the <b class="ucp-logo" style="font-weight: bold;">UnderConstructionPage</b> plugin for a few days (that\'s awesome!) and wanted to ask for your help to <b>make the plugin better</b>.<br>We just need a minute of your time to rate the plugin. It helps us out a lot!';
|
| 786 |
|
| 787 |
-
|
| 788 |
-
|
| 789 |
-
|
| 790 |
-
|
| 791 |
-
|
| 792 |
-
}
|
| 793 |
|
| 794 |
-
|
| 795 |
-
|
| 796 |
-
|
| 797 |
-
|
| 798 |
-
}
|
| 799 |
|
| 800 |
-
|
| 801 |
-
|
| 802 |
-
|
| 803 |
-
|
| 804 |
-
|
| 805 |
-
|
| 806 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 807 |
|
| 808 |
-
echo '<div id="ucp_rate_notice" class="notice-info notice"><p>Hi' . $name . ',<br>Help us translate UCP into your language and <b>get a PRO license for free</b>!<br>We want to make <b class="ucp-logo" style="font-weight: bold;">UnderConstructionPage</b> accessible to as many users as possible by translating it into their language. And we need your help!';
|
| 809 |
|
| 810 |
-
|
| 811 |
-
|
| 812 |
-
|
| 813 |
-
|
| 814 |
-
}
|
| 815 |
|
| 816 |
-
|
| 817 |
-
|
| 818 |
-
|
| 819 |
-
|
| 820 |
-
|
| 821 |
|
| 822 |
-
|
| 823 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 824 |
|
| 825 |
-
|
| 826 |
-
|
| 827 |
-
|
| 828 |
-
|
| 829 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 830 |
|
| 831 |
-
|
| 832 |
-
|
| 833 |
-
|
| 834 |
-
|
| 835 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 836 |
|
| 837 |
-
|
| 838 |
-
|
|
|
|
|
|
|
|
|
|
| 839 |
|
| 840 |
-
|
| 841 |
-
|
| 842 |
-
|
| 843 |
-
|
| 844 |
-
|
| 845 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 846 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 847 |
|
| 848 |
-
|
| 849 |
-
|
| 850 |
-
|
| 851 |
-
|
| 852 |
-
|
| 853 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 854 |
|
| 855 |
-
$notices = get_option(UCP_NOTICES_KEY, array());
|
| 856 |
-
|
| 857 |
-
if ($_GET['notice'] == 'rate') {
|
| 858 |
-
$notices['dismiss_rate'] = true;
|
| 859 |
-
} elseif ($_GET['notice'] == 'translate') {
|
| 860 |
-
$notices['dismiss_translate'] = true;
|
| 861 |
-
} elseif ($_GET['notice'] == 'whitelisted') {
|
| 862 |
-
$notices['dismiss_whitelisted'] = true;
|
| 863 |
-
} elseif ($_GET['notice'] == 'olduser') {
|
| 864 |
-
$notices['dismiss_olduser'] = true;
|
| 865 |
-
} elseif ($_GET['notice'] == 'welcome') {
|
| 866 |
-
$notices['dismiss_welcome'] = true;
|
| 867 |
-
} else {
|
| 868 |
-
wp_safe_redirect(admin_url());
|
| 869 |
-
exit;
|
| 870 |
-
}
|
| 871 |
|
| 872 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 873 |
|
| 874 |
-
|
| 875 |
-
|
| 876 |
-
|
| 877 |
-
|
| 878 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 879 |
|
| 880 |
-
|
| 881 |
-
} // dismiss_notice
|
| 882 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 883 |
|
| 884 |
-
|
| 885 |
-
|
| 886 |
-
check_admin_referer('ucp_reset_settings');
|
| 887 |
|
| 888 |
-
if (false === current_user_can('administrator')) {
|
| 889 |
-
wp_safe_redirect(admin_url());
|
| 890 |
-
exit;
|
| 891 |
-
}
|
| 892 |
|
| 893 |
-
|
| 894 |
-
|
|
|
|
|
|
|
| 895 |
|
| 896 |
-
|
| 897 |
-
|
| 898 |
-
|
| 899 |
-
|
| 900 |
-
}
|
| 901 |
|
| 902 |
-
|
| 903 |
-
|
| 904 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 905 |
|
| 906 |
-
|
| 907 |
-
|
| 908 |
-
check_admin_referer('ucp_change_status');
|
| 909 |
|
| 910 |
-
if (false === current_user_can('administrator') || empty($_GET['new_status'])) {
|
| 911 |
-
wp_safe_redirect(admin_url());
|
| 912 |
-
exit;
|
| 913 |
-
}
|
| 914 |
|
| 915 |
-
|
|
|
|
|
|
|
|
|
|
| 916 |
|
| 917 |
-
|
| 918 |
-
|
| 919 |
-
|
| 920 |
-
|
| 921 |
-
}
|
| 922 |
|
| 923 |
-
|
| 924 |
|
| 925 |
-
|
| 926 |
-
|
| 927 |
-
|
| 928 |
-
|
| 929 |
-
|
| 930 |
|
| 931 |
-
|
| 932 |
-
} // change_status
|
| 933 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 934 |
|
| 935 |
-
|
| 936 |
-
//
|
| 937 |
-
if (false === is_admin_bar_showing() || false === current_user_can('administrator') || false === apply_filters('ucp_show_admin_bar', true)) {
|
| 938 |
-
return;
|
| 939 |
-
}
|
| 940 |
|
| 941 |
-
// no sense in loading a new CSS file for 2 lines of CSS
|
| 942 |
-
$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 { padding-bottom: 2px; } #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; }#wp-admin-bar-under-construction-page img.logo { height: 17px; margin-bottom: 4px; padding-right: 3px; } body.wp-admin #wp-admin-bar-under-construction-page img.logo { margin-bottom: -4px; }</style>';
|
| 943 |
|
| 944 |
-
|
| 945 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 946 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 947 |
|
| 948 |
-
// add admin bar menu and status
|
| 949 |
-
static function admin_bar() {
|
| 950 |
-
global $wp_admin_bar;
|
| 951 |
|
| 952 |
-
//
|
| 953 |
-
|
| 954 |
-
|
| 955 |
-
|
| 956 |
|
| 957 |
-
|
| 958 |
-
|
| 959 |
-
|
| 960 |
-
|
| 961 |
-
$action_url = wp_nonce_url($action_url, 'ucp_change_status');
|
| 962 |
-
$action = __('Under Construction Mode', 'under-construction-page');
|
| 963 |
-
$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>';
|
| 964 |
-
} else {
|
| 965 |
-
$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>';
|
| 966 |
-
$class = 'ucp-disabled';
|
| 967 |
-
$action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'enabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
| 968 |
-
$action_url = wp_nonce_url($action_url, 'ucp_change_status');
|
| 969 |
-
$action = __('Under Construction Mode', 'under-construction-page');
|
| 970 |
-
$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>';
|
| 971 |
-
}
|
| 972 |
|
| 973 |
-
|
| 974 |
-
|
| 975 |
-
|
| 976 |
-
|
| 977 |
-
|
| 978 |
-
|
| 979 |
-
|
| 980 |
-
|
| 981 |
-
|
| 982 |
-
|
| 983 |
-
|
| 984 |
-
|
| 985 |
-
|
| 986 |
-
|
| 987 |
-
|
| 988 |
-
'title' => __('Preview', 'under-construction-page'),
|
| 989 |
-
'meta' => array('target' => 'blank'),
|
| 990 |
-
'href' => get_home_url() . '/?ucp_preview',
|
| 991 |
-
'parent' => 'under-construction-page'
|
| 992 |
-
));
|
| 993 |
-
$wp_admin_bar->add_node( array(
|
| 994 |
-
'id' => 'ucp-settings',
|
| 995 |
-
'title' => __('Settings', 'under-construction-page'),
|
| 996 |
-
'href' => admin_url('options-general.php?page=ucp'),
|
| 997 |
-
'parent' => 'under-construction-page'
|
| 998 |
-
));
|
| 999 |
-
} // admin_bar
|
| 1000 |
-
|
| 1001 |
-
|
| 1002 |
-
// show under construction notice on WP login form
|
| 1003 |
-
static function login_message($message) {
|
| 1004 |
-
if (self::is_construction_mode_enabled(true)) {
|
| 1005 |
-
$message .= '<div class="message">' . __('Under Construction Mode is <b>enabled</b>.', 'under-construction-page') . '</div>';
|
| 1006 |
-
}
|
| 1007 |
|
| 1008 |
-
|
| 1009 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1010 |
|
|
|
|
|
|
|
| 1011 |
|
| 1012 |
-
// add settings link to plugins page
|
| 1013 |
-
static function plugin_action_links($links) {
|
| 1014 |
-
$settings_link = '<a href="' . admin_url('options-general.php?page=ucp') . '" title="' . __('UnderConstruction Settings', 'under-construction-page') . '">' . __('Settings', 'under-construction-page') . '</a>';
|
| 1015 |
-
$pro_link = '<a target="_blank" href="' . self::generate_web_link('plugins-table-left') . '" title="' . __('Get PRO', 'under-construction-page') . '">' . __('Go <b>PRO</b>', 'under-construction-page') . '</a>';
|
| 1016 |
|
| 1017 |
-
|
| 1018 |
-
|
|
|
|
|
|
|
|
|
|
| 1019 |
|
| 1020 |
-
|
| 1021 |
-
|
| 1022 |
|
|
|
|
|
|
|
| 1023 |
|
| 1024 |
-
// add links to plugin's description in plugins table
|
| 1025 |
-
static function plugin_meta_links($links, $file) {
|
| 1026 |
-
$support_link = '<a target="_blank" href="https://wordpress.org/support/plugin/under-construction-page" title="' . __('Get help', 'under-construction-page') . '">' . __('Support', 'under-construction-page') . '</a>';
|
| 1027 |
-
$pro_link = '<a target="_blank" href="' . self::generate_web_link('plugins-table-right') . '" title="' . __('Get PRO', 'under-construction-page') . '">' . __('Get the <b>PRO</b> version', 'under-construction-page') . '</a>';
|
| 1028 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1029 |
|
| 1030 |
-
if ($file == plugin_basename(__FILE__)) {
|
| 1031 |
-
$links[] = $support_link;
|
| 1032 |
-
$links[] = $pro_link;
|
| 1033 |
-
}
|
| 1034 |
|
| 1035 |
-
|
| 1036 |
-
|
|
|
|
|
|
|
| 1037 |
|
|
|
|
|
|
|
| 1038 |
|
| 1039 |
-
// additional powered by text in admin footer; only on UCP page
|
| 1040 |
-
static function admin_footer_text($text) {
|
| 1041 |
-
if (!self::is_plugin_page()) {
|
| 1042 |
-
return $text;
|
| 1043 |
-
}
|
| 1044 |
|
| 1045 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1046 |
|
| 1047 |
-
|
| 1048 |
-
} // admin_footer_text
|
| 1049 |
|
|
|
|
|
|
|
| 1050 |
|
| 1051 |
-
// fix for opening the plugin install modal
|
| 1052 |
-
static function admin_footer() {
|
| 1053 |
-
if (empty($_GET['fix-install-button']) || empty($_GET['tab']) || $_GET['tab'] != 'plugin-information') {
|
| 1054 |
-
return;
|
| 1055 |
-
}
|
| 1056 |
|
| 1057 |
-
|
| 1058 |
-
|
| 1059 |
-
|
| 1060 |
-
|
|
|
|
|
|
|
| 1061 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1062 |
|
| 1063 |
-
// test if we're on plugin's page
|
| 1064 |
-
static function is_plugin_page() {
|
| 1065 |
-
$current_screen = get_current_screen();
|
| 1066 |
|
| 1067 |
-
if
|
| 1068 |
-
|
| 1069 |
-
|
| 1070 |
-
|
| 1071 |
-
}
|
| 1072 |
-
} // is_plugin_page
|
| 1073 |
-
|
| 1074 |
-
|
| 1075 |
-
// create the admin menu item
|
| 1076 |
-
static function admin_menu() {
|
| 1077 |
-
add_options_page(__('UnderConstruction', 'under-construction-page'), __('UnderConstruction', 'under-construction-page'), 'manage_options', 'ucp', array(__CLASS__, 'main_page'));
|
| 1078 |
-
} // admin_menu
|
| 1079 |
-
|
| 1080 |
-
|
| 1081 |
-
// all settings are saved in one option
|
| 1082 |
-
static function register_settings() {
|
| 1083 |
-
register_setting(UCP_OPTIONS_KEY, UCP_OPTIONS_KEY, array(__CLASS__, 'sanitize_settings'));
|
| 1084 |
-
} // register_settings
|
| 1085 |
-
|
| 1086 |
-
|
| 1087 |
-
// set default settings
|
| 1088 |
-
static function default_options() {
|
| 1089 |
-
$defaults = array('status' => '0',
|
| 1090 |
-
'license_key' => '',
|
| 1091 |
-
'license_active' => false,
|
| 1092 |
-
'license_expires' => '1900-01-01',
|
| 1093 |
-
'license_type' => '',
|
| 1094 |
-
'end_date' => '',
|
| 1095 |
-
'ga_tracking_id' => '',
|
| 1096 |
-
'theme' => 'mad_designer',
|
| 1097 |
-
'custom_css' => '',
|
| 1098 |
-
'title' => '[site-title] is under construction',
|
| 1099 |
-
'description' => '[site-tagline]',
|
| 1100 |
-
'heading1' => __('Sorry, we\'re doing some work on the site', 'under-construction-page'),
|
| 1101 |
-
'content' => __('Thank you for being patient. We are doing some work on the site and will be back shortly.', 'under-construction-page'),
|
| 1102 |
-
'social_facebook' => '',
|
| 1103 |
-
'social_twitter' => '',
|
| 1104 |
-
'social_linkedin' => '',
|
| 1105 |
-
'social_youtube' => '',
|
| 1106 |
-
'social_vimeo' => '',
|
| 1107 |
-
'social_pinterest' => '',
|
| 1108 |
-
'social_dribbble' => '',
|
| 1109 |
-
'social_behance' => '',
|
| 1110 |
-
'social_instagram' => '',
|
| 1111 |
-
'social_tumblr' => '',
|
| 1112 |
-
'social_vk' => '',
|
| 1113 |
-
'social_email' => '',
|
| 1114 |
-
'social_phone' => '',
|
| 1115 |
-
'social_skype' => '',
|
| 1116 |
-
'social_telegram' => '',
|
| 1117 |
-
'social_whatsapp' => '',
|
| 1118 |
-
'login_button' => '1',
|
| 1119 |
-
'linkback' => '0',
|
| 1120 |
-
'whitelisted_roles' => array('administrator'),
|
| 1121 |
-
'whitelisted_users' => array()
|
| 1122 |
-
);
|
| 1123 |
-
|
| 1124 |
-
return $defaults;
|
| 1125 |
-
} // default_options
|
| 1126 |
-
|
| 1127 |
-
|
| 1128 |
-
// sanitize settings on save
|
| 1129 |
-
static function sanitize_settings($options) {
|
| 1130 |
-
$old_options = self::get_options();
|
| 1131 |
-
|
| 1132 |
-
foreach ($options as $key => $value) {
|
| 1133 |
-
switch ($key) {
|
| 1134 |
-
case 'title':
|
| 1135 |
-
case 'description':
|
| 1136 |
-
$options[$key] = trim(strip_tags($value));
|
| 1137 |
-
break;
|
| 1138 |
-
case 'heading1':
|
| 1139 |
-
case 'content':
|
| 1140 |
-
$options[$key] = trim(wp_kses($value, wp_kses_allowed_html('post')));
|
| 1141 |
-
break;
|
| 1142 |
-
case 'custom_css':
|
| 1143 |
-
case 'social_facebook':
|
| 1144 |
-
case 'social_twitter':
|
| 1145 |
-
case 'social_linkedin':
|
| 1146 |
-
case 'social_youtube':
|
| 1147 |
-
case 'social_vimeo':
|
| 1148 |
-
case 'social_pinterest':
|
| 1149 |
-
case 'social_dribbble':
|
| 1150 |
-
case 'social_behance':
|
| 1151 |
-
case 'social_instagram':
|
| 1152 |
-
case 'social_tumblr':
|
| 1153 |
-
case 'social_vk':
|
| 1154 |
-
case 'social_email':
|
| 1155 |
-
case 'social_phone':
|
| 1156 |
-
case 'social_telegram':
|
| 1157 |
-
case 'social_whatsapp':
|
| 1158 |
-
case 'license_key':
|
| 1159 |
-
$options[$key] = trim(strip_tags($value));
|
| 1160 |
-
break;
|
| 1161 |
-
case 'ga_tracking_id':
|
| 1162 |
-
$options[$key] = substr(strtoupper(trim($value)), 0, 15);
|
| 1163 |
-
break;
|
| 1164 |
-
case 'end_date':
|
| 1165 |
-
$options[$key] = substr(trim($value), 0, 16);
|
| 1166 |
-
break;
|
| 1167 |
-
} // switch
|
| 1168 |
-
} // foreach
|
| 1169 |
-
|
| 1170 |
-
$options['title'] = strip_tags($options['title']);
|
| 1171 |
-
$options['description'] = strip_tags($options['description']);
|
| 1172 |
-
$options['heading1'] = strip_tags($options['heading1'], '<br><a><b><strong><i><em><p><del><img>');
|
| 1173 |
-
$options['content'] = strip_tags($options['content'], '<br><a><b><strong><i><em><p><del><img><ul><ol><li><blockquote><ins><code><hr><h2><h3><h4><span><div><iframe>');
|
| 1174 |
-
|
| 1175 |
-
$options['whitelisted_roles'] = empty($options['whitelisted_roles'])? array(): $options['whitelisted_roles'];
|
| 1176 |
-
$options['whitelisted_users'] = empty($options['whitelisted_users'])? array(): $options['whitelisted_users'];
|
| 1177 |
-
$options = self::check_var_isset($options, array('status' => 0, 'linkback' => 0, 'login_button' => 0));
|
| 1178 |
-
|
| 1179 |
-
if (empty($options['end_date_toggle'])) {
|
| 1180 |
-
$options['end_date'] = '';
|
| 1181 |
-
}
|
| 1182 |
-
if ($options['end_date'] == '0000-00-00 00:00') {
|
| 1183 |
-
$options['end_date'] = '';
|
| 1184 |
-
}
|
| 1185 |
-
unset($options['end_date_toggle']);
|
| 1186 |
|
| 1187 |
-
|
| 1188 |
-
|
| 1189 |
-
}
|
| 1190 |
-
if (!empty($options['ga_tracking_id']) && preg_match('/^UA-\d{3,}-\d{1,3}$/', $options['ga_tracking_id']) === 0) {
|
| 1191 |
-
add_settings_error('ucp', 'ga_tracking_id', __('Please enter a valid Google Analytics Tracking ID or disable tracking.', 'under-construction-page'));
|
| 1192 |
-
}
|
| 1193 |
-
unset($options['ga_tracking_toggle']);
|
| 1194 |
-
|
| 1195 |
-
if (!empty($_POST['license-submit'])) {
|
| 1196 |
-
if (empty($options['license_key'])) {
|
| 1197 |
-
$options['license_type'] = '';
|
| 1198 |
-
$options['license_expires'] = '1900-01-01';
|
| 1199 |
-
$options['license_active'] = false;
|
| 1200 |
-
$options['license_key'] = '';
|
| 1201 |
-
add_settings_error(UCP_OPTIONS_KEY, 'license_key', __('License key saved.', 'under-construction-page'), 'updated');
|
| 1202 |
-
} else {
|
| 1203 |
-
$tmp = UCP_license::validate_license_key($options['license_key']);
|
| 1204 |
-
if ($tmp['success']) {
|
| 1205 |
-
$options['license_type'] = $tmp['license_type'];
|
| 1206 |
-
$options['license_expires'] = $tmp['license_expires'];
|
| 1207 |
-
$options['license_active'] = $tmp['license_active'];
|
| 1208 |
-
if ($tmp['license_active']) {
|
| 1209 |
-
add_settings_error(UCP_OPTIONS_KEY, 'license_key', __('License key saved and activated!', 'under-construction-page'), 'updated');
|
| 1210 |
-
} else {
|
| 1211 |
-
add_settings_error(UCP_OPTIONS_KEY, 'license_key', 'License not active. ' . $tmp['error'], 'error');
|
| 1212 |
-
}
|
| 1213 |
} else {
|
| 1214 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1215 |
}
|
| 1216 |
-
|
| 1217 |
-
} // update license
|
| 1218 |
|
| 1219 |
-
|
| 1220 |
-
|
| 1221 |
-
|
| 1222 |
-
|
| 1223 |
-
|
| 1224 |
-
|
| 1225 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1226 |
|
| 1227 |
-
|
| 1228 |
-
|
| 1229 |
|
| 1230 |
|
| 1231 |
-
|
| 1232 |
-
|
| 1233 |
-
|
| 1234 |
-
|
| 1235 |
-
|
| 1236 |
-
|
| 1237 |
-
|
| 1238 |
-
|
| 1239 |
-
|
| 1240 |
-
|
| 1241 |
-
|
| 1242 |
-
|
| 1243 |
-
|
| 1244 |
-
|
| 1245 |
-
|
| 1246 |
-
|
| 1247 |
-
|
| 1248 |
-
|
| 1249 |
-
|
| 1250 |
-
|
| 1251 |
-
|
| 1252 |
-
|
| 1253 |
-
|
| 1254 |
-
|
| 1255 |
-
|
| 1256 |
-
|
| 1257 |
-
|
| 1258 |
-
|
| 1259 |
-
|
| 1260 |
-
|
| 1261 |
-
|
| 1262 |
-
|
| 1263 |
-
|
| 1264 |
-
|
| 1265 |
-
|
|
|
|
| 1266 |
|
| 1267 |
|
| 1268 |
-
|
| 1269 |
-
|
| 1270 |
-
|
|
|
|
| 1271 |
|
| 1272 |
-
|
| 1273 |
-
|
| 1274 |
-
|
| 1275 |
|
| 1276 |
-
|
| 1277 |
-
|
| 1278 |
-
|
| 1279 |
|
| 1280 |
-
|
| 1281 |
-
|
| 1282 |
-
|
| 1283 |
-
|
| 1284 |
-
|
| 1285 |
-
|
| 1286 |
|
| 1287 |
|
| 1288 |
-
|
| 1289 |
-
|
| 1290 |
-
|
| 1291 |
-
|
| 1292 |
-
|
| 1293 |
-
|
| 1294 |
-
|
|
|
|
| 1295 |
|
| 1296 |
-
|
| 1297 |
-
|
| 1298 |
|
| 1299 |
|
| 1300 |
-
|
| 1301 |
-
|
| 1302 |
-
|
|
|
|
| 1303 |
|
| 1304 |
-
|
| 1305 |
-
|
| 1306 |
-
|
| 1307 |
|
| 1308 |
-
|
| 1309 |
-
|
| 1310 |
-
|
| 1311 |
-
|
| 1312 |
-
|
| 1313 |
-
|
| 1314 |
-
|
| 1315 |
-
|
| 1316 |
-
|
| 1317 |
-
|
| 1318 |
-
|
| 1319 |
-
|
| 1320 |
-
|
| 1321 |
-
|
| 1322 |
-
|
| 1323 |
-
|
| 1324 |
-
|
| 1325 |
-
|
| 1326 |
|
| 1327 |
|
| 1328 |
-
|
| 1329 |
-
|
| 1330 |
-
|
|
|
|
| 1331 |
|
| 1332 |
-
|
| 1333 |
-
|
| 1334 |
-
|
| 1335 |
-
|
| 1336 |
-
|
| 1337 |
-
|
| 1338 |
|
| 1339 |
-
|
| 1340 |
-
|
| 1341 |
-
|
| 1342 |
-
|
| 1343 |
|
| 1344 |
-
|
| 1345 |
|
| 1346 |
-
|
| 1347 |
-
|
| 1348 |
-
|
| 1349 |
|
| 1350 |
-
|
| 1351 |
|
| 1352 |
-
|
| 1353 |
-
|
| 1354 |
|
| 1355 |
|
| 1356 |
-
|
| 1357 |
-
|
| 1358 |
-
|
| 1359 |
-
|
|
|
|
| 1360 |
|
| 1361 |
-
|
| 1362 |
-
|
| 1363 |
|
| 1364 |
-
|
| 1365 |
-
<th scope="row"><label for="status">' .
|
| 1366 |
<td>';
|
| 1367 |
|
| 1368 |
-
|
| 1369 |
-
<input type="checkbox" id="status" ' . self::checked(1, $options['status']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[status]">
|
| 1370 |
<label for="status" class="toggle"><span class="toggle_handler"></span></label>
|
| 1371 |
</div>';
|
| 1372 |
|
| 1373 |
-
|
| 1374 |
-
|
| 1375 |
|
| 1376 |
-
|
| 1377 |
-
<th scope="row"><label for="search_engines">' .
|
| 1378 |
<td>';
|
| 1379 |
-
|
| 1380 |
<input type="checkbox" id="search_engines" type="checkbox" value="1" class="skip-save open-ucp-upsell">
|
| 1381 |
<label for="search_engines" class="toggle"><span class="toggle_handler"></span></label>
|
| 1382 |
</div>';
|
| 1383 |
|
| 1384 |
-
|
| 1385 |
-
|
| 1386 |
|
| 1387 |
-
|
| 1388 |
-
<th scope="row"><label for="end_date_toggle">' .
|
| 1389 |
<td>';
|
| 1390 |
-
|
| 1391 |
-
<input type="checkbox" id="end_date_toggle" ' . 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]">
|
| 1392 |
<label for="end_date_toggle" class="toggle"><span class="toggle_handler"></span></label>
|
| 1393 |
</div>';
|
| 1394 |
-
|
| 1395 |
-
|
| 1396 |
This option will not "auto-enable" construction mode. Status has to be set to "On".', 'under-construction-page') . '</p></div>';
|
| 1397 |
-
|
| 1398 |
|
| 1399 |
-
|
| 1400 |
-
<th scope="row"><label for="ga_tracking_id_toggle">' .
|
| 1401 |
<td>';
|
| 1402 |
-
|
| 1403 |
-
<input type="checkbox" id="ga_tracking_id_toggle" ' . self::checked(1, empty($options['ga_tracking_id'])? 0: 1) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[ga_tracking_toggle]">
|
| 1404 |
<label for="ga_tracking_id_toggle" class="toggle"><span class="toggle_handler"></span></label>
|
| 1405 |
</div>';
|
| 1406 |
-
|
| 1407 |
-
|
| 1408 |
-
|
| 1409 |
-
|
| 1410 |
-
$reset_url = add_query_arg(array('action' => 'ucp_reset_settings', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
| 1411 |
-
$reset_url = wp_nonce_url($reset_url, 'ucp_reset_settings');
|
| 1412 |
-
echo '<tr valign="top">
|
| 1413 |
-
<th scope="row"><label for="">' . __('Reset Settings', 'under-construction-page') . '</label></th>
|
| 1414 |
-
<td>';
|
| 1415 |
-
echo '<a href="' . $reset_url . '" class="button button-secondary reset-settings">' . __('Reset all settings to default values', 'under-construction-page') . '</a>';
|
| 1416 |
-
echo '<p class="description">' . __('By resetting all settings to their default values any customizations you have done will be lost. There is no undo.', 'under-construction-page') . '</p>';
|
| 1417 |
-
echo '</td></tr>';
|
| 1418 |
-
|
| 1419 |
-
echo '</table>';
|
| 1420 |
-
echo '</div>';
|
| 1421 |
-
|
| 1422 |
-
self::footer_buttons();
|
| 1423 |
-
} // tab_main
|
| 1424 |
-
|
| 1425 |
-
|
| 1426 |
-
static function tab_content() {
|
| 1427 |
-
global $wpdb;
|
| 1428 |
-
$options = self::get_options();
|
| 1429 |
-
$default_options = self::default_options();
|
| 1430 |
|
| 1431 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1432 |
|
| 1433 |
-
|
| 1434 |
-
|
| 1435 |
-
echo '</p></div>';
|
| 1436 |
-
}
|
| 1437 |
|
| 1438 |
-
|
|
|
|
| 1439 |
|
| 1440 |
-
if (self::is_weglot_active()) {
|
| 1441 |
-
echo '<tr id="weglot-settings">';
|
| 1442 |
-
echo '<th><label for="weglot_lang">Multilingual Support</label></th>';
|
| 1443 |
-
echo '<td>';
|
| 1444 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1445 |
|
| 1446 |
-
|
| 1447 |
-
$tmp = '';
|
| 1448 |
-
$active_languages = weglot_get_destination_languages();
|
| 1449 |
-
$languages = weglot_get_languages_available();
|
| 1450 |
-
$original_language = weglot_get_original_language();
|
| 1451 |
|
| 1452 |
-
|
| 1453 |
-
|
| 1454 |
-
|
| 1455 |
-
if ($language->getIso639() == $original_language) {
|
| 1456 |
-
$tmp = '<li>' . esc_html($language->getEnglishName()) . ' - original language</li>' . $tmp;
|
| 1457 |
-
}
|
| 1458 |
-
if (in_array($language->getIso639(), $active_languages, true )) {
|
| 1459 |
-
$tmp .= '<li>' . esc_html($language->getLocalName()) . '</li>';
|
| 1460 |
}
|
| 1461 |
-
|
| 1462 |
-
|
| 1463 |
-
|
| 1464 |
-
|
| 1465 |
-
|
| 1466 |
-
|
| 1467 |
-
|
| 1468 |
-
|
| 1469 |
-
|
| 1470 |
-
|
| 1471 |
-
|
| 1472 |
-
|
| 1473 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1474 |
<input type="checkbox" id="weglot_support" type="checkbox" value="1" class="skip-save open-weglot-upsell">
|
| 1475 |
<label for="weglot_support" class="toggle"><span class="toggle_handler"></span></label></div>';
|
| 1476 |
-
|
| 1477 |
-
|
| 1478 |
-
|
| 1479 |
-
|
| 1480 |
-
|
| 1481 |
-
|
| 1482 |
-
|
| 1483 |
-
|
| 1484 |
-
|
| 1485 |
-
|
| 1486 |
-
|
| 1487 |
-
|
| 1488 |
<input type="checkbox" id="smush_support" type="checkbox" value="1" class="skip-save open-smush-install">
|
| 1489 |
<label for="smush_support" class="toggle"><span class="toggle_handler"></span></label></div>';
|
| 1490 |
-
|
| 1491 |
-
|
| 1492 |
-
|
| 1493 |
-
|
| 1494 |
-
|
| 1495 |
-
|
| 1496 |
-
<th scope="row"><label for="title">' .
|
| 1497 |
-
<td><input type="text" id="title" class="regular-text" name="' . UCP_OPTIONS_KEY . '[title]" value="' . esc_attr($options['title']) . '" />';
|
| 1498 |
-
|
| 1499 |
-
|
| 1500 |
<ul class="ucp-list">
|
| 1501 |
<li><code>[site-title]</code> - blog title, as set in <a href="options-general.php">Options - General</a></li>
|
| 1502 |
<li><code>[site-tagline]</code> - blog tagline, as set in <a href="options-general.php">Options - General</a></li>
|
|
@@ -1504,650 +1578,672 @@ class UCP {
|
|
| 1504 |
<li><code>[wp-url]</code> - WordPress address (URL), as set in <a href="options-general.php">Options - General</a></li>
|
| 1505 |
<li><code>[site-login-url]</code> - URL of the default site login page</li>
|
| 1506 |
</ul>';
|
| 1507 |
-
|
| 1508 |
-
|
| 1509 |
-
|
| 1510 |
-
<th scope="row"><label for="description">' .
|
| 1511 |
-
<td><input id="description" type="text" class="large-text" name="' . UCP_OPTIONS_KEY . '[description]" value="' . esc_attr($options['description']) . '" />';
|
| 1512 |
-
|
| 1513 |
-
|
| 1514 |
-
|
| 1515 |
-
|
| 1516 |
-
<th scope="row"><label for="heading1">' .
|
| 1517 |
-
<td><input id="heading1" type="text" class="large-text" name="' . UCP_OPTIONS_KEY . '[heading1]" value="' . esc_attr($options['heading1']) . '" />';
|
| 1518 |
-
|
| 1519 |
-
|
| 1520 |
-
|
| 1521 |
-
|
| 1522 |
-
<th scope="row"><label for="content">' .
|
| 1523 |
<td>';
|
| 1524 |
-
|
| 1525 |
-
|
| 1526 |
-
|
| 1527 |
|
| 1528 |
-
|
| 1529 |
-
<th scope="row"><label for="linkback">' .
|
| 1530 |
<td>';
|
| 1531 |
-
|
| 1532 |
-
<input type="checkbox" id="linkback" ' . self::checked(1, $options['linkback']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[linkback]">
|
| 1533 |
<label for="linkback" class="toggle"><span class="toggle_handler"></span></label>
|
| 1534 |
</div>';
|
| 1535 |
-
|
| 1536 |
-
|
| 1537 |
-
|
| 1538 |
-
|
| 1539 |
-
|
| 1540 |
-
|
| 1541 |
-
|
| 1542 |
-
echo '<option class="ucp-promo" value="-1">ABeeZee</option><option class="ucp-promo" value="-1">Abel</option><option class="ucp-promo" value="-1">Abril Fatface</option><option class="ucp-promo" value="-1">Aclonica</option><option class="ucp-promo" value="-1">Acme</option><option class="ucp-promo" value="-1">Actor</option><option class="ucp-promo" value="-1">Adamina</option><option class="ucp-promo" value="-1">Advent Pro</option><option class="ucp-promo" value="-1">Aguafina Script</option><option class="ucp-promo" value="-1">Akronim</option><option class="ucp-promo" value="-1">Aladin</option><option class="ucp-promo" value="-1">Aldrich</option><option class="ucp-promo" value="-1">Alef</option><option class="ucp-promo" value="-1">Alegreya</option><option class="ucp-promo" value="-1">Alegreya SC</option><option class="ucp-promo" value="-1">Alegreya Sans</option><option class="ucp-promo" value="-1">Alegreya Sans SC</option><option class="ucp-promo" value="-1">Alex Brush</option><option class="ucp-promo" value="-1">Alfa Slab One</option><option class="ucp-promo" value="-1">Alice</option><option class="ucp-promo" value="-1">Alike</option><option class="ucp-promo" value="-1">Alike Angular</option><option class="ucp-promo" value="-1">Allan</option><option class="ucp-promo" value="-1">Allerta</option><option class="ucp-promo" value="-1">Allerta Stencil</option><option class="ucp-promo" value="-1">Allura</option><option class="ucp-promo" value="-1">Almendra</option><option class="ucp-promo" value="-1">Almendra Display</option><option class="ucp-promo" value="-1">Almendra SC</option><option class="ucp-promo" value="-1">Amarante</option><option class="ucp-promo" value="-1">Amaranth</option><option class="ucp-promo" value="-1">Amatic SC</option><option class="ucp-promo" value="-1">Amethysta</option><option class="ucp-promo" value="-1">Anaheim</option><option class="ucp-promo" value="-1">Andada</option><option class="ucp-promo" value="-1">Andika</option><option class="ucp-promo" value="-1">Angkor</option><option class="ucp-promo" value="-1">Annie Use Your Telescope</option><option class="ucp-promo" value="-1">Anonymous Pro</option><option class="ucp-promo" value="-1">Antic</option><option class="ucp-promo" value="-1">Antic Didone</option><option class="ucp-promo" value="-1">Antic Slab</option><option class="ucp-promo" value="-1">Anton</option><option class="ucp-promo" value="-1">Arapey</option><option class="ucp-promo" value="-1">Arbutus</option><option class="ucp-promo" value="-1">Arbutus Slab</option><option class="ucp-promo" value="-1">Architects Daughter</option><option class="ucp-promo" value="-1">Archivo Black</option><option class="ucp-promo" value="-1">Archivo Narrow</option><option class="ucp-promo" value="-1">Arimo</option><option class="ucp-promo" value="-1">Arizonia</option><option class="ucp-promo" value="-1">Armata</option><option class="ucp-promo" value="-1">Artifika</option><option class="ucp-promo" value="-1">Arvo</option><option class="ucp-promo" value="-1">Asap</option><option class="ucp-promo" value="-1">Asset</option><option class="ucp-promo" value="-1">Astloch</option><option class="ucp-promo" value="-1">Asul</option><option class="ucp-promo" value="-1">Atomic Age</option><option class="ucp-promo" value="-1">Aubrey</option><option class="ucp-promo" value="-1">Audiowide</option><option class="ucp-promo" value="-1">Autour One</option><option class="ucp-promo" value="-1">Average</option><option class="ucp-promo" value="-1">Average Sans</option><option class="ucp-promo" value="-1">Averia Gruesa Libre</option><option class="ucp-promo" value="-1">Averia Libre</option><option class="ucp-promo" value="-1">Averia Sans Libre</option><option class="ucp-promo" value="-1">Averia Serif Libre</option><option class="ucp-promo" value="-1">Bad Script</option><option class="ucp-promo" value="-1">Balthazar</option><option class="ucp-promo" value="-1">Bangers</option><option class="ucp-promo" value="-1">Basic</option><option class="ucp-promo" value="-1">Battambang</option><option class="ucp-promo" value="-1">Baumans</option><option class="ucp-promo" value="-1">Bayon</option><option class="ucp-promo" value="-1">Belgrano</option><option class="ucp-promo" value="-1">Belleza</option><option class="ucp-promo" value="-1">BenchNine</option><option class="ucp-promo" value="-1">Bentham</option><option class="ucp-promo" value="-1">Berkshire Swash</option><option class="ucp-promo" value="-1">Bevan</option><option class="ucp-promo" value="-1">Bigelow Rules</option><option class="ucp-promo" value="-1">Bigshot One</option><option class="ucp-promo" value="-1">Bilbo</option><option class="ucp-promo" value="-1">Bilbo Swash Caps</option><option class="ucp-promo" value="-1">Bitter</option><option class="ucp-promo" value="-1">Black Ops One</option><option class="ucp-promo" value="-1">Bokor</option><option class="ucp-promo" value="-1">Bonbon</option><option class="ucp-promo" value="-1">Boogaloo</option><option class="ucp-promo" value="-1">Bowlby One</option><option class="ucp-promo" value="-1">Bowlby One SC</option><option class="ucp-promo" value="-1">Brawler</option><option class="ucp-promo" value="-1">Bree Serif</option><option class="ucp-promo" value="-1">Bubblegum Sans</option><option class="ucp-promo" value="-1">Bubbler One</option><option class="ucp-promo" value="-1">Buda</option><option class="ucp-promo" value="-1">Buenard</option><option class="ucp-promo" value="-1">Butcherman</option><option class="ucp-promo" value="-1">Butterfly Kids</option><option class="ucp-promo" value="-1">Cabin</option><option class="ucp-promo" value="-1">Cabin Condensed</option><option class="ucp-promo" value="-1">Cabin Sketch</option><option class="ucp-promo" value="-1">Caesar Dressing</option><option class="ucp-promo" value="-1">Cagliostro</option><option class="ucp-promo" value="-1">Calligraffitti</option><option class="ucp-promo" value="-1">Cambo</option><option class="ucp-promo" value="-1">Candal</option><option class="ucp-promo" value="-1">Cantarell</option><option class="ucp-promo" value="-1">Cantata One</option><option class="ucp-promo" value="-1">Cantora One</option><option class="ucp-promo" value="-1">Capriola</option><option class="ucp-promo" value="-1">Cardo</option><option class="ucp-promo" value="-1">Carme</option><option class="ucp-promo" value="-1">Carrois Gothic</option><option class="ucp-promo" value="-1">Carrois Gothic SC</option><option class="ucp-promo" value="-1">Carter One</option><option class="ucp-promo" value="-1">Caudex</option><option class="ucp-promo" value="-1">Cedarville Cursive</option><option class="ucp-promo" value="-1">Ceviche One</option><option class="ucp-promo" value="-1">Changa One</option><option class="ucp-promo" value="-1">Chango</option><option class="ucp-promo" value="-1">Chau Philomene One</option><option class="ucp-promo" value="-1">Chela One</option><option class="ucp-promo" value="-1">Chelsea Market</option><option class="ucp-promo" value="-1">Chenla</option><option class="ucp-promo" value="-1">Cherry Cream Soda</option><option class="ucp-promo" value="-1">Cherry Swash</option><option class="ucp-promo" value="-1">Chewy</option><option class="ucp-promo" value="-1">Chicle</option><option class="ucp-promo" value="-1">Chivo</option><option class="ucp-promo" value="-1">Cinzel</option><option class="ucp-promo" value="-1">Cinzel Decorative</option><option class="ucp-promo" value="-1">Clicker Script</option><option class="ucp-promo" value="-1">Coda</option><option class="ucp-promo" value="-1">Coda Caption</option><option class="ucp-promo" value="-1">Codystar</option><option class="ucp-promo" value="-1">Combo</option><option class="ucp-promo" value="-1">Comfortaa</option><option class="ucp-promo" value="-1">Coming Soon</option><option class="ucp-promo" value="-1">Concert One</option><option class="ucp-promo" value="-1">Condiment</option><option class="ucp-promo" value="-1">Content</option><option class="ucp-promo" value="-1">Contrail One</option><option class="ucp-promo" value="-1">Convergence</option><option class="ucp-promo" value="-1">Cookie</option><option class="ucp-promo" value="-1">Copse</option><option class="ucp-promo" value="-1">Corben</option><option class="ucp-promo" value="-1">Courgette</option><option class="ucp-promo" value="-1">Cousine</option><option class="ucp-promo" value="-1">Coustard</option><option class="ucp-promo" value="-1">Covered By Your Grace</option><option class="ucp-promo" value="-1">Crafty Girls</option><option class="ucp-promo" value="-1">Creepster</option><option class="ucp-promo" value="-1">Crete Round</option><option class="ucp-promo" value="-1">Crimson Text</option><option class="ucp-promo" value="-1">Croissant One</option><option class="ucp-promo" value="-1">Crushed</option><option class="ucp-promo" value="-1">Cuprum</option><option class="ucp-promo" value="-1">Cutive</option><option class="ucp-promo" value="-1">Cutive Mono</option><option class="ucp-promo" value="-1">Damion</option><option class="ucp-promo" value="-1">Dancing Script</option><option class="ucp-promo" value="-1">Dangrek</option><option class="ucp-promo" value="-1">Dawning of a New Day</option><option class="ucp-promo" value="-1">Days One</option><option class="ucp-promo" value="-1">Delius</option><option class="ucp-promo" value="-1">Delius Swash Caps</option><option class="ucp-promo" value="-1">Delius Unicase</option><option class="ucp-promo" value="-1">Della Respira</option><option class="ucp-promo" value="-1">Denk One</option><option class="ucp-promo" value="-1">Devonshire</option><option class="ucp-promo" value="-1">Didact Gothic</option><option class="ucp-promo" value="-1">Diplomata</option><option class="ucp-promo" value="-1">Diplomata SC</option><option class="ucp-promo" value="-1">Domine</option><option class="ucp-promo" value="-1">Donegal One</option><option class="ucp-promo" value="-1">Doppio One</option><option class="ucp-promo" value="-1">Dorsa</option><option class="ucp-promo" value="-1">Dosis</option><option class="ucp-promo" value="-1">Dr Sugiyama</option><option class="ucp-promo" value="-1">Droid Sans</option><option class="ucp-promo" value="-1">Droid Sans Mono</option><option class="ucp-promo" value="-1">Droid Serif</option><option class="ucp-promo" value="-1">Duru Sans</option><option class="ucp-promo" value="-1">Dynalight</option><option class="ucp-promo" value="-1">EB Garamond</option><option class="ucp-promo" value="-1">Eagle Lake</option><option class="ucp-promo" value="-1">Eater</option><option class="ucp-promo" value="-1">Economica</option><option class="ucp-promo" value="-1">Ek Mukta</option><option class="ucp-promo" value="-1">Electrolize</option><option class="ucp-promo" value="-1">Elsie</option><option class="ucp-promo" value="-1">Elsie Swash Caps</option><option class="ucp-promo" value="-1">Emblema One</option><option class="ucp-promo" value="-1">Emilys Candy</option><option class="ucp-promo" value="-1">Engagement</option><option class="ucp-promo" value="-1">Englebert</option><option class="ucp-promo" value="-1">Enriqueta</option><option class="ucp-promo" value="-1">Erica One</option><option class="ucp-promo" value="-1">Esteban</option><option class="ucp-promo" value="-1">Euphoria Script</option><option class="ucp-promo" value="-1">Ewert</option><option class="ucp-promo" value="-1">Exo</option><option class="ucp-promo" value="-1">Exo 2</option><option class="ucp-promo" value="-1">Expletus Sans</option><option class="ucp-promo" value="-1">Fanwood Text</option><option class="ucp-promo" value="-1">Fascinate</option><option class="ucp-promo" value="-1">Fascinate Inline</option><option class="ucp-promo" value="-1">Faster One</option><option class="ucp-promo" value="-1">Fasthand</option><option class="ucp-promo" value="-1">Fauna One</option><option class="ucp-promo" value="-1">Federant</option><option class="ucp-promo" value="-1">Federo</option><option class="ucp-promo" value="-1">Felipa</option><option class="ucp-promo" value="-1">Fenix</option><option class="ucp-promo" value="-1">Finger Paint</option><option class="ucp-promo" value="-1">Fira Mono</option><option class="ucp-promo" value="-1">Fira Sans</option><option class="ucp-promo" value="-1">Fjalla One</option><option class="ucp-promo" value="-1">Fjord One</option><option class="ucp-promo" value="-1">Flamenco</option><option class="ucp-promo" value="-1">Flavors</option><option class="ucp-promo" value="-1">Fondamento</option><option class="ucp-promo" value="-1">Fontdiner Swanky</option><option class="ucp-promo" value="-1">Forum</option><option class="ucp-promo" value="-1">Francois One</option><option class="ucp-promo" value="-1">Freckle Face</option><option class="ucp-promo" value="-1">Fredericka the Great</option><option class="ucp-promo" value="-1">Fredoka One</option><option class="ucp-promo" value="-1">Freehand</option><option class="ucp-promo" value="-1">Fresca</option><option class="ucp-promo" value="-1">Frijole</option><option class="ucp-promo" value="-1">Fruktur</option><option class="ucp-promo" value="-1">Fugaz One</option><option class="ucp-promo" value="-1">GFS Didot</option><option class="ucp-promo" value="-1">GFS Neohellenic</option><option class="ucp-promo" value="-1">Gabriela</option><option class="ucp-promo" value="-1">Gafata</option><option class="ucp-promo" value="-1">Galdeano</option><option class="ucp-promo" value="-1">Galindo</option><option class="ucp-promo" value="-1">Gentium Basic</option><option class="ucp-promo" value="-1">Gentium Book Basic</option><option class="ucp-promo" value="-1">Geo</option><option class="ucp-promo" value="-1">Geostar</option><option class="ucp-promo" value="-1">Geostar Fill</option><option class="ucp-promo" value="-1">Germania One</option><option class="ucp-promo" value="-1">Gilda Display</option><option class="ucp-promo" value="-1">Give You Glory</option><option class="ucp-promo" value="-1">Glass Antiqua</option><option class="ucp-promo" value="-1">Glegoo</option><option class="ucp-promo" value="-1">Gloria Hallelujah</option><option class="ucp-promo" value="-1">Goblin One</option><option class="ucp-promo" value="-1">Gochi Hand</option><option class="ucp-promo" value="-1">Gorditas</option><option class="ucp-promo" value="-1">Goudy Bookletter 1911</option><option class="ucp-promo" value="-1">Graduate</option><option class="ucp-promo" value="-1">Grand Hotel</option><option class="ucp-promo" value="-1">Gravitas One</option><option class="ucp-promo" value="-1">Great Vibes</option><option class="ucp-promo" value="-1">Griffy</option><option class="ucp-promo" value="-1">Gruppo</option><option class="ucp-promo" value="-1">Gudea</option><option class="ucp-promo" value="-1">Habibi</option><option class="ucp-promo" value="-1">Hammersmith One</option><option class="ucp-promo" value="-1">Hanalei</option><option class="ucp-promo" value="-1">Hanalei Fill</option><option class="ucp-promo" value="-1">Handlee</option><option class="ucp-promo" value="-1">Hanuman</option><option class="ucp-promo" value="-1">Happy Monkey</option><option class="ucp-promo" value="-1">Headland One</option><option class="ucp-promo" value="-1">Henny Penny</option><option class="ucp-promo" value="-1">Herr Von Muellerhoff</option><option class="ucp-promo" value="-1">Hind</option><option class="ucp-promo" value="-1">Holtwood One SC</option><option class="ucp-promo" value="-1">Homemade Apple</option><option class="ucp-promo" value="-1">Homenaje</option><option class="ucp-promo" value="-1">IM Fell DW Pica</option><option class="ucp-promo" value="-1">IM Fell DW Pica SC</option><option class="ucp-promo" value="-1">IM Fell Double Pica</option><option class="ucp-promo" value="-1">IM Fell Double Pica SC</option><option class="ucp-promo" value="-1">IM Fell English</option><option class="ucp-promo" value="-1">IM Fell English SC</option><option class="ucp-promo" value="-1">IM Fell French Canon</option><option class="ucp-promo" value="-1">IM Fell French Canon SC</option><option class="ucp-promo" value="-1">IM Fell Great Primer</option><option class="ucp-promo" value="-1">IM Fell Great Primer SC</option><option class="ucp-promo" value="-1">Iceberg</option><option class="ucp-promo" value="-1">Iceland</option><option class="ucp-promo" value="-1">Imprima</option><option class="ucp-promo" value="-1">Inconsolata</option><option class="ucp-promo" value="-1">Inder</option><option class="ucp-promo" value="-1">Indie Flower</option><option class="ucp-promo" value="-1">Inika</option><option class="ucp-promo" value="-1">Irish Grover</option><option class="ucp-promo" value="-1">Istok Web</option><option class="ucp-promo" value="-1">Italiana</option><option class="ucp-promo" value="-1">Italianno</option><option class="ucp-promo" value="-1">Jacques Francois</option><option class="ucp-promo" value="-1">Jacques Francois Shadow</option><option class="ucp-promo" value="-1">Jim Nightshade</option><option class="ucp-promo" value="-1">Jockey One</option><option class="ucp-promo" value="-1">Jolly Lodger</option><option class="ucp-promo" value="-1">Josefin Sans</option><option class="ucp-promo" value="-1">Josefin Slab</option><option class="ucp-promo" value="-1">Joti One</option><option class="ucp-promo" value="-1">Judson</option><option class="ucp-promo" value="-1">Julee</option><option class="ucp-promo" value="-1">Julius Sans One</option><option class="ucp-promo" value="-1">Junge</option><option class="ucp-promo" value="-1">Jura</option><option class="ucp-promo" value="-1">Just Another Hand</option><option class="ucp-promo" value="-1">Just Me Again Down Here</option><option class="ucp-promo" value="-1">Kalam</option><option class="ucp-promo" value="-1">Kameron</option><option class="ucp-promo" value="-1">Kantumruy</option><option class="ucp-promo" value="-1">Karla</option><option class="ucp-promo" value="-1">Karma</option><option class="ucp-promo" value="-1">Kaushan Script</option><option class="ucp-promo" value="-1">Kavoon</option><option class="ucp-promo" value="-1">Kdam Thmor</option><option class="ucp-promo" value="-1">Keania One</option><option class="ucp-promo" value="-1">Kelly Slab</option><option class="ucp-promo" value="-1">Kenia</option><option class="ucp-promo" value="-1">Khmer</option><option class="ucp-promo" value="-1">Kite One</option><option class="ucp-promo" value="-1">Knewave</option><option class="ucp-promo" value="-1">Kotta One</option><option class="ucp-promo" value="-1">Koulen</option><option class="ucp-promo" value="-1">Kranky</option><option class="ucp-promo" value="-1">Kreon</option><option class="ucp-promo" value="-1">Kristi</option><option class="ucp-promo" value="-1">Krona One</option><option class="ucp-promo" value="-1">La Belle Aurore</option><option class="ucp-promo" value="-1">Lancelot</option><option class="ucp-promo" value="-1">Lato</option><option class="ucp-promo" value="-1">League Script</option><option class="ucp-promo" value="-1">Leckerli One</option><option class="ucp-promo" value="-1">Ledger</option><option class="ucp-promo" value="-1">Lekton</option><option class="ucp-promo" value="-1">Lemon</option><option class="ucp-promo" value="-1">Libre Baskerville</option><option class="ucp-promo" value="-1">Life Savers</option><option class="ucp-promo" value="-1">Lilita One</option><option class="ucp-promo" value="-1">Lily Script One</option><option class="ucp-promo" value="-1">Limelight</option><option class="ucp-promo" value="-1">Linden Hill</option><option class="ucp-promo" value="-1">Lobster</option><option class="ucp-promo" value="-1">Lobster Two</option><option class="ucp-promo" value="-1">Londrina Outline</option><option class="ucp-promo" value="-1">Londrina Shadow</option><option class="ucp-promo" value="-1">Londrina Sketch</option><option class="ucp-promo" value="-1">Londrina Solid</option><option class="ucp-promo" value="-1">Lora</option><option class="ucp-promo" value="-1">Love Ya Like A Sister</option><option class="ucp-promo" value="-1">Loved by the King</option><option class="ucp-promo" value="-1">Lovers Quarrel</option><option class="ucp-promo" value="-1">Luckiest Guy</option><option class="ucp-promo" value="-1">Lusitana</option><option class="ucp-promo" value="-1">Lustria</option><option class="ucp-promo" value="-1">Macondo</option><option class="ucp-promo" value="-1">Macondo Swash Caps</option><option class="ucp-promo" value="-1">Magra</option><option class="ucp-promo" value="-1">Maiden Orange</option><option class="ucp-promo" value="-1">Mako</option><option class="ucp-promo" value="-1">Marcellus</option><option class="ucp-promo" value="-1">Marcellus SC</option><option class="ucp-promo" value="-1">Marck Script</option><option class="ucp-promo" value="-1">Margarine</option><option class="ucp-promo" value="-1">Marko One</option><option class="ucp-promo" value="-1">Marmelad</option><option class="ucp-promo" value="-1">Marvel</option><option class="ucp-promo" value="-1">Mate</option><option class="ucp-promo" value="-1">Mate SC</option><option class="ucp-promo" value="-1">Maven Pro</option><option class="ucp-promo" value="-1">McLaren</option><option class="ucp-promo" value="-1">Meddon</option><option class="ucp-promo" value="-1">MedievalSharp</option><option class="ucp-promo" value="-1">Medula One</option><option class="ucp-promo" value="-1">Megrim</option><option class="ucp-promo" value="-1">Meie Script</option><option class="ucp-promo" value="-1">Merienda</option><option class="ucp-promo" value="-1">Merienda One</option><option class="ucp-promo" value="-1">Merriweather</option><option class="ucp-promo" value="-1">Merriweather Sans</option><option class="ucp-promo" value="-1">Metal</option><option class="ucp-promo" value="-1">Metal Mania</option><option class="ucp-promo" value="-1">Metamorphous</option><option class="ucp-promo" value="-1">Metrophobic</option><option class="ucp-promo" value="-1">Michroma</option><option class="ucp-promo" value="-1">Milonga</option><option class="ucp-promo" value="-1">Miltonian</option><option class="ucp-promo" value="-1">Miltonian Tattoo</option><option class="ucp-promo" value="-1">Miniver</option><option class="ucp-promo" value="-1">Miss Fajardose</option><option class="ucp-promo" value="-1">Modern Antiqua</option><option class="ucp-promo" value="-1">Molengo</option><option class="ucp-promo" value="-1">Molle</option><option class="ucp-promo" value="-1">Monda</option><option class="ucp-promo" value="-1">Monofett</option><option class="ucp-promo" value="-1">Monoton</option><option class="ucp-promo" value="-1">Monsieur La Doulaise</option><option class="ucp-promo" value="-1">Montaga</option><option class="ucp-promo" value="-1">Montez</option><option class="ucp-promo" value="-1">Montserrat</option><option class="ucp-promo" value="-1">Montserrat Alternates</option><option class="ucp-promo" value="-1">Montserrat Subrayada</option><option class="ucp-promo" value="-1">Moul</option><option class="ucp-promo" value="-1">Moulpali</option><option class="ucp-promo" value="-1">Mountains of Christmas</option><option class="ucp-promo" value="-1">Mouse Memoirs</option><option class="ucp-promo" value="-1">Mr Bedfort</option><option class="ucp-promo" value="-1">Mr Dafoe</option><option class="ucp-promo" value="-1">Mr De Haviland</option><option class="ucp-promo" value="-1">Mrs Saint Delafield</option><option class="ucp-promo" value="-1">Mrs Sheppards</option><option class="ucp-promo" value="-1">Muli</option><option class="ucp-promo" value="-1">Mystery Quest</option><option class="ucp-promo" value="-1">Neucha</option><option class="ucp-promo" value="-1">Neuton</option><option class="ucp-promo" value="-1">New Rocker</option><option class="ucp-promo" value="-1">News Cycle</option><option class="ucp-promo" value="-1">Niconne</option><option class="ucp-promo" value="-1">Nixie One</option><option class="ucp-promo" value="-1">Nobile</option><option class="ucp-promo" value="-1">Nokora</option><option class="ucp-promo" value="-1">Norican</option><option class="ucp-promo" value="-1">Nosifer</option><option class="ucp-promo" value="-1">Nothing You Could Do</option><option class="ucp-promo" value="-1">Noticia Text</option><option class="ucp-promo" value="-1">Noto Sans</option><option class="ucp-promo" value="-1">Noto Serif</option><option class="ucp-promo" value="-1">Nova Cut</option><option class="ucp-promo" value="-1">Nova Flat</option><option class="ucp-promo" value="-1">Nova Mono</option><option class="ucp-promo" value="-1">Nova Oval</option><option class="ucp-promo" value="-1">Nova Round</option><option class="ucp-promo" value="-1">Nova Script</option><option class="ucp-promo" value="-1">Nova Slim</option><option class="ucp-promo" value="-1">Nova Square</option><option class="ucp-promo" value="-1">Numans</option><option class="ucp-promo" value="-1">Nunito</option><option class="ucp-promo" value="-1">Odor Mean Chey</option><option class="ucp-promo" value="-1">Offside</option><option class="ucp-promo" value="-1">Old Standard TT</option><option class="ucp-promo" value="-1">Oldenburg</option><option class="ucp-promo" value="-1">Oleo Script</option><option class="ucp-promo" value="-1">Oleo Script Swash Caps</option><option class="ucp-promo" value="-1">Open Sans</option><option class="ucp-promo" value="-1">Open Sans Condensed</option><option class="ucp-promo" value="-1">Oranienbaum</option><option class="ucp-promo" value="-1">Orbitron</option><option class="ucp-promo" value="-1">Oregano</option><option class="ucp-promo" value="-1">Orienta</option><option class="ucp-promo" value="-1">Original Surfer</option><option class="ucp-promo" value="-1">Oswald</option><option class="ucp-promo" value="-1">Over the Rainbow</option><option class="ucp-promo" value="-1">Overlock</option><option class="ucp-promo" value="-1">Overlock SC</option><option class="ucp-promo" value="-1">Ovo</option><option class="ucp-promo" value="-1">Oxygen</option><option class="ucp-promo" value="-1">Oxygen Mono</option><option class="ucp-promo" value="-1">PT Mono</option><option class="ucp-promo" value="-1">PT Sans</option><option class="ucp-promo" value="-1">PT Sans Caption</option><option class="ucp-promo" value="-1">PT Sans Narrow</option><option class="ucp-promo" value="-1">PT Serif</option><option class="ucp-promo" value="-1">PT Serif Caption</option><option class="ucp-promo" value="-1">Pacifico</option><option class="ucp-promo" value="-1">Paprika</option><option class="ucp-promo" value="-1">Parisienne</option><option class="ucp-promo" value="-1">Passero One</option><option class="ucp-promo" value="-1">Passion One</option><option class="ucp-promo" value="-1">Pathway Gothic One</option><option class="ucp-promo" value="-1">Patrick Hand</option><option class="ucp-promo" value="-1">Patrick Hand SC</option><option class="ucp-promo" value="-1">Patua One</option><option class="ucp-promo" value="-1">Paytone One</option><option class="ucp-promo" value="-1">Peralta</option><option class="ucp-promo" value="-1">Permanent Marker</option><option class="ucp-promo" value="-1">Petit Formal Script</option><option class="ucp-promo" value="-1">Petrona</option><option class="ucp-promo" value="-1">Philosopher</option><option class="ucp-promo" value="-1">Piedra</option><option class="ucp-promo" value="-1">Pinyon Script</option><option class="ucp-promo" value="-1">Pirata One</option><option class="ucp-promo" value="-1">Plaster</option><option class="ucp-promo" value="-1">Play</option><option class="ucp-promo" value="-1">Playball</option><option class="ucp-promo" value="-1">Playfair Display</option><option class="ucp-promo" value="-1">Playfair Display SC</option><option class="ucp-promo" value="-1">Podkova</option><option class="ucp-promo" value="-1">Poiret One</option><option class="ucp-promo" value="-1">Poller One</option><option class="ucp-promo" value="-1">Poly</option><option class="ucp-promo" value="-1">Pompiere</option><option class="ucp-promo" value="-1">Pontano Sans</option><option class="ucp-promo" value="-1">Port Lligat Sans</option><option class="ucp-promo" value="-1">Port Lligat Slab</option><option class="ucp-promo" value="-1">Prata</option><option class="ucp-promo" value="-1">Preahvihear</option><option class="ucp-promo" value="-1">Press Start 2P</option><option class="ucp-promo" value="-1">Princess Sofia</option><option class="ucp-promo" value="-1">Prociono</option><option class="ucp-promo" value="-1">Prosto One</option><option class="ucp-promo" value="-1">Puritan</option><option class="ucp-promo" value="-1">Purple Purse</option><option class="ucp-promo" value="-1">Quando</option><option class="ucp-promo" value="-1">Quantico</option><option class="ucp-promo" value="-1">Quattrocento</option><option class="ucp-promo" value="-1">Quattrocento Sans</option><option class="ucp-promo" value="-1">Questrial</option><option class="ucp-promo" value="-1">Quicksand</option><option class="ucp-promo" value="-1">Quintessential</option><option class="ucp-promo" value="-1">Qwigley</option><option class="ucp-promo" value="-1">Racing Sans One</option><option class="ucp-promo" value="-1">Radley</option><option class="ucp-promo" value="-1">Rajdhani</option><option class="ucp-promo" value="-1">Raleway</option><option class="ucp-promo" value="-1">Raleway Dots</option><option class="ucp-promo" value="-1">Rambla</option><option class="ucp-promo" value="-1">Rammetto One</option><option class="ucp-promo" value="-1">Ranchers</option><option class="ucp-promo" value="-1">Rancho</option><option class="ucp-promo" value="-1">Rationale</option><option class="ucp-promo" value="-1">Redressed</option><option class="ucp-promo" value="-1">Reenie Beanie</option><option class="ucp-promo" value="-1">Revalia</option><option class="ucp-promo" value="-1">Ribeye</option><option class="ucp-promo" value="-1">Ribeye Marrow</option><option class="ucp-promo" value="-1">Righteous</option><option class="ucp-promo" value="-1">Risque</option><option class="ucp-promo" value="-1">Roboto</option><option class="ucp-promo" value="-1">Roboto Condensed</option><option class="ucp-promo" value="-1">Roboto Slab</option><option class="ucp-promo" value="-1">Rochester</option><option class="ucp-promo" value="-1">Rock Salt</option><option class="ucp-promo" value="-1">Rokkitt</option><option class="ucp-promo" value="-1">Romanesco</option><option class="ucp-promo" value="-1">Ropa Sans</option><option class="ucp-promo" value="-1">Rosario</option><option class="ucp-promo" value="-1">Rosarivo</option><option class="ucp-promo" value="-1">Rouge Script</option><option class="ucp-promo" value="-1">Rubik Mono One</option><option class="ucp-promo" value="-1">Rubik One</option><option class="ucp-promo" value="-1">Ruda</option><option class="ucp-promo" value="-1">Rufina</option><option class="ucp-promo" value="-1">Ruge Boogie</option><option class="ucp-promo" value="-1">Ruluko</option><option class="ucp-promo" value="-1">Rum Raisin</option><option class="ucp-promo" value="-1">Ruslan Display</option><option class="ucp-promo" value="-1">Russo One</option><option class="ucp-promo" value="-1">Ruthie</option><option class="ucp-promo" value="-1">Rye</option><option class="ucp-promo" value="-1">Sacramento</option><option class="ucp-promo" value="-1">Sail</option><option class="ucp-promo" value="-1">Salsa</option><option class="ucp-promo" value="-1">Sanchez</option><option class="ucp-promo" value="-1">Sancreek</option><option class="ucp-promo" value="-1">Sansita One</option><option class="ucp-promo" value="-1">Sarina</option><option class="ucp-promo" value="-1">Satisfy</option><option class="ucp-promo" value="-1">Scada</option><option class="ucp-promo" value="-1">Schoolbell</option><option class="ucp-promo" value="-1">Seaweed Script</option><option class="ucp-promo" value="-1">Sevillana</option><option class="ucp-promo" value="-1">Seymour One</option><option class="ucp-promo" value="-1">Shadows Into Light</option><option class="ucp-promo" value="-1">Shadows Into Light Two</option><option class="ucp-promo" value="-1">Shanti</option><option class="ucp-promo" value="-1">Share</option><option class="ucp-promo" value="-1">Share Tech</option><option class="ucp-promo" value="-1">Share Tech Mono</option><option class="ucp-promo" value="-1">Shojumaru</option><option class="ucp-promo" value="-1">Short Stack</option><option class="ucp-promo" value="-1">Siemreap</option><option class="ucp-promo" value="-1">Sigmar One</option><option class="ucp-promo" value="-1">Signika</option><option class="ucp-promo" value="-1">Signika Negative</option><option class="ucp-promo" value="-1">Simonetta</option><option class="ucp-promo" value="-1">Sintony</option><option class="ucp-promo" value="-1">Sirin Stencil</option><option class="ucp-promo" value="-1">Six Caps</option><option class="ucp-promo" value="-1">Skranji</option><option class="ucp-promo" value="-1">Slabo 13px</option><option class="ucp-promo" value="-1">Slabo 27px</option><option class="ucp-promo" value="-1">Slackey</option><option class="ucp-promo" value="-1">Smokum</option><option class="ucp-promo" value="-1">Smythe</option><option class="ucp-promo" value="-1">Sniglet</option><option class="ucp-promo" value="-1">Snippet</option><option class="ucp-promo" value="-1">Snowburst One</option><option class="ucp-promo" value="-1">Sofadi One</option><option class="ucp-promo" value="-1">Sofia</option><option class="ucp-promo" value="-1">Sonsie One</option><option class="ucp-promo" value="-1">Sorts Mill Goudy</option><option class="ucp-promo" value="-1">Source Code Pro</option><option class="ucp-promo" value="-1">Source Sans Pro</option><option class="ucp-promo" value="-1">Source Serif Pro</option><option class="ucp-promo" value="-1">Special Elite</option><option class="ucp-promo" value="-1">Spicy Rice</option><option class="ucp-promo" value="-1">Spinnaker</option><option class="ucp-promo" value="-1">Spirax</option><option class="ucp-promo" value="-1">Squada One</option><option class="ucp-promo" value="-1">Stalemate</option><option class="ucp-promo" value="-1">Stalinist One</option><option class="ucp-promo" value="-1">Stardos Stencil</option><option class="ucp-promo" value="-1">Stint Ultra Condensed</option><option class="ucp-promo" value="-1">Stint Ultra Expanded</option><option class="ucp-promo" value="-1">Stoke</option><option class="ucp-promo" value="-1">Strait</option><option class="ucp-promo" value="-1">Sue Ellen Francisco</option><option class="ucp-promo" value="-1">Sunshiney</option><option class="ucp-promo" value="-1">Supermercado One</option><option class="ucp-promo" value="-1">Suwannaphum</option><option class="ucp-promo" value="-1">Swanky and Moo Moo</option><option class="ucp-promo" value="-1">Syncopate</option><option class="ucp-promo" value="-1">Tangerine</option><option class="ucp-promo" value="-1">Taprom</option><option class="ucp-promo" value="-1">Tauri</option><option class="ucp-promo" value="-1">Teko</option><option class="ucp-promo" value="-1">Telex</option><option class="ucp-promo" value="-1">Tenor Sans</option><option class="ucp-promo" value="-1">Text Me One</option><option class="ucp-promo" value="-1">The Girl Next Door</option><option class="ucp-promo" value="-1">Tienne</option><option class="ucp-promo" value="-1">Tinos</option><option class="ucp-promo" value="-1">Titan One</option><option class="ucp-promo" value="-1">Titillium Web</option><option class="ucp-promo" value="-1">Trade Winds</option><option class="ucp-promo" value="-1">Trocchi</option><option class="ucp-promo" value="-1">Trochut</option><option class="ucp-promo" value="-1">Trykker</option><option class="ucp-promo" value="-1">Tulpen One</option><option class="ucp-promo" value="-1">Ubuntu</option><option class="ucp-promo" value="-1">Ubuntu Condensed</option><option class="ucp-promo" value="-1">Ubuntu Mono</option><option class="ucp-promo" value="-1">Ultra</option><option class="ucp-promo" value="-1">Uncial Antiqua</option><option class="ucp-promo" value="-1">Underdog</option><option class="ucp-promo" value="-1">Unica One</option><option class="ucp-promo" value="-1">UnifrakturCook</option><option class="ucp-promo" value="-1">UnifrakturMaguntia</option><option class="ucp-promo" value="-1">Unkempt</option><option class="ucp-promo" value="-1">Unlock</option><option class="ucp-promo" value="-1">Unna</option><option class="ucp-promo" value="-1">VT323</option><option class="ucp-promo" value="-1">Vampiro One</option><option class="ucp-promo" value="-1">Varela</option><option class="ucp-promo" value="-1">Varela Round</option><option class="ucp-promo" value="-1">Vast Shadow</option><option class="ucp-promo" value="-1">Vibur</option><option class="ucp-promo" value="-1">Vidaloka</option><option class="ucp-promo" value="-1">Viga</option><option class="ucp-promo" value="-1">Voces</option><option class="ucp-promo" value="-1">Volkhov</option><option class="ucp-promo" value="-1">Vollkorn</option><option class="ucp-promo" value="-1">Voltaire</option><option class="ucp-promo" value="-1">Waiting for the Sunrise</option><option class="ucp-promo" value="-1">Wallpoet</option><option class="ucp-promo" value="-1">Walter Turncoat</option><option class="ucp-promo" value="-1">Warnes</option><option class="ucp-promo" value="-1">Wellfleet</option><option class="ucp-promo" value="-1">Wendy One</option><option class="ucp-promo" value="-1">Wire One</option><option class="ucp-promo" value="-1">Yanone Kaffeesatz</option><option class="ucp-promo" value="-1">Yellowtail</option><option class="ucp-promo" value="-1">Yeseva One</option><option class="ucp-promo" value="-1">Yesteryear</option><option class="ucp-promo" value="-1">Zeyada</option>';
|
| 1543 |
-
|
| 1544 |
-
|
| 1545 |
-
|
| 1546 |
-
|
| 1547 |
-
|
| 1548 |
-
|
| 1549 |
-
<th scope="row"><label for="external_shortcodes">' .
|
| 1550 |
<td>';
|
| 1551 |
-
|
| 1552 |
<input type="checkbox" id="external_shortcodes" type="checkbox" value="1" class="skip-save open-ucp-upsell">
|
| 1553 |
<label for="external_shortcodes" class="toggle"><span class="toggle_handler"></span></label>
|
| 1554 |
</div>';
|
| 1555 |
-
|
| 1556 |
-
|
| 1557 |
|
| 1558 |
-
|
| 1559 |
-
<th scope="row"><label for="login_button">' .
|
| 1560 |
<td>';
|
| 1561 |
-
|
| 1562 |
-
<input type="checkbox" id="login_button" ' . self::checked(1, $options['login_button']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[login_button]">
|
| 1563 |
<label for="login_button" class="toggle"><span class="toggle_handler"></span></label>
|
| 1564 |
</div>';
|
| 1565 |
-
|
| 1566 |
-
|
| 1567 |
|
| 1568 |
-
|
| 1569 |
-
<th scope="row"><label for="custom_footer_code">' .
|
| 1570 |
<td>';
|
| 1571 |
-
|
| 1572 |
-
|
| 1573 |
-
|
| 1574 |
-
|
| 1575 |
-
|
| 1576 |
-
|
| 1577 |
-
|
| 1578 |
-
|
| 1579 |
-
|
| 1580 |
-
|
| 1581 |
-
|
| 1582 |
-
|
| 1583 |
-
<th scope="row"><label for="social_facebook">' .
|
| 1584 |
-
<td><input id="social_facebook" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_facebook]" value="' . esc_attr($options['social_facebook']) . '" placeholder="' .
|
| 1585 |
-
|
| 1586 |
-
|
| 1587 |
-
|
| 1588 |
-
|
| 1589 |
-
<th scope="row"><label for="social_twitter">' .
|
| 1590 |
-
<td><input id="social_twitter" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_twitter]" value="' . esc_attr($options['social_twitter']) . '" placeholder="' .
|
| 1591 |
-
|
| 1592 |
-
|
| 1593 |
-
|
| 1594 |
-
|
| 1595 |
-
<th scope="row"><label for="social_linkedin">' .
|
| 1596 |
-
<td><input id="social_linkedin" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_linkedin]" value="' . esc_attr($options['social_linkedin']) . '" placeholder="' .
|
| 1597 |
-
|
| 1598 |
-
|
| 1599 |
-
|
| 1600 |
-
|
| 1601 |
-
<th scope="row"><label for="social_youtube">' .
|
| 1602 |
-
<td><input id="social_youtube" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_youtube]" value="' . esc_attr($options['social_youtube']) . '" placeholder="' .
|
| 1603 |
-
|
| 1604 |
-
|
| 1605 |
-
|
| 1606 |
-
|
| 1607 |
-
<th scope="row"><label for="social_vimeo">' .
|
| 1608 |
-
<td><input id="social_vimeo" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_vimeo]" value="' . esc_attr($options['social_vimeo']) . '" placeholder="' .
|
| 1609 |
-
|
| 1610 |
-
|
| 1611 |
-
|
| 1612 |
-
|
| 1613 |
-
<th scope="row"><label for="social_pinterest">' .
|
| 1614 |
-
<td><input id="social_pinterest" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_pinterest]" value="' . esc_attr($options['social_pinterest']) . '" placeholder="' .
|
| 1615 |
-
|
| 1616 |
-
|
| 1617 |
-
|
| 1618 |
-
|
| 1619 |
-
<th scope="row"><label for="social_dribbble">' .
|
| 1620 |
-
<td><input id="social_dribbble" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_dribbble]" value="' . esc_attr($options['social_dribbble']) . '" placeholder="' .
|
| 1621 |
-
|
| 1622 |
-
|
| 1623 |
-
|
| 1624 |
-
|
| 1625 |
-
<th scope="row"><label for="social_behance">' .
|
| 1626 |
-
<td><input id="social_behance" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_behance]" value="' . esc_attr($options['social_behance']) . '" placeholder="' .
|
| 1627 |
-
|
| 1628 |
-
|
| 1629 |
-
|
| 1630 |
-
|
| 1631 |
-
<th scope="row"><label for="social_instagram">' .
|
| 1632 |
-
<td><input id="social_instagram" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_instagram]" value="' . esc_attr($options['social_instagram']) . '" placeholder="' .
|
| 1633 |
-
|
| 1634 |
-
|
| 1635 |
-
|
| 1636 |
-
|
| 1637 |
-
<th scope="row"><label for="social_vk">' .
|
| 1638 |
-
<td><input id="social_vk" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_vk]" value="' . esc_attr($options['social_vk']) . '" placeholder="' .
|
| 1639 |
-
|
| 1640 |
-
|
| 1641 |
-
|
| 1642 |
-
|
| 1643 |
-
<th scope="row"><label for="social_telegram">' .
|
| 1644 |
-
<td><input id="social_telegram" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_telegram]" value="' . esc_attr($options['social_telegram']) . '" placeholder="' .
|
| 1645 |
-
|
| 1646 |
-
|
| 1647 |
-
|
| 1648 |
-
|
| 1649 |
-
<th scope="row"><label for="social_skype">' .
|
| 1650 |
-
<td><input id="social_skype" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_skype]" value="' . esc_attr($options['social_skype']) . '" placeholder="' .
|
| 1651 |
-
|
| 1652 |
-
|
| 1653 |
-
|
| 1654 |
-
|
| 1655 |
-
<th scope="row"><label for="social_whatsapp">' .
|
| 1656 |
-
<td><input id="social_whatsapp" type="text" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_whatsapp]" value="' . esc_attr($options['social_whatsapp']) . '" placeholder="' .
|
| 1657 |
-
|
| 1658 |
-
|
| 1659 |
-
|
| 1660 |
-
|
| 1661 |
-
<th scope="row"><label for="social_email">' .
|
| 1662 |
-
<td><input id="social_email" type="email" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_email]" value="' . esc_attr($options['social_email']) . '" placeholder="' .
|
| 1663 |
-
|
| 1664 |
-
|
| 1665 |
-
|
| 1666 |
-
|
| 1667 |
-
<th scope="row"><label for="social_phone">' .
|
| 1668 |
-
<td><input id="social_phone" type="tel" class="regular-text" name="' . UCP_OPTIONS_KEY . '[social_phone]" value="' . esc_attr($options['social_phone']) . '" placeholder="' .
|
| 1669 |
-
|
| 1670 |
-
|
| 1671 |
-
|
| 1672 |
-
|
| 1673 |
-
|
| 1674 |
-
|
| 1675 |
-
|
| 1676 |
-
echo '</div>';
|
| 1677 |
-
|
| 1678 |
-
self::footer_buttons();
|
| 1679 |
-
} // tab_content
|
| 1680 |
-
|
| 1681 |
-
|
| 1682 |
-
static function get_themes() {
|
| 1683 |
-
$themes = array('_pro_custom' => __('Build Your Own Custom Theme', 'under-construction-page'),
|
| 1684 |
-
'mad_designer' => __('Mad Designer', 'under-construction-page'),
|
| 1685 |
-
'_pro_simple-beige' => __('Simple Beige Text', 'under-construction-page'),
|
| 1686 |
-
'plain_text' => __('Plain Text', 'under-construction-page'),
|
| 1687 |
-
'_pro_simple-office-theme' => __('Simple Office', 'under-construction-page'),
|
| 1688 |
-
'under_construction' => __('Under Construction', 'under-construction-page'),
|
| 1689 |
-
'_pro_model-portfolio' => __('Model Portfolio', 'under-construction-page'),
|
| 1690 |
-
'dark' => __('Things Went Dark', 'under-construction-page'),
|
| 1691 |
-
'_pro_watch-company' => __('The Watch Store', 'under-construction-page'),
|
| 1692 |
-
'forklift' => __('Forklift at Work', 'under-construction-page'),
|
| 1693 |
-
'under_construction_text' => __('Under Construction Text', 'under-construction-page'),
|
| 1694 |
-
'_pro_cloud-business-inc' => __('Cloud Business', 'under-construction-page'),
|
| 1695 |
-
'cyber_chick' => __('Cyber Chick', 'under-construction-page'),
|
| 1696 |
-
'rocket' => __('Rocket Launch', 'under-construction-page'),
|
| 1697 |
-
'_pro_smoothie' => __('Green Smoothie Webinar', 'under-construction-page'),
|
| 1698 |
-
'loader' => __('Loader at Work', 'under-construction-page'),
|
| 1699 |
-
'cyber_chick_dark' => __('Cyber Chick Dark', 'under-construction-page'),
|
| 1700 |
-
'_pro_small-office' => __('Small Office', 'under-construction-page'),
|
| 1701 |
-
'safe' => __('Safe', 'under-construction-page'),
|
| 1702 |
-
'people' => __('People at Work', 'under-construction-page'),
|
| 1703 |
-
'_pro_custom' => __('Build Your Own Custom Theme', 'under-construction-page'),
|
| 1704 |
-
'windmill' => __('Windmill', 'under-construction-page'),
|
| 1705 |
-
'sad_site' => __('Sad Site', 'under-construction-page'),
|
| 1706 |
-
'_pro-soothing-nature' => __('Soothing Nature', 'under-construction-page'),
|
| 1707 |
-
'lighthouse' => __('Lighthouse', 'under-construction-page'),
|
| 1708 |
-
'hot_air_baloon' => __('Hot Air Balloon', 'under-construction-page'),
|
| 1709 |
-
'_pro_business-statistics' => __('Business Statistics', 'under-construction-page'),
|
| 1710 |
-
'people_2' => __('People at Work #2', 'under-construction-page'),
|
| 1711 |
-
'rocket_2' => __('Rocket Launch #2', 'under-construction-page'),
|
| 1712 |
-
'_pro_travel-blog' => __('Travel Blog', 'under-construction-page'),
|
| 1713 |
-
'light_bulb' => __('Light Bulb', 'under-construction-page'),
|
| 1714 |
-
'ambulance' => __('Ambulance', 'under-construction-page'),
|
| 1715 |
-
'_pro_forest-in-the-fog' => __('Forest in the Fog', 'under-construction-page'),
|
| 1716 |
-
'laptop' => __('Laptop', 'under-construction-page'),
|
| 1717 |
-
'puzzles' => __('Puzzles', 'under-construction-page'),
|
| 1718 |
-
'_pro_sunset' => __('Sunset', 'under-construction-page'),
|
| 1719 |
-
'iot' => __('Internet of Things', 'under-construction-page'),
|
| 1720 |
-
'setup' => __('Setup', 'under-construction-page'),
|
| 1721 |
-
'_pro_fitness-studio' => __('Fitness Studio Landing Page', 'under-construction-page'),
|
| 1722 |
-
'stop' => __('Stop', 'under-construction-page'),
|
| 1723 |
-
'clock' => __('Clock', 'under-construction-page'),
|
| 1724 |
-
'_pro_mountain' => __('Mountain Peak', 'under-construction-page'),
|
| 1725 |
-
'bulldozer' => __('Bulldozer at Work', 'under-construction-page'),
|
| 1726 |
-
'christmas' => __('Christmas Greetings', 'under-construction-page'),
|
| 1727 |
-
'_pro_pink-lips' => __('Pink Lips', 'under-construction-page'),
|
| 1728 |
-
'hard_worker' => __('Hard Worker', 'under-construction-page'),
|
| 1729 |
-
'closed' => __('Temporarily Closed', 'under-construction-page'),
|
| 1730 |
-
'_pro_animated-green' => __('Simple Green Animated', 'under-construction-page'),
|
| 1731 |
-
'dumper_truck' => __('Dumper Truck', 'under-construction-page'),
|
| 1732 |
-
'000webhost' => __('000webhost', 'under-construction-page'),
|
| 1733 |
-
'_pro_grayscale-city' => __('Grayscale City', 'under-construction-page'),
|
| 1734 |
-
'work_desk' => __('Work Desk', 'under-construction-page'),
|
| 1735 |
-
'research' => __('Research', 'under-construction-page'),
|
| 1736 |
-
'_pro_wedding' => __('Wedding', 'under-construction-page'));
|
| 1737 |
-
|
| 1738 |
-
$themes = apply_filters('ucp_themes', $themes);
|
| 1739 |
-
|
| 1740 |
-
return $themes;
|
| 1741 |
-
} // get_themes
|
| 1742 |
-
|
| 1743 |
-
|
| 1744 |
-
static function tab_design() {
|
| 1745 |
-
$options = self::get_options();
|
| 1746 |
-
|
| 1747 |
-
$img_path = UCP_PLUGIN_URL . 'images/thumbnails/';
|
| 1748 |
-
$themes = self::get_themes();
|
| 1749 |
-
|
| 1750 |
-
echo '<table class="form-table">';
|
| 1751 |
-
echo '<tr valign="top">
|
| 1752 |
-
<td colspan="2"><b style="margin-bottom: 10px; display: inline-block;">' . __('Theme', 'under-construction-page') . '</b> (<a target="_blank" href="' . self::generate_web_link('themes-browse-premium', 'templates') . '">browse 230+ premium themes</a>)<br>';
|
| 1753 |
-
echo '<input type="hidden" id="theme_id" name="' . UCP_OPTIONS_KEY . '[theme]" value="' . $options['theme'] . '">';
|
| 1754 |
-
|
| 1755 |
-
foreach ($themes as $theme_id => $theme_name) {
|
| 1756 |
-
if ($theme_id === $options['theme']) {
|
| 1757 |
-
$class = ' active';
|
| 1758 |
-
} else {
|
| 1759 |
-
$class = '';
|
| 1760 |
-
}
|
| 1761 |
-
if (substr($theme_id, 0, 4) == '_pro') {
|
| 1762 |
-
$theme_id = substr($theme_id, 5);
|
| 1763 |
-
echo '<div class="ucp-thumb ucp-thumb-pro" data-theme-id="' . $theme_id . '"><img src="' . $img_path . 'pro/' . $theme_id . '.jpg" alt="' . $theme_name . '" title="' . $theme_name . '"><span>' . $theme_name . '</span>';
|
| 1764 |
-
echo '<div class="buttons"><a href="#" data-pro-ad="activate_' . $theme_id . '" class="open-ucp-upsell button button-primary">Activate</a> ';
|
| 1765 |
-
if ($theme_id != 'custom') {
|
| 1766 |
-
echo '<a href="https://templates.underconstructionpage.com/?ucp_template_preview&template=' . $theme_id . '&utm_source=ucp-free&utm_medium=plugin&utm_content=design-preview-' . $theme_id . '&utm_campaign=ucp-free-v' . self::$version . '" class="button-secondary" target="_blank">Preview</a>';
|
| 1767 |
-
}
|
| 1768 |
-
echo '</div>';
|
| 1769 |
-
echo '<div title="PRO template" class="ribbon"><i><span class="dashicons dashicons-star-filled"></span></i></div></div>';
|
| 1770 |
-
} else {
|
| 1771 |
-
echo '<div class="ucp-thumb' . $class . '" data-theme-id="' . $theme_id . '"><img src="' . $img_path . $theme_id . '.png" alt="' . $theme_name . '" title="' . $theme_name . '"><span>' . $theme_name . '</span>';
|
| 1772 |
-
echo '<div class="buttons">';
|
| 1773 |
-
if ($theme_id !== $options['theme']) {
|
| 1774 |
-
echo '<a href="#" class="button button-primary activate-theme">Activate</a> ';
|
| 1775 |
-
}
|
| 1776 |
-
echo '<a href="' . get_home_url() . '/?ucp_preview&theme=' . $theme_id . '" class="button-secondary" target="_blank">Preview</a></div>';
|
| 1777 |
echo '</div>';
|
| 1778 |
-
}
|
| 1779 |
-
} // foreach
|
| 1780 |
|
| 1781 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1782 |
|
| 1783 |
-
|
| 1784 |
-
|
|
|
|
|
|
|
| 1785 |
<td>';
|
| 1786 |
-
|
| 1787 |
-
|
| 1788 |
For RTL languages support add: <code>body { direction: rtl; }</code><br>If you need help with writing custom CSS code, post your question on the <a href="https://wordpress.org/support/plugin/under-construction-page/" target="_blank">official forum</a>.</p>';
|
| 1789 |
-
|
| 1790 |
|
| 1791 |
-
|
| 1792 |
|
| 1793 |
-
|
| 1794 |
-
|
| 1795 |
|
| 1796 |
|
| 1797 |
-
|
| 1798 |
-
|
| 1799 |
-
|
| 1800 |
-
|
| 1801 |
-
|
|
|
|
| 1802 |
|
| 1803 |
-
|
| 1804 |
-
|
| 1805 |
-
|
| 1806 |
-
|
| 1807 |
-
|
| 1808 |
|
| 1809 |
-
|
| 1810 |
-
|
| 1811 |
-
|
| 1812 |
-
|
| 1813 |
|
| 1814 |
-
|
| 1815 |
-
|
| 1816 |
|
| 1817 |
-
|
| 1818 |
-
<th scope="row"><label for="whitelisted_ips">' .
|
| 1819 |
<td>';
|
| 1820 |
-
|
| 1821 |
<input type="checkbox" id="whitelisted_ips" type="checkbox" value="1" class="skip-save open-ucp-upsell">
|
| 1822 |
<label for="whitelisted_ips" class="toggle"><span class="toggle_handler"></span></label>
|
| 1823 |
</div>';
|
| 1824 |
-
|
| 1825 |
-
|
| 1826 |
|
| 1827 |
-
|
| 1828 |
-
<th scope="row"><label for="access_links">' .
|
| 1829 |
<td>';
|
| 1830 |
-
|
| 1831 |
<input type="checkbox" id="access_links" type="checkbox" value="1" class="skip-save open-ucp-upsell">
|
| 1832 |
<label for="access_links" class="toggle"><span class="toggle_handler"></span></label>
|
| 1833 |
</div>';
|
| 1834 |
-
|
| 1835 |
-
|
| 1836 |
|
| 1837 |
-
|
| 1838 |
-
<th scope="row">' .
|
| 1839 |
<td>';
|
| 1840 |
-
|
| 1841 |
-
|
| 1842 |
-
|
| 1843 |
-
|
| 1844 |
-
|
| 1845 |
-
|
| 1846 |
-
|
| 1847 |
-
<th scope="row"><label for="whitelisted_users">' .
|
| 1848 |
-
<td><select id="whitelisted_users" class="select2" style="width: 50%; max-width: 300px;" name="' . UCP_OPTIONS_KEY . '[whitelisted_users][]" multiple>';
|
| 1849 |
-
|
| 1850 |
-
|
| 1851 |
-
|
| 1852 |
-
|
| 1853 |
-
|
| 1854 |
-
|
| 1855 |
-
|
| 1856 |
-
|
| 1857 |
-
|
| 1858 |
-
|
| 1859 |
-
|
| 1860 |
-
|
| 1861 |
-
|
| 1862 |
-
|
| 1863 |
-
|
| 1864 |
-
|
| 1865 |
-
|
| 1866 |
-
<th scope="row"><label for="direct_access_password">' .
|
| 1867 |
<td>';
|
| 1868 |
-
|
| 1869 |
-
|
| 1870 |
-
|
| 1871 |
|
| 1872 |
-
|
| 1873 |
-
<th scope="row"><label for="site_password">' .
|
| 1874 |
<td>';
|
| 1875 |
-
|
| 1876 |
<input type="checkbox" id="site_password" type="checkbox" value="1" class="skip-save open-ucp-upsell">
|
| 1877 |
<label for="site_password" class="toggle"><span class="toggle_handler"></span></label>
|
| 1878 |
</div>';
|
| 1879 |
-
|
| 1880 |
-
|
| 1881 |
|
| 1882 |
-
|
| 1883 |
-
|
| 1884 |
|
| 1885 |
-
|
| 1886 |
-
|
| 1887 |
|
| 1888 |
|
| 1889 |
-
|
| 1890 |
-
|
| 1891 |
-
|
| 1892 |
-
|
| 1893 |
-
|
|
|
|
| 1894 |
|
| 1895 |
-
|
| 1896 |
-
|
| 1897 |
-
|
| 1898 |
-
|
| 1899 |
-
|
| 1900 |
|
| 1901 |
-
|
| 1902 |
|
| 1903 |
-
|
| 1904 |
|
| 1905 |
-
|
| 1906 |
|
| 1907 |
-
|
| 1908 |
|
| 1909 |
-
|
| 1910 |
|
| 1911 |
-
|
| 1912 |
|
| 1913 |
-
|
| 1914 |
|
| 1915 |
-
|
| 1916 |
|
| 1917 |
-
|
| 1918 |
|
| 1919 |
-
|
| 1920 |
|
| 1921 |
-
|
| 1922 |
|
| 1923 |
-
|
| 1924 |
|
| 1925 |
-
|
| 1926 |
|
| 1927 |
-
|
| 1928 |
|
| 1929 |
-
|
| 1930 |
|
| 1931 |
-
|
| 1932 |
|
| 1933 |
-
|
| 1934 |
|
| 1935 |
-
|
| 1936 |
-
|
| 1937 |
-
|
| 1938 |
-
|
| 1939 |
-
|
| 1940 |
-
|
| 1941 |
-
|
| 1942 |
-
|
| 1943 |
|
| 1944 |
-
|
| 1945 |
|
| 1946 |
-
|
| 1947 |
-
|
| 1948 |
|
| 1949 |
|
| 1950 |
-
|
| 1951 |
-
|
| 1952 |
-
|
|
|
|
| 1953 |
|
| 1954 |
-
|
| 1955 |
-
|
| 1956 |
|
| 1957 |
-
|
| 1958 |
-
|
| 1959 |
-
|
| 1960 |
-
|
| 1961 |
-
|
| 1962 |
-
|
| 1963 |
-
|
| 1964 |
-
|
| 1965 |
-
|
| 1966 |
-
|
| 1967 |
-
|
| 1968 |
-
|
| 1969 |
-
|
| 1970 |
-
|
| 1971 |
-
|
| 1972 |
-
|
| 1973 |
|
| 1974 |
|
| 1975 |
-
|
| 1976 |
-
|
| 1977 |
|
| 1978 |
-
|
| 1979 |
-
<th scope="row"><label for="license_key">' .
|
| 1980 |
-
|
| 1981 |
-
|
| 1982 |
-
|
| 1983 |
|
| 1984 |
-
|
| 1985 |
-
|
| 1986 |
-
|
| 1987 |
-
|
| 1988 |
-
|
| 1989 |
-
|
| 1990 |
-
|
| 1991 |
-
|
| 1992 |
-
|
| 1993 |
-
|
| 1994 |
-
|
| 1995 |
-
|
| 1996 |
-
|
| 1997 |
-
|
| 1998 |
-
<th scope="row"><label for="">' .
|
| 1999 |
<td><b style="color: #66b317;">Active</b><br>
|
| 2000 |
-
Type: ' . str_replace('pro', 'PRO', $options['license_type']);
|
| 2001 |
-
|
| 2002 |
</tr>';
|
| 2003 |
-
|
| 2004 |
-
|
| 2005 |
-
<th scope="row"><label for="">' .
|
| 2006 |
<td><b style="color: #ea1919;">Inactive</b>';
|
| 2007 |
-
|
| 2008 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2009 |
}
|
| 2010 |
-
|
| 2011 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2012 |
}
|
| 2013 |
-
echo '</td></tr>';
|
| 2014 |
-
}
|
| 2015 |
-
}
|
| 2016 |
|
| 2017 |
-
|
| 2018 |
-
|
| 2019 |
|
| 2020 |
-
|
| 2021 |
-
|
| 2022 |
-
echo '<br><br><small><i>By attempting to activate a license you agree to share the following data with <a href="https://www.webfactoryltd.com/" target="_blank">WebFactory Ltd</a>: license key, site URL, site title, site WP version, and UnderConstructionPage (free) version.</i></small>';
|
| 2023 |
-
echo '</p>';
|
| 2024 |
-
} // tab_pro
|
| 2025 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2026 |
|
| 2027 |
-
|
| 2028 |
-
static function main_page() {
|
| 2029 |
-
if (!current_user_can('manage_options')) {
|
| 2030 |
-
wp_die('You do not have sufficient permissions to access this page.');
|
| 2031 |
-
}
|
| 2032 |
|
| 2033 |
-
|
| 2034 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2035 |
|
| 2036 |
-
|
| 2037 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2038 |
|
| 2039 |
-
|
| 2040 |
-
|
| 2041 |
-
|
| 2042 |
-
|
| 2043 |
-
|
| 2044 |
-
|
| 2045 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2046 |
|
| 2047 |
-
|
|
|
|
|
|
|
|
|
|
| 2048 |
|
| 2049 |
-
|
| 2050 |
-
|
| 2051 |
-
|
| 2052 |
-
|
| 2053 |
-
echo '<li><a href="#' . $tab['id'] . '" class="' . $tab['class'] . '"><span class="icon"><span class="dashicons ' . $tab['icon'] . '"></span></span><span class="label">' . $tab['label'] . '</span></a></li>';
|
| 2054 |
-
}
|
| 2055 |
-
}
|
| 2056 |
-
echo '</ul>';
|
| 2057 |
|
| 2058 |
-
|
| 2059 |
-
|
| 2060 |
-
echo '<
|
| 2061 |
-
call_user_func($tab['callback']);
|
| 2062 |
echo '</div>';
|
| 2063 |
-
}
|
| 2064 |
-
} // foreach
|
| 2065 |
-
echo '</div>'; // ucp_tabs
|
| 2066 |
-
|
| 2067 |
-
echo '</form>'; // ucp_tabs
|
| 2068 |
-
echo '</div>'; // wrap
|
| 2069 |
-
|
| 2070 |
-
// weglot install dialog
|
| 2071 |
-
echo '<div id="weglot-upsell-dialog" style="display: none;" title="Weglot"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
|
| 2072 |
-
echo '<div style="padding: 20px; font-size: 15px;">';
|
| 2073 |
-
echo '<ul class="ucp-list">';
|
| 2074 |
-
echo '<li>Best-rated WordPress multilingual plugin</li>';
|
| 2075 |
-
echo '<li>Simple 5-minute set-up. No coding required</li>';
|
| 2076 |
-
echo '<li>Accelerated translation management: Machine & human translations with access to professional translators</li>';
|
| 2077 |
-
echo '<li>Compatible with any WordPress theme or plugin</li>';
|
| 2078 |
-
echo '<li>Optimized for multilingual SEO</li>';
|
| 2079 |
-
echo '<li>10-day Free trial and free plan available</li>';
|
| 2080 |
-
echo '</ul>';
|
| 2081 |
-
echo '<p class="upsell-footer"><a class="button button-primary" id="install-weglot">Install & activate Weglot to make your website multilingual</a></p>';
|
| 2082 |
-
echo '</div>';
|
| 2083 |
-
echo '</div>';
|
| 2084 |
-
// weglot install dialog
|
| 2085 |
-
|
| 2086 |
-
$promo = self::is_promo_active();
|
| 2087 |
-
if ($promo == 'welcome') {
|
| 2088 |
-
$header = 'A <b>welcoming discount</b> has been applied to selected packages! It\'s <b>time limited</b> and available for only another <b class="ucp-countdown">59min 30sec</b>.';
|
| 2089 |
-
$products['agency'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'agency-lifetime-welcome', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW <u>$51 OFF</u><br><del>$250</del> $199<br><small>Discount ends in <b class="ucp-countdown">59min 30sec</b></small>');
|
| 2090 |
-
$products['pro-lifetime'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'pro-lifetime-welcome', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW <u>20% OFF</u><br><del>$69</del> $55<br><small>Discount ends in <b class="ucp-countdown">59min 30sec</b></small>');
|
| 2091 |
-
$products['pro-yearly'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'pro-monthly', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW<br>$8.99<small>/month</small>');
|
| 2092 |
-
} elseif ($promo == 'olduser') {
|
| 2093 |
-
$header = 'A special <b>discount for long-term users</b> has been applied to selected packages!';
|
| 2094 |
-
$products['agency'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'agency-lifetime-olduser', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW <u>$51 OFF</u><br><del>$250</del> $199');
|
| 2095 |
-
$products['pro-lifetime'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'pro-lifetime-olduser', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW <u>20% OFF</u><br><del>$69</del> $55');
|
| 2096 |
-
$products['pro-yearly'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'pro-monthly', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW<br>$8.99<small>/month</small>');
|
| 2097 |
-
} else {
|
| 2098 |
-
$header = '';
|
| 2099 |
-
$products['agency'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'agency-lifetime', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW<br>$250');
|
| 2100 |
-
$products['pro-lifetime'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'pro-lifetime', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW<br>$69');
|
| 2101 |
-
$products['pro-yearly'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'pro-monthly', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW<br>$8.99<small>/month</small>');
|
| 2102 |
-
}
|
| 2103 |
|
| 2104 |
-
|
| 2105 |
-
|
| 2106 |
-
|
| 2107 |
-
|
| 2108 |
-
|
| 2109 |
-
|
| 2110 |
-
|
| 2111 |
-
|
| 2112 |
-
|
| 2113 |
-
|
| 2114 |
-
|
| 2115 |
-
|
| 2116 |
-
|
| 2117 |
-
|
| 2118 |
-
|
| 2119 |
-
|
| 2120 |
-
|
| 2121 |
-
|
| 2122 |
-
|
| 2123 |
-
|
| 2124 |
-
echo '<span>220+ Templates</span>';
|
| 2125 |
-
echo '<p>Building your own page from scratch is fun, but often you don\'t have time to do it! Use one of our purpose-built templates, change a few lines of text and you\'re ready to rock!</p>';
|
| 2126 |
-
echo '</div>';
|
| 2127 |
-
|
| 2128 |
-
echo '<div class="ucp-pro-feature">';
|
| 2129 |
-
echo '<span>Affiliate & Traffic Tracking</span>';
|
| 2130 |
-
echo '<p>Having traffic is nice. Having targeted traffic is better! Generate tracked inbound links & share them on social media or with your affiliates to pinpoint the best traffic sources.</p>';
|
| 2131 |
-
echo '</div>';
|
| 2132 |
-
|
| 2133 |
-
echo '<div class="ucp-pro-feature">';
|
| 2134 |
-
echo '<span>Unlimited 3rd Party Integrations</span>';
|
| 2135 |
-
echo '<p>With our unique universal autoresponder support, you can integrate any email autoresponder or webinar system in a page within seconds. Or push data to Zapier to more than 1,000 applications.</p>';
|
| 2136 |
-
echo '</div>';
|
| 2137 |
-
|
| 2138 |
-
echo '<div class="ucp-pro-feature">';
|
| 2139 |
-
echo '<span>Made for Agencies & Webmasters</span>';
|
| 2140 |
-
echo '<p>Creating sites for others? We have your back! Our features, support & licensing options are optimised for agencies while in-house, USA based support guarantee your peace of mind.</p>';
|
| 2141 |
-
echo '</div>';
|
| 2142 |
-
|
| 2143 |
-
echo '<p class="upsell-footer">For a complete list of features, demos and screenshots visit <a href="' . self::generate_web_link('features-more-info') . '" target="_blank">underconstructionpage.com</a>. Already have a PRO license? <a href="#" class="go-to-license-key">Activate it</a>.</p>';
|
| 2144 |
-
|
| 2145 |
-
echo '</div>'; // features tab
|
| 2146 |
-
echo '<div class="upsell-tab" id="tab-upsell-buy" style="display: none;">';
|
| 2147 |
-
if (!empty($header)) {
|
| 2148 |
-
echo '<div class="upsell-header">' . $header . '</div>';
|
| 2149 |
-
}
|
| 2150 |
-
echo '<table id="ucp-pricing-table">
|
| 2151 |
<tbody>
|
| 2152 |
<tr>
|
| 2153 |
<td>
|
|
@@ -2181,9 +2277,9 @@ class UCP {
|
|
| 2181 |
<td>1 Month/Year of Support & Updates</td>
|
| 2182 |
</tr>
|
| 2183 |
<tr style="display: none;">
|
| 2184 |
-
<td>
|
| 2185 |
-
<td>
|
| 2186 |
-
<td>
|
| 2187 |
</tr>
|
| 2188 |
<tr>
|
| 2189 |
<td>Drag&Drop Builder</td>
|
|
@@ -2191,12 +2287,12 @@ class UCP {
|
|
| 2191 |
<td>Drag&Drop Builder</td>
|
| 2192 |
</tr>
|
| 2193 |
<tr>
|
| 2194 |
-
<td>
|
| 2195 |
-
<td>
|
| 2196 |
-
<td>
|
| 2197 |
</tr>
|
| 2198 |
<tr>
|
| 2199 |
-
<td>
|
| 2200 |
<td><span class="dashicons dashicons-no"></td>
|
| 2201 |
<td><span class="dashicons dashicons-no"></td>
|
| 2202 |
</tr>
|
|
@@ -2207,79 +2303,89 @@ class UCP {
|
|
| 2207 |
</tr>
|
| 2208 |
<tr class="bb0">
|
| 2209 |
<td>
|
| 2210 |
-
<a data-href-org="' . $products['agency']['link'] . '" class="promo-button go-to-license-key" href="' . $products['agency']['link'] . '" target="_blank">'
|
|
|
|
|
|
|
| 2211 |
</td>
|
| 2212 |
<td>
|
| 2213 |
-
<a data-href-org="' . $products['pro-lifetime']['link'] . '" class="promo-button go-to-license-key" href="' . $products['pro-lifetime']['link'] . '" target="_blank">'
|
|
|
|
|
|
|
| 2214 |
</td>
|
| 2215 |
<td>
|
| 2216 |
-
<a data-href-org="' . $products['pro-yearly']['link'] . '" class="promo-button go-to-license-key" href="' . $products['pro-yearly']['link'] . '" target="_blank">'
|
|
|
|
|
|
|
| 2217 |
</td>
|
| 2218 |
</tr>
|
| 2219 |
<tr class="bb0">
|
| 2220 |
-
<td colspan="3"><span class="instant-download"><span class="dashicons dashicons-yes"></span> Secure payment <span class="dashicons dashicons-yes"></span> Instant activation from WP admin <span class="dashicons dashicons-yes"></span> 100% No-Risk Money Back Guarantee</span></td>
|
| 2221 |
</tr>
|
| 2222 |
</tbody>
|
| 2223 |
</table>';
|
| 2224 |
-
|
| 2225 |
-
|
| 2226 |
-
|
| 2227 |
|
| 2228 |
-
|
| 2229 |
-
|
| 2230 |
|
| 2231 |
|
| 2232 |
-
|
| 2233 |
-
|
| 2234 |
-
|
|
|
|
| 2235 |
|
| 2236 |
-
|
| 2237 |
-
|
| 2238 |
-
|
| 2239 |
|
| 2240 |
-
|
| 2241 |
-
|
| 2242 |
-
|
| 2243 |
|
| 2244 |
-
|
| 2245 |
-
|
| 2246 |
|
| 2247 |
|
| 2248 |
-
|
| 2249 |
-
|
| 2250 |
-
|
| 2251 |
-
|
| 2252 |
-
|
| 2253 |
-
|
| 2254 |
-
|
|
|
|
| 2255 |
|
| 2256 |
|
| 2257 |
-
|
| 2258 |
-
|
| 2259 |
-
|
|
|
|
| 2260 |
|
| 2261 |
-
|
| 2262 |
-
|
| 2263 |
|
| 2264 |
-
|
| 2265 |
-
|
| 2266 |
|
| 2267 |
|
| 2268 |
-
|
| 2269 |
-
|
| 2270 |
-
|
| 2271 |
-
|
| 2272 |
-
|
|
|
|
| 2273 |
|
| 2274 |
-
|
| 2275 |
-
|
| 2276 |
|
| 2277 |
-
|
| 2278 |
-
|
| 2279 |
-
|
| 2280 |
-
|
| 2281 |
-
|
| 2282 |
-
|
| 2283 |
body{
|
| 2284 |
font-family: sans-serif;
|
| 2285 |
font-size: 14px;
|
|
@@ -2288,112 +2394,474 @@ class UCP {
|
|
| 2288 |
}
|
| 2289 |
</style>';
|
| 2290 |
|
| 2291 |
-
|
| 2292 |
-
|
| 2293 |
-
|
| 2294 |
-
|
| 2295 |
-
|
| 2296 |
-
|
| 2297 |
-
|
| 2298 |
-
|
| 2299 |
-
|
| 2300 |
-
|
| 2301 |
-
|
| 2302 |
-
|
| 2303 |
-
|
| 2304 |
-
|
| 2305 |
-
|
| 2306 |
-
|
| 2307 |
|
| 2308 |
-
|
| 2309 |
-
|
| 2310 |
-
|
| 2311 |
|
| 2312 |
-
|
| 2313 |
-
|
| 2314 |
|
| 2315 |
-
|
| 2316 |
-
|
| 2317 |
-
|
| 2318 |
-
|
| 2319 |
-
|
| 2320 |
-
|
|
|
|
|
|
|
|
|
|
| 2321 |
|
| 2322 |
-
echo '</div>';
|
| 2323 |
-
} // install_weglot
|
| 2324 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2325 |
|
| 2326 |
-
|
| 2327 |
-
|
| 2328 |
-
|
| 2329 |
-
}
|
| 2330 |
-
$all_plugins = get_plugins();
|
| 2331 |
|
| 2332 |
-
|
| 2333 |
-
|
| 2334 |
-
|
| 2335 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2336 |
}
|
| 2337 |
-
|
| 2338 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2339 |
|
| 2340 |
-
|
| 2341 |
-
|
| 2342 |
-
|
| 2343 |
-
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
| 2344 |
-
}
|
| 2345 |
|
| 2346 |
-
|
| 2347 |
-
|
| 2348 |
-
if (version_compare($weglot_info['Version'], '2.5', '<')) {
|
| 2349 |
-
return false;
|
| 2350 |
-
} else {
|
| 2351 |
-
return true;
|
| 2352 |
-
}
|
| 2353 |
-
} else {
|
| 2354 |
-
return false;
|
| 2355 |
-
}
|
| 2356 |
-
} // is_weglot_active
|
| 2357 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2358 |
|
| 2359 |
-
|
| 2360 |
-
|
| 2361 |
-
|
| 2362 |
-
|
| 2363 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2364 |
|
| 2365 |
-
|
| 2366 |
-
|
| 2367 |
-
|
| 2368 |
-
|
| 2369 |
-
|
| 2370 |
-
}
|
| 2371 |
-
} // is_weglot_setup
|
| 2372 |
|
| 2373 |
|
| 2374 |
-
|
| 2375 |
-
|
| 2376 |
-
|
| 2377 |
-
|
| 2378 |
-
|
|
|
|
| 2379 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2380 |
|
| 2381 |
-
// clean up on deactivation
|
| 2382 |
-
static function deactivate() {
|
| 2383 |
-
delete_option(UCP_POINTERS_KEY);
|
| 2384 |
-
delete_option(UCP_NOTICES_KEY);
|
| 2385 |
-
self::empty_cache();
|
| 2386 |
-
} // deactivate
|
| 2387 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2388 |
|
| 2389 |
-
|
| 2390 |
-
|
| 2391 |
-
|
| 2392 |
-
|
| 2393 |
-
|
| 2394 |
-
|
| 2395 |
-
|
| 2396 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2397 |
} // class UCP
|
| 2398 |
|
| 2399 |
|
| 4 |
Plugin URI: https://underconstructionpage.com/
|
| 5 |
Description: Put your site behind a great looking under construction, coming soon, maintenance mode or landing page.
|
| 6 |
Author: WebFactory Ltd
|
| 7 |
+
Version: 3.90
|
| 8 |
Requires at least: 4.0
|
| 9 |
Requires PHP: 5.2
|
| 10 |
Tested up to: 5.8
|
| 11 |
Author URI: https://www.webfactoryltd.com/
|
| 12 |
Text Domain: under-construction-page
|
| 13 |
|
| 14 |
+
Copyright 2015 - 2022 WebFactory Ltd (email: ucp@webfactoryltd.com)
|
| 15 |
|
| 16 |
This program is free software; you can redistribute it and/or modify
|
| 17 |
it under the terms of the GNU General Public License, version 2, as
|
| 29 |
|
| 30 |
// this is an include only WP file
|
| 31 |
if (!defined('ABSPATH')) {
|
| 32 |
+
die;
|
| 33 |
}
|
| 34 |
|
| 35 |
|
| 48 |
|
| 49 |
|
| 50 |
// main plugin class
|
| 51 |
+
class UCP
|
| 52 |
+
{
|
| 53 |
+
static $version = 0;
|
| 54 |
+
static $licensing_servers = array('https://license1.underconstructionpage.com/', 'https://license2.underconstructionpage.com/');
|
| 55 |
|
| 56 |
|
| 57 |
+
// get plugin version from header
|
| 58 |
+
static function get_plugin_version()
|
| 59 |
+
{
|
| 60 |
+
$plugin_data = get_file_data(__FILE__, array('version' => 'Version'), 'plugin');
|
| 61 |
+
self::$version = $plugin_data['version'];
|
| 62 |
|
| 63 |
+
return $plugin_data['version'];
|
| 64 |
+
} // get_plugin_version
|
| 65 |
|
| 66 |
|
| 67 |
+
// hook things up
|
| 68 |
+
static function init()
|
| 69 |
+
{
|
| 70 |
+
// check if minimal required WP version is present
|
| 71 |
+
if (false === self::check_wp_version(4.0)) {
|
| 72 |
+
return false;
|
| 73 |
+
}
|
| 74 |
|
| 75 |
+
if (is_admin()) {
|
| 76 |
+
// if the plugin was updated from ver < 1.20 upgrade settings array
|
| 77 |
+
self::maybe_upgrade();
|
| 78 |
+
|
| 79 |
+
// add UCP menu to admin tools menu group
|
| 80 |
+
add_action('admin_menu', array(__CLASS__, 'admin_menu'));
|
| 81 |
+
|
| 82 |
+
// settings registration
|
| 83 |
+
add_action('admin_init', array(__CLASS__, 'register_settings'));
|
| 84 |
+
|
| 85 |
+
// aditional links in plugin description
|
| 86 |
+
add_filter(
|
| 87 |
+
'plugin_action_links_' . plugin_basename(__FILE__),
|
| 88 |
+
array(__CLASS__, 'plugin_action_links')
|
| 89 |
+
);
|
| 90 |
+
add_filter('plugin_row_meta', array(__CLASS__, 'plugin_meta_links'), 10, 2);
|
| 91 |
+
add_filter('admin_footer_text', array(__CLASS__, 'admin_footer_text'));
|
| 92 |
+
add_filter('admin_footer', array(__CLASS__, 'admin_footer'));
|
| 93 |
+
|
| 94 |
+
// manages admin header notifications
|
| 95 |
+
add_action('admin_notices', array(__CLASS__, 'admin_notices'));
|
| 96 |
+
add_action('admin_action_ucp_dismiss_notice', array(__CLASS__, 'dismiss_notice'));
|
| 97 |
+
add_action('admin_action_ucp_change_status', array(__CLASS__, 'change_status'));
|
| 98 |
+
add_action('admin_action_ucp_reset_settings', array(__CLASS__, 'reset_settings'));
|
| 99 |
+
add_action('admin_action_install_weglot', array(__CLASS__, 'install_weglot'));
|
| 100 |
+
add_action('admin_action_install_wpfssl', array(__CLASS__, 'install_wpfssl'));
|
| 101 |
+
|
| 102 |
+
// enqueue admin scripts
|
| 103 |
+
add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'), 100, 1);
|
| 104 |
+
|
| 105 |
+
// AJAX endpoints
|
| 106 |
+
add_action('wp_ajax_ucp_dismiss_pointer', array(__CLASS__, 'dismiss_pointer_ajax'));
|
| 107 |
+
add_action('wp_ajax_ucp_dismiss_survey', array(__CLASS__, 'dismiss_survey_ajax'));
|
| 108 |
+
add_action('wp_ajax_ucp_submit_survey', array(__CLASS__, 'submit_survey_ajax'));
|
| 109 |
+
add_action('wp_ajax_ucp_submit_support_message', array(__CLASS__, 'submit_support_message_ajax'));
|
| 110 |
+
} else {
|
| 111 |
+
// main plugin logic
|
| 112 |
+
add_action('wp', array(__CLASS__, 'display_construction_page'), 0, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
+
// show under construction notice on login form
|
| 115 |
+
add_filter('login_message', array(__CLASS__, 'login_message'));
|
| 116 |
|
| 117 |
+
// disable feeds
|
| 118 |
+
add_action('do_feed_rdf', array(__CLASS__, 'disable_feed'), 0, 1);
|
| 119 |
+
add_action('do_feed_rss', array(__CLASS__, 'disable_feed'), 0, 1);
|
| 120 |
+
add_action('do_feed_rss2', array(__CLASS__, 'disable_feed'), 0, 1);
|
| 121 |
+
add_action('do_feed_atom', array(__CLASS__, 'disable_feed'), 0, 1);
|
| 122 |
|
| 123 |
+
add_action('wp_footer', array(__CLASS__, 'whitelisted_notice'));
|
| 124 |
+
} // if not admin
|
| 125 |
|
| 126 |
+
// admin bar notice for frontend & backend
|
| 127 |
+
add_action('wp_before_admin_bar_render', array(__CLASS__, 'admin_bar'));
|
| 128 |
+
add_action('wp_head', array(__CLASS__, 'admin_bar_style'));
|
| 129 |
+
add_action('admin_head', array(__CLASS__, 'admin_bar_style'));
|
| 130 |
|
| 131 |
+
UCP_license::init();
|
| 132 |
+
} // init
|
| 133 |
|
| 134 |
|
| 135 |
+
// check if user has the minimal WP version required by UCP
|
| 136 |
+
static function check_wp_version($min_version)
|
| 137 |
+
{
|
| 138 |
+
if (!version_compare(get_bloginfo('version'), $min_version, '>=')) {
|
| 139 |
+
add_action('admin_notices', array(__CLASS__, 'notice_min_wp_version'));
|
| 140 |
+
return false;
|
| 141 |
+
} else {
|
| 142 |
+
return true;
|
| 143 |
+
}
|
| 144 |
+
} // check_wp_version
|
| 145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
|
| 147 |
+
// display error message if WP version is too low
|
| 148 |
+
static function notice_min_wp_version()
|
| 149 |
+
{
|
| 150 |
+
echo '<div class="error"><p>' . sprintf(esc_attr__('UnderConstruction plugin <b>requires WordPress version 4.0</b> or higher to function properly. You are using WordPress version %s. Please <a href="%s">update it</a>.', 'under-construction-page'), get_bloginfo('version'), admin_url('update-core.php')) . '</p></div>';
|
| 151 |
+
} // notice_min_wp_version_error
|
| 152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
|
| 154 |
+
// some things have to be loaded earlier
|
| 155 |
+
static function plugins_loaded()
|
| 156 |
+
{
|
| 157 |
+
self::get_plugin_version();
|
| 158 |
|
| 159 |
+
load_plugin_textdomain('under-construction-page');
|
| 160 |
+
} // plugins_loaded
|
| 161 |
|
|
|
|
|
|
|
|
|
|
| 162 |
|
| 163 |
+
// activate doesn't get fired on upgrades so we have to compensate
|
| 164 |
+
public static function maybe_upgrade()
|
| 165 |
+
{
|
| 166 |
+
$meta = self::get_meta();
|
| 167 |
+
$options = self::get_options();
|
| 168 |
|
| 169 |
+
// added in v1.70 to rename roles to whitelisted_roles
|
| 170 |
+
if (isset($options['roles'])) {
|
| 171 |
+
$options['whitelisted_roles'] = $options['roles'];
|
| 172 |
+
unset($options['roles']);
|
| 173 |
+
update_option(UCP_OPTIONS_KEY, $options);
|
| 174 |
+
}
|
| 175 |
|
| 176 |
+
// check if we need to convert options from the old format to new, or maybe it is already done
|
| 177 |
+
if (isset($meta['options_ver']) && $meta['options_ver'] == self::$version) {
|
| 178 |
+
return;
|
| 179 |
+
}
|
| 180 |
|
| 181 |
+
if (get_option('set_size') || get_option('set_tweet') || get_option('set_fb') || get_option('set_font') || get_option('set_msg') || get_option('set_opt') || get_option('set_admin')) {
|
| 182 |
+
// convert old options to new
|
| 183 |
+
$options['status'] = (get_option('set_opt') === 'Yes') ? '1' : '0';
|
| 184 |
+
$options['content'] = trim(get_option('set_msg'));
|
| 185 |
+
$options['whitelisted_roles'] = (get_option('set_admin') === 'No') ? array('administrator') : array();
|
| 186 |
+
$options['social_facebook'] = trim(get_option('set_fb'));
|
| 187 |
+
$options['social_twitter'] = trim(get_option('set_tweet'));
|
| 188 |
+
update_option(UCP_OPTIONS_KEY, $options);
|
| 189 |
+
|
| 190 |
+
delete_option('set_size');
|
| 191 |
+
delete_option('set_tweet');
|
| 192 |
+
delete_option('set_fb');
|
| 193 |
+
delete_option('set_font');
|
| 194 |
+
delete_option('set_msg');
|
| 195 |
+
delete_option('set_opt');
|
| 196 |
+
delete_option('set_admin');
|
| 197 |
+
|
| 198 |
+
self::reset_pointers();
|
| 199 |
+
}
|
| 200 |
|
| 201 |
+
// we update only once
|
| 202 |
+
$meta['options_ver'] = self::$version;
|
| 203 |
+
update_option(UCP_META_KEY, $meta);
|
| 204 |
+
} // maybe_upgrade
|
|
|
|
| 205 |
|
|
|
|
|
|
|
| 206 |
|
| 207 |
+
// get plugin's options
|
| 208 |
+
static function get_options()
|
| 209 |
+
{
|
| 210 |
+
$options = get_option(UCP_OPTIONS_KEY, array());
|
| 211 |
|
| 212 |
+
if (!is_array($options)) {
|
| 213 |
+
$options = array();
|
| 214 |
+
}
|
| 215 |
+
$options = array_merge(self::default_options(), $options);
|
| 216 |
|
| 217 |
+
return $options;
|
| 218 |
+
} // get_options
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 219 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 220 |
|
| 221 |
+
// get plugin's meta data
|
| 222 |
+
static function get_meta()
|
| 223 |
+
{
|
| 224 |
+
$meta = get_option(UCP_META_KEY, array());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 225 |
|
| 226 |
+
if (!is_array($meta) || empty($meta)) {
|
| 227 |
+
$meta['first_version'] = self::get_plugin_version();
|
| 228 |
+
$meta['first_install'] = time();
|
| 229 |
+
update_option(UCP_META_KEY, $meta);
|
| 230 |
+
}
|
| 231 |
|
| 232 |
+
return $meta;
|
| 233 |
+
} // get_meta
|
|
|
|
|
|
|
|
|
|
|
|
|
| 234 |
|
|
|
|
|
|
|
| 235 |
|
| 236 |
+
// fetch and display the construction page if it's enabled or preview requested
|
| 237 |
+
static function display_construction_page()
|
| 238 |
+
{
|
| 239 |
+
$options = self::get_options();
|
| 240 |
+
$request_uri = trailingslashit(strtolower(@parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)));
|
| 241 |
|
| 242 |
+
// just to be on the safe side
|
| 243 |
+
if (defined('DOING_CRON') && DOING_CRON) {
|
| 244 |
+
return false;
|
| 245 |
+
}
|
| 246 |
+
if (defined('DOING_AJAX') && DOING_AJAX) {
|
| 247 |
+
return false;
|
| 248 |
+
}
|
| 249 |
+
if (defined('WP_CLI') && WP_CLI) {
|
| 250 |
+
return false;
|
| 251 |
+
}
|
| 252 |
|
| 253 |
+
// some URLs have to be accessible at all times
|
| 254 |
+
if (
|
| 255 |
+
$request_uri == '/wp-admin/' ||
|
| 256 |
+
$request_uri == '/feed/' ||
|
| 257 |
+
$request_uri == '/feed/rss/' ||
|
| 258 |
+
$request_uri == '/feed/rss2/' ||
|
| 259 |
+
$request_uri == '/feed/rdf/' ||
|
| 260 |
+
$request_uri == '/feed/atom/' ||
|
| 261 |
+
$request_uri == '/admin/' ||
|
| 262 |
+
$request_uri == '/wp-login.php'
|
| 263 |
+
) {
|
| 264 |
+
return;
|
| 265 |
+
}
|
| 266 |
|
| 267 |
+
if (true == self::is_construction_mode_enabled(false) || (is_user_logged_in() && isset($_GET['ucp_preview']))) {
|
| 268 |
+
header(self::wp_get_server_protocol() . ' 200 OK');
|
| 269 |
+
if ($options['end_date'] && $options['end_date'] != '0000-00-00 00:00') {
|
| 270 |
+
header('Retry-After: ' . date('D, d M Y H:i:s T', strtotime($options['end_date'])));
|
| 271 |
+
} else {
|
| 272 |
+
header('Retry-After: ' . DAY_IN_SECONDS);
|
| 273 |
+
}
|
| 274 |
+
|
| 275 |
+
$themes = self::get_themes();
|
| 276 |
+
if (!empty($_GET['theme']) && substr(sanitize_text_field($_GET['theme']), 5) != '_pro_' && !empty($themes[sanitize_text_field($_GET['theme'])])) {
|
| 277 |
+
$theme = sanitize_text_field($_GET['theme']);
|
| 278 |
+
} else {
|
| 279 |
+
$theme = $options['theme'];
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
self::wp_kses_wf(self::get_template($theme));
|
| 283 |
+
die();
|
| 284 |
+
}
|
| 285 |
+
} // display_construction_page
|
| 286 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 287 |
|
| 288 |
+
// keeping compatibility with WP < v4.4
|
| 289 |
+
static function wp_get_server_protocol()
|
| 290 |
+
{
|
| 291 |
+
$protocol = $_SERVER['SERVER_PROTOCOL'];
|
| 292 |
+
if (!in_array($protocol, array('HTTP/1.1', 'HTTP/2', 'HTTP/2.0'))) {
|
| 293 |
+
$protocol = 'HTTP/1.0';
|
| 294 |
+
}
|
| 295 |
|
| 296 |
+
return $protocol;
|
| 297 |
+
} // wp_get_server_protocol
|
|
|
|
|
|
|
|
|
|
|
|
|
| 298 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 299 |
|
| 300 |
+
// disables feed if necessary
|
| 301 |
+
static function disable_feed()
|
| 302 |
+
{
|
| 303 |
+
if (true == self::is_construction_mode_enabled(false)) {
|
| 304 |
+
echo '<?xml version="1.0" encoding="UTF-8" ?><status>Service unavailable.</status>';
|
| 305 |
+
exit;
|
| 306 |
+
}
|
| 307 |
+
} // disable_feed
|
|
|
|
| 308 |
|
| 309 |
|
| 310 |
+
// enqueue CSS and JS scripts in admin
|
| 311 |
+
static function admin_enqueue_scripts($hook)
|
| 312 |
+
{
|
| 313 |
+
$surveys = get_option(UCP_SURVEYS_KEY);
|
| 314 |
+
$meta = self::get_meta();
|
| 315 |
+
$pointers = get_option(UCP_POINTERS_KEY);
|
| 316 |
|
| 317 |
+
// auto remove welcome pointer when options are opened
|
| 318 |
+
if (self::is_plugin_page()) {
|
| 319 |
+
unset($pointers['welcome']);
|
| 320 |
+
update_option(UCP_POINTERS_KEY, $pointers);
|
| 321 |
+
}
|
| 322 |
|
| 323 |
+
// survey is shown min 5min after install
|
| 324 |
+
// DISABLED
|
| 325 |
+
if (0 && empty($surveys['usage']) && time() - $meta['first_install'] > 300) {
|
| 326 |
+
$open_survey = true;
|
| 327 |
+
} else {
|
| 328 |
+
$open_survey = false;
|
| 329 |
+
}
|
| 330 |
|
| 331 |
+
$promo = self::is_promo_active();
|
| 332 |
+
if ($promo == 'welcome') {
|
| 333 |
+
$countdown = $meta['first_install'] + HOUR_IN_SECONDS;
|
| 334 |
+
} else {
|
| 335 |
+
$countdown = 0;
|
| 336 |
+
}
|
| 337 |
|
| 338 |
+
$js_localize = array(
|
| 339 |
+
'undocumented_error' => esc_attr__('An undocumented error has occured. Please refresh the page and try again.', 'under-construction-page'),
|
| 340 |
+
'plugin_name' => esc_attr__('UnderConstructionPage', 'under-construction-page'),
|
| 341 |
+
'settings_url' => admin_url('options-general.php?page=ucp'),
|
| 342 |
+
'whitelisted_users_placeholder' => esc_attr__('Select whitelisted user(s)', 'under-construction-page'),
|
| 343 |
+
'open_survey' => $open_survey,
|
| 344 |
+
'promo_countdown' => $countdown,
|
| 345 |
+
'wpfssl_install_url' => add_query_arg(array('action' => 'install_wpfssl', '_wpnonce' => wp_create_nonce('install_wpfssl'), 'rnd' => rand()), admin_url('admin.php')),
|
| 346 |
+
'is_activated' => UCP_license::is_activated(),
|
| 347 |
+
'dialog_upsell_title' => '<img alt="' . esc_attr__('UnderConstructionPage PRO', 'under-construction-page') . '" title="' . esc_attr__('UnderConstructionPage PRO', 'under-construction-page') . '" src="' . UCP_PLUGIN_URL . 'images/ucp_pro_logo_white.png' . '">',
|
| 348 |
+
'weglot_dialog_upsell_title' => '<img alt="' . esc_attr__('Weglot', 'under-construction-page') . '" title="' . esc_attr__('Weglot', 'under-construction-page') . '" src="' . UCP_PLUGIN_URL . 'images/weglot-logo-white.png' . '">',
|
| 349 |
+
'weglot_install_url' => add_query_arg(array('action' => 'install_weglot'), admin_url('admin.php')),
|
| 350 |
+
'nonce_dismiss_survey' => wp_create_nonce('ucp_dismiss_survey'),
|
| 351 |
+
'nonce_submit_survey' => wp_create_nonce('ucp_submit_survey'),
|
| 352 |
+
'nonce_submit_support_message' => wp_create_nonce('ucp_submit_support_message'),
|
| 353 |
+
'deactivate_confirmation' => esc_attr__('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')
|
| 354 |
+
);
|
| 355 |
+
|
| 356 |
+
if (self::is_plugin_page()) {
|
| 357 |
+
remove_editor_styles();
|
| 358 |
+
wp_enqueue_style('wp-jquery-ui-dialog');
|
| 359 |
+
wp_enqueue_style('ucp-select2', UCP_PLUGIN_URL . 'css/select2.min.css', array(), self::$version);
|
| 360 |
+
wp_enqueue_style('ucp-admin', UCP_PLUGIN_URL . 'css/ucp-admin.css', array(), self::$version);
|
| 361 |
+
|
| 362 |
+
wp_enqueue_script('jquery-ui-tabs');
|
| 363 |
+
wp_enqueue_script('jquery-ui-dialog');
|
| 364 |
+
wp_enqueue_script('ucp-jquery-plugins', UCP_PLUGIN_URL . 'js/ucp-jquery-plugins.js', array('jquery'), self::$version, true);
|
| 365 |
+
wp_enqueue_script('ucp-select2', UCP_PLUGIN_URL . 'js/select2.min.js', array(), self::$version, true);
|
| 366 |
+
wp_enqueue_script('ucp-admin', UCP_PLUGIN_URL . 'js/ucp-admin.js', array('jquery'), self::$version, true);
|
| 367 |
+
wp_localize_script('ucp-admin', 'ucp', $js_localize);
|
| 368 |
+
|
| 369 |
+
// fix for agressive plugins
|
| 370 |
+
wp_dequeue_style('uiStyleSheet');
|
| 371 |
+
wp_dequeue_style('wpcufpnAdmin');
|
| 372 |
+
wp_dequeue_style('unifStyleSheet');
|
| 373 |
+
wp_dequeue_style('wpcufpn_codemirror');
|
| 374 |
+
wp_dequeue_style('wpcufpn_codemirrorTheme');
|
| 375 |
+
wp_dequeue_style('collapse-admin-css');
|
| 376 |
+
wp_dequeue_style('jquery-ui-css');
|
| 377 |
+
wp_dequeue_style('tribe-common-admin');
|
| 378 |
+
wp_dequeue_style('file-manager__jquery-ui-css');
|
| 379 |
+
wp_dequeue_style('file-manager__jquery-ui-css-theme');
|
| 380 |
+
wp_dequeue_style('wpmegmaps-jqueryui');
|
| 381 |
+
wp_dequeue_style('wp-botwatch-css');
|
| 382 |
+
}
|
| 383 |
|
| 384 |
+
if ($pointers) {
|
| 385 |
+
$pointers['_nonce_dismiss_pointer'] = wp_create_nonce('ucp_dismiss_pointer');
|
| 386 |
+
wp_enqueue_script('wp-pointer');
|
| 387 |
+
wp_enqueue_script('ucp-pointers', plugins_url('js/ucp-admin-pointers.js', __FILE__), array('jquery'), self::$version, true);
|
| 388 |
+
wp_enqueue_style('wp-pointer');
|
| 389 |
+
wp_localize_script('wp-pointer', 'ucp_pointers', $pointers);
|
| 390 |
+
wp_localize_script('wp-pointer', 'ucp', $js_localize);
|
| 391 |
+
}
|
| 392 |
+
} // admin_enqueue_scripts
|
| 393 |
|
|
|
|
|
|
|
|
|
|
| 394 |
|
| 395 |
+
// permanently dismiss a pointer
|
| 396 |
+
static function dismiss_pointer_ajax()
|
| 397 |
+
{
|
| 398 |
+
check_ajax_referer('ucp_dismiss_pointer');
|
| 399 |
|
| 400 |
+
$pointers = get_option(UCP_POINTERS_KEY);
|
| 401 |
+
$pointer = trim(sanitize_text_field($_POST['pointer']));
|
| 402 |
|
| 403 |
+
if (empty($pointers) || empty($pointers[$pointer])) {
|
| 404 |
+
wp_send_json_error();
|
| 405 |
+
}
|
| 406 |
|
| 407 |
+
unset($pointers[$pointer]);
|
| 408 |
+
update_option(UCP_POINTERS_KEY, $pointers);
|
| 409 |
|
| 410 |
+
wp_send_json_success();
|
| 411 |
+
} // dismiss_pointer_ajax
|
|
|
|
| 412 |
|
|
|
|
| 413 |
|
| 414 |
+
// permanently dismiss a survey
|
| 415 |
+
static function dismiss_survey_ajax()
|
| 416 |
+
{
|
| 417 |
+
check_ajax_referer('ucp_dismiss_survey');
|
| 418 |
|
| 419 |
+
$surveys = get_option(UCP_SURVEYS_KEY, array());
|
| 420 |
+
$survey = trim(sanitize_text_field($_POST['survey']));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 421 |
|
| 422 |
+
$surveys[$survey] = -1;
|
| 423 |
+
update_option(UCP_SURVEYS_KEY, $surveys);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 424 |
|
| 425 |
+
wp_send_json_success();
|
| 426 |
+
} // dismiss_survey_ajax
|
| 427 |
|
|
|
|
|
|
|
|
|
|
| 428 |
|
| 429 |
+
// send support message
|
| 430 |
+
static function submit_support_message_ajax()
|
| 431 |
+
{
|
| 432 |
+
check_ajax_referer('ucp_submit_support_message');
|
| 433 |
|
| 434 |
+
$options = self::get_options();
|
|
|
|
|
|
|
| 435 |
|
| 436 |
+
$email = sanitize_text_field($_POST['support_email']);
|
| 437 |
+
if (!is_email($email)) {
|
| 438 |
+
wp_send_json_error(esc_attr__('Please double-check your email address.', 'under-construction-page'));
|
| 439 |
+
}
|
| 440 |
|
| 441 |
+
$message = stripslashes(sanitize_text_field($_POST['support_message']));
|
| 442 |
+
$subject = 'UCP Support';
|
| 443 |
+
$body = $message;
|
| 444 |
+
if (!empty($_POST['support_info'])) {
|
| 445 |
+
$theme = wp_get_theme();
|
| 446 |
+
$body .= "\r\n\r\nSite details:\r\n";
|
| 447 |
+
$body .= ' WordPress version: ' . get_bloginfo('version') . "\r\n";
|
| 448 |
+
$body .= ' UCP version: ' . self::$version . "\r\n";
|
| 449 |
+
$body .= ' PHP version: ' . PHP_VERSION . "\r\n";
|
| 450 |
+
$body .= ' Site URL: ' . get_bloginfo('url') . "\r\n";
|
| 451 |
+
$body .= ' WordPress URL: ' . get_bloginfo('wpurl') . "\r\n";
|
| 452 |
+
$body .= ' Theme: ' . $theme->get('Name') . ' v' . $theme->get('Version') . "\r\n";
|
| 453 |
+
$body .= ' Options: ' . "\r\n" . serialize($options) . "\r\n";
|
| 454 |
+
}
|
| 455 |
+
$headers = 'From: ' . $email . "\r\n" . 'Reply-To: ' . $email;
|
| 456 |
|
| 457 |
+
if (true === wp_mail('ucp@webfactoryltd.com', $subject, $body, $headers)) {
|
| 458 |
+
wp_send_json_success();
|
| 459 |
+
} else {
|
| 460 |
+
wp_send_json_error(esc_attr__('Something is not right with your wp_mail() function. Please email as at ucp@webfactoryltd.com.', 'under-construction-page'));
|
| 461 |
+
}
|
| 462 |
+
} // submit_support_message
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 463 |
|
|
|
|
|
|
|
| 464 |
|
| 465 |
+
// submit survey
|
| 466 |
+
static function submit_survey_ajax()
|
| 467 |
+
{
|
| 468 |
+
check_ajax_referer('ucp_submit_survey');
|
| 469 |
|
| 470 |
+
$options = self::get_options();
|
| 471 |
+
$meta = self::get_meta();
|
| 472 |
+
$surveys = get_option(UCP_SURVEYS_KEY);
|
| 473 |
|
| 474 |
+
$vars = wp_parse_args($_POST, array('survey' => '', 'answers' => '', 'custom_answer' => $options['theme'], 'emailme' => ''));
|
| 475 |
+
$vars['answers'] = trim($vars['answers'], ',');
|
| 476 |
+
$vars['custom_answer'] = trim(strip_tags($vars['custom_answer']));
|
|
|
|
| 477 |
|
| 478 |
+
$vars['custom_answer'] .= '; ' . date('Y-m-d H:i:s', $meta['first_install']);
|
| 479 |
+
$vars['custom_answer'] = trim($vars['custom_answer'], ' ;');
|
|
|
|
| 480 |
|
| 481 |
+
if (empty($vars['survey']) || empty($vars['answers'])) {
|
| 482 |
+
wp_send_json_error();
|
| 483 |
+
}
|
| 484 |
|
| 485 |
+
$request_params = array('sslverify' => false, 'timeout' => 15, 'redirection' => 2);
|
| 486 |
+
$request_args = array(
|
| 487 |
+
'action' => 'submit_survey',
|
| 488 |
+
'survey' => $vars['survey'],
|
| 489 |
+
'email' => $vars['emailme'],
|
| 490 |
+
'answers' => $vars['answers'],
|
| 491 |
+
'custom_answer' => $vars['custom_answer'],
|
| 492 |
+
'first_version' => $meta['first_version'],
|
| 493 |
+
'version' => UCP::$version,
|
| 494 |
+
'codebase' => 'free',
|
| 495 |
+
'site' => get_home_url()
|
| 496 |
+
);
|
| 497 |
+
|
| 498 |
+
$url = add_query_arg($request_args, self::$licensing_servers[0]);
|
| 499 |
+
$response = wp_remote_get(esc_url_raw($url), $request_params);
|
| 500 |
+
|
| 501 |
+
if (is_wp_error($response) || !wp_remote_retrieve_body($response)) {
|
| 502 |
+
$url = add_query_arg($request_args, self::$licensing_servers[1]);
|
| 503 |
+
$response = wp_remote_get(esc_url_raw($url), $request_params);
|
| 504 |
+
}
|
| 505 |
|
| 506 |
+
$surveys[$vars['survey']] = time();
|
| 507 |
+
update_option(UCP_SURVEYS_KEY, $surveys);
|
|
|
|
| 508 |
|
| 509 |
+
wp_send_json_success();
|
| 510 |
+
} // submit_survey_ajax
|
|
|
|
|
|
|
|
|
|
|
|
|
| 511 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 512 |
|
| 513 |
+
// encode email for frontend use
|
| 514 |
+
static function encode_email($email)
|
| 515 |
+
{
|
| 516 |
+
$len = strlen($email);
|
| 517 |
+
$out = '';
|
| 518 |
|
| 519 |
+
for ($i = 0; $i < $len; $i++) {
|
| 520 |
+
$out .= '&#' . ord($email[$i]) . ';';
|
| 521 |
+
}
|
| 522 |
|
| 523 |
+
return $out;
|
| 524 |
+
} // encode_email
|
| 525 |
|
|
|
|
|
|
|
|
|
|
| 526 |
|
| 527 |
+
// parse shortcode alike variables
|
| 528 |
+
static function parse_vars($string)
|
| 529 |
+
{
|
| 530 |
+
$org_string = $string;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 531 |
|
| 532 |
+
$vars = array(
|
| 533 |
+
'site-title' => get_bloginfo('name'),
|
| 534 |
+
'site-tagline' => get_bloginfo('description'),
|
| 535 |
+
'site-description' => get_bloginfo('description'),
|
| 536 |
+
'site-url' => trailingslashit(get_home_url()),
|
| 537 |
+
'wp-url' => trailingslashit(get_site_url()),
|
| 538 |
+
'site-login-url' => get_site_url() . '/wp-login.php'
|
| 539 |
+
);
|
| 540 |
|
| 541 |
+
foreach ($vars as $var_name => $var_value) {
|
| 542 |
+
$var_name = '[' . $var_name . ']';
|
| 543 |
+
$string = str_ireplace($var_name, $var_value, $string);
|
| 544 |
+
}
|
| 545 |
|
| 546 |
+
$string = apply_filters('ucp_parse_vars', $string, $org_string, $vars);
|
|
|
|
|
|
|
| 547 |
|
| 548 |
+
return $string;
|
| 549 |
+
} // parse_vars
|
|
|
|
|
|
|
| 550 |
|
|
|
|
| 551 |
|
| 552 |
+
// generate HTML from social icons
|
| 553 |
+
static function generate_social_icons($options, $template_id)
|
| 554 |
+
{
|
| 555 |
+
$out = '';
|
| 556 |
+
|
| 557 |
+
if (!empty($options['social_facebook'])) {
|
| 558 |
+
$out .= '<a title="Facebook" href="' . esc_attr($options['social_facebook']) . '" target="_blank"><i class="fa fa-facebook-square fa-3x"></i></a>';
|
| 559 |
+
}
|
| 560 |
+
if (!empty($options['social_twitter'])) {
|
| 561 |
+
$out .= '<a title="Twitter" href="' . esc_attr($options['social_twitter']) . '" target="_blank"><i class="fa fa-twitter-square fa-3x"></i></a>';
|
| 562 |
+
}
|
| 563 |
+
if (!empty($options['social_linkedin'])) {
|
| 564 |
+
$out .= '<a title="LinkedIn" href="' . esc_attr($options['social_linkedin']) . '" target="_blank"><i class="fa fa-linkedin-square fa-3x"></i></a>';
|
| 565 |
+
}
|
| 566 |
+
if (!empty($options['social_youtube'])) {
|
| 567 |
+
$out .= '<a title="YouTube" href="' . esc_attr($options['social_youtube']) . '" target="_blank"><i class="fa fa-youtube-square fa-3x"></i></a>';
|
| 568 |
+
}
|
| 569 |
+
if (!empty($options['social_vimeo'])) {
|
| 570 |
+
$out .= '<a title="Vimeo" href="' . esc_attr($options['social_vimeo']) . '" target="_blank"><i class="fa fa-vimeo-square fa-3x"></i></a>';
|
| 571 |
+
}
|
| 572 |
+
if (!empty($options['social_pinterest'])) {
|
| 573 |
+
$out .= '<a title="Pinterest" href="' . esc_attr($options['social_pinterest']) . '" target="_blank"><i class="fa fa-pinterest-square fa-3x"></i></a>';
|
| 574 |
+
}
|
| 575 |
+
if (!empty($options['social_dribbble'])) {
|
| 576 |
+
$out .= '<a title="Dribbble" href="' . esc_attr($options['social_dribbble']) . '" target="_blank"><i class="fa fa-dribbble fa-3x"></i></a>';
|
| 577 |
+
}
|
| 578 |
+
if (!empty($options['social_behance'])) {
|
| 579 |
+
$out .= '<a title="Behance" href="' . esc_attr($options['social_behance']) . '" target="_blank"><i class="fa fa-behance-square fa-3x"></i></a>';
|
| 580 |
+
}
|
| 581 |
+
if (!empty($options['social_instagram'])) {
|
| 582 |
+
$out .= '<a title="Instagram" href="' . esc_attr($options['social_instagram']) . '" target="_blank"><i class="fa fa-instagram fa-3x"></i></a>';
|
| 583 |
+
}
|
| 584 |
+
if (!empty($options['social_tumblr'])) {
|
| 585 |
+
$out .= '<a title="Tumblr" href="' . esc_attr($options['social_tumblr']) . '" target="_blank"><i class="fa fa-tumblr-square fa-3x"></i></a>';
|
| 586 |
+
}
|
| 587 |
+
if (!empty($options['social_vk'])) {
|
| 588 |
+
$out .= '<a title="VK" href="' . esc_attr($options['social_vk']) . '" target="_blank"><i class="fa fa-vk fa-3x"></i></a>';
|
| 589 |
+
}
|
| 590 |
+
if (!empty($options['social_skype'])) {
|
| 591 |
+
$out .= '<a title="Skype" href="skype:' . esc_attr($options['social_skype']) . '?chat"><i class="fa fa-skype fa-3x"></i></a>';
|
| 592 |
+
}
|
| 593 |
+
if (!empty($options['social_whatsapp'])) {
|
| 594 |
+
$out .= '<a title="WhatsApp" href="https://api.whatsapp.com/send?phone=' . str_replace('+', '', esc_attr($options['social_whatsapp'])) . '"><i class="fa fa-whatsapp fa-3x"></i></a>';
|
| 595 |
+
}
|
| 596 |
+
if (!empty($options['social_telegram'])) {
|
| 597 |
+
$out .= '<a title="Telegram" href="' . esc_attr($options['social_telegram']) . '"><i class="fa fa-telegram fa-3x"></i></a>';
|
| 598 |
+
}
|
| 599 |
+
if (!empty($options['social_email'])) {
|
| 600 |
+
$out .= '<a title="Email" href="mailto:' . esc_attr(self::encode_email($options['social_email'])) . '"><i class="fa fa-envelope fa-3x"></i></a>';
|
| 601 |
+
}
|
| 602 |
+
if (!empty($options['social_phone'])) {
|
| 603 |
+
$out .= '<a title="Phone" href="tel:' . esc_attr($options['social_phone']) . '"><i class="fa fa-phone-square fa-3x"></i></a>';
|
| 604 |
+
}
|
| 605 |
+
|
| 606 |
+
return $out;
|
| 607 |
+
} // generate_social_icons
|
| 608 |
+
|
| 609 |
+
|
| 610 |
+
// shortcode for inserting things in header
|
| 611 |
+
static function generate_head($options, $template_id)
|
| 612 |
+
{
|
| 613 |
+
$out = '';
|
| 614 |
|
| 615 |
+
$out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/css') . 'bootstrap.min.css?v=' . self::$version . '" type="text/css">' . "\n";
|
| 616 |
+
$out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/css') . 'common.css?v=' . self::$version . '" type="text/css">' . "\n";
|
| 617 |
+
$out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/' . $template_id) . 'style.css?v=' . self::$version . '" type="text/css">' . "\n";
|
| 618 |
+
$out .= '<link rel="stylesheet" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/css') . 'font-awesome.min.css?v=' . self::$version . '" type="text/css">' . "\n";
|
| 619 |
+
|
| 620 |
+
$out .= '<link rel="icon" sizes="128x128" href="' . trailingslashit(UCP_PLUGIN_URL . 'themes/images') . 'favicon.png" />';
|
| 621 |
+
|
| 622 |
+
if (self::is_weglot_setup()) {
|
| 623 |
+
$out .= '<link rel="stylesheet" href="' . WEGLOT_URL_DIST . '/css/front-css.css?v=' . WEGLOT_VERSION . '" type="text/css">';
|
| 624 |
+
$out .= '<script src="' . WEGLOT_URL_DIST . '/front-js.js?v=' . WEGLOT_VERSION . '"></script>';
|
| 625 |
+
}
|
| 626 |
+
|
| 627 |
+
if (!empty($options['ga_tracking_id'])) {
|
| 628 |
+
$out .= "
|
| 629 |
<script>
|
| 630 |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
| 631 |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
| 634 |
ga('create', '{$options['ga_tracking_id']}', 'auto');
|
| 635 |
ga('send', 'pageview');
|
| 636 |
</script>";
|
| 637 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 638 |
|
| 639 |
+
if (!empty($options['custom_css'])) {
|
| 640 |
+
$out .= "\n" . '<style type="text/css">' . $options['custom_css'] . '</style>';
|
| 641 |
+
}
|
|
|
|
|
|
|
| 642 |
|
| 643 |
+
$out = apply_filters('ucp_head', $out, $options, $template_id);
|
|
|
|
| 644 |
|
| 645 |
+
return trim($out);
|
| 646 |
+
} // generate_head
|
| 647 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 648 |
|
| 649 |
+
// shortcode for inserting things in footer
|
| 650 |
+
static function generate_footer($options, $template_id)
|
| 651 |
+
{
|
| 652 |
+
$out = '';
|
|
|
|
|
|
|
|
|
|
| 653 |
|
| 654 |
+
if ($options['linkback'] == '1') {
|
| 655 |
+
$tmp = md5(get_site_url());
|
| 656 |
+
if ($tmp[0] < '4') {
|
| 657 |
+
$out .= '<p id="linkback">Create stunning <a href="' . self::generate_web_link('show-love-1') . '" target="_blank">under construction pages for WordPress</a>. Completely free.</p>';
|
| 658 |
+
} elseif ($tmp[0] < '8') {
|
| 659 |
+
$out .= '<p id="linkback">Create a <a href="' . self::generate_web_link('show-love-2') . '" target="_blank">free under construction page for WordPress</a> like this one in under a minute.</p>';
|
| 660 |
+
} elseif ($tmp[0] < 'c') {
|
| 661 |
+
$out .= '<p id="linkback">Join more than 400,000 happy people using the <a href="https://wordpress.org/plugins/under-construction-page/" target="_blank">free Under Construction Page plugin for WordPress</a>.</p>';
|
| 662 |
+
} else {
|
| 663 |
+
$out .= '<p id="linkback">Create free <a href="' . self::generate_web_link('show-love-3') . '" target="_blank">under construction pages for WordPress</a>.</p>';
|
| 664 |
+
}
|
| 665 |
+
}
|
| 666 |
|
| 667 |
+
if ($options['login_button'] == '1') {
|
| 668 |
+
if (is_user_logged_in()) {
|
| 669 |
+
$out .= '<div id="login-button" class="loggedin">';
|
| 670 |
+
$out .= '<a title="' . esc_attr__('Open WordPress admin', 'under-construction-page') . '" href="' . get_site_url() . '/wp-admin/"><i class="fa fa-wordpress fa-2x" aria-hidden="true"></i></a>';
|
| 671 |
+
} else {
|
| 672 |
+
$out .= '<div id="login-button" class="loggedout">';
|
| 673 |
+
$out .= '<a title="' . esc_attr__('Log in to WordPress admin', 'under-construction-page') . '" href="' . get_site_url() . '/wp-login.php"><i class="fa fa-wordpress fa-2x" aria-hidden="true"></i></a>';
|
| 674 |
+
}
|
| 675 |
+
$out .= '</div>';
|
| 676 |
+
}
|
| 677 |
|
| 678 |
+
$out = apply_filters('ucp_footer', $out, $options, $template_id);
|
| 679 |
+
|
| 680 |
+
return $out;
|
| 681 |
+
} // generate_footer
|
| 682 |
+
|
| 683 |
+
|
| 684 |
+
// returnes parsed template
|
| 685 |
+
static function get_template($template_id)
|
| 686 |
+
{
|
| 687 |
+
$vars = array();
|
| 688 |
+
$options = self::get_options();
|
| 689 |
+
|
| 690 |
+
$vars['version'] = self::$version;
|
| 691 |
+
$vars['site-url'] = trailingslashit(get_home_url());
|
| 692 |
+
$vars['wp-url'] = trailingslashit(get_site_url());
|
| 693 |
+
$vars['theme-url'] = trailingslashit(UCP_PLUGIN_URL . 'themes/' . $template_id);
|
| 694 |
+
$vars['theme-url-common'] = trailingslashit(UCP_PLUGIN_URL . 'themes');
|
| 695 |
+
$vars['title'] = self::parse_vars($options['title']);
|
| 696 |
+
$vars['generator'] = esc_attr__('Free UnderConstructionPage plugin for WordPress', 'under-construction-page');
|
| 697 |
+
$vars['heading1'] = self::parse_vars($options['heading1']);
|
| 698 |
+
$vars['content'] = nl2br(self::parse_vars($options['content']));
|
| 699 |
+
$vars['description'] = self::parse_vars($options['description']);
|
| 700 |
+
$vars['social-icons'] = self::generate_social_icons($options, $template_id);
|
| 701 |
+
$vars['head'] = self::generate_head($options, $template_id);
|
| 702 |
+
$vars['footer'] = self::generate_footer($options, $template_id);
|
| 703 |
+
|
| 704 |
+
$vars = apply_filters('ucp_get_template_vars', $vars, $template_id, $options);
|
| 705 |
+
|
| 706 |
+
ob_start();
|
| 707 |
+
require UCP_PLUGIN_DIR . 'themes/' . $template_id . '/index.php';
|
| 708 |
+
$template = ob_get_clean();
|
| 709 |
+
|
| 710 |
+
foreach ($vars as $var_name => $var_value) {
|
| 711 |
+
$var_name = '[' . $var_name . ']';
|
| 712 |
+
$template = str_ireplace($var_name, $var_value, $template);
|
| 713 |
+
}
|
| 714 |
|
| 715 |
+
$template = apply_filters('ucp_get_template', $template, $vars, $options);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 716 |
|
| 717 |
+
return $template;
|
| 718 |
+
} // get_template
|
|
|
|
|
|
|
|
|
|
| 719 |
|
|
|
|
| 720 |
|
| 721 |
+
// checks if construction mode is enabled for the current visitor
|
| 722 |
+
static function is_construction_mode_enabled($settings_only = false)
|
| 723 |
+
{
|
| 724 |
+
$options = self::get_options();
|
| 725 |
+
$current_user = wp_get_current_user();
|
|
|
|
| 726 |
|
| 727 |
+
$override_status = apply_filters('ucp_is_construction_mode_enabled', null, $options);
|
| 728 |
+
if (is_bool($override_status)) {
|
| 729 |
+
return $override_status;
|
| 730 |
+
}
|
|
|
|
| 731 |
|
| 732 |
+
// just check if it's generally enabled
|
| 733 |
+
if ($settings_only) {
|
| 734 |
+
if ($options['status']) {
|
| 735 |
+
return true;
|
| 736 |
+
} else {
|
| 737 |
+
return false;
|
| 738 |
+
}
|
| 739 |
+
} else {
|
| 740 |
+
// check if enabled for current user
|
| 741 |
+
if (!$options['status']) {
|
| 742 |
+
return false;
|
| 743 |
+
} elseif (self::user_has_role($options['whitelisted_roles'])) {
|
| 744 |
+
return false;
|
| 745 |
+
} elseif (in_array($current_user->ID, $options['whitelisted_users'])) {
|
| 746 |
+
return false;
|
| 747 |
+
} elseif (strlen($options['end_date']) === 16 && $options['end_date'] !== '0000-00-00 00:00' && $options['end_date'] < current_time('mysql')) {
|
| 748 |
+
return false;
|
| 749 |
+
} else {
|
| 750 |
+
return true;
|
| 751 |
+
}
|
| 752 |
+
}
|
| 753 |
+
} // is_construction_mode_enabled
|
| 754 |
|
|
|
|
| 755 |
|
| 756 |
+
// check if user has the specified role
|
| 757 |
+
static function user_has_role($roles)
|
| 758 |
+
{
|
| 759 |
+
$current_user = wp_get_current_user();
|
|
|
|
| 760 |
|
| 761 |
+
if ($current_user->roles) {
|
| 762 |
+
$user_role = $current_user->roles[0];
|
| 763 |
+
} else {
|
| 764 |
+
$user_role = 'guest';
|
| 765 |
+
}
|
| 766 |
|
| 767 |
+
return in_array($user_role, $roles);
|
| 768 |
+
} // user_has_role
|
| 769 |
+
|
| 770 |
+
|
| 771 |
+
// frontend notification when UCP is enabled but current user is whitelisted
|
| 772 |
+
static function whitelisted_notice()
|
| 773 |
+
{
|
| 774 |
+
$notices = get_option(UCP_NOTICES_KEY);
|
| 775 |
+
$dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'whitelisted', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
| 776 |
+
|
| 777 |
+
if (
|
| 778 |
+
empty($notices['dismiss_whitelisted']) &&
|
| 779 |
+
is_user_logged_in() &&
|
| 780 |
+
self::is_construction_mode_enabled(true) &&
|
| 781 |
+
!self::is_construction_mode_enabled(false)
|
| 782 |
+
)
|
| 783 |
+
// keeping everything inline due to minimal CSS
|
| 784 |
+
echo '<div style="background-color: #333; line-height: 140%; font-size: 14px; position: fixed; display: block; top: 50px; z-index: 99999; color: #fefefe; padding: 20px 35px 20px 20px; width: 500px; border: thin solid #fefefe; left: -1px;"><a style="color: #ea1919; font-weight: 900; text-decoration: none; position: absolute; top: 7px; right: 10px;" href="' . esc_url($dismiss_url) . '" alt="Dismiss notice" onclick="window.location.href = \'' . esc_url($dismiss_url) . '\'; return false;" title="Dismiss notice">X</a><b>' . esc_attr__('<b>Under Construction Mode is enabled</b> but you are whitelisted so you see the normal site.', 'under-construction-page') . '<br><a href="' . esc_url(get_home_url()) . '/?ucp_preview" style="text-decoration: underline; color: #fefefe;">' . esc_attr__('Preview UnderConstructionPage', 'under-construction-page') . '</a><br><a href="' . esc_url(admin_url('options-general.php?page=ucp')) . '" style="text-decoration: underline; color: #fefefe;">' . esc_attr__('Configure UnderConstructionPage', 'under-construction-page') . '</a></div>';
|
| 785 |
+
} // whitelisted_notification
|
| 786 |
+
|
| 787 |
+
|
| 788 |
+
// displays various notices in admin header
|
| 789 |
+
static function admin_notices()
|
| 790 |
+
{
|
| 791 |
+
$notices = get_option(UCP_NOTICES_KEY);
|
| 792 |
+
$options = self::get_options();
|
| 793 |
+
$meta = self::get_meta();
|
| 794 |
+
$current_user = wp_get_current_user();
|
| 795 |
+
$shown = false;
|
| 796 |
+
$promo = self::is_promo_active();
|
| 797 |
+
|
| 798 |
+
$name = '';
|
| 799 |
+
if (!empty($current_user->user_firstname)) {
|
| 800 |
+
$name = ' ' . $current_user->user_firstname;
|
| 801 |
+
}
|
| 802 |
|
| 803 |
+
// pro activated - update
|
| 804 |
+
if (self::is_plugin_page() && UCP_license::is_activated()) {
|
| 805 |
+
echo '<div id="ucp_update_pro" class="notice-error notice">';
|
| 806 |
+
echo '<p class="center">Thank you for purchasing UnderConstructionPage PRO! <b>Your license has been verified and activated.</b><br>To start using the PRO version, please follow these steps:</p>';
|
| 807 |
+
echo '<ol>';
|
| 808 |
+
echo '<li><a href="https://underconstructionpage.com/pro-download/" target="_blank">Download</a> the latest version of the PRO plugin.</li>';
|
| 809 |
+
echo '<li>Go to <a href="' . admin_url('plugin-install.php') . '">Plugins - Add New - Upload Plugin</a> and upload the ZIP you just downloaded.</li>';
|
| 810 |
+
echo '<li>If asked to replace (overwrite) the free version - confirm it.</li>';
|
| 811 |
+
echo '<li>Activate the plugin.</li>';
|
| 812 |
+
echo '<li>That\'s it, no more steps.</li>';
|
| 813 |
+
echo '</ol>';
|
| 814 |
+
echo '</div>';
|
| 815 |
+
$shown = true;
|
| 816 |
+
|
| 817 |
+
return;
|
| 818 |
+
}
|
| 819 |
|
| 820 |
+
// ask for rating; disabled
|
| 821 |
+
if (
|
| 822 |
+
false && empty($notices['dismiss_rate']) &&
|
| 823 |
+
(time() - $meta['first_install']) > (DAY_IN_SECONDS * 1.0)
|
| 824 |
+
) {
|
| 825 |
+
$rate_url = 'https://wordpress.org/support/plugin/under-construction-page/reviews/?filter=5&rate=5#new-post';
|
| 826 |
+
$dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'rate', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
| 827 |
+
|
| 828 |
+
echo '<div id="ucp_rate_notice" class="notice-info notice"><p>Hi' . esc_html($name) . '!<br>We saw you\'ve been using the <b class="ucp-logo" style="font-weight: bold;">UnderConstructionPage</b> plugin for a few days (that\'s awesome!) and wanted to ask for your help to <b>make the plugin better</b>.<br>We just need a minute of your time to rate the plugin. It helps us out a lot!';
|
| 829 |
+
|
| 830 |
+
echo '<br><a target="_blank" href="' . esc_url($rate_url) . '" style="vertical-align: baseline; margin-top: 15px;" class="button-primary">' . esc_attr__('Help make the plugin better by rating it', 'under-construction-page') . '</a>';
|
| 831 |
+
echo ' <a href="' . esc_url($dismiss_url) . '">' . esc_attr__('I\'ve already rated the plugin', 'under-construction-page') . '</a>';
|
| 832 |
+
echo '<br><br><b>' . esc_attr__('Thank you very much! The UCP team', 'under-construction-page') . '</b>';
|
| 833 |
+
echo '</p></div>';
|
| 834 |
+
$shown = true;
|
| 835 |
+
}
|
| 836 |
|
| 837 |
+
// end date in past
|
| 838 |
+
if (self::is_plugin_page() && self::is_construction_mode_enabled(true) && !empty($options['end_date']) && $options['end_date'] != '0000-00-00 00:00' && $options['end_date'] < current_time('mysql')) {
|
| 839 |
+
echo '<div id="ucp_end_date_notice" class="notice-error notice"><p>Under construction mode is enabled but the <a href="#end_date" class="change_tab" data-tab="0">end date</a> is set to a past date so the <b>under construction page will not be shown</b>. Either move the <a href="#end_date" class="change_tab" data-tab="0">end date</a> to a future date or disable it.</p></div>';
|
| 840 |
+
$shown = true;
|
| 841 |
+
}
|
| 842 |
|
| 843 |
+
// ask for translation
|
| 844 |
+
// disabled till further notice
|
| 845 |
+
if (
|
| 846 |
+
false && self::is_plugin_page() &&
|
| 847 |
+
empty($notices['dismiss_translate']) &&
|
| 848 |
+
(time() - $meta['first_install']) > 1
|
| 849 |
+
) {
|
| 850 |
+
$translate_url = self::generate_web_link('translate-notification', 'translate-the-plugin/');
|
| 851 |
+
$dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'translate', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
| 852 |
+
|
| 853 |
+
echo '<div id="ucp_rate_notice" class="notice-info notice"><p>Hi' . esc_html($name) . ',<br>Help us translate UCP into your language and <b>get a PRO license for free</b>!<br>We want to make <b class="ucp-logo" style="font-weight: bold;">UnderConstructionPage</b> accessible to as many users as possible by translating it into their language. And we need your help!';
|
| 854 |
+
|
| 855 |
+
echo '<br><a target="_blank" href="' . esc_url($translate_url) . '" style="vertical-align: baseline; margin-top: 15px;" class="button-primary">' . esc_attr__('Translate UCP into your language & get a PRO license for free', 'under-construction-page') . '</a>';
|
| 856 |
+
echo ' <a href="' . esc_url($dismiss_url) . '">' . esc_attr__('I\'m not interested (remove this notice)', 'under-construction-page') . '</a>';
|
| 857 |
+
echo '</p></div>';
|
| 858 |
+
$shown = true;
|
| 859 |
+
}
|
| 860 |
|
| 861 |
+
// promo for new users
|
| 862 |
+
if (
|
| 863 |
+
self::is_plugin_page() &&
|
| 864 |
+
empty($notices['dismiss_welcome']) &&
|
| 865 |
+
!$shown && $promo == 'welcome'
|
| 866 |
+
) {
|
| 867 |
+
$dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'welcome', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
| 868 |
+
|
| 869 |
+
echo '<div id="ucp_rate_notice" class="notice-info notice"><p>Hi' . esc_html($name) . ',<br>';
|
| 870 |
+
echo 'We have a <a class="open-ucp-upsell" data-pro-ad="notification-welcome-text" href="#">special time-sensitive offer</a> available just for another <b class="ucp-countdown">59min</b>! A <b>20% DISCOUNT</b> on our most popular lifetime licenses!<br>No nonsense! Pay once and use the plugin forever. <a class="open-ucp-upsell" data-pro-ad="notification-welcome-text2" href="#">Get</a> more than 50+ extra features, 250+ premium themes and over two million professional images.</p>';
|
| 871 |
+
|
| 872 |
+
echo '<a href="#" class="button-primary open-ucp-upsell" data-pro-ad="notification-welcome-button">Upgrade to PRO now with a SPECIAL 20% WELCOME DISCOUNT</a>';
|
| 873 |
+
echo ' <a href="' . esc_url($dismiss_url) . '"><small>' . esc_attr__('I\'m not interested (remove this notice)', 'under-construction-page') . '</small></a>';
|
| 874 |
+
echo '</p></div>';
|
| 875 |
+
$shown = true;
|
| 876 |
+
}
|
| 877 |
|
| 878 |
+
// promo for old users
|
| 879 |
+
if (
|
| 880 |
+
self::is_plugin_page() &&
|
| 881 |
+
empty($notices['dismiss_olduser']) &&
|
| 882 |
+
!$shown && $promo == 'olduser'
|
| 883 |
+
) {
|
| 884 |
+
$dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'olduser', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
| 885 |
+
|
| 886 |
+
echo '<div id="ucp_rate_notice" class="notice-info notice"><p>Hi' . esc_html($name) . ',<br>';
|
| 887 |
+
echo 'We have a <a class="open-ucp-upsell" data-pro-ad="notification-olduser-text" href="#">special offer</a> only for <b>users like you</b> who\'ve been using the UnderConstructionPage for a longer period of time: a <b>special DISCOUNT</b> on our most popular lifetime licenses!<br>No nonsense! Pay once and use the plugin forever.<br><a class="open-ucp-upsell" data-pro-ad="notification-olduser-text" href="#">Upgrade now</a> to <b>PRO</b> & get more than 50+ extra features, 220+ premium themes and over two million HD images.</p>';
|
| 888 |
+
|
| 889 |
+
echo '<a href="#" class="button-primary open-ucp-upsell" data-pro-ad="notification-olduser-button">Upgrade to PRO now with a SPECIAL DISCOUNT</a>';
|
| 890 |
+
echo ' <a href="' . esc_url($dismiss_url) . '"><small>' . esc_attr__('I\'m not interested (remove this notice)', 'under-construction-page') . '</small></a>';
|
| 891 |
+
echo '</p></div>';
|
| 892 |
+
$shown = true;
|
| 893 |
+
}
|
| 894 |
+
} // notices
|
| 895 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 896 |
|
| 897 |
+
// handle dismiss button for notices
|
| 898 |
+
static function dismiss_notice()
|
| 899 |
+
{
|
| 900 |
+
if (empty($_GET['notice'])) {
|
| 901 |
+
wp_safe_redirect(admin_url());
|
| 902 |
+
exit;
|
| 903 |
+
}
|
| 904 |
|
| 905 |
+
$notices = get_option(UCP_NOTICES_KEY, array());
|
| 906 |
+
$notice = sanitize_text_field($_GET['notice']);
|
| 907 |
+
|
| 908 |
+
if ($notice == 'rate') {
|
| 909 |
+
$notices['dismiss_rate'] = true;
|
| 910 |
+
} elseif ($notice == 'translate') {
|
| 911 |
+
$notices['dismiss_translate'] = true;
|
| 912 |
+
} elseif ($notice == 'whitelisted') {
|
| 913 |
+
$notices['dismiss_whitelisted'] = true;
|
| 914 |
+
} elseif ($notice == 'olduser') {
|
| 915 |
+
$notices['dismiss_olduser'] = true;
|
| 916 |
+
} elseif ($notice == 'welcome') {
|
| 917 |
+
$notices['dismiss_welcome'] = true;
|
| 918 |
+
} else {
|
| 919 |
+
wp_safe_redirect(admin_url());
|
| 920 |
+
exit;
|
| 921 |
+
}
|
| 922 |
|
| 923 |
+
update_option(UCP_NOTICES_KEY, $notices);
|
|
|
|
| 924 |
|
| 925 |
+
if (!empty($_GET['redirect'])) {
|
| 926 |
+
wp_safe_redirect($_GET['redirect']);
|
| 927 |
+
} else {
|
| 928 |
+
wp_safe_redirect(admin_url());
|
| 929 |
+
}
|
| 930 |
|
| 931 |
+
exit;
|
| 932 |
+
} // dismiss_notice
|
|
|
|
| 933 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 934 |
|
| 935 |
+
// reset all settings to default values
|
| 936 |
+
static function reset_settings()
|
| 937 |
+
{
|
| 938 |
+
check_admin_referer('ucp_reset_settings');
|
| 939 |
|
| 940 |
+
if (false === current_user_can('administrator')) {
|
| 941 |
+
wp_safe_redirect(admin_url());
|
| 942 |
+
exit;
|
| 943 |
+
}
|
|
|
|
| 944 |
|
| 945 |
+
$options = self::default_options();
|
| 946 |
+
update_option(UCP_OPTIONS_KEY, $options);
|
| 947 |
|
| 948 |
+
if (!empty($_GET['redirect'])) {
|
| 949 |
+
wp_safe_redirect($_GET['redirect']);
|
| 950 |
+
} else {
|
| 951 |
+
wp_safe_redirect(admin_url());
|
| 952 |
+
}
|
| 953 |
|
| 954 |
+
exit;
|
| 955 |
+
} // reset_settings
|
|
|
|
| 956 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 957 |
|
| 958 |
+
// change status via admin bar
|
| 959 |
+
static function change_status()
|
| 960 |
+
{
|
| 961 |
+
check_admin_referer('ucp_change_status');
|
| 962 |
|
| 963 |
+
if (false === current_user_can('administrator') || empty($_GET['new_status'])) {
|
| 964 |
+
wp_safe_redirect(admin_url());
|
| 965 |
+
exit;
|
| 966 |
+
}
|
|
|
|
| 967 |
|
| 968 |
+
$options = self::get_options();
|
| 969 |
|
| 970 |
+
if (sanitize_text_field($_GET['new_status']) == 'enabled') {
|
| 971 |
+
$options['status'] = '1';
|
| 972 |
+
} else {
|
| 973 |
+
$options['status'] = '0';
|
| 974 |
+
}
|
| 975 |
|
| 976 |
+
update_option(UCP_OPTIONS_KEY, $options);
|
|
|
|
| 977 |
|
| 978 |
+
if (!empty($_GET['redirect'])) {
|
| 979 |
+
wp_safe_redirect($_GET['redirect']);
|
| 980 |
+
} else {
|
| 981 |
+
wp_safe_redirect(admin_url());
|
| 982 |
+
}
|
| 983 |
|
| 984 |
+
exit;
|
| 985 |
+
} // change_status
|
|
|
|
|
|
|
|
|
|
| 986 |
|
|
|
|
|
|
|
| 987 |
|
| 988 |
+
static function admin_bar_style()
|
| 989 |
+
{
|
| 990 |
+
// admin bar has to be anabled, user an admin and custom filter true
|
| 991 |
+
if (false === is_admin_bar_showing() || false === current_user_can('administrator') || false === apply_filters('ucp_show_admin_bar', true)) {
|
| 992 |
+
return;
|
| 993 |
+
}
|
| 994 |
|
| 995 |
+
// no sense in loading a new CSS file for 2 lines of CSS
|
| 996 |
+
echo '<style type="text/css">';
|
| 997 |
+
$custom_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 { padding-bottom: 2px; } #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; }#wp-admin-bar-under-construction-page img.logo { height: 17px; margin-bottom: 4px; padding-right: 3px; } body.wp-admin #wp-admin-bar-under-construction-page img.logo { margin-bottom: -4px; }';
|
| 998 |
+
self::wp_kses_wf($custom_css);
|
| 999 |
+
echo '</style>';
|
| 1000 |
+
} // admin_bar_style
|
| 1001 |
|
|
|
|
|
|
|
|
|
|
| 1002 |
|
| 1003 |
+
// add admin bar menu and status
|
| 1004 |
+
static function admin_bar()
|
| 1005 |
+
{
|
| 1006 |
+
global $wp_admin_bar;
|
| 1007 |
|
| 1008 |
+
// only show to admins
|
| 1009 |
+
if (false === current_user_can('administrator') || false === apply_filters('ucp_show_admin_bar', true)) {
|
| 1010 |
+
return;
|
| 1011 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1012 |
|
| 1013 |
+
if (self::is_construction_mode_enabled(true)) {
|
| 1014 |
+
$main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . 'images/ucp_icon.png" alt="' . esc_attr__('Under construction mode is enabled', 'under-construction-page') . '" title="' . esc_attr__('Under construction mode is enabled', 'under-construction-page') . '"> <span class="ab-label">' . esc_attr__('UnderConstruction', 'under-construction-page') . ' <i class="ucp-status-dot ucp-status-dot-enabled">●</i></span>';
|
| 1015 |
+
$class = 'ucp-enabled';
|
| 1016 |
+
$action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'disabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
| 1017 |
+
$action_url = wp_nonce_url($action_url, 'ucp_change_status');
|
| 1018 |
+
$action = esc_attr__('Under Construction Mode', 'under-construction-page');
|
| 1019 |
+
$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>';
|
| 1020 |
+
} else {
|
| 1021 |
+
$main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . 'images/ucp_icon.png" alt="' . esc_attr__('Under construction mode is disabled', 'under-construction-page') . '" title="' . esc_attr__('Under construction mode is disabled', 'under-construction-page') . '"> <span class="ab-label">' . esc_attr__('UnderConstruction', 'under-construction-page') . ' <i class="ucp-status-dot ucp-status-dot-disabled">●</i></span>';
|
| 1022 |
+
$class = 'ucp-disabled';
|
| 1023 |
+
$action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'enabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
| 1024 |
+
$action_url = wp_nonce_url($action_url, 'ucp_change_status');
|
| 1025 |
+
$action = esc_attr__('Under Construction Mode', 'under-construction-page');
|
| 1026 |
+
$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>';
|
| 1027 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1028 |
|
| 1029 |
+
$wp_admin_bar->add_menu(array(
|
| 1030 |
+
'parent' => '',
|
| 1031 |
+
'id' => 'under-construction-page',
|
| 1032 |
+
'title' => $main_label,
|
| 1033 |
+
'href' => admin_url('options-general.php?page=ucp'),
|
| 1034 |
+
'meta' => array('class' => $class)
|
| 1035 |
+
));
|
| 1036 |
+
$wp_admin_bar->add_node(array(
|
| 1037 |
+
'id' => 'ucp-status',
|
| 1038 |
+
'title' => $action,
|
| 1039 |
+
'href' => false,
|
| 1040 |
+
'parent' => 'under-construction-page'
|
| 1041 |
+
));
|
| 1042 |
+
$wp_admin_bar->add_node(array(
|
| 1043 |
+
'id' => 'ucp-preview',
|
| 1044 |
+
'title' => esc_attr__('Preview', 'under-construction-page'),
|
| 1045 |
+
'meta' => array('target' => 'blank'),
|
| 1046 |
+
'href' => get_home_url() . '/?ucp_preview',
|
| 1047 |
+
'parent' => 'under-construction-page'
|
| 1048 |
+
));
|
| 1049 |
+
$wp_admin_bar->add_node(array(
|
| 1050 |
+
'id' => 'ucp-settings',
|
| 1051 |
+
'title' => esc_attr__('Settings', 'under-construction-page'),
|
| 1052 |
+
'href' => admin_url('options-general.php?page=ucp'),
|
| 1053 |
+
'parent' => 'under-construction-page'
|
| 1054 |
+
));
|
| 1055 |
+
} // admin_bar
|
| 1056 |
+
|
| 1057 |
+
|
| 1058 |
+
// show under construction notice on WP login form
|
| 1059 |
+
static function login_message($message)
|
| 1060 |
+
{
|
| 1061 |
+
if (self::is_construction_mode_enabled(true)) {
|
| 1062 |
+
$message .= '<div class="message">' . esc_attr__('Under Construction Mode is <b>enabled</b>.', 'under-construction-page') . '</div>';
|
| 1063 |
+
}
|
| 1064 |
|
| 1065 |
+
return $message;
|
| 1066 |
+
} // login_notice
|
| 1067 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1068 |
|
| 1069 |
+
// add settings link to plugins page
|
| 1070 |
+
static function plugin_action_links($links)
|
| 1071 |
+
{
|
| 1072 |
+
$settings_link = '<a href="' . admin_url('options-general.php?page=ucp') . '" title="' . esc_attr__('UnderConstruction Settings', 'under-construction-page') . '">' . esc_attr__('Settings', 'under-construction-page') . '</a>';
|
| 1073 |
+
$pro_link = '<a target="_blank" href="' . self::generate_web_link('plugins-table-left') . '" title="' . esc_attr__('Get PRO', 'under-construction-page') . '">' . __('Go <b>PRO</b>', 'under-construction-page') . '</a>';
|
| 1074 |
|
| 1075 |
+
array_unshift($links, $pro_link);
|
| 1076 |
+
array_unshift($links, $settings_link);
|
| 1077 |
|
| 1078 |
+
return $links;
|
| 1079 |
+
} // plugin_action_links
|
| 1080 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1081 |
|
| 1082 |
+
// add links to plugin's description in plugins table
|
| 1083 |
+
static function plugin_meta_links($links, $file)
|
| 1084 |
+
{
|
| 1085 |
+
$support_link = '<a target="_blank" href="https://wordpress.org/support/plugin/under-construction-page" title="' . esc_attr__('Get help', 'under-construction-page') . '">' . esc_attr__('Support', 'under-construction-page') . '</a>';
|
| 1086 |
+
$pro_link = '<a target="_blank" href="' . self::generate_web_link('plugins-table-right') . '" title="' . esc_attr__('Get PRO', 'under-construction-page') . '">' . __('Get the <b>PRO</b> version', 'under-construction-page') . '</a>';
|
| 1087 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1088 |
|
| 1089 |
+
if ($file == plugin_basename(__FILE__)) {
|
| 1090 |
+
$links[] = $support_link;
|
| 1091 |
+
$links[] = $pro_link;
|
| 1092 |
+
}
|
| 1093 |
|
| 1094 |
+
return $links;
|
| 1095 |
+
} // plugin_meta_links
|
| 1096 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1097 |
|
| 1098 |
+
// additional powered by text in admin footer; only on UCP page
|
| 1099 |
+
static function admin_footer_text($text)
|
| 1100 |
+
{
|
| 1101 |
+
if (!self::is_plugin_page()) {
|
| 1102 |
+
return $text;
|
| 1103 |
+
}
|
| 1104 |
|
| 1105 |
+
$text = '<i><a href="' . self::generate_web_link('admin-footer') . '" title="' . esc_attr__('Visit UCP\'s site for more info', 'under-construction-page') . '" target="_blank">' . esc_attr__('UnderConstructionPage', 'under-construction-page') . '</a> v' . self::$version . ' by <a href="https://www.webfactoryltd.com/" title="' . esc_attr__('Visit our site to get more great plugins', 'under-construction-page') . '" target="_blank">' . esc_attr__('WebFactory Ltd', 'under-construction-page') . '</a>. Please <a target="_blank" href="https://wordpress.org/support/plugin/under-construction-page/reviews/#new-post" title="Rate the plugin">rate the plugin <span>★★★★★</span></a> to help us spread the word. Thank you!</i>';
|
|
|
|
| 1106 |
|
| 1107 |
+
return $text;
|
| 1108 |
+
} // admin_footer_text
|
| 1109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1110 |
|
| 1111 |
+
// fix for opening the plugin install modal
|
| 1112 |
+
static function admin_footer()
|
| 1113 |
+
{
|
| 1114 |
+
if (empty($_GET['fix-install-button']) || empty($_GET['tab']) || sanitize_text_field($_GET['tab']) != 'plugin-information') {
|
| 1115 |
+
return;
|
| 1116 |
+
}
|
| 1117 |
|
| 1118 |
+
echo '<script>';
|
| 1119 |
+
echo "jQuery('#plugin_install_from_iframe').on('click', function() { window.location.href = jQuery(this).attr('href'); return false;});";
|
| 1120 |
+
echo '</script>';
|
| 1121 |
+
} // admin_footer
|
| 1122 |
|
|
|
|
|
|
|
|
|
|
| 1123 |
|
| 1124 |
+
// test if we're on plugin's page
|
| 1125 |
+
static function is_plugin_page()
|
| 1126 |
+
{
|
| 1127 |
+
$current_screen = get_current_screen();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1128 |
|
| 1129 |
+
if ($current_screen->id == 'settings_page_ucp') {
|
| 1130 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1131 |
} else {
|
| 1132 |
+
return false;
|
| 1133 |
+
}
|
| 1134 |
+
} // is_plugin_page
|
| 1135 |
+
|
| 1136 |
+
|
| 1137 |
+
// create the admin menu item
|
| 1138 |
+
static function admin_menu()
|
| 1139 |
+
{
|
| 1140 |
+
add_options_page(esc_attr__('UnderConstruction', 'under-construction-page'), esc_attr__('UnderConstruction', 'under-construction-page'), 'manage_options', 'ucp', array(__CLASS__, 'main_page'));
|
| 1141 |
+
} // admin_menu
|
| 1142 |
+
|
| 1143 |
+
|
| 1144 |
+
// all settings are saved in one option
|
| 1145 |
+
static function register_settings()
|
| 1146 |
+
{
|
| 1147 |
+
register_setting(UCP_OPTIONS_KEY, UCP_OPTIONS_KEY, array(__CLASS__, 'sanitize_settings'));
|
| 1148 |
+
} // register_settings
|
| 1149 |
+
|
| 1150 |
+
|
| 1151 |
+
// set default settings
|
| 1152 |
+
static function default_options()
|
| 1153 |
+
{
|
| 1154 |
+
$defaults = array(
|
| 1155 |
+
'status' => '0',
|
| 1156 |
+
'license_key' => '',
|
| 1157 |
+
'license_active' => false,
|
| 1158 |
+
'license_expires' => '1900-01-01',
|
| 1159 |
+
'license_type' => '',
|
| 1160 |
+
'end_date' => '',
|
| 1161 |
+
'ga_tracking_id' => '',
|
| 1162 |
+
'theme' => 'mad_designer',
|
| 1163 |
+
'custom_css' => '',
|
| 1164 |
+
'title' => '[site-title] is under construction',
|
| 1165 |
+
'description' => '[site-tagline]',
|
| 1166 |
+
'heading1' => esc_attr__('Sorry, we\'re doing some work on the site', 'under-construction-page'),
|
| 1167 |
+
'content' => esc_attr__('Thank you for being patient. We are doing some work on the site and will be back shortly.', 'under-construction-page'),
|
| 1168 |
+
'social_facebook' => '',
|
| 1169 |
+
'social_twitter' => '',
|
| 1170 |
+
'social_linkedin' => '',
|
| 1171 |
+
'social_youtube' => '',
|
| 1172 |
+
'social_vimeo' => '',
|
| 1173 |
+
'social_pinterest' => '',
|
| 1174 |
+
'social_dribbble' => '',
|
| 1175 |
+
'social_behance' => '',
|
| 1176 |
+
'social_instagram' => '',
|
| 1177 |
+
'social_tumblr' => '',
|
| 1178 |
+
'social_vk' => '',
|
| 1179 |
+
'social_email' => '',
|
| 1180 |
+
'social_phone' => '',
|
| 1181 |
+
'social_skype' => '',
|
| 1182 |
+
'social_telegram' => '',
|
| 1183 |
+
'social_whatsapp' => '',
|
| 1184 |
+
'login_button' => '1',
|
| 1185 |
+
'linkback' => '0',
|
| 1186 |
+
'whitelisted_roles' => array('administrator'),
|
| 1187 |
+
'whitelisted_users' => array()
|
| 1188 |
+
);
|
| 1189 |
+
|
| 1190 |
+
return $defaults;
|
| 1191 |
+
} // default_options
|
| 1192 |
+
|
| 1193 |
+
|
| 1194 |
+
// sanitize settings on save
|
| 1195 |
+
static function sanitize_settings($options)
|
| 1196 |
+
{
|
| 1197 |
+
$old_options = self::get_options();
|
| 1198 |
+
|
| 1199 |
+
foreach ($options as $key => $value) {
|
| 1200 |
+
switch ($key) {
|
| 1201 |
+
case 'title':
|
| 1202 |
+
case 'description':
|
| 1203 |
+
$options[$key] = trim(strip_tags($value));
|
| 1204 |
+
break;
|
| 1205 |
+
case 'heading1':
|
| 1206 |
+
case 'content':
|
| 1207 |
+
$options[$key] = trim(wp_kses($value, wp_kses_allowed_html('post')));
|
| 1208 |
+
break;
|
| 1209 |
+
case 'custom_css':
|
| 1210 |
+
case 'social_facebook':
|
| 1211 |
+
case 'social_twitter':
|
| 1212 |
+
case 'social_linkedin':
|
| 1213 |
+
case 'social_youtube':
|
| 1214 |
+
case 'social_vimeo':
|
| 1215 |
+
case 'social_pinterest':
|
| 1216 |
+
case 'social_dribbble':
|
| 1217 |
+
case 'social_behance':
|
| 1218 |
+
case 'social_instagram':
|
| 1219 |
+
case 'social_tumblr':
|
| 1220 |
+
case 'social_vk':
|
| 1221 |
+
case 'social_email':
|
| 1222 |
+
case 'social_phone':
|
| 1223 |
+
case 'social_telegram':
|
| 1224 |
+
case 'social_whatsapp':
|
| 1225 |
+
case 'license_key':
|
| 1226 |
+
$options[$key] = trim(strip_tags($value));
|
| 1227 |
+
break;
|
| 1228 |
+
case 'ga_tracking_id':
|
| 1229 |
+
$options[$key] = substr(strtoupper(trim($value)), 0, 15);
|
| 1230 |
+
break;
|
| 1231 |
+
case 'end_date':
|
| 1232 |
+
$options[$key] = substr(trim($value), 0, 16);
|
| 1233 |
+
break;
|
| 1234 |
+
} // switch
|
| 1235 |
+
} // foreach
|
| 1236 |
+
|
| 1237 |
+
$options['title'] = strip_tags($options['title']);
|
| 1238 |
+
$options['description'] = strip_tags($options['description']);
|
| 1239 |
+
$options['heading1'] = strip_tags($options['heading1'], '<br><a><b><strong><i><em><p><del><img>');
|
| 1240 |
+
$options['content'] = strip_tags($options['content'], '<br><a><b><strong><i><em><p><del><img><ul><ol><li><blockquote><ins><code><hr><h2><h3><h4><span><div><iframe>');
|
| 1241 |
+
|
| 1242 |
+
$options['whitelisted_roles'] = empty($options['whitelisted_roles']) ? array() : $options['whitelisted_roles'];
|
| 1243 |
+
$options['whitelisted_users'] = empty($options['whitelisted_users']) ? array() : $options['whitelisted_users'];
|
| 1244 |
+
$options = self::check_var_isset($options, array('status' => 0, 'linkback' => 0, 'login_button' => 0));
|
| 1245 |
+
|
| 1246 |
+
if (empty($options['end_date_toggle'])) {
|
| 1247 |
+
$options['end_date'] = '';
|
| 1248 |
+
}
|
| 1249 |
+
if ($options['end_date'] == '0000-00-00 00:00') {
|
| 1250 |
+
$options['end_date'] = '';
|
| 1251 |
}
|
| 1252 |
+
unset($options['end_date_toggle']);
|
|
|
|
| 1253 |
|
| 1254 |
+
if (empty($options['ga_tracking_toggle'])) {
|
| 1255 |
+
$options['ga_tracking_id'] = '';
|
| 1256 |
+
}
|
| 1257 |
+
if (!empty($options['ga_tracking_id']) && preg_match('/^UA-\d{3,}-\d{1,3}$/', $options['ga_tracking_id']) === 0) {
|
| 1258 |
+
add_settings_error('ucp', 'ga_tracking_id', esc_attr__('Please enter a valid Google Analytics Tracking ID or disable tracking.', 'under-construction-page'));
|
| 1259 |
+
}
|
| 1260 |
+
unset($options['ga_tracking_toggle']);
|
| 1261 |
+
|
| 1262 |
+
if (!empty($_POST['license-submit'])) {
|
| 1263 |
+
if (empty($options['license_key'])) {
|
| 1264 |
+
$options['license_type'] = '';
|
| 1265 |
+
$options['license_expires'] = '1900-01-01';
|
| 1266 |
+
$options['license_active'] = false;
|
| 1267 |
+
$options['license_key'] = '';
|
| 1268 |
+
add_settings_error(UCP_OPTIONS_KEY, 'license_key', esc_attr__('License key saved.', 'under-construction-page'), 'updated');
|
| 1269 |
+
} else {
|
| 1270 |
+
$tmp = UCP_license::validate_license_key($options['license_key']);
|
| 1271 |
+
if ($tmp['success']) {
|
| 1272 |
+
$options['license_type'] = $tmp['license_type'];
|
| 1273 |
+
$options['license_expires'] = $tmp['license_expires'];
|
| 1274 |
+
$options['license_active'] = $tmp['license_active'];
|
| 1275 |
+
if ($tmp['license_active']) {
|
| 1276 |
+
add_settings_error(UCP_OPTIONS_KEY, 'license_key', esc_attr__('License key saved and activated!', 'under-construction-page'), 'updated');
|
| 1277 |
+
} else {
|
| 1278 |
+
add_settings_error(UCP_OPTIONS_KEY, 'license_key', 'License not active. ' . $tmp['error'], 'error');
|
| 1279 |
+
}
|
| 1280 |
+
} else {
|
| 1281 |
+
add_settings_error(UCP_OPTIONS_KEY, 'license_key', 'Unable to contact licensing server. Please try again in a few moments.', 'error');
|
| 1282 |
+
}
|
| 1283 |
+
}
|
| 1284 |
+
} // update license
|
| 1285 |
+
|
| 1286 |
+
// empty cache in 3rd party plugins
|
| 1287 |
+
if ($options != $old_options) {
|
| 1288 |
+
$notices = get_option(UCP_NOTICES_KEY);
|
| 1289 |
+
unset($notices['dismiss_whitelisted']);
|
| 1290 |
+
update_option(UCP_NOTICES_KEY, $notices);
|
| 1291 |
+
self::empty_cache();
|
| 1292 |
+
}
|
| 1293 |
|
| 1294 |
+
return array_merge($old_options, $options);
|
| 1295 |
+
} // sanitize_settings
|
| 1296 |
|
| 1297 |
|
| 1298 |
+
static function empty_cache()
|
| 1299 |
+
{
|
| 1300 |
+
wp_cache_flush();
|
| 1301 |
+
if (function_exists('w3tc_flush_all')) {
|
| 1302 |
+
w3tc_flush_all();
|
| 1303 |
+
}
|
| 1304 |
+
if (function_exists('wp_cache_clear_cache')) {
|
| 1305 |
+
wp_cache_clear_cache();
|
| 1306 |
+
}
|
| 1307 |
+
if (method_exists('LiteSpeed_Cache_API', 'purge_all')) {
|
| 1308 |
+
LiteSpeed_Cache_API::purge_all();
|
| 1309 |
+
}
|
| 1310 |
+
if (class_exists('Endurance_Page_Cache')) {
|
| 1311 |
+
$epc = new Endurance_Page_Cache;
|
| 1312 |
+
$epc->purge_all();
|
| 1313 |
+
}
|
| 1314 |
+
if (class_exists('SG_CachePress_Supercacher') && method_exists('SG_CachePress_Supercacher', 'purge_cache')) {
|
| 1315 |
+
SG_CachePress_Supercacher::purge_cache(true);
|
| 1316 |
+
}
|
| 1317 |
+
if (class_exists('SiteGround_Optimizer\Supercacher\Supercacher')) {
|
| 1318 |
+
SiteGround_Optimizer\Supercacher\Supercacher::purge_cache();
|
| 1319 |
+
}
|
| 1320 |
+
if (isset($GLOBALS['wp_fastest_cache']) && method_exists($GLOBALS['wp_fastest_cache'], 'deleteCache')) {
|
| 1321 |
+
$GLOBALS['wp_fastest_cache']->deleteCache(true);
|
| 1322 |
+
}
|
| 1323 |
+
if (is_callable(array('Swift_Performance_Cache', 'clear_all_cache'))) {
|
| 1324 |
+
Swift_Performance_Cache::clear_all_cache();
|
| 1325 |
+
}
|
| 1326 |
+
if (is_callable(array('Hummingbird\WP_Hummingbird', 'flush_cache'))) {
|
| 1327 |
+
Hummingbird\WP_Hummingbird::flush_cache(true, false);
|
| 1328 |
+
}
|
| 1329 |
+
if (function_exists('rocket_clean_domain')) {
|
| 1330 |
+
rocket_clean_domain();
|
| 1331 |
+
}
|
| 1332 |
+
do_action('cache_enabler_clear_complete_cache');
|
| 1333 |
+
} // empty_cache
|
| 1334 |
|
| 1335 |
|
| 1336 |
+
// checkbox helper function
|
| 1337 |
+
static function checked($value, $current, $echo = false)
|
| 1338 |
+
{
|
| 1339 |
+
$out = '';
|
| 1340 |
|
| 1341 |
+
if (!is_array($current)) {
|
| 1342 |
+
$current = (array) $current;
|
| 1343 |
+
}
|
| 1344 |
|
| 1345 |
+
if (in_array($value, $current)) {
|
| 1346 |
+
$out = ' checked="checked" ';
|
| 1347 |
+
}
|
| 1348 |
|
| 1349 |
+
if ($echo) {
|
| 1350 |
+
self::wp_kses_wf($out);
|
| 1351 |
+
} else {
|
| 1352 |
+
return $out;
|
| 1353 |
+
}
|
| 1354 |
+
} // checked
|
| 1355 |
|
| 1356 |
|
| 1357 |
+
// helper function for saving options, mostly checkboxes
|
| 1358 |
+
static function check_var_isset($values, $variables)
|
| 1359 |
+
{
|
| 1360 |
+
foreach ($variables as $key => $value) {
|
| 1361 |
+
if (!isset($values[$key])) {
|
| 1362 |
+
$values[$key] = $value;
|
| 1363 |
+
}
|
| 1364 |
+
}
|
| 1365 |
|
| 1366 |
+
return $values;
|
| 1367 |
+
} // check_var_isset
|
| 1368 |
|
| 1369 |
|
| 1370 |
+
// helper function for creating dropdowns
|
| 1371 |
+
static function create_select_options($options, $selected = null, $output = true)
|
| 1372 |
+
{
|
| 1373 |
+
$out = "\n";
|
| 1374 |
|
| 1375 |
+
if (!is_array($selected)) {
|
| 1376 |
+
$selected = array($selected);
|
| 1377 |
+
}
|
| 1378 |
|
| 1379 |
+
foreach ($options as $tmp) {
|
| 1380 |
+
$data = '';
|
| 1381 |
+
if (isset($tmp['disabled'])) {
|
| 1382 |
+
$data .= ' disabled="disabled" ';
|
| 1383 |
+
}
|
| 1384 |
+
if (in_array($tmp['val'], $selected)) {
|
| 1385 |
+
$out .= "<option selected=\"selected\" value=\"{$tmp['val']}\"{$data}>{$tmp['label']} </option>\n";
|
| 1386 |
+
} else {
|
| 1387 |
+
$out .= "<option value=\"{$tmp['val']}\"{$data}>{$tmp['label']} </option>\n";
|
| 1388 |
+
}
|
| 1389 |
+
} // foreach
|
| 1390 |
+
|
| 1391 |
+
if ($output) {
|
| 1392 |
+
UCP::wp_kses_wf($out);
|
| 1393 |
+
} else {
|
| 1394 |
+
return $out;
|
| 1395 |
+
}
|
| 1396 |
+
} // create_select_options
|
| 1397 |
|
| 1398 |
|
| 1399 |
+
// helper function to generate tagged buy links
|
| 1400 |
+
static function generate_web_link($placement = '', $page = '/', $params = array(), $anchor = '')
|
| 1401 |
+
{
|
| 1402 |
+
$base_url = 'https://underconstructionpage.com';
|
| 1403 |
|
| 1404 |
+
if ('/' != $page) {
|
| 1405 |
+
$page = '/' . trim($page, '/') . '/';
|
| 1406 |
+
}
|
| 1407 |
+
if ($page == '//') {
|
| 1408 |
+
$page = '/';
|
| 1409 |
+
}
|
| 1410 |
|
| 1411 |
+
if ($placement) {
|
| 1412 |
+
$placement = trim($placement, '-');
|
| 1413 |
+
$placement = '-' . $placement;
|
| 1414 |
+
}
|
| 1415 |
|
| 1416 |
+
$parts = array_merge(array('ref' => 'ucp-free' . $placement), $params);
|
| 1417 |
|
| 1418 |
+
if (!empty($anchor)) {
|
| 1419 |
+
$anchor = '#' . trim($anchor, '#');
|
| 1420 |
+
}
|
| 1421 |
|
| 1422 |
+
$out = $base_url . $page . '?' . http_build_query($parts, '', '&') . $anchor;
|
| 1423 |
|
| 1424 |
+
return $out;
|
| 1425 |
+
} // generate_web_link
|
| 1426 |
|
| 1427 |
|
| 1428 |
+
// first, main tab content
|
| 1429 |
+
static function tab_main()
|
| 1430 |
+
{
|
| 1431 |
+
$options = self::get_options();
|
| 1432 |
+
$default_options = self::default_options();
|
| 1433 |
|
| 1434 |
+
echo '<div class="ucp-tab-content">';
|
| 1435 |
+
echo '<table class="form-table">';
|
| 1436 |
|
| 1437 |
+
echo '<tr valign="top">
|
| 1438 |
+
<th scope="row"><label for="status">' . esc_attr__('Under Construction Mode', 'under-construction-page') . '</label></th>
|
| 1439 |
<td>';
|
| 1440 |
|
| 1441 |
+
echo '<div class="toggle-wrapper" id="main-status">
|
| 1442 |
+
<input type="checkbox" id="status" ' . esc_attr(self::checked(1, $options['status'])) . ' type="checkbox" value="1" name="' . esc_attr(UCP_OPTIONS_KEY) . '[status]">
|
| 1443 |
<label for="status" class="toggle"><span class="toggle_handler"></span></label>
|
| 1444 |
</div>';
|
| 1445 |
|
| 1446 |
+
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. To configure exceptions set <a class="change_tab" data-tab="3" href="#whitelisted-roles">whitelisted user roles</a>.', 'under-construction-page') . '</p>';
|
| 1447 |
+
echo '</td></tr>';
|
| 1448 |
|
| 1449 |
+
echo '<tr valign="top">
|
| 1450 |
+
<th scope="row"><label for="search_engines">' . esc_attr__('Prevent Search Engines from Indexing the Temporary Site', 'under-construction-page') . '</label></th>
|
| 1451 |
<td>';
|
| 1452 |
+
echo '<div class="toggle-wrapper">
|
| 1453 |
<input type="checkbox" id="search_engines" type="checkbox" value="1" class="skip-save open-ucp-upsell">
|
| 1454 |
<label for="search_engines" class="toggle"><span class="toggle_handler"></span></label>
|
| 1455 |
</div>';
|
| 1456 |
|
| 1457 |
+
echo '<p class="description">' . __('While performing maintenance or having any temporary content displayed, it is favorable for SEO to prevent search engines from indexing the temporaray site. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="search_engines_text">PRO feature</a>.', 'under-construction-page') . '</p>';
|
| 1458 |
+
echo '</td></tr>';
|
| 1459 |
|
| 1460 |
+
echo '<tr valign="top">
|
| 1461 |
+
<th scope="row"><label for="end_date_toggle">' . esc_attr__('Automatic End Date & Time', 'under-construction-page') . '</label></th>
|
| 1462 |
<td>';
|
| 1463 |
+
echo '<div class="toggle-wrapper">
|
| 1464 |
+
<input type="checkbox" id="end_date_toggle" ' . esc_attr(self::checked(1, (empty($options['end_date']) || $options['end_date'] == '0000-00-00 00:00') ? 0 : 1)) . ' type="checkbox" value="1" name="' . esc_attr(UCP_OPTIONS_KEY) . '[end_date_toggle]">
|
| 1465 |
<label for="end_date_toggle" class="toggle"><span class="toggle_handler"></span></label>
|
| 1466 |
</div>';
|
| 1467 |
+
echo '<div id="end_date_wrapper"><input id="end_date" type="text" class="datepicker" name="' . esc_attr(UCP_OPTIONS_KEY) . '[end_date]" value="' . esc_attr($options['end_date']) . '" placeholder="yyyy-mm-dd hh:mm"><span title="' . esc_attr__('Open date & time picker', 'under-construction-page') . '" alt="' . esc_attr__('Open date & time picker', 'under-construction-page') . '" class="show-datepicker dashicons dashicons-calendar-alt"></span>';
|
| 1468 |
+
echo '<p class="description">' . esc_attr__('If enabled, construction mode will automatically stop showing on the selected date.
|
| 1469 |
This option will not "auto-enable" construction mode. Status has to be set to "On".', 'under-construction-page') . '</p></div>';
|
| 1470 |
+
echo '</td></tr>';
|
| 1471 |
|
| 1472 |
+
echo '<tr valign="top">
|
| 1473 |
+
<th scope="row"><label for="ga_tracking_id_toggle">' . esc_attr__('Google Analytics Tracking', 'under-construction-page') . '</label></th>
|
| 1474 |
<td>';
|
| 1475 |
+
echo '<div class="toggle-wrapper">
|
| 1476 |
+
<input type="checkbox" id="ga_tracking_id_toggle" ' . esc_attr(self::checked(1, empty($options['ga_tracking_id']) ? 0 : 1)) . ' type="checkbox" value="1" name="' . esc_attr(UCP_OPTIONS_KEY) . '[ga_tracking_toggle]">
|
| 1477 |
<label for="ga_tracking_id_toggle" class="toggle"><span class="toggle_handler"></span></label>
|
| 1478 |
</div>';
|
| 1479 |
+
echo '<div id="ga_tracking_id_wrapper"><input id="ga_tracking_id" type="text" class="code" name="' . esc_attr(UCP_OPTIONS_KEY) . '[ga_tracking_id]" value="' . esc_attr($options['ga_tracking_id']) . '" placeholder="UA-xxxxxx-xx">';
|
| 1480 |
+
echo '<p class="description">' . esc_attr__('Enter the unique tracking ID found in your GA tracking profile settings to track visits to pages.', 'under-construction-page') . '</p></div>';
|
| 1481 |
+
echo '</td></tr>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1482 |
|
| 1483 |
+
$reset_url = add_query_arg(array('action' => 'ucp_reset_settings', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
| 1484 |
+
$reset_url = wp_nonce_url($reset_url, 'ucp_reset_settings');
|
| 1485 |
+
echo '<tr valign="top">
|
| 1486 |
+
<th scope="row"><label for="">' . esc_attr__('Reset Settings', 'under-construction-page') . '</label></th>
|
| 1487 |
+
<td>';
|
| 1488 |
+
echo '<a href="' . esc_url($reset_url) . '" class="button button-secondary reset-settings">' . esc_attr__('Reset all settings to default values', 'under-construction-page') . '</a>';
|
| 1489 |
+
echo '<p class="description">' . esc_attr__('By resetting all settings to their default values any customizations you have done will be lost. There is no undo.', 'under-construction-page') . '</p>';
|
| 1490 |
+
echo '</td></tr>';
|
| 1491 |
|
| 1492 |
+
echo '</table>';
|
| 1493 |
+
echo '</div>';
|
|
|
|
|
|
|
| 1494 |
|
| 1495 |
+
self::footer_buttons();
|
| 1496 |
+
} // tab_main
|
| 1497 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1498 |
|
| 1499 |
+
static function tab_content()
|
| 1500 |
+
{
|
| 1501 |
+
global $wpdb;
|
| 1502 |
+
$options = self::get_options();
|
| 1503 |
+
$default_options = self::default_options();
|
| 1504 |
|
| 1505 |
+
echo '<div class="ucp-tab-content">';
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1506 |
|
| 1507 |
+
if (!self::is_weglot_active()) {
|
| 1508 |
+
echo '<div class="ucp-notice-small"><p><b>NEW</b> - Make your under construction page and your website <b>multilingual</b> with the Weglot Translate plugin.<br>To enable this feature, <a href="#" class="open-weglot-upsell">install the Weglot Translate freemium plugin</a>.';
|
| 1509 |
+
echo '</p></div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1510 |
}
|
| 1511 |
+
|
| 1512 |
+
echo '<table class="form-table">';
|
| 1513 |
+
|
| 1514 |
+
if (self::is_weglot_active()) {
|
| 1515 |
+
echo '<tr id="weglot-settings">';
|
| 1516 |
+
echo '<th><label for="weglot_lang">Multilingual Support</label></th>';
|
| 1517 |
+
echo '<td>';
|
| 1518 |
+
|
| 1519 |
+
|
| 1520 |
+
if (self::is_weglot_setup()) {
|
| 1521 |
+
$tmp = '';
|
| 1522 |
+
$active_languages = weglot_get_destination_languages();
|
| 1523 |
+
$languages = weglot_get_languages_available();
|
| 1524 |
+
$original_language = weglot_get_original_language();
|
| 1525 |
+
|
| 1526 |
+
echo '<p>Your under construction page is currently available in the following languages.<br>To add more languages and configure translations open <a href="' . esc_url(admin_url('admin.php?page=weglot-settings')) . '">Weglot settings</a>.</p>';
|
| 1527 |
+
echo '<ul class="ucp-list">';
|
| 1528 |
+
foreach ($languages as $language) {
|
| 1529 |
+
if ($language->getIso639() == $original_language) {
|
| 1530 |
+
$tmp = '<li>' . esc_html($language->getEnglishName()) . ' - original language</li>' . $tmp;
|
| 1531 |
+
}
|
| 1532 |
+
if (in_array($language->getIso639(), $active_languages, true)) {
|
| 1533 |
+
$tmp .= '<li>' . esc_html($language->getLocalName()) . '</li>';
|
| 1534 |
+
}
|
| 1535 |
+
} // foreach language
|
| 1536 |
+
self::wp_kses_wf($tmp);
|
| 1537 |
+
echo '</ul>';
|
| 1538 |
+
} else {
|
| 1539 |
+
echo '<p>Your under construction page is currently not translated.<br>Open <a href="' . esc_url(admin_url('admin.php?page=weglot-settings')) . '">Weglot settings</a> to select languages you want to translate to.</p>';
|
| 1540 |
+
}
|
| 1541 |
+
echo '</td>';
|
| 1542 |
+
echo '</tr>';
|
| 1543 |
+
} else {
|
| 1544 |
+
echo '<tr>';
|
| 1545 |
+
echo '<th><label for="weglot_support">Multilingual Support</label></th>';
|
| 1546 |
+
echo '<td>';
|
| 1547 |
+
echo '<div class="toggle-wrapper">
|
| 1548 |
<input type="checkbox" id="weglot_support" type="checkbox" value="1" class="skip-save open-weglot-upsell">
|
| 1549 |
<label for="weglot_support" class="toggle"><span class="toggle_handler"></span></label></div>';
|
| 1550 |
+
echo '<p class="description">55% of online visitors prefer to browse in their mother tongue. If you have an audience speaking multiple languages, making your website multilingual is a must-have. To instantly translate your website and your under construction page, <a href="#" class="open-weglot-upsell">install the Weglot plugin</a> (free plan and free trial available). It seamlessly integrates with UCP and is compatible with all themes & plugins.</p>';
|
| 1551 |
+
echo '</td>';
|
| 1552 |
+
echo '</tr>';
|
| 1553 |
+
} // weglot not active
|
| 1554 |
+
|
| 1555 |
+
echo '<tr>';
|
| 1556 |
+
echo '<th><label for="smush_support">Image Compression</label></th>';
|
| 1557 |
+
echo '<td>';
|
| 1558 |
+
if (defined('WP_SMUSH_VERSION')) {
|
| 1559 |
+
echo 'Configure <a target="_blank" href="' . esc_url(admin_url('admin.php?page=smush')) . '">image compression options</a>.';
|
| 1560 |
+
} else {
|
| 1561 |
+
echo '<div class="toggle-wrapper">
|
| 1562 |
<input type="checkbox" id="smush_support" type="checkbox" value="1" class="skip-save open-smush-install">
|
| 1563 |
<label for="smush_support" class="toggle"><span class="toggle_handler"></span></label></div>';
|
| 1564 |
+
echo '<p class="description">The easiest way to speed up any site is to <b>compress images</b>. On an average page you can easily save a few megabytes. Doing it manually in Photoshop is a pain! That\'s why there are free plugins like <a href="' . admin_url('plugin-install.php?fix-install-button=1&tab=plugin-information&plugin=wp-smushit&TB_iframe=true&width=600&height=550') . '" class="thickbox open-plugin-details-modal smush-thickbox" id="smush-install-link">Smush</a> that specialize in compressing images. <a href="' . admin_url('plugin-install.php?fix-install-button=1&tab=plugin-information&plugin=wp-smushit&TB_iframe=true&width=600&height=550') . '" class="thickbox open-plugin-details-modal smush-thickbox">Install the free Smush plugin</a>. It has no limit on the amount of images you can compress, seamlessly integrates with WordPress, and is compatible with all plugins & themes. And best of all - <b>it\'s used by over a million users just like you</b>.</p>';
|
| 1565 |
+
}
|
| 1566 |
+
echo '</td>';
|
| 1567 |
+
echo '</tr>';
|
| 1568 |
+
|
| 1569 |
+
echo '<tr valign="top">
|
| 1570 |
+
<th scope="row"><label for="title">' . esc_attr__('Title', 'under-construction-page') . '</label></th>
|
| 1571 |
+
<td><input type="text" id="title" class="regular-text" name="' . esc_attr(UCP_OPTIONS_KEY) . '[title]" value="' . esc_attr($options['title']) . '" />';
|
| 1572 |
+
echo '<p class="description">Page title. Default: ' . esc_attr($default_options['title']) . '</p>';
|
| 1573 |
+
echo '<p><b>Available shortcodes:</b> (only active in UC themes, not on the rest of the site)</p>
|
| 1574 |
<ul class="ucp-list">
|
| 1575 |
<li><code>[site-title]</code> - blog title, as set in <a href="options-general.php">Options - General</a></li>
|
| 1576 |
<li><code>[site-tagline]</code> - blog tagline, as set in <a href="options-general.php">Options - General</a></li>
|
| 1578 |
<li><code>[wp-url]</code> - WordPress address (URL), as set in <a href="options-general.php">Options - General</a></li>
|
| 1579 |
<li><code>[site-login-url]</code> - URL of the default site login page</li>
|
| 1580 |
</ul>';
|
| 1581 |
+
echo '</td></tr>';
|
| 1582 |
+
|
| 1583 |
+
echo '<tr valign="top">
|
| 1584 |
+
<th scope="row"><label for="description">' . esc_attr__('Description', 'under-construction-page') . '</label></th>
|
| 1585 |
+
<td><input id="description" type="text" class="large-text" name="' . esc_attr(UCP_OPTIONS_KEY) . '[description]" value="' . esc_attr($options['description']) . '" />';
|
| 1586 |
+
echo '<p class="description">Description meta tag (see above for available <a href="#title">shortcodes</a>). Default: ' . esc_attr($default_options['description']) . '</p>';
|
| 1587 |
+
echo '</td></tr>';
|
| 1588 |
+
|
| 1589 |
+
echo '<tr valign="top">
|
| 1590 |
+
<th scope="row"><label for="heading1">' . esc_attr__('Headline', 'under-construction-page') . '</label></th>
|
| 1591 |
+
<td><input id="heading1" type="text" class="large-text" name="' . esc_attr(UCP_OPTIONS_KEY) . '[heading1]" value="' . esc_attr($options['heading1']) . '" />';
|
| 1592 |
+
echo '<p class="description">Main heading/title (see above for available <a href="#title">shortcodes</a>). Default: ' . esc_attr($default_options['heading1']) . '</p>';
|
| 1593 |
+
echo '</td></tr>';
|
| 1594 |
+
|
| 1595 |
+
echo '<tr valign="top" id="content_wrap">
|
| 1596 |
+
<th scope="row"><label for="content">' . esc_attr__('Content', 'under-construction-page') . '</label></th>
|
| 1597 |
<td>';
|
| 1598 |
+
wp_editor($options['content'], 'content', array('tabfocus_elements' => 'insert-media-button,save-post', 'editor_height' => 250, 'resize' => 1, 'textarea_name' => esc_attr(UCP_OPTIONS_KEY) . '[content]', 'drag_drop_upload' => 1));
|
| 1599 |
+
echo '<p class="description">All HTML elements are allowed. Shortcodes are not parsed except <a href="#title">UC theme ones</a>. Default: ' . esc_attr($default_options['content']) . '</p>';
|
| 1600 |
+
echo '</td></tr>';
|
| 1601 |
|
| 1602 |
+
echo '<tr valign="top">
|
| 1603 |
+
<th scope="row"><label for="linkback">' . esc_attr__('Show Some Love', 'under-construction-page') . '</label></th>
|
| 1604 |
<td>';
|
| 1605 |
+
echo '<div class="toggle-wrapper">
|
| 1606 |
+
<input type="checkbox" id="linkback" ' . esc_attr(self::checked(1, $options['linkback'])) . ' type="checkbox" value="1" name="' . esc_attr(UCP_OPTIONS_KEY) . '[linkback]">
|
| 1607 |
<label for="linkback" class="toggle"><span class="toggle_handler"></span></label>
|
| 1608 |
</div>';
|
| 1609 |
+
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>';
|
| 1610 |
+
echo '</td></tr>';
|
| 1611 |
+
|
| 1612 |
+
echo '<tr>';
|
| 1613 |
+
echo '<th><label for="content_font">Content Font</label></th>';
|
| 1614 |
+
echo '<td><select class="skip-save open-ucp-upsell" id="content_font">';
|
| 1615 |
+
echo '<option value="" selected="selected">Theme Default</option>';
|
| 1616 |
+
echo '<option class="ucp-promo" value="-1">ABeeZee</option><option class="ucp-promo" value="-1">Abel</option><option class="ucp-promo" value="-1">Abril Fatface</option><option class="ucp-promo" value="-1">Aclonica</option><option class="ucp-promo" value="-1">Acme</option><option class="ucp-promo" value="-1">Actor</option><option class="ucp-promo" value="-1">Adamina</option><option class="ucp-promo" value="-1">Advent Pro</option><option class="ucp-promo" value="-1">Aguafina Script</option><option class="ucp-promo" value="-1">Akronim</option><option class="ucp-promo" value="-1">Aladin</option><option class="ucp-promo" value="-1">Aldrich</option><option class="ucp-promo" value="-1">Alef</option><option class="ucp-promo" value="-1">Alegreya</option><option class="ucp-promo" value="-1">Alegreya SC</option><option class="ucp-promo" value="-1">Alegreya Sans</option><option class="ucp-promo" value="-1">Alegreya Sans SC</option><option class="ucp-promo" value="-1">Alex Brush</option><option class="ucp-promo" value="-1">Alfa Slab One</option><option class="ucp-promo" value="-1">Alice</option><option class="ucp-promo" value="-1">Alike</option><option class="ucp-promo" value="-1">Alike Angular</option><option class="ucp-promo" value="-1">Allan</option><option class="ucp-promo" value="-1">Allerta</option><option class="ucp-promo" value="-1">Allerta Stencil</option><option class="ucp-promo" value="-1">Allura</option><option class="ucp-promo" value="-1">Almendra</option><option class="ucp-promo" value="-1">Almendra Display</option><option class="ucp-promo" value="-1">Almendra SC</option><option class="ucp-promo" value="-1">Amarante</option><option class="ucp-promo" value="-1">Amaranth</option><option class="ucp-promo" value="-1">Amatic SC</option><option class="ucp-promo" value="-1">Amethysta</option><option class="ucp-promo" value="-1">Anaheim</option><option class="ucp-promo" value="-1">Andada</option><option class="ucp-promo" value="-1">Andika</option><option class="ucp-promo" value="-1">Angkor</option><option class="ucp-promo" value="-1">Annie Use Your Telescope</option><option class="ucp-promo" value="-1">Anonymous Pro</option><option class="ucp-promo" value="-1">Antic</option><option class="ucp-promo" value="-1">Antic Didone</option><option class="ucp-promo" value="-1">Antic Slab</option><option class="ucp-promo" value="-1">Anton</option><option class="ucp-promo" value="-1">Arapey</option><option class="ucp-promo" value="-1">Arbutus</option><option class="ucp-promo" value="-1">Arbutus Slab</option><option class="ucp-promo" value="-1">Architects Daughter</option><option class="ucp-promo" value="-1">Archivo Black</option><option class="ucp-promo" value="-1">Archivo Narrow</option><option class="ucp-promo" value="-1">Arimo</option><option class="ucp-promo" value="-1">Arizonia</option><option class="ucp-promo" value="-1">Armata</option><option class="ucp-promo" value="-1">Artifika</option><option class="ucp-promo" value="-1">Arvo</option><option class="ucp-promo" value="-1">Asap</option><option class="ucp-promo" value="-1">Asset</option><option class="ucp-promo" value="-1">Astloch</option><option class="ucp-promo" value="-1">Asul</option><option class="ucp-promo" value="-1">Atomic Age</option><option class="ucp-promo" value="-1">Aubrey</option><option class="ucp-promo" value="-1">Audiowide</option><option class="ucp-promo" value="-1">Autour One</option><option class="ucp-promo" value="-1">Average</option><option class="ucp-promo" value="-1">Average Sans</option><option class="ucp-promo" value="-1">Averia Gruesa Libre</option><option class="ucp-promo" value="-1">Averia Libre</option><option class="ucp-promo" value="-1">Averia Sans Libre</option><option class="ucp-promo" value="-1">Averia Serif Libre</option><option class="ucp-promo" value="-1">Bad Script</option><option class="ucp-promo" value="-1">Balthazar</option><option class="ucp-promo" value="-1">Bangers</option><option class="ucp-promo" value="-1">Basic</option><option class="ucp-promo" value="-1">Battambang</option><option class="ucp-promo" value="-1">Baumans</option><option class="ucp-promo" value="-1">Bayon</option><option class="ucp-promo" value="-1">Belgrano</option><option class="ucp-promo" value="-1">Belleza</option><option class="ucp-promo" value="-1">BenchNine</option><option class="ucp-promo" value="-1">Bentham</option><option class="ucp-promo" value="-1">Berkshire Swash</option><option class="ucp-promo" value="-1">Bevan</option><option class="ucp-promo" value="-1">Bigelow Rules</option><option class="ucp-promo" value="-1">Bigshot One</option><option class="ucp-promo" value="-1">Bilbo</option><option class="ucp-promo" value="-1">Bilbo Swash Caps</option><option class="ucp-promo" value="-1">Bitter</option><option class="ucp-promo" value="-1">Black Ops One</option><option class="ucp-promo" value="-1">Bokor</option><option class="ucp-promo" value="-1">Bonbon</option><option class="ucp-promo" value="-1">Boogaloo</option><option class="ucp-promo" value="-1">Bowlby One</option><option class="ucp-promo" value="-1">Bowlby One SC</option><option class="ucp-promo" value="-1">Brawler</option><option class="ucp-promo" value="-1">Bree Serif</option><option class="ucp-promo" value="-1">Bubblegum Sans</option><option class="ucp-promo" value="-1">Bubbler One</option><option class="ucp-promo" value="-1">Buda</option><option class="ucp-promo" value="-1">Buenard</option><option class="ucp-promo" value="-1">Butcherman</option><option class="ucp-promo" value="-1">Butterfly Kids</option><option class="ucp-promo" value="-1">Cabin</option><option class="ucp-promo" value="-1">Cabin Condensed</option><option class="ucp-promo" value="-1">Cabin Sketch</option><option class="ucp-promo" value="-1">Caesar Dressing</option><option class="ucp-promo" value="-1">Cagliostro</option><option class="ucp-promo" value="-1">Calligraffitti</option><option class="ucp-promo" value="-1">Cambo</option><option class="ucp-promo" value="-1">Candal</option><option class="ucp-promo" value="-1">Cantarell</option><option class="ucp-promo" value="-1">Cantata One</option><option class="ucp-promo" value="-1">Cantora One</option><option class="ucp-promo" value="-1">Capriola</option><option class="ucp-promo" value="-1">Cardo</option><option class="ucp-promo" value="-1">Carme</option><option class="ucp-promo" value="-1">Carrois Gothic</option><option class="ucp-promo" value="-1">Carrois Gothic SC</option><option class="ucp-promo" value="-1">Carter One</option><option class="ucp-promo" value="-1">Caudex</option><option class="ucp-promo" value="-1">Cedarville Cursive</option><option class="ucp-promo" value="-1">Ceviche One</option><option class="ucp-promo" value="-1">Changa One</option><option class="ucp-promo" value="-1">Chango</option><option class="ucp-promo" value="-1">Chau Philomene One</option><option class="ucp-promo" value="-1">Chela One</option><option class="ucp-promo" value="-1">Chelsea Market</option><option class="ucp-promo" value="-1">Chenla</option><option class="ucp-promo" value="-1">Cherry Cream Soda</option><option class="ucp-promo" value="-1">Cherry Swash</option><option class="ucp-promo" value="-1">Chewy</option><option class="ucp-promo" value="-1">Chicle</option><option class="ucp-promo" value="-1">Chivo</option><option class="ucp-promo" value="-1">Cinzel</option><option class="ucp-promo" value="-1">Cinzel Decorative</option><option class="ucp-promo" value="-1">Clicker Script</option><option class="ucp-promo" value="-1">Coda</option><option class="ucp-promo" value="-1">Coda Caption</option><option class="ucp-promo" value="-1">Codystar</option><option class="ucp-promo" value="-1">Combo</option><option class="ucp-promo" value="-1">Comfortaa</option><option class="ucp-promo" value="-1">Coming Soon</option><option class="ucp-promo" value="-1">Concert One</option><option class="ucp-promo" value="-1">Condiment</option><option class="ucp-promo" value="-1">Content</option><option class="ucp-promo" value="-1">Contrail One</option><option class="ucp-promo" value="-1">Convergence</option><option class="ucp-promo" value="-1">Cookie</option><option class="ucp-promo" value="-1">Copse</option><option class="ucp-promo" value="-1">Corben</option><option class="ucp-promo" value="-1">Courgette</option><option class="ucp-promo" value="-1">Cousine</option><option class="ucp-promo" value="-1">Coustard</option><option class="ucp-promo" value="-1">Covered By Your Grace</option><option class="ucp-promo" value="-1">Crafty Girls</option><option class="ucp-promo" value="-1">Creepster</option><option class="ucp-promo" value="-1">Crete Round</option><option class="ucp-promo" value="-1">Crimson Text</option><option class="ucp-promo" value="-1">Croissant One</option><option class="ucp-promo" value="-1">Crushed</option><option class="ucp-promo" value="-1">Cuprum</option><option class="ucp-promo" value="-1">Cutive</option><option class="ucp-promo" value="-1">Cutive Mono</option><option class="ucp-promo" value="-1">Damion</option><option class="ucp-promo" value="-1">Dancing Script</option><option class="ucp-promo" value="-1">Dangrek</option><option class="ucp-promo" value="-1">Dawning of a New Day</option><option class="ucp-promo" value="-1">Days One</option><option class="ucp-promo" value="-1">Delius</option><option class="ucp-promo" value="-1">Delius Swash Caps</option><option class="ucp-promo" value="-1">Delius Unicase</option><option class="ucp-promo" value="-1">Della Respira</option><option class="ucp-promo" value="-1">Denk One</option><option class="ucp-promo" value="-1">Devonshire</option><option class="ucp-promo" value="-1">Didact Gothic</option><option class="ucp-promo" value="-1">Diplomata</option><option class="ucp-promo" value="-1">Diplomata SC</option><option class="ucp-promo" value="-1">Domine</option><option class="ucp-promo" value="-1">Donegal One</option><option class="ucp-promo" value="-1">Doppio One</option><option class="ucp-promo" value="-1">Dorsa</option><option class="ucp-promo" value="-1">Dosis</option><option class="ucp-promo" value="-1">Dr Sugiyama</option><option class="ucp-promo" value="-1">Droid Sans</option><option class="ucp-promo" value="-1">Droid Sans Mono</option><option class="ucp-promo" value="-1">Droid Serif</option><option class="ucp-promo" value="-1">Duru Sans</option><option class="ucp-promo" value="-1">Dynalight</option><option class="ucp-promo" value="-1">EB Garamond</option><option class="ucp-promo" value="-1">Eagle Lake</option><option class="ucp-promo" value="-1">Eater</option><option class="ucp-promo" value="-1">Economica</option><option class="ucp-promo" value="-1">Ek Mukta</option><option class="ucp-promo" value="-1">Electrolize</option><option class="ucp-promo" value="-1">Elsie</option><option class="ucp-promo" value="-1">Elsie Swash Caps</option><option class="ucp-promo" value="-1">Emblema One</option><option class="ucp-promo" value="-1">Emilys Candy</option><option class="ucp-promo" value="-1">Engagement</option><option class="ucp-promo" value="-1">Englebert</option><option class="ucp-promo" value="-1">Enriqueta</option><option class="ucp-promo" value="-1">Erica One</option><option class="ucp-promo" value="-1">Esteban</option><option class="ucp-promo" value="-1">Euphoria Script</option><option class="ucp-promo" value="-1">Ewert</option><option class="ucp-promo" value="-1">Exo</option><option class="ucp-promo" value="-1">Exo 2</option><option class="ucp-promo" value="-1">Expletus Sans</option><option class="ucp-promo" value="-1">Fanwood Text</option><option class="ucp-promo" value="-1">Fascinate</option><option class="ucp-promo" value="-1">Fascinate Inline</option><option class="ucp-promo" value="-1">Faster One</option><option class="ucp-promo" value="-1">Fasthand</option><option class="ucp-promo" value="-1">Fauna One</option><option class="ucp-promo" value="-1">Federant</option><option class="ucp-promo" value="-1">Federo</option><option class="ucp-promo" value="-1">Felipa</option><option class="ucp-promo" value="-1">Fenix</option><option class="ucp-promo" value="-1">Finger Paint</option><option class="ucp-promo" value="-1">Fira Mono</option><option class="ucp-promo" value="-1">Fira Sans</option><option class="ucp-promo" value="-1">Fjalla One</option><option class="ucp-promo" value="-1">Fjord One</option><option class="ucp-promo" value="-1">Flamenco</option><option class="ucp-promo" value="-1">Flavors</option><option class="ucp-promo" value="-1">Fondamento</option><option class="ucp-promo" value="-1">Fontdiner Swanky</option><option class="ucp-promo" value="-1">Forum</option><option class="ucp-promo" value="-1">Francois One</option><option class="ucp-promo" value="-1">Freckle Face</option><option class="ucp-promo" value="-1">Fredericka the Great</option><option class="ucp-promo" value="-1">Fredoka One</option><option class="ucp-promo" value="-1">Freehand</option><option class="ucp-promo" value="-1">Fresca</option><option class="ucp-promo" value="-1">Frijole</option><option class="ucp-promo" value="-1">Fruktur</option><option class="ucp-promo" value="-1">Fugaz One</option><option class="ucp-promo" value="-1">GFS Didot</option><option class="ucp-promo" value="-1">GFS Neohellenic</option><option class="ucp-promo" value="-1">Gabriela</option><option class="ucp-promo" value="-1">Gafata</option><option class="ucp-promo" value="-1">Galdeano</option><option class="ucp-promo" value="-1">Galindo</option><option class="ucp-promo" value="-1">Gentium Basic</option><option class="ucp-promo" value="-1">Gentium Book Basic</option><option class="ucp-promo" value="-1">Geo</option><option class="ucp-promo" value="-1">Geostar</option><option class="ucp-promo" value="-1">Geostar Fill</option><option class="ucp-promo" value="-1">Germania One</option><option class="ucp-promo" value="-1">Gilda Display</option><option class="ucp-promo" value="-1">Give You Glory</option><option class="ucp-promo" value="-1">Glass Antiqua</option><option class="ucp-promo" value="-1">Glegoo</option><option class="ucp-promo" value="-1">Gloria Hallelujah</option><option class="ucp-promo" value="-1">Goblin One</option><option class="ucp-promo" value="-1">Gochi Hand</option><option class="ucp-promo" value="-1">Gorditas</option><option class="ucp-promo" value="-1">Goudy Bookletter 1911</option><option class="ucp-promo" value="-1">Graduate</option><option class="ucp-promo" value="-1">Grand Hotel</option><option class="ucp-promo" value="-1">Gravitas One</option><option class="ucp-promo" value="-1">Great Vibes</option><option class="ucp-promo" value="-1">Griffy</option><option class="ucp-promo" value="-1">Gruppo</option><option class="ucp-promo" value="-1">Gudea</option><option class="ucp-promo" value="-1">Habibi</option><option class="ucp-promo" value="-1">Hammersmith One</option><option class="ucp-promo" value="-1">Hanalei</option><option class="ucp-promo" value="-1">Hanalei Fill</option><option class="ucp-promo" value="-1">Handlee</option><option class="ucp-promo" value="-1">Hanuman</option><option class="ucp-promo" value="-1">Happy Monkey</option><option class="ucp-promo" value="-1">Headland One</option><option class="ucp-promo" value="-1">Henny Penny</option><option class="ucp-promo" value="-1">Herr Von Muellerhoff</option><option class="ucp-promo" value="-1">Hind</option><option class="ucp-promo" value="-1">Holtwood One SC</option><option class="ucp-promo" value="-1">Homemade Apple</option><option class="ucp-promo" value="-1">Homenaje</option><option class="ucp-promo" value="-1">IM Fell DW Pica</option><option class="ucp-promo" value="-1">IM Fell DW Pica SC</option><option class="ucp-promo" value="-1">IM Fell Double Pica</option><option class="ucp-promo" value="-1">IM Fell Double Pica SC</option><option class="ucp-promo" value="-1">IM Fell English</option><option class="ucp-promo" value="-1">IM Fell English SC</option><option class="ucp-promo" value="-1">IM Fell French Canon</option><option class="ucp-promo" value="-1">IM Fell French Canon SC</option><option class="ucp-promo" value="-1">IM Fell Great Primer</option><option class="ucp-promo" value="-1">IM Fell Great Primer SC</option><option class="ucp-promo" value="-1">Iceberg</option><option class="ucp-promo" value="-1">Iceland</option><option class="ucp-promo" value="-1">Imprima</option><option class="ucp-promo" value="-1">Inconsolata</option><option class="ucp-promo" value="-1">Inder</option><option class="ucp-promo" value="-1">Indie Flower</option><option class="ucp-promo" value="-1">Inika</option><option class="ucp-promo" value="-1">Irish Grover</option><option class="ucp-promo" value="-1">Istok Web</option><option class="ucp-promo" value="-1">Italiana</option><option class="ucp-promo" value="-1">Italianno</option><option class="ucp-promo" value="-1">Jacques Francois</option><option class="ucp-promo" value="-1">Jacques Francois Shadow</option><option class="ucp-promo" value="-1">Jim Nightshade</option><option class="ucp-promo" value="-1">Jockey One</option><option class="ucp-promo" value="-1">Jolly Lodger</option><option class="ucp-promo" value="-1">Josefin Sans</option><option class="ucp-promo" value="-1">Josefin Slab</option><option class="ucp-promo" value="-1">Joti One</option><option class="ucp-promo" value="-1">Judson</option><option class="ucp-promo" value="-1">Julee</option><option class="ucp-promo" value="-1">Julius Sans One</option><option class="ucp-promo" value="-1">Junge</option><option class="ucp-promo" value="-1">Jura</option><option class="ucp-promo" value="-1">Just Another Hand</option><option class="ucp-promo" value="-1">Just Me Again Down Here</option><option class="ucp-promo" value="-1">Kalam</option><option class="ucp-promo" value="-1">Kameron</option><option class="ucp-promo" value="-1">Kantumruy</option><option class="ucp-promo" value="-1">Karla</option><option class="ucp-promo" value="-1">Karma</option><option class="ucp-promo" value="-1">Kaushan Script</option><option class="ucp-promo" value="-1">Kavoon</option><option class="ucp-promo" value="-1">Kdam Thmor</option><option class="ucp-promo" value="-1">Keania One</option><option class="ucp-promo" value="-1">Kelly Slab</option><option class="ucp-promo" value="-1">Kenia</option><option class="ucp-promo" value="-1">Khmer</option><option class="ucp-promo" value="-1">Kite One</option><option class="ucp-promo" value="-1">Knewave</option><option class="ucp-promo" value="-1">Kotta One</option><option class="ucp-promo" value="-1">Koulen</option><option class="ucp-promo" value="-1">Kranky</option><option class="ucp-promo" value="-1">Kreon</option><option class="ucp-promo" value="-1">Kristi</option><option class="ucp-promo" value="-1">Krona One</option><option class="ucp-promo" value="-1">La Belle Aurore</option><option class="ucp-promo" value="-1">Lancelot</option><option class="ucp-promo" value="-1">Lato</option><option class="ucp-promo" value="-1">League Script</option><option class="ucp-promo" value="-1">Leckerli One</option><option class="ucp-promo" value="-1">Ledger</option><option class="ucp-promo" value="-1">Lekton</option><option class="ucp-promo" value="-1">Lemon</option><option class="ucp-promo" value="-1">Libre Baskerville</option><option class="ucp-promo" value="-1">Life Savers</option><option class="ucp-promo" value="-1">Lilita One</option><option class="ucp-promo" value="-1">Lily Script One</option><option class="ucp-promo" value="-1">Limelight</option><option class="ucp-promo" value="-1">Linden Hill</option><option class="ucp-promo" value="-1">Lobster</option><option class="ucp-promo" value="-1">Lobster Two</option><option class="ucp-promo" value="-1">Londrina Outline</option><option class="ucp-promo" value="-1">Londrina Shadow</option><option class="ucp-promo" value="-1">Londrina Sketch</option><option class="ucp-promo" value="-1">Londrina Solid</option><option class="ucp-promo" value="-1">Lora</option><option class="ucp-promo" value="-1">Love Ya Like A Sister</option><option class="ucp-promo" value="-1">Loved by the King</option><option class="ucp-promo" value="-1">Lovers Quarrel</option><option class="ucp-promo" value="-1">Luckiest Guy</option><option class="ucp-promo" value="-1">Lusitana</option><option class="ucp-promo" value="-1">Lustria</option><option class="ucp-promo" value="-1">Macondo</option><option class="ucp-promo" value="-1">Macondo Swash Caps</option><option class="ucp-promo" value="-1">Magra</option><option class="ucp-promo" value="-1">Maiden Orange</option><option class="ucp-promo" value="-1">Mako</option><option class="ucp-promo" value="-1">Marcellus</option><option class="ucp-promo" value="-1">Marcellus SC</option><option class="ucp-promo" value="-1">Marck Script</option><option class="ucp-promo" value="-1">Margarine</option><option class="ucp-promo" value="-1">Marko One</option><option class="ucp-promo" value="-1">Marmelad</option><option class="ucp-promo" value="-1">Marvel</option><option class="ucp-promo" value="-1">Mate</option><option class="ucp-promo" value="-1">Mate SC</option><option class="ucp-promo" value="-1">Maven Pro</option><option class="ucp-promo" value="-1">McLaren</option><option class="ucp-promo" value="-1">Meddon</option><option class="ucp-promo" value="-1">MedievalSharp</option><option class="ucp-promo" value="-1">Medula One</option><option class="ucp-promo" value="-1">Megrim</option><option class="ucp-promo" value="-1">Meie Script</option><option class="ucp-promo" value="-1">Merienda</option><option class="ucp-promo" value="-1">Merienda One</option><option class="ucp-promo" value="-1">Merriweather</option><option class="ucp-promo" value="-1">Merriweather Sans</option><option class="ucp-promo" value="-1">Metal</option><option class="ucp-promo" value="-1">Metal Mania</option><option class="ucp-promo" value="-1">Metamorphous</option><option class="ucp-promo" value="-1">Metrophobic</option><option class="ucp-promo" value="-1">Michroma</option><option class="ucp-promo" value="-1">Milonga</option><option class="ucp-promo" value="-1">Miltonian</option><option class="ucp-promo" value="-1">Miltonian Tattoo</option><option class="ucp-promo" value="-1">Miniver</option><option class="ucp-promo" value="-1">Miss Fajardose</option><option class="ucp-promo" value="-1">Modern Antiqua</option><option class="ucp-promo" value="-1">Molengo</option><option class="ucp-promo" value="-1">Molle</option><option class="ucp-promo" value="-1">Monda</option><option class="ucp-promo" value="-1">Monofett</option><option class="ucp-promo" value="-1">Monoton</option><option class="ucp-promo" value="-1">Monsieur La Doulaise</option><option class="ucp-promo" value="-1">Montaga</option><option class="ucp-promo" value="-1">Montez</option><option class="ucp-promo" value="-1">Montserrat</option><option class="ucp-promo" value="-1">Montserrat Alternates</option><option class="ucp-promo" value="-1">Montserrat Subrayada</option><option class="ucp-promo" value="-1">Moul</option><option class="ucp-promo" value="-1">Moulpali</option><option class="ucp-promo" value="-1">Mountains of Christmas</option><option class="ucp-promo" value="-1">Mouse Memoirs</option><option class="ucp-promo" value="-1">Mr Bedfort</option><option class="ucp-promo" value="-1">Mr Dafoe</option><option class="ucp-promo" value="-1">Mr De Haviland</option><option class="ucp-promo" value="-1">Mrs Saint Delafield</option><option class="ucp-promo" value="-1">Mrs Sheppards</option><option class="ucp-promo" value="-1">Muli</option><option class="ucp-promo" value="-1">Mystery Quest</option><option class="ucp-promo" value="-1">Neucha</option><option class="ucp-promo" value="-1">Neuton</option><option class="ucp-promo" value="-1">New Rocker</option><option class="ucp-promo" value="-1">News Cycle</option><option class="ucp-promo" value="-1">Niconne</option><option class="ucp-promo" value="-1">Nixie One</option><option class="ucp-promo" value="-1">Nobile</option><option class="ucp-promo" value="-1">Nokora</option><option class="ucp-promo" value="-1">Norican</option><option class="ucp-promo" value="-1">Nosifer</option><option class="ucp-promo" value="-1">Nothing You Could Do</option><option class="ucp-promo" value="-1">Noticia Text</option><option class="ucp-promo" value="-1">Noto Sans</option><option class="ucp-promo" value="-1">Noto Serif</option><option class="ucp-promo" value="-1">Nova Cut</option><option class="ucp-promo" value="-1">Nova Flat</option><option class="ucp-promo" value="-1">Nova Mono</option><option class="ucp-promo" value="-1">Nova Oval</option><option class="ucp-promo" value="-1">Nova Round</option><option class="ucp-promo" value="-1">Nova Script</option><option class="ucp-promo" value="-1">Nova Slim</option><option class="ucp-promo" value="-1">Nova Square</option><option class="ucp-promo" value="-1">Numans</option><option class="ucp-promo" value="-1">Nunito</option><option class="ucp-promo" value="-1">Odor Mean Chey</option><option class="ucp-promo" value="-1">Offside</option><option class="ucp-promo" value="-1">Old Standard TT</option><option class="ucp-promo" value="-1">Oldenburg</option><option class="ucp-promo" value="-1">Oleo Script</option><option class="ucp-promo" value="-1">Oleo Script Swash Caps</option><option class="ucp-promo" value="-1">Open Sans</option><option class="ucp-promo" value="-1">Open Sans Condensed</option><option class="ucp-promo" value="-1">Oranienbaum</option><option class="ucp-promo" value="-1">Orbitron</option><option class="ucp-promo" value="-1">Oregano</option><option class="ucp-promo" value="-1">Orienta</option><option class="ucp-promo" value="-1">Original Surfer</option><option class="ucp-promo" value="-1">Oswald</option><option class="ucp-promo" value="-1">Over the Rainbow</option><option class="ucp-promo" value="-1">Overlock</option><option class="ucp-promo" value="-1">Overlock SC</option><option class="ucp-promo" value="-1">Ovo</option><option class="ucp-promo" value="-1">Oxygen</option><option class="ucp-promo" value="-1">Oxygen Mono</option><option class="ucp-promo" value="-1">PT Mono</option><option class="ucp-promo" value="-1">PT Sans</option><option class="ucp-promo" value="-1">PT Sans Caption</option><option class="ucp-promo" value="-1">PT Sans Narrow</option><option class="ucp-promo" value="-1">PT Serif</option><option class="ucp-promo" value="-1">PT Serif Caption</option><option class="ucp-promo" value="-1">Pacifico</option><option class="ucp-promo" value="-1">Paprika</option><option class="ucp-promo" value="-1">Parisienne</option><option class="ucp-promo" value="-1">Passero One</option><option class="ucp-promo" value="-1">Passion One</option><option class="ucp-promo" value="-1">Pathway Gothic One</option><option class="ucp-promo" value="-1">Patrick Hand</option><option class="ucp-promo" value="-1">Patrick Hand SC</option><option class="ucp-promo" value="-1">Patua One</option><option class="ucp-promo" value="-1">Paytone One</option><option class="ucp-promo" value="-1">Peralta</option><option class="ucp-promo" value="-1">Permanent Marker</option><option class="ucp-promo" value="-1">Petit Formal Script</option><option class="ucp-promo" value="-1">Petrona</option><option class="ucp-promo" value="-1">Philosopher</option><option class="ucp-promo" value="-1">Piedra</option><option class="ucp-promo" value="-1">Pinyon Script</option><option class="ucp-promo" value="-1">Pirata One</option><option class="ucp-promo" value="-1">Plaster</option><option class="ucp-promo" value="-1">Play</option><option class="ucp-promo" value="-1">Playball</option><option class="ucp-promo" value="-1">Playfair Display</option><option class="ucp-promo" value="-1">Playfair Display SC</option><option class="ucp-promo" value="-1">Podkova</option><option class="ucp-promo" value="-1">Poiret One</option><option class="ucp-promo" value="-1">Poller One</option><option class="ucp-promo" value="-1">Poly</option><option class="ucp-promo" value="-1">Pompiere</option><option class="ucp-promo" value="-1">Pontano Sans</option><option class="ucp-promo" value="-1">Port Lligat Sans</option><option class="ucp-promo" value="-1">Port Lligat Slab</option><option class="ucp-promo" value="-1">Prata</option><option class="ucp-promo" value="-1">Preahvihear</option><option class="ucp-promo" value="-1">Press Start 2P</option><option class="ucp-promo" value="-1">Princess Sofia</option><option class="ucp-promo" value="-1">Prociono</option><option class="ucp-promo" value="-1">Prosto One</option><option class="ucp-promo" value="-1">Puritan</option><option class="ucp-promo" value="-1">Purple Purse</option><option class="ucp-promo" value="-1">Quando</option><option class="ucp-promo" value="-1">Quantico</option><option class="ucp-promo" value="-1">Quattrocento</option><option class="ucp-promo" value="-1">Quattrocento Sans</option><option class="ucp-promo" value="-1">Questrial</option><option class="ucp-promo" value="-1">Quicksand</option><option class="ucp-promo" value="-1">Quintessential</option><option class="ucp-promo" value="-1">Qwigley</option><option class="ucp-promo" value="-1">Racing Sans One</option><option class="ucp-promo" value="-1">Radley</option><option class="ucp-promo" value="-1">Rajdhani</option><option class="ucp-promo" value="-1">Raleway</option><option class="ucp-promo" value="-1">Raleway Dots</option><option class="ucp-promo" value="-1">Rambla</option><option class="ucp-promo" value="-1">Rammetto One</option><option class="ucp-promo" value="-1">Ranchers</option><option class="ucp-promo" value="-1">Rancho</option><option class="ucp-promo" value="-1">Rationale</option><option class="ucp-promo" value="-1">Redressed</option><option class="ucp-promo" value="-1">Reenie Beanie</option><option class="ucp-promo" value="-1">Revalia</option><option class="ucp-promo" value="-1">Ribeye</option><option class="ucp-promo" value="-1">Ribeye Marrow</option><option class="ucp-promo" value="-1">Righteous</option><option class="ucp-promo" value="-1">Risque</option><option class="ucp-promo" value="-1">Roboto</option><option class="ucp-promo" value="-1">Roboto Condensed</option><option class="ucp-promo" value="-1">Roboto Slab</option><option class="ucp-promo" value="-1">Rochester</option><option class="ucp-promo" value="-1">Rock Salt</option><option class="ucp-promo" value="-1">Rokkitt</option><option class="ucp-promo" value="-1">Romanesco</option><option class="ucp-promo" value="-1">Ropa Sans</option><option class="ucp-promo" value="-1">Rosario</option><option class="ucp-promo" value="-1">Rosarivo</option><option class="ucp-promo" value="-1">Rouge Script</option><option class="ucp-promo" value="-1">Rubik Mono One</option><option class="ucp-promo" value="-1">Rubik One</option><option class="ucp-promo" value="-1">Ruda</option><option class="ucp-promo" value="-1">Rufina</option><option class="ucp-promo" value="-1">Ruge Boogie</option><option class="ucp-promo" value="-1">Ruluko</option><option class="ucp-promo" value="-1">Rum Raisin</option><option class="ucp-promo" value="-1">Ruslan Display</option><option class="ucp-promo" value="-1">Russo One</option><option class="ucp-promo" value="-1">Ruthie</option><option class="ucp-promo" value="-1">Rye</option><option class="ucp-promo" value="-1">Sacramento</option><option class="ucp-promo" value="-1">Sail</option><option class="ucp-promo" value="-1">Salsa</option><option class="ucp-promo" value="-1">Sanchez</option><option class="ucp-promo" value="-1">Sancreek</option><option class="ucp-promo" value="-1">Sansita One</option><option class="ucp-promo" value="-1">Sarina</option><option class="ucp-promo" value="-1">Satisfy</option><option class="ucp-promo" value="-1">Scada</option><option class="ucp-promo" value="-1">Schoolbell</option><option class="ucp-promo" value="-1">Seaweed Script</option><option class="ucp-promo" value="-1">Sevillana</option><option class="ucp-promo" value="-1">Seymour One</option><option class="ucp-promo" value="-1">Shadows Into Light</option><option class="ucp-promo" value="-1">Shadows Into Light Two</option><option class="ucp-promo" value="-1">Shanti</option><option class="ucp-promo" value="-1">Share</option><option class="ucp-promo" value="-1">Share Tech</option><option class="ucp-promo" value="-1">Share Tech Mono</option><option class="ucp-promo" value="-1">Shojumaru</option><option class="ucp-promo" value="-1">Short Stack</option><option class="ucp-promo" value="-1">Siemreap</option><option class="ucp-promo" value="-1">Sigmar One</option><option class="ucp-promo" value="-1">Signika</option><option class="ucp-promo" value="-1">Signika Negative</option><option class="ucp-promo" value="-1">Simonetta</option><option class="ucp-promo" value="-1">Sintony</option><option class="ucp-promo" value="-1">Sirin Stencil</option><option class="ucp-promo" value="-1">Six Caps</option><option class="ucp-promo" value="-1">Skranji</option><option class="ucp-promo" value="-1">Slabo 13px</option><option class="ucp-promo" value="-1">Slabo 27px</option><option class="ucp-promo" value="-1">Slackey</option><option class="ucp-promo" value="-1">Smokum</option><option class="ucp-promo" value="-1">Smythe</option><option class="ucp-promo" value="-1">Sniglet</option><option class="ucp-promo" value="-1">Snippet</option><option class="ucp-promo" value="-1">Snowburst One</option><option class="ucp-promo" value="-1">Sofadi One</option><option class="ucp-promo" value="-1">Sofia</option><option class="ucp-promo" value="-1">Sonsie One</option><option class="ucp-promo" value="-1">Sorts Mill Goudy</option><option class="ucp-promo" value="-1">Source Code Pro</option><option class="ucp-promo" value="-1">Source Sans Pro</option><option class="ucp-promo" value="-1">Source Serif Pro</option><option class="ucp-promo" value="-1">Special Elite</option><option class="ucp-promo" value="-1">Spicy Rice</option><option class="ucp-promo" value="-1">Spinnaker</option><option class="ucp-promo" value="-1">Spirax</option><option class="ucp-promo" value="-1">Squada One</option><option class="ucp-promo" value="-1">Stalemate</option><option class="ucp-promo" value="-1">Stalinist One</option><option class="ucp-promo" value="-1">Stardos Stencil</option><option class="ucp-promo" value="-1">Stint Ultra Condensed</option><option class="ucp-promo" value="-1">Stint Ultra Expanded</option><option class="ucp-promo" value="-1">Stoke</option><option class="ucp-promo" value="-1">Strait</option><option class="ucp-promo" value="-1">Sue Ellen Francisco</option><option class="ucp-promo" value="-1">Sunshiney</option><option class="ucp-promo" value="-1">Supermercado One</option><option class="ucp-promo" value="-1">Suwannaphum</option><option class="ucp-promo" value="-1">Swanky and Moo Moo</option><option class="ucp-promo" value="-1">Syncopate</option><option class="ucp-promo" value="-1">Tangerine</option><option class="ucp-promo" value="-1">Taprom</option><option class="ucp-promo" value="-1">Tauri</option><option class="ucp-promo" value="-1">Teko</option><option class="ucp-promo" value="-1">Telex</option><option class="ucp-promo" value="-1">Tenor Sans</option><option class="ucp-promo" value="-1">Text Me One</option><option class="ucp-promo" value="-1">The Girl Next Door</option><option class="ucp-promo" value="-1">Tienne</option><option class="ucp-promo" value="-1">Tinos</option><option class="ucp-promo" value="-1">Titan One</option><option class="ucp-promo" value="-1">Titillium Web</option><option class="ucp-promo" value="-1">Trade Winds</option><option class="ucp-promo" value="-1">Trocchi</option><option class="ucp-promo" value="-1">Trochut</option><option class="ucp-promo" value="-1">Trykker</option><option class="ucp-promo" value="-1">Tulpen One</option><option class="ucp-promo" value="-1">Ubuntu</option><option class="ucp-promo" value="-1">Ubuntu Condensed</option><option class="ucp-promo" value="-1">Ubuntu Mono</option><option class="ucp-promo" value="-1">Ultra</option><option class="ucp-promo" value="-1">Uncial Antiqua</option><option class="ucp-promo" value="-1">Underdog</option><option class="ucp-promo" value="-1">Unica One</option><option class="ucp-promo" value="-1">UnifrakturCook</option><option class="ucp-promo" value="-1">UnifrakturMaguntia</option><option class="ucp-promo" value="-1">Unkempt</option><option class="ucp-promo" value="-1">Unlock</option><option class="ucp-promo" value="-1">Unna</option><option class="ucp-promo" value="-1">VT323</option><option class="ucp-promo" value="-1">Vampiro One</option><option class="ucp-promo" value="-1">Varela</option><option class="ucp-promo" value="-1">Varela Round</option><option class="ucp-promo" value="-1">Vast Shadow</option><option class="ucp-promo" value="-1">Vibur</option><option class="ucp-promo" value="-1">Vidaloka</option><option class="ucp-promo" value="-1">Viga</option><option class="ucp-promo" value="-1">Voces</option><option class="ucp-promo" value="-1">Volkhov</option><option class="ucp-promo" value="-1">Vollkorn</option><option class="ucp-promo" value="-1">Voltaire</option><option class="ucp-promo" value="-1">Waiting for the Sunrise</option><option class="ucp-promo" value="-1">Wallpoet</option><option class="ucp-promo" value="-1">Walter Turncoat</option><option class="ucp-promo" value="-1">Warnes</option><option class="ucp-promo" value="-1">Wellfleet</option><option class="ucp-promo" value="-1">Wendy One</option><option class="ucp-promo" value="-1">Wire One</option><option class="ucp-promo" value="-1">Yanone Kaffeesatz</option><option class="ucp-promo" value="-1">Yellowtail</option><option class="ucp-promo" value="-1">Yeseva One</option><option class="ucp-promo" value="-1">Yesteryear</option><option class="ucp-promo" value="-1">Zeyada</option>';
|
| 1617 |
+
echo '</select>';
|
| 1618 |
+
echo '<p class="description">Choose one of 600+ beautiful Google fonts or use the default, theme set one. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="content_font">PRO feature</a>.</p>';
|
| 1619 |
+
echo '</td>';
|
| 1620 |
+
echo '</tr>';
|
| 1621 |
+
|
| 1622 |
+
echo '<tr valign="top">
|
| 1623 |
+
<th scope="row"><label for="external_shortcodes">' . esc_attr__('3rd Party Shortcode Support in Content', 'under-construction-page') . '</label></th>
|
| 1624 |
<td>';
|
| 1625 |
+
echo '<div class="toggle-wrapper">
|
| 1626 |
<input type="checkbox" id="external_shortcodes" type="checkbox" value="1" class="skip-save open-ucp-upsell">
|
| 1627 |
<label for="external_shortcodes" class="toggle"><span class="toggle_handler"></span></label>
|
| 1628 |
</div>';
|
| 1629 |
+
echo '<p class="description">Enable if you have a 3rd party shortcode you\'d like to use on the under construction page. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="external_shortcodes">PRO feature</a>.</p>';
|
| 1630 |
+
echo '</td></tr>';
|
| 1631 |
|
| 1632 |
+
echo '<tr valign="top" id="login_button_wrap">
|
| 1633 |
+
<th scope="row"><label for="login_button">' . esc_attr__('Login Button', 'under-construction-page') . '</label></th>
|
| 1634 |
<td>';
|
| 1635 |
+
echo '<div class="toggle-wrapper">
|
| 1636 |
+
<input type="checkbox" id="login_button" ' . esc_attr(self::checked(1, $options['login_button'])) . ' type="checkbox" value="1" name="' . esc_attr(UCP_OPTIONS_KEY) . '[login_button]">
|
| 1637 |
<label for="login_button" class="toggle"><span class="toggle_handler"></span></label>
|
| 1638 |
</div>';
|
| 1639 |
+
echo '<p class="description">Show a discrete link to the login form, or WP admin if you\'re logged in, in the lower right corner of the page.</p>';
|
| 1640 |
+
echo '</td></tr>';
|
| 1641 |
|
| 1642 |
+
echo '<tr valign="top">
|
| 1643 |
+
<th scope="row"><label for="custom_footer_code">' . esc_attr__('Custom Footer Code', 'under-construction-page') . '</label></th>
|
| 1644 |
<td>';
|
| 1645 |
+
echo '<textarea data-autoresize="1" rows="3" id="custom_footer_code" class="code large-text skip-save disabled open-ucp-upsell" name="" placeholder=""></textarea>';
|
| 1646 |
+
echo '<p class="description">Paste any 3rd party code here such as tracking scripts or tracking pixels. Be sure to include <script> tags as nothing is added automatically.<br>This is NOT a place to add Google Analytics code. Please use the <a href="#ga_tracking_id_toggle" class="change_tab" data-tab="0">GA Tracking setting</a> for that. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="footer_code">PRO feature</a>.</p>';
|
| 1647 |
+
echo '</td></tr>';
|
| 1648 |
+
|
| 1649 |
+
echo '</table>';
|
| 1650 |
+
|
| 1651 |
+
self::footer_buttons();
|
| 1652 |
+
|
| 1653 |
+
echo '<h2 class="title">' . esc_attr__('Social & Contact Icons', 'under-construction-page') . '</h2>';
|
| 1654 |
+
|
| 1655 |
+
echo '<table class="form-table" id="ucp-social-icons">';
|
| 1656 |
+
echo '<tr valign="top">
|
| 1657 |
+
<th scope="row"><label for="social_facebook">' . esc_attr__('Facebook Page', 'under-construction-page') . '</label></th>
|
| 1658 |
+
<td><input id="social_facebook" type="url" class="regular-text code" name="' . esc_attr(UCP_OPTIONS_KEY) . '[social_facebook]" value="' . esc_attr($options['social_facebook']) . '" placeholder="' . esc_attr__('Facebook business or personal page URL', 'under-construction-page') . '">';
|
| 1659 |
+
echo '<p class="description">' . esc_attr__('Complete URL, with https prefix, to Facebook page.', 'under-construction-page') . '</p>';
|
| 1660 |
+
echo '</td></tr>';
|
| 1661 |
+
|
| 1662 |
+
echo '<tr valign="top">
|
| 1663 |
+
<th scope="row"><label for="social_twitter">' . esc_attr__('Twitter Profile', 'under-construction-page') . '</label></th>
|
| 1664 |
+
<td><input id="social_twitter" type="url" class="regular-text code" name="' . esc_attr(UCP_OPTIONS_KEY) . '[social_twitter]" value="' . esc_attr($options['social_twitter']) . '" placeholder="' . esc_attr__('Twitter profile URL', 'under-construction-page') . '">';
|
| 1665 |
+
echo '<p class="description">' . esc_attr__('Complete URL, with https prefix, to Twitter profile page.', 'under-construction-page') . '</p>';
|
| 1666 |
+
echo '</td></tr>';
|
| 1667 |
+
|
| 1668 |
+
echo '<tr valign="top">
|
| 1669 |
+
<th scope="row"><label for="social_linkedin">' . esc_attr__('LinkedIn Profile', 'under-construction-page') . '</label></th>
|
| 1670 |
+
<td><input id="social_linkedin" type="url" class="regular-text code" name="' . esc_attr(UCP_OPTIONS_KEY) . '[social_linkedin]" value="' . esc_attr($options['social_linkedin']) . '" placeholder="' . esc_attr__('LinkedIn profile page URL', 'under-construction-page') . '">';
|
| 1671 |
+
echo '<p class="description">' . esc_attr__('Complete URL, with https prefix, to LinkedIn profile page.', 'under-construction-page') . '</p>';
|
| 1672 |
+
echo '</td></tr>';
|
| 1673 |
+
|
| 1674 |
+
echo '<tr valign="top">
|
| 1675 |
+
<th scope="row"><label for="social_youtube">' . esc_attr__('YouTube Profile Page or Video', 'under-construction-page') . '</label></th>
|
| 1676 |
+
<td><input id="social_youtube" type="url" class="regular-text code" name="' . esc_attr(UCP_OPTIONS_KEY) . '[social_youtube]" value="' . esc_attr($options['social_youtube']) . '" placeholder="' . esc_attr__('YouTube page or video URL', 'under-construction-page') . '">';
|
| 1677 |
+
echo '<p class="description">' . esc_attr__('Complete URL, with https prefix, to YouTube page or video.', 'under-construction-page') . '</p>';
|
| 1678 |
+
echo '</td></tr>';
|
| 1679 |
+
|
| 1680 |
+
echo '<tr valign="top" class="hidden">
|
| 1681 |
+
<th scope="row"><label for="social_vimeo">' . esc_attr__('Vimeo Profile Page or Video', 'under-construction-page') . '</label></th>
|
| 1682 |
+
<td><input id="social_vimeo" type="url" class="regular-text code" name="' . esc_attr(UCP_OPTIONS_KEY) . '[social_vimeo]" value="' . esc_attr($options['social_vimeo']) . '" placeholder="' . esc_attr__('Vimeo page or video URL', 'under-construction-page') . '">';
|
| 1683 |
+
echo '<p class="description">' . esc_attr__('Complete URL, with https prefix, to Vimeo page or video.', 'under-construction-page') . '</p>';
|
| 1684 |
+
echo '</td></tr>';
|
| 1685 |
+
|
| 1686 |
+
echo '<tr valign="top" class="hidden">
|
| 1687 |
+
<th scope="row"><label for="social_pinterest">' . esc_attr__('Pinterest Profile', 'under-construction-page') . '</label></th>
|
| 1688 |
+
<td><input id="social_pinterest" type="url" class="regular-text code" name="' . esc_attr(UCP_OPTIONS_KEY) . '[social_pinterest]" value="' . esc_attr($options['social_pinterest']) . '" placeholder="' . esc_attr__('Pinterest profile URL', 'under-construction-page') . '">';
|
| 1689 |
+
echo '<p class="description">' . esc_attr__('Complete URL, with https prefix, to Pinterest profile.', 'under-construction-page') . '</p>';
|
| 1690 |
+
echo '</td></tr>';
|
| 1691 |
+
|
| 1692 |
+
echo '<tr valign="top" class="hidden">
|
| 1693 |
+
<th scope="row"><label for="social_dribbble">' . esc_attr__('Dribbble Profile', 'under-construction-page') . '</label></th>
|
| 1694 |
+
<td><input id="social_dribbble" type="url" class="regular-text code" name="' . esc_attr(UCP_OPTIONS_KEY) . '[social_dribbble]" value="' . esc_attr($options['social_dribbble']) . '" placeholder="' . esc_attr__('Dribbble profile URL', 'under-construction-page') . '">';
|
| 1695 |
+
echo '<p class="description">' . esc_attr__('Complete URL, with https prefix, to Dribbble profile.', 'under-construction-page') . '</p>';
|
| 1696 |
+
echo '</td></tr>';
|
| 1697 |
+
|
| 1698 |
+
echo '<tr valign="top" class="hidden">
|
| 1699 |
+
<th scope="row"><label for="social_behance">' . esc_attr__('Behance Profile', 'under-construction-page') . '</label></th>
|
| 1700 |
+
<td><input id="social_behance" type="url" class="regular-text code" name="' . esc_attr(UCP_OPTIONS_KEY) . '[social_behance]" value="' . esc_attr($options['social_behance']) . '" placeholder="' . esc_attr__('Behance profile URL', 'under-construction-page') . '">';
|
| 1701 |
+
echo '<p class="description">' . esc_attr__('Complete URL, with https prefix, to Behance profile.', 'under-construction-page') . '</p>';
|
| 1702 |
+
echo '</td></tr>';
|
| 1703 |
+
|
| 1704 |
+
echo '<tr valign="top" class="hidden">
|
| 1705 |
+
<th scope="row"><label for="social_instagram">' . esc_attr__('Instagram Profile', 'under-construction-page') . '</label></th>
|
| 1706 |
+
<td><input id="social_instagram" type="url" class="regular-text code" name="' . esc_attr(UCP_OPTIONS_KEY) . '[social_instagram]" value="' . esc_attr($options['social_instagram']) . '" placeholder="' . esc_attr__('Instagram profile URL', 'under-construction-page') . '">';
|
| 1707 |
+
echo '<p class="description">' . esc_attr__('Complete URL, with https prefix, to Instagram profile.', 'under-construction-page') . '</p>';
|
| 1708 |
+
echo '</td></tr>';
|
| 1709 |
+
|
| 1710 |
+
echo '<tr valign="top" class="hidden">
|
| 1711 |
+
<th scope="row"><label for="social_vk">' . esc_attr__('VK Profile', 'under-construction-page') . '</label></th>
|
| 1712 |
+
<td><input id="social_vk" type="url" class="regular-text code" name="' . esc_attr(UCP_OPTIONS_KEY) . '[social_vk]" value="' . esc_attr($options['social_vk']) . '" placeholder="' . esc_attr__('VK profile URL', 'under-construction-page') . '">';
|
| 1713 |
+
echo '<p class="description">' . esc_attr__('Complete URL, with https prefix, to VK profile.', 'under-construction-page') . '</p>';
|
| 1714 |
+
echo '</td></tr>';
|
| 1715 |
+
|
| 1716 |
+
echo '<tr valign="top" class="hidden">
|
| 1717 |
+
<th scope="row"><label for="social_telegram">' . esc_attr__('Telegram Group, Channel or Account', 'under-construction-page') . '</label></th>
|
| 1718 |
+
<td><input id="social_telegram" type="text" class="regular-text code" name="' . esc_attr(UCP_OPTIONS_KEY) . '[social_telegram]" value="' . esc_attr($options['social_telegram']) . '" placeholder="' . esc_attr__('Telegram group, channel or account URL', 'under-construction-page') . '">';
|
| 1719 |
+
echo '<p class="description">' . esc_attr__('Complete URL, with https prefix to Telegram group, channel or account.', 'under-construction-page') . '</p>';
|
| 1720 |
+
echo '</td></tr>';
|
| 1721 |
+
|
| 1722 |
+
echo '<tr valign="top" class="hidden">
|
| 1723 |
+
<th scope="row"><label for="social_skype">' . esc_attr__('Skype Username', 'under-construction-page') . '</label></th>
|
| 1724 |
+
<td><input id="social_skype" type="text" class="regular-text code" name="' . esc_attr(UCP_OPTIONS_KEY) . '[social_skype]" value="' . esc_attr($options['social_skype']) . '" placeholder="' . esc_attr__('Skype username or account name', 'under-construction-page') . '">';
|
| 1725 |
+
echo '<p class="description">' . esc_attr__('Skype username or account name.', 'under-construction-page') . '</p>';
|
| 1726 |
+
echo '</td></tr>';
|
| 1727 |
+
|
| 1728 |
+
echo '<tr valign="top" class="hidden">
|
| 1729 |
+
<th scope="row"><label for="social_whatsapp">' . esc_attr__('WhatsApp Phone Number', 'under-construction-page') . '</label></th>
|
| 1730 |
+
<td><input id="social_whatsapp" type="text" class="regular-text code" name="' . esc_attr(UCP_OPTIONS_KEY) . '[social_whatsapp]" value="' . esc_attr($options['social_whatsapp']) . '" placeholder="' . esc_attr__('123-456-789', 'under-construction-page') . '">';
|
| 1731 |
+
echo '<p class="description">' . esc_attr__('WhatsApp phone number in international format without + or 00 prefix.', 'under-construction-page') . '</p>';
|
| 1732 |
+
echo '</td></tr>';
|
| 1733 |
+
|
| 1734 |
+
echo '<tr valign="top" class="hidden">
|
| 1735 |
+
<th scope="row"><label for="social_email">' . esc_attr__('Email Address', 'under-construction-page') . '</label></th>
|
| 1736 |
+
<td><input id="social_email" type="email" class="regular-text code" name="' . esc_attr(UCP_OPTIONS_KEY) . '[social_email]" value="' . esc_attr($options['social_email']) . '" placeholder="' . esc_attr__('name@domain.com', 'under-construction-page') . '">';
|
| 1737 |
+
echo '<p class="description">' . esc_attr__('Email will be encoded on the page to protect it from email address harvesters.', 'under-construction-page') . '</p>';
|
| 1738 |
+
echo '</td></tr>';
|
| 1739 |
+
|
| 1740 |
+
echo '<tr valign="top" class="hidden">
|
| 1741 |
+
<th scope="row"><label for="social_phone">' . esc_attr__('Phone Number', 'under-construction-page') . '</label></th>
|
| 1742 |
+
<td><input id="social_phone" type="tel" class="regular-text" name="' . esc_attr(UCP_OPTIONS_KEY) . '[social_phone]" value="' . esc_attr($options['social_phone']) . '" placeholder="' . esc_attr__('+1-123-456-789', 'under-construction-page') . '">';
|
| 1743 |
+
echo '<p class="description">' . esc_attr__('Phone number in full international format.', 'under-construction-page') . '</p>';
|
| 1744 |
+
echo '</td></tr>';
|
| 1745 |
+
|
| 1746 |
+
echo '<tr><th colspan="2"><a id="show-social-icons" href="#" class="js-action">' . esc_attr__('Show more Social & Contact Icons', 'under-construction-page') . '</a></th></tr>';
|
| 1747 |
+
|
| 1748 |
+
echo '</table>';
|
| 1749 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1750 |
echo '</div>';
|
|
|
|
|
|
|
| 1751 |
|
| 1752 |
+
self::footer_buttons();
|
| 1753 |
+
} // tab_content
|
| 1754 |
+
|
| 1755 |
+
|
| 1756 |
+
static function get_themes()
|
| 1757 |
+
{
|
| 1758 |
+
$themes = array(
|
| 1759 |
+
'_pro_custom' => esc_attr__('Build Your Own Custom Theme', 'under-construction-page'),
|
| 1760 |
+
'mad_designer' => esc_attr__('Mad Designer', 'under-construction-page'),
|
| 1761 |
+
'_pro_simple-beige' => esc_attr__('Simple Beige Text', 'under-construction-page'),
|
| 1762 |
+
'plain_text' => esc_attr__('Plain Text', 'under-construction-page'),
|
| 1763 |
+
'_pro_simple-office-theme' => esc_attr__('Simple Office', 'under-construction-page'),
|
| 1764 |
+
'under_construction' => esc_attr__('Under Construction', 'under-construction-page'),
|
| 1765 |
+
'_pro_model-portfolio' => esc_attr__('Model Portfolio', 'under-construction-page'),
|
| 1766 |
+
'dark' => esc_attr__('Things Went Dark', 'under-construction-page'),
|
| 1767 |
+
'_pro_watch-company' => esc_attr__('The Watch Store', 'under-construction-page'),
|
| 1768 |
+
'forklift' => esc_attr__('Forklift at Work', 'under-construction-page'),
|
| 1769 |
+
'_pro_sport-shop' => esc_attr__('Sport Shop', 'under-construction-page'),
|
| 1770 |
+
'under_construction_text' => esc_attr__('Under Construction Text', 'under-construction-page'),
|
| 1771 |
+
'_pro_cloud-business-inc' => esc_attr__('Cloud Business', 'under-construction-page'),
|
| 1772 |
+
'cyber_chick' => esc_attr__('Cyber Chick', 'under-construction-page'),
|
| 1773 |
+
'_pro_photography' => esc_attr__('Photography', 'under-construction-page'),
|
| 1774 |
+
'rocket' => esc_attr__('Rocket Launch', 'under-construction-page'),
|
| 1775 |
+
'_pro_smoothie' => esc_attr__('Green Smoothie Webinar', 'under-construction-page'),
|
| 1776 |
+
'loader' => esc_attr__('Loader at Work', 'under-construction-page'),
|
| 1777 |
+
'_pro_stunning-nature' => esc_attr__('Stunning Nature', 'under-construction-page'),
|
| 1778 |
+
'cyber_chick_dark' => esc_attr__('Cyber Chick Dark', 'under-construction-page'),
|
| 1779 |
+
'_pro_small-office' => esc_attr__('Small Office', 'under-construction-page'),
|
| 1780 |
+
'safe' => esc_attr__('Safe', 'under-construction-page'),
|
| 1781 |
+
'people' => esc_attr__('People at Work', 'under-construction-page'),
|
| 1782 |
+
'_pro_custom' => esc_attr__('Build Your Own Custom Theme', 'under-construction-page'),
|
| 1783 |
+
'windmill' => esc_attr__('Windmill', 'under-construction-page'),
|
| 1784 |
+
'sad_site' => esc_attr__('Sad Site', 'under-construction-page'),
|
| 1785 |
+
'_pro-soothing-nature' => esc_attr__('Soothing Nature', 'under-construction-page'),
|
| 1786 |
+
'lighthouse' => esc_attr__('Lighthouse', 'under-construction-page'),
|
| 1787 |
+
'hot_air_baloon' => esc_attr__('Hot Air Balloon', 'under-construction-page'),
|
| 1788 |
+
'_pro_business-statistics' => esc_attr__('Business Statistics', 'under-construction-page'),
|
| 1789 |
+
'people_2' => esc_attr__('People at Work #2', 'under-construction-page'),
|
| 1790 |
+
'rocket_2' => esc_attr__('Rocket Launch #2', 'under-construction-page'),
|
| 1791 |
+
'_pro_travel-blog' => esc_attr__('Travel Blog', 'under-construction-page'),
|
| 1792 |
+
'light_bulb' => esc_attr__('Light Bulb', 'under-construction-page'),
|
| 1793 |
+
'ambulance' => esc_attr__('Ambulance', 'under-construction-page'),
|
| 1794 |
+
'_pro_forest-in-the-fog' => esc_attr__('Forest in the Fog', 'under-construction-page'),
|
| 1795 |
+
'laptop' => esc_attr__('Laptop', 'under-construction-page'),
|
| 1796 |
+
'puzzles' => esc_attr__('Puzzles', 'under-construction-page'),
|
| 1797 |
+
'_pro_sunset' => esc_attr__('Sunset', 'under-construction-page'),
|
| 1798 |
+
'iot' => esc_attr__('Internet of Things', 'under-construction-page'),
|
| 1799 |
+
'setup' => esc_attr__('Setup', 'under-construction-page'),
|
| 1800 |
+
'_pro_fitness-studio' => esc_attr__('Fitness Studio Landing Page', 'under-construction-page'),
|
| 1801 |
+
'stop' => esc_attr__('Stop', 'under-construction-page'),
|
| 1802 |
+
'clock' => esc_attr__('Clock', 'under-construction-page'),
|
| 1803 |
+
'_pro_mountain' => esc_attr__('Mountain Peak', 'under-construction-page'),
|
| 1804 |
+
'bulldozer' => esc_attr__('Bulldozer at Work', 'under-construction-page'),
|
| 1805 |
+
'christmas' => esc_attr__('Christmas Greetings', 'under-construction-page'),
|
| 1806 |
+
'_pro_pink-lips' => esc_attr__('Pink Lips', 'under-construction-page'),
|
| 1807 |
+
'hard_worker' => esc_attr__('Hard Worker', 'under-construction-page'),
|
| 1808 |
+
'closed' => esc_attr__('Temporarily Closed', 'under-construction-page'),
|
| 1809 |
+
'_pro_animated-green' => esc_attr__('Simple Green Animated', 'under-construction-page'),
|
| 1810 |
+
'dumper_truck' => esc_attr__('Dumper Truck', 'under-construction-page'),
|
| 1811 |
+
'000webhost' => esc_attr__('000webhost', 'under-construction-page'),
|
| 1812 |
+
'_pro_grayscale-city' => esc_attr__('Grayscale City', 'under-construction-page'),
|
| 1813 |
+
'work_desk' => esc_attr__('Work Desk', 'under-construction-page'),
|
| 1814 |
+
'research' => esc_attr__('Research', 'under-construction-page'),
|
| 1815 |
+
'_pro_wedding' => esc_attr__('Wedding', 'under-construction-page')
|
| 1816 |
+
);
|
| 1817 |
+
|
| 1818 |
+
$themes = apply_filters('ucp_themes', $themes);
|
| 1819 |
+
|
| 1820 |
+
return $themes;
|
| 1821 |
+
} // get_themes
|
| 1822 |
+
|
| 1823 |
+
|
| 1824 |
+
static function tab_design()
|
| 1825 |
+
{
|
| 1826 |
+
$options = self::get_options();
|
| 1827 |
+
|
| 1828 |
+
$img_path = UCP_PLUGIN_URL . 'images/thumbnails/';
|
| 1829 |
+
$themes = self::get_themes();
|
| 1830 |
+
|
| 1831 |
+
echo '<table class="form-table">';
|
| 1832 |
+
echo '<tr valign="top">
|
| 1833 |
+
<td colspan="2"><b style="margin-bottom: 10px; display: inline-block;">' . esc_attr__('Theme', 'under-construction-page') . '</b> (<a target="_blank" href="' . esc_url(self::generate_web_link('themes-browse-premium', 'templates')) . '">browse 300+ premium themes</a>)<br>';
|
| 1834 |
+
echo '<input type="hidden" id="theme_id" name="' . esc_attr(UCP_OPTIONS_KEY) . '[theme]" value="' . esc_attr($options['theme']) . '">';
|
| 1835 |
+
|
| 1836 |
+
foreach ($themes as $theme_id => $theme_name) {
|
| 1837 |
+
if ($theme_id === $options['theme']) {
|
| 1838 |
+
$class = ' active';
|
| 1839 |
+
} else {
|
| 1840 |
+
$class = '';
|
| 1841 |
+
}
|
| 1842 |
+
if (substr($theme_id, 0, 4) == '_pro') {
|
| 1843 |
+
$theme_id = substr($theme_id, 5);
|
| 1844 |
+
echo '<div class="ucp-thumb ucp-thumb-pro" data-theme-id="' . esc_attr($theme_id) . '"><img src="' . esc_attr($img_path) . 'pro/' . esc_attr($theme_id) . '.jpg" alt="' . esc_attr($theme_name) . '" title="' . esc_attr($theme_name) . '"><span>' . esc_attr($theme_name) . '</span>';
|
| 1845 |
+
echo '<div class="buttons"><a href="#" data-pro-ad="activate_' . esc_attr($theme_id) . '" class="open-ucp-upsell button button-primary">Activate</a> ';
|
| 1846 |
+
if ($theme_id != 'custom') {
|
| 1847 |
+
echo '<a href="https://templates.underconstructionpage.com/?ucp_template_preview&template=' . esc_attr($theme_id) . '&utm_source=ucp-free&utm_medium=plugin&utm_content=design-preview-' . esc_attr($theme_id) . '&utm_campaign=ucp-free-v' . esc_attr(self::$version) . '" class="button-secondary" target="_blank">Preview</a>';
|
| 1848 |
+
}
|
| 1849 |
+
echo '</div>';
|
| 1850 |
+
echo '<div title="PRO template" class="ribbon"><i><span class="dashicons dashicons-star-filled"></span></i></div></div>';
|
| 1851 |
+
} else {
|
| 1852 |
+
echo '<div class="ucp-thumb' . esc_attr($class) . '" data-theme-id="' . esc_attr($theme_id) . '"><img src="' . esc_attr($img_path . $theme_id) . '.png" alt="' . esc_attr($theme_name) . '" title="' . esc_attr($theme_name) . '"><span>' . esc_attr($theme_name) . '</span>';
|
| 1853 |
+
echo '<div class="buttons">';
|
| 1854 |
+
if ($theme_id !== $options['theme']) {
|
| 1855 |
+
echo '<a href="#" class="button button-primary activate-theme">Activate</a> ';
|
| 1856 |
+
}
|
| 1857 |
+
echo '<a href="' . esc_url(get_home_url()) . '/?ucp_preview&theme=' . esc_attr($theme_id) . '" class="button-secondary" target="_blank">Preview</a></div>';
|
| 1858 |
+
echo '</div>';
|
| 1859 |
+
}
|
| 1860 |
+
} // foreach
|
| 1861 |
|
| 1862 |
+
echo '</td></tr>';
|
| 1863 |
+
|
| 1864 |
+
echo '<tr valign="top">
|
| 1865 |
+
<th scope="row"><label for="custom_css">' . esc_attr__('Custom CSS', 'under-construction-page') . '</label></th>
|
| 1866 |
<td>';
|
| 1867 |
+
echo '<textarea data-autoresize="1" rows="3" id="custom_css" class="code large-text" name="' . esc_attr(UCP_OPTIONS_KEY) . '[custom_css]" placeholder=".selector { property-name: property-value; }">' . esc_textarea($options['custom_css']) . '</textarea>';
|
| 1868 |
+
echo '<p class="description"><style> tags will be added automatically. Do not include them in your code.<br>
|
| 1869 |
For RTL languages support add: <code>body { direction: rtl; }</code><br>If you need help with writing custom CSS code, post your question on the <a href="https://wordpress.org/support/plugin/under-construction-page/" target="_blank">official forum</a>.</p>';
|
| 1870 |
+
echo '</td></tr>';
|
| 1871 |
|
| 1872 |
+
echo '</table>';
|
| 1873 |
|
| 1874 |
+
self::footer_buttons();
|
| 1875 |
+
} // tab_design
|
| 1876 |
|
| 1877 |
|
| 1878 |
+
// markup & logic for access tab
|
| 1879 |
+
static function tab_access()
|
| 1880 |
+
{
|
| 1881 |
+
$options = self::get_options();
|
| 1882 |
+
$default_options = self::default_options();
|
| 1883 |
+
$roles = $users = array();
|
| 1884 |
|
| 1885 |
+
$tmp_roles = get_editable_roles();
|
| 1886 |
+
foreach ($tmp_roles as $tmp_role => $details) {
|
| 1887 |
+
$name = translate_user_role($details['name']);
|
| 1888 |
+
$roles[] = array('val' => $tmp_role, 'label' => $name);
|
| 1889 |
+
}
|
| 1890 |
|
| 1891 |
+
$tmp_users = get_users(array('fields' => array('id', 'display_name')));
|
| 1892 |
+
foreach ($tmp_users as $user) {
|
| 1893 |
+
$users[] = array('val' => $user->id, 'label' => $user->display_name);
|
| 1894 |
+
}
|
| 1895 |
|
| 1896 |
+
echo '<div class="ucp-tab-content">';
|
| 1897 |
+
echo '<table class="form-table">';
|
| 1898 |
|
| 1899 |
+
echo '<tr valign="top">
|
| 1900 |
+
<th scope="row"><label for="whitelisted_ips">' . esc_attr__('Whitelisted IP Addresses', 'under-construction-page') . '</label></th>
|
| 1901 |
<td>';
|
| 1902 |
+
echo '<div class="toggle-wrapper">
|
| 1903 |
<input type="checkbox" id="whitelisted_ips" type="checkbox" value="1" class="skip-save open-ucp-upsell">
|
| 1904 |
<label for="whitelisted_ips" class="toggle"><span class="toggle_handler"></span></label>
|
| 1905 |
</div>';
|
| 1906 |
+
echo '<p>Listed IP addresses (both IPv4 and IPv6 are supported) will not be affected by the under construction mode and their users will always see the "normal" site. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="whitelisted_ips">PRO feature</a>.';
|
| 1907 |
+
echo '<td></tr>';
|
| 1908 |
|
| 1909 |
+
echo '<tr valign="top">
|
| 1910 |
+
<th scope="row"><label for="access_links">' . esc_attr__('Secret Direct Access Links', 'under-construction-page') . '</label></th>
|
| 1911 |
<td>';
|
| 1912 |
+
echo '<div class="toggle-wrapper">
|
| 1913 |
<input type="checkbox" id="access_links" type="checkbox" value="1" class="skip-save open-ucp-upsell">
|
| 1914 |
<label for="access_links" class="toggle"><span class="toggle_handler"></span></label>
|
| 1915 |
</div>';
|
| 1916 |
+
echo '<p>The most flexible and user-friendly way (especially when working with clients) to give only selected visitors access to the "normal" site. Simply generate a new link, configure expiration options (time, number of visits or unique IPs) and share it with users to allow them access to the site. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="access_links">PRO feature</a>.';
|
| 1917 |
+
echo '<td></tr>';
|
| 1918 |
|
| 1919 |
+
echo '<tr valign="top" id="whitelisted-roles">
|
| 1920 |
+
<th scope="row">' . esc_attr__('Whitelisted User Roles', 'under-construction-page') . '</th>
|
| 1921 |
<td>';
|
| 1922 |
+
foreach ($roles as $tmp_role) {
|
| 1923 |
+
echo '<input name="' . esc_attr(UCP_OPTIONS_KEY) . '[whitelisted_roles][]" id="roles-' . esc_attr($tmp_role['val']) . '" ' . esc_attr(self::checked($tmp_role['val'], $options['whitelisted_roles'], false)) . ' value="' . esc_attr($tmp_role['val']) . '" type="checkbox" /> <label for="roles-' . esc_attr($tmp_role['val']) . '">' . esc_attr($tmp_role['label']) . '</label><br />';
|
| 1924 |
+
}
|
| 1925 |
+
echo '<p class="description">' . __('Selected user roles will <b>not</b> be affected by the under construction mode and will always see the "normal" site. Default: administrator.', 'under-construction-page') . '</p>';
|
| 1926 |
+
echo '</td></tr>';
|
| 1927 |
+
|
| 1928 |
+
echo '<tr valign="top">
|
| 1929 |
+
<th scope="row"><label for="whitelisted_users">' . esc_attr__('Whitelisted Users', 'under-construction-page') . '</label></th>
|
| 1930 |
+
<td><select id="whitelisted_users" class="select2" style="width: 50%; max-width: 300px;" name="' . esc_attr(UCP_OPTIONS_KEY) . '[whitelisted_users][]" multiple>';
|
| 1931 |
+
self::create_select_options($users, $options['whitelisted_users'], true);
|
| 1932 |
+
|
| 1933 |
+
echo '</select><p class="description">' . __('Selected users (when logged in) will <b>not</b> be affected by the under construction mode and will always see the "normal" site.', 'under-construction-page') . '</p>';
|
| 1934 |
+
echo '</td></tr>';
|
| 1935 |
+
|
| 1936 |
+
echo '<tr>';
|
| 1937 |
+
echo '<th><label for="url_rules">' . esc_attr__('URL Based Rules', 'under-construction-page') . '</label></th>';
|
| 1938 |
+
echo '<td><select class="skip-save open-ucp-upsell" id="url_rules">';
|
| 1939 |
+
echo '<option value="0">Disabled</option>';
|
| 1940 |
+
echo '<option class="ucp-promo" value="-1">Listed URLs will NEVER be affected by UCP</option>';
|
| 1941 |
+
echo '<option class="ucp-promo" value="-1">ONLY listed URLs CAN BE affected by UCP</option>';
|
| 1942 |
+
echo '</select>';
|
| 1943 |
+
echo '<p class="description">Use this option to set per URL rules and lock down the entire site except selected pages; or lock down just some pages and leave all others accessible to visitors. If second option is used all other access rules still apply. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="url_rules">PRO feature</a>.</p>';
|
| 1944 |
+
echo '</td>';
|
| 1945 |
+
echo '</tr>';
|
| 1946 |
+
|
| 1947 |
+
echo '<tr>
|
| 1948 |
+
<th scope="row"><label for="direct_access_password">' . esc_attr__('Direct Access Password', 'under-construction-page') . '</label></th>
|
| 1949 |
<td>';
|
| 1950 |
+
echo '<input id="direct_access_password" type="text" class="skip-save open-ucp-upsell" value="" placeholder="">';
|
| 1951 |
+
echo '<p class="description">Direct Access Password is the most user-friendly way (especially when working with clients) to give selected users access to the "normal" site. Choose a password, save changes, and send users this link: <a href="' . esc_url(get_home_url()) . '/#access-site-form">' . esc_url(get_home_url()) . '/#access-site-form</a> or enable the "Password Form Button" option to show the password form button. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="whitelisted_ips">PRO feature</a>.</p>';
|
| 1952 |
+
echo '</td></tr>';
|
| 1953 |
|
| 1954 |
+
echo '<tr valign="top">
|
| 1955 |
+
<th scope="row"><label for="site_password">' . esc_attr__('Password Protect Under Construction Page', 'under-construction-page') . '</label></th>
|
| 1956 |
<td>';
|
| 1957 |
+
echo '<div class="toggle-wrapper">
|
| 1958 |
<input type="checkbox" id="site_password" type="checkbox" value="1" class="skip-save open-ucp-upsell">
|
| 1959 |
<label for="site_password" class="toggle"><span class="toggle_handler"></span></label>
|
| 1960 |
</div>';
|
| 1961 |
+
echo '<p class="description">Protected the entire site with a password you choose. Only those with the password can view the under construction page. This is a <a href="#" class="open-ucp-upsell" data-pro-ad="whitelisted_ips">PRO feature</a>.</p>';
|
| 1962 |
+
echo '</td></tr>';
|
| 1963 |
|
| 1964 |
+
echo '</table>';
|
| 1965 |
+
echo '</div>';
|
| 1966 |
|
| 1967 |
+
self::footer_buttons();
|
| 1968 |
+
} // tab_access
|
| 1969 |
|
| 1970 |
|
| 1971 |
+
// support tab - FAQ and links
|
| 1972 |
+
static function tab_support()
|
| 1973 |
+
{
|
| 1974 |
+
$user = wp_get_current_user();
|
| 1975 |
+
$theme = wp_get_theme();
|
| 1976 |
+
$options = self::get_options();
|
| 1977 |
|
| 1978 |
+
echo '<div id="tabs_support" class="ui-tabs ucp-tabs-2nd-level">';
|
| 1979 |
+
echo '<ul>';
|
| 1980 |
+
echo '<li><a href="#tab_support_contact">' . esc_attr__('Contact Support', 'under-construction-page') . '</a></li>';
|
| 1981 |
+
echo '<li><a href="#tab_support_faq">' . esc_attr__('FAQ', 'under-construction-page') . '</a></li>';
|
| 1982 |
+
echo '</ul>';
|
| 1983 |
|
| 1984 |
+
echo '<div style="display: none;" id="tab_support_faq" class="ucp-tab-content">';
|
| 1985 |
|
| 1986 |
+
echo '<p><b>Do you have any documentation?</b><br>Yes, <a href="' . esc_url(self::generate_web_link('faq-documentation', 'documentation-free')) . '" target="_blank">detailed documentation</a> with how-to guides is available on the plugins\'s site.</p>';
|
| 1987 |
|
| 1988 |
+
echo '<p><b>Do you have a video to help me get started?</b><br>We sure do! <a href="https://www.youtube.com/watch?v=RN4XABhK7_w" target="_blank">Getting started with the UnderConstructionPage plugin</a>. If that doesn\'t help we also have an <a href="https://www.youtube.com/watch?v=K3DF-NP6Fog" target="_blank">in-depth video walktrough</a>. In case you\'re still uncertain about something don\'t hesitate to contact our friendly support.</p>';
|
| 1989 |
|
| 1990 |
+
echo '<p><b>UCP is disabled but Twitter and Facebook still show it as my site\'s preview/thumbnail when I post the URL</b><br>Twitter and Facebook have their own cache which has to be refreshed. You can either wait and the problem will resolve itself in about a day or you can manually refresh the cache.<br>For Facebook open the <a href="https://developers.facebook.com/tools/debug/" target="_blank">Debugger</a>, input the URL, click "Debug". Once the results who up click "Scrape Again" to fetch the latest version of the page.<br>For Twitter, open the <a href="https://cards-dev.twitter.com/validator" target="_blank">Card validator</a>, enter the URL and click "Preview card". Latest version of the site should appear.</p>';
|
| 1991 |
|
| 1992 |
+
echo '<p><b>How can I build a custom page or customize themes?</b><br>If you know how to code custom CSS a lot can be accomplished by using the <a class="change_tab" data-tab="1" href="#custom_css">custom CSS</a> option. A much faster and easier solution is to check out <a href="#" data-pro-ad="faq-custom-css" class="open-ucp-upsell">UCP PRO</a> with an easy-to-use drag&drop builder and dozens of pre-built themes.</p>';
|
| 1993 |
|
| 1994 |
+
echo '<p><b>How can I check if construction mode is really enabled on my site?</b><br>If the under construction status is green in the admin bar (the very top of the page, above this text), then it\'s enabled. But we made a tool specifically for these kinds of situations so you can double-check everything. <a href="' . esc_url(self::generate_web_link('faq-tester', 'under-construction-tester/', array('url' => get_home_url()))) . '" target="_blank">Run under construction mode tester</a>.</p>';
|
| 1995 |
|
| 1996 |
+
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>';
|
| 1997 |
|
| 1998 |
+
echo '<p><b>How can I log in / access WordPress admin after construction mode has been enabled?</b><br>Enable the <a class="change_tab" data-tab="2" href="#login_button_wrap">Login Button</a> option under Content, and a login link will be shown in the lower right corner of the under construction page.</p>';
|
| 1999 |
|
| 2000 |
+
echo '<p><b>How do I add my logo to the page?</b><br>Head over to <a class="change_tab" data-tab="2" href="#content_wrap">Content</a> and click "Add Media". Upload/select the logo, position it as you see fit and add other content.</p>';
|
| 2001 |
|
| 2002 |
+
echo '<p><b>I\'ve made changes to UCP, but they are not visible. What do I do?</b><br>Click "Save Changes" one more time. 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.</p>';
|
| 2003 |
|
| 2004 |
+
echo '<p><b>How can I get more designs? Where do I download them?</b><br>We update the plugin every 7-10 days and each update comes with at least one new theme/design. There is no other way of getting more designs nor a place to download them.</p>';
|
| 2005 |
|
| 2006 |
+
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>';
|
| 2007 |
|
| 2008 |
+
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>';
|
| 2009 |
|
| 2010 |
+
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>';
|
| 2011 |
|
| 2012 |
+
echo '</div>'; // faq
|
| 2013 |
|
| 2014 |
+
echo '<div style="display: none;" id="tab_support_contact" class="ucp-tab-content">';
|
| 2015 |
|
| 2016 |
+
echo '<div id="support-hero"><p>Our average response time is 1.5h! <b>85% of tickets are resolved within 1 hour!</b> No ticket is left unanswered. If something is not working, don\'t think twice;</p><p><a class="button button-primary" href="https://wordpress.org/support/plugin/under-construction-page/#new-post" target="_blank">OPEN A SUPPORT TICKET NOW</a></p></div>';
|
| 2017 |
|
| 2018 |
+
echo '<p class="description">Our support agents need this info to provide faster & better support. Please include the following data in your message;</p>';
|
| 2019 |
+
echo '<p>WordPress version: <code>' . get_bloginfo('version') . '</code><br>';
|
| 2020 |
+
echo 'UCP Version: <code>' . esc_attr(self::$version) . '</code><br>';
|
| 2021 |
+
echo 'PHP Version: <code>' . esc_attr(PHP_VERSION) . '</code><br>';
|
| 2022 |
+
echo 'Site URL: <code>' . esc_url(get_bloginfo('url')) . '</code><br>';
|
| 2023 |
+
echo 'WordPress URL: <code>' . esc_url(get_bloginfo('wpurl')) . '</code><br>';
|
| 2024 |
+
echo 'Theme: <code>' . esc_attr($theme->get('Name') . ' v' . $theme->get('Version')) . '</code>';
|
| 2025 |
+
echo '</p>';
|
| 2026 |
|
| 2027 |
+
echo '</div>'; // contact
|
| 2028 |
|
| 2029 |
+
echo '</div>'; // tabs
|
| 2030 |
+
} // tab_support
|
| 2031 |
|
| 2032 |
|
| 2033 |
+
// tab PRO
|
| 2034 |
+
static function tab_pro()
|
| 2035 |
+
{
|
| 2036 |
+
$options = self::get_options();
|
| 2037 |
|
| 2038 |
+
echo '<div class="ucp-tab-content">';
|
| 2039 |
+
echo '<h3 class="ucp-pro-logo"><a href="' . esc_url(self::generate_web_link('pro-tab-logo')) . '" target="_blank"><img src="' . esc_url(UCP_PLUGIN_URL) . 'images/ucp_pro_logo.png" alt="UnderConstructionPage PRO" title="UnderConstructionPage"></a></h3>';
|
| 2040 |
|
| 2041 |
+
if (UCP_license::is_activated()) {
|
| 2042 |
+
$plugin = plugin_basename(__FILE__);
|
| 2043 |
+
$update_url = wp_nonce_url(admin_url('update.php?action=upgrade-plugin&plugin=' . urlencode($plugin)), 'upgrade-plugin_' . $plugin);
|
| 2044 |
+
echo '<p style="text-align: center;"><a href="' . esc_url($update_url) . '" class="button button-primary button-large">Update UnderConstructionPage files to PRO</a><br><br></p>';
|
| 2045 |
+
} else {
|
| 2046 |
+
echo '<div id="ucp-earlybird"><span>Build <b>landing pages, coming soon pages, maintenance & under construction pages</b> faster & easier!</span>';
|
| 2047 |
+
if (self::is_promo_active() == 'welcome') {
|
| 2048 |
+
echo '<p class="textcenter"><a data-pro-ad="get_pro" href="#" class="button button-primary button-large open-ucp-upsell">Get <b>PRO</b> now with a LIMITED <b>welcoming discount</b>! Offer is valid for only <b class="ucp-countdown">59min 33sec</b>.</a></p>';
|
| 2049 |
+
} elseif (self::is_promo_active() == 'olduser') {
|
| 2050 |
+
echo '<p class="textcenter"><a data-pro-ad="get_pro" href="#" class="button button-primary button-large open-ucp-upsell">Get <b>PRO</b> now with a special <b>DISCOUNT for long-term users</b>!</a></p>';
|
| 2051 |
+
} else {
|
| 2052 |
+
echo '<p class="textcenter"><a data-pro-ad="get_pro" href="#" class="button button-primary button-large open-ucp-upsell">Get <b>PRO</b> now!</a></p>';
|
| 2053 |
+
}
|
| 2054 |
+
echo '</div>';
|
| 2055 |
+
}
|
| 2056 |
+
echo '</div>';
|
| 2057 |
|
| 2058 |
|
| 2059 |
+
echo '<div class="ucp-tab-content">';
|
| 2060 |
+
echo '<table class="form-table">';
|
| 2061 |
|
| 2062 |
+
echo '<tr valign="top">
|
| 2063 |
+
<th scope="row"><label for="license_key">' . esc_attr__('License Key', 'under-construction-page') . '</label></th>';
|
| 2064 |
+
echo '<td><input type="text" id="license_key" class="regular-text" name="' . esc_attr(UCP_OPTIONS_KEY) . '[license_key]" value="' . esc_attr($options['license_key']) . '" placeholder="12345-12345-12345-12345" />';
|
| 2065 |
+
echo '<p class="description">License key is located in the confirmation email you received after purchasing.<br>In case of any problems, please contact <a href="#" data-tab="4" class="change_tab">support</a>. If you don\'t have a PRO license key - <a data-pro-ad="get_key" href="#" class="open-ucp-upsell">get it now</a>.</p>';
|
| 2066 |
+
echo '</td></tr>';
|
| 2067 |
|
| 2068 |
+
if (!empty($options['license_key'])) {
|
| 2069 |
+
if (UCP_license::is_activated()) {
|
| 2070 |
+
if ($options['license_expires'] == '2035-01-01') {
|
| 2071 |
+
$valid = 'indefinitely';
|
| 2072 |
+
} else {
|
| 2073 |
+
$valid = 'until ' . date('F jS, Y', strtotime($options['license_expires']));
|
| 2074 |
+
if (date('Y-m-d') == $options['license_expires']) {
|
| 2075 |
+
$valid .= '; expires today';
|
| 2076 |
+
} elseif (date('Y-m-d', time() + 30 * DAY_IN_SECONDS) > $options['license_expires']) {
|
| 2077 |
+
$tmp = (strtotime($options['license_expires'] . date(' G:i:s')) - time()) / DAY_IN_SECONDS;
|
| 2078 |
+
$valid .= '; expires in ' . round($tmp) . ' days';
|
| 2079 |
+
}
|
| 2080 |
+
}
|
| 2081 |
+
echo '<tr>
|
| 2082 |
+
<th scope="row"><label for="">' . esc_attr__('License Status', 'under-construction-page') . '</label></th>
|
| 2083 |
<td><b style="color: #66b317;">Active</b><br>
|
| 2084 |
+
Type: ' . esc_attr(str_replace('pro', 'PRO', $options['license_type']));
|
| 2085 |
+
echo '<br>Valid ' . esc_attr($valid) . '</td>
|
| 2086 |
</tr>';
|
| 2087 |
+
} else {
|
| 2088 |
+
echo '<tr>
|
| 2089 |
+
<th scope="row"><label for="">' . esc_attr__('License Status', 'under-construction-page') . '</label></th>
|
| 2090 |
<td><b style="color: #ea1919;">Inactive</b>';
|
| 2091 |
+
if (!empty($options['license_type'])) {
|
| 2092 |
+
echo '<br>Type: ' . esc_attr($options['license_type']);
|
| 2093 |
+
}
|
| 2094 |
+
if (!empty($options['license_expires']) && $options['license_expires'] != '1900-01-01' && $options['license_expires'] != '1970-01-01') {
|
| 2095 |
+
echo '<br>Expired on ' . esc_attr(date('F jS, Y', strtotime($options['license_expires'])));
|
| 2096 |
+
}
|
| 2097 |
+
echo '</td></tr>';
|
| 2098 |
+
}
|
| 2099 |
}
|
| 2100 |
+
|
| 2101 |
+
echo '</table>';
|
| 2102 |
+
echo '</div>';
|
| 2103 |
+
|
| 2104 |
+
echo '<p class="submit">';
|
| 2105 |
+
self::wp_kses_wf(get_submit_button(esc_attr__('Save & Validate License Key', 'under-construction-page'), 'large secondary', 'license-submit', false));
|
| 2106 |
+
echo '<br><br><small><i>By attempting to activate a license you agree to share the following data with <a href="https://www.webfactoryltd.com/" target="_blank">WebFactory Ltd</a>: license key, site URL, site title, site WP version, and UnderConstructionPage (free) version.</i></small>';
|
| 2107 |
+
echo '</p>';
|
| 2108 |
+
} // tab_pro
|
| 2109 |
+
|
| 2110 |
+
|
| 2111 |
+
// output the whole options page
|
| 2112 |
+
static function main_page()
|
| 2113 |
+
{
|
| 2114 |
+
if (!current_user_can('manage_options')) {
|
| 2115 |
+
wp_die('You do not have sufficient permissions to access this page.');
|
| 2116 |
}
|
|
|
|
|
|
|
|
|
|
| 2117 |
|
| 2118 |
+
echo '<div class="wrap">
|
| 2119 |
+
<h1 class="ucp-logo"><a href="' . esc_url(admin_url('options-general.php?page=ucp')) . '"><img src="' . esc_url(UCP_PLUGIN_URL) . 'images/ucp_logo.png" class="rotate" alt="UnderConstructionPage" title="UnderConstructionPage"><img src="' . esc_url(UCP_PLUGIN_URL) . 'images/ucp_logo_2.png" class="ucp-logo-text" alt="UnderConstructionPage" title="UnderConstructionPage"></a></h1>';
|
| 2120 |
|
| 2121 |
+
echo '<form action="options.php" method="post" id="ucp_form">';
|
| 2122 |
+
settings_fields(UCP_OPTIONS_KEY);
|
|
|
|
|
|
|
|
|
|
| 2123 |
|
| 2124 |
+
$tabs = array();
|
| 2125 |
+
$tabs[] = array('id' => 'ucp_main', 'icon' => 'dashicons-admin-settings', 'class' => '', 'label' => __('Main', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_main'));
|
| 2126 |
+
$tabs[] = array('id' => 'ucp_design', 'icon' => 'dashicons-admin-customizer', 'class' => '', 'label' => esc_attr__('Design', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_design'));
|
| 2127 |
+
$tabs[] = array('id' => 'ucp_content', 'icon' => 'dashicons-format-aside', 'class' => '', 'label' => esc_attr__('Content', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_content'));
|
| 2128 |
+
$tabs[] = array('id' => 'ucp_access', 'icon' => 'dashicons-shield', 'class' => '', 'label' => esc_attr__('Access', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_access'));
|
| 2129 |
+
$tabs[] = array('id' => 'ucp_support', 'icon' => 'dashicons-sos', 'class' => '', 'label' => esc_attr__('Support', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_support'));
|
| 2130 |
+
$tabs[] = array('id' => 'ucp_pro', 'icon' => 'dashicons-star-filled', 'class' => '', 'label' => esc_attr__('PRO', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_pro'));
|
| 2131 |
|
| 2132 |
+
$tabs = apply_filters('ucp_tabs', $tabs);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2133 |
|
| 2134 |
+
echo '<div id="ucp_tabs" class="ui-tabs" style="display: none;">';
|
| 2135 |
+
echo '<ul class="ucp-main-tab">';
|
| 2136 |
+
foreach ($tabs as $tab) {
|
| 2137 |
+
if (!empty($tab['label'])) {
|
| 2138 |
+
echo '<li><a href="#' . esc_attr($tab['id']) . '" class="' . esc_attr($tab['class']) . '"><span class="icon"><span class="dashicons ' . esc_attr($tab['icon']) . '"></span></span><span class="label">' . esc_attr($tab['label']) . '</span></a></li>';
|
| 2139 |
+
}
|
| 2140 |
+
}
|
| 2141 |
+
echo '</ul>';
|
| 2142 |
+
|
| 2143 |
+
foreach ($tabs as $tab) {
|
| 2144 |
+
if (is_callable($tab['callback'])) {
|
| 2145 |
+
echo '<div style="display: none;" id="' . esc_attr($tab['id']) . '">';
|
| 2146 |
+
call_user_func($tab['callback']);
|
| 2147 |
+
echo '</div>';
|
| 2148 |
+
}
|
| 2149 |
+
} // foreach
|
| 2150 |
+
echo '</div>'; // ucp_tabs
|
| 2151 |
+
|
| 2152 |
+
echo '</form>'; // ucp_tabs
|
| 2153 |
+
|
| 2154 |
+
if (!defined('WPFSSL_OPTIONS_KEY')) {
|
| 2155 |
+
echo '<div id="wpfssl-ad">';
|
| 2156 |
+
echo '<h3 class="textcenter"><b>Problems with SSL certificate?<br>Moving a site from HTTP to HTTPS?<br>Mixed content giving you troubles?</b><br><br><u>Fix all SSL problems with one plugin!</u></h3>';
|
| 2157 |
+
echo '<p class="textcenter"><a href="#" class="textcenter install-wpfssl"><img style="max-width: 90%;" src="' . esc_url(UCP_PLUGIN_URL) . '/images/wp-force-ssl-logo.png" alt="WP Force SSL" title="WP Force SSL"></a></p>';
|
| 2158 |
+
echo '<p class="textcenter"><br><a href="#" class="install-wpfssl button button-primary">Install & activate the free WP Force SSL plugin</a></p><p><a href="https://wordpress.org/plugins/wp-force-ssl/" target="_blank">WP Force SSL</a> is a free WP plugin maintained by the same team as this Maintenance plugin. It has <b>+150,000 users, 5-star rating</b>, and is hosted on the official WP repository.</p>';
|
| 2159 |
+
echo '</div>';
|
| 2160 |
+
}
|
| 2161 |
|
| 2162 |
+
echo '</div>'; // wrap
|
| 2163 |
+
|
| 2164 |
+
// weglot install dialog
|
| 2165 |
+
echo '<div id="weglot-upsell-dialog" style="display: none;" title="Weglot"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
|
| 2166 |
+
echo '<div style="padding: 20px; font-size: 15px;">';
|
| 2167 |
+
echo '<ul class="ucp-list">';
|
| 2168 |
+
echo '<li>Best-rated WordPress multilingual plugin</li>';
|
| 2169 |
+
echo '<li>Simple 5-minute set-up. No coding required</li>';
|
| 2170 |
+
echo '<li>Accelerated translation management: Machine & human translations with access to professional translators</li>';
|
| 2171 |
+
echo '<li>Compatible with any WordPress theme or plugin</li>';
|
| 2172 |
+
echo '<li>Optimized for multilingual SEO</li>';
|
| 2173 |
+
echo '<li>10-day Free trial and free plan available</li>';
|
| 2174 |
+
echo '</ul>';
|
| 2175 |
+
echo '<p class="upsell-footer"><a class="button button-primary" id="install-weglot">Install & activate Weglot to make your website multilingual</a></p>';
|
| 2176 |
+
echo '</div>';
|
| 2177 |
+
echo '</div>';
|
| 2178 |
+
// weglot install dialog
|
| 2179 |
+
|
| 2180 |
+
$promo = self::is_promo_active();
|
| 2181 |
+
if ($promo == 'welcome') {
|
| 2182 |
+
$header = 'A <b>welcoming discount</b> has been applied to selected packages! It\'s <b>time limited</b> and available for only another <b class="ucp-countdown">59min 30sec</b>.';
|
| 2183 |
+
$products['agency'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'agency-lifetime-welcome', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW <u>$51 OFF</u><br><del>$250</del> $199<br><small>Discount ends in <b class="ucp-countdown">59min 30sec</b></small>');
|
| 2184 |
+
$products['pro-lifetime'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'pro-lifetime-welcome', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW <u>20% OFF</u><br><del>$69</del> $55<br><small>Discount ends in <b class="ucp-countdown">59min 30sec</b></small>');
|
| 2185 |
+
$products['pro-yearly'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'pro-monthly', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW<br>$8.99<small>/month</small>');
|
| 2186 |
+
} elseif ($promo == 'olduser') {
|
| 2187 |
+
$header = 'A special <b>discount for long-term users</b> has been applied to selected packages!';
|
| 2188 |
+
$products['agency'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'agency-lifetime-olduser', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW <u>$51 OFF</u><br><del>$250</del> $199');
|
| 2189 |
+
$products['pro-lifetime'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'pro-lifetime-olduser', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW <u>20% OFF</u><br><del>$69</del> $55');
|
| 2190 |
+
$products['pro-yearly'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'pro-monthly', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW<br>$8.99<small>/month</small>');
|
| 2191 |
+
} else {
|
| 2192 |
+
$header = '';
|
| 2193 |
+
$products['agency'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'agency-lifetime', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW<br>$250');
|
| 2194 |
+
$products['pro-lifetime'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'pro-lifetime', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW<br>$69');
|
| 2195 |
+
$products['pro-yearly'] = array('link' => self::generate_web_link('pricing-table', 'buy/', array('p' => 'pro-monthly', 'r' => 'UCP v' . self::$version)), 'price' => 'BUY NOW<br>$8.99<small>/month</small>');
|
| 2196 |
+
}
|
| 2197 |
|
| 2198 |
+
// upsell dialog
|
| 2199 |
+
echo '<div id="upsell-dialog" style="display: none;" title="UnderConstructionPage PRO"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
|
| 2200 |
+
echo '<div id="tabs_upsell" class="ui-tabs ucp-tabs-2nd-level">';
|
| 2201 |
+
echo '<ul>';
|
| 2202 |
+
echo '<li><a href="#tab-upsell-buy">' . esc_attr__('Get PRO', 'under-construction-page') . '</a></li>';
|
| 2203 |
+
echo '<li><a href="#tab-upsell-features">' . esc_attr__('Features', 'under-construction-page') . '</a></li>';
|
| 2204 |
+
echo '</ul>';
|
| 2205 |
+
|
| 2206 |
+
echo '<div class="upsell-tab" id="tab-upsell-features" style="display: none;">';
|
| 2207 |
+
echo '<div class="ucp-pro-feature">';
|
| 2208 |
+
echo '<span>Frictionless Drag & Drop Builder</span>';
|
| 2209 |
+
echo '<p>Forget about complicated, cumbersome builders that have too many options! UCP builder was purpose-built for the task at hand. Simple, user-friendly & has only the options you need to build pages fast!</p>';
|
| 2210 |
+
echo '</div>';
|
| 2211 |
|
| 2212 |
+
echo '<div class="ucp-pro-feature">';
|
| 2213 |
+
echo '<span>2.5+ Million HD Searchable Images</span>';
|
| 2214 |
+
echo '<p>There\'s nothing worse than googling for hours just to find that the perfect image you need is either copyrighted or too small. Enjoy a vast library of 4K+ sized images - categorized & copyright free!</p>';
|
| 2215 |
+
echo '</div>';
|
| 2216 |
|
| 2217 |
+
echo '<div class="ucp-pro-feature">';
|
| 2218 |
+
echo '<span>220+ Templates</span>';
|
| 2219 |
+
echo '<p>Building your own page from scratch is fun, but often you don\'t have time to do it! Use one of our purpose-built templates, change a few lines of text and you\'re ready to rock!</p>';
|
| 2220 |
+
echo '</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2221 |
|
| 2222 |
+
echo '<div class="ucp-pro-feature">';
|
| 2223 |
+
echo '<span>Affiliate & Traffic Tracking</span>';
|
| 2224 |
+
echo '<p>Having traffic is nice. Having targeted traffic is better! Generate tracked inbound links & share them on social media or with your affiliates to pinpoint the best traffic sources.</p>';
|
|
|
|
| 2225 |
echo '</div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2226 |
|
| 2227 |
+
echo '<div class="ucp-pro-feature">';
|
| 2228 |
+
echo '<span>Unlimited 3rd Party Integrations</span>';
|
| 2229 |
+
echo '<p>With our unique universal autoresponder support, you can integrate any email autoresponder or webinar system in a page within seconds. Or push data to Zapier to more than 1,000 applications.</p>';
|
| 2230 |
+
echo '</div>';
|
| 2231 |
+
|
| 2232 |
+
echo '<div class="ucp-pro-feature">';
|
| 2233 |
+
echo '<span>Made for Agencies & Webmasters</span>';
|
| 2234 |
+
echo '<p>Creating sites for others? We have your back! Our features, support & licensing options are optimised for agencies while in-house, USA based support guarantee your peace of mind.</p>';
|
| 2235 |
+
echo '</div>';
|
| 2236 |
+
|
| 2237 |
+
echo '<p class="upsell-footer">For a complete list of features, demos and screenshots visit <a href="' . esc_url(self::generate_web_link('features-more-info')) . '" target="_blank">underconstructionpage.com</a>. Already have a PRO license? <a href="#" class="go-to-license-key">Activate it</a>.</p>';
|
| 2238 |
+
|
| 2239 |
+
echo '</div>'; // features tab
|
| 2240 |
+
echo '<div class="upsell-tab" id="tab-upsell-buy" style="display: none;">';
|
| 2241 |
+
if (!empty($header)) {
|
| 2242 |
+
echo '<div class="upsell-header">';
|
| 2243 |
+
self::wp_kses_wf($header);
|
| 2244 |
+
echo '</div>';
|
| 2245 |
+
}
|
| 2246 |
+
echo '<table id="ucp-pricing-table">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2247 |
<tbody>
|
| 2248 |
<tr>
|
| 2249 |
<td>
|
| 2277 |
<td>1 Month/Year of Support & Updates</td>
|
| 2278 |
</tr>
|
| 2279 |
<tr style="display: none;">
|
| 2280 |
+
<td>3.5 Million+ Hi-Res Images</td>
|
| 2281 |
+
<td>3.5 Million+ Hi-Res Images</td>
|
| 2282 |
+
<td>3.5 Million+ Hi-Res Images</td>
|
| 2283 |
</tr>
|
| 2284 |
<tr>
|
| 2285 |
<td>Drag&Drop Builder</td>
|
| 2287 |
<td>Drag&Drop Builder</td>
|
| 2288 |
</tr>
|
| 2289 |
<tr>
|
| 2290 |
+
<td>140+ PRO Templates</td>
|
| 2291 |
+
<td>140+ PRO Templates</td>
|
| 2292 |
+
<td>140+ PRO Templates</td>
|
| 2293 |
</tr>
|
| 2294 |
<tr>
|
| 2295 |
+
<td>130+ Agency Templates</td>
|
| 2296 |
<td><span class="dashicons dashicons-no"></td>
|
| 2297 |
<td><span class="dashicons dashicons-no"></td>
|
| 2298 |
</tr>
|
| 2303 |
</tr>
|
| 2304 |
<tr class="bb0">
|
| 2305 |
<td>
|
| 2306 |
+
<a data-href-org="' . esc_url($products['agency']['link']) . '" class="promo-button go-to-license-key" href="' . esc_url($products['agency']['link']) . '" target="_blank">';
|
| 2307 |
+
self::wp_kses_wf($products['agency']['price']);
|
| 2308 |
+
echo '</a>
|
| 2309 |
</td>
|
| 2310 |
<td>
|
| 2311 |
+
<a data-href-org="' . esc_url($products['pro-lifetime']['link']) . '" class="promo-button go-to-license-key" href="' . esc_url($products['pro-lifetime']['link']) . '" target="_blank">';
|
| 2312 |
+
self::wp_kses_wf($products['pro-lifetime']['price']);
|
| 2313 |
+
echo '</a>
|
| 2314 |
</td>
|
| 2315 |
<td>
|
| 2316 |
+
<a data-href-org="' . esc_url($products['pro-yearly']['link']) . '" class="promo-button go-to-license-key" href="' . esc_url($products['pro-yearly']['link']) . '" target="_blank">';
|
| 2317 |
+
self::wp_kses_wf($products['pro-yearly']['price']);
|
| 2318 |
+
echo '</a>
|
| 2319 |
</td>
|
| 2320 |
</tr>
|
| 2321 |
<tr class="bb0">
|
| 2322 |
+
<td colspan="3"><span class="instant-download"><span class="dashicons dashicons-yes"></span> Secure payment <span class="dashicons dashicons-yes"></span> Instant activation from WP admin <span class="dashicons dashicons-yes"></span> 100% No-Risk 7 Day Money Back Guarantee</span></td>
|
| 2323 |
</tr>
|
| 2324 |
</tbody>
|
| 2325 |
</table>';
|
| 2326 |
+
echo '<p class="upsell-footer">More pricing options & details about packages are available on <a href="' . esc_url(self::generate_web_link('pricing-table-more-info')) . '" target="_blank">underconstructionpage.com</a>. Already have a PRO license? <a href="#" class="go-to-license-key">Activate it</a>.</p>';
|
| 2327 |
+
echo '</div>'; // pricing tab
|
| 2328 |
+
echo '</div>';
|
| 2329 |
|
| 2330 |
+
echo '</div>'; // upsell-dialog
|
| 2331 |
+
} // main_page
|
| 2332 |
|
| 2333 |
|
| 2334 |
+
// tests if any of the promotions are active and if so returns the name
|
| 2335 |
+
static function is_promo_active()
|
| 2336 |
+
{
|
| 2337 |
+
$meta = self::get_meta();
|
| 2338 |
|
| 2339 |
+
if ((time() - $meta['first_install']) < HOUR_IN_SECONDS) {
|
| 2340 |
+
return 'welcome';
|
| 2341 |
+
}
|
| 2342 |
|
| 2343 |
+
if ((time() - $meta['first_install']) > DAY_IN_SECONDS * 35) {
|
| 2344 |
+
return 'olduser';
|
| 2345 |
+
}
|
| 2346 |
|
| 2347 |
+
return false;
|
| 2348 |
+
} // is_promo_active
|
| 2349 |
|
| 2350 |
|
| 2351 |
+
// save and preview buttons
|
| 2352 |
+
static function footer_buttons()
|
| 2353 |
+
{
|
| 2354 |
+
echo '<p class="submit">';
|
| 2355 |
+
self::wp_kses_wf(get_submit_button(esc_attr__('Save Changes', 'under-construction-page'), 'primary large', 'submit', false));
|
| 2356 |
+
echo ' <a id="ucp_preview" href="' . esc_url(get_home_url()) . '/?ucp_preview" class="button button-large button-secondary" target="_blank">' . esc_attr__('Preview', 'under-construction-page') . '</a>';
|
| 2357 |
+
echo '</p>';
|
| 2358 |
+
} // footer_buttons
|
| 2359 |
|
| 2360 |
|
| 2361 |
+
// reset all pointers to default state - visible
|
| 2362 |
+
static function reset_pointers()
|
| 2363 |
+
{
|
| 2364 |
+
$pointers = array();
|
| 2365 |
|
| 2366 |
+
$pointers['welcome'] = array('target' => '#menu-settings', 'edge' => 'left', 'align' => 'right', 'content' => 'Thank you for installing the <b style="font-weight: 800; font-variant: small-caps;">UnderConstructionPage</b> plugin! Please open <a href="' . admin_url('options-general.php?page=ucp') . '">Settings - UnderConstruction</a> to create a beautiful under construction page.');
|
| 2367 |
+
$pointers['getting_started'] = array('target' => '.ucp-main-tab li:nth-child(2)', 'edge' => 'top', 'align' => 'left', 'content' => 'Watch the short <a href="https://www.youtube.com/watch?v=RN4XABhK7_w" target="_blank">getting started video</a> to get you up to speed with UCP in no time. If that doesn\'t answer your questions watch the longer <a href="https://www.youtube.com/watch?v=K3DF-NP6Fog" target="_blank">in-depth video walktrough</a>.<br>If you need the videos later, links are in the <a href="#" class="change_tab" data-tab="4">FAQ</a>.');
|
| 2368 |
|
| 2369 |
+
update_option(UCP_POINTERS_KEY, $pointers);
|
| 2370 |
+
} // reset_pointers
|
| 2371 |
|
| 2372 |
|
| 2373 |
+
// auto download / install / activate Weglot plugin
|
| 2374 |
+
static function install_weglot()
|
| 2375 |
+
{
|
| 2376 |
+
if (false === current_user_can('administrator')) {
|
| 2377 |
+
wp_die('Sorry, you have to be an admin to run this action.');
|
| 2378 |
+
}
|
| 2379 |
|
| 2380 |
+
$plugin_slug = 'weglot/weglot.php';
|
| 2381 |
+
$plugin_zip = 'https://downloads.wordpress.org/plugin/weglot.latest-stable.zip';
|
| 2382 |
|
| 2383 |
+
@include_once ABSPATH . 'wp-admin/includes/plugin.php';
|
| 2384 |
+
@include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
| 2385 |
+
@include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
|
| 2386 |
+
@include_once ABSPATH . 'wp-admin/includes/file.php';
|
| 2387 |
+
@include_once ABSPATH . 'wp-admin/includes/misc.php';
|
| 2388 |
+
echo '<style>
|
| 2389 |
body{
|
| 2390 |
font-family: sans-serif;
|
| 2391 |
font-size: 14px;
|
| 2394 |
}
|
| 2395 |
</style>';
|
| 2396 |
|
| 2397 |
+
echo '<div style="margin: 20px; color:#444;">';
|
| 2398 |
+
echo 'If things are not done in a minute <a target="_parent" href="' . admin_url('plugin-install.php?s=weglot&tab=search&type=term') . '">install the plugin manually via Plugins page</a><br><br>';
|
| 2399 |
+
echo 'Starting ...<br><br>';
|
| 2400 |
+
|
| 2401 |
+
wp_cache_flush();
|
| 2402 |
+
$upgrader = new Plugin_Upgrader();
|
| 2403 |
+
echo 'Check if Weglot is already installed ... <br />';
|
| 2404 |
+
if (self::is_plugin_installed($plugin_slug)) {
|
| 2405 |
+
echo 'Weglot is already installed! <br /><br />Making sure it\'s the latest version.<br />';
|
| 2406 |
+
$upgrader->upgrade($plugin_slug);
|
| 2407 |
+
$installed = true;
|
| 2408 |
+
} else {
|
| 2409 |
+
echo 'Installing Weglot.<br />';
|
| 2410 |
+
$installed = $upgrader->install($plugin_zip);
|
| 2411 |
+
}
|
| 2412 |
+
wp_cache_flush();
|
| 2413 |
|
| 2414 |
+
if (!is_wp_error($installed) && $installed) {
|
| 2415 |
+
echo 'Activating Weglot.<br />';
|
| 2416 |
+
$activate = activate_plugin($plugin_slug);
|
| 2417 |
|
| 2418 |
+
if (is_null($activate)) {
|
| 2419 |
+
echo 'Weglot Activated.<br />';
|
| 2420 |
|
| 2421 |
+
echo '<script>setTimeout(function() { top.location = "options-general.php?page=ucp"; }, 1000);</script>';
|
| 2422 |
+
echo '<br>If you are not redirected in a few seconds - <a href="options-general.php?page=ucp" target="_parent">click here</a>.';
|
| 2423 |
+
}
|
| 2424 |
+
} else {
|
| 2425 |
+
echo 'Could not install Weglot. You\'ll have to <a target="_parent" href="' . admin_url('plugin-install.php?s=weglot&tab=search&type=term') . '">download and install manually</a>.';
|
| 2426 |
+
}
|
| 2427 |
+
|
| 2428 |
+
echo '</div>';
|
| 2429 |
+
} // install_weglot
|
| 2430 |
|
|
|
|
|
|
|
| 2431 |
|
| 2432 |
+
// auto download / install / activate WP Force SSL plugin
|
| 2433 |
+
static function install_wpfssl()
|
| 2434 |
+
{
|
| 2435 |
+
check_ajax_referer('install_wpfssl');
|
| 2436 |
|
| 2437 |
+
if (false === current_user_can('administrator')) {
|
| 2438 |
+
wp_die('Sorry, you have to be an admin to run this action.');
|
| 2439 |
+
}
|
|
|
|
|
|
|
| 2440 |
|
| 2441 |
+
$plugin_slug = 'wp-force-ssl/wp-force-ssl.php';
|
| 2442 |
+
$plugin_zip = 'https://downloads.wordpress.org/plugin/wp-force-ssl.latest-stable.zip';
|
| 2443 |
+
|
| 2444 |
+
@include_once ABSPATH . 'wp-admin/includes/plugin.php';
|
| 2445 |
+
@include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
|
| 2446 |
+
@include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
|
| 2447 |
+
@include_once ABSPATH . 'wp-admin/includes/file.php';
|
| 2448 |
+
@include_once ABSPATH . 'wp-admin/includes/misc.php';
|
| 2449 |
+
echo '<style>
|
| 2450 |
+
body{
|
| 2451 |
+
font-family: sans-serif;
|
| 2452 |
+
font-size: 14px;
|
| 2453 |
+
line-height: 1.5;
|
| 2454 |
+
color: #444;
|
| 2455 |
}
|
| 2456 |
+
</style>';
|
| 2457 |
|
| 2458 |
+
echo '<div style="margin: 20px; color:#444;">';
|
| 2459 |
+
echo 'If things are not done in a minute <a target="_parent" href="' . admin_url('plugin-install.php?s=force%20ssl%20webfactory&tab=search&type=term') . '">install the plugin manually via Plugins page</a><br><br>';
|
| 2460 |
+
echo 'Starting ...<br><br>';
|
| 2461 |
+
|
| 2462 |
+
wp_cache_flush();
|
| 2463 |
+
$upgrader = new Plugin_Upgrader();
|
| 2464 |
+
echo 'Check if WP Force SSL is already installed ... <br />';
|
| 2465 |
+
if (self::is_plugin_installed($plugin_slug)) {
|
| 2466 |
+
echo 'WP Force SSL is already installed! <br /><br />Making sure it\'s the latest version.<br />';
|
| 2467 |
+
$upgrader->upgrade($plugin_slug);
|
| 2468 |
+
$installed = true;
|
| 2469 |
+
} else {
|
| 2470 |
+
echo 'Installing WP Force SSL.<br />';
|
| 2471 |
+
$installed = $upgrader->install($plugin_zip);
|
| 2472 |
+
}
|
| 2473 |
+
wp_cache_flush();
|
| 2474 |
|
| 2475 |
+
if (!is_wp_error($installed) && $installed) {
|
| 2476 |
+
echo 'Activating WP Force SSL.<br />';
|
| 2477 |
+
$activate = activate_plugin($plugin_slug);
|
|
|
|
|
|
|
| 2478 |
|
| 2479 |
+
if (is_null($activate)) {
|
| 2480 |
+
echo 'WP Force SSL Activated.<br />';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2481 |
|
| 2482 |
+
echo '<script>setTimeout(function() { top.location = "options-general.php?page=ucp"; }, 1000);</script>';
|
| 2483 |
+
echo '<br>If you are not redirected in a few seconds - <a href="options-general.php?page=ucp" target="_parent">click here</a>.';
|
| 2484 |
+
}
|
| 2485 |
+
} else {
|
| 2486 |
+
echo 'Could not install WP Force SSL. You\'ll have to <a target="_parent" href="' . admin_url('plugin-install.php?s=force%20ssl%20webfactory&tab=search&type=term') . '">download and install manually</a>.';
|
| 2487 |
+
}
|
| 2488 |
|
| 2489 |
+
echo '</div>';
|
| 2490 |
+
} // install_wpfssl
|
| 2491 |
+
|
| 2492 |
+
static function wp_kses_wf($html)
|
| 2493 |
+
{
|
| 2494 |
+
add_filter('safe_style_css', function ($styles) {
|
| 2495 |
+
$styles_wf = array(
|
| 2496 |
+
'text-align',
|
| 2497 |
+
'margin',
|
| 2498 |
+
'color',
|
| 2499 |
+
'float',
|
| 2500 |
+
'border',
|
| 2501 |
+
'background',
|
| 2502 |
+
'background-color',
|
| 2503 |
+
'border-bottom',
|
| 2504 |
+
'border-bottom-color',
|
| 2505 |
+
'border-bottom-style',
|
| 2506 |
+
'border-bottom-width',
|
| 2507 |
+
'border-collapse',
|
| 2508 |
+
'border-color',
|
| 2509 |
+
'border-left',
|
| 2510 |
+
'border-left-color',
|
| 2511 |
+
'border-left-style',
|
| 2512 |
+
'border-left-width',
|
| 2513 |
+
'border-right',
|
| 2514 |
+
'border-right-color',
|
| 2515 |
+
'border-right-style',
|
| 2516 |
+
'border-right-width',
|
| 2517 |
+
'border-spacing',
|
| 2518 |
+
'border-style',
|
| 2519 |
+
'border-top',
|
| 2520 |
+
'border-top-color',
|
| 2521 |
+
'border-top-style',
|
| 2522 |
+
'border-top-width',
|
| 2523 |
+
'border-width',
|
| 2524 |
+
'caption-side',
|
| 2525 |
+
'clear',
|
| 2526 |
+
'cursor',
|
| 2527 |
+
'direction',
|
| 2528 |
+
'font',
|
| 2529 |
+
'font-family',
|
| 2530 |
+
'font-size',
|
| 2531 |
+
'font-style',
|
| 2532 |
+
'font-variant',
|
| 2533 |
+
'font-weight',
|
| 2534 |
+
'height',
|
| 2535 |
+
'letter-spacing',
|
| 2536 |
+
'line-height',
|
| 2537 |
+
'margin-bottom',
|
| 2538 |
+
'margin-left',
|
| 2539 |
+
'margin-right',
|
| 2540 |
+
'margin-top',
|
| 2541 |
+
'overflow',
|
| 2542 |
+
'padding',
|
| 2543 |
+
'padding-bottom',
|
| 2544 |
+
'padding-left',
|
| 2545 |
+
'padding-right',
|
| 2546 |
+
'padding-top',
|
| 2547 |
+
'text-decoration',
|
| 2548 |
+
'text-indent',
|
| 2549 |
+
'vertical-align',
|
| 2550 |
+
'width',
|
| 2551 |
+
'display',
|
| 2552 |
+
);
|
| 2553 |
+
|
| 2554 |
+
foreach ($styles_wf as $style_wf) {
|
| 2555 |
+
$styles[] = $style_wf;
|
| 2556 |
+
}
|
| 2557 |
+
return $styles;
|
| 2558 |
+
});
|
| 2559 |
+
|
| 2560 |
+
$allowed_tags = wp_kses_allowed_html('post');
|
| 2561 |
+
$allowed_tags['input'] = array(
|
| 2562 |
+
'type' => true,
|
| 2563 |
+
'style' => true,
|
| 2564 |
+
'class' => true,
|
| 2565 |
+
'id' => true,
|
| 2566 |
+
'checked' => true,
|
| 2567 |
+
'disabled' => true,
|
| 2568 |
+
'name' => true,
|
| 2569 |
+
'size' => true,
|
| 2570 |
+
'placeholder' => true,
|
| 2571 |
+
'value' => true,
|
| 2572 |
+
'data-*' => true,
|
| 2573 |
+
'size' => true,
|
| 2574 |
+
'disabled' => true
|
| 2575 |
+
);
|
| 2576 |
+
|
| 2577 |
+
$allowed_tags['textarea'] = array(
|
| 2578 |
+
'type' => true,
|
| 2579 |
+
'style' => true,
|
| 2580 |
+
'class' => true,
|
| 2581 |
+
'id' => true,
|
| 2582 |
+
'checked' => true,
|
| 2583 |
+
'disabled' => true,
|
| 2584 |
+
'name' => true,
|
| 2585 |
+
'size' => true,
|
| 2586 |
+
'placeholder' => true,
|
| 2587 |
+
'value' => true,
|
| 2588 |
+
'data-*' => true,
|
| 2589 |
+
'cols' => true,
|
| 2590 |
+
'rows' => true,
|
| 2591 |
+
'disabled' => true,
|
| 2592 |
+
'autocomplete' => true
|
| 2593 |
+
);
|
| 2594 |
+
|
| 2595 |
+
$allowed_tags['select'] = array(
|
| 2596 |
+
'type' => true,
|
| 2597 |
+
'style' => true,
|
| 2598 |
+
'class' => true,
|
| 2599 |
+
'id' => true,
|
| 2600 |
+
'checked' => true,
|
| 2601 |
+
'disabled' => true,
|
| 2602 |
+
'name' => true,
|
| 2603 |
+
'size' => true,
|
| 2604 |
+
'placeholder' => true,
|
| 2605 |
+
'value' => true,
|
| 2606 |
+
'data-*' => true,
|
| 2607 |
+
'multiple' => true,
|
| 2608 |
+
'disabled' => true
|
| 2609 |
+
);
|
| 2610 |
+
|
| 2611 |
+
$allowed_tags['option'] = array(
|
| 2612 |
+
'type' => true,
|
| 2613 |
+
'style' => true,
|
| 2614 |
+
'class' => true,
|
| 2615 |
+
'id' => true,
|
| 2616 |
+
'checked' => true,
|
| 2617 |
+
'disabled' => true,
|
| 2618 |
+
'name' => true,
|
| 2619 |
+
'size' => true,
|
| 2620 |
+
'placeholder' => true,
|
| 2621 |
+
'value' => true,
|
| 2622 |
+
'selected' => true,
|
| 2623 |
+
'data-*' => true
|
| 2624 |
+
);
|
| 2625 |
+
$allowed_tags['optgroup'] = array(
|
| 2626 |
+
'type' => true,
|
| 2627 |
+
'style' => true,
|
| 2628 |
+
'class' => true,
|
| 2629 |
+
'id' => true,
|
| 2630 |
+
'checked' => true,
|
| 2631 |
+
'disabled' => true,
|
| 2632 |
+
'name' => true,
|
| 2633 |
+
'size' => true,
|
| 2634 |
+
'placeholder' => true,
|
| 2635 |
+
'value' => true,
|
| 2636 |
+
'selected' => true,
|
| 2637 |
+
'data-*' => true,
|
| 2638 |
+
'label' => true
|
| 2639 |
+
);
|
| 2640 |
+
|
| 2641 |
+
$allowed_tags['a'] = array(
|
| 2642 |
+
'href' => true,
|
| 2643 |
+
'data-*' => true,
|
| 2644 |
+
'class' => true,
|
| 2645 |
+
'style' => true,
|
| 2646 |
+
'id' => true,
|
| 2647 |
+
'target' => true,
|
| 2648 |
+
'data-*' => true,
|
| 2649 |
+
'role' => true,
|
| 2650 |
+
'aria-controls' => true,
|
| 2651 |
+
'aria-selected' => true,
|
| 2652 |
+
'disabled' => true
|
| 2653 |
+
);
|
| 2654 |
+
|
| 2655 |
+
$allowed_tags['div'] = array(
|
| 2656 |
+
'style' => true,
|
| 2657 |
+
'class' => true,
|
| 2658 |
+
'id' => true,
|
| 2659 |
+
'data-*' => true,
|
| 2660 |
+
'role' => true,
|
| 2661 |
+
'aria-labelledby' => true,
|
| 2662 |
+
'value' => true,
|
| 2663 |
+
'aria-modal' => true,
|
| 2664 |
+
'tabindex' => true
|
| 2665 |
+
);
|
| 2666 |
+
|
| 2667 |
+
$allowed_tags['li'] = array(
|
| 2668 |
+
'style' => true,
|
| 2669 |
+
'class' => true,
|
| 2670 |
+
'id' => true,
|
| 2671 |
+
'data-*' => true,
|
| 2672 |
+
'role' => true,
|
| 2673 |
+
'aria-labelledby' => true,
|
| 2674 |
+
'value' => true,
|
| 2675 |
+
'aria-modal' => true,
|
| 2676 |
+
'tabindex' => true
|
| 2677 |
+
);
|
| 2678 |
+
|
| 2679 |
+
$allowed_tags['span'] = array(
|
| 2680 |
+
'style' => true,
|
| 2681 |
+
'class' => true,
|
| 2682 |
+
'id' => true,
|
| 2683 |
+
'data-*' => true,
|
| 2684 |
+
'aria-hidden' => true
|
| 2685 |
+
);
|
| 2686 |
+
|
| 2687 |
+
$allowed_tags['style'] = array(
|
| 2688 |
+
'class' => true,
|
| 2689 |
+
'id' => true,
|
| 2690 |
+
'type' => true
|
| 2691 |
+
);
|
| 2692 |
+
|
| 2693 |
+
$allowed_tags['fieldset'] = array(
|
| 2694 |
+
'class' => true,
|
| 2695 |
+
'id' => true,
|
| 2696 |
+
'type' => true
|
| 2697 |
+
);
|
| 2698 |
+
|
| 2699 |
+
$allowed_tags['link'] = array(
|
| 2700 |
+
'class' => true,
|
| 2701 |
+
'id' => true,
|
| 2702 |
+
'type' => true,
|
| 2703 |
+
'rel' => true,
|
| 2704 |
+
'href' => true,
|
| 2705 |
+
'media' => true
|
| 2706 |
+
);
|
| 2707 |
+
|
| 2708 |
+
$allowed_tags['form'] = array(
|
| 2709 |
+
'style' => true,
|
| 2710 |
+
'class' => true,
|
| 2711 |
+
'id' => true,
|
| 2712 |
+
'method' => true,
|
| 2713 |
+
'action' => true,
|
| 2714 |
+
'data-*' => true
|
| 2715 |
+
);
|
| 2716 |
+
|
| 2717 |
+
echo wp_kses($html, $allowed_tags);
|
| 2718 |
+
|
| 2719 |
+
add_filter('safe_style_css', function ($styles) {
|
| 2720 |
+
$styles_wf = array(
|
| 2721 |
+
'text-align',
|
| 2722 |
+
'margin',
|
| 2723 |
+
'color',
|
| 2724 |
+
'float',
|
| 2725 |
+
'border',
|
| 2726 |
+
'background',
|
| 2727 |
+
'background-color',
|
| 2728 |
+
'border-bottom',
|
| 2729 |
+
'border-bottom-color',
|
| 2730 |
+
'border-bottom-style',
|
| 2731 |
+
'border-bottom-width',
|
| 2732 |
+
'border-collapse',
|
| 2733 |
+
'border-color',
|
| 2734 |
+
'border-left',
|
| 2735 |
+
'border-left-color',
|
| 2736 |
+
'border-left-style',
|
| 2737 |
+
'border-left-width',
|
| 2738 |
+
'border-right',
|
| 2739 |
+
'border-right-color',
|
| 2740 |
+
'border-right-style',
|
| 2741 |
+
'border-right-width',
|
| 2742 |
+
'border-spacing',
|
| 2743 |
+
'border-style',
|
| 2744 |
+
'border-top',
|
| 2745 |
+
'border-top-color',
|
| 2746 |
+
'border-top-style',
|
| 2747 |
+
'border-top-width',
|
| 2748 |
+
'border-width',
|
| 2749 |
+
'caption-side',
|
| 2750 |
+
'clear',
|
| 2751 |
+
'cursor',
|
| 2752 |
+
'direction',
|
| 2753 |
+
'font',
|
| 2754 |
+
'font-family',
|
| 2755 |
+
'font-size',
|
| 2756 |
+
'font-style',
|
| 2757 |
+
'font-variant',
|
| 2758 |
+
'font-weight',
|
| 2759 |
+
'height',
|
| 2760 |
+
'letter-spacing',
|
| 2761 |
+
'line-height',
|
| 2762 |
+
'margin-bottom',
|
| 2763 |
+
'margin-left',
|
| 2764 |
+
'margin-right',
|
| 2765 |
+
'margin-top',
|
| 2766 |
+
'overflow',
|
| 2767 |
+
'padding',
|
| 2768 |
+
'padding-bottom',
|
| 2769 |
+
'padding-left',
|
| 2770 |
+
'padding-right',
|
| 2771 |
+
'padding-top',
|
| 2772 |
+
'text-decoration',
|
| 2773 |
+
'text-indent',
|
| 2774 |
+
'vertical-align',
|
| 2775 |
+
'width'
|
| 2776 |
+
);
|
| 2777 |
+
|
| 2778 |
+
foreach ($styles_wf as $style_wf) {
|
| 2779 |
+
if (($key = array_search($style_wf, $styles)) !== false) {
|
| 2780 |
+
unset($styles[$key]);
|
| 2781 |
+
}
|
| 2782 |
+
}
|
| 2783 |
+
return $styles;
|
| 2784 |
+
});
|
| 2785 |
+
}
|
| 2786 |
+
|
| 2787 |
+
|
| 2788 |
+
static function is_plugin_installed($slug)
|
| 2789 |
+
{
|
| 2790 |
+
if (!function_exists('get_plugins')) {
|
| 2791 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
| 2792 |
+
}
|
| 2793 |
+
$all_plugins = get_plugins();
|
| 2794 |
|
| 2795 |
+
if (!empty($all_plugins[$slug])) {
|
| 2796 |
+
return true;
|
| 2797 |
+
} else {
|
| 2798 |
+
return false;
|
| 2799 |
+
}
|
| 2800 |
+
} // is_plugin_installed
|
|
|
|
| 2801 |
|
| 2802 |
|
| 2803 |
+
// check if Weglot plugin is active and min version installed
|
| 2804 |
+
static function is_weglot_active()
|
| 2805 |
+
{
|
| 2806 |
+
if (!function_exists('is_plugin_active') || !function_exists('get_plugin_data')) {
|
| 2807 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
| 2808 |
+
}
|
| 2809 |
|
| 2810 |
+
if (is_plugin_active('weglot/weglot.php')) {
|
| 2811 |
+
$weglot_info = get_plugin_data(ABSPATH . 'wp-content/plugins/weglot/weglot.php');
|
| 2812 |
+
if (version_compare($weglot_info['Version'], '2.5', '<')) {
|
| 2813 |
+
return false;
|
| 2814 |
+
} else {
|
| 2815 |
+
return true;
|
| 2816 |
+
}
|
| 2817 |
+
} else {
|
| 2818 |
+
return false;
|
| 2819 |
+
}
|
| 2820 |
+
} // is_weglot_active
|
| 2821 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2822 |
|
| 2823 |
+
// check if Weglot is completely set up
|
| 2824 |
+
static function is_weglot_setup()
|
| 2825 |
+
{
|
| 2826 |
+
if (!self::is_weglot_active()) {
|
| 2827 |
+
return false;
|
| 2828 |
+
}
|
| 2829 |
|
| 2830 |
+
$active_languages = weglot_get_destination_languages();
|
| 2831 |
+
if (!empty($active_languages)) {
|
| 2832 |
+
return true;
|
| 2833 |
+
} else {
|
| 2834 |
+
return false;
|
| 2835 |
+
}
|
| 2836 |
+
} // is_weglot_setup
|
| 2837 |
+
|
| 2838 |
+
|
| 2839 |
+
// reset pointers on activation
|
| 2840 |
+
static function activate()
|
| 2841 |
+
{
|
| 2842 |
+
self::reset_pointers();
|
| 2843 |
+
self::empty_cache();
|
| 2844 |
+
} // activate
|
| 2845 |
+
|
| 2846 |
+
|
| 2847 |
+
// clean up on deactivation
|
| 2848 |
+
static function deactivate()
|
| 2849 |
+
{
|
| 2850 |
+
delete_option(UCP_POINTERS_KEY);
|
| 2851 |
+
delete_option(UCP_NOTICES_KEY);
|
| 2852 |
+
self::empty_cache();
|
| 2853 |
+
} // deactivate
|
| 2854 |
+
|
| 2855 |
+
|
| 2856 |
+
// clean up on uninstall
|
| 2857 |
+
static function uninstall()
|
| 2858 |
+
{
|
| 2859 |
+
delete_option(UCP_OPTIONS_KEY);
|
| 2860 |
+
delete_option(UCP_META_KEY);
|
| 2861 |
+
delete_option(UCP_POINTERS_KEY);
|
| 2862 |
+
delete_option(UCP_NOTICES_KEY);
|
| 2863 |
+
self::empty_cache();
|
| 2864 |
+
} // uninstall
|
| 2865 |
} // class UCP
|
| 2866 |
|
| 2867 |
|
wf-flyout/config.php
CHANGED
|
@@ -7,10 +7,11 @@ $config['icon_image'] = 'ucp.png';
|
|
| 7 |
$config['icon_padding'] = '6px';
|
| 8 |
$config['icon_size'] = '55px';
|
| 9 |
$config['menu_accent_color'] = '#ff7920';
|
| 10 |
-
$config['custom_css'] = '';
|
| 11 |
|
| 12 |
$config['menu_items'] = array(
|
| 13 |
array('href' => 'https://underconstructionpage.com/?ref=wff-ucp&coupon=welcome', 'target' => '_blank', 'label' => 'Get UnderConstrucionPage PRO with 20% OFF', 'icon' => 'dashicons-star-filled', 'class' => 'accent'),
|
|
|
|
| 14 |
array('href' => 'https://wp301redirects.com/?ref=wff-ucp&coupon=50off', 'label' => 'Fix 2 most common SEO issues on WordPress', 'icon' => '301-logo.png', 'class' => 'wp301-icon'),
|
| 15 |
array('href' => 'https://wpsticky.com/?ref=wff-ucp', 'target' => '_blank', 'label' => 'Make a menu sticky with WP Sticky', 'icon' => 'dashicons-admin-post'),
|
| 16 |
array('href' => 'https://wpreset.com/?ref=wff-ucp', 'target' => '_blank', 'label' => 'Need to start over? Get WP Reset', 'icon' => 'wp-reset.png'),
|
| 7 |
$config['icon_padding'] = '6px';
|
| 8 |
$config['icon_size'] = '55px';
|
| 9 |
$config['menu_accent_color'] = '#ff7920';
|
| 10 |
+
$config['custom_css'] = '#wf-flyout .wpfssl-icon .wff-icon img { max-width: 66%; } #wf-flyout .wpfssl-icon .wff-icon { line-height: 57px; }';
|
| 11 |
|
| 12 |
$config['menu_items'] = array(
|
| 13 |
array('href' => 'https://underconstructionpage.com/?ref=wff-ucp&coupon=welcome', 'target' => '_blank', 'label' => 'Get UnderConstrucionPage PRO with 20% OFF', 'icon' => 'dashicons-star-filled', 'class' => 'accent'),
|
| 14 |
+
array('href' => 'https://wpforcessl.com/?ref=wff-ucp', 'label' => 'Fix all SSL problems & monitor site in real-time', 'icon' => 'wp-ssl.png', 'class' => 'wpfssl-icon'),
|
| 15 |
array('href' => 'https://wp301redirects.com/?ref=wff-ucp&coupon=50off', 'label' => 'Fix 2 most common SEO issues on WordPress', 'icon' => '301-logo.png', 'class' => 'wp301-icon'),
|
| 16 |
array('href' => 'https://wpsticky.com/?ref=wff-ucp', 'target' => '_blank', 'label' => 'Make a menu sticky with WP Sticky', 'icon' => 'dashicons-admin-post'),
|
| 17 |
array('href' => 'https://wpreset.com/?ref=wff-ucp', 'target' => '_blank', 'label' => 'Need to start over? Get WP Reset', 'icon' => 'wp-reset.png'),
|
wf-flyout/icons/wp-ssl.png
ADDED
|
Binary file
|
wf-flyout/wf-flyout.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
/**
|
| 2 |
* Universal fly-out menu for WebFactory plugins
|
| 3 |
-
* (c) WebFactory Ltd,
|
| 4 |
*/
|
| 5 |
|
| 6 |
#wf-flyout {
|
| 1 |
/**
|
| 2 |
* Universal fly-out menu for WebFactory plugins
|
| 3 |
+
* (c) WebFactory Ltd, 2022
|
| 4 |
*/
|
| 5 |
|
| 6 |
#wf-flyout {
|
wf-flyout/wf-flyout.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
/**
|
| 2 |
* Universal fly-out menu for WebFactory plugins
|
| 3 |
-
* (c) WebFactory Ltd,
|
| 4 |
*/
|
| 5 |
|
| 6 |
jQuery(document).ready(function ($) {
|
| 1 |
/**
|
| 2 |
* Universal fly-out menu for WebFactory plugins
|
| 3 |
+
* (c) WebFactory Ltd, 2022
|
| 4 |
*/
|
| 5 |
|
| 6 |
jQuery(document).ready(function ($) {
|
wf-flyout/wf-flyout.php
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
* Universal fly-out menu for WebFactory plugins
|
| 4 |
-
* (c) WebFactory Ltd,
|
| 5 |
*/
|
| 6 |
|
| 7 |
|
|
@@ -111,7 +111,7 @@ if (false == class_exists('wf_flyout')) {
|
|
| 111 |
$out .= sanitize_text_field($this->config['custom_css']);
|
| 112 |
$out .= '</style>';
|
| 113 |
|
| 114 |
-
|
| 115 |
} // admin_head
|
| 116 |
|
| 117 |
|
|
@@ -160,7 +160,7 @@ if (false == class_exists('wf_flyout')) {
|
|
| 160 |
|
| 161 |
$out .= '</div>'; // #wf-flyout
|
| 162 |
|
| 163 |
-
|
| 164 |
} // admin_footer
|
| 165 |
} // wf_flyout
|
| 166 |
} // if class exists
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
* Universal fly-out menu for WebFactory plugins
|
| 4 |
+
* (c) WebFactory Ltd, 2022
|
| 5 |
*/
|
| 6 |
|
| 7 |
|
| 111 |
$out .= sanitize_text_field($this->config['custom_css']);
|
| 112 |
$out .= '</style>';
|
| 113 |
|
| 114 |
+
UCP::wp_kses_wf($out);
|
| 115 |
} // admin_head
|
| 116 |
|
| 117 |
|
| 160 |
|
| 161 |
$out .= '</div>'; // #wf-flyout
|
| 162 |
|
| 163 |
+
UCP::wp_kses_wf($out);
|
| 164 |
} // admin_footer
|
| 165 |
} // wf_flyout
|
| 166 |
} // if class exists
|
