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

Version Description

Download this release

Release Info

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

Code changes from version 4.0.0 to 4.0.1

cmp-settings.php CHANGED
@@ -753,11 +753,11 @@ add_thickbox();
753
  }
754
 
755
  // include builders related settings
756
- if ( defined('CMP_ADDONS_VERSION') ) {
757
  if ( $builder_theme && file_exists( $this->cmp_theme_dir( $themeslug ).$themeslug .'/'.$themeslug.'-admin-settings.php' ) ) {
758
  require ( $this->cmp_theme_dir( $themeslug ).$themeslug .'/'.$themeslug.'-admin-settings.php' );
759
  }
760
- } else {
761
  $this->cmp_display_admin_notice('error', false, __('CMP - Bundle & Add-ons Manager must be enabled to access the Customize Settings.'));
762
  }
763
 
753
  }
754
 
755
  // include builders related settings
756
+ if ( defined('CMP_ADDONS_VERSION') && in_array( $this->cmp_selectedTheme(), $this->cmp_builder_themes() ) ) {
757
  if ( $builder_theme && file_exists( $this->cmp_theme_dir( $themeslug ).$themeslug .'/'.$themeslug.'-admin-settings.php' ) ) {
758
  require ( $this->cmp_theme_dir( $themeslug ).$themeslug .'/'.$themeslug.'-admin-settings.php' );
759
  }
760
+ } else if ( in_array( $this->cmp_selectedTheme(), $this->cmp_builder_themes() ) ){
761
  $this->cmp_display_admin_notice('error', false, __('CMP - Bundle & Add-ons Manager must be enabled to access the Customize Settings.'));
762
  }
763
 
inc/class-cmp-render_html.php CHANGED
@@ -337,8 +337,6 @@ class CMP_Coming_Soon_and_Maintenance_Render_HTML extends CMP_Coming_Soon_and_Ma
337
  **/
338
  public function cmp_wp_head() {
339
 
340
-
341
-
342
  // Plugin Name: LiteSpeed Cache
343
  if ( class_exists('LiteSpeed\Core') ) {
344
  define( 'LITESPEED_IS_HTML', true );
@@ -351,50 +349,32 @@ class CMP_Coming_Soon_and_Maintenance_Render_HTML extends CMP_Coming_Soon_and_Ma
351
  }
352
 
353
  // Plugin Name: Cookie Notice
354
- if ( function_exists('cn_cookies_accepted') && get_option('cmp_cookie_notice_comp', '1') === '1' && !cn_cookies_accepted() ) {
355
- // access cookie notice class
356
- $cookie_notice = Cookie_Notice();
357
-
358
- // get cookie notice options private variable
359
- $closure_option = \Closure::bind(function (Cookie_Notice $cookie_notice) {
360
- return $cookie_notice->options;
361
- }, null, Cookie_Notice::class);
362
-
363
- // get cookie notice times private variable
364
- $closure_times = \Closure::bind(function (Cookie_Notice $cookie_notice) {
365
- return $cookie_notice->times;
366
- }, null, Cookie_Notice::class);
367
-
368
- // render required cnArgs js variable
369
- $cn_options = array(
370
- 'ajaxUrl' => admin_url( 'admin-ajax.php' ),
371
- 'nonce' => wp_create_nonce( 'cn_save_cases' ),
372
- 'hideEffect' => $closure_option($cookie_notice)['general']['hide_effect'],
373
- 'position' => $closure_option($cookie_notice)['general']['position'],
374
- 'onScroll' => (string) $closure_option($cookie_notice)['general']['on_scroll'],
375
- 'onScrollOffset' => (string) $closure_option($cookie_notice)['general']['on_scroll_offset'],
376
- 'onClick' => (string) $closure_option($cookie_notice)['general']['on_click'],
377
- 'cookieName' => 'cookie_notice_accepted',
378
- 'cookieTime' => $closure_times($cookie_notice)[$closure_option($cookie_notice)['general']['time']][1],
379
- 'cookieTimeRejected' => $closure_times($cookie_notice)[$closure_option($cookie_notice)['general']['time_rejected']][1],
380
- 'cookiePath' => ( defined( 'COOKIEPATH' ) ? (string) COOKIEPATH : '' ),
381
- 'cookieDomain' => ( defined( 'COOKIE_DOMAIN' ) ? (string) COOKIE_DOMAIN : '' ),
382
- 'redirection' => (string) $closure_option($cookie_notice)['general']['redirection'],
383
- 'cache' => (string) ( defined( 'WP_CACHE' ) && WP_CACHE ),
384
- 'refuse' => (string) $closure_option($cookie_notice)['general']['refuse_opt'],
385
- 'revokeCookies' => (string) $closure_option($cookie_notice)['general']['revoke_cookies'],
386
- 'revokeCookiesOpt' => $closure_option($cookie_notice)['general']['revoke_cookies_opt'],
387
- 'secure' => (string) is_ssl(),
388
- 'coronabarActive' => (string) $closure_option($cookie_notice)['general']['coronabar'],
389
- ); ?>
390
-
391
  <link rel='stylesheet' id='cookie-notice-front-css' href='<?php echo plugins_url();?>/cookie-notice/css/front.min.css' media='all' />
392
-
393
- <script src='<?php echo plugins_url();?>/cookie-notice/js/front.min.js?ver=1.3.2'></script>
394
-
395
- <script>var cnArgs = <?php echo json_encode( $cn_options );?></script>
396
  <?php
397
-
398
  }
399
  }
