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

Version Description

Download this release

Release Info

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

Code changes from version 4.1.1 to 4.1.2

cmp-advanced.php CHANGED
@@ -30,9 +30,8 @@ if ( isset( $_POST['niteoCS_bypass_expire'] ) ) {
30
  if ( $_POST['niteoCS_bypass_expire'] == '' ) {
31
  update_option('niteoCS_bypass_expire', 172800);
32
  } else {
33
- update_option('niteoCS_bypass_expire', filter_var( $_POST['niteoCS_bypass_expire'], FILTER_SANITIZE_NUMBER_INT ));
34
  }
35
-
36
  }
37
 
38
  if ( isset( $_POST['niteoCS_page_filter'] ) ) {
@@ -230,6 +229,12 @@ if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
230
  } else {
231
  update_option('niteoCS_rest_api_status', '0');
232
  }
 
 
 
 
 
 
233
  }
234
 
235
  if ( isset( $_POST['niteoCS_custom_login_url'] ) ) {
@@ -258,7 +263,7 @@ $head_scripts = json_decode(get_option('niteoCS_head_scripts', '[]'), true);
258
  $footer_scripts = json_decode(get_option('niteoCS_footer_scripts', '[]'), true);
259
  $bypass = get_option('niteoCS_bypass', '0');
260
  $bypass_id = get_option('niteoCS_bypass_id', md5( get_home_url() ));
261
- $bypass_expire = get_option('niteoCS_bypass_expire', '172800');
262
  $topbar_icon = get_option('niteoCS_topbar_icon', '1');
263
  $topbar_version = get_option('niteoCS_topbar_version', 'cmp-topbar-full');
264
  $wpautop = get_option('niteoCS_wpautop', '1');
@@ -272,6 +277,8 @@ $subscribe_email = get_option('niteoCS_subscribe_email_address', get_option(
272
  $cmp_cookie_notice_comp = get_option('cmp_cookie_notice_comp', '1');
273
  $cmp_rss = get_option('niteoCS_rss_status', '1');
274
  $cmp_rest_api = get_option('niteoCS_rest_api_status', '1');
 
 
275
  ?>
276
 
277
 
@@ -507,10 +514,10 @@ $cmp_rest_api = get_option('niteoCS_rest_api_status', '1');
507
 
508
  <p class="cmp-hint" style="margin-top:0"><?php _e('You can use passphrase which contains letters, numbers, underscores or dashes only.', 'cmp-coming-soon-maintenance');?></p>
509
 
510
- <h4><?php _e('Set bypass cookie Expiration Time in seconds', 'cmp-coming-soon-maintenance');?></h4>
511
  <input type="text" name="niteoCS_bypass_expire" value="<?php echo esc_attr( $bypass_expire ); ?>" class="regular-text code"><br>
512
 
513
- <p class="cmp-hint" style="margin-top:0"><?php _e('You can set custom Bypass CMP Cookie expiration time in seconds (1hour = 3600). Default expiration time is 2 days (172800).', 'cmp-coming-soon-maintenance');?></p>
514
 
515
  <p><?php _e('Please note this solution is using browser cookies which might not work correctly if you are using caching plugins.', 'cmp-coming-soon-maintenance');?></p>
516
 
@@ -818,6 +825,32 @@ $cmp_rest_api = get_option('niteoCS_rest_api_status', '1');
818
 
819
  </div>
820
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
821
  <div class="table-wrapper cmp-misc">
822
 
823
  <h3 class="no-icon"><?php _e('Cookie Notice Compatibility', 'cmp-coming-soon-maintenance');?></h3>
30
  if ( $_POST['niteoCS_bypass_expire'] == '' ) {
31
  update_option('niteoCS_bypass_expire', 172800);
32
  } else {
33
+ update_option('niteoCS_bypass_expire', filter_var( $_POST['niteoCS_bypass_expire'], FILTER_SANITIZE_NUMBER_INT ) * 86400);
34
  }
 
35
  }
36
 
37
  if ( isset( $_POST['niteoCS_page_filter'] ) ) {
229
  } else {
230
  update_option('niteoCS_rest_api_status', '0');
231
  }
232
+
233
+ if ( isset($_POST['niteoCS-fa-local']) ) {
234
+ update_option('niteoCS_fa_local', $this->sanitize_checkbox($_POST['niteoCS-fa-local']) );
235
+ } else {
236
+ update_option('niteoCS_fa_local', '0');
237
+ }
238
  }
239
 
240
  if ( isset( $_POST['niteoCS_custom_login_url'] ) ) {
263
  $footer_scripts = json_decode(get_option('niteoCS_footer_scripts', '[]'), true);
264
  $bypass = get_option('niteoCS_bypass', '0');
265
  $bypass_id = get_option('niteoCS_bypass_id', md5( get_home_url() ));
266
+ $bypass_expire = get_option('niteoCS_bypass_expire', 172800) / 86400;
267
  $topbar_icon = get_option('niteoCS_topbar_icon', '1');
268
  $topbar_version = get_option('niteoCS_topbar_version', 'cmp-topbar-full');
269
  $wpautop = get_option('niteoCS_wpautop', '1');
277
  $cmp_cookie_notice_comp = get_option('cmp_cookie_notice_comp', '1');
278
  $cmp_rss = get_option('niteoCS_rss_status', '1');
279
  $cmp_rest_api = get_option('niteoCS_rest_api_status', '1');
280
+ $cmp_fa_local = get_option('niteoCS_fa_local', '0');
281
+
282
  ?>
283
 
284
 
514
 
515
  <p class="cmp-hint" style="margin-top:0"><?php _e('You can use passphrase which contains letters, numbers, underscores or dashes only.', 'cmp-coming-soon-maintenance');?></p>
516
 
517
+ <h4><?php _e('Set bypass cookie Expiration Time in days', 'cmp-coming-soon-maintenance');?></h4>
518
  <input type="text" name="niteoCS_bypass_expire" value="<?php echo esc_attr( $bypass_expire ); ?>" class="regular-text code"><br>
519
 
520
+ <p class="cmp-hint" style="margin-top:0"><?php _e('You can set custom Bypass CMP Cookie expiration time in days. Default expiration time is 2 days.', 'cmp-coming-soon-maintenance');?></p>
521
 
522
  <p><?php _e('Please note this solution is using browser cookies which might not work correctly if you are using caching plugins.', 'cmp-coming-soon-maintenance');?></p>
523
 
825
 
826
  </div>
827
 
828
+ <div class="table-wrapper cmp-misc">
829
+
830
+ <h3 class="no-icon"><?php _e('Misc Settings', 'cmp-coming-soon-maintenance');?></h3>
831
+ <table class="general">
832
+ <tbody>
833
+
834
+ <tr>
835
+ <th><?php _e('Font Awesome Icons', 'cmp-coming-soon-maintenance');?></th>
836
+
837
+ <td>
838
+ <fieldset>
839
+
840
+ <label for="cmp-fa-local">
841
+ <input type="checkbox" name="niteoCS-fa-local" class="mode-change-toggle" id="cmp-fa-local" value="1" <?php checked('1', $cmp_fa_local);?>><?php _e('Load Font Awesome icons from a local server', 'cmp-coming-soon-maintenance');?>
842
+ </label>
843
+ </fieldset>
844
+ </td>
845
+ </tr>
846
+ <?php echo $this->render_settings->submit(); ?>
847
+
848
+ </tbody>
849
+ </table>
850
+
851
+ </div>
852
+
853
+
854
  <div class="table-wrapper cmp-misc">
855
 
856
  <h3 class="no-icon"><?php _e('Cookie Notice Compatibility', 'cmp-coming-soon-maintenance');?></h3>
img/thumbnails/nova_thumbnail.jpg/357/200/272Zone.Identifier DELETED
@@ -1,3 +0,0 @@
1
- [ZoneTransfer]
2
- ZoneId=3
3
- HostUrl=https://files.slack.com/files-pri/T0ZT75NCR-F0376DF5FFA/download/cmp_nova.jpg
 
 
 
inc/render/enqueue-styles.php CHANGED
@@ -23,7 +23,12 @@ if ( $slider == '1' && ($banner_type == '0' || $banner_type == '1') ) {
23
  }
24
 
25
  if ( $fa === true ) {
26
- echo '<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" rel="stylesheet" >' . PHP_EOL;
 
 
 
 
 
27
  }
28
 
29
  if ( get_option('niteoCS_lang_switcher', '1') == '1' && $this->translation_active() ) {
23
  }
24
 
25
  if ( $fa === true ) {
26
+ $local = get_option('niteoCS_fa_local', '0');
27
+ if ( $local === '0') {
28
+ echo '<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" rel="stylesheet" >' . PHP_EOL;
29
+ } else {
30
+ echo '<link rel="stylesheet" href="'. esc_url( $this->cmp_asset_url('/css/font-awesome.min.css') ) . '">' . PHP_EOL;
31
+ }
32
  }
33
 
34
  if ( get_option('niteoCS_lang_switcher', '1') == '1' && $this->translation_active() ) {
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.1.1
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.1.1' );
66
  $this->define( 'CMP_DEBUG', FALSE );
67
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
68
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
@@ -804,7 +804,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
804
  if ( isset( $_GET['cmp_bypass'] ) && $_GET['cmp_bypass'] == get_option('niteoCS_bypass_id', md5( get_home_url() )) && get_option('niteoCS_bypass', '0') == '1' ) {
805
  nocache_headers();
806
  header('Cache-Control: max-age=0; private');
807
- setcookie('cmp_bypass', get_option('niteoCS_bypass_id', md5( get_home_url() ) ), time() + get_option('niteoCS_bypass_expire', '172800'));
808
  // exit CMP
809
  return;
810
  }
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.1.2
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.1.2' );
66
  $this->define( 'CMP_DEBUG', FALSE );
67
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
68
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
804
  if ( isset( $_GET['cmp_bypass'] ) && $_GET['cmp_bypass'] == get_option('niteoCS_bypass_id', md5( get_home_url() )) && get_option('niteoCS_bypass', '0') == '1' ) {
805
  nocache_headers();
806
  header('Cache-Control: max-age=0; private');
807
+ setcookie('cmp_bypass', get_option('niteoCS_bypass_id', md5( get_home_url() ) ), time() + get_option('niteoCS_bypass_expire', 172800));
808
  // exit CMP
809
  return;
810
  }
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KV2JF
4
  Tags: coming soon, coming soon page, launch page, maintenance mode, under construction
5
  Requires at least: 3.0
6
  Requires PHP: 5.6
7
- Tested up to: 5.9
8
- Stable tag: 4.1.1
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -160,6 +160,12 @@ 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.1.1 - 25-Mar-22</h4>
164
  <ul>
165
  <li>Resolved issue when using CF7 form in the CMP content and error message "This request is invalid"</li>
4
  Tags: coming soon, coming soon page, launch page, maintenance mode, under construction
5
  Requires at least: 3.0
6
  Requires PHP: 5.6
7
+ Tested up to: 6.0
8
+ Stable tag: 4.1.2
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.1.2 - 17-May-22</h4>
164
+ <ul>
165
+ <li>Added option to load font awesome from a local server. Requested by @blauemango</li>
166
+ <li>Changed Bypass settings to be set in days instead of seconds. Suggested by @pierreb</li>
167
+ <li>Confirmed compatibility with WordPress 6.0</li>
168
+ </ul>
169
  <h4>CMP 4.1.1 - 25-Mar-22</h4>
170
  <ul>
171
  <li>Resolved issue when using CF7 form in the CMP content and error message "This request is invalid"</li>