WP Construction Mode - Version 1.91

Version Description

Download this release

Release Info

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

Code changes from version 1.9 to 1.91

Files changed (3) hide show
  1. form.php +8 -8
  2. readme.txt +2 -2
  3. under-construction.php +14 -14
form.php CHANGED
@@ -227,25 +227,25 @@
227
  <tr>
228
  <td><?php _e('Logo') ?></td>
229
  <td>
230
- <input type="text" name="wuc_logo" value="<?php echo $wuc_logo ?>" placeholder="<?php _e('Enter image path/url or leave blank for no logo'); ?>"/>
231
  </td>
232
  </tr>
233
  <tr>
234
  <td><?php _e('Background Image') ?></td>
235
  <td>
236
- <input type="text" name="wuc_background" value="<?php echo $wuc_background ?>" placeholder="<?php _e('Enter image path/url or leave blank for default background'); ?>"/>
237
  </td>
238
  </tr>
239
  <tr>
240
  <td><?php _e('Title') ?></td>
241
  <td>
242
- <textarea name="set_msg" id="set_msg" cols="20" rows="3" style="width: 50%"><?php echo $set_msg; ?></textarea>
243
  </td>
244
  </tr>
245
  <tr>
246
  <td><?php _e('Caption') ?></td>
247
  <td>
248
- <textarea name="set_caption" id="set_caption" cols="20" rows="3" style="width: 50%"><?php echo $set_caption; ?></textarea>
249
  </td>
250
  </tr>
251
  <tr>
@@ -271,25 +271,25 @@
271
  <tr>
272
  <td><?php _e('Facebook URL') ?></td>
273
  <td>
274
- <input type="text" name="wuc_facebook" value="<?php echo $wuc_facebook ?>" placeholder="<?php _e('Enter Facebook URL or leave blank for no icon'); ?>"/>
275
  </td>
276
  </tr>
277
  <tr>
278
  <td><?php _e('Google Plus URL') ?></td>
279
  <td>
280
- <input type="text" name="wuc_gplus" value="<?php echo $wuc_gplus ?>" placeholder="<?php _e('Enter Google Plus URL or leave blank for no icon'); ?>"/>
281
  </td>
282
  </tr>
283
  <tr>
284
  <td><?php _e('Twitter URL') ?></td>
285
  <td>
286
- <input type="text" name="wuc_twitter" value="<?php echo $wuc_twitter ?>" placeholder="<?php _e('Enter Twitter URL or leave blank for no icon'); ?>"/>
287
  </td>
288
  </tr>
289
  <tr>
290
  <td><?php _e('Email Address') ?></td>
291
  <td>
292
- <input type="text" name="wuc_email" value="<?php echo $wuc_email ?>" placeholder="<?php _e('Enter email address or leave blank for no icon'); ?>"/>
293
  </td>
294
  </tr>
295
  <tr>
227
  <tr>
228
  <td><?php _e('Logo') ?></td>
229
  <td>
230
+ <input type="text" name="wuc_logo" value="<?php echo esc_url( $wuc_logo ); ?>" placeholder="<?php _e('Enter image path/url or leave blank for no logo'); ?>"/>
231
  </td>
232
  </tr>
233
  <tr>
234
  <td><?php _e('Background Image') ?></td>
235
  <td>
236
+ <input type="text" name="wuc_background" value="<?php echo esc_url( $wuc_background ); ?>" placeholder="<?php _e('Enter image path/url or leave blank for default background'); ?>"/>
237
  </td>
238
  </tr>
239
  <tr>
240
  <td><?php _e('Title') ?></td>
241
  <td>
242
+ <textarea name="set_msg" id="set_msg" cols="20" rows="3" style="width: 50%"><?php echo esc_textarea( $set_msg ); ?></textarea>
243
  </td>
244
  </tr>
245
  <tr>
246
  <td><?php _e('Caption') ?></td>
247
  <td>
