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

Version Description

Download this release

Release Info

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

Code changes from version 4.0.18 to 4.0.19

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.18
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
@@ -62,7 +62,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
62
 
63
  // define constants
64
  private function constants() {
65
- $this->define( 'CMP_VERSION', '4.0.18' );
66
  $this->define( 'CMP_DEBUG', false );
67
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
68
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
@@ -2639,6 +2639,10 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
2639
  * @return string
2640
  */
2641
  public function cmp_purge_cache() {
 
 
 
 
2642
  // W3 Total Cache
2643
  if ( function_exists('w3tc_flush_all') ) {
2644
  w3tc_flush_all();
@@ -2665,6 +2669,10 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
2665
  SG_CachePress_Supercacher::purge_cache( true );
2666
  }
2667
 
 
 
 
 
2668
  // WP Fastest Cache
2669
  if ( isset( $GLOBALS['wp_fastest_cache'] ) && method_exists( $GLOBALS['wp_fastest_cache'], 'deleteCache' ) ) {
2670
  $GLOBALS['wp_fastest_cache']->deleteCache( true );
@@ -2680,6 +2688,10 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
2680
  rocket_clean_domain();
2681
  }
2682
 
 
 
 
 
2683
  // wp-optimize
2684
  if ( class_exists('WP_Optimize') ) {
2685
  if (!class_exists('WP_Optimize_Cache_Commands')) include_once(WPO_PLUGIN_MAIN_PATH . 'cache/class-cache-commands.php');
@@ -2691,6 +2703,10 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
2691
  if ( class_exists('LiteSpeed_Cache_API') && method_exists( 'LiteSpeed_Cache_API', 'purge_all' ) ) {
2692
  LiteSpeed_Cache_API::purge_all();
2693
  }
 
 
 
 
2694
  }
2695
 
2696
  /**
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.19
7
  Author: NiteoThemes
8
  Author URI: https://www.niteothemes.com
9
  Text Domain: cmp-coming-soon-maintenance
62
 
63
  // define constants
64
  private function constants() {
65
+ $this->define( 'CMP_VERSION', '4.0.19' );
66
  $this->define( 'CMP_DEBUG', false );
67
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
68
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
2639
  * @return string
2640
  */
2641
  public function cmp_purge_cache() {
2642
+
2643
+ // WP cache
2644
+ wp_cache_flush();
2645
+
2646
  // W3 Total Cache
2647
  if ( function_exists('w3tc_flush_all') ) {
2648
  w3tc_flush_all();
2669
  SG_CachePress_Supercacher::purge_cache( true );
2670
  }
2671
 
2672
+ if (class_exists('SiteGround_Optimizer\Supercacher\Supercacher')) {
2673
+ SiteGround_Optimizer\Supercacher\Supercacher::purge_cache();
2674
+ }
2675
+
2676
  // WP Fastest Cache
2677
  if ( isset( $GLOBALS['wp_fastest_cache'] ) && method_exists( $GLOBALS['wp_fastest_cache'], 'deleteCache' ) ) {
2678
  $GLOBALS['wp_fastest_cache']->deleteCache( true );
2688
  rocket_clean_domain();
2689
  }
2690
 
2691
+ if (is_callable(array('Hummingbird\WP_Hummingbird', 'flush_cache'))) {
2692
+ Hummingbird\WP_Hummingbird::flush_cache(true, false);
2693
+ }
2694
+
2695
  // wp-optimize
2696
  if ( class_exists('WP_Optimize') ) {
2697
  if (!class_exists('WP_Optimize_Cache_Commands')) include_once(WPO_PLUGIN_MAIN_PATH . 'cache/class-cache-commands.php');
2703
  if ( class_exists('LiteSpeed_Cache_API') && method_exists( 'LiteSpeed_Cache_API', 'purge_all' ) ) {
2704
  LiteSpeed_Cache_API::purge_all();
2705
  }
2706
+
2707
+ if (function_exists('rocket_clean_domain')) {
2708
+ rocket_clean_domain();
2709
+ }
2710
  }
2711
 
2712
  /**
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.8
8
- Stable tag: 4.0.18
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.18 - 22-Nov-21</h4>
164
  <ul>
165
  <li>Updated compatibility with CF7 new API.</li>
5
  Requires at least: 3.0
6
  Requires PHP: 5.6
7
  Tested up to: 5.8
8
+ Stable tag: 4.0.19
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.19 - 14-Jan-22</h4>
164
+ <ul>
165
+ <li>Fixed security issue, when unauthenticated user could update the CSS styles for CMP themes.</li>
166
+ <li>Updated purge caching function</li>
167
+ </ul>
168
  <h4>CMP 4.0.18 - 22-Nov-21</h4>
169
  <ul>
170
  <li>Updated compatibility with CF7 new API.</li>
themes/construct/construct-defaults.php CHANGED
@@ -11,20 +11,27 @@ $theme_supports = array(
11
  'special_effects' => false,
12
  );
13
 
14
- if ( isset($_POST['niteoCS_active_color_'.$themeslug]) ) {
15
- update_option('niteoCS_active_color['.$themeslug.']', sanitize_hex_color( $_POST['niteoCS_active_color_'.$themeslug]));
16
- }
17
 
18
- if ( isset($_POST['niteoCS_font_color_'.$themeslug]) ) {
19
- update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
20
- }
21
 
22
- if ( isset($_POST['niteoCS_background_color_'.$themeslug]) ) {
23
- update_option('niteoCS_background_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_background_color_'.$themeslug]));
24
- }
 
 
 
 
 
 
 
 
 
 
 
25
 
26
- if ( isset($_POST['niteoCS_social_background_color_'.$themeslug]) ) {
27
- update_option('niteoCS_social_background_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_social_background_color_'.$themeslug]));
 
28
  }
29
 
30
  // set theme defaults
11
  'special_effects' => false,
12
  );
13
 
 
 
 
14
 
15
+ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
 
 
16
 
17
+ if( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
18
+ die('Sorry, but this request is invalid');
19
+ }
20
+ if ( isset($_POST['niteoCS_active_color_'.$themeslug]) ) {
21
+ update_option('niteoCS_active_color['.$themeslug.']', sanitize_hex_color( $_POST['niteoCS_active_color_'.$themeslug]));
22
+ }
23
+
24
+ if ( isset($_POST['niteoCS_font_color_'.$themeslug]) ) {
25
+ update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
26
+ }
27
+
28
+ if ( isset($_POST['niteoCS_background_color_'.$themeslug]) ) {
29
+ update_option('niteoCS_background_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_background_color_'.$themeslug]));
30
+ }
31
 
32
+ if ( isset($_POST['niteoCS_social_background_color_'.$themeslug]) ) {
33
+ update_option('niteoCS_social_background_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_social_background_color_'.$themeslug]));
34
+ }
35
  }
36
 
37
  // set theme defaults
themes/countdown/countdown-defaults.php CHANGED
@@ -12,21 +12,27 @@ $theme_supports = array(
12
  'special_effects' => false,
13
  );
14
 
 
15
 
16
- if (isset($_POST['niteoCS_active_color_'.$themeslug])) {
17
- update_option('niteoCS_active_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_active_color_'.$themeslug]));
18
- }
19
 
20
- if (isset($_POST['niteoCS_font_color_'.$themeslug])) {
21
- update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
22
- }
23
 
 
 
 
24
 
25
- if (isset($_POST['niteoCS_social_location']) && $_POST['niteoCS_social_location']) {
26
- update_option('niteoCS_social_location', sanitize_text_field($_POST['niteoCS_social_location']));
27
- }
28
 
29
 
 
 
 
 
 
30
 
31
  // get theme defaults
32
  $banner_type = get_option('niteoCS_banner', '2');
12
  'special_effects' => false,
13
  );
14
 
15
+ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
16
 
17
+ if( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
18
+ die('Sorry, but this request is invalid');
19
+ }
20
 
 
 
 
21
 
22
+ if (isset($_POST['niteoCS_active_color_'.$themeslug])) {
23
+ update_option('niteoCS_active_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_active_color_'.$themeslug]));
24
+ }
25
 
26
+ if (isset($_POST['niteoCS_font_color_'.$themeslug])) {
27
+ update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
28
+ }
29
 
30
 
31
+ if (isset($_POST['niteoCS_social_location']) && $_POST['niteoCS_social_location']) {
32
+ update_option('niteoCS_social_location', sanitize_text_field($_POST['niteoCS_social_location']));
33
+ }
34
+ }
35
+
36
 
37
  // get theme defaults
38
  $banner_type = get_option('niteoCS_banner', '2');
themes/hardwork/hardwork-defaults.php CHANGED
@@ -11,21 +11,25 @@ $theme_supports = array(
11
  'special_effects' => false,
12
  );
13
 
 
14
 
15
- if ( isset( $_POST['niteoCS_font_color_'.$themeslug] ) ) {
16
- update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
17
- }
 
 
 
18
 
19
- if ( isset( $_POST['niteoCS_footer_background_'.$themeslug] ) ) {
20
- update_option('niteoCS_footer_background['.$themeslug.']', sanitize_hex_color( $_POST['niteoCS_footer_background_'.$themeslug]) );
21
- }
22
 
23
 
24
- if ( isset( $_POST['niteoCS_footer_background_opacity_'.$themeslug] ) ) {
25
- update_option('niteoCS_footer_background_opacity['.$themeslug.']', sanitize_text_field( $_POST['niteoCS_footer_background_opacity_'.$themeslug]) );
 
26
  }
27
 
28
-
29
  $banner_type = get_option('niteoCS_banner', '2');
30
  $banner_color = get_option('niteoCS_banner_color['.$themeslug.']', '#e5e5e5');
31
  $font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');
11
  'special_effects' => false,
12
  );
13
 
14
+ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
15
 
16
+ if( !wp_verify_nonce($_POST['save_options_field'], 'save_options') || !current_user_can('publish_pages') ) {
17
+ die('Sorry, but this request is invalid');
18
+ }
19
+ if ( isset( $_POST['niteoCS_font_color_'.$themeslug] ) ) {
20
+ update_option('niteoCS_font_color['.$themeslug.']', sanitize_hex_color($_POST['niteoCS_font_color_'.$themeslug]));
21
+ }
22
 
23
+ if ( isset( $_POST['niteoCS_footer_background_'.$themeslug] ) ) {
24
+ update_option('niteoCS_footer_background['.$themeslug.']', sanitize_hex_color( $_POST['niteoCS_footer_background_'.$themeslug]) );
25
+ }
26
 
27
 
28
+ if ( isset( $_POST['niteoCS_footer_background_opacity_'.$themeslug] ) ) {
29
+ update_option('niteoCS_footer_background_opacity['.$themeslug.']', sanitize_text_field( $_POST['niteoCS_footer_background_opacity_'.$themeslug]) );
30
+ }
31
  }
32
 
 
33
  $banner_type = get_option('niteoCS_banner', '2');
34
  $banner_color = get_option('niteoCS_banner_color['.$themeslug.']', '#e5e5e5');
35
  $font_color = get_option('niteoCS_font_color['.$themeslug.']', '#ffffff');