Version Description
Download this release
Release Info
Developer | niteo |
Plugin | CMP – Coming Soon & Maintenance Plugin by NiteoThemes |
Version | 2.4.1 |
Comparing to | |
See all releases |
Code changes from version 2.4 to 2.4.1
- cmp-advanced.php +2 -1
- cmp-settings.php +3 -1
- css/cmp-settings-style.css +5 -2
- css/cmp-settings-style.min.css +1 -1
- css/preview-iframe.css +4 -4
- img/thumbnails/hardwork_premium/screenshot2.jpg +0 -0
- inc/class-cmp-render_html.php +41 -15
- inc/preview-iframe.php +39 -25
- inc/settings/settings-slider.php +37 -39
- js/preview-iframe.js +9 -3
- js/settings.js +1 -1
- js/settings.min.js +1 -1
- niteo-cmp.php +51 -45
- readme.txt +6 -1
- themes/hardwork_premium.txt +1 -1
cmp-advanced.php
CHANGED
@@ -108,7 +108,6 @@ $niteoCS_roles = json_decode(get_option('niteoCS_roles', '[]'), true);
|
|
108 |
|
109 |
$niteoCS_roles_topbar = json_decode(get_option('niteoCS_roles_topbar', '[]'), true);
|
110 |
|
111 |
-
|
112 |
?>
|
113 |
|
114 |
<div class="wrap">
|
@@ -227,6 +226,8 @@ $niteoCS_roles_topbar = json_decode(get_option('niteoCS_roles_topbar', '[]'), t
|
|
227 |
<?php
|
228 |
$roles = get_editable_roles();
|
229 |
|
|
|
|
|
230 |
foreach ( $roles as $role => $details ) {
|
231 |
|
232 |
if ( $role != 'administrator') { ?>
|
108 |
|
109 |
$niteoCS_roles_topbar = json_decode(get_option('niteoCS_roles_topbar', '[]'), true);
|
110 |
|
|
|
111 |
?>
|
112 |
|
113 |
<div class="wrap">
|
226 |
<?php
|
227 |
$roles = get_editable_roles();
|
228 |
|
229 |
+
|
230 |
+
|
231 |
foreach ( $roles as $role => $details ) {
|
232 |
|
233 |
if ( $role != 'administrator') { ?>
|
cmp-settings.php
CHANGED
@@ -268,6 +268,8 @@ if (isset($_POST['niteoCS_redirect_time'])) {
|
|
268 |
|
269 |
|
270 |
|
|
|
|
|
271 |
// get Settings TAB
|
272 |
$niteoCS_URL_redirect = get_option('niteoCS_URL_redirect');
|
273 |
$niteoCS_redirect_time = get_option('niteoCS_redirect_time', '0');
|
@@ -281,7 +283,7 @@ $niteoCS_soc_title = stripslashes(get_option('niteoCS_soc_title', 'GET SOCIAL
|
|
281 |
// get subscribe settings
|
282 |
$niteoCS_subscribe_type = get_option('niteoCS_subscribe_type', '2');
|
283 |
$niteoCS_subscribe_code = get_option('niteoCS_subscribe_code');
|
284 |
-
$niteoCS_subscribe_label = stripslashes(get_option('niteoCS_subscribe_label', '
|
285 |
$niteoCS_subscribers_list = get_option('niteoCS_subscribers_list');
|
286 |
|
287 |
// get SEO
|
268 |
|
269 |
|
270 |
|
271 |
+
|
272 |
+
|
273 |
// get Settings TAB
|
274 |
$niteoCS_URL_redirect = get_option('niteoCS_URL_redirect');
|
275 |
$niteoCS_redirect_time = get_option('niteoCS_redirect_time', '0');
|
283 |
// get subscribe settings
|
284 |
$niteoCS_subscribe_type = get_option('niteoCS_subscribe_type', '2');
|
285 |
$niteoCS_subscribe_code = get_option('niteoCS_subscribe_code');
|
286 |
+
$niteoCS_subscribe_label = stripslashes(get_option('niteoCS_subscribe_label', 'Subscribe for awesome news!'));
|
287 |
$niteoCS_subscribers_list = get_option('niteoCS_subscribers_list');
|
288 |
|
289 |
// get SEO
|
css/cmp-settings-style.css
CHANGED
@@ -53,7 +53,7 @@ input[type=text] {
|
|
53 |
top: 4px
|
54 |
}
|
55 |
|
56 |
-
.select2-container {
|
57 |
width: 100%!important;
|
58 |
}
|
59 |
|
@@ -620,6 +620,10 @@ th label {
|
|
620 |
color: #23282d;
|
621 |
}
|
622 |
|
|
|
|
|
|
|
|
|
623 |
|
624 |
.theme-wrapper .button:hover,
|
625 |
.theme-wrapper a.button:hover {
|
@@ -858,7 +862,6 @@ input[type=checkbox].toggle-checkbox {
|
|
858 |
padding: 2px;
|
859 |
margin-left: 5px;
|
860 |
margin-top: 5px;
|
861 |
-
background: #3ab53a
|
862 |
}
|
863 |
|
864 |
.cmp-sidebar-wrapper {
|
53 |
top: 4px
|
54 |
}
|
55 |
|
56 |
+
.select2-container:not(.select2-container--open) {
|
57 |
width: 100%!important;
|
58 |
}
|
59 |
|
620 |
color: #23282d;
|
621 |
}
|
622 |
|
623 |
+
.theme-wrapper.active .button.theme-select input[type=radio]::after {
|
624 |
+
content: "\f046";
|
625 |
+
}
|
626 |
+
|
627 |
|
628 |
.theme-wrapper .button:hover,
|
629 |
.theme-wrapper a.button:hover {
|
862 |
padding: 2px;
|
863 |
margin-left: 5px;
|
864 |
margin-top: 5px;
|
|
|
865 |
}
|
866 |
|
867 |
.cmp-sidebar-wrapper {
|
css/cmp-settings-style.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#wpwrap{overflow-x:hidden}.no-margin{margin:0}.cmp-settings-wrapper{position:relative;margin-top:1em}.wrapper-disabled{opacity:.4}.comingsoon-error,.comingsoon-success{padding:1em;width:calc(100% - 4em);border-left:4px solid red;background-color:#fff}.comingsoon-success{border-left:4px solid #00d221}.padding-bottom{padding-bottom:10px}.select2-container--default .select2-selection--single,input[type=text]{border:1px solid #d4d4d4;border-radius:4px;line-height:2.5em;height:2.5em;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.03);box-shadow:inset 0 1px 2px rgba(0,0,0,.03)}.select2-container .select2-selection--single{height:35px}.select2-container--default .select2-selection--single .select2-selection__rendered{line-height:35px}.select2-container--default .select2-selection--single .select2-selection__arrow{top:4px}.select2-container{width:100%!important}input[type=range]{display:block;-webkit-appearance:none;background-color:#dedede;width:100%;height:5px;border-radius:5px;margin:10px auto 0;outline:0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background-color:#0085ba;width:17px;height:17px;border-radius:50%;border:1px solid #d4d4d4;cursor:pointer;-webkit-transition:.3s ease-in-out;transition:.3s ease-in-out}input[type=range]::-webkit-slider-thumb:hover{background-color:#006799;border:2px solid #0085ba}input[type=range]::-webkit-slider-thumb:active{-webkit-transform:scale(1.2);transform:scale(1.2)}input[type=text],textarea{width:100%}#niteoCS_countdown_redirect,#niteoCS_countdown_text,.table-wrapper.content,.table-wrapper.custom_css,.table-wrapper.install,.table-wrapper.seo,.table-wrapper.theme-setup{display:none}.wp-upload-form.cmp{padding:4em;display:block}.cmp-status legend{width:95%;padding:10px;cursor:pointer}.cmp-status .active{background-color:#ddd}.redirect{margin-bottom:0}.help-settings,.subscribers-settings,.table-wrapper,.translate-settings{background-color:#fff;border:1px solid #dedede;margin:0 0 1em;max-width:920px}.cmp-inputs-wrapper .translation input,.cmp-inputs-wrapper .translation textarea{width:100%}.cmp-inputs-wrapper{display:inline-block;max-width:920px;min-width:920px}.table-wrapper.closed table,.translate-settings tfoot{display:none}.help-settings,.subscribers-settings,.translate-settings{max-width:calc(920px - 2em);min-width:calc(920px - 2em);padding:1em}.table-wrapper h3{position:relative;padding:.5em 0 .5em 1em;margin:0;border-bottom:1px solid #dedede;text-align:left}#unsplash-media,.background-media td fieldset{padding-top:1em}.table-wrapper h3:not(.no-icon):not(.notice-title):not(#heading-example)::after{font-family:fontAwesome;content:"\f147";position:absolute;right:10px;font-weight:400;opacity:.6;cursor:pointer;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#niteoCS-text-logo,.theme-title,th label{font-weight:600}.table-wrapper.closed h3:not(.no-icon):not(.notice-title)::after{content:"\f196"}.table-wrapper h4{margin:0}.table-wrapper table{padding:1em;height:auto;width:90%}.table-wrapper .theme-selector{width:100%}.table-wrapper select{margin-bottom:10px;width:100%}.table-wrapper td{width:100%;max-width:600px;margin-bottom:1em;display:block}#unsplash_img,.table-wrapper td.theme-selector{max-width:100%}.table-wrapper th{vertical-align:top;width:180px;text-align:left}#delete-banner,#delete-favicon,#delete-logo,#delete-video-thumb{display:none}.social-media{margin-top:0;margin-bottom:3em}.social-inputs{position:relative}.social-inputs .label{display:none;font-weight:600;position:absolute;top:-20px;left:-8px}#niteoCS-text-logo{border:none;-webkit-box-shadow:none;box-shadow:none;font-size:3em}.social-description{margin-top:0}.social-inputs .label:nth-of-type(2){left:62px}.social-inputs .label:nth-of-type(3){left:148px}.social-media li{display:inline-block;padding-right:1.5em;padding-bottom:1em}.social-media i{font-size:2.45em;cursor:pointer}.social-media i.active{color:#d54e21}.social-inputs li{display:none;width:100%}.social-inputs li.active{display:inline-block}#custom_content_font,#custom_headings_font,#unsplash_img,.unsplash-feed{display:none}.social-inputs p{position:relative;padding-left:50px;height:50px}.social-inputs p i{position:absolute;left:0;top:20px;font-size:30px;width:30px;cursor:move}.theme-details,.toggle{cursor:pointer}.social-inputs label{padding-left:100px}.social-inputs input[type=text]{margin-left:100px;width:calc(100% - 100px)}.social-inputs input[type=checkbox]{position:absolute;width:26px;height:26px;top:23px;left:65px}.social-inputs input[type=checkbox]:checked:before{margin:3px 0 0 1px}.color-preview,.gradient-preview,.pattern-wrapper{background-repeat:repeat;height:200px;border:1px solid #ededed;margin-top:1em}.theme-overlay .screenshot,.thumbnail-holder{position:relative;background-size:cover;background-repeat:no-repeat;background-position:center}.video-wrapper{position:relative;width:100%;margin-top:1em}.video-wrapper video{margin-top:-35px}#add-pattern{margin-bottom:1em}.info{font-size:12px}.nav-tab i{padding-right:3px}.banner-wrapper,.favicon-wrapper,.logo-wrapper{margin:1em 0}.favicon-wrapper img,.logo-wrapper img{background-color:#efefef;padding:1em}.favicon-wrapper img{max-width:32px}.background-media img,.logo-wrapper img{max-width:100%;width:100%}.logo-wrapper img{max-height:150px;width:auto}#font-example-wrapper{padding:1em;border:1px solid #dedede;overflow:hidden}#heading-example{border-bottom:none;line-height:1.5;padding:0}.font-selector td:first-of-type{padding-bottom:2em}.font-selector fieldset{padding:.5em 0}.theme-wrapper{display:inline-block;margin:2em 1em 2em 0;width:calc(33.33% - 1.5em + 6px);text-align:center;border:1px solid #efefef;border-radius:6px;position:relative}.thumbnail-holder,.thumbnail-holder::before{border-top-left-radius:5px;border-top-right-radius:5px}.theme-wrapper:nth-of-type(3n){margin-right:0}.theme-wrapper.active{background-color:#ddd}.thumbnail-holder{width:100%}.thumbnail-holder::before{content:'';display:block;padding-top:56.25%;-webkit-transition:background-color .1s;transition:background-color .1s}.theme-wrapper:hover .thumbnail-holder::before{background-color:rgba(0,0,0,.7)}.toggle,.toggle-wrapper{display:inline-block}.theme-title{float:left;text-transform:uppercase}.theme-version{float:right}.theme-wrapper .hide:not(.selected){opacity:0;-webkit-transition:opacity .1s,background-color .1s;transition:opacity .1s,background-color .1s}.theme-wrapper:hover .hide{opacity:1;-webkit-transition:opacity .1s,background-color .1s;transition:opacity .1s,background-color .1s}.theme-inputs{position:absolute;bottom:-36px;right:0;left:0;padding:5px 10px 5px 5px;height:2em;background:#656565;line-height:2em;color:#fff}.active .theme-inputs{background:#27ae60}.theme-inputs .italic{font-style:italic}.theme-wrapper .buttons-wrapper{position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cmp-button,.cmp-preview,.theme-wrapper .button{height:28px;line-height:28px;padding:0 10px;min-width:80px;border-radius:3px;color:#fff!important;-moz-appearance:none;-webkit-appearance:none;-webkit-transition:background-color .5s;transition:background-color .5s;border:none!important;box-shadow:none;-webkit-box-shadow:none;text-shadow:none;text-transform:uppercase}.cmp-button.submit,.theme-actions .activate{background-color:#c0392b;color:#fff;border:none;-webkit-transition:background-color .5s;transition:background-color .5s}.theme-wrapper a.button:focus,.theme-wrapper a.button:visited{background:0 0;-webkit-box-shadow:none;box-shadow:none}.theme-wrapper a.button.theme-purchase{background-color:#ff3284}.cmp-button.submit:focus,.cmp-button.submit:hover,.theme-actions .activate:focus,.theme-actions .activate:hover{background-color:#e74c3c;color:#fff;border:none}.theme-wrapper .button{border:2px solid #fff!important;background:0 0;width:180px;line-height:2.5em;height:3em}.theme-wrapper .button.theme-select input[type=radio]{position:relative;background:0 0;border:none;outline:0;-webkit-box-shadow:none;box-shadow:none}.theme-wrapper .button.theme-select input[type=radio]::before{content:none}.theme-wrapper .button.theme-select input[type=radio]::after{font-family:fontAwesome;content:"\f096";position:absolute;top:3px;left:0;opacity:1;color:#fff}.theme-wrapper .selected.button.theme-select input[type=radio]::after{content:"\f046";color:#23282d}.theme-wrapper.active .button.theme-select input[type=radio]::after{content:"\f046"}.theme-wrapper .button:hover,.theme-wrapper a.button:hover{background:#fff;color:#23282d!important}.selected.button,.theme-wrapper .button.theme-select:hover input[type=radio]::after{color:#23282d!important}.theme-wrapper .theme-preview,.theme-wrapper .theme-purchase,.theme-wrapper .theme-select{margin-bottom:5px}.theme-wrapper .theme-select.selected{background-color:#32b2ff}.theme-wrapper .theme-details.button{line-height:0}.cmp-preview{background-color:#2485bf!important}.cmp-preview:active,.cmp-preview:hover{background-color:#32b2ff!important}.theme-info .theme-purchase{width:auto;min-width:40%;height:55px;font-size:2em;background-color:#2c3e50;border:none}.theme-info .theme-purchase:focus,.theme-info .theme-purchase:hover{background-color:#34495e}.button i{margin-right:5px}.theme-purchase a,.theme-purchase a:hover,.theme-purchase a:visited{color:#fff;text-decoration:none}p.cmp-submit{margin:0;padding-top:0;font-weight:400;text-align:left}.theme-overlay .screenshot{-webkit-transition:background-image .2s ease-in-out;transition:background-image .2s ease-in-out}.theme-overlay .screenshots-nav{position:absolute;right:0;top:0;color:#fff;cursor:pointer}.theme-overlay .screenshots-nav div{width:40px;height:40px;background-color:#000;line-height:40px;opacity:.7;-webkit-transition:opacity .5s;transition:opacity .5s}.toggle,.toggle:after,.toggle:before{-webkit-transition:all .2s ease-in-out}.fifty-layout input:checked+img,.theme-overlay .screenshots-nav div:hover{opacity:1}.theme-overlay .screenshots-nav .left{float:left}.theme-overlay .screenshots-nav .right{float:right}.theme-description ul{list-style:none;padding-left:2em}.theme-description h4,.theme-description li{font-size:13px}.theme-description .supported i{color:green}.theme-description .not-supported i{color:red}.wp-list-table .column-id{width:5%}.cmp-status{margin-bottom:3em}.toggle{position:relative;width:200px;height:30px;font-weight:600;background:0 0;border:2px solid #f1f1f1;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;border-radius:15px}.toggle:after,.toggle:before{position:absolute;line-height:30px;font-size:14px;z-index:2;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}input[type=checkbox].toggle-checkbox{display:none}.toggle_handler{display:inline-block;position:relative;z-index:1;background:#c0392b;width:90px;height:24px;top:3px;left:5px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;-webkit-transform:translateX(0);transform:translateX(0);border-radius:10px 0 0 10px}.toggle-checkbox:checked+.toggle .toggle_handler{width:90px;-webkit-transform:translateX(100px);transform:translateX(100px);background:#27ae60;border-radius:0 10px 10px 0}.toggle-wrapper:hover .toggle_handler{background:#e74c3c}.toggle-wrapper:hover .toggle-checkbox:checked+.toggle .toggle_handler{background:#2ecc71}.toggle:before{content:"Disabled";left:22px;color:#fff}.toggle-checkbox:checked+.toggle:before,.toggle:after{color:#23282d}.toggle:after{content:"Enabled";right:26px}.toggle-checkbox:checked+.toggle:after{color:#fff}.fifty-layout label{display:block;position:relative;padding-bottom:1em;margin-top:1em}.fifty-layout input{visibility:hidden;position:absolute;margin:0}.fifty-layout img{display:block;opacity:.3;outline:solid 1px;padding:2px;margin-left:5px;margin-top:5px;background:#3ab53a}.cmp-sidebar-wrapper{display:inline-block;width:calc(100% - 6em - 920px);max-width:350px;min-width:300px;margin-left:1em;padding-top:0;vertical-align:top;text-align:center}.cmp-sidebar-wrapper .widget{padding:2em;border:1px solid #dedede;background:#fff}.widget.donate img{max-width:50px}.widget.donate img.niteo-logo{max-width:120px}.cmp-rate-us .button,.cmp-rate-us a{display:block;text-align:center}.cmp-rate-us a{padding:1em 0}.cmp-rate-us .button{max-width:150px;margin:0 auto 1em}.cmp-rate-us form{text-align:center}.subscribers .column-id{width:5%}@media screen and (max-width:1450px){.cmp-inputs-wrapper{min-width:70%}.cmp-sidebar-wrapper{width:calc(30% - 2em + 7px)}.theme-wrapper,.theme-wrapper.premium{width:calc(50% - 3em - 5px)}}@media screen and (max-width:1270px){.cmp-inputs-wrapper{min-width:100%}}@media screen and (max-width:1110px){.theme-wrapper,.theme-wrapper.premium{margin-right:0;width:calc(100% - 5px)}.table-wrapper th{display:block}.cmp-sidebar-wrapper .widget{padding:1em}}@media screen and (max-width:1024px){.table-wrapper table{width:100%}.table-wrapper th{width:140px}}@media screen and (max-width:782px){.social-inputs input[type=checkbox]:checked:before{margin:-1px 0 0 -4px}.cmp-inputs-wrapper,.cmp-sidebar-wrapper{display:block;max-width:100%;width:100%;margin:0}.cmp-sidebar-wrapper .widget{padding:2em;margin-bottom:1em!important}.theme-overlay .theme-info,.theme-overlay .theme-screenshots{width:100%;float:none}input[type=text],textarea{font-size:13px}}@media screen and (max-width:560px){.social-inputs .label:nth-of-type(2){left:50px}.social-inputs .label:nth-of-type(3){left:105px}.social-inputs p i{top:22px}.social-inputs input[type=checkbox]{top:28px;left:53px}.social-inputs label{padding-left:55px}.social-inputs input[type=text]{margin-left:55px;width:calc(100% - 55px)}}
|
1 |
+
#wpwrap{overflow-x:hidden}.no-margin{margin:0}.cmp-settings-wrapper{position:relative;margin-top:1em}.wrapper-disabled{opacity:.4}.comingsoon-error,.comingsoon-success{padding:1em;width:calc(100% - 4em);border-left:4px solid red;background-color:#fff}.comingsoon-success{border-left:4px solid #00d221}.padding-bottom{padding-bottom:10px}.select2-container--default .select2-selection--single,input[type=text]{border:1px solid #d4d4d4;border-radius:4px;line-height:2.5em;height:2.5em;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.03);box-shadow:inset 0 1px 2px rgba(0,0,0,.03)}.select2-container .select2-selection--single{height:35px}.select2-container--default .select2-selection--single .select2-selection__rendered{line-height:35px}.select2-container--default .select2-selection--single .select2-selection__arrow{top:4px}.select2-container:not(.select2-container--open){width:100%!important}input[type=range]{display:block;-webkit-appearance:none;background-color:#dedede;width:100%;height:5px;border-radius:5px;margin:10px auto 0;outline:0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background-color:#0085ba;width:17px;height:17px;border-radius:50%;border:1px solid #d4d4d4;cursor:pointer;-webkit-transition:.3s ease-in-out;transition:.3s ease-in-out}input[type=range]::-webkit-slider-thumb:hover{background-color:#006799;border:2px solid #0085ba}input[type=range]::-webkit-slider-thumb:active{-webkit-transform:scale(1.2);transform:scale(1.2)}input[type=text],textarea{width:100%}#niteoCS_countdown_redirect,#niteoCS_countdown_text,.table-wrapper.content,.table-wrapper.custom_css,.table-wrapper.install,.table-wrapper.seo,.table-wrapper.theme-setup{display:none}.wp-upload-form.cmp{padding:4em;display:block}.cmp-status legend{width:95%;padding:10px;cursor:pointer}.cmp-status .active{background-color:#ddd}.redirect{margin-bottom:0}.help-settings,.subscribers-settings,.table-wrapper,.translate-settings{background-color:#fff;border:1px solid #dedede;margin:0 0 1em;max-width:920px}.cmp-inputs-wrapper .translation input,.cmp-inputs-wrapper .translation textarea{width:100%}.cmp-inputs-wrapper{display:inline-block;max-width:920px;min-width:920px}.table-wrapper.closed table,.translate-settings tfoot{display:none}.help-settings,.subscribers-settings,.translate-settings{max-width:calc(920px - 2em);min-width:calc(920px - 2em);padding:1em}.table-wrapper h3{position:relative;padding:.5em 0 .5em 1em;margin:0;border-bottom:1px solid #dedede;text-align:left}#unsplash-media,.background-media td fieldset{padding-top:1em}.table-wrapper h3:not(.no-icon):not(.notice-title):not(#heading-example)::after{font-family:fontAwesome;content:"\f147";position:absolute;right:10px;font-weight:400;opacity:.6;cursor:pointer;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#niteoCS-text-logo,.theme-title,th label{font-weight:600}.table-wrapper.closed h3:not(.no-icon):not(.notice-title)::after{content:"\f196"}.table-wrapper h4{margin:0}.table-wrapper table{padding:1em;height:auto;width:90%}.table-wrapper .theme-selector{width:100%}.table-wrapper select{margin-bottom:10px;width:100%}.table-wrapper td{width:100%;max-width:600px;margin-bottom:1em;display:block}#unsplash_img,.table-wrapper td.theme-selector{max-width:100%}.table-wrapper th{vertical-align:top;width:180px;text-align:left}#delete-banner,#delete-favicon,#delete-logo,#delete-video-thumb{display:none}.social-media{margin-top:0;margin-bottom:3em}.social-inputs{position:relative}.social-inputs .label{display:none;font-weight:600;position:absolute;top:-20px;left:-8px}#niteoCS-text-logo{border:none;-webkit-box-shadow:none;box-shadow:none;font-size:3em}.social-description{margin-top:0}.social-inputs .label:nth-of-type(2){left:62px}.social-inputs .label:nth-of-type(3){left:148px}.social-media li{display:inline-block;padding-right:1.5em;padding-bottom:1em}.social-media i{font-size:2.45em;cursor:pointer}.social-media i.active{color:#d54e21}.social-inputs li{display:none;width:100%}.social-inputs li.active{display:inline-block}#custom_content_font,#custom_headings_font,.unsplash-feed{display:none}.social-inputs p{position:relative;padding-left:50px;height:50px}.social-inputs p i{position:absolute;left:0;top:20px;font-size:30px;width:30px;cursor:move}.theme-details,.toggle{cursor:pointer}.social-inputs label{padding-left:100px}.social-inputs input[type=text]{margin-left:100px;width:calc(100% - 100px)}.social-inputs input[type=checkbox]{position:absolute;width:26px;height:26px;top:23px;left:65px}.social-inputs input[type=checkbox]:checked:before{margin:3px 0 0 1px}#unsplash_img{display:none}.color-preview,.gradient-preview,.pattern-wrapper{background-repeat:repeat;height:200px;border:1px solid #ededed;margin-top:1em}.theme-overlay .screenshot,.thumbnail-holder{position:relative;background-size:cover;background-repeat:no-repeat;background-position:center}.video-wrapper{position:relative;width:100%;margin-top:1em}.video-wrapper video{margin-top:-35px}#add-pattern{margin-bottom:1em}.info{font-size:12px}.nav-tab i{padding-right:3px}.banner-wrapper,.favicon-wrapper,.logo-wrapper{margin:1em 0}.favicon-wrapper img,.logo-wrapper img{background-color:#efefef;padding:1em}.favicon-wrapper img{max-width:32px}.background-media img,.logo-wrapper img{max-width:100%;width:100%}.logo-wrapper img{max-height:150px;width:auto}#font-example-wrapper{padding:1em;border:1px solid #dedede;overflow:hidden}#heading-example{border-bottom:none;line-height:1.5;padding:0}.font-selector td:first-of-type{padding-bottom:2em}.font-selector fieldset{padding:.5em 0}.theme-wrapper{display:inline-block;margin:2em 1em 2em 0;width:calc(33.33% - 1.5em + 6px);text-align:center;border:1px solid #efefef;border-radius:6px;position:relative}.theme-wrapper:nth-of-type(3n){margin-right:0}.theme-wrapper.active{background-color:#ddd}.thumbnail-holder{width:100%;border-top-left-radius:5px;border-top-right-radius:5px}.thumbnail-holder::before{content:'';display:block;padding-top:56.25%;-webkit-transition:background-color .1s;transition:background-color .1s;border-top-left-radius:5px;border-top-right-radius:5px}.theme-wrapper:hover .thumbnail-holder::before{background-color:rgba(0,0,0,.7)}.toggle,.toggle-wrapper{display:inline-block}.theme-title{float:left;text-transform:uppercase}.theme-version{float:right}.theme-wrapper .hide:not(.selected){opacity:0;-webkit-transition:opacity .1s,background-color .1s;transition:opacity .1s,background-color .1s}.theme-wrapper:hover .hide{opacity:1;-webkit-transition:opacity .1s,background-color .1s;transition:opacity .1s,background-color .1s}.theme-inputs{position:absolute;bottom:-36px;right:0;left:0;padding:5px;height:2em;background:#656565;line-height:2em;padding-right:10px;color:white}.active .theme-inputs{background:#27ae60}.theme-inputs .italic{font-style:italic}.theme-wrapper .buttons-wrapper{position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cmp-button,.cmp-preview,.theme-wrapper .button{height:28px;line-height:28px;padding:0 10px;min-width:80px;border-radius:3px;color:#fff!important;-moz-appearance:none;-webkit-appearance:none;-webkit-transition:background-color .5s;transition:background-color .5s;border:none!important;box-shadow:none;-webkit-box-shadow:none;text-shadow:none;text-transform:uppercase}.cmp-button.submit,.theme-actions .activate{background-color:#c0392b;color:#fff;border:none;-webkit-transition:background-color .5s;transition:background-color .5s}.theme-wrapper a.button:visited,.theme-wrapper a.button:focus{background:transparent;-webkit-box-shadow:none;box-shadow:none}.theme-wrapper a.button.theme-purchase{background-color:#ff3284}.cmp-button.submit:focus,.cmp-button.submit:hover,.theme-actions .activate:focus,.theme-actions .activate:hover{background-color:#e74c3c;color:#fff;border:none}.theme-wrapper .button{border:2px solid #ffffff!important;background:transparent;width:180px;line-height:2.5em;height:3em}.theme-wrapper .button.theme-select input[type=radio]{position:relative;background:transparent;border:none;outline:none;-webkit-box-shadow:none;box-shadow:none}.theme-wrapper .button.theme-select input[type=radio]::before{content:none}.theme-wrapper .button.theme-select input[type=radio]::after{content:'';font-family:fontAwesome;content:"\f096";position:absolute;top:3px;left:0;opacity:1;color:#fff}.theme-wrapper .selected.button.theme-select input[type=radio]::after{content:"\f046";color:#23282d}.theme-wrapper.active .button.theme-select input[type=radio]::after{content:"\f046"}.theme-wrapper .button:hover,.theme-wrapper a.button:hover{background:#fff;color:#23282d!important}.theme-wrapper .button.theme-select:hover input[type=radio]::after,.selected.button{color:#23282d!important}.theme-wrapper .theme-select,.theme-wrapper .theme-preview,.theme-wrapper .theme-purchase{margin-bottom:5px}.theme-wrapper .theme-select.selected{background-color:#32b2ff}.theme-wrapper .theme-details.button{line-height:0em}.cmp-preview{background-color:#2485bf!important}.cmp-preview:active,.cmp-preview:hover{background-color:#32b2ff!important}.theme-info .theme-purchase{width:auto;min-width:40%;height:55px;font-size:2em;background-color:#2c3e50;border:none}.theme-info .theme-purchase:focus,.theme-info .theme-purchase:hover{background-color:#34495e}.button i{margin-right:5px}.theme-purchase a,.theme-purchase a:hover,.theme-purchase a:visited{color:#fff;text-decoration:none}p.cmp-submit{margin:0;padding-top:0;font-weight:400;text-align:left}.theme-overlay .screenshot{-webkit-transition:background-image .2s ease-in-out;transition:background-image .2s ease-in-out}.theme-overlay .screenshots-nav{position:absolute;right:0;top:0;color:#fff;cursor:pointer}.theme-overlay .screenshots-nav div{width:40px;height:40px;background-color:#000;line-height:40px;opacity:.7;-webkit-transition:opacity .5s;transition:opacity .5s}.fifty-layout input:checked+img,.theme-overlay .screenshots-nav div:hover{opacity:1}.toggle,.toggle:after,.toggle:before{-webkit-transition:all .2s ease-in-out}.theme-overlay .screenshots-nav .left{float:left}.theme-overlay .screenshots-nav .right{float:right}.theme-description ul{list-style:none;padding-left:2em}.theme-description h4,.theme-description li{font-size:13px}.theme-description .supported i{color:green}.theme-description .not-supported i{color:red}.wp-list-table .column-id{width:5%}.cmp-status{margin-bottom:3em}.toggle{position:relative;width:200px;height:30px;font-weight:600;background:0 0;border:2px solid #f1f1f1;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;border-radius:15px}.toggle:after,.toggle:before{position:absolute;line-height:30px;font-size:14px;z-index:2;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}input[type=checkbox].toggle-checkbox{display:none}.toggle_handler{display:inline-block;position:relative;z-index:1;background:#c0392b;width:90px;height:24px;top:3px;left:5px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;-webkit-transform:translateX(0);transform:translateX(0);border-radius:10px 0 0 10px}.toggle-checkbox:checked+.toggle .toggle_handler{width:90px;-webkit-transform:translateX(100px);transform:translateX(100px);background:#27ae60;border-radius:0 10px 10px 0}.toggle-wrapper:hover .toggle_handler{background:#e74c3c}.toggle-wrapper:hover .toggle-checkbox:checked+.toggle .toggle_handler{background:#2ecc71}.toggle:before{content:"Disabled";left:22px;color:#fff}.toggle-checkbox:checked+.toggle:before,.toggle:after{color:#23282d}.toggle:after{content:"Enabled";right:26px}.toggle-checkbox:checked+.toggle:after{color:#fff}.fifty-layout label{display:block;position:relative;padding-bottom:1em;margin-top:1em}.fifty-layout input{visibility:hidden;position:absolute;margin:0}.fifty-layout img{display:block;opacity:.3;outline:solid 1px;padding:2px;margin-left:5px;margin-top:5px}.cmp-sidebar-wrapper{display:inline-block;width:calc(100% - 6em - 920px);max-width:350px;min-width:300px;margin-left:1em;padding-top:0;vertical-align:top;text-align:center}.cmp-sidebar-wrapper .widget{padding:2em;border:1px solid #dedede;background:#fff}.widget.donate img{max-width:50px}.widget.donate img.niteo-logo{max-width:120px}.cmp-rate-us .button,.cmp-rate-us a{display:block;text-align:center}.cmp-rate-us a{padding:1em 0}.cmp-rate-us .button{max-width:150px;margin:0 auto 1em}.cmp-rate-us form{text-align:center}.subscribers .column-id{width:5%}@media screen and (max-width:1450px){.cmp-inputs-wrapper{min-width:70%}.cmp-sidebar-wrapper{width:calc(30% - 2em + 7px)}.theme-wrapper,.theme-wrapper.premium{width:calc(50% - 3em - 5px)}}@media screen and (max-width:1270px){.cmp-inputs-wrapper{min-width:100%}}@media screen and (max-width:1110px){.theme-wrapper,.theme-wrapper.premium{margin-right:0;width:calc(100% - 5px)}.table-wrapper th{display:block}.cmp-sidebar-wrapper .widget{padding:1em}}@media screen and (max-width:1024px){.table-wrapper table{width:100%}.table-wrapper th{width:140px}}@media screen and (max-width:782px){.social-inputs input[type=checkbox]:checked:before{margin:-1px 0 0 -4px}.cmp-inputs-wrapper,.cmp-sidebar-wrapper{display:block;max-width:100%;width:100%;margin:0}.cmp-sidebar-wrapper .widget{padding:2em;margin-bottom:1em!important}.theme-overlay .theme-info,.theme-overlay .theme-screenshots{width:100%;float:none}input[type=text],textarea{font-size:13px}}@media screen and (max-width:560px){.social-inputs .label:nth-of-type(2){left:50px}.social-inputs .label:nth-of-type(3){left:105px}.social-inputs p i{top:22px}.social-inputs input[type=checkbox]{top:28px;left:53px}.social-inputs label{padding-left:55px}.social-inputs input[type=text]{margin-left:55px;width:calc(100% - 55px)}}}
|
css/preview-iframe.css
CHANGED
@@ -89,13 +89,13 @@ h3 {
|
|
89 |
}
|
90 |
|
91 |
.thumbnail {
|
92 |
-
|
93 |
border: 1px solid #e0e0e0;
|
94 |
border-radius: 5px;
|
95 |
display: inline-block;
|
96 |
-
width: calc(50% -
|
97 |
-
margin-right:
|
98 |
-
margin-bottom:
|
99 |
text-align: center;
|
100 |
text-transform: uppercase;
|
101 |
font-weight: 600;
|
89 |
}
|
90 |
|
91 |
.thumbnail {
|
92 |
+
padding: 5px;
|
93 |
border: 1px solid #e0e0e0;
|
94 |
border-radius: 5px;
|
95 |
display: inline-block;
|
96 |
+
width: calc(50% - 24px);
|
97 |
+
margin-right: 5px;
|
98 |
+
margin-bottom: 6px;
|
99 |
text-align: center;
|
100 |
text-transform: uppercase;
|
101 |
font-weight: 600;
|
img/thumbnails/hardwork_premium/screenshot2.jpg
ADDED
Binary file
|
inc/class-cmp-render_html.php
CHANGED
@@ -13,6 +13,20 @@ class cmp_render_html extends niteo_cmp {
|
|
13 |
// change background if preview background is set
|
14 |
if ( isset($_GET['background']) && is_numeric($_GET['background']) ) {
|
15 |
$niteoCS_banner = esc_attr($_GET['background']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
}
|
17 |
|
18 |
switch ( $niteoCS_banner ) {
|
@@ -510,7 +524,14 @@ class cmp_render_html extends niteo_cmp {
|
|
510 |
switch ( $themeslug ) {
|
511 |
case 'fifty': ?>
|
512 |
var contentWrapper = document.getElementsByClassName('content-wrapper')[0];
|
513 |
-
contentWrapper.className += " overflow";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
514 |
<?php
|
515 |
break;
|
516 |
|
@@ -564,7 +585,7 @@ class cmp_render_html extends niteo_cmp {
|
|
564 |
|
565 |
// if subsctbiers is niteo, render our html form
|
566 |
} else if ( $subscribe == '2' ) {
|
567 |
-
$niteoCS_subscribe_label = stripslashes(get_option('niteoCS_subscribe_label', '
|
568 |
|
569 |
if ( get_option('niteoCS_translation') ) {
|
570 |
$translation = json_decode( get_option('niteoCS_translation'), true );
|
@@ -599,6 +620,8 @@ class cmp_render_html extends niteo_cmp {
|
|
599 |
</div>
|
600 |
|
601 |
<div id="subscribe-response"><?php echo isset( $response ) ? $response : '';?></div>
|
|
|
|
|
602 |
</form>
|
603 |
|
604 |
<script>
|
@@ -620,6 +643,7 @@ class cmp_render_html extends niteo_cmp {
|
|
620 |
if ( this.readyState == 4 && this.status == 200 ) {
|
621 |
selectResult.innerHTML = this.responseText; // Display the result inside result element.
|
622 |
emailInput.value = '';
|
|
|
623 |
}
|
624 |
|
625 |
};
|
@@ -644,7 +668,10 @@ class cmp_render_html extends niteo_cmp {
|
|
644 |
|
645 |
/* Usage */
|
646 |
window.addEventListener("load",function(event) {
|
647 |
-
|
|
|
|
|
|
|
648 |
});
|
649 |
|
650 |
</script>
|
@@ -705,26 +732,25 @@ class cmp_render_html extends niteo_cmp {
|
|
705 |
* @return HTML
|
706 |
**/
|
707 |
public function cmp_get_body() {
|
708 |
-
|
709 |
if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
|
710 |
-
$theme_preview = esc_attr(
|
711 |
-
|
712 |
switch ( $theme_preview ) {
|
713 |
case 'hardwork':
|
714 |
case 'hardwork_premium':
|
715 |
-
|
716 |
break;
|
717 |
|
718 |
case 'countdown':
|
719 |
-
|
720 |
break;
|
721 |
|
722 |
case 'frame':
|
723 |
-
|
724 |
break;
|
725 |
|
726 |
case 'orbit':
|
727 |
-
|
728 |
break;
|
729 |
default:
|
730 |
|
@@ -743,22 +769,23 @@ class cmp_render_html extends niteo_cmp {
|
|
743 |
* @return HTML
|
744 |
**/
|
745 |
public function cmp_get_title( $class = '' ) {
|
|
|
746 |
|
747 |
if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
|
748 |
-
$theme_preview = esc_attr(
|
749 |
|
750 |
switch ( $theme_preview ) {
|
751 |
case 'hardwork':
|
752 |
case 'hardwork_premium':
|
753 |
-
|
754 |
break;
|
755 |
|
756 |
case 'eclipse':
|
757 |
-
|
758 |
break;
|
759 |
|
760 |
case 'orbit':
|
761 |
-
|
762 |
break;
|
763 |
|
764 |
default:
|
@@ -766,7 +793,6 @@ class cmp_render_html extends niteo_cmp {
|
|
766 |
}
|
767 |
|
768 |
} else {
|
769 |
-
global $allowedposttags;
|
770 |
return '<h2 class="animated '. $class .'">' . wp_kses( stripslashes( get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!') ), $allowedposttags ) . '</h2>';
|
771 |
}
|
772 |
}
|
13 |
// change background if preview background is set
|
14 |
if ( isset($_GET['background']) && is_numeric($_GET['background']) ) {
|
15 |
$niteoCS_banner = esc_attr($_GET['background']);
|
16 |
+
$theme = esc_attr($_GET['theme']);
|
17 |
+
|
18 |
+
// override background=1 (unsplash) to theme specific
|
19 |
+
switch ( $theme ) {
|
20 |
+
case 'orbit':
|
21 |
+
case 'frame':
|
22 |
+
case 'eclipse':
|
23 |
+
// default image
|
24 |
+
$niteoCS_banner = '2';
|
25 |
+
break;
|
26 |
+
|
27 |
+
default:
|
28 |
+
break;
|
29 |
+
}
|
30 |
}
|
31 |
|
32 |
switch ( $niteoCS_banner ) {
|
524 |
switch ( $themeslug ) {
|
525 |
case 'fifty': ?>
|
526 |
var contentWrapper = document.getElementsByClassName('content-wrapper')[0];
|
527 |
+
setTimeout(function(){ contentWrapper.className += " overflow"; }, 1500);
|
528 |
+
|
529 |
+
<?php
|
530 |
+
break;
|
531 |
+
|
532 |
+
case 'hardwork_premium': ?>
|
533 |
+
var contentWrapper = document.getElementsByClassName('section-body')[0];
|
534 |
+
setTimeout(function(){ contentWrapper.className += " overflow"; }, 1500);
|
535 |
<?php
|
536 |
break;
|
537 |
|
585 |
|
586 |
// if subsctbiers is niteo, render our html form
|
587 |
} else if ( $subscribe == '2' ) {
|
588 |
+
$niteoCS_subscribe_label = stripslashes(get_option('niteoCS_subscribe_label', 'Subscribe for awesome news!'));
|
589 |
|
590 |
if ( get_option('niteoCS_translation') ) {
|
591 |
$translation = json_decode( get_option('niteoCS_translation'), true );
|
620 |
</div>
|
621 |
|
622 |
<div id="subscribe-response"><?php echo isset( $response ) ? $response : '';?></div>
|
623 |
+
|
624 |
+
<div id="subscribe-overlay"></div>
|
625 |
</form>
|
626 |
|
627 |
<script>
|
643 |
if ( this.readyState == 4 && this.status == 200 ) {
|
644 |
selectResult.innerHTML = this.responseText; // Display the result inside result element.
|
645 |
emailInput.value = '';
|
646 |
+
selectForm.classList.add('-subscribed');
|
647 |
}
|
648 |
|
649 |
};
|
668 |
|
669 |
/* Usage */
|
670 |
window.addEventListener("load",function(event) {
|
671 |
+
document.getElementById('submit-subscribe').onclick = function() {
|
672 |
+
AJAXform( 'subscribe-form', 'submit-subscribe', 'subscribe-response', 'email-subscribe', 'POST' );
|
673 |
+
}
|
674 |
+
|
675 |
});
|
676 |
|
677 |
</script>
|
732 |
* @return HTML
|
733 |
**/
|
734 |
public function cmp_get_body() {
|
|
|
735 |
if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
|
736 |
+
$theme_preview = esc_attr($_GET['theme']);
|
737 |
+
|
738 |
switch ( $theme_preview ) {
|
739 |
case 'hardwork':
|
740 |
case 'hardwork_premium':
|
741 |
+
echo '<p>Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas. Everti labores cu sea, ea eam choro semper, usu an quot vocibus euripidis. An vis porro insolens, ea graeci vulputate qui. Qui vidisse evertitur et, ea vis habemus fabellas.</p>';
|
742 |
break;
|
743 |
|
744 |
case 'countdown':
|
745 |
+
echo '<h2>We are currently improving our site</h2>';
|
746 |
break;
|
747 |
|
748 |
case 'frame':
|
749 |
+
echo '<p>Stay tuned for new features!</p>';
|
750 |
break;
|
751 |
|
752 |
case 'orbit':
|
753 |
+
echo '<p>Orbit is a modern and fun theme for your short maintenance mode. You can set custom background, social icons, footer message and of course the main content. We recommend to keep it simple by setting up only a gradient background.</p>';
|
754 |
break;
|
755 |
default:
|
756 |
|
769 |
* @return HTML
|
770 |
**/
|
771 |
public function cmp_get_title( $class = '' ) {
|
772 |
+
global $allowedposttags;
|
773 |
|
774 |
if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
|
775 |
+
$theme_preview = esc_attr($_GET['theme']);
|
776 |
|
777 |
switch ( $theme_preview ) {
|
778 |
case 'hardwork':
|
779 |
case 'hardwork_premium':
|
780 |
+
echo '<h2>We will be back soon!</h2>';
|
781 |
break;
|
782 |
|
783 |
case 'eclipse':
|
784 |
+
echo '<h2>Free theme for our <a href="https://wordpress.org/plugins/cmp-coming-soon-maintenance/" target="_blank">Coming Soon WordPress plugin.</a></h2>';
|
785 |
break;
|
786 |
|
787 |
case 'orbit':
|
788 |
+
echo '<h2>WE ARE IN ORBIT ! STAY TUNED ...</h2>';
|
789 |
break;
|
790 |
|
791 |
default:
|
793 |
}
|
794 |
|
795 |
} else {
|
|
|
796 |
return '<h2 class="animated '. $class .'">' . wp_kses( stripslashes( get_option('niteoCS_body_title', 'SOMETHING IS HAPPENING!') ), $allowedposttags ) . '</h2>';
|
797 |
}
|
798 |
}
|
inc/preview-iframe.php
CHANGED
@@ -18,6 +18,7 @@
|
|
18 |
$theme_slug = esc_attr($_GET['theme']);
|
19 |
$theme_name = str_replace('_', ' ', ucwords($theme_slug));
|
20 |
$theme_var = '&theme='.esc_attr($_GET['theme']);
|
|
|
21 |
} else {
|
22 |
|
23 |
$theme_slug = 'hardwork';
|
@@ -25,8 +26,6 @@
|
|
25 |
$theme_var = '&theme=hardwork';
|
26 |
}
|
27 |
|
28 |
-
|
29 |
-
|
30 |
if ( isset($_GET['background']) && is_numeric($_GET['background'])) {
|
31 |
$background = $_GET['background'];
|
32 |
$background_attr = '&background='.esc_attr($background);
|
@@ -36,7 +35,7 @@
|
|
36 |
}
|
37 |
|
38 |
// get buy URL if premium Theme
|
39 |
-
if ( $this->niteo_in_array_r($theme_slug, $premium_themes) ) {
|
40 |
$buy = true;
|
41 |
foreach ( $premium_themes as $premium ) {
|
42 |
|
@@ -47,18 +46,32 @@
|
|
47 |
}
|
48 |
}
|
49 |
} ?>
|
|
|
50 |
<!-- SEO -->
|
51 |
<meta name="description" content="">
|
52 |
-
<title
|
53 |
|
54 |
<?php wp_site_icon(); ?>
|
55 |
|
56 |
-
|
57 |
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) .'/css/preview-iframe.css?ver='.esc_attr( $this->version ) ;?>" type="text/css" media="all">
|
58 |
|
59 |
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
60 |
|
61 |
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
</head>
|
63 |
|
64 |
|
@@ -91,8 +104,8 @@
|
|
91 |
|
92 |
<div class="panel purchase <?php echo ( $buy == true ) ? 'premium' : 'free';?>">
|
93 |
<a href="<?php echo esc_url( $buy_url );?>" target="_blank">
|
94 |
-
<i class="ion
|
95 |
-
<span><?php
|
96 |
</a>
|
97 |
</div>
|
98 |
|
@@ -106,32 +119,33 @@
|
|
106 |
|
107 |
<div class="customize-content">
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
<div class="background-selector">
|
110 |
<h3><?php _e('Background', 'cmp-coming-soon-maintenance');?></h3>
|
111 |
|
112 |
-
<a href="<?php echo esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $theme_slug );?>&background=1
|
113 |
|
114 |
-
<a href="<?php echo esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $theme_slug );?>&background=5
|
115 |
|
116 |
-
<a href="<?php echo esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $theme_slug );?>&background=3
|
117 |
|
118 |
-
<a href="<?php echo esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $theme_slug );?>&background=6
|
119 |
|
120 |
-
<a href="<?php echo esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $theme_slug );?>&background=4
|
121 |
|
122 |
</div>
|
123 |
-
<div class="theme-selector">
|
124 |
-
<h3><?php _e('Theme', 'cmp-coming-soon-maintenance');?><span class="theme-name"></span></h3>
|
125 |
-
<?php
|
126 |
-
foreach ( $this->theme_array as $slug ) {
|
127 |
-
if ( $slug !== 'eclipse') {
|
128 |
-
$title = str_replace('_', ' ', ucwords($slug));
|
129 |
-
echo '<a href="'.esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $slug ).esc_attr( $background_attr ).'&utm_source=selector&utm_medium=referral&utm_campaign='.esc_attr( $slug ).'" class="thumbnail" data-name="'.$title.'" data-slug="'.$slug.'">';
|
130 |
-
echo '<img src="'.plugin_dir_url( dirname( __FILE__ ) ) .'img/thumbnails/'.$slug.'_thumbnail.jpg" alt="CMP '.$title.'">';
|
131 |
-
echo '</a>';
|
132 |
-
}
|
133 |
-
} ?>
|
134 |
-
</div>
|
135 |
</div>
|
136 |
</div>
|
137 |
|
@@ -140,5 +154,5 @@
|
|
140 |
</body>
|
141 |
|
142 |
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.slim.min.js'></script>
|
143 |
-
<script type="text/javascript" src="<?php echo plugin_dir_url( dirname( __FILE__ ) ) .'
|
144 |
</html>
|
18 |
$theme_slug = esc_attr($_GET['theme']);
|
19 |
$theme_name = str_replace('_', ' ', ucwords($theme_slug));
|
20 |
$theme_var = '&theme='.esc_attr($_GET['theme']);
|
21 |
+
|
22 |
} else {
|
23 |
|
24 |
$theme_slug = 'hardwork';
|
26 |
$theme_var = '&theme=hardwork';
|
27 |
}
|
28 |
|
|
|
|
|
29 |
if ( isset($_GET['background']) && is_numeric($_GET['background'])) {
|
30 |
$background = $_GET['background'];
|
31 |
$background_attr = '&background='.esc_attr($background);
|
35 |
}
|
36 |
|
37 |
// get buy URL if premium Theme
|
38 |
+
if ( $this->niteo_in_array_r( $theme_slug, $premium_themes ) ) {
|
39 |
$buy = true;
|
40 |
foreach ( $premium_themes as $premium ) {
|
41 |
|
46 |
}
|
47 |
}
|
48 |
} ?>
|
49 |
+
|
50 |
<!-- SEO -->
|
51 |
<meta name="description" content="">
|
52 |
+
<title>Niteothemes CMP <?php echo esc_html( $theme_name ) .' '. __('Preview', 'cmp-coming-soon-maintenance');?></title>
|
53 |
|
54 |
<?php wp_site_icon(); ?>
|
55 |
|
|
|
56 |
<link rel="stylesheet" href="<?php echo plugin_dir_url( dirname( __FILE__ ) ) .'/css/preview-iframe.css?ver='.esc_attr( $this->version ) ;?>" type="text/css" media="all">
|
57 |
|
58 |
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
|
59 |
|
60 |
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600" rel="stylesheet">
|
61 |
+
|
62 |
+
<!-- Google analytics code -->
|
63 |
+
<!-- <script>
|
64 |
+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
65 |
+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
66 |
+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
67 |
+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
68 |
+
|
69 |
+
ga('create', 'UA-71587476-9', 'auto');
|
70 |
+
ga('send', 'pageview');
|
71 |
+
|
72 |
+
</script> -->
|
73 |
+
|
74 |
+
|
75 |
</head>
|
76 |
|
77 |
|
104 |
|
105 |
<div class="panel purchase <?php echo ( $buy == true ) ? 'premium' : 'free';?>">
|
106 |
<a href="<?php echo esc_url( $buy_url );?>" target="_blank">
|
107 |
+
<i class="ion ion-ios-cart" aria-hidden="true"></i>
|
108 |
+
<span><?php _e('Purchase Theme', 'cmp-coming-soon-maintenance');?></span>
|
109 |
</a>
|
110 |
</div>
|
111 |
|
119 |
|
120 |
<div class="customize-content">
|
121 |
|
122 |
+
<div class="theme-selector">
|
123 |
+
<h3><?php _e('Theme', 'cmp-coming-soon-maintenance');?><span class="theme-name"></span></h3>
|
124 |
+
<?php
|
125 |
+
foreach ( $this->theme_array as $slug ) {
|
126 |
+
|
127 |
+
$premium =
|
128 |
+
$title = str_replace( '_', ' ', ucwords($slug) );
|
129 |
+
echo '<a href="'.esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $slug ).esc_attr( $background_attr ).'&utm_campaign='.esc_attr( $slug ).'" class="thumbnail" data-name="'.$title.'" data-slug="'.$slug.'">';
|
130 |
+
echo '<img src="'.plugin_dir_url( dirname( __FILE__ ) ) .'img/thumbnails/'.$slug.'_thumbnail.jpg" alt="CMP '.$title.'">';
|
131 |
+
echo '</a>';
|
132 |
+
} ?>
|
133 |
+
</div>
|
134 |
+
|
135 |
<div class="background-selector">
|
136 |
<h3><?php _e('Background', 'cmp-coming-soon-maintenance');?></h3>
|
137 |
|
138 |
+
<a href="<?php echo esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $theme_slug );?>&background=1" class="thumbnail" data-background="1"><i class="ion ion-image" aria-hidden="true"></i><?php _e('Image', 'cmp-coming-soon-maintenance');?></a>
|
139 |
|
140 |
+
<a href="<?php echo esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $theme_slug );?>&background=5" class="thumbnail" data-background="5"><i class="ion ion-film-marker" aria-hidden="true"></i><?php _e('Video', 'cmp-coming-soon-maintenance');?></a>
|
141 |
|
142 |
+
<a href="<?php echo esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $theme_slug );?>&background=3" class="thumbnail" data-background="3"><i class="ion ion-grid" aria-hidden="true"></i><?php _e('Pattern', 'cmp-coming-soon-maintenance');?></a>
|
143 |
|
144 |
+
<a href="<?php echo esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $theme_slug );?>&background=6" class="thumbnail" data-background="6"><i class="ion ion-android-color-palette" aria-hidden="true"></i><?php _e('Gradient', 'cmp-coming-soon-maintenance');?></a>
|
145 |
|
146 |
+
<a href="<?php echo esc_url( get_site_url() ) . '/?cmp_preview=true&selector=true&theme='.esc_attr( $theme_slug );?>&background=4" class="thumbnail" data-background="4"><i class="ion ion-paintbucket" aria-hidden="true"></i><?php _e('Color', 'cmp-coming-soon-maintenance');?></a>
|
147 |
|
148 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
</div>
|
150 |
</div>
|
151 |
|
154 |
</body>
|
155 |
|
156 |
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.slim.min.js'></script>
|
157 |
+
<script type="text/javascript" src="<?php echo plugin_dir_url( dirname( __FILE__ ) ) .'js/preview-iframe.js?ver='.esc_attr( $this->version ) ;?>"></script>
|
158 |
</html>
|
inc/settings/settings-slider.php
CHANGED
@@ -49,13 +49,13 @@ $niteoCS_slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
|
|
49 |
|
50 |
<p>
|
51 |
<label title="Enabled">
|
52 |
-
<input type="radio" name="niteoCS_slider_<?php echo esc_attr($themeslug);?>" value="1"<?php if ( $niteoCS_slider == 1) { echo ' checked="checked"'; } ?>> <?php _e('Enabled', 'cmp-coming-soon-maintenance');?>
|
53 |
</label>
|
54 |
</p>
|
55 |
|
56 |
<p>
|
57 |
<label title="Disabled">
|
58 |
-
<input type="radio" name="niteoCS_slider_<?php echo esc_attr($themeslug);?>" value="0"<?php if ( $niteoCS_slider == 0) { echo ' checked="checked"'; } ?>> <?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
|
59 |
</label>
|
60 |
</p>
|
61 |
|
@@ -75,21 +75,21 @@ $niteoCS_slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
|
|
75 |
<p>
|
76 |
<label for="niteoCS_slider_effect">Slider Effect</label><br>
|
77 |
<label title="Slide Effect">
|
78 |
-
<input type="radio" name="niteoCS_slider_effect_<?php echo esc_attr($themeslug);?>" value="false"<?php if ( $niteoCS_slider_effect == 'false') { echo ' checked="checked"'; } ?>> <?php _e('Slide', 'cmp-coming-soon-maintenance');?>
|
79 |
</label><br>
|
80 |
|
81 |
<label title="Fade Effect">
|
82 |
-
<input type="radio" name="niteoCS_slider_effect_<?php echo esc_attr($themeslug);?>" value="true"<?php if ( $niteoCS_slider_effect == 'true') { echo ' checked="checked"'; } ?>> <?php _e('Fade', 'cmp-coming-soon-maintenance');?>
|
83 |
</label>
|
84 |
|
85 |
</p>
|
86 |
|
87 |
<p>
|
88 |
-
<input type="checkbox" name="niteoCS_slider_auto_<?php echo esc_attr($themeslug);?>" id="niteoCS_slider_auto" value="1" <?php checked( '1', get_option( 'niteoCS_slider_auto['.$themeslug.']', '0' ) ); ?> class="regular-text code"><label for="niteoCS_slider_auto"><?php _e('Slider Autostart', 'cmp-coming-soon-maintenance');?></label><br>
|
89 |
</p>
|
90 |
|
91 |
<label for="niteoCS_slider_count"><?php _e('Number of Unplash media Slides (applies only for Unsplash photos)', 'cmp-coming-soon-maintenance');?></label></br>
|
92 |
-
<select name="niteoCS_slider_count_<?php echo esc_attr($themeslug);?>" <?php
|
93 |
<option value="2" <?php if ( $niteoCS_slider_count == '2' ) { echo ' selected="selected"'; } ?>>2</option>
|
94 |
<option value="3" <?php if ( $niteoCS_slider_count == '3' ) { echo ' selected="selected"'; } ?>>3</option>
|
95 |
<option value="4" <?php if ( $niteoCS_slider_count == '4' ) { echo ' selected="selected"'; } ?>>4</option>
|
@@ -119,39 +119,37 @@ jQuery(document).ready(function($){
|
|
119 |
jQuery('#slider-enabled').css('display','block');
|
120 |
}
|
121 |
});
|
122 |
-
jQuery('#csoptions input[name="niteoCS_slider_<?php echo esc_attr($themeslug);?>"]')
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
// jQuery('#csoptions input[name="niteoCS_banner_<?php echo esc_attr($themeslug);?>"]').trigger('change');
|
154 |
-
}
|
155 |
|
156 |
});
|
157 |
</script>
|
49 |
|
50 |
<p>
|
51 |
<label title="Enabled">
|
52 |
+
<input type="radio" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> name="niteoCS_slider_<?php echo esc_attr($themeslug);?>" value="1"<?php if ( $niteoCS_slider == 1) { echo ' checked="checked"'; } ?>> <?php _e('Enabled', 'cmp-coming-soon-maintenance');?>
|
53 |
</label>
|
54 |
</p>
|
55 |
|
56 |
<p>
|
57 |
<label title="Disabled">
|
58 |
+
<input type="radio" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> name="niteoCS_slider_<?php echo esc_attr($themeslug);?>" value="0"<?php if ( $niteoCS_slider == 0) { echo ' checked="checked"'; } ?>> <?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
|
59 |
</label>
|
60 |
</p>
|
61 |
|
75 |
<p>
|
76 |
<label for="niteoCS_slider_effect">Slider Effect</label><br>
|
77 |
<label title="Slide Effect">
|
78 |
+
<input type="radio" name="niteoCS_slider_effect_<?php echo esc_attr($themeslug);?>" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> value="false"<?php if ( $niteoCS_slider_effect == 'false') { echo ' checked="checked"'; } ?>> <?php _e('Slide', 'cmp-coming-soon-maintenance');?>
|
79 |
</label><br>
|
80 |
|
81 |
<label title="Fade Effect">
|
82 |
+
<input type="radio" name="niteoCS_slider_effect_<?php echo esc_attr($themeslug);?>" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> value="true"<?php if ( $niteoCS_slider_effect == 'true') { echo ' checked="checked"'; } ?>> <?php _e('Fade', 'cmp-coming-soon-maintenance');?>
|
83 |
</label>
|
84 |
|
85 |
</p>
|
86 |
|
87 |
<p>
|
88 |
+
<input type="checkbox" name="niteoCS_slider_auto_<?php echo esc_attr($themeslug);?>" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> id="niteoCS_slider_auto" value="1" <?php checked( '1', get_option( 'niteoCS_slider_auto['.$themeslug.']', '0' ) ); ?> class="regular-text code"><label for="niteoCS_slider_auto"><?php _e('Slider Autostart', 'cmp-coming-soon-maintenance');?></label><br>
|
89 |
</p>
|
90 |
|
91 |
<label for="niteoCS_slider_count"><?php _e('Number of Unplash media Slides (applies only for Unsplash photos)', 'cmp-coming-soon-maintenance');?></label></br>
|
92 |
+
<select name="niteoCS_slider_count_<?php echo esc_attr($themeslug);?>" <?php echo ( $niteoCS_banner != '1' ) ? 'disabled' : '';?>>
|
93 |
<option value="2" <?php if ( $niteoCS_slider_count == '2' ) { echo ' selected="selected"'; } ?>>2</option>
|
94 |
<option value="3" <?php if ( $niteoCS_slider_count == '3' ) { echo ' selected="selected"'; } ?>>3</option>
|
95 |
<option value="4" <?php if ( $niteoCS_slider_count == '4' ) { echo ' selected="selected"'; } ?>>4</option>
|
119 |
jQuery('#slider-enabled').css('display','block');
|
120 |
}
|
121 |
});
|
122 |
+
jQuery('#csoptions input[name="niteoCS_slider_<?php echo esc_attr($themeslug);?>"]');
|
123 |
+
|
124 |
+
|
125 |
+
jQuery('#csoptions input[name="niteoCS_banner_<?php echo esc_attr($themeslug);?>"]').bind('change', function () {
|
126 |
+
|
127 |
+
switch( jQuery('#csoptions input[name="niteoCS_banner_<?php echo esc_attr($themeslug);?>"]:checked' ).val() ) {
|
128 |
+
case '0':
|
129 |
+
jQuery('.table-wrapper.slider input, .table-wrapper.slider select').prop('disabled', false);
|
130 |
+
jQuery('#csoptions select[name="niteoCS_slider_count_<?php echo esc_attr($themeslug);?>"]').attr('disabled', true);
|
131 |
+
|
132 |
+
break;
|
133 |
+
case '1':
|
134 |
+
if (jQuery('select[name="unsplash_feed_<?php echo esc_attr($themeslug);?>"]').val() != 0 ) {
|
135 |
+
jQuery('.table-wrapper.slider input, .table-wrapper.slider select').prop('disabled', false);
|
136 |
+
}
|
137 |
+
break;
|
138 |
+
|
139 |
+
case '2':
|
140 |
+
jQuery('.table-wrapper.slider input, .table-wrapper.slider select').prop('disabled', true);
|
141 |
+
break;
|
142 |
+
case '3':
|
143 |
+
jQuery('.table-wrapper.slider input, .table-wrapper.slider select').prop('disabled', true);
|
144 |
+
break;
|
145 |
+
case '4':
|
146 |
+
jQuery('.table-wrapper.slider input, .table-wrapper.slider select').prop('disabled', true);
|
147 |
+
break;
|
148 |
+
default:
|
149 |
+
jQuery('.table-wrapper.slider input, .table-wrapper.slider select').prop('disabled', true);
|
150 |
+
}
|
151 |
+
});
|
152 |
+
|
|
|
|
|
153 |
|
154 |
});
|
155 |
</script>
|
js/preview-iframe.js
CHANGED
@@ -15,10 +15,12 @@ $( document ).ready(function() {
|
|
15 |
|
16 |
$('.panel.open').click(function(e){
|
17 |
e.preventDefault();
|
|
|
18 |
$('body').toggleClass('open');
|
19 |
});
|
20 |
|
21 |
$('.background-wrap').click(function(e){
|
|
|
22 |
$('body').removeClass('open');
|
23 |
});
|
24 |
|
@@ -30,6 +32,8 @@ $( document ).ready(function() {
|
|
30 |
slug = $(this).data('slug');
|
31 |
name = $(this).data('name');
|
32 |
$('body').removeClass('open');
|
|
|
|
|
33 |
|
34 |
$('#theme-preview').removeClass('loaded');
|
35 |
// reload iframe
|
@@ -38,6 +42,8 @@ $( document ).ready(function() {
|
|
38 |
// process premium / free themes
|
39 |
$('.purchase').removeClass('premium').addClass('free');
|
40 |
|
|
|
|
|
41 |
for (var i = 0, len = premium.length; i < len; i++) {
|
42 |
|
43 |
if ( premium[i].name == slug ) {
|
@@ -59,11 +65,9 @@ $( document ).ready(function() {
|
|
59 |
|
60 |
// change browser url
|
61 |
$(document).prop('title', name + ' Preview');
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
});
|
66 |
|
|
|
67 |
$('.background-selector a').click(function(e){
|
68 |
e.preventDefault();
|
69 |
new_url = $(this).attr('href');
|
@@ -75,6 +79,8 @@ $( document ).ready(function() {
|
|
75 |
$('.background-selector a').removeClass('selected');
|
76 |
$(this).addClass('selected');
|
77 |
|
|
|
|
|
78 |
// reload iframe
|
79 |
$('#theme-preview').attr('src', iframe_url);
|
80 |
ChangeUrl(new_url, new_url);
|
15 |
|
16 |
$('.panel.open').click(function(e){
|
17 |
e.preventDefault();
|
18 |
+
ga('send', 'event', 'Open Selector', 'Open Selector');
|
19 |
$('body').toggleClass('open');
|
20 |
});
|
21 |
|
22 |
$('.background-wrap').click(function(e){
|
23 |
+
ga('send', 'event', 'Close Selector', 'Close Selector');
|
24 |
$('body').removeClass('open');
|
25 |
});
|
26 |
|
32 |
slug = $(this).data('slug');
|
33 |
name = $(this).data('name');
|
34 |
$('body').removeClass('open');
|
35 |
+
|
36 |
+
ga('send', 'event', 'Change Theme', 'Change Theme to: ' + name);
|
37 |
|
38 |
$('#theme-preview').removeClass('loaded');
|
39 |
// reload iframe
|
42 |
// process premium / free themes
|
43 |
$('.purchase').removeClass('premium').addClass('free');
|
44 |
|
45 |
+
var price = $(this).data('price');
|
46 |
+
|
47 |
for (var i = 0, len = premium.length; i < len; i++) {
|
48 |
|
49 |
if ( premium[i].name == slug ) {
|
65 |
|
66 |
// change browser url
|
67 |
$(document).prop('title', name + ' Preview');
|
|
|
|
|
|
|
68 |
});
|
69 |
|
70 |
+
|
71 |
$('.background-selector a').click(function(e){
|
72 |
e.preventDefault();
|
73 |
new_url = $(this).attr('href');
|
79 |
$('.background-selector a').removeClass('selected');
|
80 |
$(this).addClass('selected');
|
81 |
|
82 |
+
ga('send', 'event', 'Change background', 'Change background to: ' + new_background);
|
83 |
+
|
84 |
// reload iframe
|
85 |
$('#theme-preview').attr('src', iframe_url);
|
86 |
ChangeUrl(new_url, new_url);
|
js/settings.js
CHANGED
@@ -820,7 +820,7 @@ jQuery(document).ready(function($){
|
|
820 |
}
|
821 |
});
|
822 |
|
823 |
-
jQuery(
|
824 |
});
|
825 |
|
826 |
// attach arrows navigation handler
|
820 |
}
|
821 |
});
|
822 |
|
823 |
+
jQuery( this ).submit();
|
824 |
});
|
825 |
|
826 |
// attach arrows navigation handler
|
js/settings.min.js
CHANGED
@@ -23,7 +23,7 @@ var data={action:'cmp_theme_update_install',security:security,file:update};$pare
|
|
23 |
var data={action:'cmp_theme_update_install',security:security,file:update};$this.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>');$.post(ajaxurl,data,function(response){if(response=='success'){setTimeout(function(){$this.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>');setTimeout(function(){$this.fadeOut()},1500)},1500)}else{response=response.slice(0,-1);$this.html('<i class="fa fa-frown-o" aria-hidden="true"></i><span>Update Failed!</span>')}})});jQuery('.theme-details').click(function(){var $this=$(this),$wrapper=$this.closest('.theme-wrapper'),slug=$wrapper.data('slug'),version=$wrapper.data('version'),remoteUrl=$wrapper.data('remote_url'),type=$wrapper.data('type'),purchased=$wrapper.data('purchased'),freebie=$wrapper.data('freebie'),noticeHtml='',security=jQuery('.update-theme').data('security'),price=$wrapper.data('price'),i=0;var data={action:'niteo_themeinfo',security:jQuery('.theme-wrapper').data('security'),theme_slug:jQuery(this).parents('.theme-wrapper').data('slug'),};$.post(ajaxurl,data,function(response){var buttonDisabled='';var buyButton='';var versionInfo='';var noticeHtml='';response=jQuery.parseJSON(response);if(response.result=='true'){jQuery('body').addClass('modal-open');if(purchased=='1'){versionInfo='<span class="theme-version">Version: '+version+'</span>';noticeHtml='<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>';if(jQuery('.update-theme').length){var updateSlug=jQuery('.update-theme').data('slug');if(slug==updateSlug){var newVer=jQuery('.update-theme').data('new_ver');noticeHtml='<div class="notice notice-warning notice-alt notice-large"><h3 class="notice-title">Update Available</h3><p class="message"><strong>There is a new version of '+response.name+' theme available. <a href="'+remoteUrl+'readme/'+slug+'-readme.php" class="view-release">View update '+newVer+' notes</a> or <a href="'+window.location.href+'&action=update-cmp-theme&theme='+slug+'" class="update-theme" data-security="'+security+'" data-slug="'+slug+'" data-remote_url="'+remoteUrl+'">Update now.</a></strong></p><div class="release-note"></div></div>'}}}
|
24 |
if(purchased!='1'&&type=='premium'){var buttonDisabled='disabled ';var buyURL=$wrapper.find('a').attr('href');price=(price==0)?'Download':'$'+price;var buyButton='<button type="button" class="theme-purchase button hide"><a href="'+buyURL+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>'+price+'</a></button>';if(freebie){var buyButton='<p style="font-weight: bold;font-size: 1.2em;margin-bottom: 8px;">Pay what you want</p>'+buyButton}}
|
25 |
var screenshots=response.screenshots;var arrows='';if(Object.keys(screenshots).length>1){arrows='<div class="screenshots-nav"><div class="left"><i class="fa fa-chevron-left" aria-hidden="true"></i></div><div class="right"><i class="fa fa-chevron-right" aria-hidden="true"></i></div></div>'}
|
26 |
-
var html=$(['<div class="theme-backdrop">',' <div class="theme-wrap">',' <div class="theme-header">',' <button class="close dashicons dashicons-no"><span class="screen-reader-text">Close details dialog</span></button>',' </div>',' <div class="theme-about">',' <div class="theme-screenshots">',' <div class="screenshot" style="background-image:url(\''+screenshots['0']+'\')">'+arrows+'</div>',' </div>',' <div class="theme-info">',' <h2 class="theme-name">'+response.name+versionInfo+'</h2>',' <p class="theme-author">By <a href="'+response.author_homepage+'" target="_blank">'+response.author+'</a></p>',noticeHtml,buyButton,' <div class="theme-description">'+response.description+'</div>',' </div>',' </div>',' <div class="theme-actions">',' <button type="submit" '+buttonDisabled+'class="button activate" name="Submit" aria-label="Select '+response.name+'">Activate</button>',' <a href="http://cmp.niteothemes.com/?cmp_preview=true&selector=true&theme='+slug+'&utm_source=cmp&utm_medium=referral&utm_campaign='+slug+'" class="button cmp-preview" target="_blank" aria-label="Preview '+response.name+'">Live Preview</a>',' </div>',' </div>','</div>',].join("\n"));jQuery('.theme-overlay.cmp').append(html);jQuery('.theme-overlay.cmp .view-release').click(function(e){e.preventDefault();$this=jQuery(this);var release_url=$this.attr('href');jQuery.get(release_url,function(release){$this.closest('.notice').find('.release-note .notes').remove();$this.closest('.notice').find('.release-note').append('<div class="notes">'+release+'</div>')}).fail(function(){$this.closest('.notice').find('.release-note p').remove();$this.closest('.notice').find('.release-note').append('<p>There was an error loading release notes. Please try again later.</p>')})});jQuery('.theme-overlay.cmp .close').click(function(e){e.preventDefault();jQuery('body').removeClass('modal-open');jQuery('.theme-overlay.cmp .theme-backdrop').fadeOut('fast')});jQuery('.theme-overlay.cmp .activate').click(function(e){e.preventDefault();jQuery('input[name="select_theme"]').each(function(){if(jQuery(this).val()==slug){jQuery(this).prop('checked',!0);jQuery('.theme-select').removeClass('selected');jQuery(this).parent().addClass('selected')}});jQuery(
|
27 |
if((i in screenshots)){jQuery('.screenshot').css('background-image','url(\''+screenshots[i]+'\')')}});jQuery('.screenshots-nav .left').click(function(){i--;if(i<0){i=Object.keys(screenshots).length-1}
|
28 |
if((i in screenshots)){jQuery('.screenshot').css('background-image','url(\''+screenshots[i]+'\')')}})}})});jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger('change');media_upload_button('logo',!1,'image');media_upload_button('favicon',!1,'image');media_upload_button('images',!0,'image');media_upload_button('pattern',!1,'image');media_upload_button('video-thumb',!1,'image');media_upload_button('video',!1,'video');$('#niteoCS_overlay_opacity').on('input',function(){$(this).trigger('change')});jQuery('#niteoCS_overlay_opacity').change(function(){if(this.value==0){jQuery('#current-opacity').html(': transparent')}else{jQuery('#current-opacity').html(': '+this.value)}});function ucwords(str){return(str+'').replace(/^([a-z])|\s+([a-z])/g,function($1){return $1.toUpperCase()})}
|
29 |
function strtolower(str){return(str+'').toLowerCase()}
|
23 |
var data={action:'cmp_theme_update_install',security:security,file:update};$this.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>');$.post(ajaxurl,data,function(response){if(response=='success'){setTimeout(function(){$this.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>');setTimeout(function(){$this.fadeOut()},1500)},1500)}else{response=response.slice(0,-1);$this.html('<i class="fa fa-frown-o" aria-hidden="true"></i><span>Update Failed!</span>')}})});jQuery('.theme-details').click(function(){var $this=$(this),$wrapper=$this.closest('.theme-wrapper'),slug=$wrapper.data('slug'),version=$wrapper.data('version'),remoteUrl=$wrapper.data('remote_url'),type=$wrapper.data('type'),purchased=$wrapper.data('purchased'),freebie=$wrapper.data('freebie'),noticeHtml='',security=jQuery('.update-theme').data('security'),price=$wrapper.data('price'),i=0;var data={action:'niteo_themeinfo',security:jQuery('.theme-wrapper').data('security'),theme_slug:jQuery(this).parents('.theme-wrapper').data('slug'),};$.post(ajaxurl,data,function(response){var buttonDisabled='';var buyButton='';var versionInfo='';var noticeHtml='';response=jQuery.parseJSON(response);if(response.result=='true'){jQuery('body').addClass('modal-open');if(purchased=='1'){versionInfo='<span class="theme-version">Version: '+version+'</span>';noticeHtml='<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>';if(jQuery('.update-theme').length){var updateSlug=jQuery('.update-theme').data('slug');if(slug==updateSlug){var newVer=jQuery('.update-theme').data('new_ver');noticeHtml='<div class="notice notice-warning notice-alt notice-large"><h3 class="notice-title">Update Available</h3><p class="message"><strong>There is a new version of '+response.name+' theme available. <a href="'+remoteUrl+'readme/'+slug+'-readme.php" class="view-release">View update '+newVer+' notes</a> or <a href="'+window.location.href+'&action=update-cmp-theme&theme='+slug+'" class="update-theme" data-security="'+security+'" data-slug="'+slug+'" data-remote_url="'+remoteUrl+'">Update now.</a></strong></p><div class="release-note"></div></div>'}}}
|
24 |
if(purchased!='1'&&type=='premium'){var buttonDisabled='disabled ';var buyURL=$wrapper.find('a').attr('href');price=(price==0)?'Download':'$'+price;var buyButton='<button type="button" class="theme-purchase button hide"><a href="'+buyURL+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>'+price+'</a></button>';if(freebie){var buyButton='<p style="font-weight: bold;font-size: 1.2em;margin-bottom: 8px;">Pay what you want</p>'+buyButton}}
|
25 |
var screenshots=response.screenshots;var arrows='';if(Object.keys(screenshots).length>1){arrows='<div class="screenshots-nav"><div class="left"><i class="fa fa-chevron-left" aria-hidden="true"></i></div><div class="right"><i class="fa fa-chevron-right" aria-hidden="true"></i></div></div>'}
|
26 |
+
var html=$(['<div class="theme-backdrop">',' <div class="theme-wrap">',' <div class="theme-header">',' <button class="close dashicons dashicons-no"><span class="screen-reader-text">Close details dialog</span></button>',' </div>',' <div class="theme-about">',' <div class="theme-screenshots">',' <div class="screenshot" style="background-image:url(\''+screenshots['0']+'\')">'+arrows+'</div>',' </div>',' <div class="theme-info">',' <h2 class="theme-name">'+response.name+versionInfo+'</h2>',' <p class="theme-author">By <a href="'+response.author_homepage+'" target="_blank">'+response.author+'</a></p>',noticeHtml,buyButton,' <div class="theme-description">'+response.description+'</div>',' </div>',' </div>',' <div class="theme-actions">',' <button type="submit" '+buttonDisabled+'class="button activate" name="Submit" aria-label="Select '+response.name+'">Activate</button>',' <a href="http://cmp.niteothemes.com/?cmp_preview=true&selector=true&theme='+slug+'&utm_source=cmp&utm_medium=referral&utm_campaign='+slug+'" class="button cmp-preview" target="_blank" aria-label="Preview '+response.name+'">Live Preview</a>',' </div>',' </div>','</div>',].join("\n"));jQuery('.theme-overlay.cmp').append(html);jQuery('.theme-overlay.cmp .view-release').click(function(e){e.preventDefault();$this=jQuery(this);var release_url=$this.attr('href');jQuery.get(release_url,function(release){$this.closest('.notice').find('.release-note .notes').remove();$this.closest('.notice').find('.release-note').append('<div class="notes">'+release+'</div>')}).fail(function(){$this.closest('.notice').find('.release-note p').remove();$this.closest('.notice').find('.release-note').append('<p>There was an error loading release notes. Please try again later.</p>')})});jQuery('.theme-overlay.cmp .close').click(function(e){e.preventDefault();jQuery('body').removeClass('modal-open');jQuery('.theme-overlay.cmp .theme-backdrop').fadeOut('fast')});jQuery('.theme-overlay.cmp .activate').click(function(e){e.preventDefault();jQuery('input[name="select_theme"]').each(function(){if(jQuery(this).val()==slug){jQuery(this).prop('checked',!0);jQuery('.theme-select').removeClass('selected');jQuery(this).parent().addClass('selected')}});jQuery(this).submit()});jQuery('.screenshots-nav .right').click(function(){i++;if(i==Object.keys(screenshots).length){i=0}
|
27 |
if((i in screenshots)){jQuery('.screenshot').css('background-image','url(\''+screenshots[i]+'\')')}});jQuery('.screenshots-nav .left').click(function(){i--;if(i<0){i=Object.keys(screenshots).length-1}
|
28 |
if((i in screenshots)){jQuery('.screenshot').css('background-image','url(\''+screenshots[i]+'\')')}})}})});jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger('change');media_upload_button('logo',!1,'image');media_upload_button('favicon',!1,'image');media_upload_button('images',!0,'image');media_upload_button('pattern',!1,'image');media_upload_button('video-thumb',!1,'image');media_upload_button('video',!1,'video');$('#niteoCS_overlay_opacity').on('input',function(){$(this).trigger('change')});jQuery('#niteoCS_overlay_opacity').change(function(){if(this.value==0){jQuery('#current-opacity').html(': transparent')}else{jQuery('#current-opacity').html(': '+this.value)}});function ucwords(str){return(str+'').replace(/^([a-z])|\s+([a-z])/g,function($1){return $1.toUpperCase()})}
|
29 |
function strtolower(str){return(str+'').toLowerCase()}
|
niteo-cmp.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: CMP - Coming Soon & Maintenance Plugin
|
4 |
Plugin URI: https://wordpress.org/plugins/cmp-coming-soon-maintenance/
|
5 |
Description: Display customizable landing page for Coming Soon, Maintenance & Under Construction page.
|
6 |
-
Version: 2.4
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
@@ -18,7 +18,7 @@ class niteo_cmp {
|
|
18 |
public function __construct() {
|
19 |
$this->author = 'NiteoThemes';
|
20 |
$this->author_homepage = 'https://niteothemes.com';
|
21 |
-
$this->version = '2.4';
|
22 |
$this->dev = false;
|
23 |
$this->plugins_dir_path = plugin_dir_path( __DIR__ );
|
24 |
if ( $this->plugins_dir_path == './') {
|
@@ -51,10 +51,10 @@ class niteo_cmp {
|
|
51 |
}
|
52 |
|
53 |
public function init() {
|
54 |
-
add_action( 'admin_notices', array($this, 'cmp_admin_notice'));
|
55 |
-
add_action('template_redirect', array($this, 'cmp_displayPage'));
|
56 |
-
add_action('wp_login', array($this, 'cmp_admin_override'));
|
57 |
-
add_action('wp_before_admin_bar_render',array( $this, 'cmp_admin_bar' ));
|
58 |
add_action( 'wp_ajax_niteo_themeinfo', array($this, 'niteo_themeinfo') );
|
59 |
add_action( 'wp_ajax_niteo_unsplash', array($this, 'niteo_unsplash') );
|
60 |
add_action( 'wp_ajax_niteo_export_csv', array($this, 'niteo_export_csv') );
|
@@ -62,13 +62,13 @@ class niteo_cmp {
|
|
62 |
add_action( 'wp_ajax_cmp_toggle_activation', array($this, 'cmp_toggle_activation') );
|
63 |
add_action( 'wp_ajax_nopriv_niteo_subscribe', array($this, 'niteo_subscribe') );
|
64 |
add_action( 'wp_ajax_niteo_subscribe', array($this, 'niteo_subscribe') );
|
65 |
-
add_action('plugins_loaded', array($this, 'cmp_textDomain') );
|
66 |
-
add_action('admin_menu', array($this, 'cmp_adminMenu'), 10);
|
67 |
-
add_action('admin_init', array($this, 'cmp_adminInit'));
|
68 |
-
add_action('admin_init', array($this, 'cmp_admin_override'));
|
69 |
add_action( 'admin_enqueue_scripts', array($this,'cmp_add_admin_style') );
|
70 |
add_action( 'wp_enqueue_scripts', array($this,'cmp_add_admin_style') );
|
71 |
-
add_action('upgrader_process_complete', array($this, 'cmp_plugin_update'), 10, 2);
|
72 |
|
73 |
register_activation_hook( __FILE__, array($this, 'cmp_activate') );
|
74 |
register_deactivation_hook( __FILE__, array($this, 'cmp_deactivate') );
|
@@ -97,7 +97,7 @@ class niteo_cmp {
|
|
97 |
wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true);
|
98 |
wp_register_script( 'select2-js', plugins_url('/js/select2.min.js', __FILE__) );
|
99 |
wp_register_script( 'cmp-typography', plugins_url('/js/typography'.$this->minified.'.js', __FILE__), array('select2-js' ), $this->version );
|
100 |
-
wp_register_script( 'cmp_settings_js', plugins_url('/js/settings'.$this->minified.'.js', __FILE__), array('webfont'), $this->version);
|
101 |
wp_register_script('countdown_flatpicker_js', plugins_url('/js/flatpickr.min.js', __FILE__) );
|
102 |
}
|
103 |
|
@@ -231,7 +231,7 @@ class niteo_cmp {
|
|
231 |
|
232 |
// preview for specific theme cmp_preview=true&theme=slug
|
233 |
if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
|
234 |
-
$theme_preview = esc_attr(
|
235 |
|
236 |
if ( file_exists( $this->cmp_themePath( $theme_preview ).$theme_preview.'/'.$theme_preview.'-theme.php') ) {
|
237 |
require_once ( $this->cmp_themePath( $theme_preview) .$theme_preview.'/'.$theme_preview.'-theme.php' );
|
@@ -404,6 +404,27 @@ class niteo_cmp {
|
|
404 |
// display admin topbar notice
|
405 |
public function cmp_admin_bar(){
|
406 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
407 |
require_once(ABSPATH . 'wp-admin/includes/screen.php');
|
408 |
|
409 |
$roles_topbar = json_decode( get_option('niteoCS_roles_topbar', '[]'), true );
|
@@ -415,6 +436,8 @@ class niteo_cmp {
|
|
415 |
|
416 |
// if current user cannot access topbar, return
|
417 |
foreach ( $current_user->roles as $role ) {
|
|
|
|
|
418 |
if ( !in_array( $role, $roles_topbar ) ) {
|
419 |
return false;
|
420 |
}
|
@@ -426,26 +449,6 @@ class niteo_cmp {
|
|
426 |
$class = '';
|
427 |
$msg= '';
|
428 |
|
429 |
-
// check onces and wordpress rights, else DIE
|
430 |
-
if ( $_SERVER['REQUEST_METHOD'] == 'POST' && (get_current_screen() && get_current_screen()->id == 'toplevel_page_cmp-settings' ) ) {
|
431 |
-
//verify nonce and user rights
|
432 |
-
if ( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
|
433 |
-
die('Sorry, but this request is invalid');
|
434 |
-
}
|
435 |
-
|
436 |
-
if ( isset($_POST['activate']) && is_numeric($_POST['activate']) ) {
|
437 |
-
update_option('niteoCS_activation', sanitize_text_field($_POST['activate']));
|
438 |
-
}
|
439 |
-
|
440 |
-
if ( isset($_POST['cmp_status']) ) {
|
441 |
-
update_option('niteoCS_status', $this->sanitize_checkbox($_POST['cmp_status']) );
|
442 |
-
} else {
|
443 |
-
|
444 |
-
update_option('niteoCS_status', false);
|
445 |
-
}
|
446 |
-
|
447 |
-
|
448 |
-
}
|
449 |
|
450 |
switch ( get_option( 'niteoCS_activation', '2' ) ) {
|
451 |
case '1':
|
@@ -548,12 +551,12 @@ class niteo_cmp {
|
|
548 |
// returns list of premium themes => manually defined
|
549 |
public function cmp_premium_themes() {
|
550 |
$premium_themes = array();
|
551 |
-
array_push( $premium_themes, array('name' => 'fifty', 'url' => 'https://niteothemes.com
|
552 |
-
array_push( $premium_themes, array('name' => 'hardwork_premium', 'url' => 'https://niteothemes.com
|
553 |
-
array_push( $premium_themes, array('name' => 'postery', 'url' => 'https://niteothemes.com
|
554 |
-
array_push( $premium_themes, array('name' => 'frame', 'url' => 'https://niteothemes.com
|
555 |
-
array_push( $premium_themes, array('name' => 'eclipse', 'url' => 'https://niteothemes.com
|
556 |
-
array_push( $premium_themes, array('name' => 'orbit', 'url' => 'https://niteothemes.com
|
557 |
|
558 |
return $premium_themes;
|
559 |
}
|
@@ -970,7 +973,7 @@ class niteo_cmp {
|
|
970 |
public function niteo_subscribe( $check ) {
|
971 |
|
972 |
$response = '';
|
973 |
-
$response_invalid = '';
|
974 |
$ajax = false;
|
975 |
|
976 |
// check for ajax request
|
@@ -984,9 +987,10 @@ class niteo_cmp {
|
|
984 |
if ( $_SERVER['REQUEST_METHOD'] == 'POST'
|
985 |
&& isset( $_POST['form_honeypot'] )
|
986 |
&& $_POST['form_honeypot'] === ''
|
987 |
-
&& isset( $_POST['EMAIL'] )
|
988 |
-
|
989 |
-
|
|
|
990 |
|
991 |
$email = $_POST['EMAIL'];
|
992 |
$timestamp = time();
|
@@ -1027,10 +1031,12 @@ class niteo_cmp {
|
|
1027 |
}
|
1028 |
}
|
1029 |
|
1030 |
-
|
1031 |
} else {
|
1032 |
$response = $response_invalid;
|
1033 |
-
|
|
|
|
|
|
|
1034 |
|
1035 |
|
1036 |
endif; // $check !== true
|
3 |
Plugin Name: CMP - Coming Soon & Maintenance Plugin
|
4 |
Plugin URI: https://wordpress.org/plugins/cmp-coming-soon-maintenance/
|
5 |
Description: Display customizable landing page for Coming Soon, Maintenance & Under Construction page.
|
6 |
+
Version: 2.4.1
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
18 |
public function __construct() {
|
19 |
$this->author = 'NiteoThemes';
|
20 |
$this->author_homepage = 'https://niteothemes.com';
|
21 |
+
$this->version = '2.4.1';
|
22 |
$this->dev = false;
|
23 |
$this->plugins_dir_path = plugin_dir_path( __DIR__ );
|
24 |
if ( $this->plugins_dir_path == './') {
|
51 |
}
|
52 |
|
53 |
public function init() {
|
54 |
+
add_action( 'admin_notices', array($this, 'cmp_admin_notice') );
|
55 |
+
add_action( 'template_redirect', array($this, 'cmp_displayPage') );
|
56 |
+
add_action( 'wp_login', array($this, 'cmp_admin_override') );
|
57 |
+
add_action( 'wp_before_admin_bar_render',array( $this, 'cmp_admin_bar' ));
|
58 |
add_action( 'wp_ajax_niteo_themeinfo', array($this, 'niteo_themeinfo') );
|
59 |
add_action( 'wp_ajax_niteo_unsplash', array($this, 'niteo_unsplash') );
|
60 |
add_action( 'wp_ajax_niteo_export_csv', array($this, 'niteo_export_csv') );
|
62 |
add_action( 'wp_ajax_cmp_toggle_activation', array($this, 'cmp_toggle_activation') );
|
63 |
add_action( 'wp_ajax_nopriv_niteo_subscribe', array($this, 'niteo_subscribe') );
|
64 |
add_action( 'wp_ajax_niteo_subscribe', array($this, 'niteo_subscribe') );
|
65 |
+
add_action( 'plugins_loaded', array($this, 'cmp_textDomain') );
|
66 |
+
add_action( 'admin_menu', array($this, 'cmp_adminMenu'), 10 );
|
67 |
+
add_action( 'admin_init', array($this, 'cmp_adminInit') ) ;
|
68 |
+
add_action( 'admin_init', array($this, 'cmp_admin_override') );
|
69 |
add_action( 'admin_enqueue_scripts', array($this,'cmp_add_admin_style') );
|
70 |
add_action( 'wp_enqueue_scripts', array($this,'cmp_add_admin_style') );
|
71 |
+
add_action( 'upgrader_process_complete', array($this, 'cmp_plugin_update' ), 10, 2 );
|
72 |
|
73 |
register_activation_hook( __FILE__, array($this, 'cmp_activate') );
|
74 |
register_deactivation_hook( __FILE__, array($this, 'cmp_deactivate') );
|
97 |
wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true);
|
98 |
wp_register_script( 'select2-js', plugins_url('/js/select2.min.js', __FILE__) );
|
99 |
wp_register_script( 'cmp-typography', plugins_url('/js/typography'.$this->minified.'.js', __FILE__), array('select2-js' ), $this->version );
|
100 |
+
wp_register_script( 'cmp_settings_js', plugins_url('/js/settings'.$this->minified.'.js', __FILE__), array('webfont', 'select2-js'), $this->version);
|
101 |
wp_register_script('countdown_flatpicker_js', plugins_url('/js/flatpickr.min.js', __FILE__) );
|
102 |
}
|
103 |
|
231 |
|
232 |
// preview for specific theme cmp_preview=true&theme=slug
|
233 |
if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
|
234 |
+
$theme_preview = esc_attr($_GET['theme']);
|
235 |
|
236 |
if ( file_exists( $this->cmp_themePath( $theme_preview ).$theme_preview.'/'.$theme_preview.'-theme.php') ) {
|
237 |
require_once ( $this->cmp_themePath( $theme_preview) .$theme_preview.'/'.$theme_preview.'-theme.php' );
|
404 |
// display admin topbar notice
|
405 |
public function cmp_admin_bar(){
|
406 |
|
407 |
+
// check onces and wordpress rights, else DIE
|
408 |
+
if ( $_SERVER['REQUEST_METHOD'] == 'POST' && (get_current_screen() && get_current_screen()->id == 'toplevel_page_cmp-settings' ) ) {
|
409 |
+
|
410 |
+
//verify nonce and user rights
|
411 |
+
if ( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
|
412 |
+
die('Sorry, but this request is invalid');
|
413 |
+
}
|
414 |
+
|
415 |
+
if ( isset($_POST['activate']) && is_numeric($_POST['activate']) ) {
|
416 |
+
update_option('niteoCS_activation', sanitize_text_field($_POST['activate']));
|
417 |
+
}
|
418 |
+
|
419 |
+
if ( isset($_POST['cmp_status']) ) {
|
420 |
+
update_option('niteoCS_status', $this->sanitize_checkbox($_POST['cmp_status']) );
|
421 |
+
} else {
|
422 |
+
|
423 |
+
update_option('niteoCS_status', false);
|
424 |
+
}
|
425 |
+
|
426 |
+
}
|
427 |
+
|
428 |
require_once(ABSPATH . 'wp-admin/includes/screen.php');
|
429 |
|
430 |
$roles_topbar = json_decode( get_option('niteoCS_roles_topbar', '[]'), true );
|
436 |
|
437 |
// if current user cannot access topbar, return
|
438 |
foreach ( $current_user->roles as $role ) {
|
439 |
+
|
440 |
+
|
441 |
if ( !in_array( $role, $roles_topbar ) ) {
|
442 |
return false;
|
443 |
}
|
449 |
$class = '';
|
450 |
$msg= '';
|
451 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
|
453 |
switch ( get_option( 'niteoCS_activation', '2' ) ) {
|
454 |
case '1':
|
551 |
// returns list of premium themes => manually defined
|
552 |
public function cmp_premium_themes() {
|
553 |
$premium_themes = array();
|
554 |
+
array_push( $premium_themes, array('name' => 'fifty', 'url' => 'https://niteothemes.com/projects/cmp-fifty-premium-theme/', 'price' => '10') );
|
555 |
+
array_push( $premium_themes, array('name' => 'hardwork_premium', 'url' => 'https://niteothemes.com/projects/cmp-hardwork-premium-theme/', 'price' => '5') );
|
556 |
+
array_push( $premium_themes, array('name' => 'postery', 'url' => 'https://niteothemes.com/projects/cmp-postery-theme/', 'price' => '5') );
|
557 |
+
array_push( $premium_themes, array('name' => 'frame', 'url' => 'https://niteothemes.com/projects/cmp-frame-theme/', 'price' => '5') );
|
558 |
+
array_push( $premium_themes, array('name' => 'eclipse', 'url' => 'https://niteothemes.com/projects/cmp-eclipse-theme/', 'price' =>'0') );
|
559 |
+
array_push( $premium_themes, array('name' => 'orbit', 'url' => 'https://niteothemes.com/projects/cmp-orbit-theme/', 'price' => '0') );
|
560 |
|
561 |
return $premium_themes;
|
562 |
}
|
973 |
public function niteo_subscribe( $check ) {
|
974 |
|
975 |
$response = '';
|
976 |
+
$response_invalid = 'Please insert valid Email address.';
|
977 |
$ajax = false;
|
978 |
|
979 |
// check for ajax request
|
987 |
if ( $_SERVER['REQUEST_METHOD'] == 'POST'
|
988 |
&& isset( $_POST['form_honeypot'] )
|
989 |
&& $_POST['form_honeypot'] === ''
|
990 |
+
&& isset( $_POST['EMAIL'] ) )
|
991 |
+
{
|
992 |
+
|
993 |
+
if ( is_email( $_POST['EMAIL'] ) ) {
|
994 |
|
995 |
$email = $_POST['EMAIL'];
|
996 |
$timestamp = time();
|
1031 |
}
|
1032 |
}
|
1033 |
|
|
|
1034 |
} else {
|
1035 |
$response = $response_invalid;
|
1036 |
+
}
|
1037 |
+
|
1038 |
+
}
|
1039 |
+
|
1040 |
|
1041 |
|
1042 |
endif; // $check !== true
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KV2JF
|
|
4 |
Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 2.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -111,6 +111,11 @@ CMP plugin offers premium features for free, no PRO versions! With blazing speed
|
|
111 |
|
112 |
|
113 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
114 |
<h4>CMP 2.4 - Sweet update</h4>
|
115 |
<p>*** Please make sure you update all downloaded CMP themes to enable features from this update ***</p>
|
116 |
<ul>
|
4 |
Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 2.4.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
111 |
|
112 |
|
113 |
== Changelog ==
|
114 |
+
<h4>CMP 2.4.1 - bug fixes</h4>
|
115 |
+
<ul>
|
116 |
+
<li>Fixed issue when activation settings could not be saved in some cases.</li>
|
117 |
+
</ul>
|
118 |
+
|
119 |
<h4>CMP 2.4 - Sweet update</h4>
|
120 |
<p>*** Please make sure you update all downloaded CMP themes to enable features from this update ***</p>
|
121 |
<ul>
|
themes/hardwork_premium.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
/*
|
2 |
Theme Name: Hardwork Premium
|
3 |
-
Description: <p>Hardwork Premium is our first Premium theme for CMP Plugin. Premium version extends free Hardwork theme with fullscreen image Slider. It is a best choice for Photographers who want to display teaser photos while their website is cooking up or is under maintenance.</p><h4>Main Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Fade in/out Text Effects</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Background including videos</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</li><li class="
|
1 |
/*
|
2 |
Theme Name: Hardwork Premium
|
3 |
+
Description: <p>Hardwork Premium is our first Premium theme for CMP Plugin. Premium version extends free Hardwork theme with fullscreen image Slider. It is a best choice for Photographers who want to display teaser photos while their website is cooking up or is under maintenance.</p><h4>Main Features</h4><ul><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Logo</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Fade in/out Text Effects</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Background including videos</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Graphic Image Slider Background</li><li class="not-supported"><i class="fa fa-times" aria-hidden="true"></i> Countdown Timer</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Subscribe Form</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Social Media</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Colors</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Custom Fonts</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Footer Content</li><li class="supported"><i class="fa fa-check-square-o" aria-hidden="true"></i> Responsive Design</li></ul>
|