Version Description
- 2017/04/12
- new theme - Rocket Launch #2
- started working on marking strings for translation
- added designs survey
Download this release
Release Info
Developer | WebFactory |
Plugin | Under Construction |
Version | 1.95 |
Comparing to | |
See all releases |
Code changes from version 1.90 to 1.95
- css/ucp-admin.css +16 -24
- images/survey-designs-photo.png +0 -0
- images/thumbnails/rocket_2.png +0 -0
- js/ucp-admin.js +11 -40
- readme.txt +46 -8
- themes/rocket_2/index.php +56 -0
- themes/rocket_2/rocket.png +0 -0
- themes/rocket_2/style.css +74 -0
- under-construction.php +71 -78
css/ucp-admin.css
CHANGED
@@ -200,53 +200,45 @@ span.select2-container .select2-search--inline .select2-search__field {
|
|
200 |
border: 2px solid rgba(0,0,0,0.2);
|
201 |
padding: 10px;
|
202 |
background-color: rgba(250,250,250,0.55);
|
203 |
-
margin-bottom:
|
204 |
opacity: 0.75;
|
|
|
|
|
|
|
205 |
}
|
206 |
|
207 |
.question-wrapper:hover {
|
208 |
opacity: 1;
|
209 |
border: 2px solid rgba(0, 142, 194, 1);
|
210 |
cursor: pointer;
|
211 |
-
margin-bottom: 10px;
|
212 |
}
|
213 |
|
214 |
.question-wrapper.selected {
|
215 |
opacity: 1;
|
216 |
border: 2px solid rgba(0, 142, 194, 1);
|
217 |
-
margin-bottom: 10px;
|
218 |
}
|
219 |
|
220 |
-
.question-wrapper
|
221 |
-
|
222 |
-
|
223 |
-
width: 40px;
|
224 |
-
height: 40px;
|
225 |
-
display: inline-block;
|
226 |
}
|
227 |
|
228 |
-
.question-wrapper
|
229 |
-
color: rgba(0,
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
font-size: 40px;
|
235 |
}
|
236 |
|
237 |
-
.question-wrapper
|
238 |
-
margin:
|
239 |
-
|
240 |
-
font-size: 12px;
|
241 |
-
padding: 2px;
|
242 |
}
|
243 |
|
244 |
.question-wrapper .question {
|
245 |
-
margin-left: -40px;
|
246 |
display: inline-block;
|
247 |
width: 100%;
|
248 |
-
padding-left: 50px;
|
249 |
-
box-sizing: border-box;
|
250 |
}
|
251 |
|
252 |
.question-wrapper i {
|
200 |
border: 2px solid rgba(0,0,0,0.2);
|
201 |
padding: 10px;
|
202 |
background-color: rgba(250,250,250,0.55);
|
203 |
+
margin-bottom: 5px;
|
204 |
opacity: 0.75;
|
205 |
+
width: 300px;
|
206 |
+
display: inline-block;
|
207 |
+
text-align: center;
|
208 |
}
|
209 |
|
210 |
.question-wrapper:hover {
|
211 |
opacity: 1;
|
212 |
border: 2px solid rgba(0, 142, 194, 1);
|
213 |
cursor: pointer;
|
|
|
214 |
}
|
215 |
|
216 |
.question-wrapper.selected {
|
217 |
opacity: 1;
|
218 |
border: 2px solid rgba(0, 142, 194, 1);
|
|
|
219 |
}
|
220 |
|
221 |
+
.question-wrapper b {
|
222 |
+
font-weight: bold;
|
223 |
+
font-size: 14px;
|
|
|
|
|
|
|
224 |
}
|
225 |
|
226 |
+
.question-wrapper .dashicons.big {
|
227 |
+
color: rgba(0, 0, 0, 1);
|
228 |
+
display: inline;
|
229 |
+
height: 162px;
|
230 |
+
font-size: 162px;
|
231 |
+
margin-bottom: 10px;
|
|
|
232 |
}
|
233 |
|
234 |
+
.question-wrapper img {
|
235 |
+
margin-bottom: 10px;
|
236 |
+
height: 150px;
|
|
|
|
|
237 |
}
|
238 |
|
239 |
.question-wrapper .question {
|
|
|
240 |
display: inline-block;
|
241 |
width: 100%;
|
|
|
|
|
242 |
}
|
243 |
|
244 |
.question-wrapper i {
|
images/survey-designs-photo.png
ADDED
Binary file
|
images/thumbnails/rocket_2.png
ADDED
Binary file
|
js/ucp-admin.js
CHANGED
@@ -34,28 +34,21 @@ jQuery(document).ready(function($) {
|
|
34 |
'modal': 1,
|
35 |
'resizable': false,
|
36 |
'zIndex': 9999,
|
37 |
-
'width':
|
38 |
'height': 'auto',
|
39 |
'show': 'fade',
|
40 |
'hide': 'fade',
|
41 |
'open': function(event, ui) { ucp_fix_dialog_close(event, ui); },
|
42 |
'close': function(event, ui) { },
|
43 |
-
'autoOpen': ucp.
|
44 |
'closeOnEscape': true
|
45 |
});
|
46 |
|
47 |
|
48 |
// turn questions into checkboxes
|
49 |
$('.question-wrapper').on('click', function(e) {
|
50 |
-
|
51 |
-
|
52 |
-
} else {
|
53 |
-
if ($('.question-wrapper.selected').length >= 2) {
|
54 |
-
alert('You can only choose 2 features at a time');
|
55 |
-
} else {
|
56 |
-
$(this).addClass('selected');
|
57 |
-
}
|
58 |
-
}
|
59 |
|
60 |
e.preventDefault();
|
61 |
return false;
|
@@ -66,7 +59,7 @@ jQuery(document).ready(function($) {
|
|
66 |
$('.dismiss-survey').on('click', function(e) {
|
67 |
$('#features-survey-dialog').dialog('close');
|
68 |
|
69 |
-
$.post(ajaxurl, { survey: '
|
70 |
_ajax_nonce: ucp.nonce_dismiss_survey,
|
71 |
action: 'ucp_dismiss_survey'
|
72 |
});
|
@@ -78,25 +71,20 @@ jQuery(document).ready(function($) {
|
|
78 |
|
79 |
// submit and hide survey
|
80 |
$('.submit-survey').on('click', function(e) {
|
81 |
-
if ($('.question-wrapper.selected').length !=
|
82 |
-
alert('Please choose
|
83 |
return false;
|
84 |
}
|
85 |
|
86 |
-
if ($('#features-survey-dialog .custom-input').val() == '' && $('#features-survey-dialog .custom-input').parents('div.question-wrapper').hasClass('selected')) {
|
87 |
-
alert('Please describe the custom feature you would like us to build next.');
|
88 |
-
return false;
|
89 |
-
}
|
90 |
-
|
91 |
answers = '';
|
92 |
$('.question-wrapper.selected').each(function(i, el) {
|
93 |
answers += $(el).data('value') + ',';
|
94 |
});
|
95 |
|
96 |
-
$.post(ajaxurl, { survey: '
|
97 |
answers: answers,
|
98 |
emailme: $('#features-survey-dialog #emailme:checked').val(),
|
99 |
-
custom_answer:
|
100 |
_ajax_nonce: ucp.nonce_submit_survey,
|
101 |
action: 'ucp_submit_survey'
|
102 |
});
|
@@ -108,23 +96,6 @@ jQuery(document).ready(function($) {
|
|
108 |
return false;
|
109 |
});
|
110 |
|
111 |
-
|
112 |
-
// autoselect custom answer when something is typed in
|
113 |
-
$('#features-survey-dialog .custom-input').on('change keypress', function(e) {
|
114 |
-
if ($(this).val().length > 2 && $('.question-wrapper.selected').length < 2) {
|
115 |
-
$(this).parents('.question-wrapper').addClass('selected');
|
116 |
-
}
|
117 |
-
|
118 |
-
return true;
|
119 |
-
});
|
120 |
-
|
121 |
-
|
122 |
-
// clicking on input shouldn't check/uncheck the parent option
|
123 |
-
$('input.custom-input').on('click', function(e) {
|
124 |
-
e.stopPropagation();
|
125 |
-
});
|
126 |
-
|
127 |
-
|
128 |
// select theme via thumb
|
129 |
$('.ucp-thumb').on('click', function(e) {
|
130 |
e.preventDefault();
|
@@ -162,7 +133,7 @@ jQuery(document).ready(function($) {
|
|
162 |
});
|
163 |
|
164 |
|
165 |
-
//
|
166 |
$(document).on('click', '#ucp_preview', function(e) {
|
167 |
if ($('#ucp_form').serialize() != old_settings) {
|
168 |
if (!confirm('There are unsaved changes that will not be visible in the preview. Please save changes first.\nContinue?')) {
|
@@ -192,4 +163,4 @@ function ucp_fix_dialog_close(event, ui) {
|
|
192 |
jQuery('.ui-widget-overlay').bind('click', function(){
|
193 |
jQuery('#' + event.target.id).dialog('close');
|
194 |
});
|
195 |
-
} // ucp_fix_dialog_close
|
34 |
'modal': 1,
|
35 |
'resizable': false,
|
36 |
'zIndex': 9999,
|
37 |
+
'width': 705,
|
38 |
'height': 'auto',
|
39 |
'show': 'fade',
|
40 |
'hide': 'fade',
|
41 |
'open': function(event, ui) { ucp_fix_dialog_close(event, ui); },
|
42 |
'close': function(event, ui) { },
|
43 |
+
'autoOpen': ucp.open_survey,
|
44 |
'closeOnEscape': true
|
45 |
});
|
46 |
|
47 |
|
48 |
// turn questions into checkboxes
|
49 |
$('.question-wrapper').on('click', function(e) {
|
50 |
+
$('.question-wrapper').removeClass('selected');
|
51 |
+
$(this).addClass('selected');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
e.preventDefault();
|
54 |
return false;
|
59 |
$('.dismiss-survey').on('click', function(e) {
|
60 |
$('#features-survey-dialog').dialog('close');
|
61 |
|
62 |
+
$.post(ajaxurl, { survey: 'designs',
|
63 |
_ajax_nonce: ucp.nonce_dismiss_survey,
|
64 |
action: 'ucp_dismiss_survey'
|
65 |
});
|
71 |
|
72 |
// submit and hide survey
|
73 |
$('.submit-survey').on('click', function(e) {
|
74 |
+
if ($('.question-wrapper.selected').length != 1) {
|
75 |
+
alert('Please choose a design type you would like us to add next.');
|
76 |
return false;
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
|
|
79 |
answers = '';
|
80 |
$('.question-wrapper.selected').each(function(i, el) {
|
81 |
answers += $(el).data('value') + ',';
|
82 |
});
|
83 |
|
84 |
+
$.post(ajaxurl, { survey: 'designs',
|
85 |
answers: answers,
|
86 |
emailme: $('#features-survey-dialog #emailme:checked').val(),
|
87 |
+
custom_answer: '',
|
88 |
_ajax_nonce: ucp.nonce_submit_survey,
|
89 |
action: 'ucp_submit_survey'
|
90 |
});
|
96 |
return false;
|
97 |
});
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
// select theme via thumb
|
100 |
$('.ucp-thumb').on('click', function(e) {
|
101 |
e.preventDefault();
|
133 |
});
|
134 |
|
135 |
|
136 |
+
// warning if there are unsaved changes when previewing
|
137 |
$(document).on('click', '#ucp_preview', function(e) {
|
138 |
if ($('#ucp_form').serialize() != old_settings) {
|
139 |
if (!confirm('There are unsaved changes that will not be visible in the preview. Please save changes first.\nContinue?')) {
|
163 |
jQuery('.ui-widget-overlay').bind('click', function(){
|
164 |
jQuery('#' + event.target.id).dialog('close');
|
165 |
});
|
166 |
+
} // ucp_fix_dialog_close
|
readme.txt
CHANGED
@@ -3,15 +3,17 @@ Contributors: WebFactory
|
|
3 |
Tags: maintenance mode, maintenance page, coming soon page, landing page, under construction
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.7
|
6 |
-
Stable tag: 1.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
-
|
11 |
|
12 |
|
13 |
== Description ==
|
14 |
|
|
|
|
|
15 |
[youtube https://www.youtube.com/watch?v=fqqWrQENSDc]
|
16 |
|
17 |
A simple, no-nonsense plugin for all those situations when you have to hide the site behind an Under Construction page for a while. Live examples will be up soon on <a href="https://underconstructionpage.com/" rel="friend">Under Construction website</a>. Till then give us a shout on Twitter <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a> or check out the <a href="https://youtu.be/fqqWrQENSDc">video</a>.
|
@@ -85,20 +87,28 @@ Or if needed, upload manually;
|
|
85 |
15. Lighthouse
|
86 |
16. Hot Air Baloon
|
87 |
17. People at Work #2 theme
|
88 |
-
18.
|
89 |
-
19.
|
90 |
-
20.
|
91 |
-
21.
|
92 |
-
22.
|
|
|
93 |
|
94 |
|
95 |
== Changelog ==
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
= 1.90 =
|
98 |
* 2017/04/03
|
99 |
* new theme - People at Work #2
|
100 |
* small adjustements for new repo
|
101 |
* moved FontAwesome to CDN
|
|
|
102 |
|
103 |
= 1.85 =
|
104 |
* 2017/03/23
|
@@ -229,8 +239,36 @@ Sure! It works 100% with all plugins.
|
|
229 |
|
230 |
= What changes will it make to my site? =
|
231 |
|
232 |
-
None. Once you disable the construction mode
|
233 |
|
234 |
= It's not working!!! Arrrrrrrrr =
|
235 |
|
236 |
We did our very best to make Under Construction compatible with all plugins and themes, but problems can still happen. No worries, head over to the <a href="http://wordpress.org/support/plugin/under-construction-page">support forum</a> open a new thread, and we'll help you ASAP.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
Tags: maintenance mode, maintenance page, coming soon page, landing page, under construction
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.7
|
6 |
+
Stable tag: 1.95
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
+
Create an Under Construction, Maintenance Mode or Landing Page that takes 5 seconds to setup, while you're doing maintenance work on your site.
|
11 |
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
Create an Under Construction Page, Maintenance Mode Page or a Landing Page that takes **less than a minute to install & configure**. This plugin won't waste your time! UCP is simple, fast, efficient & user-friendly with great designs.
|
16 |
+
|
17 |
[youtube https://www.youtube.com/watch?v=fqqWrQENSDc]
|
18 |
|
19 |
A simple, no-nonsense plugin for all those situations when you have to hide the site behind an Under Construction page for a while. Live examples will be up soon on <a href="https://underconstructionpage.com/" rel="friend">Under Construction website</a>. Till then give us a shout on Twitter <a href="http://twitter.com/WebFactoryLtd">@WebFactoryLtd</a> or check out the <a href="https://youtu.be/fqqWrQENSDc">video</a>.
|
87 |
15. Lighthouse
|
88 |
16. Hot Air Baloon
|
89 |
17. People at Work #2 theme
|
90 |
+
18. Rocket Launch #2 theme
|
91 |
+
19. Main settings
|
92 |
+
20. Design settings
|
93 |
+
21. Content settings
|
94 |
+
22. Access settings
|
95 |
+
23. Support
|
96 |
|
97 |
|
98 |
== Changelog ==
|
99 |
|
100 |
+
= 1.95 =
|
101 |
+
* 2017/04/12
|
102 |
+
* new theme - Rocket Launch #2
|
103 |
+
* started working on marking strings for translation
|
104 |
+
* added designs survey
|
105 |
+
|
106 |
= 1.90 =
|
107 |
* 2017/04/03
|
108 |
* new theme - People at Work #2
|
109 |
* small adjustements for new repo
|
110 |
* moved FontAwesome to CDN
|
111 |
+
* we've crossed the 60k users mark :)
|
112 |
|
113 |
= 1.85 =
|
114 |
* 2017/03/23
|
239 |
|
240 |
= What changes will it make to my site? =
|
241 |
|
242 |
+
None. Once you disable the under construction mode your site will function as it did before.
|
243 |
|
244 |
= It's not working!!! Arrrrrrrrr =
|
245 |
|
246 |
We did our very best to make Under Construction compatible with all plugins and themes, but problems can still happen. No worries, head over to the <a href="http://wordpress.org/support/plugin/under-construction-page">support forum</a> open a new thread, and we'll help you ASAP.
|
247 |
+
|
248 |
+
= How can I work on my site while under construction mode is enabled? =
|
249 |
+
|
250 |
+
Make sure your user role (probably admin) is selected under _Access - Whitelisted User Roles_ option and open the site while logged in.
|
251 |
+
|
252 |
+
= How can I log in / access WordPress admin after under construction mode has been enabled? =
|
253 |
+
|
254 |
+
Enable the _Login Button_ option (found in Content tab), and a login link will be shown in the lower right corner of the under construction page.
|
255 |
+
|
256 |
+
= How do I add my logo to the page? =
|
257 |
+
|
258 |
+
Head over to the _Content_ tab and click "Add Media". Upload/select the logo, position it as you see fit and add other content.
|
259 |
+
|
260 |
+
= I've made changes to UCP, but they are not visible. What do I do? =
|
261 |
+
|
262 |
+
Click "Save Changes" one more time. Open your site and force refresh browser cache (Ctrl or Shift + F5). If that doesn't help it means you have a caching plugin installed. Purge/delete cache in that plugin or disable it.
|
263 |
+
|
264 |
+
= How can I get more designs? Where do I download them? =
|
265 |
+
|
266 |
+
We update the plugin every 7-10 days and each update comes with at least one new theme/design. There is no other way to get more designs nor a place to download them.
|
267 |
+
|
268 |
+
= How can I edit designs? =
|
269 |
+
|
270 |
+
There is an option to add custom CSS. If you want more than that you will have to edit the source files located in _/under-construction-page/themes/_.
|
271 |
+
|
272 |
+
= I have disabled UCP but the under construction page is still visible. How do I remove it? =
|
273 |
+
|
274 |
+
Open your site and force refresh browser cache (Ctrl or Shift + F5). If that doesn't help it means you have a caching plugin installed. Purge/delete cache in that plugin or disable it. If that fails too contact your hosting provider and ask them to empty the site cache for you.
|
themes/rocket_2/index.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* UnderConstructionPage
|
4 |
+
* Rocket #2 theme
|
5 |
+
* (c) Web factory Ltd, 2015 - 2017
|
6 |
+
*/
|
7 |
+
|
8 |
+
|
9 |
+
// this is an include only WP file
|
10 |
+
if (!defined('ABSPATH')) {
|
11 |
+
die;
|
12 |
+
}
|
13 |
+
?>
|
14 |
+
<!DOCTYPE html>
|
15 |
+
<html lang="en">
|
16 |
+
<head>
|
17 |
+
<meta charset="utf-8">
|
18 |
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
19 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
20 |
+
<title>[title]</title>
|
21 |
+
<meta name="description" content="[description]" />
|
22 |
+
<meta name="generator" content="[generator]">
|
23 |
+
<link rel="stylesheet" href="[theme-url-common]css/bootstrap.min.css?v=[version]" type="text/css">
|
24 |
+
<link rel="stylesheet" href="[theme-url]style.css?v=[version]" type="text/css">
|
25 |
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nunito:200,600,900">
|
26 |
+
[head]
|
27 |
+
</head>
|
28 |
+
|
29 |
+
<body>
|
30 |
+
<div id="hero-image">
|
31 |
+
<img src="[theme-url]rocket.png" alt="Site will launch soon" title="Site will launch soon">
|
32 |
+
</div>
|
33 |
+
<div class="container">
|
34 |
+
|
35 |
+
<div class="row">
|
36 |
+
<div class="col-xs-12 col-md-12 col-lg-12">
|
37 |
+
<h1>[heading1]</h1>
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
|
41 |
+
<div class="row">
|
42 |
+
<div class="col-xs-12 col-md-8 col-md-offset-2 col-lg-offset-2 col-lg-8">
|
43 |
+
<p class="content">[content]</p>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
|
47 |
+
<div class="row" id="social">
|
48 |
+
<div class="col-xs-12 col-md-12 col-lg-12">
|
49 |
+
[social-icons]
|
50 |
+
</div>
|
51 |
+
</div>
|
52 |
+
|
53 |
+
</div>
|
54 |
+
[footer]
|
55 |
+
</body>
|
56 |
+
</html>
|
themes/rocket_2/rocket.png
ADDED
Binary file
|
themes/rocket_2/style.css
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* UnderConstructionPage
|
3 |
+
* Rocket #2 theme CSS
|
4 |
+
* (c) Web factory Ltd, 2015 - 2017
|
5 |
+
*/
|
6 |
+
|
7 |
+
|
8 |
+
html {
|
9 |
+
height: 100%;
|
10 |
+
padding: 0;
|
11 |
+
margin: 0;
|
12 |
+
}
|
13 |
+
|
14 |
+
body {
|
15 |
+
font-weight: 400;
|
16 |
+
font-size: 14px;
|
17 |
+
line-height: 120%;
|
18 |
+
color: #fefefe;
|
19 |
+
background: #e53935;
|
20 |
+
background: -webkit-linear-gradient(to bottom, #e35d5b, #e53935);
|
21 |
+
background: linear-gradient(to bottom, #e35d5b, #e53935);
|
22 |
+
padding: 0;
|
23 |
+
margin: 0;
|
24 |
+
background-repeat: no-repeat;
|
25 |
+
background-attachment: fixed;
|
26 |
+
}
|
27 |
+
|
28 |
+
#hero-image {
|
29 |
+
text-align: center;
|
30 |
+
margin: 20px auto 10px auto;
|
31 |
+
}
|
32 |
+
|
33 |
+
#hero-image img {
|
34 |
+
max-width: 80%;
|
35 |
+
}
|
36 |
+
|
37 |
+
h1 {
|
38 |
+
font-size: 34px;
|
39 |
+
color: #fefefe;
|
40 |
+
font-family: "Nunito", sans-serif;
|
41 |
+
font-weight: 900;
|
42 |
+
margin: 20px 0 30px 0;
|
43 |
+
text-align: center;
|
44 |
+
}
|
45 |
+
|
46 |
+
.content {
|
47 |
+
text-align: center;
|
48 |
+
font-family: "Helvetica", "Arial", sans-serif;
|
49 |
+
}
|
50 |
+
|
51 |
+
#social {
|
52 |
+
text-align: center;
|
53 |
+
margin-top: 30px;
|
54 |
+
}
|
55 |
+
|
56 |
+
#social a i {
|
57 |
+
color: #fefefe;
|
58 |
+
margin: 10px;
|
59 |
+
box-sizing: content-box;
|
60 |
+
}
|
61 |
+
|
62 |
+
#social a:hover i {
|
63 |
+
color: #2C3D55;
|
64 |
+
}
|
65 |
+
|
66 |
+
@media(max-width:767px){
|
67 |
+
h1 {
|
68 |
+
font-size: 30px;
|
69 |
+
margin: 10px 0 30px 0;
|
70 |
+
}
|
71 |
+
#hero-image img {
|
72 |
+
max-width: 95%;
|
73 |
+
}
|
74 |
+
}
|
under-construction.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin URI: https://underconstructionpage.com/
|
5 |
Description: Hide your site behind a great looking under construction page while you do maintenance work.
|
6 |
Author: Web factory Ltd
|
7 |
-
Version: 1.
|
8 |
Author URI: http://www.webfactoryltd.com/
|
9 |
Text Domain: under-construction-page
|
10 |
Domain Path: lang
|
@@ -120,7 +120,7 @@ class UCP {
|
|
120 |
|
121 |
// display error message if WP version is too low
|
122 |
static function notice_min_wp_version() {
|
123 |
-
echo '<div class="error"><p>' . sprintf('UnderConstruction plugin <b>requires WordPress version 4.0</b> or higher to function properly. You are using WordPress version %s. Please <a href="%s">update it</a>.', get_bloginfo('version'), admin_url('update-core.php')) . '</p></div>';
|
124 |
} // notice_min_wp_version_error
|
125 |
|
126 |
|
@@ -252,19 +252,18 @@ class UCP {
|
|
252 |
$surveys = get_option(UCP_SURVEYS_KEY);
|
253 |
$meta = self::get_meta();
|
254 |
|
255 |
-
//
|
256 |
-
|
257 |
-
|
258 |
-
$open_features_survey = true;
|
259 |
} else {
|
260 |
-
$
|
261 |
}
|
262 |
|
263 |
$js_localize = array('undocumented_error' => __('An undocumented error has occured. Please refresh the page and try again.', 'under-construction-page'),
|
264 |
'plugin_name' => __('UnderConstructionPage', 'under-construction-page'),
|
265 |
'settings_url' => admin_url('options-general.php?page=ucp'),
|
266 |
-
'whitelisted_users_placeholder' => 'Select whitelisted user(s)',
|
267 |
-
'
|
268 |
'nonce_dismiss_survey' => wp_create_nonce('ucp_dismiss_survey'),
|
269 |
'nonce_submit_survey' => wp_create_nonce('ucp_submit_survey'),
|
270 |
'deactivate_confirmation' => __('Are you sure you want to deactivate UnderConstruction plugin?' . "\n" . 'If you are removing it because of a problem please contact our support. They will be more than happy to help.', 'under-construction-page'));
|
@@ -335,6 +334,7 @@ class UCP {
|
|
335 |
static function submit_survey_ajax() {
|
336 |
check_ajax_referer('ucp_submit_survey');
|
337 |
|
|
|
338 |
$meta = self::get_meta();
|
339 |
$surveys = get_option(UCP_SURVEYS_KEY);
|
340 |
|
@@ -351,7 +351,7 @@ class UCP {
|
|
351 |
'survey' => $vars['survey'],
|
352 |
'email' => $vars['emailme'],
|
353 |
'answers' => $vars['answers'],
|
354 |
-
'custom_answer' => $
|
355 |
'first_version' => $meta['first_version'],
|
356 |
'version' => UCP::$version,
|
357 |
'codebase' => 'free',
|
@@ -490,8 +490,10 @@ class UCP {
|
|
490 |
|
491 |
if ($options['linkback'] == '1') {
|
492 |
$tmp = md5(get_site_url());
|
493 |
-
if ($tmp[0] <
|
494 |
$out .= '<p id="linkback">Create stunning <a href="https://underconstructionpage.com/" target="_blank">under construction pages for WordPress</a> for free.</p>';
|
|
|
|
|
495 |
} else {
|
496 |
$out .= '<p id="linkback">Create free <a href="https://underconstructionpage.com/" target="_blank">landing pages for WordPress</a>.</p>';
|
497 |
}
|
@@ -500,10 +502,10 @@ class UCP {
|
|
500 |
if ($options['login_button'] == '1') {
|
501 |
if (is_user_logged_in()) {
|
502 |
$out .= '<div id="login-button" class="loggedin">';
|
503 |
-
$out .= '<a title="Open WordPress admin" href="' . get_site_url() . '/wp-admin/"><i class="fa fa-wordpress fa-2x" aria-hidden="true"></i></a>';
|
504 |
} else {
|
505 |
$out .= '<div id="login-button" class="loggedout">';
|
506 |
-
$out .= '<a title="Log in to WordPress admin" href="' . get_site_url() . '/wp-login.php"><i class="fa fa-wordpress fa-2x" aria-hidden="true"></i></a>';
|
507 |
}
|
508 |
$out .= '</div>';
|
509 |
}
|
@@ -673,7 +675,7 @@ class UCP {
|
|
673 |
$options = get_option('wf_mm');
|
674 |
|
675 |
if (self::is_construction_mode_enabled(true)) {
|
676 |
-
$message .= '<div class="message">Under construction mode is <b>enabled</b
|
677 |
}
|
678 |
|
679 |
return $message;
|
@@ -682,7 +684,7 @@ class UCP {
|
|
682 |
|
683 |
// add settings link to plugins page
|
684 |
static function plugin_action_links($links) {
|
685 |
-
$settings_link = '<a href="' . admin_url('options-general.php?page=ucp') . '" title="UnderConstruction Settings">Settings</a>';
|
686 |
array_unshift($links, $settings_link);
|
687 |
|
688 |
return $links;
|
@@ -691,7 +693,7 @@ class UCP {
|
|
691 |
|
692 |
// add links to plugin's description in plugins table
|
693 |
static function plugin_meta_links($links, $file) {
|
694 |
-
$support_link = '<a target="_blank" href="https://wordpress.org/support/plugin/under-construction-page" title="Get help">Support</a>';
|
695 |
|
696 |
if ($file == plugin_basename(__FILE__)) {
|
697 |
$links[] = $support_link;
|
@@ -722,8 +724,8 @@ class UCP {
|
|
722 |
'custom_css' => '',
|
723 |
'title' => '[site-title] is under construction',
|
724 |
'description' => '[site-tagline]',
|
725 |
-
'heading1' => 'Sorry, we\'re doing some work on the site',
|
726 |
-
'content' => 'Thank you for being patient. We are doing some work on the site and will be back shortly.',
|
727 |
'social_facebook' => '',
|
728 |
'social_twitter' => '',
|
729 |
'social_google' => '',
|
@@ -791,7 +793,7 @@ class UCP {
|
|
791 |
$options = self::check_var_isset($options, array('status' => 0, 'linkback' => 0, 'login_button' => 0));
|
792 |
|
793 |
if (!empty($options['ga_tracking_id']) && preg_match('/^UA-\d{3,}-\d{1,3}$/', $options['ga_tracking_id']) === 0) {
|
794 |
-
add_settings_error('ucp', 'ga_tracking_id', 'Please enter a valid Google Analytics Tracking ID, or leave empty to disable tracking.');
|
795 |
}
|
796 |
|
797 |
// empty cache in 3rd party plugins
|
@@ -883,7 +885,7 @@ class UCP {
|
|
883 |
echo '<table class="form-table">';
|
884 |
|
885 |
echo '<tr valign="top">
|
886 |
-
<th scope="row"><label for="status">Status</label></th>
|
887 |
<td><div class="onoffswitch">
|
888 |
<input ' . self::checked(1, $options['status']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[status]" class="onoffswitch-checkbox" id="status">
|
889 |
<label class="onoffswitch-label" for="status">
|
@@ -896,14 +898,14 @@ class UCP {
|
|
896 |
echo '</td></tr>';
|
897 |
|
898 |
echo '<tr valign="top">
|
899 |
-
<th scope="row"><label for="end_date">End Date & Time</label></th>
|
900 |
-
<td><input id="end_date" type="text" class="datepicker" name="' . UCP_OPTIONS_KEY . '[end_date]" value="' . esc_attr($options['end_date']) . '" placeholder="yyyy-mm-dd hh:mm"><span title="Open date & time picker" alt="Open date & time picker" class="show-datepicker dashicons dashicons-calendar-alt"></span> <span title="Clear date & time" alt="Clear date & time" class="clear-datepicker dashicons dashicons-no"></span>';
|
901 |
echo '<p class="description">If enabled, construction mode will automatically stop showing on the selected date.<br>
|
902 |
This option will not "auto-enable" construction mode. Status has to be set to "On".</p>';
|
903 |
echo '</td></tr>';
|
904 |
|
905 |
echo '<tr valign="top">
|
906 |
-
<th scope="row"><label for="ga_tracking_id">Google Analytics Tracking ID</label></th>
|
907 |
<td><input id="ga_tracking_id" type="text" class="code" name="' . UCP_OPTIONS_KEY . '[ga_tracking_id]" value="' . esc_attr($options['ga_tracking_id']) . '" placeholder="UA-xxxxxx-xx">';
|
908 |
echo '<p class="description">Enter the unique tracking ID found in your GA tracking profile settings to track visits to the page.<br>Leave blank to disable tracking.</p>';
|
909 |
echo '</td></tr>';
|
@@ -1081,27 +1083,28 @@ class UCP {
|
|
1081 |
|
1082 |
$img_path = UCP_PLUGIN_URL . 'images/thumbnails/';
|
1083 |
|
1084 |
-
$themes = array('mad_designer' => 'Mad Designer',
|
1085 |
-
'plain_text' => 'Plain Text',
|
1086 |
-
'under_construction' => 'Under Construction',
|
1087 |
-
'dark' => 'Things Went Dark',
|
1088 |
-
'forklift' => 'Forklift at Work',
|
1089 |
-
'under_construction_text' => 'Under Construction Text',
|
1090 |
-
'cyber_chick' => 'Cyber Chick',
|
1091 |
-
'rocket' => 'Rocket Launch',
|
1092 |
-
'loader' => 'Loader at Work',
|
1093 |
-
'cyber_chick_dark' => 'Cyber Chick Dark',
|
1094 |
-
'safe' => 'Safe',
|
1095 |
-
'people' => 'People at Work',
|
1096 |
-
'windmill' => 'Windmill',
|
1097 |
-
'sad_site' => 'Sad Site',
|
1098 |
-
'lighthouse' => 'Lighthouse',
|
1099 |
-
'hot_air_baloon' => 'Hot Air Baloon',
|
1100 |
-
'people_2' => 'People at Work #2')
|
|
|
1101 |
|
1102 |
echo '<table class="form-table">';
|
1103 |
echo '<tr valign="top">
|
1104 |
-
<th scope="row">Theme</th>
|
1105 |
<td>';
|
1106 |
echo '<input type="hidden" id="theme_id" name="' . UCP_OPTIONS_KEY . '[theme]" value="' . $options['theme'] . '">';
|
1107 |
|
@@ -1119,7 +1122,7 @@ class UCP {
|
|
1119 |
echo '</td></tr>';
|
1120 |
|
1121 |
echo '<tr valign="top">
|
1122 |
-
<th scope="row"><label for="custom_css">Custom CSS</label></th>
|
1123 |
<td>';
|
1124 |
echo '<textarea data-autoresize="1" rows="3" id="custom_css" class="code large-text" name="' . UCP_OPTIONS_KEY . '[custom_css]" placeholder=".selector { property-name: property-value; }">' . esc_textarea($options['custom_css']) . '</textarea>';
|
1125 |
echo '<p class="description"><style> tags will be added automatically. Do not include them in your code.<br>
|
@@ -1150,7 +1153,7 @@ class UCP {
|
|
1150 |
echo '<table class="form-table">';
|
1151 |
|
1152 |
echo '<tr valign="top" id="whitelisted-roles">
|
1153 |
-
<th scope="row">Whitelisted User Roles</th>
|
1154 |
<td>';
|
1155 |
|
1156 |
foreach ($roles as $tmp_role) {
|
@@ -1160,7 +1163,7 @@ class UCP {
|
|
1160 |
echo '</td></tr>';
|
1161 |
|
1162 |
echo '<tr valign="top">
|
1163 |
-
<th scope="row"><label for="whitelisted_users">Whitelisted Users</label></th>
|
1164 |
<td><select id="whitelisted_users" class="select2" style="width: 50%; max-width: 300px;" name="' . UCP_OPTIONS_KEY . '[whitelisted_users][]" multiple>';
|
1165 |
self::create_select_options($users, $options['whitelisted_users'], true);
|
1166 |
|
@@ -1173,7 +1176,7 @@ class UCP {
|
|
1173 |
|
1174 |
// support tab - FAQ and links
|
1175 |
static function tab_support() {
|
1176 |
-
echo '<h2>FAQ</h2>';
|
1177 |
|
1178 |
echo '<p><b>How can I work on my site while construction mode is enabled?</b><br>Make sure your user role (probably admin) is selected under <a class="change_tab" data-tab="3" href="#whitelisted-roles">Access - Whitelisted User Roles</a> and open the site while logged in.</p>';
|
1179 |
|
@@ -1218,11 +1221,11 @@ class UCP {
|
|
1218 |
settings_fields(UCP_OPTIONS_KEY);
|
1219 |
|
1220 |
$tabs = array();
|
1221 |
-
$tabs[] = array('id' => 'ucp_main', 'icon' => 'dashicons-admin-settings', 'class' => '', 'label' => 'Main', 'callback' => array(__CLASS__, 'tab_main'));
|
1222 |
-
$tabs[] = array('id' => 'ucp_design', 'icon' => 'dashicons-admin-customizer', 'class' => '', 'label' => 'Design', 'callback' => array(__CLASS__, 'tab_design'));
|
1223 |
-
$tabs[] = array('id' => 'ucp_content', 'icon' => 'dashicons-format-aside', 'class' => '', 'label' => 'Content', 'callback' => array(__CLASS__, 'tab_content'));
|
1224 |
-
$tabs[] = array('id' => 'ucp_access', 'icon' => 'dashicons-shield', 'class' => '', 'label' => 'Access', 'callback' => array(__CLASS__, 'tab_access'));
|
1225 |
-
$tabs[] = array('id' => 'ucp_support', 'icon' => 'dashicons-sos', 'class' => '', 'label' => 'Support', 'callback' => array(__CLASS__, 'tab_support'));
|
1226 |
$tabs = apply_filters('ucp_tabs', $tabs);
|
1227 |
|
1228 |
echo '<div id="ucp_tabs" class="ui-tabs" style="display: none;">';
|
@@ -1245,45 +1248,35 @@ class UCP {
|
|
1245 |
echo '</div>'; // ucp_tabs
|
1246 |
|
1247 |
echo '<p class="submit">';
|
1248 |
-
echo get_submit_button('Save Changes', 'primary large', 'submit', false);
|
1249 |
-
echo ' <a id="ucp_preview" href="' . get_home_url() . '/?ucp_preview" class="button button-large button-secondary" target="_blank">Preview</a>';
|
1250 |
echo '</p>';
|
1251 |
|
1252 |
echo '</form>'; // ucp_tabs
|
1253 |
echo '</div>'; // wrap
|
1254 |
|
1255 |
echo '<div id="features-survey-dialog" style="display: none;" title="Please help us make UCP better"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
|
1256 |
-
echo '<p>We strive to add
|
1257 |
|
1258 |
$questions = array();
|
1259 |
-
$questions[] = '<div class="question-wrapper" data-value="designs">' .
|
1260 |
-
'<
|
1261 |
-
'<
|
1262 |
-
'<span class="dashicons dashicons-yes"></span>' .
|
1263 |
'</div>';
|
1264 |
|
1265 |
-
$questions[] = '<div class="question-wrapper" data-value="
|
1266 |
-
'<
|
1267 |
-
'<
|
1268 |
-
'<span class="dashicons dashicons-yes"></span>' .
|
1269 |
'</div>';
|
1270 |
|
1271 |
-
$questions[] = '<div class="question-wrapper" data-value="
|
1272 |
-
'<
|
1273 |
-
'<
|
1274 |
-
'<span class="dashicons dashicons-yes"></span>' .
|
1275 |
'</div>';
|
1276 |
|
1277 |
-
$questions[] = '<div class="question-wrapper" data-value="
|
1278 |
-
'<
|
1279 |
-
'<
|
1280 |
-
'<span class="dashicons dashicons-yes"></span>' .
|
1281 |
-
'</div>';
|
1282 |
-
|
1283 |
-
$questions[] = '<div class="question-wrapper" data-value="custom">' .
|
1284 |
-
'<div class="question"><b>Something we missed? Enter the feature you need below:</b><br>' .
|
1285 |
-
'<input type="text" class="custom-input"></div>' .
|
1286 |
-
'<span class="dashicons dashicons-yes"></span>' .
|
1287 |
'</div>';
|
1288 |
|
1289 |
shuffle($questions);
|
@@ -1291,9 +1284,9 @@ class UCP {
|
|
1291 |
|
1292 |
$current_user = wp_get_current_user();
|
1293 |
echo '<div class="footer">';
|
1294 |
-
echo '<input id="emailme" type="checkbox" value="' . $current_user->user_email . '"> <label for="emailme">Email me on ' . $current_user->user_email . ' when new
|
1295 |
-
echo '<a data-survey="
|
1296 |
-
echo '<a href="#" class="dismiss-survey" data-survey="
|
1297 |
echo '</div>';
|
1298 |
|
1299 |
echo '</div>';
|
4 |
Plugin URI: https://underconstructionpage.com/
|
5 |
Description: Hide your site behind a great looking under construction page while you do maintenance work.
|
6 |
Author: Web factory Ltd
|
7 |
+
Version: 1.95
|
8 |
Author URI: http://www.webfactoryltd.com/
|
9 |
Text Domain: under-construction-page
|
10 |
Domain Path: lang
|
120 |
|
121 |
// display error message if WP version is too low
|
122 |
static function notice_min_wp_version() {
|
123 |
+
echo '<div class="error"><p>' . sprintf(__('UnderConstruction plugin <b>requires WordPress version 4.0</b> or higher to function properly. You are using WordPress version %s. Please <a href="%s">update it</a>.', 'under-construction-page'), get_bloginfo('version'), admin_url('update-core.php')) . '</p></div>';
|
124 |
} // notice_min_wp_version_error
|
125 |
|
126 |
|
252 |
$surveys = get_option(UCP_SURVEYS_KEY);
|
253 |
$meta = self::get_meta();
|
254 |
|
255 |
+
// survey is shown min 5 min after install
|
256 |
+
if (empty($surveys['designs']) && current_time('timestamp') - $meta['first_install'] > 300) {
|
257 |
+
$open_survey = true;
|
|
|
258 |
} else {
|
259 |
+
$open_survey = false;
|
260 |
}
|
261 |
|
262 |
$js_localize = array('undocumented_error' => __('An undocumented error has occured. Please refresh the page and try again.', 'under-construction-page'),
|
263 |
'plugin_name' => __('UnderConstructionPage', 'under-construction-page'),
|
264 |
'settings_url' => admin_url('options-general.php?page=ucp'),
|
265 |
+
'whitelisted_users_placeholder' => __('Select whitelisted user(s)', 'under-construction-page'),
|
266 |
+
'open_survey' => $open_survey,
|
267 |
'nonce_dismiss_survey' => wp_create_nonce('ucp_dismiss_survey'),
|
268 |
'nonce_submit_survey' => wp_create_nonce('ucp_submit_survey'),
|
269 |
'deactivate_confirmation' => __('Are you sure you want to deactivate UnderConstruction plugin?' . "\n" . 'If you are removing it because of a problem please contact our support. They will be more than happy to help.', 'under-construction-page'));
|
334 |
static function submit_survey_ajax() {
|
335 |
check_ajax_referer('ucp_submit_survey');
|
336 |
|
337 |
+
$options = self::get_options();
|
338 |
$meta = self::get_meta();
|
339 |
$surveys = get_option(UCP_SURVEYS_KEY);
|
340 |
|
351 |
'survey' => $vars['survey'],
|
352 |
'email' => $vars['emailme'],
|
353 |
'answers' => $vars['answers'],
|
354 |
+
'custom_answer' => $options['theme'],
|
355 |
'first_version' => $meta['first_version'],
|
356 |
'version' => UCP::$version,
|
357 |
'codebase' => 'free',
|
490 |
|
491 |
if ($options['linkback'] == '1') {
|
492 |
$tmp = md5(get_site_url());
|
493 |
+
if ($tmp[0] < 6) {
|
494 |
$out .= '<p id="linkback">Create stunning <a href="https://underconstructionpage.com/" target="_blank">under construction pages for WordPress</a> for free.</p>';
|
495 |
+
} elseif ($tmp[0] < 'B') {
|
496 |
+
$out .= '<p id="linkback">Create <a href="https://underconstructionpage.com/" target="_blank">free under construction page for WordPress</a> in under a minute.</p>';
|
497 |
} else {
|
498 |
$out .= '<p id="linkback">Create free <a href="https://underconstructionpage.com/" target="_blank">landing pages for WordPress</a>.</p>';
|
499 |
}
|
502 |
if ($options['login_button'] == '1') {
|
503 |
if (is_user_logged_in()) {
|
504 |
$out .= '<div id="login-button" class="loggedin">';
|
505 |
+
$out .= '<a title="' . __('Open WordPress admin', 'under-construction-page') . '" href="' . get_site_url() . '/wp-admin/"><i class="fa fa-wordpress fa-2x" aria-hidden="true"></i></a>';
|
506 |
} else {
|
507 |
$out .= '<div id="login-button" class="loggedout">';
|
508 |
+
$out .= '<a title="' . __('Log in to WordPress admin', 'under-construction-page') . '" href="' . get_site_url() . '/wp-login.php"><i class="fa fa-wordpress fa-2x" aria-hidden="true"></i></a>';
|
509 |
}
|
510 |
$out .= '</div>';
|
511 |
}
|
675 |
$options = get_option('wf_mm');
|
676 |
|
677 |
if (self::is_construction_mode_enabled(true)) {
|
678 |
+
$message .= '<div class="message">' . __('Under construction mode is <b>enabled</b>.', 'under-construction-page') . '</div>';
|
679 |
}
|
680 |
|
681 |
return $message;
|
684 |
|
685 |
// add settings link to plugins page
|
686 |
static function plugin_action_links($links) {
|
687 |
+
$settings_link = '<a href="' . admin_url('options-general.php?page=ucp') . '" title="' . __('UnderConstruction Settings', 'under-construction-page') . '">Settings</a>';
|
688 |
array_unshift($links, $settings_link);
|
689 |
|
690 |
return $links;
|
693 |
|
694 |
// add links to plugin's description in plugins table
|
695 |
static function plugin_meta_links($links, $file) {
|
696 |
+
$support_link = '<a target="_blank" href="https://wordpress.org/support/plugin/under-construction-page" title="' . __('Get help', 'under-construction-page') . '">' . __('Support', 'under-construction-page') . '</a>';
|
697 |
|
698 |
if ($file == plugin_basename(__FILE__)) {
|
699 |
$links[] = $support_link;
|
724 |
'custom_css' => '',
|
725 |
'title' => '[site-title] is under construction',
|
726 |
'description' => '[site-tagline]',
|
727 |
+
'heading1' => __('Sorry, we\'re doing some work on the site', 'under-construction-page'),
|
728 |
+
'content' => __('Thank you for being patient. We are doing some work on the site and will be back shortly.', 'under-construction-page'),
|
729 |
'social_facebook' => '',
|
730 |
'social_twitter' => '',
|
731 |
'social_google' => '',
|
793 |
$options = self::check_var_isset($options, array('status' => 0, 'linkback' => 0, 'login_button' => 0));
|
794 |
|
795 |
if (!empty($options['ga_tracking_id']) && preg_match('/^UA-\d{3,}-\d{1,3}$/', $options['ga_tracking_id']) === 0) {
|
796 |
+
add_settings_error('ucp', 'ga_tracking_id', __('Please enter a valid Google Analytics Tracking ID, or leave empty to disable tracking.', 'under-construction-page'));
|
797 |
}
|
798 |
|
799 |
// empty cache in 3rd party plugins
|
885 |
echo '<table class="form-table">';
|
886 |
|
887 |
echo '<tr valign="top">
|
888 |
+
<th scope="row"><label for="status">' . __('Status', 'under-construction-page') . '</label></th>
|
889 |
<td><div class="onoffswitch">
|
890 |
<input ' . self::checked(1, $options['status']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[status]" class="onoffswitch-checkbox" id="status">
|
891 |
<label class="onoffswitch-label" for="status">
|
898 |
echo '</td></tr>';
|
899 |
|
900 |
echo '<tr valign="top">
|
901 |
+
<th scope="row"><label for="end_date">' . __('End Date & Time', 'under-construction-page') . '</label></th>
|
902 |
+
<td><input id="end_date" type="text" class="datepicker" name="' . UCP_OPTIONS_KEY . '[end_date]" value="' . esc_attr($options['end_date']) . '" placeholder="yyyy-mm-dd hh:mm"><span title="' . __('Open date & time picker', 'under-construction-page') . '" alt="' . __('Open date & time picker', 'under-construction-page') . '" class="show-datepicker dashicons dashicons-calendar-alt"></span> <span title="Clear date & time" alt="' . __('Clear date & time', 'under-construction-page') . '" class="clear-datepicker dashicons dashicons-no"></span>';
|
903 |
echo '<p class="description">If enabled, construction mode will automatically stop showing on the selected date.<br>
|
904 |
This option will not "auto-enable" construction mode. Status has to be set to "On".</p>';
|
905 |
echo '</td></tr>';
|
906 |
|
907 |
echo '<tr valign="top">
|
908 |
+
<th scope="row"><label for="ga_tracking_id">' . __('Google Analytics Tracking ID', 'under-construction-page') . '</label></th>
|
909 |
<td><input id="ga_tracking_id" type="text" class="code" name="' . UCP_OPTIONS_KEY . '[ga_tracking_id]" value="' . esc_attr($options['ga_tracking_id']) . '" placeholder="UA-xxxxxx-xx">';
|
910 |
echo '<p class="description">Enter the unique tracking ID found in your GA tracking profile settings to track visits to the page.<br>Leave blank to disable tracking.</p>';
|
911 |
echo '</td></tr>';
|
1083 |
|
1084 |
$img_path = UCP_PLUGIN_URL . 'images/thumbnails/';
|
1085 |
|
1086 |
+
$themes = array('mad_designer' => __('Mad Designer', 'under-construction-page'),
|
1087 |
+
'plain_text' => __('Plain Text', 'under-construction-page'),
|
1088 |
+
'under_construction' => __('Under Construction', 'under-construction-page'),
|
1089 |
+
'dark' => __('Things Went Dark', 'under-construction-page'),
|
1090 |
+
'forklift' => __('Forklift at Work', 'under-construction-page'),
|
1091 |
+
'under_construction_text' => __('Under Construction Text', 'under-construction-page'),
|
1092 |
+
'cyber_chick' => __('Cyber Chick', 'under-construction-page'),
|
1093 |
+
'rocket' => __('Rocket Launch', 'under-construction-page'),
|
1094 |
+
'loader' => __('Loader at Work', 'under-construction-page'),
|
1095 |
+
'cyber_chick_dark' => __('Cyber Chick Dark', 'under-construction-page'),
|
1096 |
+
'safe' => __('Safe', 'under-construction-page'),
|
1097 |
+
'people' => __('People at Work', 'under-construction-page'),
|
1098 |
+
'windmill' => __('Windmill', 'under-construction-page'),
|
1099 |
+
'sad_site' => __('Sad Site', 'under-construction-page'),
|
1100 |
+
'lighthouse' => __('Lighthouse', 'under-construction-page'),
|
1101 |
+
'hot_air_baloon' => __('Hot Air Baloon', 'under-construction-page'),
|
1102 |
+
'people_2' => __('People at Work #2', 'under-construction-page'),
|
1103 |
+
'rocket_2' => __('Rocket Launch #2', 'under-construction-page'));
|
1104 |
|
1105 |
echo '<table class="form-table">';
|
1106 |
echo '<tr valign="top">
|
1107 |
+
<th scope="row">' . __('Theme', 'under-construction-page') . '</th>
|
1108 |
<td>';
|
1109 |
echo '<input type="hidden" id="theme_id" name="' . UCP_OPTIONS_KEY . '[theme]" value="' . $options['theme'] . '">';
|
1110 |
|
1122 |
echo '</td></tr>';
|
1123 |
|
1124 |
echo '<tr valign="top">
|
1125 |
+
<th scope="row"><label for="custom_css">' . __('Custom CSS', 'under-construction-page') . '</label></th>
|
1126 |
<td>';
|
1127 |
echo '<textarea data-autoresize="1" rows="3" id="custom_css" class="code large-text" name="' . UCP_OPTIONS_KEY . '[custom_css]" placeholder=".selector { property-name: property-value; }">' . esc_textarea($options['custom_css']) . '</textarea>';
|
1128 |
echo '<p class="description"><style> tags will be added automatically. Do not include them in your code.<br>
|
1153 |
echo '<table class="form-table">';
|
1154 |
|
1155 |
echo '<tr valign="top" id="whitelisted-roles">
|
1156 |
+
<th scope="row">' . __('Whitelisted User Roles', 'under-construction-page') . '</th>
|
1157 |
<td>';
|
1158 |
|
1159 |
foreach ($roles as $tmp_role) {
|
1163 |
echo '</td></tr>';
|
1164 |
|
1165 |
echo '<tr valign="top">
|
1166 |
+
<th scope="row"><label for="whitelisted_users">' . __('Whitelisted Users', 'under-construction-page') . '</label></th>
|
1167 |
<td><select id="whitelisted_users" class="select2" style="width: 50%; max-width: 300px;" name="' . UCP_OPTIONS_KEY . '[whitelisted_users][]" multiple>';
|
1168 |
self::create_select_options($users, $options['whitelisted_users'], true);
|
1169 |
|
1176 |
|
1177 |
// support tab - FAQ and links
|
1178 |
static function tab_support() {
|
1179 |
+
echo '<h2>' . __('FAQ', 'under-construction-page') . '</h2>';
|
1180 |
|
1181 |
echo '<p><b>How can I work on my site while construction mode is enabled?</b><br>Make sure your user role (probably admin) is selected under <a class="change_tab" data-tab="3" href="#whitelisted-roles">Access - Whitelisted User Roles</a> and open the site while logged in.</p>';
|
1182 |
|
1221 |
settings_fields(UCP_OPTIONS_KEY);
|
1222 |
|
1223 |
$tabs = array();
|
1224 |
+
$tabs[] = array('id' => 'ucp_main', 'icon' => 'dashicons-admin-settings', 'class' => '', 'label' => __('Main', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_main'));
|
1225 |
+
$tabs[] = array('id' => 'ucp_design', 'icon' => 'dashicons-admin-customizer', 'class' => '', 'label' => __('Design', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_design'));
|
1226 |
+
$tabs[] = array('id' => 'ucp_content', 'icon' => 'dashicons-format-aside', 'class' => '', 'label' => __('Content', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_content'));
|
1227 |
+
$tabs[] = array('id' => 'ucp_access', 'icon' => 'dashicons-shield', 'class' => '', 'label' => __('Access', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_access'));
|
1228 |
+
$tabs[] = array('id' => 'ucp_support', 'icon' => 'dashicons-sos', 'class' => '', 'label' => __('Support', 'under-construction-page'), 'callback' => array(__CLASS__, 'tab_support'));
|
1229 |
$tabs = apply_filters('ucp_tabs', $tabs);
|
1230 |
|
1231 |
echo '<div id="ucp_tabs" class="ui-tabs" style="display: none;">';
|
1248 |
echo '</div>'; // ucp_tabs
|
1249 |
|
1250 |
echo '<p class="submit">';
|
1251 |
+
echo get_submit_button(__('Save Changes', 'under-construction-page'), 'primary large', 'submit', false);
|
1252 |
+
echo ' <a id="ucp_preview" href="' . get_home_url() . '/?ucp_preview" class="button button-large button-secondary" target="_blank">' . __('Preview', 'under-construction-page') . '</a>';
|
1253 |
echo '</p>';
|
1254 |
|
1255 |
echo '</form>'; // ucp_tabs
|
1256 |
echo '</div>'; // wrap
|
1257 |
|
1258 |
echo '<div id="features-survey-dialog" style="display: none;" title="Please help us make UCP better"><span class="ui-helper-hidden-accessible"><input type="text"/></span>';
|
1259 |
+
echo '<p>We strive to add new feature to <span class="ucp-logo">UnderConstructionPage</span> every week and want to make them as usefull as possible. <b>What designs should we continue to add to UCP?</b></p>';
|
1260 |
|
1261 |
$questions = array();
|
1262 |
+
$questions[] = '<div class="question-wrapper" data-value="current-designs">' .
|
1263 |
+
'<img src="' . UCP_PLUGIN_URL . 'images/thumbnails/rocket.png" alt="Designs similar to ones we already have" title="Designs similar to ones we already have">' .
|
1264 |
+
'<div class="question"><b>Designs similar to ones we already have</b></div>' .
|
|
|
1265 |
'</div>';
|
1266 |
|
1267 |
+
$questions[] = '<div class="question-wrapper" data-value="photo-designs">' .
|
1268 |
+
'<img src="' . UCP_PLUGIN_URL .'images/survey-designs-photo.png" alt="Serious looking designs based on photographs" title="Serious looking designs based on photographs">' .
|
1269 |
+
'<div class="question"><b>"Serious" looking designs based on photos</b></div>' .
|
|
|
1270 |
'</div>';
|
1271 |
|
1272 |
+
$questions[] = '<div class="question-wrapper" data-value="plain-designs">' .
|
1273 |
+
'<img src="' . UCP_PLUGIN_URL . 'images/thumbnails/plain_text.png" alt="Plain, no thrills designs based on typography" title="Plain, no thrills designs based on typography">' .
|
1274 |
+
'<div class="question"><b>Plain, no thrills designs based on typography</b></div>' .
|
|
|
1275 |
'</div>';
|
1276 |
|
1277 |
+
$questions[] = '<div class="question-wrapper" data-value="theme-designs">' .
|
1278 |
+
'<span class="dashicons big dashicons-media-document"></span>'.
|
1279 |
+
'<div class="question"><b>Use theme design / pick any existing page</b></div>' .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1280 |
'</div>';
|
1281 |
|
1282 |
shuffle($questions);
|
1284 |
|
1285 |
$current_user = wp_get_current_user();
|
1286 |
echo '<div class="footer">';
|
1287 |
+
echo '<input id="emailme" type="checkbox" value="' . $current_user->user_email . '"> <label for="emailme">Email me on ' . $current_user->user_email . ' when new designs are added</label><br>';
|
1288 |
+
echo '<a data-survey="designs-survey" class="submit-survey button-primary button button-large" href="#">Add those new designs ASAP!</a>';
|
1289 |
+
echo '<a href="#" class="dismiss-survey" data-survey="designs-survey"><small><i>Close this survey and never show it again</i></small></a>';
|
1290 |
echo '</div>';
|
1291 |
|
1292 |
echo '</div>';
|