CMP – Coming Soon & Maintenance Plugin by NiteoThemes - Version 1.5.1

Version Description

Download this release

Release Info

Developer niteo
Plugin Icon 128x128 CMP – Coming Soon & Maintenance Plugin by NiteoThemes
Version 1.5.1
Comparing to
See all releases

Code changes from version 1.5.0 to 1.5.1

cmp-options.php CHANGED
@@ -786,8 +786,8 @@ add_thickbox();
786
  </ul>
787
 
788
  <ul class="social-inputs">
789
- <?php
790
- $i = 0;
791
  foreach ( $socialmedia as $social ) {
792
 
793
  ($social['hidden'] == '0') ? $active = 'active ' : $active = '';
@@ -795,11 +795,6 @@ add_thickbox();
795
  ($social['active'] == '0') ? $disabled = 'disabled ' : $disabled = '';
796
  ?>
797
  <li class="<?php echo esc_attr($active).esc_attr($social['name']);?>">
798
- <?php
799
- if ($i == 0) {
800
- echo '<span class="label">'.__('Position', 'cmp').'</span><span class="label">'.__('Active', 'cmp').'</span><span class="label">'.__('Website URL', 'cmp').'</span>';
801
- }
802
- ?>
803
  <p> <i class="fa fa-sort" aria-hidden="true"></i>
804
  <label for="niteoCS_<?php echo esc_attr($social['name']);?>" class="<?php echo esc_attr($social['name']);?>"><?php echo ($social['name'] == 'envelope-o') ? 'Email address' : esc_html( ucfirst( esc_attr($social['name'] ) )). ' '. __('profile', 'cmp');?></label>
805
 
@@ -809,7 +804,6 @@ add_thickbox();
809
  </p>
810
  </li>
811
  <?php
812
- $i++;
813
  } ?>
814
 
815
  </ul>
786
  </ul>
787
 
788
  <ul class="social-inputs">
789
+ <span class="label"><?php _e('Position', 'cmp');?></span><span class="label"><?php _e('Active', 'cmp');?></span><span class="label"><?php _e('Website URL', 'cmp');?></span>
790
+ <?php
791
  foreach ( $socialmedia as $social ) {
792
 
793
  ($social['hidden'] == '0') ? $active = 'active ' : $active = '';
795
  ($social['active'] == '0') ? $disabled = 'disabled ' : $disabled = '';
796
  ?>
797
  <li class="<?php echo esc_attr($active).esc_attr($social['name']);?>">
 
 
 
 
 
798
  <p> <i class="fa fa-sort" aria-hidden="true"></i>
799
  <label for="niteoCS_<?php echo esc_attr($social['name']);?>" class="<?php echo esc_attr($social['name']);?>"><?php echo ($social['name'] == 'envelope-o') ? 'Email address' : esc_html( ucfirst( esc_attr($social['name'] ) )). ' '. __('profile', 'cmp');?></label>
800
 
804
  </p>
805
  </li>
806
  <?php
 
807
  } ?>
808
 
809
  </ul>
comingsoon.js CHANGED
@@ -491,7 +491,17 @@ jQuery(document).ready(function($){
491
  } else {
492
  update_social(name, 'hidden', '1');
493
  }
 
 
 
 
 
 
494
  });
 
 
 
 
495
 
496
  // ----------------------- Theme release notes -----------------------
497
 
491
  } else {
492
  update_social(name, 'hidden', '1');
493
  }
494
+ // hide/show input labels
495
+ if (jQuery('.social-media i.active').length) {
496
+ jQuery('.social-inputs .label').css('display', 'block');
497
+ } else {
498
+ jQuery('.social-inputs .label').css('display', 'none');
499
+ }
500
  });
501
+ // hide/show input labels
502
+ if (jQuery('.social-media i.active').length) {
503
+ jQuery('.social-inputs .label').css('display', 'block');
504
+ }
505
 
506
  // ----------------------- Theme release notes -----------------------
507
 
