WP Construction Mode - Version 2.0

Version Description

Download this release

Release Info

Developer smartcat
Plugin Icon 128x128 WP Construction Mode
Version 2.0
Comparing to
See all releases

Code changes from version 1.92 to 2.0

form.php CHANGED
@@ -1,5 +1,12 @@
1
  <script>
2
  jQuery(function() {
 
 
 
 
 
 
 
3
  jQuery('#wuc_loading').change(function() {
4
  if (jQuery(this).val() == 'progress') {
5
  jQuery('.choose-progress').show();
@@ -261,6 +268,34 @@
261
  </tr>
262
  </tbody>
263
  </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
264
  <table class="widefat">
265
  <thead>
266
  <tr>
@@ -289,7 +324,7 @@
289
  <tr>
290
  <td><?php _e('Email Address') ?></td>
291
  <td>
292
- <input type="text" name="wuc_email" value="<?php esc_html( $wuc_email ); ?>" placeholder="<?php _e('Enter email address or leave blank for no icon'); ?>"/>
293
  </td>
294
  </tr>
295
  <tr>
1
  <script>
2
  jQuery(function() {
3
+
4
+ jQuery(".wuc_shortcode").focusout(function () {
5
+ var shortcode = jQuery(this).val();
6
+ shortcode = shortcode.replace(/"/g, "").replace(/'/g, "");
7
+ jQuery(this).val(shortcode);
8
+ });
9
+
10
  jQuery('#wuc_loading').change(function() {
11
  if (jQuery(this).val() == 'progress') {
12
  jQuery('.choose-progress').show();
268
  </tr>
269
  </tbody>
270
  </table>
271
+
272
+ <table class="widefat">
273
+ <thead>
274
+ <tr>
275
+ <th colspan="2">
276
+ <img
277
+ src="<?php echo plugin_dir_url( __FILE__) . '/img/mailchimp.png'; ?>"
278
+ style="width: 30px;">Newsletter / Contact Form Shortcode
279
+ </th>
280
+ </tr>
281
+ </thead>
282
+ <tbody>
283
+ <tr>
284
+ <td><?php _e('Shortcode'); ?></td>
285
+ <td>
286
+ <input class="wuc_shortcode" type="text" name="wuc_shortcode" value="<?php echo esc_attr( $wuc_shortcode) ;?>" placeholder="Enter any Shortcode here"/>
287
+ </td>
288
+ </tr>
289
+ <tr>
290
+ <td colspan="2">
291
+ You can enter any shortcode here, such as mailchimp, contact form 7, gravity forms, icon shortcodes, html shortcodes or anything you want!
292
+ </td>
293
+ </tr>
294
+ </tbody>
295
+
296
+ </table>
297
+
298
+
299
  <table class="widefat">
300
  <thead>
301
  <tr>
324
  <tr>
325
  <td><?php _e('Email Address') ?></td>
326
  <td>
327
+ <input type="text" name="wuc_email" value="<?php echo esc_html( $wuc_email ); ?>" placeholder="<?php _e('Enter email address or leave blank for no icon'); ?>"/>
328
  </td>
329
  </tr>
330
  <tr>
img/mailchimp.png ADDED
Binary file
library/construction.php CHANGED
@@ -28,6 +28,12 @@
28
  </div>
29
  <?php }?>
30
 
 
 
 
 
 
 
31
  <div class="wuc_icons">
32
  <?php if ($wuc_facebook != '') { ?>
33
  <a href="<?php echo $wuc_facebook; ?>" target="_blank">
28
  </div>
29
  <?php }?>
30
 
31
+ <?php if($wuc_shortcode != '') : ?>
32
+ <div class="wuc-shortcode">
33
+ <?php echo do_shortcode($wuc_shortcode); ?>
34
+ </div>
35
+ <?php endif; ?>
36
+
37
  <div class="wuc_icons">
38
  <?php if ($wuc_facebook != '') { ?>
39
  <a href="<?php echo $wuc_facebook; ?>" target="_blank">
readme.txt CHANGED
@@ -1,13 +1,13 @@
1
  === WP Construction Mode ===
2
  Contributors: smartcat
3
  Donate link: http://smartcatdesign.net
4
- Tags: construction,maintenance,page,admin,under construction,under maintenance,coming soon,administrator,custom message,social,facebook,twitter,google plus,gplus,email,icons,link,instagram,digg,flickr,skype,tumblr,youtube
5
  Requires at least: 3.2
6
  Tested up to: 4.0
7
  Stable tag: 1.91
8
  License: GPLv2 or later
9
 
10
- Hide your site behind an appealing Under Construction template while you build it's being built!
11
  == Description ==
12
 
13
  Set entire website or specific page under construction or maintenance. Admin can still view the site, perfect for developing new websites or pages. <br>
@@ -15,6 +15,7 @@ Set entire website or specific page under construction or maintenance. Admin can
15
  - Pro version now available, <a href="http://smartcatdesign.net/wp-construction-mode-pro-wordpress-plugin/" target="_blank" title="WP Construction Mode Demo">Go Pro</a><br>
16
  <br>
17
  <em>Recently added features:</em><br>
 
18
  - Change Background: this feature will allow you to choose a background color, or set an image as a background<br>
19
  - Progress Bar & Timer: This will add a progress bar to notify people how long till your site is ready<br>
20
 
@@ -52,4 +53,5 @@ Background
52
  = 1.8 =
53
  progress bar bug fix
54
  = 1.91 = security fix
55
- = 1.92 = responsive fix, dashboard change
 
1
  === WP Construction Mode ===
2
  Contributors: smartcat
3
  Donate link: http://smartcatdesign.net
4
+ Tags: construction,maintenance,page,admin,under construction,under maintenance,coming soon,administrator,custom message,social,facebook,twitter,google plus,gplus,email,icons,link,instagram,digg,flickr,skype,tumblr,youtube, mailchimp,newsletter,shortcode,contact,form
5
  Requires at least: 3.2
6
  Tested up to: 4.0
7
  Stable tag: 1.91
8
  License: GPLv2 or later
9
 
10
+ Hide your entire site, or just a specific page behind an appealing Under Construction template while you build it's being built & collect newsletter signups!
11
  == Description ==
12
 
13
  Set entire website or specific page under construction or maintenance. Admin can still view the site, perfect for developing new websites or pages. <br>
15
  - Pro version now available, <a href="http://smartcatdesign.net/wp-construction-mode-pro-wordpress-plugin/" target="_blank" title="WP Construction Mode Demo">Go Pro</a><br>
16
  <br>
17
  <em>Recently added features:</em><br>
18
+ - Shortcode support: Add your mailchimp, campaigh monitor, gravity forms, contact form or any other shortcode and it will be rendered on the loading page
19
  - Change Background: this feature will allow you to choose a background color, or set an image as a background<br>
20
  - Progress Bar & Timer: This will add a progress bar to notify people how long till your site is ready<br>
21
 
53
  = 1.8 =
54
  progress bar bug fix
55
  = 1.91 = security fix
56
+ = 1.92 = responsive fix, dashboard change
57
+ = 2.0 = email field fix, added shortcode support
style/style.css CHANGED
@@ -98,6 +98,24 @@
98
  font-size: 12px;
99
  margin-left: 5px;
100
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  /*-------Responsive---------*/
102
  @media(min-width: 980px){
103
  #wuc-wrapper .wuc-logo{
98
  font-size: 12px;
99
  margin-left: 5px;
100
  }
101
+ .wuc-shortcode input[type=submit]{
102
+ margin-top: 10px;
103
+ padding: 8px 15px;
104
+ font-size: 14px;
105
+ background-color: #49B2D2;
106
+ background: #49B2D2;
107
+ border: none;
108
+ color: #fff;
109
+ box-shadow: 0 0 3px #666;
110
+ transition: 0.3s all ease-in-out;
111
+ -moz-transition: 0.3s all ease-in-out;
112
+ -webkit-transition: 0.3s all ease-in-out;
113
+ }
114
+ .wuc-shortcode input[type=submit]:hover{
115
+ color: #49B2D2;
116
+ background: #fff;
117
+ background-color: #fff;
118
+ }
119
  /*-------Responsive---------*/
120
  @media(min-width: 980px){
121
  #wuc-wrapper .wuc-logo{
under-construction.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP Construction Mode
4
  Plugin URI: http://smartcatdesign.net/under-construction-maintenance-mode-free-wordpress-plugin/
5
  Description: Display a customizable Under Construction or Coming Soon page for all users who are not logged in. Perfect for developing on a live server!
6
- Version: 1.92
7
  Author: SmartCat
8
  Author URI: http://smartcatdesign.net
9
  License: GPL v2
@@ -97,6 +97,7 @@ function under_construction_action() {
97
  $wuc_background = get_option('wuc_background');
98
  $wuc_loading = get_option('wuc_loading');
99
  $wuc_progress = get_option('wuc_progress');
 
100
  require_once('form.php');
101
  }
102
 
@@ -209,6 +210,14 @@ function set_under_construction() {
209
 
210
  add_option('wuc_progress', '10');
211
  }
 
 
 
 
 
 
 
 
212
  }
213
 
214
  function show_uc() {
@@ -228,6 +237,7 @@ function show_uc() {
228
  $wuc_background = get_option('wuc_background');
229
  $wuc_loading = get_option('wuc_loading');
230
  $wuc_progress = get_option('wuc_progress');
 
231
  $current_user = wp_get_current_user();
232
 
233
 
3
  Plugin Name: WP Construction Mode
4
  Plugin URI: http://smartcatdesign.net/under-construction-maintenance-mode-free-wordpress-plugin/
5
  Description: Display a customizable Under Construction or Coming Soon page for all users who are not logged in. Perfect for developing on a live server!
6
+ Version: 2.0
7
  Author: SmartCat
8
  Author URI: http://smartcatdesign.net
9
  License: GPL v2
97
  $wuc_background = get_option('wuc_background');
98
  $wuc_loading = get_option('wuc_loading');
99
  $wuc_progress = get_option('wuc_progress');
100
+ $wuc_shortcode = get_option('wuc_shortcode');
101
  require_once('form.php');
102
  }
103
 
210
 
211
  add_option('wuc_progress', '10');
212
  }
213
+ $new_value21 = (($_REQUEST['wuc_shortcode']) == "") ? '' : ($_REQUEST['wuc_shortcode']);
214
+ if (get_option('wuc_shortcode') !== false) {
215
+ update_option('wuc_shortcode', $new_value21);
216
+ } else {
217
+
218
+
219
+ add_option('wuc_shortcode', '');
220
+ }
221
  }
222
 
223
  function show_uc() {
237
  $wuc_background = get_option('wuc_background');
238
  $wuc_loading = get_option('wuc_loading');
239
  $wuc_progress = get_option('wuc_progress');
240
+ $wuc_shortcode = get_option('wuc_shortcode');
241
  $current_user = wp_get_current_user();
242
 
243