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

Version Description

Download this release

Release Info

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

Code changes from version 3.8.3 to 3.8.4

Files changed (5) hide show
  1. cmp-settings.php +0 -1
  2. js/settings.js +1 -1
  3. js/settings.min.js +1 -1
  4. niteo-cmp.php +2 -2
  5. readme.txt +6 -1
cmp-settings.php CHANGED
@@ -293,7 +293,6 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
293
  if (isset($_POST['niteoCS_soc_title'])) {
294
  update_option('niteoCS_soc_title', sanitize_text_field($_POST['niteoCS_soc_title']));
295
  }
296
-
297
  if (isset($_POST['niteoCS_socialmedia'])) {
298
  update_option('niteoCS_socialmedia', sanitize_text_field($_POST['niteoCS_socialmedia']));
299
  }
293
  if (isset($_POST['niteoCS_soc_title'])) {
294
  update_option('niteoCS_soc_title', sanitize_text_field($_POST['niteoCS_soc_title']));
295
  }
 
296
  if (isset($_POST['niteoCS_socialmedia'])) {
297
  update_option('niteoCS_socialmedia', sanitize_text_field($_POST['niteoCS_socialmedia']));
298
  }
js/settings.js CHANGED
@@ -839,7 +839,7 @@ jQuery(document).ready(function ($) {
839
  '.cmp-coming-soon-maintenance .social-inputs input[type="text"]'
840
  ).focusout(function () {
841
  var name = jQuery(this).data("name");
842
- var socialurl = jQuery(this).attr("value");
843
  update_social(name, "url", socialurl);
844
  });
845
 
839
  '.cmp-coming-soon-maintenance .social-inputs input[type="text"]'
840
  ).focusout(function () {
841
  var name = jQuery(this).data("name");
842
+ var socialurl = jQuery(this).val();
843
  update_social(name, "url", socialurl);
844
  });
845
 