248
+ <textarea name="set_caption" id="set_caption" cols="20" rows="3" style="width: 50%"><?php echo esc_textarea( $set_caption ); ?></textarea>
249
  </td>
250
  </tr>
251
  <tr>
271
  <tr>
272
  <td><?php _e('Facebook URL') ?></td>
273
  <td>
274
+ <input type="text" name="wuc_facebook" value="<?php echo esc_url( $wuc_facebook ); ?>" placeholder="<?php _e('Enter Facebook URL or leave blank for no icon'); ?>"/>
275
  </td>
276
  </tr>
277
  <tr>
278
  <td><?php _e('Google Plus URL') ?></td>
279
  <td>
280
+ <input type="text" name="wuc_gplus" value="<?php echo esc_url( $wuc_gplus ); ?>" placeholder="<?php _e('Enter Google Plus URL or leave blank for no icon'); ?>"/>
281
  </td>
282
  </tr>
283
  <tr>
284
  <td><?php _e('Twitter URL') ?></td>
285
  <td>
286
+ <input type="text" name="wuc_twitter" value="<?php echo esc_url( $wuc_twitter ); ?>" placeholder="<?php _e('Enter Twitter URL or leave blank for no icon'); ?>"/>
287
  </td>
288
  </tr>
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>
readme.txt CHANGED
@@ -3,8 +3,8 @@ 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: 3.91
7
- Stable tag: 1.8
8
  License: GPLv2 or later
9
 
10
  Set entire website or specific page under construction or maintenance for all viewers except Admin
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.9
8
  License: GPLv2 or later
9
 
10
  Set entire website or specific page under construction or maintenance for all viewers except Admin
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.9
7
  Author: SmartCat
8
  Author URI: http://smartcatdesign.net
9
  License: GPL v2
