Version Description
Download this release
Release Info
Developer | smartcat |
Plugin | WP Construction Mode |
Version | 1.1 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.1
- form.php +245 -80
- images/background2.jpg +0 -0
- images/email.png +0 -0
- images/fb.png +0 -0
- images/google.png +0 -0
- images/noise.png +0 -0
- images/pattern.png +0 -0
- images/pattern_overlay.png +0 -0
- images/raster.png +0 -0
- images/twitter.png +0 -0
- library/construction.php +50 -0
- readme.txt +11 -6
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- style/style.css +73 -0
- style/style_css.php +13 -0
- under-construction.php +78 -5
form.php
CHANGED
@@ -1,68 +1,136 @@
|
|
1 |
<style>
|
2 |
-
.
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
}
|
10 |
-
#
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
.construction-form{
|
15 |
-
padding: 20px;
|
16 |
}
|
17 |
-
|
18 |
-
|
|
|
|
|
19 |
}
|
20 |
-
.
|
21 |
-
|
22 |
-
border-radius: 15px;
|
23 |
}
|
24 |
-
.
|
25 |
-
|
26 |
-
|
|
|
27 |
}
|
28 |
-
.
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
width: 80%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
35 |
</style>
|
36 |
-
|
37 |
|
38 |
-
<div
|
39 |
-
<div
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
-
<div
|
43 |
-
<
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
<select name="set_opt" id="set_opt">
|
51 |
<option value="No" <?php echo ($set_opt == 'No') ? 'selected=selected' : ''; ?>>No</option>
|
52 |
<option value="Yes" <?php echo ($set_opt == 'Yes') ? 'selected=selected' : ''; ?>>Yes</option>
|
53 |
</select>
|
54 |
-
</
|
55 |
-
</
|
56 |
-
<
|
57 |
-
<
|
58 |
-
|
59 |
<select name="set_page" id="set_page">
|
60 |
<option value="all"><?php _e('Entire Website') ?></option>
|
61 |
<?php
|
62 |
$pages = get_pages();
|
63 |
-
foreach($pages as $page){
|
64 |
$option = "<option value= '" . $page->ID . "'";
|
65 |
-
if(get_option("set_page")== $page->ID)
|
66 |
$option .= "selected";
|
67 |
$option .= ">";
|
68 |
$option .= $page->post_title;
|
@@ -71,40 +139,137 @@
|
|
71 |
}
|
72 |
?>
|
73 |
|
74 |
-
</select>
|
75 |
-
</
|
76 |
-
|
77 |
-
|
78 |
-
<
|
79 |
-
<
|
|
|
|
|
|
|
|
|
|
|
80 |
<textarea name="set_msg" id="set_msg" cols="20" rows="3" style="width: 50%"><?php echo $set_msg; ?></textarea>
|
81 |
-
</
|
82 |
-
</
|
83 |
-
<
|
84 |
-
<
|
85 |
-
<
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
-
</div>
|
95 |
-
<div class="alignleft" style="width: 30%;background:#edeae6 ">
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
|
1 |
<style>
|
2 |
+
.left{ float: left;}
|
3 |
+
.right {float: right;}
|
4 |
+
.center{text-align: center;}
|
5 |
+
.width70{ width: 70%;}
|
6 |
+
.width25{ width: 25%;}
|
7 |
+
#gopro{
|
8 |
+
width: 100%;
|
9 |
+
display: block;
|
10 |
+
clear: both;
|
11 |
+
padding: 10px;
|
12 |
+
margin: 10px 8px 15px 5px;
|
13 |
+
border: 1px solid #e1e1e1;
|
14 |
+
background: #f9f9f9;
|
15 |
+
overflow: hidden;
|
16 |
}
|
17 |
+
#wrapper{
|
18 |
+
border: 1px solid #f0f0f0;
|
19 |
+
width: 95%;
|
20 |
+
|
|
|
|
|
21 |
}
|
22 |
+
#wrapper{
|
23 |
+
border: 1px solid #f0f0f0;
|
24 |
+
width: 95%;
|
25 |
+
|
26 |
}
|
27 |
+
table.widefat{
|
28 |
+
margin-bottom: 15px;
|
|
|
29 |
}
|
30 |
+
table.widefat tr{
|
31 |
+
transition: 0.3s all ease-in-out;
|
32 |
+
-moz-transition: 0.3s all ease-in-out;
|
33 |
+
-webkit-transition: 0.3s all ease-in-out;
|
34 |
}
|
35 |
+
table.widefat tr:hover{
|
36 |
+
/*background: #E6E6E6;*/
|
37 |
+
}
|
38 |
+
|
39 |
+
#wrapper input[type='text']{
|
40 |
width: 80%;
|
41 |
+
transition: 0.3s all ease-in-out;
|
42 |
+
-moz-transition: 0.3s all ease-in-out;
|
43 |
+
-webkit-transition: 0.3s all ease-in-out;
|
44 |
+
}
|
45 |
+
#wrapper input[type='text']:focus{
|
46 |
+
border: 1px solid #1784c9;
|
47 |
+
box-shadow: 0 0 7px #1784c9;
|
48 |
+
-moz-box-shadow: 0 0 5px #1784c9;
|
49 |
+
-webkit-box-shadow: 0 0 5px #1784c9;
|
50 |
+
}
|
51 |
+
#wrapper input[type='text'].small-text{
|
52 |
+
width: 20%;
|
53 |
+
}
|
54 |
+
.proversion{
|
55 |
+
color: red;
|
56 |
+
font-style: italic;
|
57 |
}
|
58 |
</style>
|
|
|
59 |
|
60 |
+
<div id="wrapper">
|
61 |
+
<div id="gopro">
|
62 |
+
<div class="left">
|
63 |
+
<h1><b>WP Construction / Maintenance Mode</b></h1>
|
64 |
+
<div><em>Why go pro?</em> More Icons, More Colors, Animations and more! </div>
|
65 |
+
</div>
|
66 |
+
<div class="right">
|
67 |
+
<!--<a href="#" class="button-primary" style="padding: 40px;line-height: 0;font-size: 20px">GO PRO NOW</a>-->
|
68 |
+
</div>
|
69 |
+
</div>
|
70 |
|
71 |
+
<div class="width25 right">
|
72 |
+
<table class="widefat">
|
73 |
+
<thead>
|
74 |
+
<tr>
|
75 |
+
<th><?php _e("Support") ?></th>
|
76 |
+
</tr>
|
77 |
+
<tr>
|
78 |
+
<td>
|
79 |
+
<?php
|
80 |
+
_e("Do you have any questions ? Do you need any help ? Let us know on our website!");
|
81 |
+
?>
|
82 |
+
</td>
|
83 |
+
</tr>
|
84 |
+
<tr>
|
85 |
+
<td class='center'>
|
86 |
+
<a href='http://smartcatdesign.net/under-construction-maintenance-mode-free-wordpress-plugin/' target='_blank' class='button-primary'>Support</a>
|
87 |
+
</td>
|
88 |
+
</tr>
|
89 |
+
</thead>
|
90 |
+
</table>
|
91 |
+
<table class="widefat">
|
92 |
+
<thead>
|
93 |
+
<tr>
|
94 |
+
<th><?php _e("Pro Version") ?> <span class='proversion'><?php _e('coming soon')?></span></th>
|
95 |
+
</tr>
|
96 |
+
<tr>
|
97 |
+
<td>
|
98 |
+
<?php
|
99 |
+
_e("With the pro version, you get the ability to add cool animations, and additional icons for Instagram, Digg, Flickr, Skype, Tumblr and Youtube");
|
100 |
+
?>
|
101 |
+
</td>
|
102 |
+
</tr>
|
103 |
+
</thead>
|
104 |
+
</table>
|
105 |
+
</div>
|
106 |
+
<div class="width70 left">
|
107 |
+
<form name="post_form" method="post" action="" enctype="multipart/form-data">
|
108 |
+
<table class="widefat">
|
109 |
+
<thead>
|
110 |
+
<tr>
|
111 |
+
<th colspan="2">Appearance</th>
|
112 |
+
</tr>
|
113 |
+
</thead>
|
114 |
+
<tbody>
|
115 |
+
<tr>
|
116 |
+
<td><?php _e('Set Under Construction') ?></td>
|
117 |
+
<td>
|
118 |
<select name="set_opt" id="set_opt">
|
119 |
<option value="No" <?php echo ($set_opt == 'No') ? 'selected=selected' : ''; ?>>No</option>
|
120 |
<option value="Yes" <?php echo ($set_opt == 'Yes') ? 'selected=selected' : ''; ?>>Yes</option>
|
121 |
</select>
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
<tr>
|
125 |
+
<td><?php _e('Set To Specific Page') ?></td>
|
126 |
+
<td>
|
127 |
<select name="set_page" id="set_page">
|
128 |
<option value="all"><?php _e('Entire Website') ?></option>
|
129 |
<?php
|
130 |
$pages = get_pages();
|
131 |
+
foreach ($pages as $page) {
|
132 |
$option = "<option value= '" . $page->ID . "'";
|
133 |
+
if (get_option("set_page") == $page->ID)
|
134 |
$option .= "selected";
|
135 |
$option .= ">";
|
136 |
$option .= $page->post_title;
|
139 |
}
|
140 |
?>
|
141 |
|
142 |
+
</select>
|
143 |
+
</td>
|
144 |
+
<tr>
|
145 |
+
<td><?php _e('Logo') ?></td>
|
146 |
+
<td>
|
147 |
+
<input type="text" name="wuc_logo" value="<?php echo $wuc_logo ?>" placeholder="<?php _e('Enter image path/url or leave blank for no logo'); ?>"/>
|
148 |
+
</td>
|
149 |
+
</tr>
|
150 |
+
<tr>
|
151 |
+
<td><?php _e('Title') ?></td>
|
152 |
+
<td>
|
153 |
<textarea name="set_msg" id="set_msg" cols="20" rows="3" style="width: 50%"><?php echo $set_msg; ?></textarea>
|
154 |
+
</td>
|
155 |
+
</tr>
|
156 |
+
<tr>
|
157 |
+
<td><?php _e('Caption') ?></td>
|
158 |
+
<td>
|
159 |
+
<textarea name="set_caption" id="set_caption" cols="20" rows="3" style="width: 50%"><?php echo $set_caption; ?></textarea>
|
160 |
+
</td>
|
161 |
+
</tr>
|
162 |
+
<tr>
|
163 |
+
<td><?php _e('Loading Animation')?></td>
|
164 |
+
<td>
|
165 |
+
<select name='wuc_load_animate'>
|
166 |
+
<option value='no'>None</option>
|
167 |
+
<option value='yes' disabled>Fade In - Pro Version</option>
|
168 |
+
<option value='yes' disabled>Slide In - Pro Version</option>
|
169 |
+
</select>
|
170 |
+
<span class='proversion'>Pro Version</span>
|
171 |
+
</td>
|
172 |
+
</tr>
|
173 |
+
</tbody>
|
174 |
+
</table>
|
175 |
+
<table class="widefat">
|
176 |
+
<thead>
|
177 |
+
<tr>
|
178 |
+
<th colspan="2">Social Icons</th>
|
179 |
+
</tr>
|
180 |
+
</thead>
|
181 |
+
<tbody>
|
182 |
+
<tr>
|
183 |
+
<td><?php _e('Facebook URL')?></td>
|
184 |
+
<td>
|
185 |
+
<input type="text" name="wuc_facebook" value="<?php echo $wuc_facebook ?>" placeholder="<?php _e('Enter Facebook URL or leave blank for no icon'); ?>"/>
|
186 |
+
</td>
|
187 |
+
</tr>
|
188 |
+
<tr>
|
189 |
+
<td><?php _e('Google Plus URL')?></td>
|
190 |
+
<td>
|
191 |
+
<input type="text" name="wuc_gplus" value="<?php echo $wuc_gplus ?>" placeholder="<?php _e('Enter Google Plus URL or leave blank for no icon'); ?>"/>
|
192 |
+
</td>
|
193 |
+
</tr>
|
194 |
+
<tr>
|
195 |
+
<td><?php _e('Twitter URL')?></td>
|
196 |
+
<td>
|
197 |
+
<input type="text" name="wuc_twitter" value="<?php echo $wuc_twitter ?>" placeholder="<?php _e('Enter Twitter URL or leave blank for no icon'); ?>"/>
|
198 |
+
</td>
|
199 |
+
</tr>
|
200 |
+
<tr>
|
201 |
+
<td><?php _e('Email Address')?></td>
|
202 |
+
<td>
|
203 |
+
<input type="text" name="wuc_email" value="<?php echo $wuc_email ?>" placeholder="<?php _e('Enter email address or leave blank for no icon'); ?>"/>
|
204 |
+
</td>
|
205 |
+
</tr>
|
206 |
+
<tr>
|
207 |
+
<td><?php _e('Hover Animation')?></td>
|
208 |
+
<td>
|
209 |
+
<select name='wuc_social_animate'>
|
210 |
+
<option value='no'>No</option>
|
211 |
+
<option value='yes' disabled>Yes - Pro Version</option>
|
212 |
+
</select>
|
213 |
+
<span class='proversion'>Pro Version</span>
|
214 |
+
</td>
|
215 |
+
</tr>
|
216 |
+
<tr>
|
217 |
+
<td><?php _e('Instagram')?></td>
|
218 |
+
<td>
|
219 |
+
<input type="text" name="#" placeholder="<?php _e('Enter Instagram URL or leave blank for no icon'); ?>" disabled/><span class='proversion'>Pro Version</span>
|
220 |
+
</td>
|
221 |
+
</tr>
|
222 |
+
<tr>
|
223 |
+
<td><?php _e('Digg')?></td>
|
224 |
+
<td>
|
225 |
+
<input type="text" placeholder="<?php _e('Enter Digg URL or leave blank for no icon'); ?>" disabled/><span class='proversion'>Pro Version</span>
|
226 |
+
</td>
|
227 |
+
</tr>
|
228 |
+
<tr>
|
229 |
+
<td><?php _e('Flickr')?></td>
|
230 |
+
<td>
|
231 |
+
<input type="text" placeholder="<?php _e('Enter Flickr URL or leave blank for no icon'); ?>" disabled/><span class='proversion'>Pro Version</span>
|
232 |
+
</td>
|
233 |
+
</tr>
|
234 |
+
<tr>
|
235 |
+
<td><?php _e('Skype')?></td>
|
236 |
+
<td>
|
237 |
+
<input type="text" placeholder="<?php _e('Enter Skype URL or leave blank for no icon'); ?>" disabled/><span class='proversion'>Pro Version</span>
|
238 |
+
</td>
|
239 |
+
</tr>
|
240 |
+
<tr>
|
241 |
+
<td><?php _e('Tumblr')?></td>
|
242 |
+
<td>
|
243 |
+
<input type="text" placeholder="<?php _e('Enter Tumblr URL or leave blank for no icon'); ?>" disabled/><span class='proversion'>Pro Version</span>
|
244 |
+
</td>
|
245 |
+
</tr>
|
246 |
+
<tr>
|
247 |
+
<td><?php _e('Youtube')?></td>
|
248 |
+
<td>
|
249 |
+
<input type="text" placeholder="<?php _e('Enter Youtube URL or leave blank for no icon'); ?>" disabled/><span class='proversion'>Pro Version</span>
|
250 |
+
</td>
|
251 |
+
</tr>
|
252 |
+
</tbody>
|
253 |
+
</table>
|
254 |
+
<input type="submit" name="submit" value="Update" class="button button-primary" />
|
255 |
+
<input type="hidden" name="act" value="save" />
|
256 |
+
</form>
|
257 |
|
258 |
+
</div>
|
259 |
+
<!-- <div class="alignleft" style="width: 30%;background:#edeae6 ">
|
260 |
+
<h2 style="color: #B0CB1F;background: #414141;text-align: center;padding: 10px 0;margin-top: 10px;">Plugin Details</h2>
|
261 |
+
<p style="text-align: center;padding: 10px">
|
262 |
+
<?php _e("Use this plugin to set your entire website or specific pages offline for anyone who is not an admin.") ?>
|
263 |
+
<br>
|
264 |
+
<?php _e("This is perfect for building a site on a live domain, or if you want to make changes on a page on a live site, you can set the specific page offline") ?>
|
265 |
+
<br>
|
266 |
+
<?php _e("Set your own custom message. Future updates will allow for more customization. To request specific changes, please visit my website and submit your feedback") ?>
|
267 |
+
</p>
|
268 |
+
<p style="text-align: center">
|
269 |
+
<a href="http://smartcatdesign.net/under-construction-maintenance-mode-free-wordpress-plugin/" target="_blank" class="button button-primary">Plugin Site</a>
|
270 |
+
</p>
|
271 |
+
<p style='text-align: center'>
|
272 |
+
<img src='http://smartcatdesign.net/wp-content/uploads/2013/03/logo-medium.png' style="max-width: 100%"/>
|
273 |
+
</p>
|
274 |
+
</div>
|
275 |
+
</div>-->
|
images/background2.jpg
ADDED
Binary file
|
images/email.png
ADDED
Binary file
|
images/fb.png
ADDED
Binary file
|
images/google.png
ADDED
Binary file
|
images/noise.png
ADDED
Binary file
|
images/pattern.png
ADDED
Binary file
|
images/pattern_overlay.png
ADDED
Binary file
|
images/raster.png
ADDED
Binary file
|
images/twitter.png
ADDED
Binary file
|
library/construction.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Short description
|
4 |
+
* @author bilal hassan <info@smartcatdesign.net>
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
?>
|
8 |
+
<!--<div class='overlay'></div>-->
|
9 |
+
<div id="wuc-wrapper">
|
10 |
+
|
11 |
+
<div class="wuc-logo center">
|
12 |
+
<?php if ($wuc_logo != "") { ?>
|
13 |
+
<img src="<?php echo $wuc_logo; ?>" width="200px"/>
|
14 |
+
<?php } ?>
|
15 |
+
</div>
|
16 |
+
<div id="wuc-box">
|
17 |
+
<div class="center">
|
18 |
+
<h2 class="title">
|
19 |
+
<?php echo $set_msg; ?>
|
20 |
+
</h2>
|
21 |
+
<h3 class="subtitle">
|
22 |
+
<?php echo $set_caption; ?>
|
23 |
+
</h3>
|
24 |
+
</div>
|
25 |
+
<div class="wuc_icons">
|
26 |
+
<?php if($wuc_facebook != ''){ ?>
|
27 |
+
<a href="<?php echo $wuc_facebook; ?>" target="_blank">
|
28 |
+
<img src="<?php echo plugins_url() ?>/wp-construction-mode/images/fb.png"/>
|
29 |
+
</a>
|
30 |
+
<?php } ?>
|
31 |
+
<?php if($wuc_gplus != ''){ ?>
|
32 |
+
<a href="<?php echo $wuc_gplus; ?>" target="_blank">
|
33 |
+
<img src="<?php echo plugins_url() ?>/wp-construction-mode/images/google.png"/>
|
34 |
+
</a>
|
35 |
+
<?php }?>
|
36 |
+
<?php if($wuc_twitter != ''){ ?>
|
37 |
+
<a href="<?php echo $wuc_twitter; ?>" target="_blank">
|
38 |
+
<img src="<?php echo plugins_url() ?>/wp-construction-mode/images/twitter.png"/>
|
39 |
+
</a>
|
40 |
+
<?php }?>
|
41 |
+
<?php if($wuc_email != ''){ ?>
|
42 |
+
<a href="mailto:<?php echo $wuc_email; ?>" target="_blank">
|
43 |
+
<img src="<?php echo plugins_url() ?>/wp-construction-mode/images/email.png"/>
|
44 |
+
</a>
|
45 |
+
<?php }?>
|
46 |
+
</div>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
|
50 |
+
|
readme.txt
CHANGED
@@ -1,26 +1,31 @@
|
|
1 |
=== WP Construction Mode ===
|
2 |
Contributors: smartcat
|
3 |
Donate link: http://smartcatdesign.net
|
4 |
-
Tags: construction,maintenance,page,admin,
|
5 |
Requires at least: 3.2
|
6 |
Tested up to: 3.81
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Set entire website or specific page under construction or maintenance for all viewers except Admin
|
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
|
14 |
-
|
15 |
== Installation ==
|
16 |
|
17 |
1. Upload 'wp-construction-maintenance' to the '/wp-content/plugins/' directory
|
18 |
2. Activate the plugin through the 'Plugins' menu in WordPress
|
19 |
3. Click on Under Construction in the WordPress Dashboard sidebar
|
20 |
-
4. You can choose your option and enter your custom message
|
21 |
5. Click on "Submit" button.
|
22 |
|
|
|
|
|
|
|
|
|
23 |
|
24 |
== Screenshots ==
|
25 |
|
26 |
-
1. Under Construction
|
|
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: 3.81
|
7 |
+
Stable tag: 1.1
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Set entire website or specific page under construction or maintenance for all viewers except Admin
|
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>
|
14 |
+
To view the demo, <a href="http://smartcatdesign.net/wp-construction-mode-demo/" target="_blank" title="WP Construction Mode Demo">click here</a>
|
15 |
== Installation ==
|
16 |
|
17 |
1. Upload 'wp-construction-maintenance' to the '/wp-content/plugins/' directory
|
18 |
2. Activate the plugin through the 'Plugins' menu in WordPress
|
19 |
3. Click on Under Construction in the WordPress Dashboard sidebar
|
20 |
+
4. You can choose your option and enter your custom message, caption, logo and urls for your social pages
|
21 |
5. Click on "Submit" button.
|
22 |
|
23 |
+
== Updates ==
|
24 |
+
|
25 |
+
- <b>Social Icons:</b> Allows you to add links to your social networking sites like <b>Facebook, twitter, google plus and Email</b><br>
|
26 |
+
- <b>Pro Version: </b> More icons! includes <b>instagram, digg,skype, flickr, youtube</b> and more! As well as cool animation fade in/slide effects when the page loads and hover animation
|
27 |
|
28 |
== Screenshots ==
|
29 |
|
30 |
+
1. Under Construction Page Screenshot
|
31 |
+
2. Settings Page
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
ADDED
Binary file
|
style/style.css
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Document : style
|
3 |
+
Created on : Feb 22, 2014, 9:30:04 AM
|
4 |
+
Author : Bilal
|
5 |
+
Description:
|
6 |
+
Purpose of the stylesheet follows.
|
7 |
+
*/
|
8 |
+
.center{
|
9 |
+
text-align: center;
|
10 |
+
}
|
11 |
+
.overlay{
|
12 |
+
position: fixed;
|
13 |
+
top: 0;
|
14 |
+
left: 0;
|
15 |
+
width: 100%;
|
16 |
+
height: 100%;
|
17 |
+
background: url('../images/raster.png');
|
18 |
+
|
19 |
+
}
|
20 |
+
#wuc-wrapper{
|
21 |
+
width: 100%;
|
22 |
+
height: 100%;
|
23 |
+
position: fixed;
|
24 |
+
top: 0;
|
25 |
+
left: 0;
|
26 |
+
background: url('../images/background2.jpg') #e1e1e1;
|
27 |
+
background-size: cover;
|
28 |
+
|
29 |
+
}
|
30 |
+
#wuc-wrapper a{
|
31 |
+
text-decoration: none;
|
32 |
+
}
|
33 |
+
#wuc-wrapper .wuc-logo{
|
34 |
+
width: 200px;
|
35 |
+
margin: 20px auto;
|
36 |
+
|
37 |
+
}
|
38 |
+
#wuc-box{
|
39 |
+
width: 50%;
|
40 |
+
margin: 150px auto;
|
41 |
+
background: #363E41;
|
42 |
+
background: rgba(54,62,65,0.6);
|
43 |
+
border: 1px solid #e5e5e5;
|
44 |
+
box-shadow: 0 1px 5px #464646;
|
45 |
+
color: #ffffff;
|
46 |
+
padding: 20px;
|
47 |
+
z-index: 9999;
|
48 |
+
}
|
49 |
+
#wuc-box .title{
|
50 |
+
font-weight: 200;
|
51 |
+
font-size: 28px;
|
52 |
+
margin: 25px 0;
|
53 |
+
}
|
54 |
+
#wuc-box .subtitle{
|
55 |
+
font-size: 20px;
|
56 |
+
margin: 15px 0;
|
57 |
+
}
|
58 |
+
#wuc-box .wuc_icons{
|
59 |
+
margin: 50px auto 0 auto;
|
60 |
+
text-align: center;
|
61 |
+
}
|
62 |
+
|
63 |
+
#wuc-box .wuc_icons img:first-child,
|
64 |
+
#wuc-box .wuc_icons img:last-child{
|
65 |
+
margin: 0;
|
66 |
+
}
|
67 |
+
#wuc-box .wuc_icons img{
|
68 |
+
width: 30px;
|
69 |
+
margin: 0 5px;
|
70 |
+
transition: 0.4s all ease;
|
71 |
+
-moz-transition: 0.4s all ease;
|
72 |
+
-webkit-transition: 0.4s all ease;
|
73 |
+
}
|
style/style_css.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
<?php
|
4 |
+
|
5 |
+
/*
|
6 |
+
* Short description
|
7 |
+
* @author bilal hassan <info@smartcatdesign.net>
|
8 |
+
*
|
9 |
+
*/
|
10 |
+
?>
|
11 |
+
<style>
|
12 |
+
|
13 |
+
</style>
|
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.
|
7 |
Author: SmartCat
|
8 |
Author URI: http://smartcatdesign.net
|
9 |
License: GPL v2
|
@@ -45,8 +45,18 @@ function under_construction_action() {
|
|
45 |
default:
|
46 |
}
|
47 |
}
|
|
|
|
|
|
|
48 |
$set_opt = get_option($option_name1);
|
49 |
$set_msg = get_option($option_name2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
require_once('form.php');
|
51 |
}
|
52 |
|
@@ -54,6 +64,7 @@ function set_under_construction() {
|
|
54 |
$option_name1 = 'set_opt';
|
55 |
$option_name2 = 'set_msg';
|
56 |
$option_name3 = 'set_page';
|
|
|
57 |
$new_value1 = ($_REQUEST['set_opt'] == "") ? 'No' : $_REQUEST['set_opt'];
|
58 |
if (get_option($option_name1) !== false) {
|
59 |
update_option($option_name1, $new_value1);
|
@@ -81,27 +92,89 @@ function set_under_construction() {
|
|
81 |
$autoload = 'no';
|
82 |
add_option($option_name3, $new_value3, $deprecated, $autoload);
|
83 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
|
86 |
function show_uc() {
|
|
|
87 |
$option_name1 = 'set_opt';
|
88 |
$option_name2 = 'set_msg';
|
89 |
$option_name3 = 'set_page';
|
90 |
$set_opt = get_option($option_name1);
|
91 |
$set_msg = get_option($option_name2);
|
92 |
$set_page = get_option($option_name3);
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
$current_user = wp_get_current_user();
|
94 |
|
95 |
-
if ($set_opt == 'Yes' && !user_can($current_user, 'administrator')) {
|
96 |
if($set_page == get_the_ID()){
|
97 |
-
echo "<div style='margin:0 auto; text-align:center;font-size:30px;padding-top:30px;'>" . $set_msg . "</div>";
|
|
|
|
|
98 |
exit(0);
|
99 |
}else if($set_page == "all"){
|
100 |
-
echo "<div style='margin:0 auto; text-align:center;font-size:30px;padding-top:30px;'>" . $set_msg . "</div>";
|
|
|
|
|
101 |
exit(0);
|
102 |
}
|
103 |
}
|
104 |
}
|
105 |
-
|
|
|
106 |
add_action('wp_head', 'show_uc');
|
107 |
?>
|
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.1
|
7 |
Author: SmartCat
|
8 |
Author URI: http://smartcatdesign.net
|
9 |
License: GPL v2
|
45 |
default:
|
46 |
}
|
47 |
}
|
48 |
+
$option_name1 = 'set_opt';
|
49 |
+
$option_name2 = 'set_msg';
|
50 |
+
$option_name3 = 'set_page';
|
51 |
$set_opt = get_option($option_name1);
|
52 |
$set_msg = get_option($option_name2);
|
53 |
+
$set_page = get_option($option_name3);
|
54 |
+
$set_caption = get_option('set_caption');
|
55 |
+
$wuc_logo = get_option('wuc_logo');
|
56 |
+
$wuc_email = get_option('wuc_email');
|
57 |
+
$wuc_twitter = get_option('wuc_twitter');
|
58 |
+
$wuc_gplus = get_option('wuc_gplus');
|
59 |
+
$wuc_facebook = get_option('wuc_facebook');
|
60 |
require_once('form.php');
|
61 |
}
|
62 |
|
64 |
$option_name1 = 'set_opt';
|
65 |
$option_name2 = 'set_msg';
|
66 |
$option_name3 = 'set_page';
|
67 |
+
|
68 |
$new_value1 = ($_REQUEST['set_opt'] == "") ? 'No' : $_REQUEST['set_opt'];
|
69 |
if (get_option($option_name1) !== false) {
|
70 |
update_option($option_name1, $new_value1);
|
92 |
$autoload = 'no';
|
93 |
add_option($option_name3, $new_value3, $deprecated, $autoload);
|
94 |
}
|
95 |
+
|
96 |
+
$new_value4 = ($_REQUEST['set_caption'] == "") ? 'We will be back soon!' : $_REQUEST['set_caption'];
|
97 |
+
if (get_option('set_caption') !== false) {
|
98 |
+
update_option('set_caption', $new_value4);
|
99 |
+
} else {
|
100 |
+
$deprecated = null;
|
101 |
+
$autoload = 'no';
|
102 |
+
add_option('set_caption', $new_value4, $deprecated, $autoload);
|
103 |
+
}
|
104 |
+
|
105 |
+
$new_value5 = ($_REQUEST['wuc_logo'] == "") ? '' : $_REQUEST['wuc_logo'];
|
106 |
+
if (get_option('wuc_logo') !== false) {
|
107 |
+
update_option('wuc_logo', $new_value5);
|
108 |
+
} else {
|
109 |
+
$deprecated = null;
|
110 |
+
$autoload = 'no';
|
111 |
+
add_option('wuc_logo', $new_value5, $deprecated, $autoload);
|
112 |
+
}
|
113 |
+
$new_value6 = ($_REQUEST['wuc_facebook'] == "") ? 'http://smartcatdesign.net' : $_REQUEST['wuc_facebook'];
|
114 |
+
if (get_option('wuc_facebook') !== false) {
|
115 |
+
update_option('wuc_facebook', $new_value6);
|
116 |
+
} else {
|
117 |
+
$deprecated = null;
|
118 |
+
$autoload = 'no';
|
119 |
+
add_option('wuc_facebook', $new_value6, $deprecated, $autoload);
|
120 |
+
}
|
121 |
+
$new_value7 = ($_REQUEST['wuc_gplus'] == "") ? 'http://smartcatdesign.net' : $_REQUEST['wuc_gplus'];
|
122 |
+
if (get_option('wuc_gplus') !== false) {
|
123 |
+
update_option('wuc_gplus', $new_value7);
|
124 |
+
} else {
|
125 |
+
$deprecated = null;
|
126 |
+
$autoload = 'no';
|
127 |
+
add_option('wuc_gplus', $new_value7, $deprecated, $autoload);
|
128 |
+
}
|
129 |
+
$new_value8 = ($_REQUEST['wuc_twitter'] == "") ? 'http://smartcatdesign.net' : $_REQUEST['wuc_twitter'];
|
130 |
+
if (get_option('wuc_twitter') !== false) {
|
131 |
+
update_option('wuc_twitter', $new_value8);
|
132 |
+
} else {
|
133 |
+
$deprecated = null;
|
134 |
+
$autoload = 'no';
|
135 |
+
add_option('wuc_twitter', $new_value8, $deprecated, $autoload);
|
136 |
+
}
|
137 |
+
$new_value9 = ($_REQUEST['wuc_email'] == "") ? 'http://smartcatdesign.net' : $_REQUEST['wuc_email'];
|
138 |
+
if (get_option('wuc_email') !== false) {
|
139 |
+
update_option('wuc_email', $new_value9);
|
140 |
+
} else {
|
141 |
+
$deprecated = null;
|
142 |
+
$autoload = 'no';
|
143 |
+
add_option('wuc_email', $new_value9, $deprecated, $autoload);
|
144 |
+
}
|
145 |
}
|
146 |
|
147 |
function show_uc() {
|
148 |
+
|
149 |
$option_name1 = 'set_opt';
|
150 |
$option_name2 = 'set_msg';
|
151 |
$option_name3 = 'set_page';
|
152 |
$set_opt = get_option($option_name1);
|
153 |
$set_msg = get_option($option_name2);
|
154 |
$set_page = get_option($option_name3);
|
155 |
+
$set_caption = get_option('set_caption');
|
156 |
+
$wuc_logo = get_option('wuc_logo');
|
157 |
+
$wuc_email = get_option('wuc_email');
|
158 |
+
$wuc_twitter = get_option('wuc_twitter');
|
159 |
+
$wuc_gplus = get_option('wuc_gplus');
|
160 |
+
$wuc_facebook = get_option('wuc_facebook');
|
161 |
$current_user = wp_get_current_user();
|
162 |
|
163 |
+
if ($set_opt == 'Yes' && !user_can($current_user, 'administrator')) {
|
164 |
if($set_page == get_the_ID()){
|
165 |
+
//echo "<div style='margin:0 auto; text-align:center;font-size:30px;padding-top:30px;'>" . $set_msg . "</div>";
|
166 |
+
include_once 'style/style_css.php';
|
167 |
+
include_once 'library/construction.php';
|
168 |
exit(0);
|
169 |
}else if($set_page == "all"){
|
170 |
+
//echo "<div style='margin:0 auto; text-align:center;font-size:30px;padding-top:30px;'>" . $set_msg . "</div>";
|
171 |
+
include_once 'style/style_css.php';
|
172 |
+
include_once 'library/construction.php';
|
173 |
exit(0);
|
174 |
}
|
175 |
}
|
176 |
}
|
177 |
+
wp_register_style( 'wuc_style', plugins_url() . '/wp-construction-mode/style/style.css', false, '1.1' );
|
178 |
+
wp_enqueue_style( 'wuc_style' );
|
179 |
add_action('wp_head', 'show_uc');
|
180 |
?>
|