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

Version Description

Download this release

Release Info

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

Code changes from version 3.4.9 to 3.4.10

Files changed (3) hide show
  1. inc/class-cmp-render_html.php +19 -17
  2. niteo-cmp.php +8 -6
  3. readme.txt +6 -1
inc/class-cmp-render_html.php CHANGED
@@ -1772,24 +1772,26 @@ class CMP_Coming_Soon_and_Maintenance_Render_HTML extends CMP_Coming_Soon_and_Ma
1772
  echo '<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" Crossorigin="anonymous"></script>';
1773
  $jquery = TRUE;
1774
  }
1775
- $sitekeys = WPCF7::get_option( 'recaptcha');
1776
- if ($sitekeys) {
1777
- $sitekeys = array_keys( $sitekeys ); ?>
1778
- <!-- CF7 Recaptcha script -->
1779
- <script type='text/javascript' src='https://www.google.com/recaptcha/api.js?render=<?php echo esc_attr($sitekeys[0]);?>&#038;ver=3.0'></script>
1780
- <script>!function(e,t){var a=function(){e.execute("<?php echo esc_attr($sitekeys[0]);?>",{action:"homepage"}).then(function(e){for(var t=document.getElementsByTagName("form"),a=0;a<t.length;a++)for(var n=t[a].getElementsByTagName("input"),r=0;r<n.length;r++){var c=n[r];if("g-recaptcha-response"===c.getAttribute("name")){c.setAttribute("value",e);break}}})};e.ready(a),document.addEventListener("wpcf7submit",a,!1)}(grecaptcha);</script>
1781
- <?php
1782
- } ?>
1783
-
1784
- <script>
1785
- /* <![CDATA[ */
1786
- var wpcf7 = {"apiSettings":{"root":"<?php echo $site_url;?>\/wp-json\/contact-form-7\/v1","namespace":"contact-form-7\/v1"},"recaptcha":{"messages":{"empty":"Please verify that you are not a robot."}}};
1787
- /* ]]> */
1788
- </script>
1789
-
1790
- <script src='<?php echo plugins_url('contact-form-7/includes/js/scripts.js?ver=5.0.1');?>'></script>
1791
 
1792
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1793
  }
1794
 
1795
  // special effects scripts for premium themes
1772
  echo '<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" Crossorigin="anonymous"></script>';
1773
  $jquery = TRUE;
1774
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1775
 
1776
+ if ( class_exists('WPCF7') ) {
1777
+ $sitekeys = WPCF7::get_option( 'recaptcha');
1778
+ if ( $sitekeys ) {
1779
+ $sitekeys = array_keys( $sitekeys ); ?>
1780
+ <!-- CF7 Recaptcha script -->
1781
+ <script type='text/javascript' src='https://www.google.com/recaptcha/api.js?render=<?php echo esc_attr($sitekeys[0]);?>&#038;ver=3.0'></script>
1782
+ <script>!function(e,t){var a=function(){e.execute("<?php echo esc_attr($sitekeys[0]);?>",{action:"homepage"}).then(function(e){for(var t=document.getElementsByTagName("form"),a=0;a<t.length;a++)for(var n=t[a].getElementsByTagName("input"),r=0;r<n.length;r++){var c=n[r];if("g-recaptcha-response"===c.getAttribute("name")){c.setAttribute("value",e);break}}})};e.ready(a),document.addEventListener("wpcf7submit",a,!1)}(grecaptcha);</script>
1783
+ <?php
1784
+ } ?>
1785
+
1786
+ <script>
1787
+ /* <![CDATA[ */
1788
+ var wpcf7 = {"apiSettings":{"root":"<?php echo $site_url;?>\/wp-json\/contact-form-7\/v1","namespace":"contact-form-7\/v1"},"recaptcha":{"messages":{"empty":"Please verify that you are not a robot."}}};
1789
+ /* ]]> */
1790
+ </script>
1791
+
1792
+ <script src='<?php echo plugins_url('contact-form-7/includes/js/scripts.js?ver=5.0.1');?>'></script>
1793
+ <?php
1794
+ }
1795
  }
1796
 
1797
  // special effects scripts for premium themes
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.9
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.9' );
69
  $this->define( 'CMP_DEBUG', FALSE );
70
  $this->define( 'CMP_AUTHOR', 'NiteoThemes' );
71
  $this->define( 'CMP_AUTHOR_HOMEPAGE', 'https://niteothemes.com' );
@@ -95,9 +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_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' ) );
@@ -144,9 +144,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
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 );
@@ -298,6 +296,9 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
298
  return;
299
  }
300
 
 
 
 
301
  $roles_topbar = json_decode( get_option('niteoCS_roles_topbar', '[]'), true );
302
 
303
  // push WP administrator to roles array, since it is default
@@ -305,6 +306,7 @@ if ( ! class_exists( 'CMP_Coming_Soon_and_Maintenance' ) ) :
305
 
306
  // get current user
307
  $current_user = wp_get_current_user();
 
308
 
309
  // check for roles array length
310
  if ( count( $current_user->roles ) > 0 ) {
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.10
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.10' );
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( 'wp_enqueue_scripts', array( $this,'cmp_add_topbar_scripts' ) );
100
+ add_action( 'admin_enqueue_scripts', array( $this,'cmp_add_admin_style' ) );
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' ) );
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
 
 
148
  wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js', array(), false, true );
149
  wp_register_script( 'cmp-select2-js', plugins_url('/js/select2.min.js', __FILE__) );
150
  wp_register_script( 'cmp-typography', plugins_url('/js/typography'.CMP_ASSET_SUFFIX.'.js', __FILE__), array('cmp-select2-js' ), CMP_VERSION );
296
  return;
297
  }
298
 
299
+ wp_register_style( 'cmp-admin-head-style', plugins_url('/css/cmp-admin-head.css', __FILE__), '', CMP_VERSION);
300
+ wp_register_script( 'cmp_admin_script', plugins_url('/js/cmp-admin-head.js', __FILE__), array('jquery'), CMP_VERSION);
301
+
302
  $roles_topbar = json_decode( get_option('niteoCS_roles_topbar', '[]'), true );
303
 
304
  // push WP administrator to roles array, since it is default
306
 
307
  // get current user
308
  $current_user = wp_get_current_user();
309
+
310
 
311
  // check for roles array length
312
  if ( count( $current_user->roles ) > 0 ) {
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.9
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -135,6 +135,11 @@ 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.9 - 08-May-19</h4>
139
  <ul>
140
  <li>Resolved conflict with WP Bakery builder - thanks to @7dotmarketing!</li>
5
  Requires at least: 3.0
6
  Requires PHP: 5.3
7
  Tested up to: 5.2
8
+ Stable tag: 3.4.10
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.10 - 08-May-19</h4>
139
+ <ul>
140
+ <li>Resolved issue with missing styles for topbar under theme preview. Caused by last update..sorry guys</li>
141
+ </ul>
142
+
143
  <h4>CMP 3.4.9 - 08-May-19</h4>
144
  <ul>
145
  <li>Resolved conflict with WP Bakery builder - thanks to @7dotmarketing!</li>