comingsoon.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(a){function e(a){return(a+"").replace(/^([a-z])|\s+([a-z])/g,function(a){return a.toUpperCase()})}function f(a){return(a+"").toLowerCase()}navtab=function(a){jQuery(".nav-tab-wrapper .nav-tab").removeClass("nav-tab-active"),jQuery(".nav-tab-wrapper ."+a).addClass("nav-tab-active"),!jQuery(".table-wrapper.content.slider").length||0!=jQuery('#csoptions input[name="niteoCS_banner"]:checked').val()&&1!=jQuery('#csoptions input[name="niteoCS_banner"]:checked').val()?(jQuery(".table-wrapper."+a+":not(.slider)").css("display","block"),jQuery(".comingsoon."+a+":not(.slider)").css("display","block")):(jQuery(".table-wrapper."+a).css("display","block"),jQuery(".comingsoon."+a).css("display","block")),jQuery(".table-wrapper:not(."+a+")").css("display","none"),jQuery(".comingsoon:not(."+a+")").css("display","none"),"install"==a?jQuery(".submit").css("display","none"):jQuery(".submit").css("display","block")};var b=document.location.hash.substring(1);""!=b&&navtab(b),window.onhashchange=function(){b=document.location.hash.substring(1),navtab(b)},a(".nav-tab:not(.theme-preview)").click(function(c){c.preventDefault(),b=a(this).data("tab"),document.location.hash=b});var c=jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val();jQuery("#unsplash-feed-"+c).css("display","block"),jQuery('#unsplash_banner select[name="unsplash_feed"]').on("change",function(){c=jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val(),jQuery(".unsplash-feed").css("display","none"),jQuery("#unsplash-feed-"+c).css("display","block")});var d=jQuery(".logo-wrapper");""!=jQuery("#niteoCS-logo-id").val()&&(jQuery("#add-logo").val("Change Logo"),jQuery("#delete-logo").css("display","block")),jQuery("#add-logo").click(function(a){if(a.preventDefault(),b)return void b.open();var b=wp.media({title:"Select Logo",button:{text:"Insert Logo"},multiple:!1,type:"image"}).on("select",function(){var a=b.state().get("selection").first().toJSON();jQuery(".logo-wrapper").empty(),d.append('<img src="'+a.url+'" alt="" style="max-width:588px"/>'),jQuery("#add-logo").val("Change Logo"),jQuery("#delete-logo").css("display","block"),jQuery("#niteoCS-logo-id").val(a.id)}).open()}),jQuery("#delete-logo").click(function(a){jQuery(".logo-wrapper").empty(),jQuery("#add-logo").val("Select Logo"),jQuery(this).css("display","none"),jQuery("#niteoCS-logo-id").val("")}),""!=jQuery("#niteoCS-banner-id").val()&&jQuery("#delete-banner").css("display","block"),jQuery("#add-banner").click(function(a){var b=jQuery(".banner-wrapper:not(.default)");if(a.preventDefault(),c)return void c.open();var c=wp.media({title:"Select Photos",button:{text:"Insert Photos"},multiple:!0,type:"image"}).on("select",function(){var a=c.state().get("selection").toJSON(),d="";a.length>0&&(b.empty(),jQuery(a).each(function(c){b.append('<img src="'+a[c].sizes.large.url+'" alt="" style="max-width:588px;"/>'),jQuery("#delete-banner").css("display","block"),d+=(0===c?"":",")+a[c].id}),jQuery("#niteoCS-banner-id").val(d))}).open()}),jQuery("#delete-banner").click(function(a){jQuery(".banner-wrapper:not(.default)").empty(),jQuery(this).css("display","none"),jQuery("#niteoCS-banner-id").val("")}),jQuery('#csoptions input[name="niteoCS_banner"]').change(function(){switch(jQuery('#csoptions input[name="niteoCS_banner"]:checked').val()){case"0":jQuery("#custom_banner").css("display","block"),jQuery(".theme_background fieldset:not(#custom_banner)").css("display","none");break;case"1":jQuery("#unsplash_banner").css("display","block"),jQuery(".theme_background fieldset:not(#unsplash_banner)").css("display","none");break;case"2":jQuery("#default_banner").css("display","block"),jQuery(".theme_background fieldset:not(#default_banner)").css("display","none");break;case"3":jQuery("#graphic_pattern").css("display","block"),jQuery(".theme_background fieldset:not(#graphic_pattern)").css("display","none");break;case"4":jQuery("#solid_color").css("display","block"),jQuery(".theme_background fieldset:not(#solid_color)").css("display","none");break;default:jQuery("#custom_banner").css("display","block"),jQuery(".theme_background fieldset:not(#custom_banner)").css("display","none")}}),jQuery('#csoptions input[name="niteoCS_banner"]').trigger("change"),jQuery("#niteoCS_banner_color").wpColorPicker({change:function(a,b){jQuery(".color-preview").css("background-color",b.color.toString())}}),jQuery('select[name="niteoCS_banner_pattern"]').on("change",function(){var a=jQuery('select[name="niteoCS_banner_pattern"] option:selected').val();if("custom"!=a){var b=jQuery(this).data("url");jQuery("#add-pattern").css("display","none"),jQuery(".pattern-preview").css("background-image","url('"+b+a+".png')")}else{var b=jQuery("#niteoCS_banner_pattern_custom").val();jQuery("#add-pattern").css("display","block"),jQuery(".pattern-preview").css("background-image","url('"+b+"')")}}),jQuery("#add-pattern").click(function(a){if(a.preventDefault(),b)return void b.open();var b=wp.media({title:"Select Pattern",button:{text:"Select Pattern"},multiple:!1,type:"image"}).on("select",function(){var a=b.state().get("selection").first().toJSON();if(jQuery(".pattern-preview").css("background-image",""),void 0===a.sizes.large)var c=a.url;else var c=a.sizes.large.url;jQuery(".pattern-preview").css("background-image","url('"+c+"')"),jQuery("#niteoCS_banner_pattern_custom").val(a.url)}).open()}),1==jQuery("#niteoCS_subscribe").prop("checked")&&jQuery(".subscribe").css("display","block"),jQuery("#niteoCS_subscribe").change(function(){jQuery(this)[0].checked?jQuery(".subscribe").css("display","block"):jQuery(".subscribe").css("display","none")}),jQuery('#csoptions input[name="niteoCS_subscribe_type"]').change(function(){0==jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()?(jQuery("#subscribe-disabled").css("display","block"),jQuery("#subscribe-3rdparty").css("display","none"),jQuery("#subscribe-niteo").css("display","none")):1==jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()?(jQuery("#subscribe-disabled").css("display","none"),jQuery("#subscribe-3rdparty").css("display","block"),jQuery("#subscribe-niteo").css("display","none")):(jQuery("#subscribe-disabled").css("display","none"),jQuery("#subscribe-3rdparty").css("display","none"),jQuery("#subscribe-niteo").css("display","block"))}),jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger("change"),jQuery("#csv-generate").click(function(b){b.preventDefault(),jQuery("#csv-download").length&&jQuery("#csv-download").remove(),jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"niteo_export_csv"},success:function(b){b=b.slice(0,-1);var c=a("<a />",{id:"csv-download",href:"data:text/plain;charset=UTF-8,"+encodeURIComponent(b),text:"Download CSV",download:"subscriber_list.csv"});jQuery("#subscribe-niteo").append(c)}})});var g="",h="";g="custom"==jQuery('select[name="niteoCS_font_headings"] option:selected').val()?e(f(jQuery("#niteoCS_font_headings_custom").val())):jQuery('select[name="niteoCS_font_headings"] option:selected').val(),h="custom"==jQuery('select[name="niteoCS_font_content"] option:selected').val()?e(f(jQuery("#niteoCS_font_content_custom").val())):jQuery('select[name="niteoCS_font_content"] option:selected').val(),WebFont.load({google:{families:[e(f(g)),e(f(h))]},active:function(){a("#heading-example").css("font-family",g),a("#content-example").css("font-family",h)}}),jQuery('select[name="niteoCS_font_headings"]').on("change",function(){niteoCS_font_headings=jQuery('select[name="niteoCS_font_headings"] option:selected').val(),"custom"==niteoCS_font_headings?(jQuery("#custom_headings_font").css("display","block"),jQuery("#custom_headings_font").data("timeout",null).keyup(function(){clearTimeout(jQuery(this).data("timeout")),jQuery(this).data("timeout",setTimeout(function(){WebFont.load({google:{families:[e(f(jQuery("#niteoCS_font_headings_custom").val()))]},active:function(){a("#heading-example").css("font-family",jQuery("#niteoCS_font_headings_custom").val())}})},1e3))})):(jQuery("#custom_headings_font").css("display","none"),WebFont.load({google:{families:[niteoCS_font_headings]},active:function(){a("#heading-example").css("font-family",niteoCS_font_headings||"")}}))}),jQuery('select[name="niteoCS_font_content"]').on("change",function(){niteoCS_font_content=jQuery('select[name="niteoCS_font_content"] option:selected').val(),"custom"==niteoCS_font_content?(jQuery("#custom_content_font").css("display","block"),jQuery("#custom_content_font").data("timeout",null).keyup(function(){clearTimeout(jQuery(this).data("timeout")),jQuery(this).data("timeout",setTimeout(function(){WebFont.load({google:{families:[e(f(jQuery("#niteoCS_font_content_custom").val()))]},active:function(){a("#content-example").css("font-family",jQuery("#niteoCS_font_content_custom").val())}})},1e3))})):(jQuery("#custom_content_font").css("display","none"),WebFont.load({google:{families:[niteoCS_font_content]},active:function(){a("#content-example").css("font-family",niteoCS_font_content||"")}}))});var i=function(b,c,d){var e=a("#niteoCS_socialmedia").attr("value");e=a.parseJSON(e),a.each(e,function(a,e){e.name==b&&(e[c]=d)}),a("#niteoCS_socialmedia").attr("value",JSON.stringify(e))},j=a(".social-inputs"),k=function(b,c){var d=j.find('input[type="text"]');c.item.index();d.each(function(b,c){var d=a(c).data("name");i(d,"order",b)})};j.sortable({stop:k}),j.on("sortchange",k),function(a){a.fn.toggleDisabled=function(){return this.each(function(){var c,b=a(this),d=b.data("name");b.attr("disabled")?(b.prop("disabled",!1),c="1"):(b.prop("disabled",!0),c="0"),i(d,"active",c)})}}(jQuery),jQuery('.social-inputs input[type="text"]').focusout(function(){var a=jQuery(this).data("name"),b=jQuery(this).attr("value");i(a,"url",b)}),jQuery('.social-inputs input[type="checkbox"]').click(function(b){a(this).siblings('input[type="text"]').toggleDisabled()}),jQuery(".social-media i").click(function(){var a=jQuery(this).data("name");jQuery(this).toggleClass("active"),jQuery(".social-inputs li."+a).toggleClass("active"),jQuery(this).hasClass("active")?i(a,"hidden","0"):i(a,"hidden","1")}),jQuery(".view-release").click(function(a){a.preventDefault(),$this=jQuery(this);var b=$this.attr("href");jQuery.get(b,function(a){$this.closest(".notice").find(".release-note .notes").remove(),$this.closest(".notice").find(".release-note").append('<div class="notes">'+a+"</div>")}).fail(function(){$this.closest(".notice").find(".release-note p").remove(),$this.closest(".notice").find(".release-note").append("<p>There was an error loading release notes. Please try again later.</p>")})})});
1
+ jQuery(document).ready(function(a){function e(a){return(a+"").replace(/^([a-z])|\s+([a-z])/g,function(a){return a.toUpperCase()})}function f(a){return(a+"").toLowerCase()}navtab=function(a){jQuery(".nav-tab-wrapper .nav-tab").removeClass("nav-tab-active"),jQuery(".nav-tab-wrapper ."+a).addClass("nav-tab-active"),!jQuery(".table-wrapper.content.slider").length||0!=jQuery('#csoptions input[name="niteoCS_banner"]:checked').val()&&1!=jQuery('#csoptions input[name="niteoCS_banner"]:checked').val()?(jQuery(".table-wrapper."+a+":not(.slider)").css("display","block"),jQuery(".comingsoon."+a+":not(.slider)").css("display","block")):(jQuery(".table-wrapper."+a).css("display","block"),jQuery(".comingsoon."+a).css("display","block")),jQuery(".table-wrapper:not(."+a+")").css("display","none"),jQuery(".comingsoon:not(."+a+")").css("display","none"),"install"==a?jQuery(".submit").css("display","none"):jQuery(".submit").css("display","block")};var b=document.location.hash.substring(1);""!=b&&navtab(b),window.onhashchange=function(){b=document.location.hash.substring(1),navtab(b)},a(".nav-tab:not(.theme-preview)").click(function(c){c.preventDefault(),b=a(this).data("tab"),document.location.hash=b});var c=jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val();jQuery("#unsplash-feed-"+c).css("display","block"),jQuery('#unsplash_banner select[name="unsplash_feed"]').on("change",function(){c=jQuery('#unsplash_banner select[name="unsplash_feed"] option:selected').val(),jQuery(".unsplash-feed").css("display","none"),jQuery("#unsplash-feed-"+c).css("display","block")});var d=jQuery(".logo-wrapper");""!=jQuery("#niteoCS-logo-id").val()&&(jQuery("#add-logo").val("Change Logo"),jQuery("#delete-logo").css("display","block")),jQuery("#add-logo").click(function(a){if(a.preventDefault(),b)return void b.open();var b=wp.media({title:"Select Logo",button:{text:"Insert Logo"},multiple:!1,type:"image"}).on("select",function(){var a=b.state().get("selection").first().toJSON();jQuery(".logo-wrapper").empty(),d.append('<img src="'+a.url+'" alt="" style="max-width:588px"/>'),jQuery("#add-logo").val("Change Logo"),jQuery("#delete-logo").css("display","block"),jQuery("#niteoCS-logo-id").val(a.id)}).open()}),jQuery("#delete-logo").click(function(a){jQuery(".logo-wrapper").empty(),jQuery("#add-logo").val("Select Logo"),jQuery(this).css("display","none"),jQuery("#niteoCS-logo-id").val("")}),""!=jQuery("#niteoCS-banner-id").val()&&jQuery("#delete-banner").css("display","block"),jQuery("#add-banner").click(function(a){var b=jQuery(".banner-wrapper:not(.default)");if(a.preventDefault(),c)return void c.open();var c=wp.media({title:"Select Photos",button:{text:"Insert Photos"},multiple:!0,type:"image"}).on("select",function(){var a=c.state().get("selection").toJSON(),d="";a.length>0&&(b.empty(),jQuery(a).each(function(c){b.append('<img src="'+a[c].sizes.large.url+'" alt="" style="max-width:588px;"/>'),jQuery("#delete-banner").css("display","block"),d+=(0===c?"":",")+a[c].id}),jQuery("#niteoCS-banner-id").val(d))}).open()}),jQuery("#delete-banner").click(function(a){jQuery(".banner-wrapper:not(.default)").empty(),jQuery(this).css("display","none"),jQuery("#niteoCS-banner-id").val("")}),jQuery('#csoptions input[name="niteoCS_banner"]').change(function(){switch(jQuery('#csoptions input[name="niteoCS_banner"]:checked').val()){case"0":jQuery("#custom_banner").css("display","block"),jQuery(".theme_background fieldset:not(#custom_banner)").css("display","none");break;case"1":jQuery("#unsplash_banner").css("display","block"),jQuery(".theme_background fieldset:not(#unsplash_banner)").css("display","none");break;case"2":jQuery("#default_banner").css("display","block"),jQuery(".theme_background fieldset:not(#default_banner)").css("display","none");break;case"3":jQuery("#graphic_pattern").css("display","block"),jQuery(".theme_background fieldset:not(#graphic_pattern)").css("display","none");break;case"4":jQuery("#solid_color").css("display","block"),jQuery(".theme_background fieldset:not(#solid_color)").css("display","none");break;default:jQuery("#custom_banner").css("display","block"),jQuery(".theme_background fieldset:not(#custom_banner)").css("display","none")}}),jQuery('#csoptions input[name="niteoCS_banner"]').trigger("change"),jQuery("#niteoCS_banner_color").wpColorPicker({change:function(a,b){jQuery(".color-preview").css("background-color",b.color.toString())}}),jQuery('select[name="niteoCS_banner_pattern"]').on("change",function(){var a=jQuery('select[name="niteoCS_banner_pattern"] option:selected').val();if("custom"!=a){var b=jQuery(this).data("url");jQuery("#add-pattern").css("display","none"),jQuery(".pattern-preview").css("background-image","url('"+b+a+".png')")}else{var b=jQuery("#niteoCS_banner_pattern_custom").val();jQuery("#add-pattern").css("display","block"),jQuery(".pattern-preview").css("background-image","url('"+b+"')")}}),jQuery("#add-pattern").click(function(a){if(a.preventDefault(),b)return void b.open();var b=wp.media({title:"Select Pattern",button:{text:"Select Pattern"},multiple:!1,type:"image"}).on("select",function(){var a=b.state().get("selection").first().toJSON();if(jQuery(".pattern-preview").css("background-image",""),void 0===a.sizes.large)var c=a.url;else var c=a.sizes.large.url;jQuery(".pattern-preview").css("background-image","url('"+c+"')"),jQuery("#niteoCS_banner_pattern_custom").val(a.url)}).open()}),1==jQuery("#niteoCS_subscribe").prop("checked")&&jQuery(".subscribe").css("display","block"),jQuery("#niteoCS_subscribe").change(function(){jQuery(this)[0].checked?jQuery(".subscribe").css("display","block"):jQuery(".subscribe").css("display","none")}),jQuery('#csoptions input[name="niteoCS_subscribe_type"]').change(function(){0==jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()?(jQuery("#subscribe-disabled").css("display","block"),jQuery("#subscribe-3rdparty").css("display","none"),jQuery("#subscribe-niteo").css("display","none")):1==jQuery('#csoptions input[name="niteoCS_subscribe_type"]:checked').val()?(jQuery("#subscribe-disabled").css("display","none"),jQuery("#subscribe-3rdparty").css("display","block"),jQuery("#subscribe-niteo").css("display","none")):(jQuery("#subscribe-disabled").css("display","none"),jQuery("#subscribe-3rdparty").css("display","none"),jQuery("#subscribe-niteo").css("display","block"))}),jQuery('#csoptions input[name="niteoCS_subscribe_type"]').trigger("change"),jQuery("#csv-generate").click(function(b){b.preventDefault(),jQuery("#csv-download").length&&jQuery("#csv-download").remove(),jQuery.ajax({type:"POST",url:ajaxurl,data:{action:"niteo_export_csv"},success:function(b){b=b.slice(0,-1);var c=a("<a />",{id:"csv-download",href:"data:text/plain;charset=UTF-8,"+encodeURIComponent(b),text:"Download CSV",download:"subscriber_list.csv"});jQuery("#subscribe-niteo").append(c)}})});var g="",h="";g="custom"==jQuery('select[name="niteoCS_font_headings"] option:selected').val()?e(f(jQuery("#niteoCS_font_headings_custom").val())):jQuery('select[name="niteoCS_font_headings"] option:selected').val(),h="custom"==jQuery('select[name="niteoCS_font_content"] option:selected').val()?e(f(jQuery("#niteoCS_font_content_custom").val())):jQuery('select[name="niteoCS_font_content"] option:selected').val(),WebFont.load({google:{families:[e(f(g)),e(f(h))]},active:function(){a("#heading-example").css("font-family",g),a("#content-example").css("font-family",h)}}),jQuery('select[name="niteoCS_font_headings"]').on("change",function(){niteoCS_font_headings=jQuery('select[name="niteoCS_font_headings"] option:selected').val(),"custom"==niteoCS_font_headings?(jQuery("#custom_headings_font").css("display","block"),jQuery("#custom_headings_font").data("timeout",null).keyup(function(){clearTimeout(jQuery(this).data("timeout")),jQuery(this).data("timeout",setTimeout(function(){WebFont.load({google:{families:[e(f(jQuery("#niteoCS_font_headings_custom").val()))]},active:function(){a("#heading-example").css("font-family",jQuery("#niteoCS_font_headings_custom").val())}})},1e3))})):(jQuery("#custom_headings_font").css("display","none"),WebFont.load({google:{families:[niteoCS_font_headings]},active:function(){a("#heading-example").css("font-family",niteoCS_font_headings||"")}}))}),jQuery('select[name="niteoCS_font_content"]').on("change",function(){niteoCS_font_content=jQuery('select[name="niteoCS_font_content"] option:selected').val(),"custom"==niteoCS_font_content?(jQuery("#custom_content_font").css("display","block"),jQuery("#custom_content_font").data("timeout",null).keyup(function(){clearTimeout(jQuery(this).data("timeout")),jQuery(this).data("timeout",setTimeout(function(){WebFont.load({google:{families:[e(f(jQuery("#niteoCS_font_content_custom").val()))]},active:function(){a("#content-example").css("font-family",jQuery("#niteoCS_font_content_custom").val())}})},1e3))})):(jQuery("#custom_content_font").css("display","none"),WebFont.load({google:{families:[niteoCS_font_content]},active:function(){a("#content-example").css("font-family",niteoCS_font_content||"")}}))});var i=function(b,c,d){var e=a("#niteoCS_socialmedia").attr("value");e=a.parseJSON(e),a.each(e,function(a,e){e.name==b&&(e[c]=d)}),a("#niteoCS_socialmedia").attr("value",JSON.stringify(e))},j=a(".social-inputs"),k=function(b,c){var d=j.find('input[type="text"]');c.item.index();d.each(function(b,c){var d=a(c).data("name");i(d,"order",b)})};j.sortable({stop:k}),j.on("sortchange",k),function(a){a.fn.toggleDisabled=function(){return this.each(function(){var c,b=a(this),d=b.data("name");b.attr("disabled")?(b.prop("disabled",!1),c="1"):(b.prop("disabled",!0),c="0"),i(d,"active",c)})}}(jQuery),jQuery('.social-inputs input[type="text"]').focusout(function(){var a=jQuery(this).data("name"),b=jQuery(this).attr("value");i(a,"url",b)}),jQuery('.social-inputs input[type="checkbox"]').click(function(b){a(this).siblings('input[type="text"]').toggleDisabled()}),jQuery(".social-media i").click(function(){var a=jQuery(this).data("name");jQuery(this).toggleClass("active"),jQuery(".social-inputs li."+a).toggleClass("active"),jQuery(this).hasClass("active")?i(a,"hidden","0"):i(a,"hidden","1"),jQuery(".social-media i.active").length?jQuery(".social-inputs .label").css("display","block"):jQuery(".social-inputs .label").css("display","none")}),jQuery(".social-media i.active").length&&jQuery(".social-inputs .label").css("display","block"),jQuery(".view-release").click(function(a){a.preventDefault(),$this=jQuery(this);var b=$this.attr("href");jQuery.get(b,function(a){$this.closest(".notice").find(".release-note .notes").remove(),$this.closest(".notice").find(".release-note").append('<div class="notes">'+a+"</div>")}).fail(function(){$this.closest(".notice").find(".release-note p").remove(),$this.closest(".notice").find(".release-note").append("<p>There was an error loading release notes. Please try again later.</p>")})})});
cs_style.css CHANGED
@@ -49,44 +49,45 @@ input[type="text"], textarea{width:100%;}
49
  width: 180px;
