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

Version Description

Download this release

Release Info

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

Code changes from version 3.7.7 to 3.7.8

inc/render/custom-css.php CHANGED
@@ -26,8 +26,12 @@ ob_start(); ?>
26
  .grecaptcha-badge {display: none!important;}
27
  .text-logo {display: inline-block;}
28
  #gdpr-checkbox {-webkit-appearance: checkbox;-moz-appearance: checkbox;width: initial;height: initial;}
 
 
 
29
  </style>
30
 
 
31
  <?php
32
 
33
  // add blur effect if enabled
26
  .grecaptcha-badge {display: none!important;}
27
  .text-logo {display: inline-block;}
28
  #gdpr-checkbox {-webkit-appearance: checkbox;-moz-appearance: checkbox;width: initial;height: initial;}
29
+ #counter.expired {
30
+ display: none;
31
+ }
32
  </style>
33
 
34
+
35
  <?php
36
 
37
  // add blur effect if enabled
inc/render/javascripts.php CHANGED
@@ -452,7 +452,6 @@ if ( $counter_script && get_option('niteoCS_counter', '1') == '1') {
452
 
453
  <?php
454
  if ( $countdown_action === 'redirect' || $countdown_action === 'disable-cmp') { ?>
455
-
456
  if ( count == 0 ) {
457
  fetch( '<?php echo esc_url(admin_url( 'admin-ajax.php' ));?>', {
458
  method: 'POST',
@@ -475,7 +474,7 @@ if ( $counter_script && get_option('niteoCS_counter', '1') == '1') {
475
  }
476
  <?php
477
  } ?>
478
- }
479
  </script>
480
  <?php
481
 
@@ -557,11 +556,18 @@ if ( $counter_script && get_option('niteoCS_counter', '1') == '1') {
557
 
558
  }
559
  <?php
 
 
 
 
 
 
 
 
560
  } ?>
561
 
562
  }, 1000);
563
 
564
-
565
 
566
  });
567
  </script>
452
 
453
  <?php
454
  if ( $countdown_action === 'redirect' || $countdown_action === 'disable-cmp') { ?>
 
455
  if ( count == 0 ) {
456
  fetch( '<?php echo esc_url(admin_url( 'admin-ajax.php' ));?>', {
457
  method: 'POST',
474
  }
475
  <?php
476
  } ?>
477
+ }
478
  </script>
479
  <?php
480
 
556
 
557
  }
558
  <?php
559
+ }
560
+
561
+ if ( $countdown_action === 'hide' ) { ?>
562
+
563
+ if ( distance < 0 ) {
564
+ counter.classList.add('expired');
565
+ clearInterval(timerInt);
566
+ } <?php
567
  } ?>
568
 
569
  }, 1000);
570
 
 
571
 
572
  });
573
  </script>
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.7.7
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.7.7' );
67
  $this->define( 'CMP_DEBUG', FALSE );
68
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
69
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
@@ -817,7 +817,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
817
  $message = __('Counter expired but it is set to make no action - you should login to your Wordpress Admin and adjust the expired timer or disable Coming Soon / Maintenance Mode.', 'cmp-coming-soon-maintenance');
818
  break;
819
  case 'hide':
820
- $message = __('Counter expired and and it is hidden on your website per settings..', 'cmp-coming-soon-maintenance');
821
  break;
822
 
823
  case 'disable-cmp':
@@ -1128,15 +1128,26 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
1128
  */
1129
  public function cmp_disable_comingsoon_ajax() {
1130
 
1131
- check_ajax_referer( 'cmp-coming-soon-maintenance-nonce', 'security' );
 
 
 
 
 
 
 
 
 
 
 
1132
 
1133
  if ( !empty( $_REQUEST['status'] ) && $_REQUEST['status'] === 'disable-cmp' ) {
1134
  update_option('niteoCS_status', '0');
 
 
1135
  }
1136
 
1137
- $this->cmp_purge_cache();
1138
-
1139
- echo json_encode( array( 'message' => 'success') );
1140
  wp_die();
1141
  }
1142
 
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.7.8
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.7.8' );
67
  $this->define( 'CMP_DEBUG', FALSE );
68
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
69
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
817
  $message = __('Counter expired but it is set to make no action - you should login to your Wordpress Admin and adjust the expired timer or disable Coming Soon / Maintenance Mode.', 'cmp-coming-soon-maintenance');
818
  break;
819
  case 'hide':
820
+ $message = __('Counter expired and and it is hidden on your website per settings.', 'cmp-coming-soon-maintenance');
821
  break;
822
 
823
  case 'disable-cmp':
1128
  */
1129
  public function cmp_disable_comingsoon_ajax() {
1130
 
1131
+ $theme = $this->cmp_selectedTheme();
1132
+
1133
+ if ( !in_array( $theme, $this->cmp_builder_themes() ) ) {
1134
+ check_ajax_referer( 'cmp-coming-soon-maintenance-nonce', 'security' );
1135
+ }
1136
+
1137
+ $result = array( 'message' => 'error');
1138
+
1139
+ if ( get_option('niteoCS_countdown_action', 'no-action') !== 'disable-cmp' ) {
1140
+ echo json_encode( $result );
1141
+ wp_die();
1142
+ }
1143
 
1144
  if ( !empty( $_REQUEST['status'] ) && $_REQUEST['status'] === 'disable-cmp' ) {
1145
  update_option('niteoCS_status', '0');
1146
+ $this->cmp_purge_cache();
1147
+ $result = array( 'message' => 'success');
1148
  }
1149
 
1150
+ echo json_encode( $result );
 
 
1151
  wp_die();
1152
  }
1153
 
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.4
8
- Stable tag: 3.7.7
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -154,6 +154,12 @@ 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.7.7 - 02-Jun-20</h4>
158
  <ul>
159
  <li>New Coming Soon theme: Mosaic!</li>
5
  Requires at least: 3.0
6
  Requires PHP: 5.6
7
  Tested up to: 5.4
8
+ Stable tag: 3.7.8
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.7.8 - 27-Jun-20</h4>
158
+ <ul>
159
+ <li>Security update resolving few small security issues.</li>
160
+ <li>Updated code to disable CMP mode for Elementor and Divi add-ons by expired counter.</li>
161
+ </ul>
162
+
163
  <h4>CMP 3.7.7 - 02-Jun-20</h4>
164
  <ul>
165
  <li>New Coming Soon theme: Mosaic!</li>