js/settings.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function (e) { var n = document.location.hash.substring(1), a = jQuery("#csoptions").attr("action"), t = jQuery("#csoptions fieldset:not(.skip-preview-validation *)").serialize(); wp.codeEditor && jQuery("#niteoCS_custom_css").length && wp.codeEditor.initialize("niteoCS_custom_css"), navtab = function (e) { jQuery(".cmp-coming-soon-maintenance .nav-tab-wrapper .nav-tab").removeClass("nav-tab-active"), jQuery(".nav-tab-wrapper ." + e).addClass("nav-tab-active"), jQuery(".cmp-coming-soon-maintenance .table-wrapper." + e).css("display", "block"), jQuery(".cmp-coming-soon-maintenance .table-wrapper-css." + e).css("display", "block"), jQuery(".cmp-coming-soon-maintenance .comingsoon." + e).css("display", "block"), jQuery(".cmp-coming-soon-maintenance .table-wrapper:not(." + e + ")").css("display", "none"), jQuery(".cmp-coming-soon-maintenance .table-wrapper-css:not(." + e).css("display", "none"), jQuery(".cmp-coming-soon-maintenance .comingsoon:not(." + e + ")").css("display", "none"), "install" == e ? (jQuery(".cmp-coming-soon-maintenance .submit").css("display", "none"), jQuery(".cmp-coming-soon-maintenance #csoptions").attr("action", a)) : (jQuery(".cmp-coming-soon-maintenance .submit").css("display", "block"), jQuery(".cmp-coming-soon-maintenance #csoptions").attr("action", a + "#" + e)) }, "" != n ? navtab(n) : jQuery(".cmp-coming-soon-maintenance .table-wrapper-css").css("display", "none"), window.onhashchange = function () { n = document.location.hash.substring(1), navtab(n) }, jQuery(".cmp-coming-soon-maintenance .nav-tab:not(.theme-preview):not(.advanced)").click(function (e) { e.preventDefault(), n = jQuery(this).data("tab"), document.location.hash = n }), p(".cmp-coming-soon-maintenance .blur-range", "span", "html"), p(".cmp-coming-soon-maintenance .background-overlay-opacity", "span", "html"), p("#logo_size_slider", "#niteoCS_logo_size", "val"), p("#niteoCS_logo_size", "#logo_size_slider", "val"), l("logo", !1, "image", "img"), l("favicon", !1, "image", "img"), l("seo_img", !1, "image", "img"), l("images", !0, "image", "img"), l("mobile-images", !0, "image", "img"), l("pattern", !1, "image", "background"), l("video-thumb", !1, "image", "img"), l("video-local", !1, "video", "video"), 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"), u("recaptcha-toggle"), u("login-icon"), u("custom-mobile-imgs"), u("lang-switcher"), 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 (e) { e.preventDefault(); var n = jQuery(".cmp-coming-soon-maintenance #unsplash-media"), a = jQuery('.cmp-coming-soon-maintenance .unsplash_banner select[name^="unsplash_feed"] option:selected').val(), t = "", i = jQuery(this).data("security"); if (0 == a) { switch (a) { case "0": t = jQuery(".cmp-coming-soon-maintenance #niteoCS-unsplash-0").val() }if (3 == a || "" != t) { var o = { feed: a, url: t, feat: "", custom_str: "" }; jQuery(this).prop("disabled", !0), jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>'); var r = { action: "niteo_unsplash", security: i, params: o }; jQuery.post(ajaxurl, r, function (e) { var a = JSON.parse(e); jQuery("#unsplash_img").remove(); var t = setTimeout(function () { jQuery("#test-unsplash").prop("disabled", !1), jQuery("#test-unsplash").text("Display Unsplash Photo"), jQuery("#unsplash-media").html('<p>It seems <a href="https://status.unsplash.com/" target="_blank">Unsplash API</a> is not responding. Please try again later.</p>') }, 5e3); if ("200" == a.response) { if ((a = jQuery.parseJSON(a.body))[0]) var i = a[0].urls.raw + "?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588", o = a[0].user.name, r = a[0].user.links.html, c = a[0].links.html, s = a[0].id; else i = a.urls.raw + "?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588", o = a.user.name, r = a.user.links.html, c = a.links.html, s = a.id; jQuery("<img />", { src: i, id: "unsplash_img" }).one("load", function () { jQuery(this).appendTo(n), jQuery(this).fadeIn(), jQuery("#test-unsplash").prop("disabled", !1), jQuery("#test-unsplash").text("Display Unsplash Photo"), jQuery(".unsplash-id").html('<a href="' + 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 " + a.response + ': <span style="text-transform:lowercase;">' + JSON.parse(a.body).errors + "</span></p>"), clearTimeout(t) }) } else jQuery(".cmp-coming-soon-maintenance #unsplash_img").remove() } }), videoPreview = function () { if ("5" == jQuery(".cmp-coming-soon-maintenance .background-type:checked").val()) { var e = jQuery(".cmp-coming-soon-maintenance .banner-video-source").val(); if ("youtube" == e) { var n = jQuery(".cmp-coming-soon-maintenance #niteoCS-youtube-url").val(); if ("" != n) { var a = n.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/); if (a && 11 == a[7].length) { jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").html(""); var t = "https://img.youtube.com/vi/" + a[7] + "/maxresdefault.jpg"; jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").append('<img src="' + t + '" alt=""/>'), jQuery(".cmp-coming-soon-maintenance .blur-range").trigger("input") } else jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").html("") } } if ("local" == e) { var i = jQuery("#niteoCS-video-local-id").data("url"); "" != i && jQuery(".cmp-coming-soon-maintenance .video-local-wrapper").html('<video width="600" height="400" controls><source src="' + i + '" type="video/mp4">Your browser does not support the video tag.</video>') } } }, videoPreview(), jQuery(".cmp-coming-soon-maintenance .background-type").on("change", function () { videoPreview() }), jQuery(".cmp-coming-soon-maintenance #niteoCS-youtube-url").on("keyup", function () { videoPreview() }), jQuery(".cmp-coming-soon-maintenance .banner-video-source").on("change", function () { videoPreview() }); var i = jQuery('.unsplash_banner select[name^="unsplash_feed"] option:selected').val(); function o(e) { switch (e) { case "solid-color": jQuery(".thumbnail-overlay").css("background", jQuery("#niteoCS_overlay_color").val()); break; case "gradient": jQuery(".cmp-coming-soon-maintenance select.overlay-gradient").trigger("change"); break; case "disabled": jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css("background", "none") } } jQuery(".unsplash-feed-" + i).css("display", "block"), jQuery('.unsplash_banner select[name^="unsplash_feed"]').on("change", function () { i = jQuery('.unsplash_banner select[name^="unsplash_feed"] option:selected').val(), jQuery(".unsplash-feed").css("display", "none"), jQuery(".unsplash-feed-" + i).css("display", "block"), jQuery("#test-unsplash").trigger("click") }), 1 == jQuery("#csoptions .niteoCS_banner:checked").val() && jQuery("#test-unsplash").trigger("click"), jQuery(".cmp-coming-soon-maintenance select.background-gradient").on("change", function () { var e = jQuery(".cmp-coming-soon-maintenance select.background-gradient option:selected").val(); "custom" == e ? (jQuery(".cmp-coming-soon-maintenance .custom-gradient").css("display", "block"), jQuery(".cmp-coming-soon-maintenance .gradient-preview").css({ background: "-moz-linear-gradient(-45deg, " + jQuery("#niteoCS_gradient_one").val() + " 0%, " + jQuery("#niteoCS_gradient_two").val() + " 100%)", background: "-webkit-linear-gradient(-45deg, " + jQuery("#niteoCS_gradient_one").val() + " 0%, " + jQuery("#niteoCS_gradient_two").val() + " 100%)", background: "linear-gradient(135deg, " + jQuery("#niteoCS_gradient_one").val() + " 0%, " + jQuery("#niteoCS_gradient_two").val() + " 100%)" })) : (colors = e.split(":"), jQuery(".cmp-coming-soon-maintenance .custom-gradient").css("display", "none"), jQuery(".cmp-coming-soon-maintenance .gradient-preview").css({ background: "-moz-linear-gradient(-45deg, " + colors[0] + " 0%, " + colors[1] + " 100%)", background: "-webkit-linear-gradient(-45deg, " + colors[0] + " 0%, " + colors[1] + " 100%)", background: "linear-gradient(135deg, " + colors[0] + " 0%, " + colors[1] + " 100%)" })) }).trigger("change"), jQuery(".cmp-coming-soon-maintenance #niteoCS_banner_color").wpColorPicker({ change: function (e, n) { jQuery(".color-preview").css("background-color", n.color.toString()) } }), jQuery(".cmp-coming-soon-maintenance #niteoCS_gradient_one").wpColorPicker({ change: function (e, n) { jQuery(".gradient-preview").css({ background: "-moz-linear-gradient(-45deg, " + n.color.toString() + " 0%, " + jQuery("#niteoCS_gradient_two").val() + " 100%)", background: "-webkit-linear-gradient(-45deg, " + n.color.toString() + " 0%, " + jQuery("#niteoCS_gradient_two").val() + " 100%)", background: "linear-gradient(135deg, " + n.color.toString() + " 0%, " + jQuery("#niteoCS_gradient_two").val() + " 100%)" }) } }), jQuery(".cmp-coming-soon-maintenance #niteoCS_gradient_two").wpColorPicker({ change: function (e, n) { jQuery(".gradient-preview").css({ background: "-moz-linear-gradient(-45deg, " + jQuery("#niteoCS_gradient_one").val() + " 0%, " + n.color.toString() + " 100%)", background: "-webkit-linear-gradient(-45deg, " + jQuery("#niteoCS_gradient_one").val() + " 0%, " + n.color.toString() + " 100%)", background: "linear-gradient(135deg, " + jQuery("#niteoCS_gradient_one").val() + " 0%, " + n.color.toString() + " 100%)" }) } }), jQuery(".cmp-coming-soon-maintenance #niteoCS_overlay_color").wpColorPicker({ change: function (e, n) { jQuery(".thumbnail-overlay").css("background", n.color.toString()) } }), jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css("background", jQuery("#niteoCS_overlay_color").val()), jQuery(".cmp-coming-soon-maintenance select.overlay-gradient").on("change", function () { var e = jQuery("select.overlay-gradient option:selected").val(); if ("custom" == e) { jQuery(".cmp-coming-soon-maintenance .custom-overlay-gradient").css("display", "block"); var n = jQuery("#niteoCS_overlay_gradient_one").val(), a = jQuery("#niteoCS_overlay_gradient_two").val(); jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css({ background: "-moz-linear-gradient(-45deg, " + n + " 0%, " + a + " 100%)", background: "-webkit-linear-gradient(-45deg, " + n + " 0%, " + a + " 100%)", background: "linear-gradient(135deg, " + n + " 0%, " + a + " 100%)" }) } else colors = e.split(":"), jQuery(".cmp-coming-soon-maintenance .custom-overlay-gradient").css("display", "none"), jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css({ background: "-moz-linear-gradient(-45deg, " + colors[0] + " 0%, " + colors[1] + " 100%)", background: "-webkit-linear-gradient(-45deg, " + colors[0] + " 0%, " + colors[1] + " 100%)", background: "linear-gradient(135deg, " + colors[0] + " 0%, " + colors[1] + " 100%)" }) }), jQuery("#niteoCS_overlay_gradient_one").wpColorPicker({ change: function (e, n) { jQuery(".thumbnail-overlay").css({ background: "-moz-linear-gradient(-45deg, " + n.color.toString() + " 0%, " + jQuery("#niteoCS_overlay_gradient_two").val() + " 100%)", background: "-webkit-linear-gradient(-45deg, " + n.color.toString() + " 0%, " + jQuery("#niteoCS_overlay_gradient_two").val() + " 100%)", background: "linear-gradient(135deg, " + n.color.toString() + " 0%, " + jQuery("#niteoCS_overlay_gradient_two").val() + " 100%)" }) } }), jQuery("#niteoCS_overlay_gradient_two").wpColorPicker({ change: function (e, n) { jQuery(".thumbnail-overlay").css({ background: "-moz-linear-gradient(-45deg, " + jQuery("#niteoCS_overlay_gradient_one").val() + " 0%, " + n.color.toString() + " 100%)", background: "-webkit-linear-gradient(-45deg, " + jQuery("#niteoCS_overlay_gradient_one").val() + " 0%, " + n.color.toString() + " 100%)", background: "linear-gradient(135deg, " + jQuery("#niteoCS_overlay_gradient_one").val() + " 0%, " + n.color.toString() + " 100%)" }) } }), jQuery(".background-overlay-opacity").on("input", function () { var e = jQuery(this).val(); jQuery(".thumbnail-overlay").css("opacity", e) }).trigger("input"), o(jQuery(".cmp-coming-soon-maintenance .background-overlay").val()), jQuery(".cmp-coming-soon-maintenance .background-overlay").on("change", function () { o(jQuery(this).val()) }), jQuery(".cmp-coming-soon-maintenance .blur-range").on("input", function () { var e = jQuery(this).val(); jQuery(".cmp-coming-soon-maintenance .background-thumb-wrapper img:not(.no-blur)").css("filter", "blur(" + e + "px)") }).trigger("input"), jQuery('.cmp-coming-soon-maintenance select[name^="niteoCS_banner_pattern"]').on("change", function () { var e = jQuery('.cmp-coming-soon-maintenance select[name^="niteoCS_banner_pattern"] option:selected').val(); if ("custom" != e) { var n = jQuery(this).data("url"); jQuery(".cmp-coming-soon-maintenance #add-pattern").css("display", "none"), jQuery(".cmp-coming-soon-maintenance .pattern-wrapper").css("background-image", "url('" + n + e + ".png')") } else { n = jQuery(".cmp-coming-soon-maintenance #niteoCS_banner_pattern_custom").val(); jQuery(".cmp-coming-soon-maintenance #add-pattern").css("display", "block"), jQuery(".cmp-coming-soon-maintenance .pattern-wrapper").css("background-image", "url('" + n + "')") } }), jQuery(".cmp-coming-soon-maintenance .heading-animation").on("change", function () { heading_anim = jQuery(".cmp-coming-soon-maintenance .heading-animation option:selected").val(), jQuery(".cmp-coming-soon-maintenance #heading-example").removeClass().addClass("animated " + heading_anim) }), jQuery(".cmp-coming-soon-maintenance .content-animation").on("change", function () { heading_anim = jQuery(".cmp-coming-soon-maintenance .content-animation option:selected").val(), jQuery(".cmp-coming-soon-maintenance #content-example").removeClass().addClass("animated " + heading_anim) }); var r = function (e, n, a) { var t = jQuery(".cmp-coming-soon-maintenance #niteoCS_socialmedia").attr("value"); t = jQuery.parseJSON(t), jQuery.each(t, function (t, i) { i.name == e && (i[n] = a) }), jQuery(".cmp-coming-soon-maintenance #niteoCS_socialmedia").attr("value", JSON.stringify(t)) }; if (!/Mobi/.test(navigator.userAgent)) { var c = jQuery(".cmp-coming-soon-maintenance .social-inputs"), s = function (e, n) { var a = c.find('input[type="text"]'); n.item.index(); a.each(function (e, n) { var a = jQuery(n).data("name"); r(a, "order", e) }) }; 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 (a) { switch (i = n[a].sizes && n[a].sizes.large ? n[a].sizes.large.url : n[a].url, s += (0 === a ? "" : ",") + n[a].id, t) { case "video": o.append('<video width="600" height="400" controls><source src="' + i + '" type="video/mp4">Your browser does not support the video tag.</video>'); break; case "background": o.css("background-image", "url('" + i + "')"); break; case "img": default: n.length > 1 && 0 == a && jQuery("." + e + "-wrapper .big-thumb").length ? jQuery("." + e + "-wrapper .big-thumb").append('<img src="' + i + '" alt=""/>') : n.length > 1 && 0 !== a ? o.append('<img src="' + i + '" alt="" class="no-blur"/>') : o.find(".big-thumb").length ? jQuery("." + e + "-wrapper .big-thumb").append('<img src="' + i + '" alt=""/>') : o.append('<img src="' + i + '" alt=""/>'), jQuery(".blur-range").trigger("input") } }), 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) }) } jQuery, jQuery.fn.toggleDisabled = function () { return this.each(function () { var e, n = jQuery(this), a = n.data("name"); n.attr("disabled") ? (n.prop("disabled", !1), e = "1") : (n.prop("disabled", !0), e = "0"), r(a, "active", e) }) }, jQuery('.cmp-coming-soon-maintenance .social-inputs input[type="text"]').focusout(function () { var e = jQuery(this).data("name"), n = jQuery(this).attr("value"); r(e, "url", n) }), jQuery('.cmp-coming-soon-maintenance .social-inputs input[type="checkbox"]').click(function (e) { jQuery(this).siblings('input[type="text"]').toggleDisabled() }), jQuery(".cmp-coming-soon-maintenance .social-media i").click(function () { var e = jQuery(this).data("name"); jQuery(this).toggleClass("active"), jQuery(".cmp-coming-soon-maintenance .social-inputs li." + e).toggleClass("active"), jQuery(".cmp-coming-soon-maintenance .social-inputs li." + e + " input").trigger("change"), jQuery(this).hasClass("active") ? r(e, "hidden", "0") : r(e, "hidden", "1"), jQuery(".cmp-coming-soon-maintenance .social-media i.active").length ? jQuery(".social-inputs .label").css("display", "block") : jQuery(".cmp-coming-soon-maintenance .social-inputs .label").css("display", "none") }), jQuery(".cmp-coming-soon-maintenance .social-media i.active").length && jQuery(".cmp-coming-soon-maintenance .social-inputs .label").css("display", "block"), jQuery(".cmp.update-theme").click(function (e) { e.preventDefault(); var n = jQuery(this), a = n.parents(".notice"), t = n.data("security"), i = n.data("slug"), o = n.data("name"), r = { action: "cmp_theme_update_install", security: t, file: { name: i, tmp_name: "", url: jQuery(this).data("remote_url") + "?action=download&slug=" + i } }; a.find(".message").html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span class="sr-only">Updating heme...</span><span> working hard on updating Theme...</span>'), jQuery.post(ajaxurl, r, function (e) { if ("success" == (e = e.trim())) setTimeout(function () { a.removeClass("notice-warning").addClass("notice-success"), a.find(".message").html("<span> " + o + ' CMP theme was updated sucessfully! You can enjoy latest features now :) </span><i class="fa fa-smile-o" aria-hidden="true"></i>') }, 1500); else { e = e.slice(0, -1); var n = jQuery("p", jQuery(e)).text(); a.removeClass("notice-warning").addClass("notice-error"), a.find(".message").html('<i class="fa fa-frown-o" aria-hidden="true"></i><span> ' + n + "</span>") } }) }), jQuery(".cmp-coming-soon-maintenance .theme-update.button").one("click", function (e) { e.preventDefault(); var n = jQuery(this), a = n.closest(".theme-wrapper"), t = a.data("security"), i = a.data("slug"), o = { action: "cmp_theme_update_install", security: t, file: { name: i, tmp_name: "", url: a.data("remote_url") + "?action=download&slug=" + i } }; n.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>'), jQuery.post(ajaxurl, o, function (e) { "success" == e ? setTimeout(function () { n.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>'), setTimeout(function () { n.fadeOut() }, 1500) }, 1500) : (e = e.slice(0, -1), n.html('<i class="fa fa-frown-o" aria-hidden="true"></i><span>Update Failed!</span>')) }) }), jQuery(".cmp-coming-soon-maintenance .theme-details").click(function (e) { e.preventDefault(); var n = jQuery(this).closest(".theme-wrapper"), a = n.data("slug"), t = n.data("version"), i = n.data("type"), o = n.data("purchased"), r = 0, c = { action: "niteo_themeinfo", security: jQuery(".theme-wrapper").data("security"), theme_slug: jQuery(this).parents(".theme-wrapper").data("slug") }; jQuery.post(ajaxurl, c, function (e) { var c = "", s = ""; if ("true" == (e = jQuery.parseJSON(e)).result) { if (jQuery("body").addClass("modal-open"), "1" == o && (s = '<span class="theme-version">Installed version: ' + t + "</span>"), "1" != o && "premium" == i) c = '<button type="button" class="theme-purchase button hide"><a href="' + n.find(".cmp-purchase-theme").attr("href") + '" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>Get Theme</a></button>'; var l = e.screenshots, u = ""; Object.keys(l).length > 1 && (u = '<div class="screenshots-nav"><div class="left"><i class="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 m = jQuery(['<div class="theme-backdrop">', '\t<div class="theme-wrap">', '\t\t<div class="theme-header">', '\t\t\t<button class="close dashicons dashicons-no"><span class="screen-reader-text">Close details dialog</span></button>', "\t\t</div>", '\t\t<div class="theme-about">', '\t\t\t<div class="theme-screenshots">', '\t\t\t\t<div class="screenshot" style="background-image:url(\'' + l[0] + "')\">" + u + "</div>", "\t\t\t</div>", '\t\t\t<div class="theme-info">', '\t\t\t\t<h2 class="theme-name">' + e.name + s + "</h2>", '\t\t\t\t<p class="theme-author">By <a href="' + e.author_homepage + '" target="_blank">' + e.author + "</a></p>", "", c, '\t\t\t\t<div class="theme-description">' + e.description + "</div>", "\t\t\t</div>", "\t\t</div>", '\t\t<div class="theme-actions">', '\t\t\t<a href="https://niteothemes.com/cmp-coming-soon-maintenance/?theme=' + a + "&utm_source=cmp&utm_medium=referral&utm_campaign=" + a + '" class="button cmp-preview" target="_blank" aria-label="Preview ' + e.name + '">Live Preview</a>', "\t\t</div>", "\t</div>", "</div>"].join("\n")); jQuery(".theme-overlay.cmp").append(m), jQuery(".theme-overlay.cmp .close").click(function (e) { e.preventDefault(), jQuery("body").removeClass("modal-open"), jQuery(".theme-overlay.cmp .theme-backdrop").fadeOut("fast") }), jQuery(".screenshots-nav .right").click(function () { ++r == Object.keys(l).length && (r = 0), r in l && jQuery(".screenshot").css("background-image", "url('" + l[r] + "')") }), jQuery(".screenshots-nav .left").click(function () { --r < 0 && (r = Object.keys(l).length - 1), r in l && jQuery(".screenshot").css("background-image", "url('" + l[r] + "')") }) } }) }), jQuery(".cmp-coming-soon-maintenance #connect-mailchimp").click(function (e) { e.preventDefault(); var n = jQuery('.cmp-coming-soon-maintenance input[name="niteoCS_mailchimp_apikey"]').val(), a = jQuery(this).data("security"), t = jQuery(this); if ("" != n) { var i = { apikey: n, security: a }; jQuery(this).prop("disabled", !0), jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> retrieving lists..</span>'); var o = { action: "cmp_mailchimp_list_ajax", security: a, params: i }; jQuery.post(ajaxurl, o, function (e) { var n = JSON.parse(e); 200 == n.response ? (jQuery("#niteoCS_mailchimp_list").empty().prop("disabled", !1), jQuery.each(n.lists, function (e, n) { jQuery("#niteoCS_mailchimp_list").append('<option value="' + n.id + '">' + n.name + "</option>") })) : jQuery("#niteoCS_mailchimp_list").empty().prop("disabled", !0).html('<option value="error">' + n.message + "</option>").trigger("change"), t.html("Retrieve Lists"), t.prop("disabled", !1) }).fail(function () { t.html("Retrieve Lists"), t.prop("disabled", !1) }) } }), jQuery(".cmp-coming-soon-maintenance .table-wrapper.theme-setup h4").each(function () { if ("Overlay Color" == jQuery(this).html()) return jQuery(this).parents("tr").remove(), !1 }), jQuery(".nav-tab-wrapper").on("click", ".theme-preview", function (e) { return !(jQuery("#csoptions fieldset:not(.skip-preview-validation *)").serialize() != t && !confirm("You have made changes that will not be visible in the preview until you save them. Please save changes first.\nContinue anyway?")) || (e.preventDefault(), !1) }) });
1
+ jQuery(document).ready(function (e) { var n = document.location.hash.substring(1), a = jQuery("#csoptions").attr("action"), t = jQuery("#csoptions fieldset:not(.skip-preview-validation *)").serialize(); wp.codeEditor && jQuery("#niteoCS_custom_css").length && wp.codeEditor.initialize("niteoCS_custom_css"), navtab = function (e) { jQuery(".cmp-coming-soon-maintenance .nav-tab-wrapper .nav-tab").removeClass("nav-tab-active"), jQuery(".nav-tab-wrapper ." + e).addClass("nav-tab-active"), jQuery(".cmp-coming-soon-maintenance .table-wrapper." + e).css("display", "block"), jQuery(".cmp-coming-soon-maintenance .table-wrapper-css." + e).css("display", "block"), jQuery(".cmp-coming-soon-maintenance .comingsoon." + e).css("display", "block"), jQuery(".cmp-coming-soon-maintenance .table-wrapper:not(." + e + ")").css("display", "none"), jQuery(".cmp-coming-soon-maintenance .table-wrapper-css:not(." + e).css("display", "none"), jQuery(".cmp-coming-soon-maintenance .comingsoon:not(." + e + ")").css("display", "none"), "install" == e ? (jQuery(".cmp-coming-soon-maintenance .submit").css("display", "none"), jQuery(".cmp-coming-soon-maintenance #csoptions").attr("action", a)) : (jQuery(".cmp-coming-soon-maintenance .submit").css("display", "block"), jQuery(".cmp-coming-soon-maintenance #csoptions").attr("action", a + "#" + e)) }, "" != n ? navtab(n) : jQuery(".cmp-coming-soon-maintenance .table-wrapper-css").css("display", "none"), window.onhashchange = function () { n = document.location.hash.substring(1), navtab(n) }, jQuery(".cmp-coming-soon-maintenance .nav-tab:not(.theme-preview):not(.advanced)").click(function (e) { e.preventDefault(), n = jQuery(this).data("tab"), document.location.hash = n }), p(".cmp-coming-soon-maintenance .blur-range", "span", "html"), p(".cmp-coming-soon-maintenance .background-overlay-opacity", "span", "html"), p("#logo_size_slider", "#niteoCS_logo_size", "val"), p("#niteoCS_logo_size", "#logo_size_slider", "val"), l("logo", !1, "image", "img"), l("favicon", !1, "image", "img"), l("seo_img", !1, "image", "img"), l("images", !0, "image", "img"), l("mobile-images", !0, "image", "img"), l("pattern", !1, "image", "background"), l("video-thumb", !1, "image", "img"), l("video-local", !1, "video", "video"), 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"), u("recaptcha-toggle"), u("login-icon"), u("custom-mobile-imgs"), u("lang-switcher"), 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 (e) { e.preventDefault(); var n = jQuery(".cmp-coming-soon-maintenance #unsplash-media"), a = jQuery('.cmp-coming-soon-maintenance .unsplash_banner select[name^="unsplash_feed"] option:selected').val(), t = "", i = jQuery(this).data("security"); if (0 == a) { switch (a) { case "0": t = jQuery(".cmp-coming-soon-maintenance #niteoCS-unsplash-0").val() }if (3 == a || "" != t) { var o = { feed: a, url: t, feat: "", custom_str: "" }; jQuery(this).prop("disabled", !0), jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> loading..</span>'); var r = { action: "niteo_unsplash", security: i, params: o }; jQuery.post(ajaxurl, r, function (e) { var a = JSON.parse(e); jQuery("#unsplash_img").remove(); var t = setTimeout(function () { jQuery("#test-unsplash").prop("disabled", !1), jQuery("#test-unsplash").text("Display Unsplash Photo"), jQuery("#unsplash-media").html('<p>It seems <a href="https://status.unsplash.com/" target="_blank">Unsplash API</a> is not responding. Please try again later.</p>') }, 5e3); if ("200" == a.response) { if ((a = jQuery.parseJSON(a.body))[0]) var i = a[0].urls.raw + "?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588", o = a[0].user.name, r = a[0].user.links.html, c = a[0].links.html, s = a[0].id; else i = a.urls.raw + "?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&cs=tinysrgb&fit=max&w=588", o = a.user.name, r = a.user.links.html, c = a.links.html, s = a.id; jQuery("<img />", { src: i, id: "unsplash_img" }).one("load", function () { jQuery(this).appendTo(n), jQuery(this).fadeIn(), jQuery("#test-unsplash").prop("disabled", !1), jQuery("#test-unsplash").text("Display Unsplash Photo"), jQuery(".unsplash-id").html('<a href="' + 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 " + a.response + ': <span style="text-transform:lowercase;">' + JSON.parse(a.body).errors + "</span></p>"), clearTimeout(t) }) } else jQuery(".cmp-coming-soon-maintenance #unsplash_img").remove() } }), videoPreview = function () { if ("5" == jQuery(".cmp-coming-soon-maintenance .background-type:checked").val()) { var e = jQuery(".cmp-coming-soon-maintenance .banner-video-source").val(); if ("youtube" == e) { var n = jQuery(".cmp-coming-soon-maintenance #niteoCS-youtube-url").val(); if ("" != n) { var a = n.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/); if (a && 11 == a[7].length) { jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").html(""); var t = "https://img.youtube.com/vi/" + a[7] + "/maxresdefault.jpg"; jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").append('<img src="' + t + '" alt=""/>'), jQuery(".cmp-coming-soon-maintenance .blur-range").trigger("input") } else jQuery(".cmp-coming-soon-maintenance .video-yt-wrapper .video-yt-thumb-wrapper").html("") } } if ("local" == e) { var i = jQuery("#niteoCS-video-local-id").data("url"); "" != i && jQuery(".cmp-coming-soon-maintenance .video-local-wrapper").html('<video width="600" height="400" controls><source src="' + i + '" type="video/mp4">Your browser does not support the video tag.</video>') } } }, videoPreview(), jQuery(".cmp-coming-soon-maintenance .background-type").on("change", function () { videoPreview() }), jQuery(".cmp-coming-soon-maintenance #niteoCS-youtube-url").on("keyup", function () { videoPreview() }), jQuery(".cmp-coming-soon-maintenance .banner-video-source").on("change", function () { videoPreview() }); var i = jQuery('.unsplash_banner select[name^="unsplash_feed"] option:selected').val(); function o(e) { switch (e) { case "solid-color": jQuery(".thumbnail-overlay").css("background", jQuery("#niteoCS_overlay_color").val()); break; case "gradient": jQuery(".cmp-coming-soon-maintenance select.overlay-gradient").trigger("change"); break; case "disabled": jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css("background", "none") } } jQuery(".unsplash-feed-" + i).css("display", "block"), jQuery('.unsplash_banner select[name^="unsplash_feed"]').on("change", function () { i = jQuery('.unsplash_banner select[name^="unsplash_feed"] option:selected').val(), jQuery(".unsplash-feed").css("display", "none"), jQuery(".unsplash-feed-" + i).css("display", "block"), jQuery("#test-unsplash").trigger("click") }), 1 == jQuery("#csoptions .niteoCS_banner:checked").val() && jQuery("#test-unsplash").trigger("click"), jQuery(".cmp-coming-soon-maintenance select.background-gradient").on("change", function () { var e = jQuery(".cmp-coming-soon-maintenance select.background-gradient option:selected").val(); "custom" == e ? (jQuery(".cmp-coming-soon-maintenance .custom-gradient").css("display", "block"), jQuery(".cmp-coming-soon-maintenance .gradient-preview").css({ background: "-moz-linear-gradient(-45deg, " + jQuery("#niteoCS_gradient_one").val() + " 0%, " + jQuery("#niteoCS_gradient_two").val() + " 100%)", background: "-webkit-linear-gradient(-45deg, " + jQuery("#niteoCS_gradient_one").val() + " 0%, " + jQuery("#niteoCS_gradient_two").val() + " 100%)", background: "linear-gradient(135deg, " + jQuery("#niteoCS_gradient_one").val() + " 0%, " + jQuery("#niteoCS_gradient_two").val() + " 100%)" })) : (colors = e.split(":"), jQuery(".cmp-coming-soon-maintenance .custom-gradient").css("display", "none"), jQuery(".cmp-coming-soon-maintenance .gradient-preview").css({ background: "-moz-linear-gradient(-45deg, " + colors[0] + " 0%, " + colors[1] + " 100%)", background: "-webkit-linear-gradient(-45deg, " + colors[0] + " 0%, " + colors[1] + " 100%)", background: "linear-gradient(135deg, " + colors[0] + " 0%, " + colors[1] + " 100%)" })) }).trigger("change"), jQuery(".cmp-coming-soon-maintenance #niteoCS_banner_color").wpColorPicker({ change: function (e, n) { jQuery(".color-preview").css("background-color", n.color.toString()) } }), jQuery(".cmp-coming-soon-maintenance #niteoCS_gradient_one").wpColorPicker({ change: function (e, n) { jQuery(".gradient-preview").css({ background: "-moz-linear-gradient(-45deg, " + n.color.toString() + " 0%, " + jQuery("#niteoCS_gradient_two").val() + " 100%)", background: "-webkit-linear-gradient(-45deg, " + n.color.toString() + " 0%, " + jQuery("#niteoCS_gradient_two").val() + " 100%)", background: "linear-gradient(135deg, " + n.color.toString() + " 0%, " + jQuery("#niteoCS_gradient_two").val() + " 100%)" }) } }), jQuery(".cmp-coming-soon-maintenance #niteoCS_gradient_two").wpColorPicker({ change: function (e, n) { jQuery(".gradient-preview").css({ background: "-moz-linear-gradient(-45deg, " + jQuery("#niteoCS_gradient_one").val() + " 0%, " + n.color.toString() + " 100%)", background: "-webkit-linear-gradient(-45deg, " + jQuery("#niteoCS_gradient_one").val() + " 0%, " + n.color.toString() + " 100%)", background: "linear-gradient(135deg, " + jQuery("#niteoCS_gradient_one").val() + " 0%, " + n.color.toString() + " 100%)" }) } }), jQuery(".cmp-coming-soon-maintenance #niteoCS_overlay_color").wpColorPicker({ change: function (e, n) { jQuery(".thumbnail-overlay").css("background", n.color.toString()) } }), jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css("background", jQuery("#niteoCS_overlay_color").val()), jQuery(".cmp-coming-soon-maintenance select.overlay-gradient").on("change", function () { var e = jQuery("select.overlay-gradient option:selected").val(); if ("custom" == e) { jQuery(".cmp-coming-soon-maintenance .custom-overlay-gradient").css("display", "block"); var n = jQuery("#niteoCS_overlay_gradient_one").val(), a = jQuery("#niteoCS_overlay_gradient_two").val(); jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css({ background: "-moz-linear-gradient(-45deg, " + n + " 0%, " + a + " 100%)", background: "-webkit-linear-gradient(-45deg, " + n + " 0%, " + a + " 100%)", background: "linear-gradient(135deg, " + n + " 0%, " + a + " 100%)" }) } else colors = e.split(":"), jQuery(".cmp-coming-soon-maintenance .custom-overlay-gradient").css("display", "none"), jQuery(".cmp-coming-soon-maintenance .thumbnail-overlay").css({ background: "-moz-linear-gradient(-45deg, " + colors[0] + " 0%, " + colors[1] + " 100%)", background: "-webkit-linear-gradient(-45deg, " + colors[0] + " 0%, " + colors[1] + " 100%)", background: "linear-gradient(135deg, " + colors[0] + " 0%, " + colors[1] + " 100%)" }) }), jQuery("#niteoCS_overlay_gradient_one").wpColorPicker({ change: function (e, n) { jQuery(".thumbnail-overlay").css({ background: "-moz-linear-gradient(-45deg, " + n.color.toString() + " 0%, " + jQuery("#niteoCS_overlay_gradient_two").val() + " 100%)", background: "-webkit-linear-gradient(-45deg, " + n.color.toString() + " 0%, " + jQuery("#niteoCS_overlay_gradient_two").val() + " 100%)", background: "linear-gradient(135deg, " + n.color.toString() + " 0%, " + jQuery("#niteoCS_overlay_gradient_two").val() + " 100%)" }) } }), jQuery("#niteoCS_overlay_gradient_two").wpColorPicker({ change: function (e, n) { jQuery(".thumbnail-overlay").css({ background: "-moz-linear-gradient(-45deg, " + jQuery("#niteoCS_overlay_gradient_one").val() + " 0%, " + n.color.toString() + " 100%)", background: "-webkit-linear-gradient(-45deg, " + jQuery("#niteoCS_overlay_gradient_one").val() + " 0%, " + n.color.toString() + " 100%)", background: "linear-gradient(135deg, " + jQuery("#niteoCS_overlay_gradient_one").val() + " 0%, " + n.color.toString() + " 100%)" }) } }), jQuery(".background-overlay-opacity").on("input", function () { var e = jQuery(this).val(); jQuery(".thumbnail-overlay").css("opacity", e) }).trigger("input"), o(jQuery(".cmp-coming-soon-maintenance .background-overlay").val()), jQuery(".cmp-coming-soon-maintenance .background-overlay").on("change", function () { o(jQuery(this).val()) }), jQuery(".cmp-coming-soon-maintenance .blur-range").on("input", function () { var e = jQuery(this).val(); jQuery(".cmp-coming-soon-maintenance .background-thumb-wrapper img:not(.no-blur)").css("filter", "blur(" + e + "px)") }).trigger("input"), jQuery('.cmp-coming-soon-maintenance select[name^="niteoCS_banner_pattern"]').on("change", function () { var e = jQuery('.cmp-coming-soon-maintenance select[name^="niteoCS_banner_pattern"] option:selected').val(); if ("custom" != e) { var n = jQuery(this).data("url"); jQuery(".cmp-coming-soon-maintenance #add-pattern").css("display", "none"), jQuery(".cmp-coming-soon-maintenance .pattern-wrapper").css("background-image", "url('" + n + e + ".png')") } else { n = jQuery(".cmp-coming-soon-maintenance #niteoCS_banner_pattern_custom").val(); jQuery(".cmp-coming-soon-maintenance #add-pattern").css("display", "block"), jQuery(".cmp-coming-soon-maintenance .pattern-wrapper").css("background-image", "url('" + n + "')") } }), jQuery(".cmp-coming-soon-maintenance .heading-animation").on("change", function () { heading_anim = jQuery(".cmp-coming-soon-maintenance .heading-animation option:selected").val(), jQuery(".cmp-coming-soon-maintenance #heading-example").removeClass().addClass("animated " + heading_anim) }), jQuery(".cmp-coming-soon-maintenance .content-animation").on("change", function () { heading_anim = jQuery(".cmp-coming-soon-maintenance .content-animation option:selected").val(), jQuery(".cmp-coming-soon-maintenance #content-example").removeClass().addClass("animated " + heading_anim) }); var r = function (e, n, a) { var t = jQuery(".cmp-coming-soon-maintenance #niteoCS_socialmedia").attr("value"); t = jQuery.parseJSON(t), jQuery.each(t, function (t, i) { i.name == e && (i[n] = a) }), jQuery(".cmp-coming-soon-maintenance #niteoCS_socialmedia").attr("value", JSON.stringify(t)) }; if (!/Mobi/.test(navigator.userAgent)) { var c = jQuery(".cmp-coming-soon-maintenance .social-inputs"), s = function (e, n) { var a = c.find('input[type="text"]'); n.item.index(); a.each(function (e, n) { var a = jQuery(n).data("name"); r(a, "order", e) }) }; 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 (a) { switch (i = n[a].sizes && n[a].sizes.large ? n[a].sizes.large.url : n[a].url, s += (0 === a ? "" : ",") + n[a].id, t) { case "video": o.append('<video width="600" height="400" controls><source src="' + i + '" type="video/mp4">Your browser does not support the video tag.</video>'); break; case "background": o.css("background-image", "url('" + i + "')"); break; case "img": default: n.length > 1 && 0 == a && jQuery("." + e + "-wrapper .big-thumb").length ? jQuery("." + e + "-wrapper .big-thumb").append('<img src="' + i + '" alt=""/>') : n.length > 1 && 0 !== a ? o.append('<img src="' + i + '" alt="" class="no-blur"/>') : o.find(".big-thumb").length ? jQuery("." + e + "-wrapper .big-thumb").append('<img src="' + i + '" alt=""/>') : o.append('<img src="' + i + '" alt=""/>'), jQuery(".blur-range").trigger("input") } }), 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) }) } jQuery, jQuery.fn.toggleDisabled = function () { return this.each(function () { var e, n = jQuery(this), a = n.data("name"); n.attr("disabled") ? (n.prop("disabled", !1), e = "1") : (n.prop("disabled", !0), e = "0"), r(a, "active", e) }) }, jQuery('.cmp-coming-soon-maintenance .social-inputs input[type="text"]').focusout(function () { var e = jQuery(this).data("name"), n = jQuery(this).val(); r(e, "url", n) }), jQuery('.cmp-coming-soon-maintenance .social-inputs input[type="checkbox"]').click(function (e) { jQuery(this).siblings('input[type="text"]').toggleDisabled() }), jQuery(".cmp-coming-soon-maintenance .social-media i").click(function () { var e = jQuery(this).data("name"); jQuery(this).toggleClass("active"), jQuery(".cmp-coming-soon-maintenance .social-inputs li." + e).toggleClass("active"), jQuery(".cmp-coming-soon-maintenance .social-inputs li." + e + " input").trigger("change"), jQuery(this).hasClass("active") ? r(e, "hidden", "0") : r(e, "hidden", "1"), jQuery(".cmp-coming-soon-maintenance .social-media i.active").length ? jQuery(".social-inputs .label").css("display", "block") : jQuery(".cmp-coming-soon-maintenance .social-inputs .label").css("display", "none") }), jQuery(".cmp-coming-soon-maintenance .social-media i.active").length && jQuery(".cmp-coming-soon-maintenance .social-inputs .label").css("display", "block"), jQuery(".cmp.update-theme").click(function (e) { e.preventDefault(); var n = jQuery(this), a = n.parents(".notice"), t = n.data("security"), i = n.data("slug"), o = n.data("name"), r = { action: "cmp_theme_update_install", security: t, file: { name: i, tmp_name: "", url: jQuery(this).data("remote_url") + "?action=download&slug=" + i } }; a.find(".message").html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span class="sr-only">Updating heme...</span><span> working hard on updating Theme...</span>'), jQuery.post(ajaxurl, r, function (e) { if ("success" == (e = e.trim())) setTimeout(function () { a.removeClass("notice-warning").addClass("notice-success"), a.find(".message").html("<span> " + o + ' CMP theme was updated sucessfully! You can enjoy latest features now :) </span><i class="fa fa-smile-o" aria-hidden="true"></i>') }, 1500); else { e = e.slice(0, -1); var n = jQuery("p", jQuery(e)).text(); a.removeClass("notice-warning").addClass("notice-error"), a.find(".message").html('<i class="fa fa-frown-o" aria-hidden="true"></i><span> ' + n + "</span>") } }) }), jQuery(".cmp-coming-soon-maintenance .theme-update.button").one("click", function (e) { e.preventDefault(); var n = jQuery(this), a = n.closest(".theme-wrapper"), t = a.data("security"), i = a.data("slug"), o = { action: "cmp_theme_update_install", security: t, file: { name: i, tmp_name: "", url: a.data("remote_url") + "?action=download&slug=" + i } }; n.html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>'), jQuery.post(ajaxurl, o, function (e) { "success" == e ? setTimeout(function () { n.html('<i class="fa fa-smile-o" aria-hidden="true"></i><span>Updated!</span>'), setTimeout(function () { n.fadeOut() }, 1500) }, 1500) : (e = e.slice(0, -1), n.html('<i class="fa fa-frown-o" aria-hidden="true"></i><span>Update Failed!</span>')) }) }), jQuery(".cmp-coming-soon-maintenance .theme-details").click(function (e) { e.preventDefault(); var n = jQuery(this).closest(".theme-wrapper"), a = n.data("slug"), t = n.data("version"), i = n.data("type"), o = n.data("purchased"), r = 0, c = { action: "niteo_themeinfo", security: jQuery(".theme-wrapper").data("security"), theme_slug: jQuery(this).parents(".theme-wrapper").data("slug") }; jQuery.post(ajaxurl, c, function (e) { var c = "", s = ""; if ("true" == (e = jQuery.parseJSON(e)).result) { if (jQuery("body").addClass("modal-open"), "1" == o && (s = '<span class="theme-version">Installed version: ' + t + "</span>"), "1" != o && "premium" == i) c = '<button type="button" class="theme-purchase button hide"><a href="' + n.find(".cmp-purchase-theme").attr("href") + '" target="_blank"><i class="fa fa-cart-arrow-down" aria-hidden="true"></i>Get Theme</a></button>'; var l = e.screenshots, u = ""; Object.keys(l).length > 1 && (u = '<div class="screenshots-nav"><div class="left"><i class="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 m = jQuery(['<div class="theme-backdrop">', '\t<div class="theme-wrap">', '\t\t<div class="theme-header">', '\t\t\t<button class="close dashicons dashicons-no"><span class="screen-reader-text">Close details dialog</span></button>', "\t\t</div>", '\t\t<div class="theme-about">', '\t\t\t<div class="theme-screenshots">', '\t\t\t\t<div class="screenshot" style="background-image:url(\'' + l[0] + "')\">" + u + "</div>", "\t\t\t</div>", '\t\t\t<div class="theme-info">', '\t\t\t\t<h2 class="theme-name">' + e.name + s + "</h2>", '\t\t\t\t<p class="theme-author">By <a href="' + e.author_homepage + '" target="_blank">' + e.author + "</a></p>", "", c, '\t\t\t\t<div class="theme-description">' + e.description + "</div>", "\t\t\t</div>", "\t\t</div>", '\t\t<div class="theme-actions">', '\t\t\t<a href="https://niteothemes.com/cmp-coming-soon-maintenance/?theme=' + a + "&utm_source=cmp&utm_medium=referral&utm_campaign=" + a + '" class="button cmp-preview" target="_blank" aria-label="Preview ' + e.name + '">Live Preview</a>', "\t\t</div>", "\t</div>", "</div>"].join("\n")); jQuery(".theme-overlay.cmp").append(m), jQuery(".theme-overlay.cmp .close").click(function (e) { e.preventDefault(), jQuery("body").removeClass("modal-open"), jQuery(".theme-overlay.cmp .theme-backdrop").fadeOut("fast") }), jQuery(".screenshots-nav .right").click(function () { ++r == Object.keys(l).length && (r = 0), r in l && jQuery(".screenshot").css("background-image", "url('" + l[r] + "')") }), jQuery(".screenshots-nav .left").click(function () { --r < 0 && (r = Object.keys(l).length - 1), r in l && jQuery(".screenshot").css("background-image", "url('" + l[r] + "')") }) } }) }), jQuery(".cmp-coming-soon-maintenance #connect-mailchimp").click(function (e) { e.preventDefault(); var n = jQuery('.cmp-coming-soon-maintenance input[name="niteoCS_mailchimp_apikey"]').val(), a = jQuery(this).data("security"), t = jQuery(this); if ("" != n) { var i = { apikey: n, security: a }; jQuery(this).prop("disabled", !0), jQuery(this).html('<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span> retrieving lists..</span>'); var o = { action: "cmp_mailchimp_list_ajax", security: a, params: i }; jQuery.post(ajaxurl, o, function (e) { var n = JSON.parse(e); 200 == n.response ? (jQuery("#niteoCS_mailchimp_list").empty().prop("disabled", !1), jQuery.each(n.lists, function (e, n) { jQuery("#niteoCS_mailchimp_list").append('<option value="' + n.id + '">' + n.name + "</option>") })) : jQuery("#niteoCS_mailchimp_list").empty().prop("disabled", !0).html('<option value="error">' + n.message + "</option>").trigger("change"), t.html("Retrieve Lists"), t.prop("disabled", !1) }).fail(function () { t.html("Retrieve Lists"), t.prop("disabled", !1) }) } }), jQuery(".cmp-coming-soon-maintenance .table-wrapper.theme-setup h4").each(function () { if ("Overlay Color" == jQuery(this).html()) return jQuery(this).parents("tr").remove(), !1 }), jQuery(".nav-tab-wrapper").on("click", ".theme-preview", function (e) { return !(jQuery("#csoptions fieldset:not(.skip-preview-validation *)").serialize() != t && !confirm("You have made changes that will not be visible in the preview until you save them. Please save changes first.\nContinue anyway?")) || (e.preventDefault(), !1) }) });
niteo-cmp.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: CMP - Coming Soon & Maintenance Plugin
4
  Plugin URI: https://wordpress.org/plugins/cmp-coming-soon-maintenance/
5
  Description: Display customizable landing page for Coming Soon, Maintenance & Under Construction page.
6
- Version: 3.8.3
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
@@ -63,7 +63,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
63
 
64
  // define constants
65
  private function constants() {
66
- $this->define( 'CMP_VERSION', '3.8.3' );
67
  $this->define( 'CMP_DEBUG', FALSE );
68
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
69
  $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.8.4
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
63
 
64
  // define constants
65
  private function constants() {
66
+ $this->define( 'CMP_VERSION', '3.8.4' );
67
  $this->define( 'CMP_DEBUG', FALSE );
68
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
69
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: coming soon, coming soon page, launch page, maintenance mode, under constr
5
  Requires at least: 3.0
6
  Requires PHP: 5.6
7
  Tested up to: 5.5
8
- Stable tag: 3.8.3
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -154,6 +154,11 @@ https://www.youtube.com/watch?v=uxuJfHzwdtE
154
  <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>
155
 
156
  == Changelog ==
 
 
 
 
 
157
  <h4>CMP 3.8.3 - 05-Aug-20</h4>
158
  <ul>
159
  <li>Resolved bug in Typography settings when font variants did not load correctly.</li>
5
  Requires at least: 3.0
6
  Requires PHP: 5.6
7
  Tested up to: 5.5
8
+ Stable tag: 3.8.4
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
154
  <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>
155
 
156
  == Changelog ==
157
+ <h4>CMP 3.8.4 - 13-Aug-20</h4>
158
+ <ul>
159
+ <li>Resolved issue with not updating Social Icon URL after WordPress update 5.5</li>
160
+ </ul>
161
+
162
  <h4>CMP 3.8.3 - 05-Aug-20</h4>
163
  <ul>
164
  <li>Resolved bug in Typography settings when font variants did not load correctly.</li>