Version Description
Download this release
Release Info
Developer | niteo |
Plugin | CMP – Coming Soon & Maintenance Plugin by NiteoThemes |
Version | 3.6.14 |
Comparing to | |
See all releases |
Code changes from version 3.6.13 to 3.6.14
- cmp-sidebar.php +11 -10
- css/cmp-settings-style.css +2 -1
- inc/class-cmp-customizer.php +0 -15
- inc/class-cmp-render_html.php +0 -1
- inc/render/contact-form.php +1 -1
- inc/render/copyright.php +3 -0
- inc/settings/settings-theme-selector.php +1 -1
- js/cmp-advanced.js +6 -0
- js/settings.js +36 -37
- niteo-cmp.php +25 -25
- readme.txt +8 -1
cmp-sidebar.php
CHANGED
@@ -1,23 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<div class="cmp-sidebar-wrapper">
|
2 |
|
3 |
<div class="selected-theme widget">
|
4 |
-
<h3 class="title"><?php _e('Selected CMP Theme', 'cmp-coming-soon-maintenance');?>: <?php echo ucwords( esc_html( str_replace( '_', ' ',
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
</div>
|
9 |
|
10 |
<div class="donate widget">
|
11 |
|
12 |
-
|
13 |
<a href="https://niteothemes.com" target="_blank"><img src="<?php echo plugins_url('/img/niteo.png', __FILE__);?>" alt="Niteo Logo" class="niteo-logo"></a>
|
14 |
<p style="margin-top:0">
|
15 |
<img src="<?php echo plugins_url('/img/alex.jpg', __FILE__);?>" alt="Alex, NiteoThemes">
|
16 |
<img src="<?php echo plugins_url('/img/paul.jpg', __FILE__);?>" alt="Paul, NiteoThemes">
|
17 |
</p>
|
18 |
|
19 |
-
<p><?php echo sprintf(__('If you really love our CMP plugin you can also donate few bucks by clicking Donate button below.', 'cmp-coming-soon-maintenance'), '<i class="fa fa-usd" aria-hidden="true"></i><i class="fa fa-usd" aria-hidden="true"></i><i class="fa fa-usd" aria-hidden="true"></i>');?> <i class="fa fa-smile-o" aria-hidden="true"></i>
|
20 |
-
</p>
|
21 |
|
22 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
23 |
<input type="hidden" name="cmd" value="_s-xclick">
|
@@ -44,13 +48,10 @@
|
|
44 |
|
45 |
</div>
|
46 |
|
47 |
-
|
48 |
<div class="request-feature widget">
|
49 |
<h3 class="cmp-rate-us title"><?php _e('Request new features', 'cmp-coming-soon-maintenance');?></h3>
|
50 |
<p><?php echo sprintf( __('Are you missing a cool feature or do you have idea how to improve CMP plugin? You can %s on official Wordpress Support Forum.', 'cmp-coming-soon-maintenance'), '<a href="http://wordpress.org/support/plugin/cmp-coming-soon-maintenance/" target="_blank" style="text-decoration:none;">request feature</a>' );?> <i class="fa fa-smile-o" aria-hidden="true"></i></p>
|
51 |
|
52 |
</div>
|
53 |
|
54 |
-
|
55 |
-
|
56 |
</div>
|
1 |
+
<?php
|
2 |
+
$slug = $this->cmp_selectedTheme();
|
3 |
+
$thumbnail = plugins_url('/img/thumbnails/'. $slug . '_thumbnail.jpg', __FILE__);
|
4 |
+
// if no thumbnail in CMP plugin folder, check directly in CMP theme folder
|
5 |
+
if ( !file_exists( CMP_PLUGIN_DIR . 'img/thumbnails/'. $slug . '_thumbnail.jpg' ) ) {
|
6 |
+
$thumbnail = $this->cmp_themeURL( $slug ) . $slug . '/img/thumbnail.jpg';
|
7 |
+
} ?>
|
8 |
<div class="cmp-sidebar-wrapper">
|
9 |
|
10 |
<div class="selected-theme widget">
|
11 |
+
<h3 class="title"><?php _e('Selected CMP Theme', 'cmp-coming-soon-maintenance');?>: <?php echo ucwords( esc_html( str_replace( '_', ' ', $slug ) ) );?></h3>
|
12 |
+
<img src="<?php echo esc_url( $thumbnail );?>" style="max-width:100%" alt="">
|
13 |
+
|
|
|
14 |
</div>
|
15 |
|
16 |
<div class="donate widget">
|
17 |
|
|
|
18 |
<a href="https://niteothemes.com" target="_blank"><img src="<?php echo plugins_url('/img/niteo.png', __FILE__);?>" alt="Niteo Logo" class="niteo-logo"></a>
|
19 |
<p style="margin-top:0">
|
20 |
<img src="<?php echo plugins_url('/img/alex.jpg', __FILE__);?>" alt="Alex, NiteoThemes">
|
21 |
<img src="<?php echo plugins_url('/img/paul.jpg', __FILE__);?>" alt="Paul, NiteoThemes">
|
22 |
</p>
|
23 |
|
24 |
+
<p><?php echo sprintf(__('If you really love our CMP plugin you can also donate few bucks by clicking Donate button below.', 'cmp-coming-soon-maintenance'), '<i class="fa fa-usd" aria-hidden="true"></i><i class="fa fa-usd" aria-hidden="true"></i><i class="fa fa-usd" aria-hidden="true"></i>');?> <i class="fa fa-smile-o" aria-hidden="true"></i></p>
|
|
|
25 |
|
26 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
27 |
<input type="hidden" name="cmd" value="_s-xclick">
|
48 |
|
49 |
</div>
|
50 |
|
|
|
51 |
<div class="request-feature widget">
|
52 |
<h3 class="cmp-rate-us title"><?php _e('Request new features', 'cmp-coming-soon-maintenance');?></h3>
|
53 |
<p><?php echo sprintf( __('Are you missing a cool feature or do you have idea how to improve CMP plugin? You can %s on official Wordpress Support Forum.', 'cmp-coming-soon-maintenance'), '<a href="http://wordpress.org/support/plugin/cmp-coming-soon-maintenance/" target="_blank" style="text-decoration:none;">request feature</a>' );?> <i class="fa fa-smile-o" aria-hidden="true"></i></p>
|
54 |
|
55 |
</div>
|
56 |
|
|
|
|
|
57 |
</div>
|
css/cmp-settings-style.css
CHANGED
@@ -169,7 +169,8 @@
|
|
169 |
|
170 |
.cmp-coming-soon-maintenance .cmp-inputs-wrapper,
|
171 |
.cmp-coming-soon-maintenance #csoptions,
|
172 |
-
.cmp-coming-soon-maintenance .cmp-themes-manager
|
|
|
173 |
display: inline-block;
|
174 |
max-width: 1140px;
|
175 |
width: 100%;
|
169 |
|
170 |
.cmp-coming-soon-maintenance .cmp-inputs-wrapper,
|
171 |
.cmp-coming-soon-maintenance #csoptions,
|
172 |
+
.cmp-coming-soon-maintenance .cmp-themes-manager,
|
173 |
+
.cmp-coming-soon-maintenance .cmp-addons {
|
174 |
display: inline-block;
|
175 |
max-width: 1140px;
|
176 |
width: 100%;
|
inc/class-cmp-customizer.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// class cmp_customizer {
|
4 |
-
// public function __construct() {
|
5 |
-
|
6 |
-
// }
|
7 |
-
|
8 |
-
// public function customizer() {
|
9 |
-
// $this->__construct();
|
10 |
-
// }
|
11 |
-
|
12 |
-
// public function render() {
|
13 |
-
// echo 'test';
|
14 |
-
// }
|
15 |
-
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/class-cmp-render_html.php
CHANGED
@@ -24,7 +24,6 @@ class CMP_Coming_Soon_and_Maintenance_Render_HTML extends CMP_Coming_Soon_and_Ma
|
|
24 |
|
25 |
include dirname( __FILE__) . '/render/graphic-slider.php';
|
26 |
|
27 |
-
|
28 |
return;
|
29 |
}
|
30 |
|
24 |
|
25 |
include dirname( __FILE__) . '/render/graphic-slider.php';
|
26 |
|
|
|
27 |
return;
|
28 |
}
|
29 |
|
inc/render/contact-form.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
$form_type = get_option('niteoCS_contact_form_type', 'cf7');
|
4 |
|
5 |
if ( $form_type == 'disabled' ) {
|
1 |
<?php
|
2 |
+
$html = '';
|
3 |
$form_type = get_option('niteoCS_contact_form_type', 'cf7');
|
4 |
|
5 |
if ( $form_type == 'disabled' ) {
|
inc/render/copyright.php
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
if ( get_option( 'niteoCS_copyright', 'Made by <a href="https://niteothemes.com">NiteoThemes</a> with love.' ) !== '' ) {
|
4 |
$copyright = stripslashes( get_option('niteoCS_copyright', 'Made by <a href="https://niteothemes.com">NiteoThemes</a> with love.') );
|
|
|
5 |
$allowed_html = array(
|
6 |
'a' => array(
|
7 |
'href' => array(),
|
1 |
<?php
|
2 |
|
3 |
+
$html = '';
|
4 |
+
|
5 |
if ( get_option( 'niteoCS_copyright', 'Made by <a href="https://niteothemes.com">NiteoThemes</a> with love.' ) !== '' ) {
|
6 |
$copyright = stripslashes( get_option('niteoCS_copyright', 'Made by <a href="https://niteothemes.com">NiteoThemes</a> with love.') );
|
7 |
+
|
8 |
$allowed_html = array(
|
9 |
'a' => array(
|
10 |
'href' => array(),
|
inc/settings/settings-theme-selector.php
CHANGED
@@ -42,7 +42,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
|
42 |
|
43 |
// if no thumbnail in CMP plugin folder, check directly in CMP theme folder
|
44 |
if ( !file_exists( CMP_PLUGIN_DIR . 'img/thumbnails/'. $theme_slug . '_thumbnail.jpg' ) ) {
|
45 |
-
$thumbnail = $this->cmp_themeURL( $
|
46 |
} ?>
|
47 |
|
48 |
<div class="theme-wrapper<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' active'; } ?>" data-security="<?php echo esc_attr($ajax_nonce);?>" data-type="<?php echo esc_attr($type);?>" data-purchased="1" data-slug="<?php echo esc_attr($theme_slug);?>" data-version="<?php echo esc_html($version);?>" data-remote_url="<?php echo esc_url(CMP_UPDATE_URL);?>">
|
42 |
|
43 |
// if no thumbnail in CMP plugin folder, check directly in CMP theme folder
|
44 |
if ( !file_exists( CMP_PLUGIN_DIR . 'img/thumbnails/'. $theme_slug . '_thumbnail.jpg' ) ) {
|
45 |
+
$thumbnail = $this->cmp_themeURL( $theme_slug ) . $theme_slug . '/img/thumbnail.jpg';
|
46 |
} ?>
|
47 |
|
48 |
<div class="theme-wrapper<?php if ( $this->cmp_selectedTheme() == $theme_slug ) { echo ' active'; } ?>" data-security="<?php echo esc_attr($ajax_nonce);?>" data-type="<?php echo esc_attr($type);?>" data-purchased="1" data-slug="<?php echo esc_attr($theme_slug);?>" data-version="<?php echo esc_html($version);?>" data-remote_url="<?php echo esc_url(CMP_UPDATE_URL);?>">
|
js/cmp-advanced.js
CHANGED
@@ -65,6 +65,12 @@ jQuery(document).ready(function($) {
|
|
65 |
navtab(tab);
|
66 |
};
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
toggle_settings('page-whitelist');
|
69 |
toggle_settings('cmp-bypass');
|
70 |
toggle_settings('cmp-topbar-icon');
|
65 |
navtab(tab);
|
66 |
};
|
67 |
|
68 |
+
jQuery(".cmp-coming-soon-maintenance .nav-tab").click(function(e) {
|
69 |
+
e.preventDefault();
|
70 |
+
tab = jQuery(this).data("tab");
|
71 |
+
document.location.hash = tab;
|
72 |
+
});
|
73 |
+
|
74 |
toggle_settings('page-whitelist');
|
75 |
toggle_settings('cmp-bypass');
|
76 |
toggle_settings('cmp-topbar-icon');
|
js/settings.js
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
jQuery(document).ready(function($) {
|
2 |
var tab = document.location.hash.substring(1);
|
3 |
var action = jQuery("#csoptions").attr("action");
|
4 |
-
var settings =
|
5 |
"#csoptions fieldset:not(.skip-preview-validation *)"
|
6 |
).serialize();
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
|
13 |
// function to tab navigation
|
14 |
navtab = function(tab) {
|
@@ -69,12 +69,11 @@ jQuery(document).ready(function($) {
|
|
69 |
tab = document.location.hash.substring(1);
|
70 |
navtab(tab);
|
71 |
};
|
|
|
72 |
|
73 |
-
|
74 |
-
e
|
75 |
-
) {
|
76 |
e.preventDefault();
|
77 |
-
tab =
|
78 |
document.location.hash = tab;
|
79 |
});
|
80 |
|
@@ -226,7 +225,7 @@ jQuery(document).ready(function($) {
|
|
226 |
params: params
|
227 |
};
|
228 |
|
229 |
-
|
230 |
var unsplash = JSON.parse(response);
|
231 |
|
232 |
jQuery("#unsplash_img").remove();
|
@@ -311,10 +310,10 @@ jQuery(document).ready(function($) {
|
|
311 |
return;
|
312 |
}
|
313 |
|
314 |
-
var source =
|
315 |
|
316 |
if (source == "youtube") {
|
317 |
-
var youtubeURL =
|
318 |
".cmp-coming-soon-maintenance #niteoCS-youtube-url"
|
319 |
).val();
|
320 |
|
@@ -346,7 +345,7 @@ jQuery(document).ready(function($) {
|
|
346 |
var videoURL = jQuery("#niteoCS-video-local-id").data("url");
|
347 |
|
348 |
if (videoURL != "") {
|
349 |
-
|
350 |
'<video width="600" height="400" controls><source src="' +
|
351 |
videoURL +
|
352 |
'" type="video/mp4">Your browser does not support the video tag.</video>'
|
@@ -773,18 +772,18 @@ jQuery(document).ready(function($) {
|
|
773 |
// ----------------------- sortable social list -----------------------
|
774 |
// function to update social list
|
775 |
var update_social = function(name, key, val) {
|
776 |
-
var socialmedia =
|
777 |
".cmp-coming-soon-maintenance #niteoCS_socialmedia"
|
778 |
).attr("value");
|
779 |
-
socialmedia =
|
780 |
|
781 |
-
|
782 |
if (ele["name"] == name) {
|
783 |
ele[key] = val;
|
784 |
}
|
785 |
});
|
786 |
|
787 |
-
|
788 |
"value",
|
789 |
JSON.stringify(socialmedia)
|
790 |
);
|
@@ -792,7 +791,7 @@ jQuery(document).ready(function($) {
|
|
792 |
|
793 |
// sortable UI - disabled on Mobile phones - input elements where not clickable...
|
794 |
if (!/Mobi/.test(navigator.userAgent)) {
|
795 |
-
var $sortableList =
|
796 |
|
797 |
var sortEventHandler = function(event, ui) {
|
798 |
var inputs = $sortableList.find('input[type="text"]');
|
@@ -800,7 +799,7 @@ jQuery(document).ready(function($) {
|
|
800 |
var order = ui.item.index();
|
801 |
|
802 |
inputs.each(function(i, ele) {
|
803 |
-
var name =
|
804 |
update_social(name, "order", i);
|
805 |
});
|
806 |
};
|
@@ -814,9 +813,9 @@ jQuery(document).ready(function($) {
|
|
814 |
|
815 |
// social checkbox to enable/disable input
|
816 |
(function($) {
|
817 |
-
|
818 |
return this.each(function() {
|
819 |
-
var $this =
|
820 |
var active;
|
821 |
var name = $this.data("name");
|
822 |
if ($this.attr("disabled")) {
|
@@ -842,7 +841,7 @@ jQuery(document).ready(function($) {
|
|
842 |
jQuery(
|
843 |
'.cmp-coming-soon-maintenance .social-inputs input[type="checkbox"]'
|
844 |
).click(function(e) {
|
845 |
-
var $this =
|
846 |
$this.toggleDisabled();
|
847 |
});
|
848 |
|
@@ -885,7 +884,7 @@ jQuery(document).ready(function($) {
|
|
885 |
// theme update via admin notice
|
886 |
jQuery(".cmp.update-theme").click(function(e) {
|
887 |
e.preventDefault();
|
888 |
-
var $this =
|
889 |
$parent = $this.parents(".notice"),
|
890 |
security = $this.data("security"),
|
891 |
slug = $this.data("slug"),
|
@@ -909,7 +908,7 @@ jQuery(document).ready(function($) {
|
|
909 |
'<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>'
|
910 |
);
|
911 |
|
912 |
-
|
913 |
response = response.trim();
|
914 |
|
915 |
if (response == "success") {
|
@@ -925,7 +924,7 @@ jQuery(document).ready(function($) {
|
|
925 |
}, 1500);
|
926 |
} else {
|
927 |
response = response.slice(0, -1);
|
928 |
-
var error =
|
929 |
$parent.removeClass("notice-warning").addClass("notice-error");
|
930 |
$parent
|
931 |
.find(".message")
|
@@ -943,7 +942,7 @@ jQuery(document).ready(function($) {
|
|
943 |
"click",
|
944 |
function(e) {
|
945 |
e.preventDefault();
|
946 |
-
var $this =
|
947 |
$wrapper = $this.closest(".theme-wrapper"),
|
948 |
security = $wrapper.data("security"),
|
949 |
slug = $wrapper.data("slug"),
|
@@ -965,7 +964,7 @@ jQuery(document).ready(function($) {
|
|
965 |
'<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>'
|
966 |
);
|
967 |
|
968 |
-
|
969 |
if (response == "success") {
|
970 |
setTimeout(function() {
|
971 |
$this.html(
|
@@ -988,7 +987,7 @@ jQuery(document).ready(function($) {
|
|
988 |
// display theme details overlay
|
989 |
jQuery(".cmp-coming-soon-maintenance .theme-details").click(function(e) {
|
990 |
e.preventDefault();
|
991 |
-
var $this =
|
992 |
$wrapper = $this.closest(".theme-wrapper"),
|
993 |
slug = $wrapper.data("slug"),
|
994 |
version = $wrapper.data("version"),
|
@@ -1004,7 +1003,7 @@ jQuery(document).ready(function($) {
|
|
1004 |
.data("slug")
|
1005 |
};
|
1006 |
|
1007 |
-
|
1008 |
var buyButton = "";
|
1009 |
var versionInfo = "";
|
1010 |
var noticeHtml = "";
|
@@ -1039,7 +1038,7 @@ jQuery(document).ready(function($) {
|
|
1039 |
}
|
1040 |
|
1041 |
// generate html to append to theme-overlay
|
1042 |
-
var html =
|
1043 |
[
|
1044 |
'<div class="theme-backdrop">',
|
1045 |
' <div class="theme-wrap">',
|
@@ -1279,20 +1278,20 @@ jQuery(document).ready(function($) {
|
|
1279 |
params: params
|
1280 |
};
|
1281 |
|
1282 |
-
|
1283 |
var lists = JSON.parse(response);
|
1284 |
|
1285 |
if (lists.response == 200) {
|
1286 |
-
|
1287 |
.empty()
|
1288 |
.prop("disabled", false);
|
1289 |
-
|
1290 |
-
|
1291 |
'<option value="' + val.id + '">' + val.name + "</option>"
|
1292 |
);
|
1293 |
});
|
1294 |
} else {
|
1295 |
-
|
1296 |
.empty()
|
1297 |
.prop("disabled", true)
|
1298 |
.html('<option value="error">' + lists.message + "</option>")
|
@@ -1386,9 +1385,9 @@ jQuery(document).ready(function($) {
|
|
1386 |
);
|
1387 |
|
1388 |
// warn users about unsaved changes for preview
|
1389 |
-
|
1390 |
if (
|
1391 |
-
|
1392 |
settings
|
1393 |
) {
|
1394 |
if (
|
1 |
jQuery(document).ready(function($) {
|
2 |
var tab = document.location.hash.substring(1);
|
3 |
var action = jQuery("#csoptions").attr("action");
|
4 |
+
var settings = jQuery(
|
5 |
"#csoptions fieldset:not(.skip-preview-validation *)"
|
6 |
).serialize();
|
7 |
|
8 |
+
// ini custom css textarea to codeEditor
|
9 |
+
if ( wp.codeEditor && jQuery('#niteoCS_custom_css').length ) {
|
10 |
+
wp.codeEditor.initialize("niteoCS_custom_css");
|
11 |
+
}
|
12 |
|
13 |
// function to tab navigation
|
14 |
navtab = function(tab) {
|
69 |
tab = document.location.hash.substring(1);
|
70 |
navtab(tab);
|
71 |
};
|
72 |
+
|
73 |
|
74 |
+
jQuery(".cmp-coming-soon-maintenance .nav-tab:not(.theme-preview)").click(function(e) {
|
|
|
|
|
75 |
e.preventDefault();
|
76 |
+
tab = jQuery(this).data("tab");
|
77 |
document.location.hash = tab;
|
78 |
});
|
79 |
|
225 |
params: params
|
226 |
};
|
227 |
|
228 |
+
jQuery.post(ajaxurl, data, function(response) {
|
229 |
var unsplash = JSON.parse(response);
|
230 |
|
231 |
jQuery("#unsplash_img").remove();
|
310 |
return;
|
311 |
}
|
312 |
|
313 |
+
var source = jQuery(".cmp-coming-soon-maintenance .banner-video-source").val();
|
314 |
|
315 |
if (source == "youtube") {
|
316 |
+
var youtubeURL = jQuery(
|
317 |
".cmp-coming-soon-maintenance #niteoCS-youtube-url"
|
318 |
).val();
|
319 |
|
345 |
var videoURL = jQuery("#niteoCS-video-local-id").data("url");
|
346 |
|
347 |
if (videoURL != "") {
|
348 |
+
jQuery(".cmp-coming-soon-maintenance .video-local-wrapper").html(
|
349 |
'<video width="600" height="400" controls><source src="' +
|
350 |
videoURL +
|
351 |
'" type="video/mp4">Your browser does not support the video tag.</video>'
|
772 |
// ----------------------- sortable social list -----------------------
|
773 |
// function to update social list
|
774 |
var update_social = function(name, key, val) {
|
775 |
+
var socialmedia = jQuery(
|
776 |
".cmp-coming-soon-maintenance #niteoCS_socialmedia"
|
777 |
).attr("value");
|
778 |
+
socialmedia = jQuery.parseJSON(socialmedia);
|
779 |
|
780 |
+
jQuery.each(socialmedia, function(i, ele) {
|
781 |
if (ele["name"] == name) {
|
782 |
ele[key] = val;
|
783 |
}
|
784 |
});
|
785 |
|
786 |
+
jQuery(".cmp-coming-soon-maintenance #niteoCS_socialmedia").attr(
|
787 |
"value",
|
788 |
JSON.stringify(socialmedia)
|
789 |
);
|
791 |
|
792 |
// sortable UI - disabled on Mobile phones - input elements where not clickable...
|
793 |
if (!/Mobi/.test(navigator.userAgent)) {
|
794 |
+
var $sortableList = jQuery(".cmp-coming-soon-maintenance .social-inputs");
|
795 |
|
796 |
var sortEventHandler = function(event, ui) {
|
797 |
var inputs = $sortableList.find('input[type="text"]');
|
799 |
var order = ui.item.index();
|
800 |
|
801 |
inputs.each(function(i, ele) {
|
802 |
+
var name = jQuery(ele).data("name");
|
803 |
update_social(name, "order", i);
|
804 |
});
|
805 |
};
|
813 |
|
814 |
// social checkbox to enable/disable input
|
815 |
(function($) {
|
816 |
+
jQuery.fn.toggleDisabled = function() {
|
817 |
return this.each(function() {
|
818 |
+
var $this = jQuery(this);
|
819 |
var active;
|
820 |
var name = $this.data("name");
|
821 |
if ($this.attr("disabled")) {
|
841 |
jQuery(
|
842 |
'.cmp-coming-soon-maintenance .social-inputs input[type="checkbox"]'
|
843 |
).click(function(e) {
|
844 |
+
var $this = jQuery(this).siblings('input[type="text"]');
|
845 |
$this.toggleDisabled();
|
846 |
});
|
847 |
|
884 |
// theme update via admin notice
|
885 |
jQuery(".cmp.update-theme").click(function(e) {
|
886 |
e.preventDefault();
|
887 |
+
var $this = jQuery(this),
|
888 |
$parent = $this.parents(".notice"),
|
889 |
security = $this.data("security"),
|
890 |
slug = $this.data("slug"),
|
908 |
'<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>'
|
909 |
);
|
910 |
|
911 |
+
jQuery.post(ajaxurl, data, function(response) {
|
912 |
response = response.trim();
|
913 |
|
914 |
if (response == "success") {
|
924 |
}, 1500);
|
925 |
} else {
|
926 |
response = response.slice(0, -1);
|
927 |
+
var error = jQuery("p", jQuery(response)).text();
|
928 |
$parent.removeClass("notice-warning").addClass("notice-error");
|
929 |
$parent
|
930 |
.find(".message")
|
942 |
"click",
|
943 |
function(e) {
|
944 |
e.preventDefault();
|
945 |
+
var $this = jQuery(this),
|
946 |
$wrapper = $this.closest(".theme-wrapper"),
|
947 |
security = $wrapper.data("security"),
|
948 |
slug = $wrapper.data("slug"),
|
964 |
'<i class="fa fa-cog fa-spin fa-1x fa-fw"></i><span>Updating..</span>'
|
965 |
);
|
966 |
|
967 |
+
jQuery.post(ajaxurl, data, function(response) {
|
968 |
if (response == "success") {
|
969 |
setTimeout(function() {
|
970 |
$this.html(
|
987 |
// display theme details overlay
|
988 |
jQuery(".cmp-coming-soon-maintenance .theme-details").click(function(e) {
|
989 |
e.preventDefault();
|
990 |
+
var $this = jQuery(this),
|
991 |
$wrapper = $this.closest(".theme-wrapper"),
|
992 |
slug = $wrapper.data("slug"),
|
993 |
version = $wrapper.data("version"),
|
1003 |
.data("slug")
|
1004 |
};
|
1005 |
|
1006 |
+
jQuery.post(ajaxurl, data, function(response) {
|
1007 |
var buyButton = "";
|
1008 |
var versionInfo = "";
|
1009 |
var noticeHtml = "";
|
1038 |
}
|
1039 |
|
1040 |
// generate html to append to theme-overlay
|
1041 |
+
var html = jQuery(
|
1042 |
[
|
1043 |
'<div class="theme-backdrop">',
|
1044 |
' <div class="theme-wrap">',
|
1278 |
params: params
|
1279 |
};
|
1280 |
|
1281 |
+
jQuery.post(ajaxurl, data, function(response) {
|
1282 |
var lists = JSON.parse(response);
|
1283 |
|
1284 |
if (lists.response == 200) {
|
1285 |
+
jQuery("#niteoCS_mailchimp_list")
|
1286 |
.empty()
|
1287 |
.prop("disabled", false);
|
1288 |
+
jQuery.each(lists.lists, function(i, val) {
|
1289 |
+
jQuery("#niteoCS_mailchimp_list").append(
|
1290 |
'<option value="' + val.id + '">' + val.name + "</option>"
|
1291 |
);
|
1292 |
});
|
1293 |
} else {
|
1294 |
+
jQuery("#niteoCS_mailchimp_list")
|
1295 |
.empty()
|
1296 |
.prop("disabled", true)
|
1297 |
.html('<option value="error">' + lists.message + "</option>")
|
1385 |
);
|
1386 |
|
1387 |
// warn users about unsaved changes for preview
|
1388 |
+
jQuery(".nav-tab-wrapper").on("click", ".theme-preview", function(e) {
|
1389 |
if (
|
1390 |
+
jQuery("#csoptions fieldset:not(.skip-preview-validation *)").serialize() !=
|
1391 |
settings
|
1392 |
) {
|
1393 |
if (
|
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.6.
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
@@ -61,18 +61,22 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
|
|
61 |
return self::$instance;
|
62 |
}
|
63 |
|
|
|
|
|
64 |
|
|
|
65 |
private function constants() {
|
66 |
-
|
67 |
-
$this->define( 'CMP_VERSION', '3.6.13' );
|
68 |
$this->define( 'CMP_DEBUG', FALSE );
|
69 |
$this->define( 'CMP_AUTHOR', 'NiteoThemes' );
|
70 |
$this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
|
71 |
$this->define( 'CMP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
72 |
$this->define( 'CMP_PREMIUM_THEMES_DIR', plugin_dir_path( __DIR__ ) . 'cmp-premium-themes/' );
|
73 |
$this->define( 'CMP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
74 |
-
|
75 |
-
CMP_DEBUG === TRUE
|
|
|
|
|
76 |
}
|
77 |
|
78 |
/**
|
@@ -80,11 +84,9 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
|
|
80 |
*/
|
81 |
public function init() {
|
82 |
add_action( 'template_redirect', array( $this, 'cmp_displayPage' ), 1 );
|
83 |
-
// add_action( 'login_init', array( $this, 'cmp_admin_override' ) );
|
84 |
-
// add_action( 'admin_init', array( $this, 'cmp_admin_override' ) );
|
85 |
add_action( 'admin_init', array( $this, 'cmp_adminInit' ) ) ;
|
86 |
add_action( 'admin_init', array( $this, 'cmp_update_process' ), 0 );
|
87 |
-
add_action( 'admin_menu', array( $this, 'cmp_adminMenu' )
|
88 |
add_action( 'admin_notices', array( $this, 'cmp_admin_notice' ) );
|
89 |
add_action( 'wp_before_admin_bar_render', array( $this, 'cmp_admin_bar' ) );
|
90 |
add_action( 'admin_enqueue_scripts', array( $this,'cmp_add_topbar_scripts' ) );
|
@@ -543,21 +545,10 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
|
|
543 |
return;
|
544 |
}
|
545 |
|
546 |
-
// if CMP in redirect mode with 0 timeout, die early with redirect
|
547 |
-
if ( $this->cmp_mode() == 3 && get_option('niteoCS_redirect_time') == 0 ) {
|
548 |
-
|
549 |
-
$redirect_url = get_option('niteoCS_URL_redirect');
|
550 |
-
// redirect to URL
|
551 |
-
if ( $redirect_url != '' ) {
|
552 |
-
header('Location: '.esc_url( $redirect_url ));
|
553 |
-
die();
|
554 |
-
}
|
555 |
-
}
|
556 |
-
|
557 |
// bypass CMP and set cookie for user defined period of time, if bypass is enabled, bypass ID is set, and match CMP bypass settings
|
558 |
if ( isset( $_GET['cmp_bypass'] ) && $_GET['cmp_bypass'] == get_option('niteoCS_bypass_id', md5( get_home_url() )) && get_option('niteoCS_bypass', '0') == '1' ) {
|
559 |
-
|
560 |
-
|
561 |
setcookie('cmp_bypass', get_option('niteoCS_bypass_id', md5( get_home_url() ) ), time() + get_option('niteoCS_bypass_expire', '172800'));
|
562 |
// exit CMP
|
563 |
return;
|
@@ -569,6 +560,18 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
|
|
569 |
return;
|
570 |
}
|
571 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
572 |
// check for mailpoptin ajax
|
573 |
if ( isset($_GET['mailoptin-ajax']) ) {
|
574 |
|
@@ -581,8 +584,6 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
|
|
581 |
|
582 |
}
|
583 |
|
584 |
-
|
585 |
-
|
586 |
// if themes with countdown timer
|
587 |
if ( $this->cmp_theme_supports( $theme, 'counter' ) ) {
|
588 |
|
@@ -1006,7 +1007,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
|
|
1006 |
return;
|
1007 |
}
|
1008 |
|
1009 |
-
public function cmp_theme_upload($
|
1010 |
// allow zip file to upload
|
1011 |
add_filter('upload_mimes', array( $this, 'cmp_allow_mimes') );
|
1012 |
|
@@ -1015,7 +1016,6 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
|
|
1015 |
require_once realpath('../../../wp-admin/includes/file.php');
|
1016 |
}
|
1017 |
|
1018 |
-
$uploadedfile = $zip;
|
1019 |
$filename = $uploadedfile['name'];
|
1020 |
/* You can use wp_check_filetype() public function to check the
|
1021 |
file type and go on wit the upload or stop it.*/
|
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.6.14
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
61 |
return self::$instance;
|
62 |
}
|
63 |
|
64 |
+
|
65 |
+
|
66 |
|
67 |
+
// define constants
|
68 |
private function constants() {
|
69 |
+
$this->define( 'CMP_VERSION', '3.6.14' );
|
|
|
70 |
$this->define( 'CMP_DEBUG', FALSE );
|
71 |
$this->define( 'CMP_AUTHOR', 'NiteoThemes' );
|
72 |
$this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
|
73 |
$this->define( 'CMP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
74 |
$this->define( 'CMP_PREMIUM_THEMES_DIR', plugin_dir_path( __DIR__ ) . 'cmp-premium-themes/' );
|
75 |
$this->define( 'CMP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
76 |
+
$this->define( 'CMP_UPDATE_URL', 'https://niteothemes.com/updates/' );
|
77 |
+
CMP_DEBUG === TRUE
|
78 |
+
? $this->define( 'CMP_LICENSE_SERVER_URL', 'https://niteothemes.com/dev2/' )
|
79 |
+
: $this->define( 'CMP_LICENSE_SERVER_URL', 'https://niteothemes.com/' );
|
80 |
}
|
81 |
|
82 |
/**
|
84 |
*/
|
85 |
public function init() {
|
86 |
add_action( 'template_redirect', array( $this, 'cmp_displayPage' ), 1 );
|
|
|
|
|
87 |
add_action( 'admin_init', array( $this, 'cmp_adminInit' ) ) ;
|
88 |
add_action( 'admin_init', array( $this, 'cmp_update_process' ), 0 );
|
89 |
+
add_action( 'admin_menu', array( $this, 'cmp_adminMenu' ) );
|
90 |
add_action( 'admin_notices', array( $this, 'cmp_admin_notice' ) );
|
91 |
add_action( 'wp_before_admin_bar_render', array( $this, 'cmp_admin_bar' ) );
|
92 |
add_action( 'admin_enqueue_scripts', array( $this,'cmp_add_topbar_scripts' ) );
|
545 |
return;
|
546 |
}
|
547 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
548 |
// bypass CMP and set cookie for user defined period of time, if bypass is enabled, bypass ID is set, and match CMP bypass settings
|
549 |
if ( isset( $_GET['cmp_bypass'] ) && $_GET['cmp_bypass'] == get_option('niteoCS_bypass_id', md5( get_home_url() )) && get_option('niteoCS_bypass', '0') == '1' ) {
|
550 |
+
nocache_headers();
|
551 |
+
header('Cache-Control: max-age=0; private');
|
552 |
setcookie('cmp_bypass', get_option('niteoCS_bypass_id', md5( get_home_url() ) ), time() + get_option('niteoCS_bypass_expire', '172800'));
|
553 |
// exit CMP
|
554 |
return;
|
560 |
return;
|
561 |
}
|
562 |
|
563 |
+
// if CMP in redirect mode with 0 timeout, die early with redirect
|
564 |
+
if ( $this->cmp_mode() == 3 && get_option('niteoCS_redirect_time') == 0 ) {
|
565 |
+
|
566 |
+
$redirect_url = get_option('niteoCS_URL_redirect');
|
567 |
+
// redirect to URL
|
568 |
+
if ( $redirect_url != '' ) {
|
569 |
+
header('Location: '.esc_url( $redirect_url ));
|
570 |
+
die();
|
571 |
+
}
|
572 |
+
}
|
573 |
+
|
574 |
+
|
575 |
// check for mailpoptin ajax
|
576 |
if ( isset($_GET['mailoptin-ajax']) ) {
|
577 |
|
584 |
|
585 |
}
|
586 |
|
|
|
|
|
587 |
// if themes with countdown timer
|
588 |
if ( $this->cmp_theme_supports( $theme, 'counter' ) ) {
|
589 |
|
1007 |
return;
|
1008 |
}
|
1009 |
|
1010 |
+
public function cmp_theme_upload($uploadedfile) {
|
1011 |
// allow zip file to upload
|
1012 |
add_filter('upload_mimes', array( $this, 'cmp_allow_mimes') );
|
1013 |
|
1016 |
require_once realpath('../../../wp-admin/includes/file.php');
|
1017 |
}
|
1018 |
|
|
|
1019 |
$filename = $uploadedfile['name'];
|
1020 |
/* You can use wp_check_filetype() public function to check the
|
1021 |
file type and go on wit the upload or stop it.*/
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: coming soon, landing page, launch page, maintenance mode, under constructi
|
|
5 |
Requires at least: 3.0
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.3
|
8 |
-
Stable tag: 3.6.
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -149,6 +149,13 @@ https://www.youtube.com/watch?v=uxuJfHzwdtE
|
|
149 |
<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>
|
150 |
|
151 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
<h4>CMP 3.6.13 - 09-Jan-20</h4>
|
153 |
<ul>
|
154 |
<li>Background YouTube video now supports starting time parameter.</li>
|
5 |
Requires at least: 3.0
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.3
|
8 |
+
Stable tag: 3.6.14
|
9 |
License: GPLv2 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
149 |
<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>
|
150 |
|
151 |
== Changelog ==
|
152 |
+
<h4>CMP 3.6.14 - 07-Feb-20</h4>
|
153 |
+
<ul>
|
154 |
+
<li>CMP Redirect mode now works as expected together with Bypass URL.</li>
|
155 |
+
<li>Resolved few unresolved PHP notices. @wecodify thanks!</li>
|
156 |
+
</ul>
|
157 |
+
|
158 |
+
|
159 |
<h4>CMP 3.6.13 - 09-Jan-20</h4>
|
160 |
<ul>
|
161 |
<li>Background YouTube video now supports starting time parameter.</li>
|