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

Version Description

Download this release

Release Info

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

Code changes from version 3.6.6 to 3.6.7

inc/settings/settings-background.php CHANGED
@@ -92,6 +92,7 @@ $gradient_array = array(
92
 
93
  <div class="background-thumb-wrapper">
94
  <?php
 
95
  if ( file_exists( $this->cmp_theme_dir( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/img/'.$this->cmp_selectedTheme().'_banner_large.jpg' ) ) {
96
  $src = $this->cmp_themeURL( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/img/'.$this->cmp_selectedTheme().'_banner_large.jpg';
97
  }
92
 
93
  <div class="background-thumb-wrapper">
94
  <?php
95
+ $src = '';
96
  if ( file_exists( $this->cmp_theme_dir( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/img/'.$this->cmp_selectedTheme().'_banner_large.jpg' ) ) {
97
  $src = $this->cmp_themeURL( $this->cmp_selectedTheme() ).$this->cmp_selectedTheme().'/img/'.$this->cmp_selectedTheme().'_banner_large.jpg';
98
  }
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.6
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
@@ -64,7 +64,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
64
 
65
  private function constants() {
66
  // define constants
67
- $this->define( 'CMP_VERSION', '3.6.6' );
68
  $this->define( 'CMP_DEBUG', FALSE );
69
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
70
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
@@ -176,14 +176,17 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
176
  return array('construct', 'countdown', 'hardwork');
177
  }
178
 
179
- /**
180
- * Define CMP Themes Using Countdown scripts
181
- *
182
- * @since 2.8.3
183
- * @return array
184
- */
185
- public function cmp_countdown_themes() {
186
- return array( 'frame', 'countdown', 'postery', 'countdown2', 'stylo', 'element', 'apollo', 'vega', 'agency', 'pluto', 'juno', 'timex' );
 
 
 
187
  }
188
 
189
  /**
@@ -342,6 +345,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
342
  'cmp-settings_page_cmp-upload-theme',
343
  'cmp-settings_page_cmp-help',
344
  'cmp-settings_page_cmp-themes-manager',
 
345
  );
346
 
347
  if ( in_array( $hook, $cmp_pages ) ) {
@@ -601,23 +605,25 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
601
 
602
  // Render CMP Theme mode if is activated and not in immediate redirect mode
603
  if ( $this->cmp_active() == '1' ) {
604
-
605
  // check if user is bypassing roles or current page is on whitelist / blacklist
606
  if ( !$this->cmp_roles_filter() && $this->cmp_page_filter() ) {
607
-
608
  // if themes with countdown timer
609
- if ( in_array($this->cmp_selectedTheme(), $this->cmp_countdown_themes()) ){
610
-
611
  // if counter is enabled - default yes
612
  if ( get_option('niteoCS_counter', '1') == '1' ) {
613
-
614
  // if countdown date is set - default 24 hours
615
  if ( get_option('niteoCS_counter_date' ) && get_option('niteoCS_counter_date' ) != '' ) {
616
-
617
  // if timer < timestamp do pre-set action
618
  if ( get_option('niteoCS_counter_date' ) < time() ) {
 
619
 
620
  $action = get_option('niteoCS_countdown_action', 'no-action');
 
621
 
622
  // send notification email if email transient is not set
623
  if ( get_option('niteoCS_countdown_notification', '1') == '1' && get_transient('cmp_counter_email') !== TRUE ) {
@@ -653,7 +659,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
653
  if ( $action == 'disable-cmp' ) {
654
  update_option('niteoCS_status', '0');
655
  }
656
-
657
  // if action set to redirect
658
  if ( $action == 'redirect' ) {
659
  $redirect_url = esc_url(get_option('niteoCS_countdown_redirect'));
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
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
64
 
65
  private function constants() {
66
  // define constants
67
+ $this->define( 'CMP_VERSION', '3.6.7' );
68
  $this->define( 'CMP_DEBUG', FALSE );
69
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
70
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
176
  return array('construct', 'countdown', 'hardwork');
177
  }
178
 
179
+ public function cmp_theme_supports( $themeslug, $supports ) {
180
+ if ( file_exists($this->cmp_theme_dir( $themeslug ).$themeslug.'/'.$themeslug . '-defaults.php') ) {
181
+ require $this->cmp_theme_dir( $themeslug ).$themeslug.'/'.$themeslug . '-defaults.php';
182
+
183
+ if ( in_array($supports, $theme_supports) ) {
184
+ return true;
185
+ }
186
+ }
187
+
188
+ return false;
189
+
190
  }
191
 
192
  /**
345
  'cmp-settings_page_cmp-upload-theme',
346
  'cmp-settings_page_cmp-help',
347
  'cmp-settings_page_cmp-themes-manager',
348
+ 'cmp-settings_page_cmp-divi-addon',
349
  );
350
 
351
  if ( in_array( $hook, $cmp_pages ) ) {
605
 
606
  // Render CMP Theme mode if is activated and not in immediate redirect mode
607
  if ( $this->cmp_active() == '1' ) {
608
+
609
  // check if user is bypassing roles or current page is on whitelist / blacklist
610
  if ( !$this->cmp_roles_filter() && $this->cmp_page_filter() ) {
611
+
612
  // if themes with countdown timer
613
+ if ( $this->cmp_theme_supports($this->cmp_selectedTheme(), 'counter') ) {
614
+
615
  // if counter is enabled - default yes
616
  if ( get_option('niteoCS_counter', '1') == '1' ) {
617
+
618
  // if countdown date is set - default 24 hours
619
  if ( get_option('niteoCS_counter_date' ) && get_option('niteoCS_counter_date' ) != '' ) {
620
+
621
  // if timer < timestamp do pre-set action
622
  if ( get_option('niteoCS_counter_date' ) < time() ) {
623
+
624
 
625
  $action = get_option('niteoCS_countdown_action', 'no-action');
626
+
627
 
628
  // send notification email if email transient is not set
629
  if ( get_option('niteoCS_countdown_notification', '1') == '1' && get_transient('cmp_counter_email') !== TRUE ) {
659
  if ( $action == 'disable-cmp' ) {
660
  update_option('niteoCS_status', '0');
661
  }
662
+
663
  // if action set to redirect
664
  if ( $action == 'redirect' ) {
665
  $redirect_url = esc_url(get_option('niteoCS_countdown_redirect'));
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.6
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -147,6 +147,11 @@ https://www.youtube.com/watch?v=uxuJfHzwdtE
147
  <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>
148
 
149
  == Changelog ==
 
 
 
 
 
150
  <h4>CMP 3.6.6 - 09-Nov-19</h4>
151
  <ul>
152
  <li>Another new CMP Theme - Delta!</li>
5
  Requires at least: 3.0
6
  Requires PHP: 5.6
7
  Tested up to: 5.3
8
+ Stable tag: 3.6.7
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
147
  <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>
148
 
149
  == Changelog ==
150
+ <h4>CMP 3.6.7 - 21-Nov-19</h4>
151
+ <ul>
152
+ <li>Resolved issue with gradient background not displaying correctly in admin settings for Countdown theme. Thanks @isaacmuniz for letting us know!</li>
153
+ </ul>
154
+
155
  <h4>CMP 3.6.6 - 09-Nov-19</h4>
156
  <ul>
157
  <li>Another new CMP Theme - Delta!</li>
themes/countdown/countdown-defaults.php CHANGED
@@ -29,7 +29,7 @@ if (isset($_POST['niteoCS_social_location']) && $_POST['niteoCS_social_location'
29
 
30
  // get theme defaults
31
  $banner_type = get_option('niteoCS_banner', '2');
32
- $niteoCS_gradient = get_option('niteoCS_gradient['.$themeslug.']', '#1A2980:#26D0CE');
33
  $active_color = get_option('niteoCS_active_color['.$themeslug.']', '#e82e1e');
34
  $font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
35
 
29
 
30
  // get theme defaults
31
  $banner_type = get_option('niteoCS_banner', '2');
32
+ $niteoCS_gradient = get_option('niteoCS_gradient', '#1A2980:#26D0CE');
33
  $active_color = get_option('niteoCS_active_color['.$themeslug.']', '#e82e1e');
34
  $font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
35