Version Description
- Minor UI update to work nicely with WP 2.8
- Added the ability to bundle an under-construction.php file with your theme and have the plugin use that
Download this release
Release Info
Developer | noahkagan |
Plugin | underConstruction |
Version | 1.12 |
Comparing to | |
See all releases |
Code changes from version 1.11 to 1.12
- ajax-loader.gif +0 -0
- defaultMessage.php +0 -0
- readme.txt +7 -4
- ucOptions.php +26 -7
- underConstruction.php +6 -1
- underconstruction.dev.js +7 -0
- underconstruction.min.js +1 -1
ajax-loader.gif
DELETED
Binary file
|
defaultMessage.php
CHANGED
File without changes
|
readme.txt
CHANGED
@@ -1,10 +1,9 @@
|
|
1 |
=== underConstruction ===
|
2 |
Contributors: Jeremy Massel
|
3 |
-
|
4 |
-
Tags: construction, under construction, private, preview, security, coming soon
|
5 |
Requires at least: 2.7
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 1.
|
8 |
|
9 |
Creates a 'Coming Soon' page that will show for all users who are not logged in
|
10 |
|
@@ -43,6 +42,10 @@ Sorry, I get a lot of questions. But visit the homepage for this plugin and leav
|
|
43 |
|
44 |
== Changelog ==
|
45 |
|
|
|
|
|
|
|
|
|
46 |
= 1.11 =
|
47 |
* Fixes a bug where users couldn't log in
|
48 |
|
1 |
=== underConstruction ===
|
2 |
Contributors: Jeremy Massel
|
3 |
+
Tags: construction, under construction, private, preview, security, coming soon, landing page, welcome mat, welcome gate
|
|
|
4 |
Requires at least: 2.7
|
5 |
+
Tested up to: 3.8
|
6 |
+
Stable tag: 1.12
|
7 |
|
8 |
Creates a 'Coming Soon' page that will show for all users who are not logged in
|
9 |
|
42 |
|
43 |
== Changelog ==
|
44 |
|
45 |
+
= 1.12 =
|
46 |
+
* Minor UI update to work nicely with WP 2.8
|
47 |
+
* Added the ability to bundle an under-construction.php file with your theme and have the plugin use that
|
48 |
+
|
49 |
= 1.11 =
|
50 |
* Fixes a bug where users couldn't log in
|
51 |
|
ucOptions.php
CHANGED
@@ -59,6 +59,11 @@ if (isset($_POST['display_options']))
|
|
59 |
update_option('underConstructionDisplayOption', 2);
|
60 |
}
|
61 |
}
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
|
64 |
// ======================================
|
@@ -140,6 +145,8 @@ if(isset($_POST['remove_selected_ip_btn'])){
|
|
140 |
if(isset($_POST['required_role'])){
|
141 |
update_option('underConstructionRequiredRole', $_POST['required_role']);
|
142 |
}
|
|
|
|
|
143 |
?>
|
144 |
<noscript>
|
145 |
<div class='updated' id='javascriptWarn'>
|
@@ -155,6 +162,10 @@ if(isset($_POST['required_role'])){
|
|
155 |
id="ucoptions">
|
156 |
<h2><?php _e('Under Construction', 'underconstruction');?></h2>
|
157 |
<table>
|
|
|
|
|
|
|
|
|
158 |
<tr>
|
159 |
<td>
|
160 |
<h3><?php _e('Activate or Deactivate', 'underconstruction');?></h3>
|
@@ -246,11 +257,11 @@ if(isset($_POST['required_role'])){
|
|
246 |
<?php endfor;?>
|
247 |
</select><br />
|
248 |
|
249 |
-
<input type="submit" value="<?php _e('Remove Selected IP Address', 'underconstruction'); ?>" name="remove_selected_ip_btn" id="remove_selected_ip_btn" /> <br /> <br />
|
250 |
<?php endif; ?>
|
251 |
<label><?php _e('IP Address:', 'underconstruction');?> <input type="text" name="ip_address" id="ip_address" /> </label>
|
252 |
-
<a id="add_current_address_btn" style="cursor: pointer;"><?php _e('Add Current Address', 'underconstruction');?></a>
|
253 |
-
<
|
254 |
<br />
|
255 |
</td>
|
256 |
</tr>
|
@@ -265,13 +276,21 @@ if(isset($_POST['required_role'])){
|
|
265 |
<legend class="screen-reader-text">
|
266 |
<span><?php _e('Display Options', 'underconstruction');?> </span>
|
267 |
</legend>
|
268 |
-
<label title="
|
269 |
<input type="radio" name="display_options" value="0" id="displayOption0"<?php if ($this->displayStatusCodeIs(0)) { echo ' checked="checked"'; } ?>> <?php _e('Display the default under construction page', 'underconstruction');?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
270 |
</label> <br />
|
271 |
-
<label title="
|
272 |
<input type="radio" name="display_options" value="1" id="displayOption1"<?php if ($this->displayStatusCodeIs(1)) { echo ' checked="checked"'; } ?>> <?php _e('Display the default under construction page, but use custom text', 'underconstruction');?>
|
273 |
</label> <br />
|
274 |
-
<label title="
|
275 |
<input type="radio" name="display_options" value="2" id="displayOption2"<?php if ($this->displayStatusCodeIs(2)) { echo ' checked="checked"'; } ?>> <?php _e('Display a custom page using your own HTML', 'underconstruction');?>
|
276 |
</label> <br />
|
277 |
</fieldset>
|
@@ -279,7 +298,7 @@ if(isset($_POST['required_role'])){
|
|
279 |
</tr>
|
280 |
</table>
|
281 |
|
282 |
-
<div id="customText"<?php if (!$this->displayStatusCodeIs(1) && !$this->displayStatusCodeIs(
|
283 |
<h3><?php _e('Display Custom Text', 'underconstruction');?></h3>
|
284 |
<p><?php _e('The text here will replace the text on the default page', 'underconstruction');?></p>
|
285 |
<table>
|
59 |
update_option('underConstructionDisplayOption', 2);
|
60 |
}
|
61 |
}
|
62 |
+
|
63 |
+
if ($_POST['display_options'] == 3){ //they want to use the under construction page in their theme
|
64 |
+
update_option('underConstructionDisplayOption', 3);
|
65 |
+
}
|
66 |
+
|
67 |
}
|
68 |
|
69 |
// ======================================
|
145 |
if(isset($_POST['required_role'])){
|
146 |
update_option('underConstructionRequiredRole', $_POST['required_role']);
|
147 |
}
|
148 |
+
|
149 |
+
$current_theme_has_uc_page = file_exists(get_template_directory() . '/under-construction.php');
|
150 |
?>
|
151 |
<noscript>
|
152 |
<div class='updated' id='javascriptWarn'>
|
162 |
id="ucoptions">
|
163 |
<h2><?php _e('Under Construction', 'underconstruction');?></h2>
|
164 |
<table>
|
165 |
+
<tr>
|
166 |
+
<td>Check out our other free plugin, <a target="_blank" href="http://wordpress.org/plugins/sumome">SumoMe (free tools to grow your website's traffic)! <a target="_blank" href="https://wordpress.org/support/view/plugin-reviews/underconstruction">Leave a 5-star review</a>
|
167 |
+
</td>
|
168 |
+
</tr>
|
169 |
<tr>
|
170 |
<td>
|
171 |
<h3><?php _e('Activate or Deactivate', 'underconstruction');?></h3>
|
257 |
<?php endfor;?>
|
258 |
</select><br />
|
259 |
|
260 |
+
<input type="submit" value="<?php _e('Remove Selected IP Address', 'underconstruction'); ?>" name="remove_selected_ip_btn" class="button" id="remove_selected_ip_btn" /> <br /> <br />
|
261 |
<?php endif; ?>
|
262 |
<label><?php _e('IP Address:', 'underconstruction');?> <input type="text" name="ip_address" id="ip_address" /> </label>
|
263 |
+
<a id="add_current_address_btn" style="cursor: pointer;" class="button"><?php _e('Add Current Address', 'underconstruction');?></a>
|
264 |
+
<span id="loading_current_address" class="hidden">Loading...</span>
|
265 |
<br />
|
266 |
</td>
|
267 |
</tr>
|
276 |
<legend class="screen-reader-text">
|
277 |
<span><?php _e('Display Options', 'underconstruction');?> </span>
|
278 |
</legend>
|
279 |
+
<label title="<?php _e('Display the default under construction page', 'underconstruction');?>">
|
280 |
<input type="radio" name="display_options" value="0" id="displayOption0"<?php if ($this->displayStatusCodeIs(0)) { echo ' checked="checked"'; } ?>> <?php _e('Display the default under construction page', 'underconstruction');?>
|
281 |
+
</label> <br />
|
282 |
+
<label title="<?php _e('Display the under construction page that is part of the active theme', 'underconstruction');?>">
|
283 |
+
<input <?php if(!$current_theme_has_uc_page): ?>disabled="disabled" <?php endif; ?> type="radio" name="display_options" value="3" id="displayOption3"<?php if ($this->displayStatusCodeIs(3)) { echo ' checked="checked"'; } ?>> <?php _e('Display the under construction page that is part of the active theme', 'underconstruction');?>
|
284 |
+
|
285 |
+
<?php if(!$current_theme_has_uc_page): ?>
|
286 |
+
<br /> <em style="margin-left: 24px;"><?php _e('Only available for themes with an under-construction.php file', 'underconstruction');?></em>
|
287 |
+
<?php endif; ?>
|
288 |
+
|
289 |
</label> <br />
|
290 |
+
<label title="<?php _e('Display the default under construction page, but use custom text', 'underconstruction');?>">
|
291 |
<input type="radio" name="display_options" value="1" id="displayOption1"<?php if ($this->displayStatusCodeIs(1)) { echo ' checked="checked"'; } ?>> <?php _e('Display the default under construction page, but use custom text', 'underconstruction');?>
|
292 |
</label> <br />
|
293 |
+
<label title="<?php _e('Display a custom page using your own HTML', 'underconstruction');?>">
|
294 |
<input type="radio" name="display_options" value="2" id="displayOption2"<?php if ($this->displayStatusCodeIs(2)) { echo ' checked="checked"'; } ?>> <?php _e('Display a custom page using your own HTML', 'underconstruction');?>
|
295 |
</label> <br />
|
296 |
</fieldset>
|
298 |
</tr>
|
299 |
</table>
|
300 |
|
301 |
+
<div id="customText"<?php if (!$this->displayStatusCodeIs(1) && !$this->displayStatusCodeIs(2)) { echo ' style="display: none;"'; } ?>>
|
302 |
<h3><?php _e('Display Custom Text', 'underconstruction');?></h3>
|
303 |
<p><?php _e('The text here will replace the text on the default page', 'underconstruction');?></p>
|
304 |
<table>
|
underConstruction.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Under Construction
|
4 |
Plugin URI: http://www.masseltech.com/
|
5 |
Description: Makes it so your site can only be accessed by users who log in. Useful for developing a site on a live server, without the world being able to see it
|
6 |
-
Version: 1.
|
7 |
Author: Jeremy Massel
|
8 |
Author URI: http://www.masseltech.com/
|
9 |
*/
|
@@ -120,6 +120,11 @@ class underConstruction
|
|
120 |
echo html_entity_decode($this->getCustomHTML(), ENT_QUOTES);
|
121 |
die();
|
122 |
}
|
|
|
|
|
|
|
|
|
|
|
123 |
}
|
124 |
}
|
125 |
}
|
3 |
Plugin Name: Under Construction
|
4 |
Plugin URI: http://www.masseltech.com/
|
5 |
Description: Makes it so your site can only be accessed by users who log in. Useful for developing a site on a live server, without the world being able to see it
|
6 |
+
Version: 1.12
|
7 |
Author: Jeremy Massel
|
8 |
Author URI: http://www.masseltech.com/
|
9 |
*/
|
120 |
echo html_entity_decode($this->getCustomHTML(), ENT_QUOTES);
|
121 |
die();
|
122 |
}
|
123 |
+
|
124 |
+
if($this->displayStatusCodeIs(3)){
|
125 |
+
require_once(get_template_directory() . '/under-construction.php');
|
126 |
+
die();
|
127 |
+
}
|
128 |
}
|
129 |
}
|
130 |
}
|
underconstruction.dev.js
CHANGED
@@ -2,7 +2,9 @@ document.observe("dom:loaded", function() {
|
|
2 |
Event.observe('displayOption0', 'click', displayOption0Checked);
|
3 |
Event.observe('displayOption1', 'click', displayOption1Checked);
|
4 |
Event.observe('displayOption2', 'click', displayOption2Checked);
|
|
|
5 |
});
|
|
|
6 |
function displayOption0Checked() {
|
7 |
document.getElementById('customText').style.display = 'none';
|
8 |
document.getElementById('customHTML').style.display = 'none';
|
@@ -18,6 +20,11 @@ function displayOption2Checked() {
|
|
18 |
document.getElementById('customHTML').style.display = 'block';
|
19 |
}
|
20 |
|
|
|
|
|
|
|
|
|
|
|
21 |
jQuery(function($) {
|
22 |
$('#add_current_address_btn').click(function(e) {
|
23 |
e.preventDefault();
|
2 |
Event.observe('displayOption0', 'click', displayOption0Checked);
|
3 |
Event.observe('displayOption1', 'click', displayOption1Checked);
|
4 |
Event.observe('displayOption2', 'click', displayOption2Checked);
|
5 |
+
Event.observe('displayOption3', 'click', displayOption3Checked);
|
6 |
});
|
7 |
+
|
8 |
function displayOption0Checked() {
|
9 |
document.getElementById('customText').style.display = 'none';
|
10 |
document.getElementById('customHTML').style.display = 'none';
|
20 |
document.getElementById('customHTML').style.display = 'block';
|
21 |
}
|
22 |
|
23 |
+
function displayOption3Checked() {
|
24 |
+
document.getElementById('customText').style.display = 'none';
|
25 |
+
document.getElementById('customHTML').style.display = 'none';
|
26 |
+
}
|
27 |
+
|
28 |
jQuery(function($) {
|
29 |
$('#add_current_address_btn').click(function(e) {
|
30 |
e.preventDefault();
|
underconstruction.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function
|
1 |
+
function displayOption0Checked(){document.getElementById("customText").style.display="none";document.getElementById("customHTML").style.display="none"}function displayOption1Checked(){document.getElementById("customText").style.display="block";document.getElementById("customHTML").style.display="none"}function displayOption2Checked(){document.getElementById("customText").style.display="none";document.getElementById("customHTML").style.display="block"}function displayOption3Checked(){document.getElementById("customText").style.display="none";document.getElementById("customHTML").style.display="none"}document.observe("dom:loaded",function(){Event.observe("displayOption0","click",displayOption0Checked);Event.observe("displayOption1","click",displayOption1Checked);Event.observe("displayOption2","click",displayOption2Checked);Event.observe("displayOption3","click",displayOption3Checked)});jQuery(function(e){e("#add_current_address_btn").click(function(t){t.preventDefault();t.stopPropagation();e(this).hide();e("#loading_current_address").show();e.get(ajaxurl,{action:"uc_get_ip_address"},function(t){e("#loading_current_address").hide();e("#add_current_address_btn").show();e("#ip_address").val(t)})});e("#301_status").click(function(){console.log("selected 301 redirect");jQuery("#redirect_panel").show()});e("#200_status, #503_status").click(function(){jQuery("#redirect_panel").hide()})})
|