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

Version Description

Download this release

Release Info

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

Code changes from version 3.0 to 3.0.1

Files changed (3) hide show
  1. inc/class-cmp-render_html.php +18 -20
  2. niteo-cmp.php +4 -4
  3. readme.txt +6 -1
inc/class-cmp-render_html.php CHANGED
@@ -11,27 +11,13 @@ class CMP_Coming_Soon_and_Maintenance_Render_HTML extends CMP_Coming_Soon_and_Ma
11
  $size = $this->isMobile() ? 'large' : 'full';
12
  $html = '';
13
  // change background to default image, if image preview background is set
14
- if ( isset( $_GET['background'] ) && is_numeric( $_GET['background'] ) ) {
15
- $niteoCS_banner = esc_attr($_GET['background']);
16
- $theme = esc_attr($_GET['theme']);
17
-
18
- if ( $_GET['background'] == '1' ) {
19
- // override background=1 (unsplash) to theme specific
20
- switch ( $theme ) {
21
- case 'orbit':
22
- case 'frame':
23
- case 'eclipse':
24
- case 'element':
25
- case 'vega':
26
- // default image
27
- $niteoCS_banner = '2';
28
- break;
29
-
30
- default:
31
- break;
32
- }
33
- }
34
 
 
 
 
35
  }
36
 
37
  switch ( $niteoCS_banner ) {
@@ -587,6 +573,18 @@ class CMP_Coming_Soon_and_Maintenance_Render_HTML extends CMP_Coming_Soon_and_Ma
587
  case 'graphic':
588
  // get logo id
589
  $logo_id = get_option('niteoCS_logo_id');
 
 
 
 
 
 
 
 
 
 
 
 
590
  // get logo
591
  if ( $logo_id != '' ) {
592
  $logo_url = wp_get_attachment_image_src( $logo_id, 'full' );
11
  $size = $this->isMobile() ? 'large' : 'full';
12
  $html = '';
13
  // change background to default image, if image preview background is set
14
+ if ( isset( $_GET['background'] ) && !empty($_GET['background']) ) {
15
+ $niteoCS_banner = esc_attr( $_GET['background'] );
16
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
+ // change image background to default media
19
+ if ( isset( $_GET['background'] ) && $_GET['background'] == 1 ) {
20
+ $niteoCS_banner = '2';
21
  }
22
 
23
  switch ( $niteoCS_banner ) {
573
  case 'graphic':
574
  // get logo id
575
  $logo_id = get_option('niteoCS_logo_id');
576
+
577
+ if ( isset($_GET['theme']) && !empty($_GET['theme']) ) {
578
+ $theme = esc_attr( $_GET['theme'] );
579
+ switch ( $theme ) {
580
+ case 'fifty':
581
+ $logo_id = '33';
582
+ break;
583
+
584
+ default:
585
+ break;
586
+ }
587
+ }
588
  // get logo
589
  if ( $logo_id != '' ) {
590
  $logo_url = wp_get_attachment_image_src( $logo_id, 'full' );
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.0
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.0' );
69
  $this->define( 'CMP_DEBUG', FALSE );
70
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
71
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
@@ -2082,13 +2082,13 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
2082
  public function cmp_get_post_detail() {
2083
  $id = isset($_POST['id']) ? esc_attr($_POST['id']) : '';
2084
  $size = $this->isMobile ? 'large' : 'large';
2085
- wp_send_json((object) [
2086
  'img' => get_the_post_thumbnail( $id, $size ),
2087
  'date' => get_the_date( 'F j, Y', $id ),
2088
  'title' => get_the_title( $id ),
2089
  'body' => apply_filters( 'the_content', get_post_field('post_content', $id) ),
2090
  'url' => get_the_permalink( $id ),
2091
- ]);
2092
  }
2093
  }
2094
 
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.0.1
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.0.1' );
69
  $this->define( 'CMP_DEBUG', FALSE );
70
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
71
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
2082
  public function cmp_get_post_detail() {
2083
  $id = isset($_POST['id']) ? esc_attr($_POST['id']) : '';
2084
  $size = $this->isMobile ? 'large' : 'large';
2085
+ wp_send_json( array(
2086
  'img' => get_the_post_thumbnail( $id, $size ),
2087
  'date' => get_the_date( 'F j, Y', $id ),
2088
  'title' => get_the_title( $id ),
2089
  'body' => apply_filters( 'the_content', get_post_field('post_content', $id) ),
2090
  'url' => get_the_permalink( $id ),
2091
+ ));
2092
  }
2093
  }
2094
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KV2JF
4
  Tags: coming soon, landing page, launch page, maintenance mode, under construction
5
  Requires at least: 3.0
6
  Tested up to: 5.0
7
- Stable tag: 3.0
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -116,6 +116,11 @@ Packed with functions like Whitelist/Blacklist to enable CMP only on specific pa
116
  <p>Everyone loves supports and great feedback! If you find our plugin helpful, you can go to wordpress.org and rate it! alternatively you can click on Donate button :)</p>
117
 
118
  == Changelog ==
 
 
 
 
 
119
  <h4>CMP 3.0 - 11-Dec-18</h4>
120
  <h3>**IMPORTANT NOTICE**</h3>
121
  <p>Once you update to new CMP version 3.0 you must also update your Premium themes (if you have any) due to compatibility issues!</p>
4
  Tags: coming soon, landing page, launch page, maintenance mode, under construction
5
  Requires at least: 3.0
6
  Tested up to: 5.0
7
+ Stable tag: 3.0.1
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
116
  <p>Everyone loves supports and great feedback! If you find our plugin helpful, you can go to wordpress.org and rate it! alternatively you can click on Donate button :)</p>
117
 
118
  == Changelog ==
119
+ <h4>CMP 3.0.1 - 12-Dec-18</h4>
120
+ <ul>
121
+ <li>Compatibility with older PHP versions update</li>
122
+ </ul>
123
+
124
  <h4>CMP 3.0 - 11-Dec-18</h4>
125
  <h3>**IMPORTANT NOTICE**</h3>
126
  <p>Once you update to new CMP version 3.0 you must also update your Premium themes (if you have any) due to compatibility issues!</p>