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

Version Description

Download this release

Release Info

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

Code changes from version 4.0.10 to 4.0.11

cmp-settings.php CHANGED
@@ -394,7 +394,7 @@ $niteoCS_analytics_status = get_option('niteoCS_analytics_status', 'disabled');
394
  $niteoCS_analytics = stripslashes(get_option('niteoCS_analytics', ''));
395
  $niteoCS_analytics_other = get_option('niteoCS_analytics_other', '');
396
  $seo_visibility = get_option('niteoCS_seo_visibility', get_option( 'blog_public', '1' ));
397
- $seo_nocache = get_option('niteoCS_seo_nocache', '0');
398
 
399
  // get Custom CSS
400
  $niteoCS_custom_css = stripslashes(get_option('niteoCS_custom_css', ''));
@@ -497,7 +497,9 @@ if ( !get_option('niteoCS_socialmedia') ) {
497
  'spotify',
498
  'discord',
499
  'goodreads',
500
- 'rss'
 
 
501
  );
502
  $i = 0;
503
  $socialmedia = array();
394
  $niteoCS_analytics = stripslashes(get_option('niteoCS_analytics', ''));
395
  $niteoCS_analytics_other = get_option('niteoCS_analytics_other', '');
396
  $seo_visibility = get_option('niteoCS_seo_visibility', get_option( 'blog_public', '1' ));
397
+ $seo_nocache = get_option('niteoCS_seo_nocache', '1');
398
 
399
  // get Custom CSS
400
  $niteoCS_custom_css = stripslashes(get_option('niteoCS_custom_css', ''));
497
  'spotify',
498
  'discord',
499
  'goodreads',
500
+ 'rss',
501
+ 'imdb',
502
+ 'wikipedia',
503
  );
504
  $i = 0;
505
  $socialmedia = array();
inc/cmp-update-process.php CHANGED
@@ -277,7 +277,7 @@ if ( version_compare($pre_update_version, CMP_VERSION ) < 0 ) {
277
  $update = true;
278
  }
279
 
280
- // add rss social media in 4.0.7 update
281
  if ( !$this->niteo_in_array_r( 'tiktok', $socialmedia, true ) ) {
282
  $tiktok = array(
283
  'name' => 'tiktok',
@@ -289,6 +289,30 @@ if ( version_compare($pre_update_version, CMP_VERSION ) < 0 ) {
289
  array_push( $socialmedia, $tiktok );
290
  $update = true;
291
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
292
 
293
  if ( $update == true ) {
294
  update_option('niteoCS_socialmedia', json_encode( $socialmedia) );
277
  $update = true;
278
  }
279
 
280
+ // add tiktok social media in 4.0.7 update
281
  if ( !$this->niteo_in_array_r( 'tiktok', $socialmedia, true ) ) {
282
  $tiktok = array(
283
  'name' => 'tiktok',
289
  array_push( $socialmedia, $tiktok );
290
  $update = true;
291
  }
292
+ // add imdb social media in 4.0.11 update
293
+ if ( !$this->niteo_in_array_r( 'imdb', $socialmedia, true ) ) {
294
+ $icon = array(
295
+ 'name' => 'imdb',
296
+ 'url' => '',
297
+ 'active' => '1',
298
+ 'hidden' => '1',
299
+ 'order' => 28,
300
+ );
301
+ array_push( $socialmedia, $icon );
302
+ $update = true;
303
+ }
304
+ // add wikipedia social media in 4.0.11 update
305
+ if ( !$this->niteo_in_array_r( 'wikipedia', $socialmedia, true ) ) {
306
+ $icon = array(
307
+ 'name' => 'wikipedia',
308
+ 'url' => '',
309
+ 'active' => '1',
310
+ 'hidden' => '1',
311
+ 'order' => 29,
312
+ );
313
+ array_push( $socialmedia, $icon );
314
+ $update = true;
315
+ }
316
 
317
  if ( $update == true ) {
318
  update_option('niteoCS_socialmedia', json_encode( $socialmedia) );
inc/render/social-icons.php CHANGED
@@ -65,6 +65,9 @@ if ( get_option('niteoCS_socialmedia') ) {
65
  $icon = 'fas fa-rss';
66
  $href = $href ? $href : get_bloginfo('rss2_url');
67
  break;
 
 
 
68
  default:
69
  break;
70
  }
65
  $icon = 'fas fa-rss';
66
  $href = $href ? $href : get_bloginfo('rss2_url');
67
  break;
68
+ case 'wikipedia':
69
+ $icon = 'fab fa-wikipedia-w';
70
+ break;
71
  default:
72
  break;
73
  }
inc/settings/settings-social-media.php CHANGED
@@ -64,6 +64,12 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
64
  $title = __('RSS', 'cmp-coming-soon-maintenance');
65
  $icon = 'fas fa-rss';
66
  break;
 
 
 
 
 
 
67
  default:
68
  break;
69
  } ?>
@@ -119,6 +125,14 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
119
  $title = sprintf(__('RSS Feed URL(if using your blog RSS feed, you must include this URL in %s to make it available.)', 'cmp-coming-soon-maintenance'), '<a href="' . admin_url() . 'admin.php?page=cmp-advanced">CMP Blacklist</a>');
120
  $url = get_bloginfo('rss2_url');
121
  break;
 
 
 
 
 
 
 
 
122
  default:
123
  $title = ucfirst( $social['name'] );
124
  $url = 'https://'.$social['name'].'.com/profile';
64
  $title = __('RSS', 'cmp-coming-soon-maintenance');
65
  $icon = 'fas fa-rss';
66
  break;
67
+ case 'imdb':
68
+ $title = __('IMDb', 'cmp-coming-soon-maintenance');
69
+ break;
70
+ case 'wikipedia':
71
+ $icon = 'fab fa-wikipedia-w';
72
+ break;
73
  default:
74
  break;
75
  } ?>
125
  $title = sprintf(__('RSS Feed URL(if using your blog RSS feed, you must include this URL in %s to make it available.)', 'cmp-coming-soon-maintenance'), '<a href="' . admin_url() . 'admin.php?page=cmp-advanced">CMP Blacklist</a>');
126
  $url = get_bloginfo('rss2_url');
127
  break;
128
+ case 'imdb':
129
+ $title = 'IMDb';
130
+ $url = 'https://www.imdb.com/user/';
131
+ break;
132
+ case 'wikipedia':
133
+ $title = 'Wikipedia';
134
+ $url = 'https://wikipedia.org/';
135
+ break;
136
  default:
137
  $title = ucfirst( $social['name'] );
138
  $url = 'https://'.$social['name'].'.com/profile';
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.10
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.10' );
66
  $this->define( 'CMP_DEBUG', false );
67
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
68
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
@@ -904,7 +904,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
904
  }
905
 
906
  // send no-cache headers if set in Settings
907
- if ( get_option('niteoCS_seo_nocache', '0') == '1' ){
908
  nocache_headers();
909
  header('Cache-Control: no-cache; private');
910
  }
@@ -915,7 +915,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
915
  setcookie('_icl_current_language', ICL_LANGUAGE_CODE, time()+3600, '/');
916
  }