400
 
337
  **/
338
  public function cmp_wp_head() {
339
 
 
 
340
  // Plugin Name: LiteSpeed Cache
341
  if ( class_exists('LiteSpeed\Core') ) {
342
  define( 'LITESPEED_IS_HTML', true );
349
  }
350
 
351
  // Plugin Name: Cookie Notice
352
+ if ( function_exists('cn_cookies_accepted') && get_option('cmp_cookie_notice_comp', '1') === '1' && !cn_cookies_accepted() ) {
353
+ $options = Cookie_Notice()->options;
354
+ $cnargs = array(
355
+ 'ajaxUrl' => admin_url( 'admin-ajax.php' ),
356
+ 'nonce' => wp_create_nonce( 'cn_save_cases' ),
357
+ 'hideEffect' => $options['general']['hide_effect'],
358
+ 'position' => $options['general']['position'],
359
+ 'onScroll' => (int) $options['general']['on_scroll'],
360
+ 'onScrollOffset' => (int) $options['general']['on_scroll_offset'],
361
+ 'onClick' => (int) $options['general']['on_click'],
362
+ 'cookieName' => 'cookie_notice_accepted',
363
+ 'cookieTime' => Cookie_Notice()->settings->times[$options['general']['time']][1],
364
+ 'cookieTimeRejected' => Cookie_Notice()->settings->times[$options['general']['time_rejected']][1],
365
+ 'cookiePath' => ( defined( 'COOKIEPATH' ) ? (string) COOKIEPATH : '' ),
366
+ 'cookieDomain' => ( defined( 'COOKIE_DOMAIN' ) ? (string) COOKIE_DOMAIN : '' ),
367
+ 'redirection' => (int) $options['general']['redirection'],
368
+ 'cache' => (int) ( defined( 'WP_CACHE' ) && WP_CACHE ),
369
+ 'refuse' => (int) $options['general']['refuse_opt'],
370
+ 'revokeCookies' => (int) $options['general']['revoke_cookies'],
371
+ 'revokeCookiesOpt' => $options['general']['revoke_cookies_opt'],
372
+ 'secure' => (int) is_ssl()
373
+ ); ?>
374
+ <script>var cnArgs = <?php echo json_encode( $cnargs );?></script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
375
  <link rel='stylesheet' id='cookie-notice-front-css' href='<?php echo plugins_url();?>/cookie-notice/css/front.min.css' media='all' />
376
+ <script id='cookie-notice-front-js' src='<?php echo plugins_url();?>/cookie-notice/js/front.min.js?ver=2.0.2'></script>
 
 
 
377
  <?php
 
378
  }
379
  }
380
 
inc/render/footer.php CHANGED
@@ -66,8 +66,10 @@ if ( class_exists('InsertHeadersAndFooters') ) {
66
  }
67
 
68
  // Plugin Name: Cookie Notice
69
- if ( class_exists('Cookie_Notice') && get_option('cmp_cookie_notice_comp', '1') === '1' ) {
70
- $cookie_notice = Cookie_Notice();
 
 
71
  $cookie_notice->add_cookie_notice();
72
  }
73
 
66
  }
67
 
68
  // Plugin Name: Cookie Notice
69
+ if ( class_exists('Cookie_Notice_Frontend') && get_option('cmp_cookie_notice_comp', '1') === '1' ) {
70
+ // access cookie notice class
71
+ $cookie_notice = new Cookie_Notice_Frontend();
72
+
73
  $cookie_notice->add_cookie_notice();
74
  }
75
 
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.0
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.0' );
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: 4.0.1
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.1' );
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.6
8
- Stable tag: 4.0.0
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -160,6 +160,10 @@ 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.0 - 15-Feb-21</h4>
164
  <ul>
165
  <li>New CMP Theme: Titan.</li>
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
  <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>
166
+ </ul>
167
  <h4>CMP 4.0.0 - 15-Feb-21</h4>
168
  <ul>
169
  <li>New CMP Theme: Titan.</li>