Version Description
Download this release
Release Info
Developer | niteo |
Plugin | CMP – Coming Soon & Maintenance Plugin by NiteoThemes |
Version | 3.5.3 |
Comparing to | |
See all releases |
Code changes from version 3.5.2 to 3.5.3
- inc/settings/settings-theme-selector.php +1 -10
- js/settings.js +1 -7
- js/settings.min.js +1 -1
- niteo-cmp.php +2 -2
- readme.txt +6 -1
inc/settings/settings-theme-selector.php
CHANGED
@@ -103,15 +103,6 @@ if ( !empty( $downloadable_themes ) ) { ?>
|
|
103 |
foreach ( $downloadable_themes as $premium_theme ) {
|
104 |
$theme_slug = $premium_theme['name'];
|
105 |
|
106 |
-
switch ( $theme_slug ) {
|
107 |
-
case 'pluto':
|
108 |
-
$background = '4';
|
109 |
-
break;
|
110 |
-
default:
|
111 |
-
$background = '1';
|
112 |
-
break;
|
113 |
-
}
|
114 |
-
|
115 |
$thumbnail = plugins_url('../../img/thumbnails/'. $theme_slug . '_thumbnail.jpg', __FILE__); ?>
|
116 |
|
117 |
<div class="theme-wrapper premium" data-security="<?php echo esc_attr($ajax_nonce);?>" data-slug="<?php echo esc_attr($theme_slug);?>" data-type="premium">
|
@@ -122,7 +113,7 @@ if ( !empty( $downloadable_themes ) ) { ?>
|
|
122 |
|
123 |
<a href="<?php echo esc_url ( $premium_theme['url'] );?>" target="_blank" class="theme-purchase button hide"><i class="fa fa-download" aria-hidden="true"></i><?php echo sprintf(__('Get %s', 'cmp-coming-soon-maintenance'), ucwords( esc_html( str_replace('_', ' ', $theme_slug) ) ));?></a>
|
124 |
|
125 |
-
<a href="<?php echo 'https://
|
126 |
|
127 |
<button type="button" class="theme-details button hide"><i class="fa fa-eye" aria-hidden="true"></i><?php _e('DETAILS', 'cmp-coming-soon-maintenance');?></button>
|
128 |
|
103 |
foreach ( $downloadable_themes as $premium_theme ) {
|
104 |
$theme_slug = $premium_theme['name'];
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
$thumbnail = plugins_url('../../img/thumbnails/'. $theme_slug . '_thumbnail.jpg', __FILE__); ?>
|
107 |
|
108 |
<div class="theme-wrapper premium" data-security="<?php echo esc_attr($ajax_nonce);?>" data-slug="<?php echo esc_attr($theme_slug);?>" data-type="premium">
|
113 |
|
114 |
<a href="<?php echo esc_url ( $premium_theme['url'] );?>" target="_blank" class="theme-purchase button hide"><i class="fa fa-download" aria-hidden="true"></i><?php echo sprintf(__('Get %s', 'cmp-coming-soon-maintenance'), ucwords( esc_html( str_replace('_', ' ', $theme_slug) ) ));?></a>
|
115 |
|
116 |
+
<a href="<?php echo 'https://niteothemes.com/cmp-coming-soon-maintenance/?theme='.$theme_slug.'&utm_source=cmp&utm_medium=referral&utm_campaign='.$theme_slug.'';?>" target="_blank" class="theme-preview button hide"><i class="fa fa-external-link" aria-hidden="true"></i><?php _e('PREVIEW', 'cmp-coming-soon-maintenance');?></a>
|
117 |
|
118 |
<button type="button" class="theme-details button hide"><i class="fa fa-eye" aria-hidden="true"></i><?php _e('DETAILS', 'cmp-coming-soon-maintenance');?></button>
|
119 |
|
js/settings.js
CHANGED
@@ -1140,13 +1140,7 @@ jQuery(document).ready(function($) {
|
|
1140 |
'class="button activate" name="Submit" aria-label="Select ' +
|
1141 |
response["name"] +
|
1142 |
'">Activate</button>',
|
1143 |
-
' <a href="
|
1144 |
-
slug +
|
1145 |
-
"&utm_source=cmp&utm_medium=referral&utm_campaign=" +
|
1146 |
-
slug +
|
1147 |
-
'" class="button cmp-preview" target="_blank" aria-label="Preview ' +
|
1148 |
-
response["name"] +
|
1149 |
-
'">Live Preview</a>',
|
1150 |
" </div>",
|
1151 |
" </div>",
|
1152 |
"</div>"
|
1140 |
'class="button activate" name="Submit" aria-label="Select ' +
|
1141 |
response["name"] +
|
1142 |
'">Activate</button>',
|
1143 |
+
' <a href="https://niteothemes.com/cmp-coming-soon-maintenance/?theme=' +slug + '&utm_source=cmp&utm_medium=referral" class="button cmp-preview" target="_blank" aria-label="Preview ' + response["name"] + '">Live Preview</a>',
|
|
|
|
|
|
|
|
|
|
|
|
|
1144 |
" </div>",
|
1145 |
" </div>",
|
1146 |
"</div>"
|
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=e("#csoptions fieldset:not(.skip-preview-validation *)").serialize();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)},e(".cmp-coming-soon-maintenance .nav-tab:not(.theme-preview)").click(function(a){a.preventDefault(),n=e(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("pattern",!1,"image","background"),l("video-thumb",!1,"image","img"),l("video-local",!1,"video","video"),u("analytics"),u("contact-form"),u("subscribe"),u("background-effect"),u("special-effect"),u("cmp-logo"),u("background-type"),u("counter"),u("overlay-text"),u("cmp-logo-size"),m("counter-action"),m("subscribe-method"),m("background-overlay"),m("banner-video-source"),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(n){n.preventDefault();var a=jQuery(".cmp-coming-soon-maintenance #unsplash-media"),t=jQuery('.cmp-coming-soon-maintenance .unsplash_banner select[name^="unsplash_feed"] option:selected').val(),i="",o=jQuery(this).data("security");if(0==t){switch(t){case"0":i=jQuery(".cmp-coming-soon-maintenance #niteoCS-unsplash-0").val()}if(3==t||""!=i){var r={feed:t,url:i,feat:"",custom_str:""};jQuery(this).prop("disabled",!0),jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>');var c={action:"niteo_unsplash",security:o,params:r};e.post(ajaxurl,c,function(e){var n=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"==n.response){if((n=jQuery.parseJSON(n.body))[0])var i=n[0].urls.raw+"?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588",o=n[0].user.name,r=n[0].user.links.html,c=n[0].links.html,s=n[0].id;else i=n.urls.raw+"?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588",o=n.user.name,r=n.user.links.html,c=n.links.html,s=n.id;jQuery("<img />",{src:i,id:"unsplash_img"}).one("load",function(){jQuery(this).appendTo(a),jQuery(this).fadeIn(),jQuery("#test-unsplash").prop("disabled",!1),jQuery("#test-unsplash").text("Display Unsplash Photo"),jQuery(".unsplash-id").html('<a href="'+c+'" target="_blank">Photo</a> (ID: '+s+') 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 "+n.response+': <span style="text-transform:lowercase;">'+JSON.parse(n.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 n=e(".cmp-coming-soon-maintenance .banner-video-source").val();if("youtube"==n){var a=e(".cmp-coming-soon-maintenance #niteoCS-youtube-url").val();if(""!=a){var t=a.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/);if(t&&11==t[7].length){jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").html("");var i="https://img.youtube.com/vi/"+t[7]+"/maxresdefault.jpg";jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").append('<img src="'+i+'" 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"==n){var o=jQuery("#niteoCS-video-local-id").data("url");""!=o&&e(".cmp-coming-soon-maintenance .video-local-wrapper").html('<video width="600" height="400" controls><source src="'+o+'" 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(n,a,t){var i=e(".cmp-coming-soon-maintenance #niteoCS_socialmedia").attr("value");i=e.parseJSON(i),e.each(i,function(e,i){i.name==n&&(i[a]=t)}),e(".cmp-coming-soon-maintenance #niteoCS_socialmedia").attr("value",JSON.stringify(i))};if(!/Mobi/.test(navigator.userAgent)){var c=e(".cmp-coming-soon-maintenance .social-inputs"),s=function(n,a){var t=c.find('input[type="text"]');a.item.index();t.each(function(n,a){var t=e(a).data("name");r(t,"order",n)})};c.sortable({stop:s}),c.on("sortchange",s)}function l(e,n,a,t){var i,o=jQuery("."+e+"-wrapper"),r=jQuery("#add-"+e),c=jQuery("#delete-"+e),s="",l=e.replace("-"," ");l=l[0].toUpperCase()+l.slice(1),""!=jQuery("#niteoCS-"+e+"-id").val()&&c.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(e){switch(i=n[e].sizes&&n[e].sizes.large?n[e].sizes.large.url:n[e].url,s+=(0===e?"":",")+n[e].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==e?jQuery(".big-thumb").append('<img src="'+i+'" alt=""/>'):n.length>1&&0!==e?o.append('<img src="'+i+'" alt="" class="no-blur"/>'):o.find(".big-thumb").length?jQuery(".big-thumb").append('<img src="'+i+'" alt=""/>'):o.append('<img src="'+i+'" alt=""/>'),jQuery(".blur-range").trigger("input")}}),c.css("display","block")),jQuery("#niteoCS-"+e+"-id").val(s).trigger("change")}).open()}),c.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)})}!function(e){e.fn.toggleDisabled=function(){return this.each(function(){var n,a=e(this),t=a.data("name");a.attr("disabled")?(a.prop("disabled",!1),n="1"):(a.prop("disabled",!0),n="0"),r(t,"active",n)})}}(jQuery),jQuery('.cmp-coming-soon-maintenance .social-inputs input[type="text"]').focusout(function(){var e=jQuery(this).data("name"),n=jQuery(this).attr("value");r(e,"url",n)}),jQuery('.cmp-coming-soon-maintenance .social-inputs input[type="checkbox"]').click(function(n){e(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(n){n.preventDefault();var a=e(this),t=a.parents(".notice"),i=a.data("security"),o=a.data("slug"),r=a.data("name"),c={action:"cmp_theme_update_install",security:i,file:{name:o,tmp_name:"",url:jQuery(this).data("remote_url")+"?action=download&slug="+o}};t.find(".message").html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span class="sr-only">Updating heme...</span><span> working hard on updating Theme...</span>'),e.post(ajaxurl,c,function(n){if("success"==(n=n.trim()))setTimeout(function(){t.removeClass("notice-warning").addClass("notice-success"),t.find(".message").html("<span> "+r+' CMP theme was updated sucessfully! You can enjoy latest features now :) </span><i class="fa fa-smile-o" aria-hidden="true"></i>')},1500);else{n=n.slice(0,-1);var a=e("p",e(n)).text();t.removeClass("notice-warning").addClass("notice-error"),t.find(".message").html('<i class="fa fa-frown-o" aria-hidden="true"></i><span> '+a+"</span>")}})}),jQuery(".cmp-coming-soon-maintenance .theme-select").click(function(){jQuery(this).parent().find('input[name="niteoCS_select_theme"]').prop("checked",!0).trigger("change"),jQuery(".cmp-coming-soon-maintenance .theme-select").removeClass("selected"),jQuery(this).parent().find(".theme-select").addClass("selected")}),jQuery(".cmp-coming-soon-maintenance .theme-update.button").one("click",function(n){n.preventDefault();var a=e(this),t=a.closest(".theme-wrapper"),i=t.data("security"),o=t.data("slug"),r={action:"cmp_theme_update_install",security:i,file:{name:o,tmp_name:"",url:t.data("remote_url")+"?action=download&slug="+o}};a.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>'),e.post(ajaxurl,r,function(e){"success"==e?setTimeout(function(){a.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>'),setTimeout(function(){a.fadeOut()},1500)},1500):(e=e.slice(0,-1),a.html('<i class="fa fa-frown-o" aria-hidden="true"></i><span>Update Failed!</span>'))})}),jQuery(".cmp-coming-soon-maintenance .theme-details").click(function(){var n=e(this),a=n.closest(".theme-wrapper"),t=a.data("slug"),i=a.data("version"),o=a.data("remote_url"),r=a.data("type"),c=a.data("purchased"),s=(a.data("freebie"),jQuery(".update-theme").data("security")),l=(a.data("price"),0),u={action:"niteo_themeinfo",security:jQuery(".theme-wrapper").data("security"),theme_slug:jQuery(this).parents(".theme-wrapper").data("slug")};e.post(ajaxurl,u,function(u){var m="",p="",d="",g="";if("true"==(u=jQuery.parseJSON(u)).result){if(jQuery("body").addClass("modal-open"),"1"==c&&(d='<span class="theme-version">Version: '+i+"</span>",g='<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>',jQuery(".update-theme").length)){var y=jQuery(".update-theme").data("slug");if(t==y){var h=jQuery(".update-theme").data("new_ver");g='<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 '+u.name+' theme available. <a href="'+o+"readme/"+t+'-readme.php" class="view-release">View update '+h+' notes</a> or <a href="'+window.location.href+"&action=update-cmp-theme&theme="+t+'" class="update-theme" data-security="'+s+'" data-slug="'+t+'" data-remote_url="'+o+'">Update now.</a></strong></p><div class="release-note"></div></div>'}}if("1"!=c&&"premium"==r)m="disabled ",p='<button type="button" class="theme-purchase button hide"><a href="'+a.find("a").attr("href")+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>Get Theme</a></button>';var v=u.screenshots,j="";Object.keys(v).length>1&&(j='<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>');var f=e(['<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(\''+v[0]+"')\">"+j+"</div>","\t\t\t</div>",'\t\t\t<div class="theme-info">','\t\t\t\t<h2 class="theme-name">'+u.name+d+"</h2>",'\t\t\t\t<p class="theme-author">By <a href="'+u.author_homepage+'" target="_blank">'+u.author+"</a></p>",g,p,'\t\t\t\t<div class="theme-description">'+u.description+"</div>","\t\t\t</div>","\t\t</div>",'\t\t<div class="theme-actions">','\t\t\t<button type="submit" '+m+'class="button activate" name="Submit" aria-label="Select '+u.name+'">Activate</button>','\t\t\t<a href="http://cmp.niteothemes.com/?cmp_preview=true&selector=true&theme='+t+"&utm_source=cmp&utm_medium=referral&utm_campaign="+t+'" class="button cmp-preview" target="_blank" aria-label="Preview '+u.name+'">Live Preview</a>',"\t\t</div>","\t</div>","</div>"].join("\n"));jQuery(".theme-overlay.cmp").append(f),jQuery(".theme-overlay.cmp .view-release").click(function(e){e.preventDefault();var a=(n=jQuery(this)).attr("href");jQuery.get(a,function(e){n.closest(".notice").find(".release-note .notes").remove(),n.closest(".notice").find(".release-note").append('<div class="notes">'+e+"</div>")}).fail(function(){n.closest(".notice").find(".release-note p").remove(),n.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('.cmp-coming-soon-maintenance input[name="niteoCS_select_theme"]').each(function(){jQuery(this).val()==t&&(jQuery(this).prop("checked",!0),jQuery(".theme-select").removeClass("selected"),jQuery(this).parent().addClass("selected"))}),jQuery(this).submit()}),jQuery(".screenshots-nav .right").click(function(){++l==Object.keys(v).length&&(l=0),l in v&&jQuery(".screenshot").css("background-image","url('"+v[l]+"')")}),jQuery(".screenshots-nav .left").click(function(){--l<0&&(l=Object.keys(v).length-1),l in v&&jQuery(".screenshot").css("background-image","url('"+v[l]+"')")})}})}),jQuery(".cmp-coming-soon-maintenance #connect-mailchimp").click(function(n){n.preventDefault();var a=jQuery('.cmp-coming-soon-maintenance input[name="niteoCS_mailchimp_apikey"]').val(),t=jQuery(this).data("security"),i=jQuery(this);if(""!=a){var o={apikey:a,security:t};jQuery(this).prop("disabled",!0),jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> retrieving lists..</span>');var r={action:"cmp_mailchimp_list_ajax",security:t,params:o};e.post(ajaxurl,r,function(n){var a=JSON.parse(n);200==a.response?(e("#niteoCS_mailchimp_list").empty().prop("disabled",!1),e.each(a.lists,function(n,a){e("#niteoCS_mailchimp_list").append('<option value="'+a.id+'">'+a.name+"</option>")})):e("#niteoCS_mailchimp_list").empty().prop("disabled",!0).html('<option value="error">'+a.message+"</option>").trigger("change"),i.html("Retrieve Lists"),i.prop("disabled",!1)}).fail(function(){i.html("Retrieve Lists"),i.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}),wp.codeEditor&&wp.codeEditor.initialize("niteoCS_custom_css"),e(".nav-tab-wrapper").on("click",".theme-preview",function(n){return!(e("#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?"))||(n.preventDefault(),!1)})});
|
1 |
+
jQuery(document).ready(function(e){var n=document.location.hash.substring(1),a=jQuery("#csoptions").attr("action"),t=e("#csoptions fieldset:not(.skip-preview-validation *)").serialize();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)},e(".cmp-coming-soon-maintenance .nav-tab:not(.theme-preview)").click(function(a){a.preventDefault(),n=e(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("pattern",!1,"image","background"),l("video-thumb",!1,"image","img"),l("video-local",!1,"video","video"),u("analytics"),u("contact-form"),u("subscribe"),u("background-effect"),u("special-effect"),u("cmp-logo"),u("background-type"),u("counter"),u("overlay-text"),u("cmp-logo-size"),m("counter-action"),m("subscribe-method"),m("background-overlay"),m("banner-video-source"),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(n){n.preventDefault();var a=jQuery(".cmp-coming-soon-maintenance #unsplash-media"),t=jQuery('.cmp-coming-soon-maintenance .unsplash_banner select[name^="unsplash_feed"] option:selected').val(),i="",o=jQuery(this).data("security");if(0==t){switch(t){case"0":i=jQuery(".cmp-coming-soon-maintenance #niteoCS-unsplash-0").val()}if(3==t||""!=i){var r={feed:t,url:i,feat:"",custom_str:""};jQuery(this).prop("disabled",!0),jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>');var c={action:"niteo_unsplash",security:o,params:r};e.post(ajaxurl,c,function(e){var n=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"==n.response){if((n=jQuery.parseJSON(n.body))[0])var i=n[0].urls.raw+"?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588",o=n[0].user.name,r=n[0].user.links.html,c=n[0].links.html,s=n[0].id;else i=n.urls.raw+"?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588",o=n.user.name,r=n.user.links.html,c=n.links.html,s=n.id;jQuery("<img />",{src:i,id:"unsplash_img"}).one("load",function(){jQuery(this).appendTo(a),jQuery(this).fadeIn(),jQuery("#test-unsplash").prop("disabled",!1),jQuery("#test-unsplash").text("Display Unsplash Photo"),jQuery(".unsplash-id").html('<a href="'+c+'" target="_blank">Photo</a> (ID: '+s+') 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 "+n.response+': <span style="text-transform:lowercase;">'+JSON.parse(n.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 n=e(".cmp-coming-soon-maintenance .banner-video-source").val();if("youtube"==n){var a=e(".cmp-coming-soon-maintenance #niteoCS-youtube-url").val();if(""!=a){var t=a.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/);if(t&&11==t[7].length){jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").html("");var i="https://img.youtube.com/vi/"+t[7]+"/maxresdefault.jpg";jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").append('<img src="'+i+'" 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"==n){var o=jQuery("#niteoCS-video-local-id").data("url");""!=o&&e(".cmp-coming-soon-maintenance .video-local-wrapper").html('<video width="600" height="400" controls><source src="'+o+'" 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(n,a,t){var i=e(".cmp-coming-soon-maintenance #niteoCS_socialmedia").attr("value");i=e.parseJSON(i),e.each(i,function(e,i){i.name==n&&(i[a]=t)}),e(".cmp-coming-soon-maintenance #niteoCS_socialmedia").attr("value",JSON.stringify(i))};if(!/Mobi/.test(navigator.userAgent)){var c=e(".cmp-coming-soon-maintenance .social-inputs"),s=function(n,a){var t=c.find('input[type="text"]');a.item.index();t.each(function(n,a){var t=e(a).data("name");r(t,"order",n)})};c.sortable({stop:s}),c.on("sortchange",s)}function l(e,n,a,t){var i,o=jQuery("."+e+"-wrapper"),r=jQuery("#add-"+e),c=jQuery("#delete-"+e),s="",l=e.replace("-"," ");l=l[0].toUpperCase()+l.slice(1),""!=jQuery("#niteoCS-"+e+"-id").val()&&c.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(e){switch(i=n[e].sizes&&n[e].sizes.large?n[e].sizes.large.url:n[e].url,s+=(0===e?"":",")+n[e].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==e?jQuery(".big-thumb").append('<img src="'+i+'" alt=""/>'):n.length>1&&0!==e?o.append('<img src="'+i+'" alt="" class="no-blur"/>'):o.find(".big-thumb").length?jQuery(".big-thumb").append('<img src="'+i+'" alt=""/>'):o.append('<img src="'+i+'" alt=""/>'),jQuery(".blur-range").trigger("input")}}),c.css("display","block")),jQuery("#niteoCS-"+e+"-id").val(s).trigger("change")}).open()}),c.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)})}!function(e){e.fn.toggleDisabled=function(){return this.each(function(){var n,a=e(this),t=a.data("name");a.attr("disabled")?(a.prop("disabled",!1),n="1"):(a.prop("disabled",!0),n="0"),r(t,"active",n)})}}(jQuery),jQuery('.cmp-coming-soon-maintenance .social-inputs input[type="text"]').focusout(function(){var e=jQuery(this).data("name"),n=jQuery(this).attr("value");r(e,"url",n)}),jQuery('.cmp-coming-soon-maintenance .social-inputs input[type="checkbox"]').click(function(n){e(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(n){n.preventDefault();var a=e(this),t=a.parents(".notice"),i=a.data("security"),o=a.data("slug"),r=a.data("name"),c={action:"cmp_theme_update_install",security:i,file:{name:o,tmp_name:"",url:jQuery(this).data("remote_url")+"?action=download&slug="+o}};t.find(".message").html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span class="sr-only">Updating heme...</span><span> working hard on updating Theme...</span>'),e.post(ajaxurl,c,function(n){if("success"==(n=n.trim()))setTimeout(function(){t.removeClass("notice-warning").addClass("notice-success"),t.find(".message").html("<span> "+r+' CMP theme was updated sucessfully! You can enjoy latest features now :) </span><i class="fa fa-smile-o" aria-hidden="true"></i>')},1500);else{n=n.slice(0,-1);var a=e("p",e(n)).text();t.removeClass("notice-warning").addClass("notice-error"),t.find(".message").html('<i class="fa fa-frown-o" aria-hidden="true"></i><span> '+a+"</span>")}})}),jQuery(".cmp-coming-soon-maintenance .theme-select").click(function(){jQuery(this).parent().find('input[name="niteoCS_select_theme"]').prop("checked",!0).trigger("change"),jQuery(".cmp-coming-soon-maintenance .theme-select").removeClass("selected"),jQuery(this).parent().find(".theme-select").addClass("selected")}),jQuery(".cmp-coming-soon-maintenance .theme-update.button").one("click",function(n){n.preventDefault();var a=e(this),t=a.closest(".theme-wrapper"),i=t.data("security"),o=t.data("slug"),r={action:"cmp_theme_update_install",security:i,file:{name:o,tmp_name:"",url:t.data("remote_url")+"?action=download&slug="+o}};a.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>'),e.post(ajaxurl,r,function(e){"success"==e?setTimeout(function(){a.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>'),setTimeout(function(){a.fadeOut()},1500)},1500):(e=e.slice(0,-1),a.html('<i class="fa fa-frown-o" aria-hidden="true"></i><span>Update Failed!</span>'))})}),jQuery(".cmp-coming-soon-maintenance .theme-details").click(function(){var n=e(this),a=n.closest(".theme-wrapper"),t=a.data("slug"),i=a.data("version"),o=a.data("remote_url"),r=a.data("type"),c=a.data("purchased"),s=(a.data("freebie"),jQuery(".update-theme").data("security")),l=(a.data("price"),0),u={action:"niteo_themeinfo",security:jQuery(".theme-wrapper").data("security"),theme_slug:jQuery(this).parents(".theme-wrapper").data("slug")};e.post(ajaxurl,u,function(u){var m="",p="",d="",g="";if("true"==(u=jQuery.parseJSON(u)).result){if(jQuery("body").addClass("modal-open"),"1"==c&&(d='<span class="theme-version">Version: '+i+"</span>",g='<div class="notice notice-success notice-alt notice-large"><p>Theme is up to date.</p></div>',jQuery(".update-theme").length)){var y=jQuery(".update-theme").data("slug");if(t==y){var h=jQuery(".update-theme").data("new_ver");g='<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 '+u.name+' theme available. <a href="'+o+"readme/"+t+'-readme.php" class="view-release">View update '+h+' notes</a> or <a href="'+window.location.href+"&action=update-cmp-theme&theme="+t+'" class="update-theme" data-security="'+s+'" data-slug="'+t+'" data-remote_url="'+o+'">Update now.</a></strong></p><div class="release-note"></div></div>'}}if("1"!=c&&"premium"==r)m="disabled ",p='<button type="button" class="theme-purchase button hide"><a href="'+a.find("a").attr("href")+'" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>Get Theme</a></button>';var v=u.screenshots,j="";Object.keys(v).length>1&&(j='<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>');var f=e(['<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(\''+v[0]+"')\">"+j+"</div>","\t\t\t</div>",'\t\t\t<div class="theme-info">','\t\t\t\t<h2 class="theme-name">'+u.name+d+"</h2>",'\t\t\t\t<p class="theme-author">By <a href="'+u.author_homepage+'" target="_blank">'+u.author+"</a></p>",g,p,'\t\t\t\t<div class="theme-description">'+u.description+"</div>","\t\t\t</div>","\t\t</div>",'\t\t<div class="theme-actions">','\t\t\t<button type="submit" '+m+'class="button activate" name="Submit" aria-label="Select '+u.name+'">Activate</button>','\t\t\t<a href="https://niteothemes.com/cmp-coming-soon-maintenance/?theme='+t+'&utm_source=cmp&utm_medium=referral" class="button cmp-preview" target="_blank" aria-label="Preview '+u.name+'">Live Preview</a>',"\t\t</div>","\t</div>","</div>"].join("\n"));jQuery(".theme-overlay.cmp").append(f),jQuery(".theme-overlay.cmp .view-release").click(function(e){e.preventDefault();var a=(n=jQuery(this)).attr("href");jQuery.get(a,function(e){n.closest(".notice").find(".release-note .notes").remove(),n.closest(".notice").find(".release-note").append('<div class="notes">'+e+"</div>")}).fail(function(){n.closest(".notice").find(".release-note p").remove(),n.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('.cmp-coming-soon-maintenance input[name="niteoCS_select_theme"]').each(function(){jQuery(this).val()==t&&(jQuery(this).prop("checked",!0),jQuery(".theme-select").removeClass("selected"),jQuery(this).parent().addClass("selected"))}),jQuery(this).submit()}),jQuery(".screenshots-nav .right").click(function(){++l==Object.keys(v).length&&(l=0),l in v&&jQuery(".screenshot").css("background-image","url('"+v[l]+"')")}),jQuery(".screenshots-nav .left").click(function(){--l<0&&(l=Object.keys(v).length-1),l in v&&jQuery(".screenshot").css("background-image","url('"+v[l]+"')")})}})}),jQuery(".cmp-coming-soon-maintenance #connect-mailchimp").click(function(n){n.preventDefault();var a=jQuery('.cmp-coming-soon-maintenance input[name="niteoCS_mailchimp_apikey"]').val(),t=jQuery(this).data("security"),i=jQuery(this);if(""!=a){var o={apikey:a,security:t};jQuery(this).prop("disabled",!0),jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> retrieving lists..</span>');var r={action:"cmp_mailchimp_list_ajax",security:t,params:o};e.post(ajaxurl,r,function(n){var a=JSON.parse(n);200==a.response?(e("#niteoCS_mailchimp_list").empty().prop("disabled",!1),e.each(a.lists,function(n,a){e("#niteoCS_mailchimp_list").append('<option value="'+a.id+'">'+a.name+"</option>")})):e("#niteoCS_mailchimp_list").empty().prop("disabled",!0).html('<option value="error">'+a.message+"</option>").trigger("change"),i.html("Retrieve Lists"),i.prop("disabled",!1)}).fail(function(){i.html("Retrieve Lists"),i.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}),wp.codeEditor&&wp.codeEditor.initialize("niteoCS_custom_css"),e(".nav-tab-wrapper").on("click",".theme-preview",function(n){return!(e("#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?"))||(n.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: 3.5.
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
@@ -64,7 +64,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
|
|
64 |
|
65 |
private function constants() {
|
66 |
// define constants
|
67 |
-
$this->define( 'CMP_VERSION', '3.5.
|
68 |
$this->define( 'CMP_DEBUG', FALSE );
|
69 |
$this->define( 'CMP_AUTHOR', 'NiteoThemes' );
|
70 |
$this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
|
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: 3.5.3
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
64 |
|
65 |
private function constants() {
|
66 |
// define constants
|
67 |
+
$this->define( 'CMP_VERSION', '3.5.3' );
|
68 |
$this->define( 'CMP_DEBUG', FALSE );
|
69 |
$this->define( 'CMP_AUTHOR', 'NiteoThemes' );
|
70 |
$this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: coming soon, landing page, launch page, maintenance mode, under constructi
|
|
5 |
Requires at least: 3.0
|
6 |
Requires PHP: 5.3
|
7 |
Tested up to: 5.2
|
8 |
-
Stable tag: 3.5.
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -135,6 +135,11 @@ https://www.youtube.com/watch?v=uxuJfHzwdtE
|
|
135 |
<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>
|
136 |
|
137 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
138 |
<h4>CMP 3.5.2 - 05-Jun-19</h4>
|
139 |
<ul>
|
140 |
<li>Minor internal changes..</li>
|
5 |
Requires at least: 3.0
|
6 |
Requires PHP: 5.3
|
7 |
Tested up to: 5.2
|
8 |
+
Stable tag: 3.5.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
135 |
<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>
|
136 |
|
137 |
== Changelog ==
|
138 |
+
<h4>CMP 3.5.3 - 09-Jun-19</h4>
|
139 |
+
<ul>
|
140 |
+
<li>Fixed broken templates preview links</li>
|
141 |
+
</ul>
|
142 |
+
|
143 |
<h4>CMP 3.5.2 - 05-Jun-19</h4>
|
144 |
<ul>
|
145 |
<li>Minor internal changes..</li>
|