917
 
918
- // render selected CMP theme
919
  if ( file_exists( $this->cmp_theme_dir( $theme ).$theme.'/'.$theme.'-theme.php') ) {
920
  require_once ( $this->cmp_theme_dir( $theme ).$theme.'/'.$theme.'-theme.php' );
921
  die();
@@ -2639,11 +2639,22 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
2639
  w3tc_flush_all();
2640
  }
2641
 
 
 
 
 
 
 
2642
  // wp super cache
2643
  if ( function_exists( 'wp_cache_clear_cache' ) ) {
2644
  wp_cache_clear_cache();
2645
  }
2646
 
 
 
 
 
 
2647
  // endurance cache
2648
  if ( class_exists( 'Endurance_Page_Cache' ) && method_exists('Endurance_Page_Cache','purge_all')) {
2649
  $epc = new Endurance_Page_Cache;
@@ -2652,7 +2663,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
2652
 
2653
  // SG Optimizer
2654
  if ( class_exists( 'SG_CachePress_Supercacher' ) && method_exists( 'SG_CachePress_Supercacher', 'purge_cache' ) ) {
2655
- SG_CachePress_Supercacher::purge_cache (true );
2656
  }
2657
 
2658
  // WP Fastest Cache
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.11
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.11' );
66
  $this->define( 'CMP_DEBUG', false );
67
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
68
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
904
  }
905
 
906
  // send no-cache headers if set in Settings
907
+ if ( get_option('niteoCS_seo_nocache', '1') == '1' ){
908
  nocache_headers();
909
  header('Cache-Control: no-cache; private');
910
  }
915
  setcookie('_icl_current_language', ICL_LANGUAGE_CODE, time()+3600, '/');
916
  }
917
 
918
+ // finally render selected CMP theme
919
  if ( file_exists( $this->cmp_theme_dir( $theme ).$theme.'/'.$theme.'-theme.php') ) {
920
  require_once ( $this->cmp_theme_dir( $theme ).$theme.'/'.$theme.'-theme.php' );
921
  die();
2639
  w3tc_flush_all();
2640
  }
2641
 
2642
+ // Clear W3 Total Cache
2643
+ if ( function_exists( 'w3tc_pgcache_flush' ) ) {
2644
+ ob_end_clean();
2645
+ w3tc_pgcache_flush();
2646
+ }
2647
+
2648
  // wp super cache
2649
  if ( function_exists( 'wp_cache_clear_cache' ) ) {
2650
  wp_cache_clear_cache();
2651
  }
2652
 
2653
+ // Clear Cachify Cache
2654
+ if ( has_action('cachify_flush_cache') ) {
2655
+ do_action('cachify_flush_cache');
2656
+ }
2657
+
2658
  // endurance cache
2659
  if ( class_exists( 'Endurance_Page_Cache' ) && method_exists('Endurance_Page_Cache','purge_all')) {
2660
  $epc = new Endurance_Page_Cache;
2663
 
2664
  // SG Optimizer
2665
  if ( class_exists( 'SG_CachePress_Supercacher' ) && method_exists( 'SG_CachePress_Supercacher', 'purge_cache' ) ) {
2666
+ SG_CachePress_Supercacher::purge_cache( true );
2667
  }
2668
 
2669
  // WP Fastest Cache
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.7
8
- Stable tag: 4.0.10
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -160,10 +160,14 @@ 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.10 - 16-Apr-21</h4>
164
  <ul>
165
  <li>Fixed 2 possible security issues.</li>
166
-
167
  </ul>
168
  <h4>CMP 4.0.9 - 13-Apr-21</h4>
169
  <ul>
5
  Requires at least: 3.0
6
  Requires PHP: 5.6
7
  Tested up to: 5.7
8
+ Stable tag: 4.0.11
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.11 - 30-Apr-21</h4>
164
+ <ul>
165
+ <li>Added socials icons for Wikipedia and IMDb. Suggested by @artgoddess, thanks!</li>
166
+ <li>Updated cache clearing compatibility with caching plugins.</li>
167
+ </ul>
168
  <h4>CMP 4.0.10 - 16-Apr-21</h4>
169
  <ul>
170
  <li>Fixed 2 possible security issues.</li>
 
171
  </ul>
172
  <h4>CMP 4.0.9 - 13-Apr-21</h4>
173
  <ul>