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

Version Description

Download this release

Release Info

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

Code changes from version 3.6.7 to 3.6.8

inc/render/custom-css.php CHANGED
@@ -1,8 +1,6 @@
1
 
2
  <?php
3
-
4
  $css = '';
5
-
6
  $themeslug = $this->cmp_selectedTheme();
7
 
8
  if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
@@ -20,7 +18,18 @@ if ( isset( $_GET['background'] ) && !empty($_GET['background']) ) {
20
  }
21
 
22
  // add CMP CSS to all themes
23
- ob_start();
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  // add blur effect if enabled
26
  $blur = get_option('niteoCS_effect_blur', '0.0');
@@ -41,17 +50,7 @@ if ( $blur != '0.0' ) {
41
  </style>
42
 
43
  <?php
44
- } ?>
45
-
46
- <style>
47
- /* wp video shortcode */
48
- .wp-video {margin: 0 auto;}
49
- .wp-video-shortcode {max-width: 100%;}
50
- /* google recaptcha badge */
51
- .grecaptcha-badge {display: none;}
52
- </style>
53
-
54
- <?php
55
  if ( get_option('niteoCS_logo_custom_size', '0') !== '0' ) { ?>
56
  <!-- custom logo height -->
57
  <style>
@@ -99,7 +98,9 @@ if ( in_array( $themeslug, $this->cmp_premium_themes_installed() ) ) {
99
 
100
  switch ( $effect ) {
101
  case 'constellation':
102
- case '1': ?>
 
 
103
  <!-- constellation effect -->
104
  <style>
105
  .particles-js-canvas-el {position: absolute; top:0; left:0;}
1
 
2
  <?php
 
3
  $css = '';
 
4
  $themeslug = $this->cmp_selectedTheme();
5
 
6
  if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
18
  }
19
 
20
  // add CMP CSS to all themes
21
+ ob_start(); ?>
22
+
23
+ <style>
24
+ /* wp video shortcode */
25
+ .wp-video {margin: 0 auto;}
26
+ .wp-video-shortcode {max-width: 100%;}
27
+ /* google recaptcha badge */
28
+ .grecaptcha-badge {display: none;}
29
+ .text-logo {display: inline-block;}
30
+ </style>
31
+
32
+ <?php
33
 
34
  // add blur effect if enabled
35
  $blur = get_option('niteoCS_effect_blur', '0.0');
50
  </style>
51
 
52
  <?php
53
+ }
 
 
 
 
 
 
 
 
 
 
54
  if ( get_option('niteoCS_logo_custom_size', '0') !== '0' ) { ?>
55
  <!-- custom logo height -->
56
  <style>
98
 
99
  switch ( $effect ) {
100
  case 'constellation':
101
+ case 'snow':
102
+ case '1':
103
+ case '3': ?>
104
  <!-- constellation effect -->
105
  <style>
106
  .particles-js-canvas-el {position: absolute; top:0; left:0;}
inc/render/javascripts.php CHANGED
@@ -280,9 +280,13 @@ if ( in_array( $themeslug, $this->cmp_premium_themes_installed() ) ) {
280
  $effect = $_GET['effect'];
281
  }
282
 
 
 
283
  switch ( $effect ) {
284
  case 'constellation':
285
- case '1': ?>
 
 
286
  <!-- load external Particles script -->
287
  <script src="//cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
288
  <!-- INI particles -->
@@ -296,8 +300,23 @@ if ( in_array( $themeslug, $this->cmp_premium_themes_installed() ) ) {
296
  var wrapper=document.getElementById("background-wrapper");
297
  var background=(null===wrapper)?"slider-wrapper":"background-wrapper";
298
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  } ?>
300
- particlesJS(background,{particles:{number:{value:100,density:{enable:!0,value_area:1e3}},color:{value:"<?php echo esc_attr( get_option('niteoCS_special_effect[constellation][color]', '#ffffff') );?>"},shape:{type:"circle",stroke:{width:0,color:"#fff"},polygon:{nb_sides:5}},opacity:{value:.6,random:!1,anim:{enable:!1,speed:1,opacity_min:.1,sync:!1}},size:{value:2,random:!0,anim:{enable:!1,speed:40,size_min:.1,sync:!1}},line_linked:{enable:!0,distance:120,color:"<?php echo esc_attr( get_option('niteoCS_special_effect[constellation][color]', '#ffffff') );?>",opacity:.4,width:1}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!0,mode:"grab"},onclick:{enable:!1},resize:!0},modes:{grab:{distance:140,line_linked:{opacity:1}},bubble:{distance:400,size:40,duration:2,opacity:8,speed:3},repulse:{distance:200,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!0});
301
  </script>
302
  <?php
303
  break;
280
  $effect = $_GET['effect'];
281
  }
282
 
283
+ // case numbers for preview
284
+
285
  switch ( $effect ) {
286
  case 'constellation':
287
+ case 'snow':
288
+ case '1':
289
+ case '3': ?>
290
  <!-- load external Particles script -->
291
  <script src="//cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
292
  <!-- INI particles -->
300
  var wrapper=document.getElementById("background-wrapper");
301
  var background=(null===wrapper)?"slider-wrapper":"background-wrapper";
302
  <?php
303
+ }
304
+
305
+ switch ( $effect ) {
306
+ case 'constellation':
307
+ case '1': ?>
308
+ particlesJS(background,{particles:{number:{value:100,density:{enable:!0,value_area:1e3}},color:{value:"<?php echo esc_attr( get_option('niteoCS_special_effect[constellation][color]', '#ffffff') );?>"},shape:{type:"circle",stroke:{width:0,color:"#fff"},polygon:{nb_sides:5}},opacity:{value:.6,random:!1,anim:{enable:!1,speed:1,opacity_min:.1,sync:!1}},size:{value:2,random:!0,anim:{enable:!1,speed:40,size_min:.1,sync:!1}},line_linked:{enable:!0,distance:120,color:"<?php echo esc_attr( get_option('niteoCS_special_effect[constellation][color]', '#ffffff') );?>",opacity:.4,width:1}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!0,mode:"grab"},onclick:{enable:!1},resize:!0},modes:{grab:{distance:140,line_linked:{opacity:1}},bubble:{distance:400,size:40,duration:2,opacity:8,speed:3},repulse:{distance:200,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!0});
309
+ <?php
310
+ break;
311
+ case 'snow':
312
+ case '3': ?>
313
+ particlesJS(background,{particles:{number:{value:52,density:{enable:!0,value_area:631.3280775270874}},color:{value:"<?php echo esc_attr( get_option('niteoCS_special_effect[constellation][color]', '#ffffff') );?>"},shape:{type:"circle",stroke:{width:0,color:"#fff"},polygon:{nb_sides:5},image:{src:"img/github.svg",width:100,height:100}},opacity:{value:.5,random:!0,anim:{enable:!1,speed:1,opacity_min:.1,sync:!1}},size:{value:5,random:!0,anim:{enable:!1,speed:40,size_min:.1,sync:!1}},line_linked:{enable:!1,distance:500,color:"#ffffff",opacity:.4,width:2},move:{enable:!0,speed:1.5,direction:"bottom",random:!1,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:600,rotateY:1200}}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!1,mode:"bubble"},onclick:{enable:!0,mode:"repulse"},resize:!0},modes:{grab:{distance:400,line_linked:{opacity:.5}},bubble:{distance:400,size:4,duration:.3,opacity:1,speed:3},repulse:{distance:200,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!0});
314
+ <?php
315
+ break;
316
+ default:
317
+ break;
318
  } ?>
319
+
320
  </script>
321
  <?php
322
  break;
inc/settings/settings-special_effects.php CHANGED
@@ -37,6 +37,12 @@ $constellation_color = get_option('niteoCS_special_effect[constellation][color]
37
  </label>
38
  </p>
39
 
 
 
 
 
 
 
40
  <p>
41
  <label title="Disabled">
42
  <input type="radio" class="special-effect" name="niteoCS_special_effect" value="disabled" <?php checked( 'disabled', $special_effect );?>>&nbsp;<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
@@ -52,7 +58,7 @@ $constellation_color = get_option('niteoCS_special_effect[constellation][color]
52
 
53
  </fieldset>
54
 
55
- <fieldset class="special-effect-switch constellation bubbles">
56
  <label for="niteoCS_constellation_color"><?php _e('Effect Color', 'cmp-coming-soon-maintenance');?></label><br><br>
57
  <input type="text" name="niteoCS_constellation_color" id="niteoCS_constellation_color" value="<?php echo esc_attr( $constellation_color ); ?>" data-default-color="#ffffff" class="regular-text code"><br>
58
  </fieldset>
37
  </label>
38
  </p>
39
 
40
+ <p>
41
+ <label title="Let It Snow">
42
+ <input type="radio" class="special-effect" name="niteoCS_special_effect" value="snow" <?php checked( 'snow', $special_effect );?>>&nbsp;<?php _e('Let It Snow', 'cmp-coming-soon-maintenance');?>
43
+ </label>
44
+ </p>
45
+
46
  <p>
47
  <label title="Disabled">
48
  <input type="radio" class="special-effect" name="niteoCS_special_effect" value="disabled" <?php checked( 'disabled', $special_effect );?>>&nbsp;<?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
58
 
59
  </fieldset>
60
 
61
+ <fieldset class="special-effect-switch constellation bubbles snow">
62
  <label for="niteoCS_constellation_color"><?php _e('Effect Color', 'cmp-coming-soon-maintenance');?></label><br><br>
63
  <input type="text" name="niteoCS_constellation_color" id="niteoCS_constellation_color" value="<?php echo esc_attr( $constellation_color ); ?>" data-default-color="#ffffff" class="regular-text code"><br>
64
  </fieldset>
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
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
@@ -64,14 +64,14 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_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' );
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
- ( CMP_DEBUG === TRUE ) ? $this->define( 'CMP_UPDATE_URL', 'https://niteothemes.com/updates-test/' ) : $this->define( 'CMP_UPDATE_URL', 'https://niteothemes.com/updates/' );
75
  }
76
 
77
  /**
@@ -621,10 +621,8 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
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 ) {
630
  switch ( $action ) {
@@ -1935,6 +1933,12 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
1935
  global $wp;
1936
  $current_url = trailingslashit( home_url( $wp->request ) );
1937
 
 
 
 
 
 
 
1938
  // get current page IDs
1939
  if ( is_front_page() && is_home() ) {
1940
  // default homepage
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.8
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.8' );
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
+ CMP_DEBUG === TRUE ? $this->define( 'CMP_UPDATE_URL', 'https://niteothemes.com/updates-test/' ) : $this->define( 'CMP_UPDATE_URL', 'https://niteothemes.com/updates/' );
75
  }
76
 
77
  /**
621
  // if timer < timestamp do pre-set action
622
  if ( get_option('niteoCS_counter_date' ) < time() ) {
623
 
 
624
  $action = get_option('niteoCS_countdown_action', 'no-action');
625
 
 
626
  // send notification email if email transient is not set
627
  if ( get_option('niteoCS_countdown_notification', '1') == '1' && get_transient('cmp_counter_email') !== TRUE ) {
628
  switch ( $action ) {
1933
  global $wp;
1934
  $current_url = trailingslashit( home_url( $wp->request ) );
1935
 
1936
+ // return true if ajax request
1937
+ if ( fnmatch( admin_url( 'admin-ajax.php' ), $current_url ) ) {
1938
+ return true;
1939
+ }
1940
+
1941
+
1942
  // get current page IDs
1943
  if ( is_front_page() && is_home() ) {
1944
  // default homepage
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.7
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -147,6 +147,12 @@ 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.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>
5
  Requires at least: 3.0
6
  Requires PHP: 5.6
7
  Tested up to: 5.3
8
+ Stable tag: 3.6.8
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.8 - 16-Dec-19</h4>
151
+ <ul>
152
+ <li>To Celebrate Winter Time we added a beautiful Snowing Effect!</li>
153
+ <li>Admin Ajax is Whitelisted automatically now. That should resolve issues with some 3rd party plugins requiring Ajax.</li>
154
+ </ul>
155
+
156
  <h4>CMP 3.6.7 - 21-Nov-19</h4>
157
  <ul>
158
  <li>Resolved issue with gradient background not displaying correctly in admin settings for Countdown theme. Thanks @isaacmuniz for letting us know!</li>