50
  text-align: left;
51
  }
52
- #delete-logo,#delete-banner{display:none;}
53
-
54
- .social-media {margin-top: 0;margin-bottom: 3em;}
55
- .social-inputs li {position: relative;}
56
- .social-inputs .label {
57
- font-weight: 600;
58
- position: absolute;
59
- top: -20px;
60
- left: -15px;
61
- }
62
-
63
- .social-inputs .label:nth-of-type(2) {
64
- left: 62px;
65
- }
66
- .social-inputs .label:nth-of-type(3) {
67
- left: 148px;
68
- }
69
-
70
- .social-media li {display: inline-block;}
71
- .social-media i {font-size:1.5em;padding:7px;cursor:pointer;}
72
- .social-media i.active {color:#d54e21;}
73
-
74
- .social-inputs li {display: none;width:100%;}
75
- .social-inputs li.active {display: inline-block;}
76
- .social-inputs p {position: relative;padding-left: 50px;height: 50px;}
77
- .social-inputs p i {position: absolute;left: 0;top: 20px;font-size: 30px;width: 30px;cursor: move;}
78
- .social-inputs label,
79
- .social-inputs label {padding-left: 100px;}
80
- .social-inputs input[type="text"] {margin-left: 100px;width: calc(100% - 100px);}
81
- .social-inputs input[type="checkbox"] {position: absolute;width: 26px;height: 26px;top: 23px;left: 65px;}
 
82
  .social-inputs input[type=checkbox]:checked:before {margin: 3px 0 0 1px;}
83
 
84
 
85
 
86
- th label {font-weight: 600;}
87
- #unsplash_img{display: none;}
88
- #unsplash-media{padding-top: 1em;}
89
- .unsplash-feed{display: none;}
90
  .pattern-preview,
91
  .color-preview {
92
  background-repeat: repeat;
49
  width: 180px;
50
  text-align: left;
51
  }
52
+ #delete-logo,#delete-banner{display:none;}
53
+
54
+ .social-media {margin-top: 0;margin-bottom: 3em;}
55
+ .social-inputs {position: relative;}
56
+ .social-inputs .label {
57
+ display: none;
58
+ font-weight: 600;
59
+ position: absolute;
60
+ top: -20px;
61
+ left: -15px;
62
+ }
63
+
64
+ .social-inputs .label:nth-of-type(2) {
65
+ left: 62px;
66
+ }
67
+ .social-inputs .label:nth-of-type(3) {
68
+ left: 148px;
69
+ }
70
+
71
+ .social-media li {display: inline-block;}
72
+ .social-media i {font-size:1.5em;padding:7px;cursor:pointer;}
73
+ .social-media i.active {color:#d54e21;}
74
+
75
+ .social-inputs li {display: none;width:100%;}
76
+ .social-inputs li.active {display: inline-block;}
77
+ .social-inputs p {position: relative;padding-left: 50px;height: 50px;}
78
+ .social-inputs p i {position: absolute;left: 0;top: 20px;font-size: 30px;width: 30px;cursor: move;}
79
+ .social-inputs label,
80
+ .social-inputs label {padding-left: 100px;}
81
+ .social-inputs input[type="text"] {margin-left: 100px;width: calc(100% - 100px);}
82
+ .social-inputs input[type="checkbox"] {position: absolute;width: 26px;height: 26px;top: 23px;left: 65px;}
83
  .social-inputs input[type=checkbox]:checked:before {margin: 3px 0 0 1px;}
84
 
85
 
86
 
87
+ th label {font-weight: 600;}
88
+ #unsplash_img{display: none;}
89
+ #unsplash-media{padding-top: 1em;}
90
+ .unsplash-feed{display: none;}
91
  .pattern-preview,
92
  .color-preview {
93
  background-repeat: repeat;
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: 1.5.0
7
  Author: NiteoThemes
8
  Author URI: http://www.niteo.cz
9
  Text Domain: cmp
@@ -21,7 +21,7 @@ class niteo_cmp {
21
  var $premium_installed = array();
22
 
23
  function __construct() {
24
- $this->version = '1.5.0';
25
 
26
  $this->installedFolder = basename(dirname(__FILE__));
27
 
@@ -334,52 +334,64 @@ class niteo_cmp {
334
  $headers = array('Version');
335
 
336
  foreach ( $this->theme_array as $theme_slug) {
337
- // if premium theme style.css exists get its version
338
- if ( in_array($theme_slug, $this->premium_installed) && file_exists(plugin_dir_path( __DIR__ ) . 'cmp-premium-themes/'.$theme_slug.'/style.css')) {
339
- $version = get_file_data( plugin_dir_path( __DIR__ ) . 'cmp-premium-themes/'.$theme_slug.'/style.css', $headers, '');
340
- $type = 'premium';
341
- }
342
-
343
- // if standard theme style.css exists get its version
344
- if ( in_array($theme_slug, $this->themes_standard) && file_exists(plugin_dir_path( __FILE__ ) . 'themes/'.$theme_slug.'/style.css')) {
345
- $version = get_file_data( plugin_dir_path( __FILE__ ) . 'themes/'.$theme_slug.'/style.css', $headers, '');
346
- $type = 'standard';
347
- }
348
-
349
- // if we have local version of theme and not in updating theme
350
- if ( isset($version[0]) ) {
351
- $current_version = $version[0];
352
-
353
- // get remote version from remote server
354
- $request = wp_remote_post($this->remoteServer.'?action=get_metadata&slug='.$theme_slug, array('body' => array('action' => 'version')));
355
-
356
- // if no error, retrivee body
357
- if ( !is_wp_error($request) ) {
358
- // decode to json
359
- $remote_version = json_decode($request['body'], true);
360
-
361
- // get version key
362
- if ( isset($remote_version['version']) ) {
363
- $remote_version = $remote_version['version'];
364
 
365
- // if remove version is bigger than current, display info about new version
366
- if ((float)$remote_version > (float)$current_version) {
367
-
368
- // if admin screen is not in updating theme
369
- if (!isset($_GET['theme']) || (isset($_GET['theme']) && $_GET['theme'] != $theme_slug)) {
370
-
371
- echo '<div class="notice notice-warning is-dismissible"><p class="message">'.__('There is a new version of ', 'cmp').'<span class="theme-name">'.esc_attr(ucwords(str_replace('_', ' ', $theme_slug))).'</span> '.__('Theme available.', 'cmp').' <a href="'.esc_url($this->remoteServer).'readme/'.esc_attr($theme_slug).'-readme.html" class="view-release">'.__('View release update notes','cmp').'</a> or <a href="'.admin_url().'options-general.php?page=cmp-settings&action=update-cmp-theme&theme='.esc_attr($theme_slug).'&type='.esc_attr($type).'" class="update-theme" data-type="'.esc_attr($type).'" data-slug="'.esc_attr($theme_slug).'" data-remote_url="'.esc_url($this->remoteServer).'">'.__('Update now.','cmp').'</a></p><div class="release-note"></div></div>';
372
- }
373
- }
374
 
375
- } else {
376
- echo '<div class="notice notice-error is-dismissible"><p>'.__('There has been error from remote server: ','cmp').wp_remote_retrieve_response_code($request).' '.__('while checking for','cmp').' '.esc_attr(ucwords(str_replace('_', ' ', $theme_slug))).' '.__('Theme update. Please try again later or contact us at info@niteo.cz if this error message keeps appearing.','cmp').'</p></div>';
377
- }
 
 
378
 
379
- } else {
380
- echo '<div class="notice notice-error is-dismissible"><p>'.__('There has been error: Internal server error:','cmp').' '.$request->get_error_message().' '.__('while checking for Theme update. Please try again later or contact us at info@niteo.cz if this error message keeps appearing.','cmp').'</p></div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
381
 
382
- }
 
383
  }
384
  }
385
 
@@ -510,6 +522,8 @@ class niteo_cmp {
510
  $this->theme_array = array_merge( $this->theme_array, $this->premium_installed );
511
  // reply response
512
  echo $ajax ? 'success' : '<div class="notice notice-success is-dismissible"><p>'.ucwords(str_replace('_', ' ', $theme_name)).' '.__('theme was successfully updated to new version!', 'cmp').'</p></div>';
 
 
513
  // die
514
  if ($ajax === true) {
515
  wp_die();
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: 1.5.1
7
  Author: NiteoThemes
8
  Author URI: http://www.niteo.cz
9
  Text Domain: cmp
21
  var $premium_installed = array();
22
 
23
  function __construct() {
24
+ $this->version = '1.5.1';
25
 
26
  $this->installedFolder = basename(dirname(__FILE__));
27
 
334
  $headers = array('Version');
335
 
336
  foreach ( $this->theme_array as $theme_slug) {
337
+ // check if update check transient is set
338
+ if ( false === ( $updatecheck_transient = get_transient( $theme_slug.'_updatecheck' ) ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
 
340
+ // if premium theme style.css exists get its version
341
+ if ( in_array($theme_slug, $this->premium_installed) && file_exists(plugin_dir_path( __DIR__ ) . 'cmp-premium-themes/'.$theme_slug.'/style.css')) {
342
+ $version = get_file_data( plugin_dir_path( __DIR__ ) . 'cmp-premium-themes/'.$theme_slug.'/style.css', $headers, '');
343
+ $type = 'premium';
344
+ }
 
 
 
 
345
 
346
+ // if standard theme style.css exists get its version
347
+ if ( in_array($theme_slug, $this->themes_standard) && file_exists(plugin_dir_path( __FILE__ ) . 'themes/'.$theme_slug.'/style.css')) {
348
+ $version = get_file_data( plugin_dir_path( __FILE__ ) . 'themes/'.$theme_slug.'/style.css', $headers, '');
349
+ $type = 'standard';
350
+ }
351
 
352
+ // if we have local version of theme and not in updating theme
353
+ if ( isset($version[0]) ) {
354
+ $current_version = $version[0];
355
+
356
+ // get remote version from remote server
357
+ $request = wp_remote_post($this->remoteServer.'?action=get_metadata&slug='.$theme_slug, array('body' => array('action' => 'version')));
358
+
359
+ // if no error, retrivee body
360
+ if ( !is_wp_error($request) ) {
361
+ // decode to json
362
+ $remote_version = json_decode($request['body'], true);
363
+
364
+ // get remove version key
365
+ if ( isset($remote_version['version']) ) {
366
+ $remote_version = $remote_version['version'];
367
+
368
+ // if remote version is bigger than current, display info about new version
369
+ if ((float)$remote_version > (float)$current_version) {
370
+
371
+ // if admin screen is not in updating theme
372
+ if (!isset($_GET['theme']) || (isset($_GET['theme']) && $_GET['theme'] != $theme_slug)) {
373
+ $transient = '<div class="notice notice-warning is-dismissible"><p class="message">'.__('There is a new version of ', 'cmp').'<span class="theme-name">'.esc_attr(ucwords(str_replace('_', ' ', $theme_slug))).'</span> '.__('Theme available.', 'cmp').' <a href="'.esc_url($this->remoteServer).'readme/'.esc_attr($theme_slug).'-readme.html" class="view-release">'.__('View release update notes','cmp').'</a> or <a href="'.admin_url().'options-general.php?page=cmp-settings&action=update-cmp-theme&theme='.esc_attr($theme_slug).'&type='.esc_attr($type).'" class="update-theme" data-type="'.esc_attr($type).'" data-slug="'.esc_attr($theme_slug).'" data-remote_url="'.esc_url($this->remoteServer).'">'.__('Update now.','cmp').'</a></p><div class="release-note"></div></div>';
374
+ // set transient with 24 hour expire
375
+ set_transient( $theme_slug.'_updatecheck', $transient, 60*60*24 );
376
+ echo $transient;
377
+ }
378
+ } else {
379
+ // set transient no update available with 12 hours expire
380
+ set_transient( $theme_slug.'_updatecheck', '', 60*60*12 );
381
+ }
382
+
383
+ } else {
384
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('There has been error from remote server: ','cmp').wp_remote_retrieve_response_code($request).' '.__('while checking for','cmp').' '.esc_attr(ucwords(str_replace('_', ' ', $theme_slug))).' '.__('Theme update. Please try again later or contact us at info@niteo.cz if this error message keeps appearing.','cmp').'</p></div>';
385
+ }
386
+
387
+ } else {
388
+ echo '<div class="notice notice-error is-dismissible"><p>'.__('There has been error: Internal server error:','cmp').' '.$request->get_error_message().' '.__('while checking for Theme update. Please try again later or contact us at info@niteo.cz if this error message keeps appearing.','cmp').'</p></div>';
389
+
390
+ }
391
+ }
392
 
393
+ } else {
394
+ echo $updatecheck_transient;
395
  }
396
  }
397
 
522
  $this->theme_array = array_merge( $this->theme_array, $this->premium_installed );
523
  // reply response
524
  echo $ajax ? 'success' : '<div class="notice notice-success is-dismissible"><p>'.ucwords(str_replace('_', ' ', $theme_name)).' '.__('theme was successfully updated to new version!', 'cmp').'</p></div>';
525
+ // set transient no update available with 24 hours expire
526
+ set_transient( $theme_name.'_updatecheck', '', 60*60*24 );
527
  // die
528
  if ($ajax === true) {
529
  wp_die();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KV2JF
4
  Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
5
  Requires at least: 3.0
6
  Tested up to: 4.7.4
7
- Stable tag: 1.5.0
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -100,6 +100,15 @@ Free plugin to create and customize your own Coming Soon or Maintenance landing
100
 
101
 
102
  == Changelog ==
 
 
 
 
 
 
 
 
 
103
  <h4>1.5.0</h4>
104
  <ul>
105
  <li>New auto update feature for all Themes.</li>
4
  Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
5
  Requires at least: 3.0
6
  Tested up to: 4.7.4
7
+ Stable tag: 1.5.1
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
100
 
101
 
102
  == Changelog ==
103
+ <ul>
104
+ <li>Updated CMP Settings change when Social Inputs Labels where out of its correct positions.</li>
105
+ <li>Updated logic of CMP Theme Update Checker - set to check every 24 hours instead of every time when CMP Settings page was accessed.</li>
106
+ </ul>
107
+ <h4>1.5.1</h4>
108
+ <ul>
109
+ <li>Updated CMP Settings change when Social Inputs Labels where out of its correct positions.</li>
110
+ <li>Updated logic of CMP Theme Update Checker - set to check every 24 hours instead of every time when CMP Settings page was accessed.</li>
111
+ </ul>
112
  <h4>1.5.0</h4>
113
  <ul>
114
  <li>New auto update feature for all Themes.</li>
themes/construct/construct-theme.php CHANGED
@@ -17,7 +17,7 @@
17
 
18
  <?php
19
  // get saved style options
20
- $ver = '1.1';
21
  $active_color = get_option('niteoCS_active_color[construct]', '#f37004');
22
  $font_color = get_option('niteoCS_font_color[construct]', '#686868');
23
  $background_color = get_option('niteoCS_background_color[construct]', '#ffffff');
17
 
18
  <?php
19
  // get saved style options
20
+ $ver = '1.5';
21
  $active_color = get_option('niteoCS_active_color[construct]', '#f37004');
22
  $font_color = get_option('niteoCS_font_color[construct]', '#686868');
23
  $background_color = get_option('niteoCS_background_color[construct]', '#ffffff');
themes/construct/style.css CHANGED
@@ -3,7 +3,7 @@ Theme Name: Construct
3
  Theme URI: http://cmp.niteo.cz/?cmp_preview=true&theme=construct
4
  Author: Niteo
5
  Author URI: http://niteo.cz/
6
- Version: 1.1
7
  Description: Premium Theme for CMP Coming Soon & Maintenance plugin
8
  Text Domain: niteo
9
 
3
  Theme URI: http://cmp.niteo.cz/?cmp_preview=true&theme=construct
4
  Author: Niteo
5
  Author URI: http://niteo.cz/
6
+ Version: 1.5
7
  Description: Premium Theme for CMP Coming Soon & Maintenance plugin
8
  Text Domain: niteo
9
 
themes/hardwork/hardwork-theme.php CHANGED
@@ -11,7 +11,7 @@
11
 
12
  <?php
13
  // get saved style options
14
- $ver = '1.1';
15
  $font_color = get_option('niteoCS_font_color[hardwork]', '#ffffff');
16
  $background_color = get_option('niteoCS_overlay_color[hardwork]', '#000000');
17
  $background_opa = get_option('niteoCS_overlay_opacity[hardwork]', '0.5');
11
 
12
  <?php
13
  // get saved style options
14
+ $ver = '1.5';
15
  $font_color = get_option('niteoCS_font_color[hardwork]', '#ffffff');
16
  $background_color = get_option('niteoCS_overlay_color[hardwork]', '#000000');
17
  $background_opa = get_option('niteoCS_overlay_opacity[hardwork]', '0.5');
themes/hardwork/style.css CHANGED
@@ -3,7 +3,7 @@ Theme Name: Hardwork
3
  Theme URI: http://cmp.niteo.cz/?cmp_preview=true&theme=hardwork
4
  Author: Niteo
5
  Author URI: http://niteo.cz/
6
- Version: 1.1
7
  Description: Premium Theme for CMP Coming Soon & Maintenance plugin
8
  Text Domain: niteo
9
 
3
  Theme URI: http://cmp.niteo.cz/?cmp_preview=true&theme=hardwork
4
  Author: Niteo
5
  Author URI: http://niteo.cz/
6
+ Version: 1.5
7
  Description: Premium Theme for CMP Coming Soon & Maintenance plugin
8
  Text Domain: niteo
9