Under Construction - Version 1.45

Version Description

  • 2017/01/16
  • 1 new theme - Rocket Launch
  • added "Site Description" SEO option
  • added 2 social icons: Behance & Instagram
  • features survey is shown to users to decide what features will be developed next
Download this release

Release Info

Developer WebFactory
Plugin Icon 128x128 Under Construction
Version 1.45
Comparing to
See all releases

Code changes from version 1.40 to 1.45

css/ucp-admin.css CHANGED
@@ -7,10 +7,7 @@
7
  @import url('//fonts.googleapis.com/css?family=Roboto:900');
8
 
9
  .settings_page_ucp h1 {
10
- font-weight: 900;
11
- font-variant: small-caps;
12
  margin-bottom: 30px;
13
- font-family: 'Roboto', sans-serif;
14
  }
15
 
16
  .form-table th {
@@ -63,7 +60,7 @@ div.ucp-thumb img, .ucp-thumb-special img {
63
  .ucp-list {
64
  list-style-type: circle;
65
  list-style-position: outside;
66
- margin-left: 14px;
67
  }
68
 
69
  input[type=url]:invalid {
@@ -116,6 +113,133 @@ input.datepicker {
116
  background-color: #ffffff;
117
  }
118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  @media screen and (max-width: 782px) {
120
  .settings_page_ucp input[type=text].datepicker {
121
  max-width: 80%;
7
  @import url('//fonts.googleapis.com/css?family=Roboto:900');
8
 
9
  .settings_page_ucp h1 {
 
 
10
  margin-bottom: 30px;
 
11
  }
12
 
13
  .form-table th {
60
  .ucp-list {
61
  list-style-type: circle;
62
  list-style-position: outside;
63
+ margin-left: 14px;
64
  }
65
 
66
  input[type=url]:invalid {
113
  background-color: #ffffff;
114
  }
115
 
116
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
117
+ margin-top: 6px;
118
+ margin-bottom: 0px;
119
+ }
120
+
121
+ span.select2-container .select2-search--inline .select2-search__field {
122
+ margin-top: 0px;
123
+ }
124
+
125
+ .select2-container .select2-search__field:not([placeholder='']) {
126
+ width: 100% !important;
127
+ margin-right: 100000px;
128
+ }
129
+
130
+ .ucp-logo {
131
+ font-variant: small-caps;
132
+ font-family: Roboto, sans-serif;
133
+ font-weight: 900;
134
+ }
135
+
136
+ .ui-widget-overlay {
137
+ opacity: 0.85;
138
+ }
139
+
140
+ .ucp-survey-dialog .ui-dialog-titlebar {
141
+ text-align: center;
142
+ font-weight: bold;
143
+ }
144
+
145
+ .ucp-survey-dialog .ui-dialog-titlebar-close {
146
+ display: none;
147
+ }
148
+
149
+ .ucp-survey-dialog .ui-dialog-content {
150
+ padding: 20px 25px;
151
+ font-size: 15px;
152
+ }
153
+
154
+ .ucp-survey-dialog b {
155
+ font-weight: bold;
156
+ }
157
+
158
+ .ucp-survey-dialog .footer {
159
+ margin: 20px 0 0 0;
160
+ text-align: center;
161
+ }
162
+
163
+ .ucp-survey-dialog .footer #emailme {
164
+ margin: 0 5px -3px 0;
165
+ }
166
+
167
+ .ucp-survey-dialog .footer .button-primary {
168
+ border-radius: 0;
169
+ font-size: 15px;
170
+ box-shadow: none;
171
+ text-shadow: none;
172
+ margin-top: 5px;
173
+ }
174
+
175
+ .ucp-survey-dialog .footer .dismiss-survey {
176
+ padding-top: 25px;
177
+ display: block;
178
+ }
179
+
180
+ .ucp-survey-dialog .ui-dialog-content p {
181
+ margin: 0 0 20px 0;
182
+ font-size: 15px;
183
+ }
184
+
185
+ .question-wrapper {
186
+ border: 2px solid rgba(0,0,0,0.2);
187
+ padding: 10px;
188
+ background-color: rgba(250,250,250,0.55);
189
+ margin-bottom: 10px;
190
+ opacity: 0.75;
191
+ }
192
+
193
+ .question-wrapper:hover {
194
+ opacity: 1;
195
+ border: 2px solid rgba(0, 142, 194, 1);
196
+ cursor: pointer;
197
+ margin-bottom: 10px;
198
+ }
199
+
200
+ .question-wrapper.selected {
201
+ opacity: 1;
202
+ border: 2px solid rgba(0, 142, 194, 1);
203
+ margin-bottom: 10px;
204
+ }
205
+
206
+ .question-wrapper .dashicons {
207
+ color: rgba(0, 142, 194, 0.25);
208
+ float: left;
209
+ width: 40px;
210
+ height: 40px;
211
+ display: inline-block;
212
+ }
213
+
214
+ .question-wrapper.selected .dashicons {
215
+ color: rgba(0, 142, 194, 1);
216
+ }
217
+ .question-wrapper .dashicons:before {
218
+ width: 40px;
219
+ height: 40px;
220
+ font-size: 40px;
221
+ }
222
+
223
+ .question-wrapper .custom-input {
224
+ margin: 0;
225
+ width: 100%;
226
+ font-size: 12px;
227
+ padding: 2px;
228
+ }
229
+
230
+ .question-wrapper .question {
231
+ margin-left: -40px;
232
+ display: inline-block;
233
+ width: 100%;
234
+ padding-left: 50px;
235
+ box-sizing: border-box;
236
+ }
237
+
238
+ .question-wrapper i {
239
+ padding-top: 5px;
240
+ font-size: 14px;
241
+ }
242
+
243
  @media screen and (max-width: 782px) {
244
  .settings_page_ucp input[type=text].datepicker {
245
  max-width: 80%;
images/rocket.png ADDED
Binary file
js/ucp-admin-pointers.js CHANGED
@@ -15,7 +15,7 @@ jQuery(document).ready(function($){
15
  return true;
16
  }
17
  $(pointer.target).pointer({
18
- content: '<h3>Under Construction</h3><p>' + pointer.content + '</p>',
19
  position: {
20
  edge: pointer.edge,
21
  align: pointer.align
15
  return true;
16
  }
17
  $(pointer.target).pointer({
18
+ content: '<h3>UnderConstructionPage</h3><p>' + pointer.content + '</p>',
19
  position: {
20
  edge: pointer.edge,
21
  align: pointer.align
js/ucp-admin.js CHANGED
@@ -8,6 +8,7 @@
8
  jQuery(document).ready(function($) {
9
  old_settings = $('#ucp_form').serialize();
10
 
 
11
  $('#ucp_tabs').tabs({
12
  activate: function(event, ui) {
13
  Cookies.set('ucp_tabs_selected', $('#ucp_tabs').tabs('option', 'active'), { expires: 180 });
@@ -15,8 +16,106 @@ jQuery(document).ready(function($) {
15
  active: $('#ucp_tabs').tabs({ active: Cookies.get('ucp_tabs_selected') })
16
  }).show();
17
 
18
- $('#whitelisted_users').select2({ 'placeholder': 'Select whitelisted user(s)'});
 
19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  $('.ucp-thumb').on('click', function(e) {
21
  e.preventDefault();
22
 
@@ -28,8 +127,12 @@ jQuery(document).ready(function($) {
28
  return false;
29
  });
30
 
 
 
31
  $('.datepicker').AnyTime_picker({ format: "%Y-%m-%d %H:%i", firstDOW: 1, earliest: new Date(), labelTitle: "Select the date &amp; time when construction mode will be disabled" } );
32
 
 
 
33
  $('.clear-datepicker').on('click', function(e) {
34
  e.preventDefault();
35
 
@@ -38,6 +141,8 @@ jQuery(document).ready(function($) {
38
  return false;
39
  });
40
 
 
 
41
  $('.show-datepicker').on('click', function(e) {
42
  e.preventDefault();
43
 
@@ -46,6 +151,8 @@ jQuery(document).ready(function($) {
46
  return false;
47
  });
48
 
 
 
49
  $(document).on('click', '#ucp_preview', function(e) {
50
  if ($('#ucp_form').serialize() != old_settings) {
51
  if (!confirm('There are unsaved changes that will not be visible in the preview. Please save changes first.\nContinue?')) {
@@ -57,6 +164,8 @@ jQuery(document).ready(function($) {
57
  return true;
58
  });
59
 
 
 
60
  $(document).on('click', '.change_tab', function(e) {
61
  $('#ucp_tabs').tabs('option', 'active', $(this).data('tab'));
62
 
@@ -67,3 +176,10 @@ jQuery(document).ready(function($) {
67
  }
68
  });
69
  }); // on ready
 
 
 
 
 
 
 
8
  jQuery(document).ready(function($) {
9
  old_settings = $('#ucp_form').serialize();
10
 
11
+ // init tabs
12
  $('#ucp_tabs').tabs({
13
  activate: function(event, ui) {
14
  Cookies.set('ucp_tabs_selected', $('#ucp_tabs').tabs('option', 'active'), { expires: 180 });
16
  active: $('#ucp_tabs').tabs({ active: Cookies.get('ucp_tabs_selected') })
17
  }).show();
18
 
19
+ // init select2
20
+ $('#whitelisted_users').select2({ 'placeholder': ucp.whitelisted_users_placeholder});
21
 
22
+ // maybe init survey dialog
23
+ $('#features-survey-dialog').dialog({'dialogClass': 'wp-dialog ucp-dialog ucp-survey-dialog',
24
+ 'modal': 1,
25
+ 'resizable': false,
26
+ 'zIndex': 9999,
27
+ 'width': 570,
28
+ 'height': 'auto',
29
+ 'show': 'fade',
30
+ 'hide': 'fade',
31
+ 'open': function(event, ui) { ucp_fix_dialog_close(event, ui); },
32
+ 'close': function(event, ui) { },
33
+ 'autoOpen': ucp.open_features_survey,
34
+ 'closeOnEscape': true
35
+ });
36
+
37
+
38
+ // turn questions into checkboxes
39
+ $('.question-wrapper').on('click', function(e) {
40
+ if ($(this).hasClass('selected')) {
41
+ $(this).removeClass('selected');
42
+ } else {
43
+ if ($('.question-wrapper.selected').length >= 2) {
44
+ alert('You can only choose 2 features at a time');
45
+ } else {
46
+ $(this).addClass('selected');
47
+ }
48
+ }
49
+
50
+ e.preventDefault();
51
+ return false;
52
+ });
53
+
54
+
55
+ // dismiss survey forever
56
+ $('.dismiss-survey').on('click', function(e) {
57
+ $('#features-survey-dialog').dialog('close');
58
+
59
+ $.post(ajaxurl, { survey: 'features',
60
+ _ajax_nonce: ucp.nonce_dismiss_survey,
61
+ action: 'ucp_dismiss_survey'
62
+ });
63
+
64
+ e.preventDefault();
65
+ return false;
66
+ });
67
+
68
+
69
+ // submit and hide survey
70
+ $('.submit-survey').on('click', function(e) {
71
+ if ($('.question-wrapper.selected').length != 2) {
72
+ alert('Please choose 2 features you would like us to build next.');
73
+ return false;
74
+ }
75
+
76
+ if ($('#features-survey-dialog .custom-input').val() == '' && $('#features-survey-dialog .custom-input').parents('div.question-wrapper').hasClass('selected')) {
77
+ alert('Please describe the custom feature you would like us to build next.');
78
+ return false;
79
+ }
80
+
81
+ answers = '';
82
+ $('.question-wrapper.selected').each(function(i, el) {
83
+ answers += $(el).data('value') + ',';
84
+ });
85
+
86
+ $.post(ajaxurl, { survey: 'features',
87
+ answers: answers,
88
+ emailme: $('#features-survey-dialog #emailme:checked').val(),
89
+ custom_answer: $('#features-survey-dialog .custom-input').val(),
90
+ _ajax_nonce: ucp.nonce_submit_survey,
91
+ action: 'ucp_submit_survey'
92
+ });
93
+
94
+ alert('Thank you for your time! We appriciate your input!');
95
+
96
+ $('#features-survey-dialog').dialog('close');
97
+ e.preventDefault();
98
+ return false;
99
+ });
100
+
101
+
102
+ // autoselect custom answer when something is typed in
103
+ $('#features-survey-dialog .custom-input').on('change keypress', function(e) {
104
+ if ($(this).val().length > 2 && $('.question-wrapper.selected').length < 2) {
105
+ $(this).parents('.question-wrapper').addClass('selected');
106
+ }
107
+
108
+ return true;
109
+ });
110
+
111
+
112
+ // clicking on input shouldn't check/uncheck the parent option
113
+ $('input.custom-input').on('click', function(e) {
114
+ e.stopPropagation();
115
+ });
116
+
117
+
118
+ // select theme via thumb
119
  $('.ucp-thumb').on('click', function(e) {
120
  e.preventDefault();
121
 
127
  return false;
128
  });
129
 
130
+
131
+ // init datepicker
132
  $('.datepicker').AnyTime_picker({ format: "%Y-%m-%d %H:%i", firstDOW: 1, earliest: new Date(), labelTitle: "Select the date &amp; time when construction mode will be disabled" } );
133
 
134
+
135
+ // reset/clear datepicker
136
  $('.clear-datepicker').on('click', function(e) {
137
  e.preventDefault();
138
 
141
  return false;
142
  });
143
 
144
+
145
+ // fix when opening datepicker
146
  $('.show-datepicker').on('click', function(e) {
147
  e.preventDefault();
148
 
151
  return false;
152
  });
153
 
154
+
155
+ // preview warns if there are unsaved changes
156
  $(document).on('click', '#ucp_preview', function(e) {
157
  if ($('#ucp_form').serialize() != old_settings) {
158
  if (!confirm('There are unsaved changes that will not be visible in the preview. Please save changes first.\nContinue?')) {
164
  return true;
165
  });
166
 
167
+
168
+ // helper for linking anchors in different tabs
169
  $(document).on('click', '.change_tab', function(e) {
170
  $('#ucp_tabs').tabs('option', 'active', $(this).data('tab'));
171
 
176
  }
177
  });
178
  }); // on ready
179
+
180
+
181
+ function ucp_fix_dialog_close(event, ui) {
182
+ jQuery('.ui-widget-overlay').bind('click', function(){
183
+ jQuery('#' + event.target.id).dialog('close');
184
+ });
185
+ } // ucp_fix_dialog_close
readme.txt CHANGED
@@ -1,13 +1,13 @@
1
  === Under Construction ===
2
  Contributors: WebFactory
3
- Tags: under construction page, coming soon page, maintenance, maintenance page, coming soon, maintenance mode, under construction mode, coming soon mode, site unavailable, under construction, landing page
4
  Requires at least: 4.0
5
  Tested up to: 4.7
6
- Stable tag: 1.40
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
- Display an Under Construction Page or Landing Page that takes less than 5 seconds to setup while you're doing maintenance work on your site.
11
 
12
 
13
  == Description ==
@@ -21,10 +21,11 @@ A simple, no-nonsense plugin for all those situations when you have to hide the
21
  * End date & time - automatically disable construction mode on a set date
22
  * Google Analytics Tracking ID - enable tracking via Google Analytics
23
  * Theme - a new one is added with each update, <a href="https://wordpress.org/plugins/under-construction-page/screenshots/">see screenshots</a>
24
- * Title
25
- * Headline
26
- * Content
27
- * Social icons/links:
 
28
  * Facebook
29
  * Twitter
30
  * Google+
@@ -32,6 +33,8 @@ A simple, no-nonsense plugin for all those situations when you have to hide the
32
  * YouTube
33
  * Pinterest
34
  * Dribbble
 
 
35
  * Whitelisted User Roles - user roles who see the site, instead of maintenance page
36
  * Whitelisted Users - users who see the site, instead of maintenance page
37
 
@@ -62,20 +65,29 @@ Or if needed, upload manually;
62
  5. Things Went Dark theme
63
  6. Forklift at Work theme
64
  7. Cyber Chick theme
65
- 8. Main settings
66
- 9. Design settings
67
- 10. Content settings
68
- 11. Access settings
 
69
 
70
 
71
  == Changelog ==
72
 
 
 
 
 
 
 
 
73
  = 1.40 =
74
  * 2017/01/03
75
  * 1 new theme - Cyber Chick
76
  * added "Google Analytics Tracking ID" option
77
  * added "Whitelisted Users" option
78
  * added "Show some Love" option
 
79
 
80
  = 1.35 =
81
  * 2016/12/23
1
  === Under Construction ===
2
  Contributors: WebFactory
3
+ Tags: under construction page, coming soon page, maintenance, maintenance page, coming soon, maintenance mode, under construction mode, coming soon mode, site unavailable, under construction, landing page, construction, launch, launch page, offline
4
  Requires at least: 4.0
5
  Tested up to: 4.7
6
+ Stable tag: 1.45
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
+ Display 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 ==
21
  * End date & time - automatically disable construction mode on a set date
22
  * Google Analytics Tracking ID - enable tracking via Google Analytics
23
  * Theme - a new one is added with each update, <a href="https://wordpress.org/plugins/under-construction-page/screenshots/">see screenshots</a>
24
+ * Title - page title, for SEO
25
+ * Description - page description, for SEO
26
+ * Headline - main headline/title
27
+ * Content - anything you need to display, from styled text to images
28
+ * Social icons/links - new ones are added with every update; let us know if we missed your favorite ones
29
  * Facebook
30
  * Twitter
31
  * Google+
33
  * YouTube
34
  * Pinterest
35
  * Dribbble
36
+ * Behance
37
+ * Instagram
38
  * Whitelisted User Roles - user roles who see the site, instead of maintenance page
39
  * Whitelisted Users - users who see the site, instead of maintenance page
40
 
65
  5. Things Went Dark theme
66
  6. Forklift at Work theme
67
  7. Cyber Chick theme
68
+ 8. Rocket Launch theme
69
+ 9. Main settings
70
+ 10. Design settings
71
+ 11. Content settings
72
+ 12. Access settings
73
 
74
 
75
  == Changelog ==
76
 
77
+ = 1.45 =
78
+ * 2017/01/16
79
+ * 1 new theme - Rocket Launch
80
+ * added "Site Description" SEO option
81
+ * added 2 social icons: Behance & Instagram
82
+ * features survey is shown to users to decide what features will be developed next
83
+
84
  = 1.40 =
85
  * 2017/01/03
86
  * 1 new theme - Cyber Chick
87
  * added "Google Analytics Tracking ID" option
88
  * added "Whitelisted Users" option
89
  * added "Show some Love" option
90
+ * we've crossed the 30k users mark
91
 
92
  = 1.35 =
93
  * 2016/12/23
themes/cyber_chick/style.css CHANGED
@@ -23,6 +23,8 @@ body {
23
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d2d3d5', endColorstr='#fafafa',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
24
  padding: 0;
25
  margin: 0;
 
 
26
  }
27
 
28
  #hero-image {
23
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d2d3d5', endColorstr='#fafafa',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
24
  padding: 0;
25
  margin: 0;
26
+ background-repeat: no-repeat;
27
+ background-attachment: fixed;
28
  }
29
 
30
  #hero-image {
themes/dark/style.css CHANGED
@@ -19,6 +19,8 @@ body {
19
  background: #212f3c;
20
  padding: 0;
21
  margin: 0;
 
 
22
  }
23
 
24
  #hero-image {
19
  background: #212f3c;
20
  padding: 0;
21
  margin: 0;
22
+ background-repeat: no-repeat;
23
+ background-attachment: fixed;
24
  }
25
 
26
  #hero-image {
themes/forklift/style.css CHANGED
@@ -23,6 +23,8 @@ body {
23
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fd6439', endColorstr='#fafafa',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
24
  padding: 0;
25
  margin: 0;
 
 
26
  }
27
 
28
  #hero-image {
23
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fd6439', endColorstr='#fafafa',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
24
  padding: 0;
25
  margin: 0;
26
+ background-repeat: no-repeat;
27
+ background-attachment: fixed;
28
  }
29
 
30
  #hero-image {
themes/mad_designer/style.css CHANGED
@@ -23,6 +23,8 @@ body {
23
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d2d3d5', endColorstr='#fafafa',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
24
  padding: 0;
25
  margin: 0;
 
 
26
  }
27
 
28
  #hero-image {
23
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d2d3d5', endColorstr='#fafafa',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
24
  padding: 0;
25
  margin: 0;
26
+ background-repeat: no-repeat;
27
+ background-attachment: fixed;
28
  }
29
 
30
  #hero-image {
themes/plain_text/ucp-cog.png CHANGED
Binary file
themes/rocket/index.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Under Construction
4
+ * Rocket theme
5
+ * (c) Web factory Ltd, 2015 - 2016
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="Under Construction plugin for WordPress">
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
+ <link rel="stylesheet" href="[theme-url-common]css/font-awesome.min.css?v=[version]" type="text/css">
27
+ [head]
28
+ </head>
29
+
30
+ <body>
31
+ <div id="hero-image">
32
+ <img src="[theme-url]rocket.png" alt="Rocket Launch" title="Rocket Launch">
33
+ </div>
34
+ <div class="container">
35
+
36
+ <div class="row">
37
+ <div class="col-xs-12 col-md-12 col-lg-12">
38
+ <h1>[heading1]</h1>
39
+ </div>
40
+ </div>
41
+
42
+ <div class="row">
43
+ <div class="col-xs-12 col-md-8 col-md-offset-2 col-lg-offset-2 col-lg-8">
44
+ <p class="content">[content]</p>
45
+ </div>
46
+ </div>
47
+
48
+ <div class="row" id="social">
49
+ <div class="col-xs-12 col-md-12 col-lg-12">
50
+ [social-icons]
51
+ </div>
52
+ </div>
53
+
54
+ </div>
55
+ [footer]
56
+ </body>
57
+ </html>
themes/rocket/rocket.png ADDED
Binary file
themes/rocket/style.css ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Under Construction
3
+ * Rocket theme CSS
4
+ * (c) Web factory Ltd, 2015 - 2016
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: #2C3D55;
19
+ background: #93b9dc; /* Old browsers */
20
+ xbackground: -moz-linear-gradient(-45deg, #93b9dc 0%,#93b9dc 44%,#b7cee2 80%); /* FF3.6-15 */
21
+ xbackground: -webkit-linear-gradient(-45deg, #93b9dc 0%,#93b9dc 44%,#b7cee2 80%); /* Chrome10-25,Safari5.1-6 */
22
+ background: linear-gradient(135deg, #93b9dc 0%,#93b9dc 44%,#b7cee2 80%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
23
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#93b9dc', endColorstr='#b7cee2',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
24
+ padding: 0;
25
+ margin: 0;
26
+ background-repeat: no-repeat;
27
+ background-attachment: fixed;
28
+ }
29
+
30
+ #hero-image {
31
+ text-align: center;
32
+ margin: 20px auto 10px auto;
33
+ border-bottom: 5px solid #414042;
34
+ }
35
+
36
+ #hero-image img {
37
+ max-width: 80%;
38
+ }
39
+
40
+ h1 {
41
+ font-size: 34px;
42
+ color: #2C3D55;
43
+ font-family: "Nunito", sans-serif;
44
+ font-weight: 900;
45
+ margin: 20px 0 30px 0;
46
+ text-align: center;
47
+ }
48
+
49
+ .content {
50
+ text-align: center;
51
+ font-family: "Helvetica", "Arial", sans-serif;
52
+ }
53
+
54
+ #social {
55
+ text-align: center;
56
+ margin-top: 30px;
57
+ }
58
+
59
+ #social a i {
60
+ color: #2C3D55;
61
+ margin: 10px;
62
+ box-sizing: content-box;
63
+ }
64
+
65
+ #social a:hover i {
66
+ color: #E8C547;
67
+ }
68
+
69
+ #linkback {
70
+ font-size: small;
71
+ text-align: center;
72
+ opacity: 0.55;
73
+ margin: 10px;
74
+ }
75
+
76
+ @media(max-width:767px){
77
+ h1 {
78
+ font-size: 30px;
79
+ margin: 10px 0 30px 0;
80
+ }
81
+ #hero-image img {
82
+ max-width: 95%;
83
+ }
84
+ #hero-image {
85
+ border-bottom: 3px solid #414042;
86
+ }
87
+ }
themes/under_construction/style.css CHANGED
@@ -23,6 +23,8 @@ body {
23
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d2d3d5', endColorstr='#fafafa',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
24
  padding: 0;
25
  margin: 0;
 
 
26
  }
27
 
28
  #hero-image {
23
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d2d3d5', endColorstr='#fafafa',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
24
  padding: 0;
25
  margin: 0;
26
+ background-repeat: no-repeat;
27
+ background-attachment: fixed;
28
  }
29
 
30
  #hero-image {
themes/under_construction_text/style.css CHANGED
@@ -22,6 +22,9 @@ body {
22
  background: linear-gradient(0deg, #fcb10d 0%, #fcb10d 44%, rgba(252, 177, 13, 0.75) 80%, rgba(252, 177, 13, 0.70) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
23
  padding: 0;
24
  margin: 0;
 
 
 
25
  }
26
 
27
  #hero-image {
22
  background: linear-gradient(0deg, #fcb10d 0%, #fcb10d 44%, rgba(252, 177, 13, 0.75) 80%, rgba(252, 177, 13, 0.70) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
23
  padding: 0;
24
  margin: 0;
25
+ height: 100%;
26
+ background-repeat: no-repeat;
27
+ background-attachment: fixed;
28
  }
29
 
30
  #hero-image {
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.40
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
  Domain Path: lang
@@ -38,10 +38,12 @@ define('UCP_OPTIONS_KEY', 'ucp_options');
38
  define('UCP_META_KEY', 'ucp_meta');
39
  define('UCP_POINTERS_KEY', 'ucp_pointers');
40
  define('UCP_NOTICES_KEY', 'ucp_notices');
 
41
 
42
  // main plugin class
43
  class UCP {
44
  static $version = 0;
 
45
 
46
 
47
  // get plugin version from header
@@ -84,6 +86,8 @@ class UCP {
84
 
85
  // AJAX endpoints
86
  add_action('wp_ajax_ucp_dismiss_pointer', array(__CLASS__, 'dismiss_pointer_ajax'));
 
 
87
  } else {
88
  // main plugin logic
89
  add_action('wp', array(__CLASS__, 'display_construction_page'), 0, 1);
@@ -116,7 +120,7 @@ class UCP {
116
 
117
  // display error message if WP version is too low
118
  static function notice_min_wp_version() {
119
- echo '<div class="error"><p>' . sprintf('Under Construction 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>';
120
  } // notice_min_wp_version_error
121
 
122
 
@@ -222,21 +226,38 @@ class UCP {
222
 
223
  // enqueue CSS and JS scripts in admin
224
  static function admin_enqueue_scripts($hook) {
 
 
 
 
 
 
 
 
 
 
225
  wp_enqueue_style('ucp-toolbar', UCP_PLUGIN_URL . 'css/ucp-toolbar.css', array(), self::$version);
226
 
227
  $js_localize = array('undocumented_error' => __('An undocumented error has occured. Please refresh the page and try again.', 'under-construction-page'),
228
- 'plugin_name' => __('Under Construction', 'under-construction-page'),
229
  'settings_url' => admin_url('options-general.php?page=ucp'),
230
- 'deactivate_confirmation' => __('Are you sure you want to deactivate Under Construction 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'));
 
 
 
 
231
 
232
  if ('settings_page_ucp' == $hook) {
233
- wp_enqueue_style('ucp-admin', UCP_PLUGIN_URL . 'css/ucp-admin.css', array(), self::$version);
234
  wp_enqueue_style('ucp-select2', UCP_PLUGIN_URL . 'css/select2.min.css', array(), self::$version);
 
235
 
236
  wp_enqueue_script('jquery-ui-tabs');
 
237
  wp_enqueue_script('ucp-jquery-plugins', UCP_PLUGIN_URL . 'js/ucp-jquery-plugins.js', array('jquery'), self::$version, true);
238
  wp_enqueue_script('ucp-select2', UCP_PLUGIN_URL . 'js/select2.min.js', array(), self::$version, true);
239
  wp_enqueue_script('ucp-admin', UCP_PLUGIN_URL . 'js/ucp-admin.js', array('jquery'), self::$version, true);
 
240
  }
241
 
242
  if ('plugins.php' == $hook) {
@@ -273,6 +294,61 @@ class UCP {
273
  } // dismiss_pointer_ajax
274
 
275
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  // parse shortcode alike variables
277
  static function parse_vars($string) {
278
  $vars = array('site-title' => get_bloginfo('name'),
@@ -316,6 +392,12 @@ class UCP {
316
  if (!empty($options['social_dribbble'])) {
317
  $out .= '<a href="' . $options['social_dribbble'] . '" target="_blank"><i class="fa fa-dribbble fa-3x"></i></a>';
318
  }
 
 
 
 
 
 
319
 
320
  return $out;
321
  } // generate_social_icons
@@ -347,7 +429,7 @@ class UCP {
347
  if ($options['linkback'] == 1) {
348
  $tmp = md5(get_site_url());
349
  if ($tmp[0] < 9) {
350
- $out .= '<p id="linkback">Create great looking <a href="https://underconstructionpage.com/" target="_blank">under construction pages for WordPress</a> for free.</p>';
351
  } else {
352
  $out .= '<p id="linkback">Create free <a href="https://underconstructionpage.com/" target="_blank">landing pages for WordPress</a>.</p>';
353
  }
@@ -370,7 +452,7 @@ class UCP {
370
  $vars['title'] = self::parse_vars($options['title']);
371
  $vars['heading1'] = self::parse_vars($options['heading1']);
372
  $vars['content'] = nl2br(self::parse_vars($options['content']));
373
- $vars['description'] = get_bloginfo('description');
374
  $vars['social-icons'] = self::generate_social_icons($options, $template_id);
375
  $vars['head'] = self::generate_head($options, $template_id);
376
  $vars['footer'] = self::generate_footer($options, $template_id);
@@ -443,7 +525,7 @@ class UCP {
443
  $rate_url = 'https://wordpress.org/support/plugin/under-construction-page/reviews/?rate=5#new-post';
444
  $dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'rate', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
445
 
446
- echo '<div id="ucp_rate_notice" class="notice-info notice"><p>Hi! We saw you\'ve been using <b>Under Construction</b> plugin for a few days and wanted to ask for your help to <b>make the plugin better</b>.<br>We just need a minute of your time to rate the plugin. Thank you!';
447
 
448
  echo '<br><a target="_blank" href="' . esc_url($rate_url) . '" style="vertical-align: baseline; margin-top: 15px;" class="button-primary">Help us out &amp; rate the plugin</a>';
449
  echo '&nbsp;&nbsp;<a href="' . esc_url($dismiss_url) . '">I\'ve already rated the plugin</a>';
@@ -482,10 +564,10 @@ class UCP {
482
  global $wp_admin_bar;
483
 
484
  if (self::is_construction_mode_enabled(true)) {
485
- $title = '<span class="dashicons dashicons-admin-generic"></span> <span class="ab-label">Under Construction mode is <strong>enabled</strong></span>';
486
  $class = 'ucp-enabled';
487
  } else {
488
- $title = '<span class="dashicons dashicons-admin-generic"></span> <span class="ab-label">Under Construction mode is disabled</span>';
489
  $class = 'ucp-disabled';
490
  }
491
 
@@ -504,7 +586,7 @@ class UCP {
504
  $options = get_option('wf_mm');
505
 
506
  if (self::is_construction_mode_enabled(true)) {
507
- $message .= '<div class="message">Under Construction mode is <b>enabled</b>.</div>';
508
  }
509
 
510
  return $message;
@@ -513,7 +595,7 @@ class UCP {
513
 
514
  // add settings link to plugins page
515
  static function plugin_action_links($links) {
516
- $settings_link = '<a href="' . admin_url('options-general.php?page=ucp') . '" title="Under Construction Settings">Settings</a>';
517
  array_unshift($links, $settings_link);
518
 
519
  return $links;
@@ -534,7 +616,7 @@ class UCP {
534
 
535
  // create the admin menu item
536
  static function admin_menu() {
537
- add_options_page('Under Construction', 'Under Construction', 'manage_options', 'ucp', array(__CLASS__, 'main_page'));
538
  } // admin_menu
539
 
540
 
@@ -551,6 +633,7 @@ class UCP {
551
  'ga_tracking_id' => '',
552
  'theme' => 'mad_designer',
553
  'title' => '[site-title] is under construction',
 
554
  'heading1' => 'Sorry, we\'re doing some work on the site',
555
  'content' => 'Thank you for being patient. We are doing some work on the site and will be back shortly.',
556
  'social_facebook' => '',
@@ -560,6 +643,8 @@ class UCP {
560
  'social_youtube' => '',
561
  'social_pinterest' => '',
562
  'social_dribbble' => '',
 
 
563
  'linkback' => '0',
564
  'roles' => array('administrator'),
565
  'whitelisted_users' => array()
@@ -576,6 +661,7 @@ class UCP {
576
  foreach ($options as $key => $value) {
577
  switch ($key) {
578
  case 'title':
 
579
  case 'heading1':
580
  case 'content':
581
  case 'social_facebook':
@@ -585,6 +671,8 @@ class UCP {
585
  case 'social_youtube':
586
  case 'social_pinterest':
587
  case 'social_dribbble':
 
 
588
  $options[$key] = trim($value);
589
  break;
590
  case 'ga_tracking_id':
@@ -596,8 +684,8 @@ class UCP {
596
  } // switch
597
  } // foreach
598
 
599
- $options['roles'] = (array) $options['roles'];
600
- $options['whitelisted_users'] = (array) $options['whitelisted_users'];
601
  $options = self::check_var_isset($options, array('status' => 0, 'linkback' => 0));
602
 
603
  if (!empty($options['ga_tracking_id']) && preg_match('/^UA-\d{3,}-\d{1,3}$/', $options['ga_tracking_id']) === 0) {
@@ -605,7 +693,7 @@ class UCP {
605
  }
606
 
607
  // empty cache in 3rd party plugins
608
- if ($options['status'] != $old_options['status']) {
609
  if (function_exists('w3tc_pgcache_flush')) {
610
  w3tc_pgcache_flush();
611
  }
@@ -742,10 +830,16 @@ class UCP {
742
  </ul>';
743
  echo '</td></tr>';
744
 
 
 
 
 
 
 
745
  echo '<tr valign="top">
746
  <th scope="row"><label for="heading1">Headline</label></th>
747
  <td><input id="heading1" type="text" class="large-text" name="' . UCP_OPTIONS_KEY . '[heading1]" value="' . $options['heading1'] . '" />';
748
- echo '<p class="description">Page heading/title (see above for available <a href="#title">shortcodes</a>). Default: ' . $default_options['heading1'] . '</p>';
749
  echo '</td></tr>';
750
 
751
  echo '<tr valign="top">
@@ -797,6 +891,18 @@ class UCP {
797
  echo '<p class="description">Complete URL, with http prefix, to Dribbble profile.</p>';
798
  echo '</td></tr>';
799
 
 
 
 
 
 
 
 
 
 
 
 
 
800
  echo '<tr valign="top">
801
  <th scope="row"><label for="linkback">Show some Love</label></th>
802
  <td><div class="onoffswitch">
@@ -819,7 +925,7 @@ class UCP {
819
 
820
  $img_path = UCP_PLUGIN_URL . 'images/';
821
 
822
- $themes = array('mad_designer' => 'Mad Designer', 'plain_text' => 'Plain Text', 'under_construction' => 'Under Construction', 'dark' => 'Things Went Dark', 'forklift' => 'Forklift at Work', 'under_construction_text' => 'Under Construction Text', 'cyber_chick' => 'Cyber Chick');
823
 
824
  echo '<table class="form-table">';
825
  echo '<tr valign="top">
@@ -908,7 +1014,7 @@ class UCP {
908
  $default_options = self::default_options();
909
 
910
  echo '<div class="wrap">
911
- <h1><img src="' . UCP_PLUGIN_URL . '/images/under-construction-page-logo.png" alt="UnderConstructionPage" title="UnderConstructionPage">UnderConstructionPage</h1>';
912
 
913
  echo '<form action="options.php" method="post" id="ucp_form">';
914
  settings_fields(UCP_OPTIONS_KEY);
@@ -950,13 +1056,55 @@ class UCP {
950
 
951
  echo '</form>'; // ucp_tabs
952
  echo '</div>'; // wrap
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
953
  } // options_page
954
 
955
 
956
  // reset all pointers to default state - visible
957
  static function reset_pointers() {
958
  $pointers = array();
959
- $pointers['welcome'] = array('target' => '#menu-settings', 'edge' => 'left', 'align' => 'right', 'content' => 'Thank you for installing the <b>Under Construction</b> plugin! Please open <a href="' . admin_url('options-general.php?page=ucp'). '">Settings - Under Construction</a> to create a beautiful under construction page.');
960
 
961
  update_option(UCP_POINTERS_KEY, $pointers);
962
  } // reset_pointers
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.45
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
  Domain Path: lang
38
  define('UCP_META_KEY', 'ucp_meta');
39
  define('UCP_POINTERS_KEY', 'ucp_pointers');
40
  define('UCP_NOTICES_KEY', 'ucp_notices');
41
+ define('UCP_SURVEYS_KEY', 'ucp_surveys');
42
 
43
  // main plugin class
44
  class UCP {
45
  static $version = 0;
46
+ static $licensing_servers = array('https://license1.underconstructionpage.com/', 'https://license2.underconstructionpage.com/');
47
 
48
 
49
  // get plugin version from header
86
 
87
  // AJAX endpoints
88
  add_action('wp_ajax_ucp_dismiss_pointer', array(__CLASS__, 'dismiss_pointer_ajax'));
89
+ add_action('wp_ajax_ucp_dismiss_survey', array(__CLASS__, 'dismiss_survey_ajax'));
90
+ add_action('wp_ajax_ucp_submit_survey', array(__CLASS__, 'submit_survey_ajax'));
91
  } else {
92
  // main plugin logic
93
  add_action('wp', array(__CLASS__, 'display_construction_page'), 0, 1);
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
 
226
 
227
  // enqueue CSS and JS scripts in admin
228
  static function admin_enqueue_scripts($hook) {
229
+ $surveys = get_option(UCP_SURVEYS_KEY);
230
+ $meta = self::get_meta();
231
+
232
+ // features survey is shown min 5min after install
233
+ if (empty($surveys['features']) && current_time('timestamp') - $meta['first_install'] > 300) {
234
+ $open_features_survey = true;
235
+ } else {
236
+ $open_features_survey = false;
237
+ }
238
+
239
  wp_enqueue_style('ucp-toolbar', UCP_PLUGIN_URL . 'css/ucp-toolbar.css', array(), self::$version);
240
 
241
  $js_localize = array('undocumented_error' => __('An undocumented error has occured. Please refresh the page and try again.', 'under-construction-page'),
242
+ 'plugin_name' => __('UnderConstruction', 'under-construction-page'),
243
  'settings_url' => admin_url('options-general.php?page=ucp'),
244
+ 'whitelisted_users_placeholder' => 'Select whitelisted user(s)',
245
+ 'open_features_survey' => $open_features_survey,
246
+ 'nonce_dismiss_survey' => wp_create_nonce('ucp_dismiss_survey'),
247
+ 'nonce_submit_survey' => wp_create_nonce('ucp_submit_survey'),
248
+ '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'));
249
 
250
  if ('settings_page_ucp' == $hook) {
251
+ wp_enqueue_style('wp-jquery-ui-dialog');
252
  wp_enqueue_style('ucp-select2', UCP_PLUGIN_URL . 'css/select2.min.css', array(), self::$version);
253
+ wp_enqueue_style('ucp-admin', UCP_PLUGIN_URL . 'css/ucp-admin.css', array(), self::$version);
254
 
255
  wp_enqueue_script('jquery-ui-tabs');
256
+ wp_enqueue_script('jquery-ui-dialog');
257
  wp_enqueue_script('ucp-jquery-plugins', UCP_PLUGIN_URL . 'js/ucp-jquery-plugins.js', array('jquery'), self::$version, true);
258
  wp_enqueue_script('ucp-select2', UCP_PLUGIN_URL . 'js/select2.min.js', array(), self::$version, true);
259
  wp_enqueue_script('ucp-admin', UCP_PLUGIN_URL . 'js/ucp-admin.js', array('jquery'), self::$version, true);
260
+ wp_localize_script('ucp-admin', 'ucp', $js_localize);
261
  }
262
 
263
  if ('plugins.php' == $hook) {
294
  } // dismiss_pointer_ajax
295
 
296
 
297
+ // permanently dismiss a survey
298
+ static function dismiss_survey_ajax() {
299
+ check_ajax_referer('ucp_dismiss_survey');
300
+
301
+ $surveys = get_option(UCP_SURVEYS_KEY, array());
302
+ $survey = trim($_POST['survey']);
303
+
304
+ $surveys[$survey] = -1;
305
+ update_option(UCP_SURVEYS_KEY, $surveys);
306
+
307
+ wp_send_json_success();
308
+ } // dismiss_survey_ajax
309
+
310
+
311
+ // submit survey
312
+ static function submit_survey_ajax() {
313
+ check_ajax_referer('ucp_submit_survey');
314
+
315
+ $meta = self::get_meta();
316
+ $surveys = get_option(UCP_SURVEYS_KEY);
317
+
318
+ $vars = wp_parse_args($_POST, array('survey' => '', 'answers' => '', 'custom_answer' => '', 'emailme' => ''));
319
+ $vars['answers'] = trim($vars['answers'], ',');
320
+ $vars['custom_answer'] = trim(strip_tags($vars['custom_answer']));
321
+
322
+ if (empty($vars['survey']) || empty($vars['answers'])) {
323
+ wp_send_json_error();
324
+ }
325
+
326
+ $request_params = array('sslverify' => false, 'timeout' => 15, 'redirection' => 2);
327
+ $request_args = array('action' => 'submit_survey',
328
+ 'survey' => $vars['survey'],
329
+ 'email' => $vars['emailme'],
330
+ 'answers' => $vars['answers'],
331
+ 'custom_answer' => $vars['custom_answer'],
332
+ 'first_version' => $meta['first_version'],
333
+ 'version' => UCP::$version,
334
+ 'codebase' => 'free',
335
+ 'site' => get_home_url());
336
+
337
+ $url = add_query_arg($request_args, self::$licensing_servers[0]);
338
+ $response = wp_remote_get(esc_url_raw($url), $request_params);
339
+
340
+ if (is_wp_error($response) || !wp_remote_retrieve_body($response)) {
341
+ $url = add_query_arg($request_args, self::$licensing_servers[1]);
342
+ $response = wp_remote_get(esc_url_raw($url), $request_params);
343
+ }
344
+
345
+ $surveys[$vars['survey']] = current_time('timestamp');
346
+ update_option(UCP_SURVEYS_KEY, $surveys);
347
+
348
+ wp_send_json_success();
349
+ } // submit_survey_ajax
350
+
351
+
352
  // parse shortcode alike variables
353
  static function parse_vars($string) {
354
  $vars = array('site-title' => get_bloginfo('name'),
392
  if (!empty($options['social_dribbble'])) {
393
  $out .= '<a href="' . $options['social_dribbble'] . '" target="_blank"><i class="fa fa-dribbble fa-3x"></i></a>';
394
  }
395
+ if (!empty($options['social_behance'])) {
396
+ $out .= '<a href="' . $options['social_behance'] . '" target="_blank"><i class="fa fa-behance-square fa-3x"></i></a>';
397
+ }
398
+ if (!empty($options['social_instagram'])) {
399
+ $out .= '<a href="' . $options['social_instagram'] . '" target="_blank"><i class="fa fa-instagram fa-3x"></i></a>';
400
+ }
401
 
402
  return $out;
403
  } // generate_social_icons
429
  if ($options['linkback'] == 1) {
430
  $tmp = md5(get_site_url());
431
  if ($tmp[0] < 9) {
432
+ $out .= '<p id="linkback">Create stunning <a href="https://underconstructionpage.com/" target="_blank">under construction pages for WordPress</a> for free.</p>';
433
  } else {
434
  $out .= '<p id="linkback">Create free <a href="https://underconstructionpage.com/" target="_blank">landing pages for WordPress</a>.</p>';
435
  }
452
  $vars['title'] = self::parse_vars($options['title']);
453
  $vars['heading1'] = self::parse_vars($options['heading1']);
454
  $vars['content'] = nl2br(self::parse_vars($options['content']));
455
+ $vars['description'] = self::parse_vars($options['description']);
456
  $vars['social-icons'] = self::generate_social_icons($options, $template_id);
457
  $vars['head'] = self::generate_head($options, $template_id);
458
  $vars['footer'] = self::generate_footer($options, $template_id);
525
  $rate_url = 'https://wordpress.org/support/plugin/under-construction-page/reviews/?rate=5#new-post';
526
  $dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'rate', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
527
 
528
+ echo '<div id="ucp_rate_notice" class="notice-info notice is-dismissible"><p>Hi! We saw you\'ve been using <b class="ucp-logo" style="font-weight: bold;">UnderConstructionPage</b> plugin for a few days and wanted to ask for your help to <b>make the plugin better</b>.<br>We just need a minute of your time to rate the plugin. Thank you!';
529
 
530
  echo '<br><a target="_blank" href="' . esc_url($rate_url) . '" style="vertical-align: baseline; margin-top: 15px;" class="button-primary">Help us out &amp; rate the plugin</a>';
531
  echo '&nbsp;&nbsp;<a href="' . esc_url($dismiss_url) . '">I\'ve already rated the plugin</a>';
564
  global $wp_admin_bar;
565
 
566
  if (self::is_construction_mode_enabled(true)) {
567
+ $title = '<span class="dashicons dashicons-admin-generic"></span> <span class="ab-label">Under construction mode is <strong>enabled</strong></span>';
568
  $class = 'ucp-enabled';
569
  } else {
570
+ $title = '<span class="dashicons dashicons-admin-generic"></span> <span class="ab-label">Under construction mode is disabled</span>';
571
  $class = 'ucp-disabled';
572
  }
573
 
586
  $options = get_option('wf_mm');
587
 
588
  if (self::is_construction_mode_enabled(true)) {
589
+ $message .= '<div class="message">Under construction mode is <b>enabled</b>.</div>';
590
  }
591
 
592
  return $message;
595
 
596
  // add settings link to plugins page
597
  static function plugin_action_links($links) {
598
+ $settings_link = '<a href="' . admin_url('options-general.php?page=ucp') . '" title="UnderConstruction Settings">Settings</a>';
599
  array_unshift($links, $settings_link);
600
 
601
  return $links;
616
 
617
  // create the admin menu item
618
  static function admin_menu() {
619
+ add_options_page('UnderConstruction', 'UnderConstruction', 'manage_options', 'ucp', array(__CLASS__, 'main_page'));
620
  } // admin_menu
621
 
622
 
633
  'ga_tracking_id' => '',
634
  'theme' => 'mad_designer',
635
  'title' => '[site-title] is under construction',
636
+ 'description' => '[site-tagline]',
637
  'heading1' => 'Sorry, we\'re doing some work on the site',
638
  'content' => 'Thank you for being patient. We are doing some work on the site and will be back shortly.',
639
  'social_facebook' => '',
643
  'social_youtube' => '',
644
  'social_pinterest' => '',
645
  'social_dribbble' => '',
646
+ 'social_behance' => '',
647
+ 'social_instagram' => '',
648
  'linkback' => '0',
649
  'roles' => array('administrator'),
650
  'whitelisted_users' => array()
661
  foreach ($options as $key => $value) {
662
  switch ($key) {
663
  case 'title':
664
+ case 'description':
665
  case 'heading1':
666
  case 'content':
667
  case 'social_facebook':
671
  case 'social_youtube':
672
  case 'social_pinterest':
673
  case 'social_dribbble':
674
+ case 'social_behance':
675
+ case 'social_instagram':
676
  $options[$key] = trim($value);
677
  break;
678
  case 'ga_tracking_id':
684
  } // switch
685
  } // foreach
686
 
687
+ $options['roles'] = empty($options['roles'])? array(): $options['roles'];
688
+ $options['whitelisted_users'] = empty($options['whitelisted_users'])? array(): $options['whitelisted_users'];
689
  $options = self::check_var_isset($options, array('status' => 0, 'linkback' => 0));
690
 
691
  if (!empty($options['ga_tracking_id']) && preg_match('/^UA-\d{3,}-\d{1,3}$/', $options['ga_tracking_id']) === 0) {
693
  }
694
 
695
  // empty cache in 3rd party plugins
696
+ if ($options != $old_options) {
697
  if (function_exists('w3tc_pgcache_flush')) {
698
  w3tc_pgcache_flush();
699
  }
830
  </ul>';
831
  echo '</td></tr>';
832
 
833
+ echo '<tr valign="top">
834
+ <th scope="row"><label for="description">Description</label></th>
835
+ <td><input id="description" type="text" class="large-text" name="' . UCP_OPTIONS_KEY . '[description]" value="' . $options['description'] . '" />';
836
+ echo '<p class="description">Description meta tag (see above for available <a href="#title">shortcodes</a>). Default: ' . $default_options['description'] . '</p>';
837
+ echo '</td></tr>';
838
+
839
  echo '<tr valign="top">
840
  <th scope="row"><label for="heading1">Headline</label></th>
841
  <td><input id="heading1" type="text" class="large-text" name="' . UCP_OPTIONS_KEY . '[heading1]" value="' . $options['heading1'] . '" />';
842
+ echo '<p class="description">Main heading/title (see above for available <a href="#title">shortcodes</a>). Default: ' . $default_options['heading1'] . '</p>';
843
  echo '</td></tr>';
844
 
845
  echo '<tr valign="top">
891
  echo '<p class="description">Complete URL, with http prefix, to Dribbble profile.</p>';
892
  echo '</td></tr>';
893
 
894
+ echo '<tr valign="top">
895
+ <th scope="row"><label for="social_behance">Behance Profile</label></th>
896
+ <td><input id="social_behance" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_behance]" value="' . $options['social_behance'] . '" placeholder="Behance profile URL">';
897
+ echo '<p class="description">Complete URL, with http prefix, to Behance profile.</p>';
898
+ echo '</td></tr>';
899
+
900
+ echo '<tr valign="top">
901
+ <th scope="row"><label for="social_instagram">Instagram Profile</label></th>
902
+ <td><input id="social_instagram" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_instagram]" value="' . $options['social_instagram'] . '" placeholder="Instagram profile URL">';
903
+ echo '<p class="description">Complete URL, with http prefix, to Instagram profile.</p>';
904
+ echo '</td></tr>';
905
+
906
  echo '<tr valign="top">
907
  <th scope="row"><label for="linkback">Show some Love</label></th>
908
  <td><div class="onoffswitch">
925
 
926
  $img_path = UCP_PLUGIN_URL . 'images/';
927
 
928
+ $themes = array('mad_designer' => 'Mad Designer', 'plain_text' => 'Plain Text', 'under_construction' => 'Under Construction', 'dark' => 'Things Went Dark', 'forklift' => 'Forklift at Work', 'under_construction_text' => 'Under Construction Text', 'cyber_chick' => 'Cyber Chick', 'rocket' => 'Rocket Launch');
929
 
930
  echo '<table class="form-table">';
931
  echo '<tr valign="top">
1014
  $default_options = self::default_options();
1015
 
1016
  echo '<div class="wrap">
1017
+ <h1 class="ucp-logo"><img src="' . UCP_PLUGIN_URL . '/images/under-construction-page-logo.png" alt="UnderConstructionPage" title="UnderConstructionPage">UnderConstructionPage</h1>';
1018
 
1019
  echo '<form action="options.php" method="post" id="ucp_form">';
1020
  settings_fields(UCP_OPTIONS_KEY);
1056
 
1057
  echo '</form>'; // ucp_tabs
1058
  echo '</div>'; // wrap
1059
+
1060
+ 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>';
1061
+ echo '<p>We strive to add at least one new feature to <span class="ucp-logo">UnderConstructionPage</span> every week and want to make it as usefull as possible.<br><b>What new features do you need the most?</b> Please choose two:</p>';
1062
+
1063
+ echo '<div class="question-wrapper" data-value="designs">';
1064
+ echo '<div class="question"><b>More designs like the ones we already have</b><br>';
1065
+ echo '<i>Fun, unique &amp; made just for the UCP plugin</i></div>';
1066
+ echo '<span class="dashicons dashicons-yes"></span>';
1067
+ echo '</div>';
1068
+
1069
+ echo '<div class="question-wrapper" data-value="drag-drop">';
1070
+ echo '<div class="question"><b>Drag &amp; drop page designer</b><br>';
1071
+ echo '<i>Countdown timers, progress bars, text, images - the complete package</i></div>';
1072
+ echo '<span class="dashicons dashicons-yes"></span>';
1073
+ echo '</div>';
1074
+
1075
+ echo '<div class="question-wrapper" data-value="analytics">';
1076
+ echo '<div class="question"><b>Built-in analytics</b><br>';
1077
+ echo '<i>No 3rd party service needed; simple &amp; fast statistics in UCP admin</i></div>';
1078
+ echo '<span class="dashicons dashicons-yes"></span>';
1079
+ echo '</div>';
1080
+
1081
+ echo '<div class="question-wrapper" data-value="leads">';
1082
+ echo '<div class="question"><b>Optin form on construction page</b><br>';
1083
+ echo '<i>Collect visitors\' emails &amp; add them to an autoresponder</i></div>';
1084
+ echo '<span class="dashicons dashicons-yes"></span>';
1085
+ echo '</div>';
1086
+
1087
+ echo '<div class="question-wrapper" data-value="custom">';
1088
+ echo '<div class="question"><b>Something else? Enter the feature you need below:</b><br>';
1089
+ echo '<input type="text" class="custom-input"></div>';
1090
+ echo '<span class="dashicons dashicons-yes"></span>';
1091
+ echo '</div>';
1092
+
1093
+ $current_user = wp_get_current_user();
1094
+ echo '<div class="footer">';
1095
+ echo '<input id="emailme" type="checkbox" value="' . $current_user->user_email . '"> <label for="emailme">Email me on ' . $current_user->user_email . ' when new features are added</label><br>';
1096
+ echo '<a data-survey="features-survey" class="submit-survey button-primary button button-large" href="#">Add those features ASAP!</a>';
1097
+ echo '<a href="#" class="dismiss-survey" data-survey="features-survey"><small><i>Close the survey and never show it again</i></small></a>';
1098
+ echo '</div>';
1099
+
1100
+ echo '</div>';
1101
  } // options_page
1102
 
1103
 
1104
  // reset all pointers to default state - visible
1105
  static function reset_pointers() {
1106
  $pointers = array();
1107
+ $pointers['welcome'] = array('target' => '#menu-settings', 'edge' => 'left', 'align' => 'right', 'content' => 'Thank you for installing the <b style="font-weight: 800; font-variant: small-caps;">UnderConstructionPage</b> plugin! Please open <a href="' . admin_url('options-general.php?page=ucp'). '">Settings - UnderConstruction</a> to create a beautiful under construction page.');
1108
 
1109
  update_option(UCP_POINTERS_KEY, $pointers);
1110
  } // reset_pointers