Version Description
Download this release
Release Info
Developer | niteo |
Plugin | CMP – Coming Soon & Maintenance Plugin by NiteoThemes |
Version | 4.0.3 |
Comparing to | |
See all releases |
Code changes from version 4.0.2 to 4.0.3
- css/cmp-settings-style.css +3 -1
- inc/render/graphic-background.php +11 -4
- js/cmp-admin-head.js +12 -12
- js/settings.js +2 -2
- js/settings.min.js +1 -1
- niteo-cmp.php +3 -3
- readme.txt +7 -1
- themes/countdown/img/countdown_banner_full.jpg +0 -0
- themes/countdown/img/countdown_banner_large.jpg +0 -0
css/cmp-settings-style.css
CHANGED
@@ -363,11 +363,13 @@
|
|
363 |
}
|
364 |
|
365 |
.cmp-coming-soon-maintenance #unsplash_img {
|
366 |
-
display: none
|
|
|
367 |
}
|
368 |
|
369 |
.cmp-coming-soon-maintenance #unsplash-media {
|
370 |
position: relative;
|
|
|
371 |
}
|
372 |
|
373 |
.cmp-coming-soon-maintenance .color-preview, .cmp-coming-soon-maintenance .gradient-preview, .cmp-coming-soon-maintenance .pattern-wrapper {
|
363 |
}
|
364 |
|
365 |
.cmp-coming-soon-maintenance #unsplash_img {
|
366 |
+
display: none;
|
367 |
+
height: auto;
|
368 |
}
|
369 |
|
370 |
.cmp-coming-soon-maintenance #unsplash-media {
|
371 |
position: relative;
|
372 |
+
margin-top: 1em;
|
373 |
}
|
374 |
|
375 |
.cmp-coming-soon-maintenance .color-preview, .cmp-coming-soon-maintenance .gradient-preview, .cmp-coming-soon-maintenance .pattern-wrapper {
|
inc/render/graphic-background.php
CHANGED
@@ -9,10 +9,17 @@ if ( isset( $_GET['background'] ) && !empty($_GET['background']) ) {
|
|
9 |
$niteoCS_banner = $_GET['background'] == '1' ? 0 : esc_attr($_GET['background']);
|
10 |
}
|
11 |
|
12 |
-
if
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
};
|
17 |
|
18 |
|
9 |
$niteoCS_banner = $_GET['background'] == '1' ? 0 : esc_attr($_GET['background']);
|
10 |
}
|
11 |
|
12 |
+
// change theme slug if cmp_preview is set to preview another cmp theme
|
13 |
+
if ( isset( $_GET['cmp_theme'] ) && !empty( $_GET['cmp_theme'] ) ) {
|
14 |
+
$theme_slug = esc_attr($_GET['cmp_theme']);
|
15 |
+
} else {
|
16 |
+
$theme_slug = $this->cmp_selectedTheme();
|
17 |
+
}
|
18 |
+
|
19 |
+
if ( file_exists( $this->cmp_theme_dir( $theme_slug ).$theme_slug.'/img/'.$theme_slug.'_banner_'.$size.'.jpg' ) ) {
|
20 |
+
$default_img = $this->cmp_themeURL( $theme_slug ).$theme_slug.'/img/'.$theme_slug.'_banner_'.$size.'.jpg';
|
21 |
+
} elseif ( file_exists( $this->cmp_theme_dir( $theme_slug ).$theme_slug.'/img/'.$theme_slug.'_banner_'.$size.'.png' ) ) {
|
22 |
+
$default_img = $this->cmp_themeURL( $theme_slug ).$theme_slug.'/img/'.$theme_slug.'_banner_'.$size.'.png';
|
23 |
};
|
24 |
|
25 |
|
js/cmp-admin-head.js
CHANGED
@@ -1,26 +1,26 @@
|
|
1 |
-
jQuery(document).ready(function($) {
|
2 |
-
|
3 |
// toggle cmp activation via menu bar ajax
|
4 |
-
jQuery('#cmp-toggle-adminbar').click
|
5 |
e.preventDefault();
|
6 |
var security = jQuery(this).data('security');
|
7 |
var data = {
|
8 |
action: 'cmp_toggle_activation',
|
9 |
security: security,
|
10 |
-
payload: 'toggle_cmp_status'
|
11 |
};
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
if ( response == 'success' ) {
|
17 |
jQuery('#cmp-toggle-adminbar').toggleClass('status-1');
|
18 |
-
jQuery('.cmp-status input[type=radio]').prop('disabled', function (_, val) {
|
19 |
-
|
|
|
|
|
|
|
|
|
20 |
} else {
|
21 |
console.log(response);
|
22 |
}
|
23 |
});
|
24 |
-
|
25 |
});
|
26 |
-
});
|
1 |
+
jQuery(document).ready(function ($) {
|
|
|
2 |
// toggle cmp activation via menu bar ajax
|
3 |
+
jQuery('#cmp-toggle-adminbar').on('click', function (e) {
|
4 |
e.preventDefault();
|
5 |
var security = jQuery(this).data('security');
|
6 |
var data = {
|
7 |
action: 'cmp_toggle_activation',
|
8 |
security: security,
|
9 |
+
payload: 'toggle_cmp_status',
|
10 |
};
|
11 |
|
12 |
+
$.post(cmp_ajax.ajax_url, data, function (response) {
|
13 |
+
if (response == 'success') {
|
|
|
|
|
14 |
jQuery('#cmp-toggle-adminbar').toggleClass('status-1');
|
15 |
+
jQuery('.cmp-status input[type=radio]').prop('disabled', function (_, val) {
|
16 |
+
return !val;
|
17 |
+
});
|
18 |
+
jQuery('#cmp-status').prop('checked', function (_, val) {
|
19 |
+
return !val;
|
20 |
+
});
|
21 |
} else {
|
22 |
console.log(response);
|
23 |
}
|
24 |
});
|
|
|
25 |
});
|
26 |
+
});
|
js/settings.js
CHANGED
@@ -212,7 +212,7 @@ jQuery(document).ready(function ($) {
|
|
212 |
if (unsplash[0]) {
|
213 |
var img =
|
214 |
unsplash[0]['urls']['raw'] +
|
215 |
-
'?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=
|
216 |
var author = unsplash[0]['user']['name'];
|
217 |
var author_url = unsplash[0]['user']['links']['html'];
|
218 |
var img_url = unsplash[0]['links']['html'];
|
@@ -220,7 +220,7 @@ jQuery(document).ready(function ($) {
|
|
220 |
} else {
|
221 |
var img =
|
222 |
unsplash['urls']['raw'] +
|
223 |
-
'?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=
|
224 |
var author = unsplash['user']['name'];
|
225 |
var author_url = unsplash['user']['links']['html'];
|
226 |
var img_url = unsplash['links']['html'];
|
212 |
if (unsplash[0]) {
|
213 |
var img =
|
214 |
unsplash[0]['urls']['raw'] +
|
215 |
+
'?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=900';
|
216 |
var author = unsplash[0]['user']['name'];
|
217 |
var author_url = unsplash[0]['user']['links']['html'];
|
218 |
var img_url = unsplash[0]['links']['html'];
|
220 |
} else {
|
221 |
var img =
|
222 |
unsplash['urls']['raw'] +
|
223 |
+
'?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=900';
|
224 |
var author = unsplash['user']['name'];
|
225 |
var author_url = unsplash['user']['links']['html'];
|
226 |
var img_url = unsplash['links']['html'];
|
js/settings.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
jQuery(document).ready(function(e){var n=document.location.hash.substring(1),a=jQuery("#csoptions").attr("action"),t=jQuery("#csoptions fieldset:not(.skip-preview-validation *)").serialize();wp.codeEditor&&jQuery("#niteoCS_custom_css").length&&wp.codeEditor.initialize("niteoCS_custom_css"),navtab=function(e){jQuery(".cmp-coming-soon-maintenance .nav-tab-wrapper .nav-tab").removeClass("nav-tab-active"),jQuery(".nav-tab-wrapper ."+e).addClass("nav-tab-active"),jQuery(".cmp-coming-soon-maintenance .table-wrapper."+e).css("display","block"),jQuery(".cmp-coming-soon-maintenance .table-wrapper-css."+e).css("display","block"),jQuery(".cmp-coming-soon-maintenance .comingsoon."+e).css("display","block"),jQuery(".cmp-coming-soon-maintenance .table-wrapper:not(."+e+")").css("display","none"),jQuery(".cmp-coming-soon-maintenance .table-wrapper-css:not(."+e).css("display","none"),jQuery(".cmp-coming-soon-maintenance .comingsoon:not(."+e+")").css("display","none"),"install"==e?(jQuery(".cmp-coming-soon-maintenance .submit").css("display","none"),jQuery(".cmp-coming-soon-maintenance #csoptions").attr("action",a)):(jQuery(".cmp-coming-soon-maintenance .submit").css("display","block"),jQuery(".cmp-coming-soon-maintenance #csoptions").attr("action",a+"#"+e))},""!=n?navtab(n):jQuery(".cmp-coming-soon-maintenance .table-wrapper-css").css("display","none"),window.onhashchange=function(){n=document.location.hash.substring(1),navtab(n)},jQuery(".cmp-coming-soon-maintenance .nav-tab:not(.theme-preview):not(.advanced)").click(function(e){e.preventDefault(),n=jQuery(this).data("tab"),document.location.hash=n}),p(".cmp-coming-soon-maintenance .blur-range","span","html"),p(".cmp-coming-soon-maintenance .background-overlay-opacity","span","html"),p("#logo_size_slider","#niteoCS_logo_size","val"),p("#niteoCS_logo_size","#logo_size_slider","val"),l("logo",!1,"image","img"),l("favicon",!1,"image","img"),l("seo_img",!1,"image","img"),l("images",!0,"image","img"),l("mobile-images",!0,"image","img"),l("pattern",!1,"image","background"),l("video-thumb",!1,"image","img"),l("video-local",!1,"video","video"),l("subs-img",!1,"image","img"),l("subs-img-popup",!1,"image","img"),l("avatar",!1,"image","img"),l("gallery",!0,"image","img"),u("analytics"),u("contact-form"),u("subscribe"),u("background-effect"),u("special-effect"),u("cmp-logo"),u("background-type"),u("counter"),u("progress-bar"),u("overlay-text"),u("cmp-logo-size"),u("recaptcha-toggle"),u("login-icon"),u("custom-mobile-imgs"),u("lang-switcher"),u("subscribe-popup"),u("inpage-subscribe"),m("counter-action"),m("subscribe-method"),m("background-overlay"),m("banner-video-source"),m("progress-bar-type"),jQuery(".cmp-coming-soon-maintenance select:not(.headings-google-font):not(.content-google-font )").select2({width:"100%",minimumResultsForSearch:-1,placeholder:"Click to select.."}),jQuery(".cmp-coming-soon-maintenance #cmp-status").click(function(){jQuery(".cmp-coming-soon-maintenance .cmp-status input[type=radio]").prop("disabled",function(e,n){return!n}),jQuery("#cmp-toggle-adminbar").toggleClass("status-1"),jQuery(".cmp-status-pages").fadeToggle()}),jQuery(".cmp-status-pages input[type=radio]").change(function(){jQuery(".cmp-status-pages input[type=radio]").parent().removeClass("active"),jQuery(this).parent().addClass("active")}),jQuery(".cmp-coming-soon-maintenance .cmp-status.switch:not(.disabled)").click(function(){if(0!=jQuery(".cmp-coming-soon-maintenance #cmp-status").prop("checked")){var e=jQuery(this).children("input");e.prop("checked",!0),jQuery(".cmp-coming-soon-maintenance .cmp-status.switch").removeClass("active"),jQuery(this).addClass("active"),e.trigger("change"),"3"==e.val()?jQuery(".cmp-coming-soon-maintenance .redirect-inputs").fadeIn("fast"):jQuery(".cmp-coming-soon-maintenance .redirect-inputs").fadeOut("fast")}}),jQuery(".cmp-coming-soon-maintenance .table-wrapper h3").click(function(){jQuery(this).parent().toggleClass("closed")}),jQuery(".cmp-coming-soon-maintenance #test-unsplash").click(function(e){e.preventDefault();var n=jQuery(".cmp-coming-soon-maintenance #unsplash-media"),a=jQuery('.cmp-coming-soon-maintenance .unsplash_banner select[name^="unsplash_feed"] option:selected').val(),t="",i=jQuery(this).data("security");if(0==a){switch(a){case"0":t=jQuery(".cmp-coming-soon-maintenance #niteoCS-unsplash-0").val()}if(3==a||""!=t){var o={feed:a,url:t,feat:"",custom_str:""};jQuery(this).prop("disabled",!0),jQuery(this).html('<i class="fas fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>');var r={action:"niteo_unsplash",security:i,params:o};jQuery.post(ajaxurl,r,function(e){var a=JSON.parse(e);jQuery("#unsplash_img").remove();var t=setTimeout(function(){jQuery("#test-unsplash").prop("disabled",!1),jQuery("#test-unsplash").text("Display Unsplash Photo"),jQuery("#unsplash-media").html('<p>It seems <a href="https://status.unsplash.com/" target="_blank">Unsplash API</a> is not responding. Please try again later.</p>')},5e3);if("200"==a.response){if((a=jQuery.parseJSON(a.body))[0])var i=a[0].urls.raw+"?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588",o=a[0].user.name,r=a[0].user.links.html,s=a[0].links.html,c=a[0].id;else i=a.urls.raw+"?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588",o=a.user.name,r=a.user.links.html,s=a.links.html,c=a.id;jQuery("<img />",{src:i,id:"unsplash_img"}).one("load",function(){jQuery(this).appendTo(n),jQuery(this).fadeIn(),jQuery("#test-unsplash").prop("disabled",!1),jQuery("#test-unsplash").text("Display Unsplash Photo"),jQuery(".unsplash-id").html('<a href="'+s+'" target="_blank">Photo</a> (ID: '+c+') by <a href="'+r+'" target="_blank">'+o+'</a> / <a href="https://unsplash.com/" target="_blank">Unsplash</a>'),jQuery(".blur-range").trigger("input"),clearTimeout(t)})}else jQuery(".cmp-coming-soon-maintenance #test-unsplash").prop("disabled",!1),jQuery(".cmp-coming-soon-maintenance #test-unsplash").text("Display Unsplash Photo"),jQuery(".cmp-coming-soon-maintenance #unsplash-media").html("<p>Error "+a.response+': <span style="text-transform:lowercase;">'+JSON.parse(a.body).errors+"</span></p>"),clearTimeout(t)})}else jQuery(".cmp-coming-soon-maintenance #unsplash_img").remove()}}),videoPreview=function(){if("5"==jQuery(".cmp-coming-soon-maintenance .background-type:checked").val()){var e=jQuery(".cmp-coming-soon-maintenance .banner-video-source").val();if("youtube"==e){var n=jQuery(".cmp-coming-soon-maintenance #niteoCS-youtube-url").val();if(""!=n){var a=n.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/);if(a&&11==a[7].length){jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").html("");var t="https://img.youtube.com/vi/"+a[7]+"/maxresdefault.jpg";jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").append('<img src="'+t+'" alt=""/>'),jQuery(".cmp-coming-soon-maintenance .blur-range").trigger("input")}else jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").html("")}}if("local"==e){var i=jQuery("#niteoCS-video-local-id").data("url");""!=i&&jQuery(".cmp-coming-soon-maintenance .video-local-wrapper").html('<video width="600" height="400" controls><source src="'+i+'" type="video/mp4">Your browser does not support the video tag.</video>')}}},videoPreview(),jQuery(".cmp-coming-soon-maintenance .background-type").on("change",function(){videoPreview()}),jQuery(".cmp-coming-soon-maintenance #niteoCS-youtube-url").on("keyup",function(){videoPreview()}),jQuery(".cmp-coming-soon-maintenance .banner-video-source").on("change",function(){videoPreview()});var i=jQuery('.unsplash_banner select[name^="unsplash_feed"] option:selected').val();function o(e){switch(e){case"solid-color":jQuery(".thumbnail-overlay").css("background",jQuery("#niteoCS_overlay_color").val());break;case"gradient":jQuery(".cmp-coming-soon-maintenance select.overlay-gradient").trigger("change");break;case"disabled":jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css("background","none")}}jQuery(".unsplash-feed-"+i).css("display","block"),jQuery('.unsplash_banner select[name^="unsplash_feed"]').on("change",function(){i=jQuery('.unsplash_banner select[name^="unsplash_feed"] option:selected').val(),jQuery(".unsplash-feed").css("display","none"),jQuery(".unsplash-feed-"+i).css("display","block"),jQuery("#test-unsplash").trigger("click")}),1==jQuery("#csoptions .niteoCS_banner:checked").val()&&jQuery("#test-unsplash").trigger("click"),jQuery(".cmp-coming-soon-maintenance select.background-gradient").on("change",function(){var e=jQuery(".cmp-coming-soon-maintenance select.background-gradient option:selected").val();"custom"==e?(jQuery(".cmp-coming-soon-maintenance .custom-gradient").css("display","block"),jQuery(".cmp-coming-soon-maintenance .gradient-preview").css({background:"-moz-linear-gradient(-45deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)",background:"linear-gradient(135deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)"})):(colors=e.split(":"),jQuery(".cmp-coming-soon-maintenance .custom-gradient").css("display","none"),jQuery(".cmp-coming-soon-maintenance .gradient-preview").css({background:"-moz-linear-gradient(-45deg, "+colors[0]+" 0%, "+colors[1]+" 100%)",background:"-webkit-linear-gradient(-45deg, "+colors[0]+" 0%, "+colors[1]+" 100%)",background:"linear-gradient(135deg, "+colors[0]+" 0%, "+colors[1]+" 100%)"}))}).trigger("change"),jQuery(".cmp-coming-soon-maintenance #niteoCS_banner_color").wpColorPicker({change:function(e,n){jQuery(".color-preview").css("background-color",n.color.toString())}}),jQuery(".cmp-coming-soon-maintenance #niteoCS_gradient_one").wpColorPicker({change:function(e,n){jQuery(".gradient-preview").css({background:"-moz-linear-gradient(-45deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)",background:"linear-gradient(135deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)"})}}),jQuery(".cmp-coming-soon-maintenance #niteoCS_gradient_two").wpColorPicker({change:function(e,n){jQuery(".gradient-preview").css({background:"-moz-linear-gradient(-45deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)",background:"linear-gradient(135deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)"})}}),jQuery(".cmp-coming-soon-maintenance #niteoCS_overlay_color").wpColorPicker({change:function(e,n){jQuery(".thumbnail-overlay").css("background",n.color.toString())}}),jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css("background",jQuery("#niteoCS_overlay_color").val()),jQuery(".cmp-coming-soon-maintenance select.overlay-gradient").on("change",function(){var e=jQuery("select.overlay-gradient option:selected").val();if("custom"==e){jQuery(".cmp-coming-soon-maintenance .custom-overlay-gradient").css("display","block");var n=jQuery("#niteoCS_overlay_gradient_one").val(),a=jQuery("#niteoCS_overlay_gradient_two").val();jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css({background:"-moz-linear-gradient(-45deg, "+n+" 0%, "+a+" 100%)",background:"-webkit-linear-gradient(-45deg, "+n+" 0%, "+a+" 100%)",background:"linear-gradient(135deg, "+n+" 0%, "+a+" 100%)"})}else colors=e.split(":"),jQuery(".cmp-coming-soon-maintenance .custom-overlay-gradient").css("display","none"),jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css({background:"-moz-linear-gradient(-45deg, "+colors[0]+" 0%, "+colors[1]+" 100%)",background:"-webkit-linear-gradient(-45deg, "+colors[0]+" 0%, "+colors[1]+" 100%)",background:"linear-gradient(135deg, "+colors[0]+" 0%, "+colors[1]+" 100%)"})}),jQuery("#niteoCS_overlay_gradient_one").wpColorPicker({change:function(e,n){jQuery(".thumbnail-overlay").css({background:"-moz-linear-gradient(-45deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_overlay_gradient_two").val()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_overlay_gradient_two").val()+" 100%)",background:"linear-gradient(135deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_overlay_gradient_two").val()+" 100%)"})}}),jQuery("#niteoCS_overlay_gradient_two").wpColorPicker({change:function(e,n){jQuery(".thumbnail-overlay").css({background:"-moz-linear-gradient(-45deg, "+jQuery("#niteoCS_overlay_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+jQuery("#niteoCS_overlay_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)",background:"linear-gradient(135deg, "+jQuery("#niteoCS_overlay_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)"})}}),jQuery(".background-overlay-opacity").on("input",function(){var e=jQuery(this).val();jQuery(".thumbnail-overlay").css("opacity",e)}).trigger("input"),o(jQuery(".cmp-coming-soon-maintenance .background-overlay").val()),jQuery(".cmp-coming-soon-maintenance .background-overlay").on("change",function(){o(jQuery(this).val())}),jQuery(".cmp-coming-soon-maintenance .blur-range").on("input",function(){var e=jQuery(this).val();jQuery(".cmp-coming-soon-maintenance .background-thumb-wrapper img:not(.no-blur)").css("filter","blur("+e+"px)")}).trigger("input"),jQuery('.cmp-coming-soon-maintenance select[name^="niteoCS_banner_pattern"]').on("change",function(){var e=jQuery('.cmp-coming-soon-maintenance select[name^="niteoCS_banner_pattern"] option:selected').val();if("custom"!=e){var n=jQuery(this).data("url");jQuery(".cmp-coming-soon-maintenance #add-pattern").css("display","none"),jQuery(".cmp-coming-soon-maintenance .pattern-wrapper").css("background-image","url('"+n+e+".png')")}else{n=jQuery(".cmp-coming-soon-maintenance #niteoCS_banner_pattern_custom").val();jQuery(".cmp-coming-soon-maintenance #add-pattern").css("display","block"),jQuery(".cmp-coming-soon-maintenance .pattern-wrapper").css("background-image","url('"+n+"')")}}),jQuery(".cmp-coming-soon-maintenance .heading-animation").on("change",function(){heading_anim=jQuery(".cmp-coming-soon-maintenance .heading-animation option:selected").val(),jQuery(".cmp-coming-soon-maintenance #heading-example").removeClass().addClass("animated "+heading_anim)}),jQuery(".cmp-coming-soon-maintenance .content-animation").on("change",function(){heading_anim=jQuery(".cmp-coming-soon-maintenance .content-animation option:selected").val(),jQuery(".cmp-coming-soon-maintenance #content-example").removeClass().addClass("animated "+heading_anim)});var r=function(e,n,a){var t=jQuery(".cmp-coming-soon-maintenance #niteoCS_socialmedia").attr("value");t=jQuery.parseJSON(t),jQuery.each(t,function(t,i){i.name==e&&(i[n]=a)}),jQuery(".cmp-coming-soon-maintenance #niteoCS_socialmedia").attr("value",JSON.stringify(t))};if(!/Mobi/.test(navigator.userAgent)){var s=jQuery(".cmp-coming-soon-maintenance .social-inputs"),c=function(e,n){var a=s.find('input[type="text"]');n.item.index();a.each(function(e,n){var a=jQuery(n).data("name");r(a,"order",e)})};s.sortable({stop:c}),s.on("sortchange",c)}function l(e,n,a,t){var i,o=jQuery("."+e+"-wrapper"),r=jQuery("#add-"+e),s=jQuery("#delete-"+e),c="",l=e.replace("-"," ");l=l[0].toUpperCase()+l.slice(1),""!=jQuery("#niteoCS-"+e+"-id").val()&&s.css("display","block"),r.click(function(r){if(r.preventDefault(),u)u.open();else var u=wp.media({title:"Select "+l,button:{text:"Insert "+l},multiple:n,library:{type:[a]}}).on("select",function(){var n=u.state().get("selection").toJSON();n.length>0&&(o.find("img").remove(),o.attr("class",e+"-wrapper custom-gallery"),o.addClass("gallery-"+n.length),jQuery(n).each(function(a){switch(i=n[a].sizes&&n[a].sizes.large?n[a].sizes.large.url:n[a].url,c+=(0===a?"":",")+n[a].id,t){case"video":o.append('<video width="600" height="400" controls><source src="'+i+'" type="video/mp4">Your browser does not support the video tag.</video>');break;case"background":o.css("background-image","url('"+i+"')");break;case"img":default:n.length>1&&0==a&&jQuery("."+e+"-wrapper .big-thumb").length?jQuery("."+e+"-wrapper .big-thumb").append('<img src="'+i+'" alt=""/>'):n.length>1&&0!==a?o.append('<img src="'+i+'" alt="" class="no-blur"/>'):o.find(".big-thumb").length?jQuery("."+e+"-wrapper .big-thumb").append('<img src="'+i+'" alt=""/>'):o.append('<img src="'+i+'" alt=""/>'),jQuery(".blur-range").trigger("input")}}),s.css("display","block")),jQuery("#niteoCS-"+e+"-id").val(c).trigger("change")}).open()}),s.click(function(n){jQuery(this).css("display","none"),o.find("img").remove(),jQuery("#niteoCS-"+e+"-id").val(""),jQuery("#niteoCS-"+e+"-id").trigger("change")})}function u(e){jQuery(".cmp-coming-soon-maintenance ."+e).change(function(){var n=jQuery(".cmp-coming-soon-maintenance ."+e+":checked").val();n=void 0===(n=jQuery.isNumeric(n)?"x"+n:n)?"off":n,jQuery(".cmp-coming-soon-maintenance ."+e+"-switch."+n).css("display","block"),jQuery(".cmp-coming-soon-maintenance ."+e+"-switch:not(."+n+")").css("display","none")}),jQuery(".cmp-coming-soon-maintenance ."+e).first().trigger("change")}function m(e){jQuery(".cmp-coming-soon-maintenance ."+e).change(function(){var n=jQuery("."+e).val();n=jQuery.isNumeric(n)?"x"+n:n,jQuery(".cmp-coming-soon-maintenance ."+e+"."+n).css("display","block"),jQuery(".cmp-coming-soon-maintenance ."+e+":not(."+n+")").css("display","none")}),jQuery("."+e).first().trigger("change")}function p(e,n,a){jQuery(e).on("input",function(){var e=jQuery(this).val();"html"===a&&jQuery(this).parent().find(n).html(e),"val"===a&&jQuery(this).parent().find(n).val(e)})}jQuery,jQuery.fn.toggleDisabled=function(){return this.each(function(){var e,n=jQuery(this),a=n.data("name");n.attr("disabled")?(n.prop("disabled",!1),e="1"):(n.prop("disabled",!0),e="0"),r(a,"active",e)})},jQuery('.cmp-coming-soon-maintenance .social-inputs input[type="text"]').focusout(function(){var e=jQuery(this).data("name"),n=jQuery(this).val();r(e,"url",n)}),jQuery('.cmp-coming-soon-maintenance .social-inputs input[type="checkbox"]').click(function(e){jQuery(this).siblings('input[type="text"]').toggleDisabled()}),jQuery(".cmp-coming-soon-maintenance .social-media i").click(function(){var e=jQuery(this).data("name");jQuery(this).toggleClass("active"),jQuery(".cmp-coming-soon-maintenance .social-inputs li."+e).toggleClass("active"),jQuery(".cmp-coming-soon-maintenance .social-inputs li."+e+" input").trigger("change"),jQuery(this).hasClass("active")?r(e,"hidden","0"):r(e,"hidden","1"),jQuery(".cmp-coming-soon-maintenance .social-media i.active").length?jQuery(".social-inputs .label").css("display","block"):jQuery(".cmp-coming-soon-maintenance .social-inputs .label").css("display","none")}),jQuery(".cmp-coming-soon-maintenance .social-media i.active").length&&jQuery(".cmp-coming-soon-maintenance .social-inputs .label").css("display","block"),jQuery(".cmp.update-theme").click(function(e){e.preventDefault();var n=jQuery(this),a=n.parents(".notice"),t=n.data("security"),i=n.data("slug"),o=n.data("name"),r={action:"cmp_theme_update_install",security:t,file:{name:i,tmp_name:"",url:jQuery(this).data("remote_url")+"?action=download&slug="+i}};a.find(".message").html('<i class="fas fa-cog fa-spin fa-1x fa-fw"></i><span class="sr-only">Updating heme...</span><span> working hard on updating Theme...</span>'),jQuery.post(ajaxurl,r,function(e){if("success"==(e=e.trim()))setTimeout(function(){a.removeClass("notice-warning").addClass("notice-success"),a.find(".message").html("<span> "+o+' CMP theme was updated sucessfully! You can enjoy latest features now :) </span><i class="far fa-smile" aria-hidden="true"></i>')},1500);else{e=e.slice(0,-1);var n=jQuery("p",jQuery(e)).text();a.removeClass("notice-warning").addClass("notice-error"),a.find(".message").html('<i class="far fa-frown" aria-hidden="true"></i><span> '+n+"</span>")}})}),jQuery(".cmp-coming-soon-maintenance .theme-update.button").one("click",function(e){e.preventDefault();var n=jQuery(this),a=n.closest(".theme-wrapper"),t=a.data("security"),i=a.data("slug"),o={action:"cmp_theme_update_install",security:t,file:{name:i,tmp_name:"",url:a.data("remote_url")+"?action=download&slug="+i}};n.html('<i class="fas fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>'),jQuery.post(ajaxurl,o,function(e){"success"==e?setTimeout(function(){n.html('<i class="far fa-smile" aria-hidden="true"></i><span>Updated!</span>'),setTimeout(function(){n.fadeOut()},1500)},1500):(e=e.slice(0,-1),n.html('<i class="far fa-frown" aria-hidden="true"></i><span>Update Failed!</span>'))})}),jQuery(".cmp-coming-soon-maintenance .theme-details").click(function(e){e.preventDefault();var n=jQuery(this).closest(".theme-wrapper"),a=n.data("slug"),t=n.data("version"),i=n.data("type"),o=n.data("purchased"),r=0,s={action:"niteo_themeinfo",security:jQuery(".theme-wrapper").data("security"),theme_slug:jQuery(this).parents(".theme-wrapper").data("slug")};jQuery.post(ajaxurl,s,function(e){var s="",c="";if("true"==(e=jQuery.parseJSON(e)).result){if(jQuery("body").addClass("modal-open"),"1"==o&&(c='<span class="theme-version">Installed version: '+t+"</span>"),"1"!=o&&"premium"==i)s='<button type="button" class="theme-purchase button hide"><a href="'+n.find(".cmp-purchase-theme").attr("href")+'" target="_blank"><i class="fas fa-cart-arrow-down" aria-hidden="true"></i>Get Theme</a></button>';var l=e.screenshots,u="";Object.keys(l).length>1&&(u='<div class="screenshots-nav"><div class="left"><i class="fas fa-chevron-left" aria-hidden="true"></i></div><div class="right"><i class="fas fa-chevron-right" aria-hidden="true"></i></div></div>');var m=jQuery(['<div class="theme-backdrop">','\t<div class="theme-wrap">','\t\t<div class="theme-header">','\t\t\t<button class="close dashicons dashicons-no"><span class="screen-reader-text">Close details dialog</span></button>',"\t\t</div>",'\t\t<div class="theme-about">','\t\t\t<div class="theme-screenshots">','\t\t\t\t<div class="screenshot" style="background-image:url(\''+l[0]+"')\">"+u+"</div>","\t\t\t</div>",'\t\t\t<div class="theme-info">','\t\t\t\t<h2 class="theme-name">'+e.name+c+"</h2>",'\t\t\t\t<p class="theme-author">By <a href="'+e.author_homepage+'" target="_blank">'+e.author+"</a></p>","",s,'\t\t\t\t<div class="theme-description">'+e.description+"</div>","\t\t\t</div>","\t\t</div>",'\t\t<div class="theme-actions">','\t\t\t<a href="https://niteothemes.com/cmp-coming-soon-maintenance/?theme='+a+"&utm_source=cmp&utm_medium=referral&utm_campaign="+a+'" class="button cmp-preview" target="_blank" aria-label="Preview '+e.name+'">Live Preview</a>',"\t\t</div>","\t</div>","</div>"].join("\n"));jQuery(".theme-overlay.cmp").append(m),jQuery(".theme-overlay.cmp .close").click(function(e){e.preventDefault(),jQuery("body").removeClass("modal-open"),jQuery(".theme-overlay.cmp .theme-backdrop").fadeOut("fast")}),jQuery(".screenshots-nav .right").click(function(){++r==Object.keys(l).length&&(r=0),r in l&&jQuery(".screenshot").css("background-image","url('"+l[r]+"')")}),jQuery(".screenshots-nav .left").click(function(){--r<0&&(r=Object.keys(l).length-1),r in l&&jQuery(".screenshot").css("background-image","url('"+l[r]+"')")})}})}),jQuery(".cmp-coming-soon-maintenance #connect-mailchimp").click(function(e){e.preventDefault();var n=jQuery('.cmp-coming-soon-maintenance input[name="niteoCS_mailchimp_apikey"]').val(),a=jQuery(this).data("security"),t=jQuery(this);if(""!=n){var i={apikey:n,security:a};jQuery(this).prop("disabled",!0),jQuery(this).html('<i class="fas fa-cog fa-spin fa-1x fa-fw"></i><span> retrieving lists..</span>');var o={action:"cmp_mailchimp_list_ajax",security:a,params:i};jQuery.post(ajaxurl,o,function(e){var n=JSON.parse(e);200==n.response?(jQuery("#niteoCS_mailchimp_list").empty().prop("disabled",!1),jQuery.each(n.lists,function(e,n){jQuery("#niteoCS_mailchimp_list").append('<option value="'+n.id+'">'+n.name+"</option>")})):jQuery("#niteoCS_mailchimp_list").empty().prop("disabled",!0).html('<option value="error">'+n.message+"</option>").trigger("change"),t.html("Retrieve Lists"),t.prop("disabled",!1)}).fail(function(){t.html("Retrieve Lists"),t.prop("disabled",!1)})}}),jQuery(".cmp-coming-soon-maintenance .table-wrapper.theme-setup h4").each(function(){if("Overlay Color"==jQuery(this).html())return jQuery(this).parents("tr").remove(),!1}),jQuery(".nav-tab-wrapper").on("click",".theme-preview",function(e){return!(jQuery("#csoptions fieldset:not(.skip-preview-validation *)").serialize()!=t&&!confirm("You have made changes that will not be visible in the preview until you save them. Please save changes first.\nContinue anyway?"))||(e.preventDefault(),!1)})});
|
1 |
+
jQuery(document).ready(function(e){var n=document.location.hash.substring(1),a=jQuery("#csoptions").attr("action"),t=jQuery("#csoptions fieldset:not(.skip-preview-validation *)").serialize();wp.codeEditor&&jQuery("#niteoCS_custom_css").length&&wp.codeEditor.initialize("niteoCS_custom_css"),navtab=function(e){jQuery(".cmp-coming-soon-maintenance .nav-tab-wrapper .nav-tab").removeClass("nav-tab-active"),jQuery(".nav-tab-wrapper ."+e).addClass("nav-tab-active"),jQuery(".cmp-coming-soon-maintenance .table-wrapper."+e).css("display","block"),jQuery(".cmp-coming-soon-maintenance .table-wrapper-css."+e).css("display","block"),jQuery(".cmp-coming-soon-maintenance .comingsoon."+e).css("display","block"),jQuery(".cmp-coming-soon-maintenance .table-wrapper:not(."+e+")").css("display","none"),jQuery(".cmp-coming-soon-maintenance .table-wrapper-css:not(."+e).css("display","none"),jQuery(".cmp-coming-soon-maintenance .comingsoon:not(."+e+")").css("display","none"),"install"==e?(jQuery(".cmp-coming-soon-maintenance .submit").css("display","none"),jQuery(".cmp-coming-soon-maintenance #csoptions").attr("action",a)):(jQuery(".cmp-coming-soon-maintenance .submit").css("display","block"),jQuery(".cmp-coming-soon-maintenance #csoptions").attr("action",a+"#"+e))},""!=n?navtab(n):jQuery(".cmp-coming-soon-maintenance .table-wrapper-css").css("display","none"),window.onhashchange=function(){n=document.location.hash.substring(1),navtab(n)},jQuery(".cmp-coming-soon-maintenance .nav-tab:not(.theme-preview):not(.advanced)").click(function(e){e.preventDefault(),n=jQuery(this).data("tab"),document.location.hash=n}),p(".cmp-coming-soon-maintenance .blur-range","span","html"),p(".cmp-coming-soon-maintenance .background-overlay-opacity","span","html"),p("#logo_size_slider","#niteoCS_logo_size","val"),p("#niteoCS_logo_size","#logo_size_slider","val"),l("logo",!1,"image","img"),l("favicon",!1,"image","img"),l("seo_img",!1,"image","img"),l("images",!0,"image","img"),l("mobile-images",!0,"image","img"),l("pattern",!1,"image","background"),l("video-thumb",!1,"image","img"),l("video-local",!1,"video","video"),l("subs-img",!1,"image","img"),l("subs-img-popup",!1,"image","img"),l("avatar",!1,"image","img"),l("gallery",!0,"image","img"),u("analytics"),u("contact-form"),u("subscribe"),u("background-effect"),u("special-effect"),u("cmp-logo"),u("background-type"),u("counter"),u("progress-bar"),u("overlay-text"),u("cmp-logo-size"),u("recaptcha-toggle"),u("login-icon"),u("custom-mobile-imgs"),u("lang-switcher"),u("subscribe-popup"),u("inpage-subscribe"),m("counter-action"),m("subscribe-method"),m("background-overlay"),m("banner-video-source"),m("progress-bar-type"),jQuery(".cmp-coming-soon-maintenance select:not(.headings-google-font):not(.content-google-font )").select2({width:"100%",minimumResultsForSearch:-1,placeholder:"Click to select.."}),jQuery(".cmp-coming-soon-maintenance #cmp-status").click(function(){jQuery(".cmp-coming-soon-maintenance .cmp-status input[type=radio]").prop("disabled",function(e,n){return!n}),jQuery("#cmp-toggle-adminbar").toggleClass("status-1"),jQuery(".cmp-status-pages").fadeToggle()}),jQuery(".cmp-status-pages input[type=radio]").change(function(){jQuery(".cmp-status-pages input[type=radio]").parent().removeClass("active"),jQuery(this).parent().addClass("active")}),jQuery(".cmp-coming-soon-maintenance .cmp-status.switch:not(.disabled)").click(function(){if(0!=jQuery(".cmp-coming-soon-maintenance #cmp-status").prop("checked")){var e=jQuery(this).children("input");e.prop("checked",!0),jQuery(".cmp-coming-soon-maintenance .cmp-status.switch").removeClass("active"),jQuery(this).addClass("active"),e.trigger("change"),"3"==e.val()?jQuery(".cmp-coming-soon-maintenance .redirect-inputs").fadeIn("fast"):jQuery(".cmp-coming-soon-maintenance .redirect-inputs").fadeOut("fast")}}),jQuery(".cmp-coming-soon-maintenance .table-wrapper h3").click(function(){jQuery(this).parent().toggleClass("closed")}),jQuery(".cmp-coming-soon-maintenance #test-unsplash").click(function(e){e.preventDefault();var n=jQuery(".cmp-coming-soon-maintenance #unsplash-media"),a=jQuery('.cmp-coming-soon-maintenance .unsplash_banner select[name^="unsplash_feed"] option:selected').val(),t="",i=jQuery(this).data("security");if(0==a){switch(a){case"0":t=jQuery(".cmp-coming-soon-maintenance #niteoCS-unsplash-0").val()}if(3==a||""!=t){var o={feed:a,url:t,feat:"",custom_str:""};jQuery(this).prop("disabled",!0),jQuery(this).html('<i class="fas fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>');var r={action:"niteo_unsplash",security:i,params:o};jQuery.post(ajaxurl,r,function(e){var a=JSON.parse(e);jQuery("#unsplash_img").remove();var t=setTimeout(function(){jQuery("#test-unsplash").prop("disabled",!1),jQuery("#test-unsplash").text("Display Unsplash Photo"),jQuery("#unsplash-media").html('<p>It seems <a href="https://status.unsplash.com/" target="_blank">Unsplash API</a> is not responding. Please try again later.</p>')},5e3);if("200"==a.response){if((a=jQuery.parseJSON(a.body))[0])var i=a[0].urls.raw+"?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=900",o=a[0].user.name,r=a[0].user.links.html,s=a[0].links.html,c=a[0].id;else i=a.urls.raw+"?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=900",o=a.user.name,r=a.user.links.html,s=a.links.html,c=a.id;jQuery("<img />",{src:i,id:"unsplash_img"}).one("load",function(){jQuery(this).appendTo(n),jQuery(this).fadeIn(),jQuery("#test-unsplash").prop("disabled",!1),jQuery("#test-unsplash").text("Display Unsplash Photo"),jQuery(".unsplash-id").html('<a href="'+s+'" target="_blank">Photo</a> (ID: '+c+') by <a href="'+r+'" target="_blank">'+o+'</a> / <a href="https://unsplash.com/" target="_blank">Unsplash</a>'),jQuery(".blur-range").trigger("input"),clearTimeout(t)})}else jQuery(".cmp-coming-soon-maintenance #test-unsplash").prop("disabled",!1),jQuery(".cmp-coming-soon-maintenance #test-unsplash").text("Display Unsplash Photo"),jQuery(".cmp-coming-soon-maintenance #unsplash-media").html("<p>Error "+a.response+': <span style="text-transform:lowercase;">'+JSON.parse(a.body).errors+"</span></p>"),clearTimeout(t)})}else jQuery(".cmp-coming-soon-maintenance #unsplash_img").remove()}}),videoPreview=function(){if("5"==jQuery(".cmp-coming-soon-maintenance .background-type:checked").val()){var e=jQuery(".cmp-coming-soon-maintenance .banner-video-source").val();if("youtube"==e){var n=jQuery(".cmp-coming-soon-maintenance #niteoCS-youtube-url").val();if(""!=n){var a=n.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/);if(a&&11==a[7].length){jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").html("");var t="https://img.youtube.com/vi/"+a[7]+"/maxresdefault.jpg";jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").append('<img src="'+t+'" alt=""/>'),jQuery(".cmp-coming-soon-maintenance .blur-range").trigger("input")}else jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").html("")}}if("local"==e){var i=jQuery("#niteoCS-video-local-id").data("url");""!=i&&jQuery(".cmp-coming-soon-maintenance .video-local-wrapper").html('<video width="600" height="400" controls><source src="'+i+'" type="video/mp4">Your browser does not support the video tag.</video>')}}},videoPreview(),jQuery(".cmp-coming-soon-maintenance .background-type").on("change",function(){videoPreview()}),jQuery(".cmp-coming-soon-maintenance #niteoCS-youtube-url").on("keyup",function(){videoPreview()}),jQuery(".cmp-coming-soon-maintenance .banner-video-source").on("change",function(){videoPreview()});var i=jQuery('.unsplash_banner select[name^="unsplash_feed"] option:selected').val();function o(e){switch(e){case"solid-color":jQuery(".thumbnail-overlay").css("background",jQuery("#niteoCS_overlay_color").val());break;case"gradient":jQuery(".cmp-coming-soon-maintenance select.overlay-gradient").trigger("change");break;case"disabled":jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css("background","none")}}jQuery(".unsplash-feed-"+i).css("display","block"),jQuery('.unsplash_banner select[name^="unsplash_feed"]').on("change",function(){i=jQuery('.unsplash_banner select[name^="unsplash_feed"] option:selected').val(),jQuery(".unsplash-feed").css("display","none"),jQuery(".unsplash-feed-"+i).css("display","block"),jQuery("#test-unsplash").trigger("click")}),1==jQuery("#csoptions .niteoCS_banner:checked").val()&&jQuery("#test-unsplash").trigger("click"),jQuery(".cmp-coming-soon-maintenance select.background-gradient").on("change",function(){var e=jQuery(".cmp-coming-soon-maintenance select.background-gradient option:selected").val();"custom"==e?(jQuery(".cmp-coming-soon-maintenance .custom-gradient").css("display","block"),jQuery(".cmp-coming-soon-maintenance .gradient-preview").css({background:"-moz-linear-gradient(-45deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)",background:"linear-gradient(135deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)"})):(colors=e.split(":"),jQuery(".cmp-coming-soon-maintenance .custom-gradient").css("display","none"),jQuery(".cmp-coming-soon-maintenance .gradient-preview").css({background:"-moz-linear-gradient(-45deg, "+colors[0]+" 0%, "+colors[1]+" 100%)",background:"-webkit-linear-gradient(-45deg, "+colors[0]+" 0%, "+colors[1]+" 100%)",background:"linear-gradient(135deg, "+colors[0]+" 0%, "+colors[1]+" 100%)"}))}).trigger("change"),jQuery(".cmp-coming-soon-maintenance #niteoCS_banner_color").wpColorPicker({change:function(e,n){jQuery(".color-preview").css("background-color",n.color.toString())}}),jQuery(".cmp-coming-soon-maintenance #niteoCS_gradient_one").wpColorPicker({change:function(e,n){jQuery(".gradient-preview").css({background:"-moz-linear-gradient(-45deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)",background:"linear-gradient(135deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_gradient_two").val()+" 100%)"})}}),jQuery(".cmp-coming-soon-maintenance #niteoCS_gradient_two").wpColorPicker({change:function(e,n){jQuery(".gradient-preview").css({background:"-moz-linear-gradient(-45deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)",background:"linear-gradient(135deg, "+jQuery("#niteoCS_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)"})}}),jQuery(".cmp-coming-soon-maintenance #niteoCS_overlay_color").wpColorPicker({change:function(e,n){jQuery(".thumbnail-overlay").css("background",n.color.toString())}}),jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css("background",jQuery("#niteoCS_overlay_color").val()),jQuery(".cmp-coming-soon-maintenance select.overlay-gradient").on("change",function(){var e=jQuery("select.overlay-gradient option:selected").val();if("custom"==e){jQuery(".cmp-coming-soon-maintenance .custom-overlay-gradient").css("display","block");var n=jQuery("#niteoCS_overlay_gradient_one").val(),a=jQuery("#niteoCS_overlay_gradient_two").val();jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css({background:"-moz-linear-gradient(-45deg, "+n+" 0%, "+a+" 100%)",background:"-webkit-linear-gradient(-45deg, "+n+" 0%, "+a+" 100%)",background:"linear-gradient(135deg, "+n+" 0%, "+a+" 100%)"})}else colors=e.split(":"),jQuery(".cmp-coming-soon-maintenance .custom-overlay-gradient").css("display","none"),jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css({background:"-moz-linear-gradient(-45deg, "+colors[0]+" 0%, "+colors[1]+" 100%)",background:"-webkit-linear-gradient(-45deg, "+colors[0]+" 0%, "+colors[1]+" 100%)",background:"linear-gradient(135deg, "+colors[0]+" 0%, "+colors[1]+" 100%)"})}),jQuery("#niteoCS_overlay_gradient_one").wpColorPicker({change:function(e,n){jQuery(".thumbnail-overlay").css({background:"-moz-linear-gradient(-45deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_overlay_gradient_two").val()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_overlay_gradient_two").val()+" 100%)",background:"linear-gradient(135deg, "+n.color.toString()+" 0%, "+jQuery("#niteoCS_overlay_gradient_two").val()+" 100%)"})}}),jQuery("#niteoCS_overlay_gradient_two").wpColorPicker({change:function(e,n){jQuery(".thumbnail-overlay").css({background:"-moz-linear-gradient(-45deg, "+jQuery("#niteoCS_overlay_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)",background:"-webkit-linear-gradient(-45deg, "+jQuery("#niteoCS_overlay_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)",background:"linear-gradient(135deg, "+jQuery("#niteoCS_overlay_gradient_one").val()+" 0%, "+n.color.toString()+" 100%)"})}}),jQuery(".background-overlay-opacity").on("input",function(){var e=jQuery(this).val();jQuery(".thumbnail-overlay").css("opacity",e)}).trigger("input"),o(jQuery(".cmp-coming-soon-maintenance .background-overlay").val()),jQuery(".cmp-coming-soon-maintenance .background-overlay").on("change",function(){o(jQuery(this).val())}),jQuery(".cmp-coming-soon-maintenance .blur-range").on("input",function(){var e=jQuery(this).val();jQuery(".cmp-coming-soon-maintenance .background-thumb-wrapper img:not(.no-blur)").css("filter","blur("+e+"px)")}).trigger("input"),jQuery('.cmp-coming-soon-maintenance select[name^="niteoCS_banner_pattern"]').on("change",function(){var e=jQuery('.cmp-coming-soon-maintenance select[name^="niteoCS_banner_pattern"] option:selected').val();if("custom"!=e){var n=jQuery(this).data("url");jQuery(".cmp-coming-soon-maintenance #add-pattern").css("display","none"),jQuery(".cmp-coming-soon-maintenance .pattern-wrapper").css("background-image","url('"+n+e+".png')")}else{n=jQuery(".cmp-coming-soon-maintenance #niteoCS_banner_pattern_custom").val();jQuery(".cmp-coming-soon-maintenance #add-pattern").css("display","block"),jQuery(".cmp-coming-soon-maintenance .pattern-wrapper").css("background-image","url('"+n+"')")}}),jQuery(".cmp-coming-soon-maintenance .heading-animation").on("change",function(){heading_anim=jQuery(".cmp-coming-soon-maintenance .heading-animation option:selected").val(),jQuery(".cmp-coming-soon-maintenance #heading-example").removeClass().addClass("animated "+heading_anim)}),jQuery(".cmp-coming-soon-maintenance .content-animation").on("change",function(){heading_anim=jQuery(".cmp-coming-soon-maintenance .content-animation option:selected").val(),jQuery(".cmp-coming-soon-maintenance #content-example").removeClass().addClass("animated "+heading_anim)});var r=function(e,n,a){var t=jQuery(".cmp-coming-soon-maintenance #niteoCS_socialmedia").attr("value");t=jQuery.parseJSON(t),jQuery.each(t,function(t,i){i.name==e&&(i[n]=a)}),jQuery(".cmp-coming-soon-maintenance #niteoCS_socialmedia").attr("value",JSON.stringify(t))};if(!/Mobi/.test(navigator.userAgent)){var s=jQuery(".cmp-coming-soon-maintenance .social-inputs"),c=function(e,n){var a=s.find('input[type="text"]');n.item.index();a.each(function(e,n){var a=jQuery(n).data("name");r(a,"order",e)})};s.sortable({stop:c}),s.on("sortchange",c)}function l(e,n,a,t){var i,o=jQuery("."+e+"-wrapper"),r=jQuery("#add-"+e),s=jQuery("#delete-"+e),c="",l=e.replace("-"," ");l=l[0].toUpperCase()+l.slice(1),""!=jQuery("#niteoCS-"+e+"-id").val()&&s.css("display","block"),r.click(function(r){if(r.preventDefault(),u)u.open();else var u=wp.media({title:"Select "+l,button:{text:"Insert "+l},multiple:n,library:{type:[a]}}).on("select",function(){var n=u.state().get("selection").toJSON();n.length>0&&(o.find("img").remove(),o.attr("class",e+"-wrapper custom-gallery"),o.addClass("gallery-"+n.length),jQuery(n).each(function(a){switch(i=n[a].sizes&&n[a].sizes.large?n[a].sizes.large.url:n[a].url,c+=(0===a?"":",")+n[a].id,t){case"video":o.append('<video width="600" height="400" controls><source src="'+i+'" type="video/mp4">Your browser does not support the video tag.</video>');break;case"background":o.css("background-image","url('"+i+"')");break;case"img":default:n.length>1&&0==a&&jQuery("."+e+"-wrapper .big-thumb").length?jQuery("."+e+"-wrapper .big-thumb").append('<img src="'+i+'" alt=""/>'):n.length>1&&0!==a?o.append('<img src="'+i+'" alt="" class="no-blur"/>'):o.find(".big-thumb").length?jQuery("."+e+"-wrapper .big-thumb").append('<img src="'+i+'" alt=""/>'):o.append('<img src="'+i+'" alt=""/>'),jQuery(".blur-range").trigger("input")}}),s.css("display","block")),jQuery("#niteoCS-"+e+"-id").val(c).trigger("change")}).open()}),s.click(function(n){jQuery(this).css("display","none"),o.find("img").remove(),jQuery("#niteoCS-"+e+"-id").val(""),jQuery("#niteoCS-"+e+"-id").trigger("change")})}function u(e){jQuery(".cmp-coming-soon-maintenance ."+e).change(function(){var n=jQuery(".cmp-coming-soon-maintenance ."+e+":checked").val();n=void 0===(n=jQuery.isNumeric(n)?"x"+n:n)?"off":n,jQuery(".cmp-coming-soon-maintenance ."+e+"-switch."+n).css("display","block"),jQuery(".cmp-coming-soon-maintenance ."+e+"-switch:not(."+n+")").css("display","none")}),jQuery(".cmp-coming-soon-maintenance ."+e).first().trigger("change")}function m(e){jQuery(".cmp-coming-soon-maintenance ."+e).change(function(){var n=jQuery("."+e).val();n=jQuery.isNumeric(n)?"x"+n:n,jQuery(".cmp-coming-soon-maintenance ."+e+"."+n).css("display","block"),jQuery(".cmp-coming-soon-maintenance ."+e+":not(."+n+")").css("display","none")}),jQuery("."+e).first().trigger("change")}function p(e,n,a){jQuery(e).on("input",function(){var e=jQuery(this).val();"html"===a&&jQuery(this).parent().find(n).html(e),"val"===a&&jQuery(this).parent().find(n).val(e)})}jQuery,jQuery.fn.toggleDisabled=function(){return this.each(function(){var e,n=jQuery(this),a=n.data("name");n.attr("disabled")?(n.prop("disabled",!1),e="1"):(n.prop("disabled",!0),e="0"),r(a,"active",e)})},jQuery('.cmp-coming-soon-maintenance .social-inputs input[type="text"]').focusout(function(){var e=jQuery(this).data("name"),n=jQuery(this).val();r(e,"url",n)}),jQuery('.cmp-coming-soon-maintenance .social-inputs input[type="checkbox"]').click(function(e){jQuery(this).siblings('input[type="text"]').toggleDisabled()}),jQuery(".cmp-coming-soon-maintenance .social-media i").click(function(){var e=jQuery(this).data("name");jQuery(this).toggleClass("active"),jQuery(".cmp-coming-soon-maintenance .social-inputs li."+e).toggleClass("active"),jQuery(".cmp-coming-soon-maintenance .social-inputs li."+e+" input").trigger("change"),jQuery(this).hasClass("active")?r(e,"hidden","0"):r(e,"hidden","1"),jQuery(".cmp-coming-soon-maintenance .social-media i.active").length?jQuery(".social-inputs .label").css("display","block"):jQuery(".cmp-coming-soon-maintenance .social-inputs .label").css("display","none")}),jQuery(".cmp-coming-soon-maintenance .social-media i.active").length&&jQuery(".cmp-coming-soon-maintenance .social-inputs .label").css("display","block"),jQuery(".cmp.update-theme").click(function(e){e.preventDefault();var n=jQuery(this),a=n.parents(".notice"),t=n.data("security"),i=n.data("slug"),o=n.data("name"),r={action:"cmp_theme_update_install",security:t,file:{name:i,tmp_name:"",url:jQuery(this).data("remote_url")+"?action=download&slug="+i}};a.find(".message").html('<i class="fas fa-cog fa-spin fa-1x fa-fw"></i><span class="sr-only">Updating heme...</span><span> working hard on updating Theme...</span>'),jQuery.post(ajaxurl,r,function(e){if("success"==(e=e.trim()))setTimeout(function(){a.removeClass("notice-warning").addClass("notice-success"),a.find(".message").html("<span> "+o+' CMP theme was updated sucessfully! You can enjoy latest features now :) </span><i class="far fa-smile" aria-hidden="true"></i>')},1500);else{e=e.slice(0,-1);var n=jQuery("p",jQuery(e)).text();a.removeClass("notice-warning").addClass("notice-error"),a.find(".message").html('<i class="far fa-frown" aria-hidden="true"></i><span> '+n+"</span>")}})}),jQuery(".cmp-coming-soon-maintenance .theme-update.button").one("click",function(e){e.preventDefault();var n=jQuery(this),a=n.closest(".theme-wrapper"),t=a.data("security"),i=a.data("slug"),o={action:"cmp_theme_update_install",security:t,file:{name:i,tmp_name:"",url:a.data("remote_url")+"?action=download&slug="+i}};n.html('<i class="fas fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>'),jQuery.post(ajaxurl,o,function(e){"success"==e?setTimeout(function(){n.html('<i class="far fa-smile" aria-hidden="true"></i><span>Updated!</span>'),setTimeout(function(){n.fadeOut()},1500)},1500):(e=e.slice(0,-1),n.html('<i class="far fa-frown" aria-hidden="true"></i><span>Update Failed!</span>'))})}),jQuery(".cmp-coming-soon-maintenance .theme-details").click(function(e){e.preventDefault();var n=jQuery(this).closest(".theme-wrapper"),a=n.data("slug"),t=n.data("version"),i=n.data("type"),o=n.data("purchased"),r=0,s={action:"niteo_themeinfo",security:jQuery(".theme-wrapper").data("security"),theme_slug:jQuery(this).parents(".theme-wrapper").data("slug")};jQuery.post(ajaxurl,s,function(e){var s="",c="";if("true"==(e=jQuery.parseJSON(e)).result){if(jQuery("body").addClass("modal-open"),"1"==o&&(c='<span class="theme-version">Installed version: '+t+"</span>"),"1"!=o&&"premium"==i)s='<button type="button" class="theme-purchase button hide"><a href="'+n.find(".cmp-purchase-theme").attr("href")+'" target="_blank"><i class="fas fa-cart-arrow-down" aria-hidden="true"></i>Get Theme</a></button>';var l=e.screenshots,u="";Object.keys(l).length>1&&(u='<div class="screenshots-nav"><div class="left"><i class="fas fa-chevron-left" aria-hidden="true"></i></div><div class="right"><i class="fas fa-chevron-right" aria-hidden="true"></i></div></div>');var m=jQuery(['<div class="theme-backdrop">','\t<div class="theme-wrap">','\t\t<div class="theme-header">','\t\t\t<button class="close dashicons dashicons-no"><span class="screen-reader-text">Close details dialog</span></button>',"\t\t</div>",'\t\t<div class="theme-about">','\t\t\t<div class="theme-screenshots">','\t\t\t\t<div class="screenshot" style="background-image:url(\''+l[0]+"')\">"+u+"</div>","\t\t\t</div>",'\t\t\t<div class="theme-info">','\t\t\t\t<h2 class="theme-name">'+e.name+c+"</h2>",'\t\t\t\t<p class="theme-author">By <a href="'+e.author_homepage+'" target="_blank">'+e.author+"</a></p>","",s,'\t\t\t\t<div class="theme-description">'+e.description+"</div>","\t\t\t</div>","\t\t</div>",'\t\t<div class="theme-actions">','\t\t\t<a href="https://niteothemes.com/cmp-coming-soon-maintenance/?theme='+a+"&utm_source=cmp&utm_medium=referral&utm_campaign="+a+'" class="button cmp-preview" target="_blank" aria-label="Preview '+e.name+'">Live Preview</a>',"\t\t</div>","\t</div>","</div>"].join("\n"));jQuery(".theme-overlay.cmp").append(m),jQuery(".theme-overlay.cmp .close").click(function(e){e.preventDefault(),jQuery("body").removeClass("modal-open"),jQuery(".theme-overlay.cmp .theme-backdrop").fadeOut("fast")}),jQuery(".screenshots-nav .right").click(function(){++r==Object.keys(l).length&&(r=0),r in l&&jQuery(".screenshot").css("background-image","url('"+l[r]+"')")}),jQuery(".screenshots-nav .left").click(function(){--r<0&&(r=Object.keys(l).length-1),r in l&&jQuery(".screenshot").css("background-image","url('"+l[r]+"')")})}})}),jQuery(".cmp-coming-soon-maintenance #connect-mailchimp").click(function(e){e.preventDefault();var n=jQuery('.cmp-coming-soon-maintenance input[name="niteoCS_mailchimp_apikey"]').val(),a=jQuery(this).data("security"),t=jQuery(this);if(""!=n){var i={apikey:n,security:a};jQuery(this).prop("disabled",!0),jQuery(this).html('<i class="fas fa-cog fa-spin fa-1x fa-fw"></i><span> retrieving lists..</span>');var o={action:"cmp_mailchimp_list_ajax",security:a,params:i};jQuery.post(ajaxurl,o,function(e){var n=JSON.parse(e);200==n.response?(jQuery("#niteoCS_mailchimp_list").empty().prop("disabled",!1),jQuery.each(n.lists,function(e,n){jQuery("#niteoCS_mailchimp_list").append('<option value="'+n.id+'">'+n.name+"</option>")})):jQuery("#niteoCS_mailchimp_list").empty().prop("disabled",!0).html('<option value="error">'+n.message+"</option>").trigger("change"),t.html("Retrieve Lists"),t.prop("disabled",!1)}).fail(function(){t.html("Retrieve Lists"),t.prop("disabled",!1)})}}),jQuery(".cmp-coming-soon-maintenance .table-wrapper.theme-setup h4").each(function(){if("Overlay Color"==jQuery(this).html())return jQuery(this).parents("tr").remove(),!1}),jQuery(".nav-tab-wrapper").on("click",".theme-preview",function(e){return!(jQuery("#csoptions fieldset:not(.skip-preview-validation *)").serialize()!=t&&!confirm("You have made changes that will not be visible in the preview until you save them. Please save changes first.\nContinue anyway?"))||(e.preventDefault(),!1)})});
|
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: 4.0.
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
@@ -63,7 +63,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
|
|
63 |
|
64 |
// define constants
|
65 |
private function constants() {
|
66 |
-
$this->define( 'CMP_VERSION', '4.0.
|
67 |
$this->define( 'CMP_DEBUG', FALSE );
|
68 |
$this->define( 'CMP_AUTHOR', 'NiteoThemes' );
|
69 |
$this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
|
@@ -1661,7 +1661,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
|
|
1661 |
}
|
1662 |
}
|
1663 |
|
1664 |
-
if (
|
1665 |
// email already passed is_email, no need to sanitize
|
1666 |
$email = sanitize_email( $_POST['email'] );
|
1667 |
|
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: 4.0.3
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
63 |
|
64 |
// define constants
|
65 |
private function constants() {
|
66 |
+
$this->define( 'CMP_VERSION', '4.0.3' );
|
67 |
$this->define( 'CMP_DEBUG', FALSE );
|
68 |
$this->define( 'CMP_AUTHOR', 'NiteoThemes' );
|
69 |
$this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
|
1661 |
}
|
1662 |
}
|
1663 |
|
1664 |
+
if ( filter_var( $_POST['email'], FILTER_VALIDATE_EMAIL ) ) {
|
1665 |
// email already passed is_email, no need to sanitize
|
1666 |
$email = sanitize_email( $_POST['email'] );
|
1667 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: coming soon, coming soon page, launch page, maintenance mode, under constr
|
|
5 |
Requires at least: 3.0
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.6
|
8 |
-
Stable tag: 4.0.
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -160,6 +160,12 @@ https://www.youtube.com/watch?v=uxuJfHzwdtE
|
|
160 |
<p>Nothing is better than a good feedback! Please go to <a href="https://wordpress.org/support/plugin/cmp-coming-soon-maintenance/reviews/">Plugin reviews</a> and rate it! Alternatively you can click on a Donate button too!:)</p>
|
161 |
|
162 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
<h4>CMP 4.0.2 - 17-Feb-21</h4>
|
164 |
<ul>
|
165 |
<li>Resolved PHP notice error on subscribe form.</li>
|
5 |
Requires at least: 3.0
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.6
|
8 |
+
Stable tag: 4.0.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
160 |
<p>Nothing is better than a good feedback! Please go to <a href="https://wordpress.org/support/plugin/cmp-coming-soon-maintenance/reviews/">Plugin reviews</a> and rate it! Alternatively you can click on a Donate button too!:)</p>
|
161 |
|
162 |
== Changelog ==
|
163 |
+
<h4>CMP 4.0.3 - 19-Feb-21</h4>
|
164 |
+
<ul>
|
165 |
+
<li>Updated Unsplash Image preview size to match UI size.</li>
|
166 |
+
<li>Change verify email function from wp_email to FILTER_VALIDATE_EMAIL filter.</li>
|
167 |
+
<li>Changed Countdown Default background image to match it's thumbnail.</li>
|
168 |
+
</ul>
|
169 |
<h4>CMP 4.0.2 - 17-Feb-21</h4>
|
170 |
<ul>
|
171 |
<li>Resolved PHP notice error on subscribe form.</li>
|
themes/countdown/img/countdown_banner_full.jpg
CHANGED
Binary file
|
themes/countdown/img/countdown_banner_large.jpg
CHANGED
Binary file
|