@@ -55,7 +55,7 @@ function under_construction_action() {
55
  switch ($_REQUEST['act']) {
56
  case "save":
57
  set_under_construction();
58
- echo '<div class="updated below-h2" id="message" style="position:relative; clear:both;"><p>Under Construction: ' . sanitize_text_field($_REQUEST['set_opt']) . '</p></div>';
59
  break;
60
  default:
61
  }
@@ -86,7 +86,7 @@ function set_under_construction() {
86
  $option_name2 = 'set_msg';
87
  $option_name3 = 'set_page';
88
 
89
- $new_value1 = (sanitize_text_field($_REQUEST['set_opt']) == "") ? 'No' : sanitize_text_field($_REQUEST['set_opt']);
90
  if (get_option($option_name1) !== false) {
91
  update_option($option_name1, $new_value1);
92
  } else {
@@ -96,7 +96,7 @@ function set_under_construction() {
96
  }
97
 
98
 
99
- $new_value2 = (sanitize_text_field($_REQUEST['set_msg']) == "") ? 'Page is currently under construction. ' : sanitize_text_field($_REQUEST['set_msg']);
100
  if (get_option($option_name2) !== false) {
101
  update_option($option_name2, $new_value2);
102
  } else {
@@ -105,7 +105,7 @@ function set_under_construction() {
105
  add_option($option_name2, $new_value2);
106
  }
107
 
108
- $new_value3 = (sanitize_text_field($_REQUEST['set_page']) == "") ? 'Website is Under Construction' : sanitize_text_field($_REQUEST['set_page']);
109
  if (get_option($option_name3) !== false) {
110
  update_option($option_name3, $new_value3);
111
  } else {
@@ -114,7 +114,7 @@ function set_under_construction() {
114
  add_option($option_name3, $new_value3);
115
  }
116
 
117
- $new_value4 = (sanitize_text_field($_REQUEST['set_caption']) == "") ? 'We will be back soon!' : sanitize_text_field($_REQUEST['set_caption']);
118
  if (get_option('set_caption') !== false) {
119
  update_option('set_caption', $new_value4);
120
  } else {
@@ -123,7 +123,7 @@ function set_under_construction() {
123
  add_option('set_caption', $new_value4);
124
  }
125
 
126
- $new_value5 = (sanitize_text_field($_REQUEST['wuc_logo']) == "") ? '' : sanitize_text_field($_REQUEST['wuc_logo']);
127
  if (get_option('wuc_logo') !== false) {
128
  update_option('wuc_logo', $new_value5);
129
  } else {
@@ -131,7 +131,7 @@ function set_under_construction() {
131
 
132
  add_option('wuc_logo', $new_value5);
133
  }
134
- $new_value6 = (sanitize_text_field($_REQUEST['wuc_facebook']) == "") ? '' : sanitize_text_field($_REQUEST['wuc_facebook']);
135
  if (get_option('wuc_facebook') !== false) {
136
  update_option('wuc_facebook', $new_value6);
137
  } else {
@@ -139,7 +139,7 @@ function set_under_construction() {
139
 
140
  add_option('wuc_facebook', 'http://smartcatdesign.net');
141
  }
142
- $new_value7 = (sanitize_text_field($_REQUEST['wuc_gplus']) == "") ? '' : sanitize_text_field($_REQUEST['wuc_gplus']);
143
  if (get_option('wuc_gplus') !== false) {
144
  update_option('wuc_gplus', $new_value7);
145
  } else {
@@ -147,7 +147,7 @@ function set_under_construction() {
147
 
148
  add_option('wuc_gplus', 'http://smartcatdesign.net');
149
  }
150
- $new_value8 = (sanitize_text_field($_REQUEST['wuc_twitter']) == "") ? '' : sanitize_text_field($_REQUEST['wuc_twitter']);
151
  if (get_option('wuc_twitter') !== false) {
152
  update_option('wuc_twitter', $new_value8);
153
  } else {
@@ -155,7 +155,7 @@ function set_under_construction() {
155
 
156
  add_option('wuc_twitter', 'http://smartcatdesign.net');
157
  }
158
- $new_value9 = (sanitize_text_field($_REQUEST['wuc_email']) == "") ? '' : sanitize_text_field($_REQUEST['wuc_email']);
159
  if (get_option('wuc_email') !== false) {
160
  update_option('wuc_email', $new_value9);
161
  } else {
@@ -163,7 +163,7 @@ function set_under_construction() {
163
 
164
  add_option('wuc_email', 'http://smartcatdesign.net');
165
  }
166
- $new_value10 = (sanitize_text_field($_REQUEST['wuc_background']) == "") ? '' : sanitize_text_field($_REQUEST['wuc_background']);
167
  if (get_option('wuc_background') !== false) {
168
  update_option('wuc_background', $new_value10);
169
  } else {
@@ -171,7 +171,7 @@ function set_under_construction() {
171
 
172
  add_option('wuc_background', '');
173
  }
174
- $new_value19 = (sanitize_text_field($_REQUEST['wuc_loading']) == "") ? '' : sanitize_text_field($_REQUEST['wuc_loading']);
175
  if (get_option('wuc_loading') !== false) {
176
  update_option('wuc_loading', $new_value19);
177
  } else {
@@ -179,7 +179,7 @@ function set_under_construction() {
179
 
180
  add_option('wuc_loading', 'timer');
181
  }
182
- $new_value20 = (sanitize_text_field($_REQUEST['wuc_progress']) == "") ? '' : sanitize_text_field($_REQUEST['wuc_progress']);
183
  if (get_option('wuc_progress') !== false) {
184
  update_option('wuc_progress', $new_value20);
185
  } else {
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.91
7
  Author: SmartCat
8
  Author URI: http://smartcatdesign.net
9
  License: GPL v2
55
  switch ($_REQUEST['act']) {
56
  case "save":
57
  set_under_construction();
58
+ echo '<div class="updated below-h2" id="message" style="position:relative; clear:both;"><p>Under Construction: ' . ($_REQUEST['set_opt']) . '</p></div>';
59
  break;
60
  default:
61
  }
86
  $option_name2 = 'set_msg';
87
  $option_name3 = 'set_page';
88
 
89
+ $new_value1 = (($_REQUEST['set_opt']) == "") ? 'No' : ($_REQUEST['set_opt']);
90
  if (get_option($option_name1) !== false) {
91
  update_option($option_name1, $new_value1);
92
  } else {
96
  }
97
 
98
 
99
+ $new_value2 = (($_REQUEST['set_msg']) == "") ? 'Page is currently under construction. ' : ($_REQUEST['set_msg']);
100
  if (get_option($option_name2) !== false) {
101
  update_option($option_name2, $new_value2);
102
  } else {
105
  add_option($option_name2, $new_value2);
106
  }
107
 
108
+ $new_value3 = ($_REQUEST['set_page'] == "") ? 'Website is Under Construction' : ($_REQUEST['set_page']);
109
  if (get_option($option_name3) !== false) {
110
  update_option($option_name3, $new_value3);
111
  } else {
114
  add_option($option_name3, $new_value3);
115
  }
116
 
117
+ $new_value4 = (($_REQUEST['set_caption']) == "") ? 'We will be back soon!' : ($_REQUEST['set_caption']);
118
  if (get_option('set_caption') !== false) {
119
  update_option('set_caption', $new_value4);
120
  } else {
123
  add_option('set_caption', $new_value4);
124
  }
125
 
126
+ $new_value5 = (($_REQUEST['wuc_logo']) == "") ? '' : ($_REQUEST['wuc_logo']);
127
  if (get_option('wuc_logo') !== false) {
128
  update_option('wuc_logo', $new_value5);
129
  } else {
131
 
132
  add_option('wuc_logo', $new_value5);
133
  }
134
+ $new_value6 = (($_REQUEST['wuc_facebook']) == "") ? '' : ($_REQUEST['wuc_facebook']);
135
  if (get_option('wuc_facebook') !== false) {
136
  update_option('wuc_facebook', $new_value6);
137
  } else {
139
 
140
  add_option('wuc_facebook', 'http://smartcatdesign.net');
141
  }
142
+ $new_value7 = (($_REQUEST['wuc_gplus']) == "") ? '' : ($_REQUEST['wuc_gplus']);
143
  if (get_option('wuc_gplus') !== false) {
144
  update_option('wuc_gplus', $new_value7);
145
  } else {
147
 
148
  add_option('wuc_gplus', 'http://smartcatdesign.net');
149
  }
150
+ $new_value8 = (($_REQUEST['wuc_twitter']) == "") ? '' : ($_REQUEST['wuc_twitter']);
151
  if (get_option('wuc_twitter') !== false) {
152
  update_option('wuc_twitter', $new_value8);
153
  } else {
155
 
156
  add_option('wuc_twitter', 'http://smartcatdesign.net');
157
  }
158
+ $new_value9 = (($_REQUEST['wuc_email']) == "") ? '' : ($_REQUEST['wuc_email']);
159
  if (get_option('wuc_email') !== false) {
160
  update_option('wuc_email', $new_value9);
161
  } else {
163
 
164
  add_option('wuc_email', 'http://smartcatdesign.net');
165
  }
166
+ $new_value10 = (($_REQUEST['wuc_background']) == "") ? '' : ($_REQUEST['wuc_background']);
167
  if (get_option('wuc_background') !== false) {
168
  update_option('wuc_background', $new_value10);
169
  } else {
171
 
172
  add_option('wuc_background', '');
173
  }
174
+ $new_value19 = (($_REQUEST['wuc_loading']) == "") ? '' : ($_REQUEST['wuc_loading']);
175
  if (get_option('wuc_loading') !== false) {
176
  update_option('wuc_loading', $new_value19);
177
  } else {
179
 
180
  add_option('wuc_loading', 'timer');
181
  }
182
+ $new_value20 = (($_REQUEST['wuc_progress']) == "") ? '' : ($_REQUEST['wuc_progress']);
183
  if (get_option('wuc_progress') !== false) {
184
  update_option('wuc_progress', $new_value20);
185
  } else {