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

Version Description

Download this release

Release Info

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

Code changes from version 4.0.1 to 4.0.2

inc/render/javascripts.php CHANGED
@@ -578,8 +578,8 @@ if ( $counter_script && get_option('niteoCS_counter', '1') == '1') {
578
  // Subscribe form script
579
  if ( get_option('niteoCS_subscribe_type', '2') == '2' && ( get_option('niteoCS_inpage_subscribe', '1') || get_option('niteoCS_subscribe_popup', '0')) ) {
580
 
581
- if ( get_option( 'niteoCS_recaptcha_status', '1' ) === '1' ) {
582
- $site_key = get_option('niteoCS_recaptcha_site', '');
583
  echo '<script src="https://www.google.com/recaptcha/api.js?render='.esc_attr($site_key).'" async defer></script>';
584
  }
585
 
578
  // Subscribe form script
579
  if ( get_option('niteoCS_subscribe_type', '2') == '2' && ( get_option('niteoCS_inpage_subscribe', '1') || get_option('niteoCS_subscribe_popup', '0')) ) {
580
 
581
+ $site_key = get_option('niteoCS_recaptcha_site', '');
582
+ if ( get_option( 'niteoCS_recaptcha_status', '1' ) === '1' && !empty($site_key)) {
583
  echo '<script src="https://www.google.com/recaptcha/api.js?render='.esc_attr($site_key).'" async defer></script>';
584
  }
585
 
inc/render/subscribe-form-cmp.php CHANGED
@@ -65,7 +65,7 @@ $popup = $popup ? '-popup' : '';
65
  <form id="subscribe-form<?php echo $popup;?>" method="post" class="cmp-subscribe<?php echo $popup;?>">
66
  <div class="cmp-form-inputs">
67
 
68
- <?php wp_nonce_field('cmp_subscribe','cmp_subscribe_field'); ?>
69
  <?php
70
  // display placeholders or labels
71
  switch ( $label ) {
@@ -188,7 +188,9 @@ submitButton.onclick = function( e ) {
188
  }
189
 
190
  <?php
191
- if ( get_option( 'niteoCS_recaptcha_status', '1' ) === '1' ) { ?>
 
 
192
  // google recaptcha
193
  grecaptcha.ready(function() {
194
  grecaptcha.execute('<?php echo esc_attr($site_key);?>').then(function(token) {
65
  <form id="subscribe-form<?php echo $popup;?>" method="post" class="cmp-subscribe<?php echo $popup;?>">
66
  <div class="cmp-form-inputs">
67
 
68
+ <?php wp_nonce_field('cmp_subscribe','cmp_subscribe_field' . $popup); ?>
69
  <?php
70
  // display placeholders or labels
71
  switch ( $label ) {
188
  }
189
 
190
  <?php
191
+ $site_key = get_option('niteoCS_recaptcha_site', '');
192
+ if ( get_option( 'niteoCS_recaptcha_status', '1' ) === '1' && !empty($site_key)) {
193
+ ?>
194
  // google recaptcha
195
  grecaptcha.ready(function() {
196
  grecaptcha.execute('<?php echo esc_attr($site_key);?>').then(function(token) {
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: 4.0.1
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', '4.0.1' );
67
  $this->define( 'CMP_DEBUG', FALSE );
68
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
69
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
@@ -1654,7 +1654,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
1654
  }
1655
 
1656
  // check recatpcha score if integration is enabled
1657
- if ( get_option( 'niteoCS_recaptcha_status', '1' ) === '1' ) {
1658
  if ( !$this->is_human( sanitize_text_field( $_POST['token'] ) ) ) {
1659
  echo json_encode( array( 'status' => '0', 'message' => 'Sorry, robots not allowed.') );
1660
  wp_die();
3
  Plugin Name: CMP - Coming Soon & Maintenance Plugin
4
  Plugin URI: https://wordpress.org/plugins/cmp-coming-soon-maintenance/
5
  Description: Display customizable landing page for Coming Soon, Maintenance & Under Construction page.
6
+ Version: 4.0.2
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', '4.0.2' );
67
  $this->define( 'CMP_DEBUG', FALSE );
68
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
69
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
1654
  }
1655
 
1656
  // check recatpcha score if integration is enabled
1657
+ if ( get_option( 'niteoCS_recaptcha_status', '1' ) === '1' && !empty(get_option('niteoCS_recaptcha_site', ''))) {
1658
  if ( !$this->is_human( sanitize_text_field( $_POST['token'] ) ) ) {
1659
  echo json_encode( array( 'status' => '0', 'message' => 'Sorry, robots not allowed.') );
1660
  wp_die();
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.6
8
- Stable tag: 4.0.1
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -160,6 +160,11 @@ https://www.youtube.com/watch?v=uxuJfHzwdtE
160
  <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>
161
 
162
  == Changelog ==
 
 
 
 
 
163
  <h4>CMP 4.0.1 - 16-Feb-21</h4>
164
  <ul>
165
  <li>Resolved Cookie Notice compatibility causing errors after Cookie Notice latest update.</li>
5
  Requires at least: 3.0
6
  Requires PHP: 5.6
7
  Tested up to: 5.6
8
+ Stable tag: 4.0.2
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
160
  <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>
161
 
162
  == Changelog ==
163
+ <h4>CMP 4.0.2 - 17-Feb-21</h4>
164
+ <ul>
165
+ <li>Resolved PHP notice error on subscribe form.</li>
166
+ </ul>
167
+
168
  <h4>CMP 4.0.1 - 16-Feb-21</h4>
169
  <ul>
170
  <li>Resolved Cookie Notice compatibility causing errors after Cookie Notice latest update.</li>