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

Version Description

Download this release

Release Info

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

Code changes from version 3.4.8 to 3.4.9

inc/class-cmp-render_html.php CHANGED
@@ -501,14 +501,20 @@ class CMP_Coming_Soon_and_Maintenance_Render_HTML extends CMP_Coming_Soon_and_Ma
501
  // change saved settings for CMP preview
502
  if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
503
  $theme = esc_attr( $_GET['theme'] );
 
504
  switch ( $theme ) {
505
- case 'fifty':
506
- case 'vega':
507
- $opacity = '0';
508
- break;
509
  case 'apollo':
 
 
 
510
  $color = '#ffffff';
511
  break;
 
 
 
 
 
 
512
  default:
513
  break;
514
  }
@@ -636,6 +642,7 @@ class CMP_Coming_Soon_and_Maintenance_Render_HTML extends CMP_Coming_Soon_and_Ma
636
 
637
  // Render Logo
638
  public function cmp_logo( $themeslug, $class = '' ) {
 
639
  $logo_type = get_option('niteoCS_logo_type', 'text');
640
 
641
  if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
@@ -649,16 +656,16 @@ class CMP_Coming_Soon_and_Maintenance_Render_HTML extends CMP_Coming_Soon_and_Ma
649
  case 'agency':
650
  case 'mercury':
651
  case 'stylo':
652
- case 'apollo':
653
  $logo_type = 'text';
654
  break;
655
 
656
  case 'hardwork_premium':
657
  case 'fifty':
658
  case 'element':
659
- case 'countdown':
660
  case 'pluto':
661
  case 'juno':
 
662
  case 'ares':
663
  $logo_type = 'graphic';
664
  break;
@@ -688,6 +695,10 @@ class CMP_Coming_Soon_and_Maintenance_Render_HTML extends CMP_Coming_Soon_and_Ma
688
  $logo_id = '72';
689
  break;
690
 
 
 
 
 
691
  case 'ares':
692
  $logo_id = '101';
693
  break;
@@ -1622,8 +1633,25 @@ class CMP_Coming_Soon_and_Maintenance_Render_HTML extends CMP_Coming_Soon_and_Ma
1622
 
1623
  // SLIDER SCRIPTS FOR UNSPLASH or Custom IMAGES
1624
  case '0':
1625
- case '1':
1626
- if ( get_option('niteoCS_slider', '0') == 1 ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1627
  $slider_effect = get_option('niteoCS_slider_effect', 'true');
1628
  $slider_autoplay = get_option('niteoCS_slider_auto', '1');
1629
 
501
  // change saved settings for CMP preview
502
  if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
503
  $theme = esc_attr( $_GET['theme'] );
504
+
505
  switch ( $theme ) {
 
 
 
 
506
  case 'apollo':
507
+ case 'element':
508
+ $overlay = 'solid-color';
509
+ $opacity = '0.5';
510
  $color = '#ffffff';
511
  break;
512
+
513
+ case 'hardwork_premium':
514
+ $overlay = 'solid-color';
515
+ $opacity = '0.3';
516
+ $color = '#000000';
517
+ break;
518
  default:
519
  break;
520
  }
642
 
643
  // Render Logo
644
  public function cmp_logo( $themeslug, $class = '' ) {
645
+
646
  $logo_type = get_option('niteoCS_logo_type', 'text');
647
 
648
  if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
656
  case 'agency':
657
  case 'mercury':
658
  case 'stylo':
659
+ case 'countdown':
660
  $logo_type = 'text';
661
  break;
662
 
663
  case 'hardwork_premium':
664
  case 'fifty':
665
  case 'element':
 
666
  case 'pluto':
667
  case 'juno':
668
+ case 'apollo':
669
  case 'ares':
670
  $logo_type = 'graphic';
671
  break;
695
  $logo_id = '72';
696
  break;
697
 
698
+ case 'hardwork_premium':
699
+ $logo_id = '15';
700
+ break;
701
+
702
  case 'ares':
703
  $logo_id = '101';
704
  break;
1633
 
1634
  // SLIDER SCRIPTS FOR UNSPLASH or Custom IMAGES
1635
  case '0':
1636
+ case '1':
1637
+ $slider = get_option('niteoCS_slider', '0');
1638
+ // change to slider, if theme preview specific themes
1639
+ if ( isset($_GET['theme']) && !empty($_GET['theme']) && isset($_GET['background']) && $_GET['background'] == 1 ) {
1640
+
1641
+ $theme = esc_attr( $_GET['theme'] );
1642
+ switch ( $theme ) {
1643
+ case 'fifty':
1644
+ case 'stylo':
1645
+ case 'apollo':
1646
+ case 'hardwork_premium':
1647
+ case 'ares':
1648
+ $slider = '1';
1649
+ break;
1650
+ default:
1651
+ break;
1652
+ }
1653
+ }
1654
+ if ( $slider == '1' ) {
1655
  $slider_effect = get_option('niteoCS_slider_effect', 'true');
1656
  $slider_autoplay = get_option('niteoCS_slider_auto', '1');
1657
 
inc/settings/settings-slider-disabled.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
  ?>
4
- <div class="table-wrapper content slider wrapper-disabled">
5
  <h3><?php _e('Image Slider Setup', 'cmp-coming-soon-maintenance');?></h3>
6
- <table class="theme-setup slider">
7
  <tr>
8
  <th>
9
  <fieldset>
1
  <?php
2
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
3
  ?>
4
+ <div class="table-wrapper content wrapper-disabled">
5
  <h3><?php _e('Image Slider Setup', 'cmp-coming-soon-maintenance');?></h3>
6
+ <table class="theme-setup">
7
  <tr>
8
  <th>
9
  <fieldset>
inc/settings/settings-slider.php CHANGED
@@ -30,9 +30,9 @@ $niteoCS_slider_auto = get_option('niteoCS_slider_auto', '1');
30
 
31
  ?>
32
 
33
- <div class="table-wrapper content slider">
34
  <h3><?php _e('Image Slider Setup', 'cmp-coming-soon-maintenance');?></h3>
35
- <table class="theme-setup slider">
36
  <tr>
37
  <th>
38
  <fieldset>
30
 
31
  ?>
32
 
33
+ <div class="table-wrapper content">
34
  <h3><?php _e('Image Slider Setup', 'cmp-coming-soon-maintenance');?></h3>
35
+ <table class="theme-setup">
36
  <tr>
37
  <th>
38
  <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.4.8
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
@@ -65,7 +65,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
65
 
66
  private function constants() {
67
  // define constants
68
- $this->define( 'CMP_VERSION', '3.4.8' );
69
  $this->define( 'CMP_DEBUG', FALSE );
70
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
71
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
@@ -95,8 +95,9 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
95
  add_action( 'admin_init', array( $this, 'cmp_adminInit' ) ) ;
96
  add_action( 'admin_init', array( $this, 'cmp_admin_override' ) );
97
  add_action( 'admin_init', array( $this, 'cmp_update_process' ), 0 );
 
98
  add_action( 'admin_enqueue_scripts', array( $this,'cmp_add_admin_style' ) );
99
- add_action( 'wp_enqueue_scripts', array( $this,'cmp_add_admin_style' ) );
100
  add_action( 'wp_ajax_cmp_get_post_detail', array( $this, 'cmp_get_post_detail' ) );
101
  add_action( 'wp_ajax_nopriv_cmp_get_post_detail', array( $this, 'cmp_get_post_detail' ) );
102
  add_action( 'wp_ajax_cmp_check_update', array( $this, 'cmp_check_update' ) );
@@ -138,17 +139,14 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
138
  require_once('inc/class-cmp-render_settings.php');
139
 
140
  $this->render_settings = new cmp_render_settings();
141
-
142
- if ( function_exists( 'wp_enqueue_code_editor' ) ) {
143
- wp_enqueue_code_editor( array( 'type' => 'text/css' ) );
144
- }
145
-
146
  wp_register_style( 'cmp-style', plugins_url('/css/cmp-settings-style'.CMP_ASSET_SUFFIX.'.css', __FILE__),'', CMP_VERSION );
147
- wp_enqueue_style( 'cmp-style' );
148
  wp_register_style( 'font_awesome', plugins_url('/css/font-awesome.min.css', __FILE__) );
149
  wp_register_style( 'countdown_flatpicker_css', plugins_url('/css/flatpickr.min.css', __FILE__) );
150
  wp_register_style( 'animate-css', plugins_url('/css/animate'.CMP_ASSET_SUFFIX.'.css', __FILE__) );
151
-
 
 
152
  wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true );
153
  wp_register_script( 'cmp-select2-js', plugins_url('/js/select2.min.js', __FILE__) );
154
  wp_register_script( 'cmp-typography', plugins_url('/js/typography'.CMP_ASSET_SUFFIX.'.js', __FILE__), array('cmp-select2-js' ), CMP_VERSION );
@@ -286,19 +284,15 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
286
  }
287
 
288
  /**
289
- * Enqueue scripts and styles for topbar CMP icon
290
  */
291
- public function cmp_add_admin_style() {
292
 
293
  // return of user is not logged in
294
  if ( !is_user_logged_in() ) {
295
  return;
296
  }
297
 
298
- // enqueue cmp admin style - required for topbar and menu icon
299
- wp_register_style( 'cmp_admin_style', plugins_url('/css/cmp-admin-head.css', __FILE__), '', CMP_VERSION);
300
- wp_enqueue_style( 'cmp_admin_style' );
301
-
302
  // return if Top Bar Icon is disabled
303
  if ( get_option('niteoCS_topbar_icon', '1') == '0' ) {
304
  return;
@@ -317,7 +311,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
317
  // enqueue topbar script and style only, if current user is allowed to display topbar, or is admin
318
  foreach ( $current_user->roles as $role ) {
319
  if ( in_array( $role, $roles_topbar ) ) {
320
- wp_register_script( 'cmp_admin_script', plugins_url('/js/cmp-admin-head.js', __FILE__), array('jquery'), CMP_VERSION);
321
  wp_enqueue_script( 'cmp_admin_script' );
322
  wp_localize_script( 'cmp_admin_script', 'cmp_ajax', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
323
  break;
@@ -326,10 +320,36 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
326
 
327
  // this one is for broken wp admin, where current user does not have any roles
328
  } else {
329
- wp_register_script( 'cmp_admin_script', plugins_url('/js/cmp-admin-head.js', __FILE__), array('jquery'), CMP_VERSION);
330
  wp_enqueue_script( 'cmp_admin_script' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
331
  }
332
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  }
334
 
335
  /**
@@ -381,19 +401,22 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
381
  * enqueue styles and scripts when navigated to CMP Settings page
382
  */
383
  public function cmp_admin_scripts() {
384
- wp_enqueue_media();
385
- wp_localize_script( 'cmp-typography', 'fonts', array( 'google' => $this->cmp_get_google_fonts(), ) );
386
- wp_enqueue_script( 'cmp_settings_js' );
387
- wp_enqueue_script( 'cmp-typography' );
388
- wp_enqueue_script( 'wp-color-picker' );
389
- wp_enqueue_script( 'webfont' );
390
- wp_enqueue_script( 'cmp-select2-js' );
391
- wp_enqueue_style( 'wp-color-picker' );
392
- wp_enqueue_style( 'font_awesome' );
393
-
394
- if ( in_array( $this->cmp_selectedTheme(), $this->cmp_font_animation_themes() ) ) {
395
- wp_enqueue_style('animate-css');
396
- }
 
 
 
397
  }
398
 
399
  /**
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.4.9
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
65
 
66
  private function constants() {
67
  // define constants
68
+ $this->define( 'CMP_VERSION', '3.4.9' );
69
  $this->define( 'CMP_DEBUG', FALSE );
70
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
71
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
95
  add_action( 'admin_init', array( $this, 'cmp_adminInit' ) ) ;
96
  add_action( 'admin_init', array( $this, 'cmp_admin_override' ) );
97
  add_action( 'admin_init', array( $this, 'cmp_update_process' ), 0 );
98
+ add_action( 'admin_enqueue_scripts', array( $this,'cmp_add_topbar_scripts' ) );
99
  add_action( 'admin_enqueue_scripts', array( $this,'cmp_add_admin_style' ) );
100
+ add_action( 'wp_enqueue_scripts', array( $this,'cmp_add_topbar_scripts' ) );
101
  add_action( 'wp_ajax_cmp_get_post_detail', array( $this, 'cmp_get_post_detail' ) );
102
  add_action( 'wp_ajax_nopriv_cmp_get_post_detail', array( $this, 'cmp_get_post_detail' ) );
103
  add_action( 'wp_ajax_cmp_check_update', array( $this, 'cmp_check_update' ) );
139
  require_once('inc/class-cmp-render_settings.php');
140
 
141
  $this->render_settings = new cmp_render_settings();
142
+
 
 
 
 
143
  wp_register_style( 'cmp-style', plugins_url('/css/cmp-settings-style'.CMP_ASSET_SUFFIX.'.css', __FILE__),'', CMP_VERSION );
 
144
  wp_register_style( 'font_awesome', plugins_url('/css/font-awesome.min.css', __FILE__) );
145
  wp_register_style( 'countdown_flatpicker_css', plugins_url('/css/flatpickr.min.css', __FILE__) );
146
  wp_register_style( 'animate-css', plugins_url('/css/animate'.CMP_ASSET_SUFFIX.'.css', __FILE__) );
147
+ wp_register_style( 'cmp-admin-head-style', plugins_url('/css/cmp-admin-head.css', __FILE__), '', CMP_VERSION);
148
+
149
+ wp_register_script( 'cmp_admin_script', plugins_url('/js/cmp-admin-head.js', __FILE__), array('jquery'), CMP_VERSION);
150
  wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true );
151
  wp_register_script( 'cmp-select2-js', plugins_url('/js/select2.min.js', __FILE__) );
152
  wp_register_script( 'cmp-typography', plugins_url('/js/typography'.CMP_ASSET_SUFFIX.'.js', __FILE__), array('cmp-select2-js' ), CMP_VERSION );
284
  }
285
 
286
  /**
287
+ * Enqueue admin scripts and styles
288
  */
289
+ public function cmp_add_topbar_scripts() {
290
 
291
  // return of user is not logged in
292
  if ( !is_user_logged_in() ) {
293
  return;
294
  }
295
 
 
 
 
 
296
  // return if Top Bar Icon is disabled
297
  if ( get_option('niteoCS_topbar_icon', '1') == '0' ) {
298
  return;
311
  // enqueue topbar script and style only, if current user is allowed to display topbar, or is admin
312
  foreach ( $current_user->roles as $role ) {
313
  if ( in_array( $role, $roles_topbar ) ) {
314
+ wp_enqueue_style( 'cmp-admin-head-style' );
315
  wp_enqueue_script( 'cmp_admin_script' );
316
  wp_localize_script( 'cmp_admin_script', 'cmp_ajax', array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );
317
  break;
320
 
321
  // this one is for broken wp admin, where current user does not have any roles
322
  } else {
 
323
  wp_enqueue_script( 'cmp_admin_script' );
324
+ wp_enqueue_style( 'cmp-admin-head-style' );
325
+ }
326
+
327
+ }
328
+
329
+ /**
330
+ * Add CMP admin style for its settings pages
331
+ *
332
+ * @since 2.8.9
333
+ */
334
+ public function cmp_add_admin_style($hook) {
335
+ // return of user is not logged in
336
+ if ( !is_user_logged_in() ) {
337
+ return;
338
  }
339
 
340
+ $cmp_pages = array(
341
+ 'toplevel_page_cmp-settings',
342
+ 'cmp-settings_page_cmp-advanced',
343
+ 'cmp-settings_page_cmp-subscribers',
344
+ 'cmp-settings_page_cmp-translate',
345
+ 'cmp-settings_page_cmp-upload-theme',
346
+ 'cmp-settings_page_cmp-help',
347
+ 'cmp-settings_page_cmp-themes-manager',
348
+ );
349
+
350
+ if ( in_array( $hook, $cmp_pages ) ) {
351
+ wp_enqueue_style( 'cmp-style' );
352
+ }
353
  }
354
 
355
  /**
401
  * enqueue styles and scripts when navigated to CMP Settings page
402
  */
403
  public function cmp_admin_scripts() {
404
+ wp_enqueue_media();
405
+ if ( function_exists( 'wp_enqueue_code_editor' ) ) {
406
+ wp_enqueue_code_editor( array( 'type' => 'text/css' ) );
407
+ }
408
+ wp_localize_script( 'cmp-typography', 'fonts', array( 'google' => $this->cmp_get_google_fonts(), ) );
409
+ wp_enqueue_script( 'cmp_settings_js' );
410
+ wp_enqueue_script( 'cmp-typography' );
411
+ wp_enqueue_script( 'wp-color-picker' );
412
+ wp_enqueue_script( 'webfont' );
413
+ wp_enqueue_script( 'cmp-select2-js' );
414
+ wp_enqueue_style( 'wp-color-picker' );
415
+ wp_enqueue_style( 'font_awesome' );
416
+
417
+ if ( in_array( $this->cmp_selectedTheme(), $this->cmp_font_animation_themes() ) ) {
418
+ wp_enqueue_style('animate-css');
419
+ }
420
  }
421
 
422
  /**
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.3
7
  Tested up to: 5.2
8
- Stable tag: 3.4.8
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -135,6 +135,12 @@ https://www.youtube.com/watch?v=uxuJfHzwdtE
135
  <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>
136
 
137
  == Changelog ==
 
 
 
 
 
 
138
  <h4>CMP 3.4.8 - 07-May-19</h4>
139
  <ul>
140
  <li>New CMP Theme: Ares! Check it out guys.</li>
5
  Requires at least: 3.0
6
  Requires PHP: 5.3
7
  Tested up to: 5.2
8
+ Stable tag: 3.4.9
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
135
  <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>
136
 
137
  == Changelog ==
138
+ <h4>CMP 3.4.9 - 08-May-19</h4>
139
+ <ul>
140
+ <li>Resolved conflict with WP Bakery builder - thanks to @7dotmarketing!</li>
141
+ <li>Resolved sytling conflict with Proxy & VPN blocker plugin - thanks to EU Zheninjas!</li>
142
+ </ul>
143
+
144
  <h4>CMP 3.4.8 - 07-May-19</h4>
145
  <ul>
146
  <li>New CMP Theme: Ares! Check it out guys.</li>