Under Construction - Version 1.55

Version Description

  • 2017/01/30
  • new theme - Cyber Chick Dark
  • added "Custom CSS" option
  • minor bug fixes
  • security improvements
Download this release

Release Info

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

Code changes from version 1.51 to 1.55

css/ucp-admin.css CHANGED
@@ -10,6 +10,13 @@
10
  margin-bottom: 30px;
11
  }
12
 
 
 
 
 
 
 
 
13
  .form-table th {
14
  padding: 15px 10px 20px 0;
15
  }
@@ -274,7 +281,7 @@ span.select2-container .select2-search--inline .select2-search__field {
274
  font-weight: 600;
275
  line-height: 32px;
276
  color: #AAAAAA;
277
- padding: 0 5px;
278
  display: block;
279
  letter-spacing: 1px;
280
  }
@@ -307,7 +314,7 @@ span.select2-container .select2-search--inline .select2-search__field {
307
  text-decoration: none;
308
  text-shadow: none;
309
  background: rgba(255, 255, 255, 0.61);
310
- padding: 15px 25px;
311
  text-align: center;
312
  letter-spacing: .5px;
313
  }
@@ -341,6 +348,14 @@ span.select2-container .select2-search--inline .select2-search__field {
341
  -webkit-box-shadow: none;
342
  }
343
 
 
 
 
 
 
 
 
 
344
 
345
  /* tabs */
346
 
10
  margin-bottom: 30px;
11
  }
12
 
13
+ #ucp_tabs textarea {
14
+ box-sizing: border-box;
15
+ resize: none;
16
+ soverflow: hidden;
17
+ }
18
+
19
+
20
  .form-table th {
21
  padding: 15px 10px 20px 0;
22
  }
281
  font-weight: 600;
282
  line-height: 32px;
283
  color: #AAAAAA;
284
+ padding: 15px 30px;
285
  display: block;
286
  letter-spacing: 1px;
287
  }
314
  text-decoration: none;
315
  text-shadow: none;
316
  background: rgba(255, 255, 255, 0.61);
317
+ padding: 0;
318
  text-align: center;
319
  letter-spacing: .5px;
320
  }
348
  -webkit-box-shadow: none;
349
  }
350
 
351
+ @media screen and (max-width: 782px) {
352
+ .settings_page_ucp .ui-tabs .ui-tabs-nav li a {
353
+ padding: 5px 10px;
354
+ }
355
+ .settings_page_ucp .ui-tabs ul.ui-tabs-nav li {
356
+ margin: 5px 2px -5px 2px;
357
+ }
358
+ }
359
 
360
  /* tabs */
361
 
images/cyber_chick_dark.png ADDED
Binary file
js/ucp-admin.js CHANGED
@@ -19,6 +19,16 @@ jQuery(document).ready(function($) {
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,
19
  // init select2
20
  $('#whitelisted_users').select2({ 'placeholder': ucp.whitelisted_users_placeholder});
21
 
22
+ // autosize textareas
23
+ $.each($('textarea[data-autoresize]'), function() {
24
+ var offset = this.offsetHeight - this.clientHeight;
25
+
26
+ var resizeTextarea = function(el) {
27
+ $(el).css('height', 'auto').css('height', el.scrollHeight + offset + 2);
28
+ };
29
+ $(this).on('keyup input click', function() { resizeTextarea(this); }).removeAttr('data-autoresize');
30
+ });
31
+
32
  // maybe init survey dialog
33
  $('#features-survey-dialog').dialog({'dialogClass': 'wp-dialog ucp-dialog ucp-survey-dialog',
34
  'modal': 1,
readme.txt CHANGED
@@ -1,9 +1,9 @@
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.51
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -12,7 +12,9 @@ Display an Under Construction, Maintenance Mode or Landing Page that takes 5 sec
12
 
13
  == Description ==
14
 
15
- 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>.
 
 
16
 
17
 
18
  **Options**
@@ -21,6 +23,7 @@ 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 - page title, for SEO
25
  * Description - page description, for SEO
26
  * Headline - main headline/title
@@ -68,30 +71,39 @@ Or if needed, upload manually;
68
  6. Forklift at Work theme
69
  7. Cyber Chick theme
70
  8. Rocket Launch theme
71
- 9. Main settings
72
- 10. Design settings
73
- 11. Content settings
74
- 12. Access settings
 
 
75
 
76
 
77
  == Changelog ==
78
 
 
 
 
 
 
 
 
79
  = 1.51 =
80
  * 2017/01/23
81
- * 1 new theme - Loader
82
  * added "Show Login Button" option
83
- * added 1 social icons: Email
84
 
85
  = 1.45 =
86
  * 2017/01/16
87
- * 1 new theme - Rocket Launch
88
  * added "Site Description" SEO option
89
  * added 2 social icons: Behance & Instagram
90
  * features survey is shown to users to decide what features will be developed next
91
 
92
  = 1.40 =
93
  * 2017/01/03
94
- * 1 new theme - Cyber Chick
95
  * added "Google Analytics Tracking ID" option
96
  * added "Whitelisted Users" option
97
  * added "Show some Love" option
@@ -99,7 +111,7 @@ Or if needed, upload manually;
99
 
100
  = 1.35 =
101
  * 2016/12/23
102
- * 1 new theme - Under Construction Text
103
  * GUI enhancements
104
  * added "end date" option
105
 
@@ -107,7 +119,7 @@ Or if needed, upload manually;
107
  * 2016/11/29
108
  * we've crossed the 20k users mark & 100k downloads ;)
109
  * added notice on login form when Maintenance is enabled
110
- * 1 new theme - Forklift at Work
111
  * GUI overhaul started
112
  * added Dribbble social icon
113
 
@@ -118,12 +130,12 @@ Or if needed, upload manually;
118
  = 1.24 =
119
  * 2016/10/24
120
  * 3 new social icons
121
- * 1 new theme
122
 
123
  = 1.22 =
124
  * 2016/10/10
125
  * minor fixes
126
- * 1 new theme
127
 
128
  = 1.20 =
129
  * 2016/09/27
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, rtl
4
  Requires at least: 4.0
5
  Tested up to: 4.7
6
+ Stable tag: 1.55
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
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>.
18
 
19
 
20
  **Options**
23
  * End date & time - automatically disable construction mode on a set date
24
  * Google Analytics Tracking ID - enable tracking via Google Analytics
25
  * Theme - a new one is added with each update, <a href="https://wordpress.org/plugins/under-construction-page/screenshots/">see screenshots</a>
26
+ * Custom CSS - adjust any part of the page to fit your needs
27
  * Title - page title, for SEO
28
  * Description - page description, for SEO
29
  * Headline - main headline/title
71
  6. Forklift at Work theme
72
  7. Cyber Chick theme
73
  8. Rocket Launch theme
74
+ 9. Loader at Work theme
75
+ 10. Cyber Chick Dark theme
76
+ 11. Main settings
77
+ 12. Design settings
78
+ 13. Content settings
79
+ 14. Access settings
80
 
81
 
82
  == Changelog ==
83
 
84
+ = 1.55 =
85
+ * 2017/01/30
86
+ * new theme - Cyber Chick Dark
87
+ * added "Custom CSS" option
88
+ * minor bug fixes
89
+ * security improvements
90
+
91
  = 1.51 =
92
  * 2017/01/23
93
+ * new theme - Loader
94
  * added "Show Login Button" option
95
+ * added 1 social icon: Email
96
 
97
  = 1.45 =
98
  * 2017/01/16
99
+ * new theme - Rocket Launch
100
  * added "Site Description" SEO option
101
  * added 2 social icons: Behance & Instagram
102
  * features survey is shown to users to decide what features will be developed next
103
 
104
  = 1.40 =
105
  * 2017/01/03
106
+ * new theme - Cyber Chick
107
  * added "Google Analytics Tracking ID" option
108
  * added "Whitelisted Users" option
109
  * added "Show some Love" option
111
 
112
  = 1.35 =
113
  * 2016/12/23
114
+ * new theme - Under Construction Text
115
  * GUI enhancements
116
  * added "end date" option
117
 
119
  * 2016/11/29
120
  * we've crossed the 20k users mark & 100k downloads ;)
121
  * added notice on login form when Maintenance is enabled
122
+ * new theme - Forklift at Work
123
  * GUI overhaul started
124
  * added Dribbble social icon
125
 
130
  = 1.24 =
131
  * 2016/10/24
132
  * 3 new social icons
133
+ * new theme
134
 
135
  = 1.22 =
136
  * 2016/10/10
137
  * minor fixes
138
+ * new theme
139
 
140
  = 1.20 =
141
  * 2016/09/27
themes/css/common.css CHANGED
@@ -13,10 +13,12 @@
13
  }
14
 
15
  #login-button {
16
- position: relative;
17
- right: 0;
18
- bottom: 50px;
19
- text-align: right;
 
 
20
  }
21
 
22
  #login-button a {
13
  }
14
 
15
  #login-button {
16
+ position: relative;
17
+ right: 0;
18
+ bottom: 50px;
19
+ text-align: right;
20
+ float: right;
21
+ margin-bottom: 20px;
22
  }
23
 
24
  #login-button a {
themes/cyber_chick_dark/cyber_chick_dark.png ADDED
Binary file
themes/cyber_chick_dark/index.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * UnderConstructionPage
4
+ * Cyber Chick Dark 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="UnderConstructionPage 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=Roboto:400,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]cyber_chick_dark.png" alt="Cyber Chick at work in the dark" title="Cyber Chick at work in the dark">
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/cyber_chick_dark/style.css ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * UnderConstructionPage
3
+ * Cyber Chick Dark 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: #ffffff;
19
+ background: #212f3c;
20
+ padding: 0;
21
+ margin: 0;
22
+ background-repeat: no-repeat;
23
+ background-attachment: fixed;
24
+ }
25
+
26
+ #hero-image {
27
+ text-align: center;
28
+ margin: 0 auto 10px auto;
29
+ }
30
+
31
+ #hero-image img {
32
+ max-width: 80%;
33
+ }
34
+
35
+ h1 {
36
+ font-size: 34px;
37
+ color: #e2e2e2;
38
+ font-family: "Roboto", sans-serif;
39
+ font-weight: 900;
40
+ margin: 20px 0 30px 0;
41
+ text-align: center;
42
+ }
43
+
44
+ .content {
45
+ text-align: center;
46
+ font-family: "Helvetica", "Arial", sans-serif;
47
+ }
48
+
49
+ #social {
50
+ text-align: center;
51
+ margin: 30px 0;
52
+ }
53
+
54
+ #social a i {
55
+ color: #bdbec0;
56
+ margin: 10px;
57
+ box-sizing: content-box;
58
+ }
59
+
60
+ #social a:hover i {
61
+ color: #cc6633;
62
+ }
63
+
64
+ @media (max-width:767px){
65
+ h1 {
66
+ font-size: 30px;
67
+ margin: 10px 0 30px 0;
68
+ }
69
+ #hero-image img {
70
+ max-width: 95%;
71
+ }
72
+ }
73
+
74
+ @media screen and (min-width:1200px){
75
+ #hero-image img {
76
+ max-width: 80vh;
77
+ }
78
+ }
themes/dark/index.php CHANGED
@@ -31,6 +31,7 @@ if (!defined('ABSPATH')) {
31
  <div id="hero-image">
32
  <img src="[theme-url]dark.jpg" alt="Mad Designer at work in the dark" title="Mad Designer at work in the dark">
33
  </div>
 
34
  <div class="container">
35
 
36
  <div class="row">
31
  <div id="hero-image">
32
  <img src="[theme-url]dark.jpg" alt="Mad Designer at work in the dark" title="Mad Designer at work in the dark">
33
  </div>
34
+
35
  <div class="container">
36
 
37
  <div class="row">
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.51
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
  Domain Path: lang
@@ -208,13 +208,24 @@ class UCP {
208
 
209
  if (true == self::is_construction_mode_enabled(false)
210
  || (is_user_logged_in() && isset($_GET['ucp_preview']))) {
211
- header(wp_get_server_protocol() . ' 503 Service Unavailable');
212
  echo self::get_template($options['theme']);
213
  exit;
214
  }
215
  } // display_construction_page
216
 
217
 
 
 
 
 
 
 
 
 
 
 
 
218
  // disables feed if necessary
219
  static function disable_feed() {
220
  if (true == self::is_construction_mode_enabled(false)) {
@@ -434,6 +445,10 @@ class UCP {
434
  </script>";
435
  }
436
 
 
 
 
 
437
  return trim($out);
438
  } // generate_head
439
 
@@ -659,6 +674,7 @@ class UCP {
659
  'end_date' => '',
660
  'ga_tracking_id' => '',
661
  'theme' => 'mad_designer',
 
662
  'title' => '[site-title] is under construction',
663
  'description' => '[site-tagline]',
664
  'heading1' => 'Sorry, we\'re doing some work on the site',
@@ -673,7 +689,7 @@ class UCP {
673
  'social_behance' => '',
674
  'social_instagram' => '',
675
  'social_email' => '',
676
- 'login_button' => '0',
677
  'linkback' => '0',
678
  'roles' => array('administrator'),
679
  'whitelisted_users' => array()
@@ -693,6 +709,7 @@ class UCP {
693
  case 'description':
694
  case 'heading1':
695
  case 'content':
 
696
  case 'social_facebook':
697
  case 'social_twitter':
698
  case 'social_google':
@@ -825,14 +842,14 @@ class UCP {
825
 
826
  echo '<tr valign="top">
827
  <th scope="row"><label for="end_date">End Date &amp; Time</label></th>
828
- <td><input id="end_date" type="text" class="datepicker" name="' . UCP_OPTIONS_KEY . '[end_date]" value="' . $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>';
829
  echo '<p class="description">If enabled, construction mode will automatically stop showing on the selected date.<br>
830
  This option will not "auto-enable" construction mode. Status has to be set to "On".</p>';
831
  echo '</td></tr>';
832
 
833
  echo '<tr valign="top">
834
  <th scope="row"><label for="ga_tracking_id">Google Analytics Tracking ID</label></th>
835
- <td><input id="ga_tracking_id" type="text" class="code" name="' . UCP_OPTIONS_KEY . '[ga_tracking_id]" value="' . $options['ga_tracking_id'] . '" placeholder="UA-xxxxxx-xx">';
836
  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>';
837
  echo '</td></tr>';
838
 
@@ -848,7 +865,7 @@ class UCP {
848
 
849
  echo '<tr valign="top">
850
  <th scope="row"><label for="title">Title</label></th>
851
- <td><input type="text" id="title" class="regular-text" name="' . UCP_OPTIONS_KEY . '[title]" value="' . $options['title'] . '" />';
852
  echo '<p class="description">Page title. Default: ' . $default_options['title'] . '</p>';
853
  echo '<p><b>Available shortcodes:</b> (only active in UC themes, not on the rest of the site)</p>
854
  <ul class="ucp-list">
@@ -862,13 +879,13 @@ class UCP {
862
 
863
  echo '<tr valign="top">
864
  <th scope="row"><label for="description">Description</label></th>
865
- <td><input id="description" type="text" class="large-text" name="' . UCP_OPTIONS_KEY . '[description]" value="' . $options['description'] . '" />';
866
  echo '<p class="description">Description meta tag (see above for available <a href="#title">shortcodes</a>). Default: ' . $default_options['description'] . '</p>';
867
  echo '</td></tr>';
868
 
869
  echo '<tr valign="top">
870
  <th scope="row"><label for="heading1">Headline</label></th>
871
- <td><input id="heading1" type="text" class="large-text" name="' . UCP_OPTIONS_KEY . '[heading1]" value="' . $options['heading1'] . '" />';
872
  echo '<p class="description">Main heading/title (see above for available <a href="#title">shortcodes</a>). Default: ' . $default_options['heading1'] . '</p>';
873
  echo '</td></tr>';
874
 
@@ -911,61 +928,61 @@ class UCP {
911
  echo '<table class="form-table">';
912
  echo '<tr valign="top">
913
  <th scope="row"><label for="social_facebook">Facebook Page</label></th>
914
- <td><input id="social_facebook" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_facebook]" value="' . $options['social_facebook'] . '" placeholder="Facebook business or personal page URL">';
915
  echo '<p class="description">Complete URL, with http prefix, to Facebook page.</p>';
916
  echo '</td></tr>';
917
 
918
  echo '<tr valign="top">
919
  <th scope="row"><label for="social_twitter">Twitter Profile</label></th>
920
- <td><input id="social_twitter" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_twitter]" value="' . $options['social_twitter'] . '" placeholder="Twitter profile URL">';
921
  echo '<p class="description">Complete URL, with http prefix, to Twitter profile page.</p>';
922
  echo '</td></tr>';
923
 
924
  echo '<tr valign="top">
925
  <th scope="row"><label for="social_google">Google Page</label></th>
926
- <td><input id="social_google" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_google]" value="' . $options['social_google'] . '" placeholder="Google+ page URL">';
927
  echo '<p class="description">Complete URL, with http prefix, to Google+ page.</p>';
928
  echo '</td></tr>';
929
 
930
  echo '<tr valign="top">
931
  <th scope="row"><label for="social_linkedin">LinkedIn Profile</label></th>
932
- <td><input id="social_linkedin" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_linkedin]" value="' . $options['social_linkedin'] . '" placeholder="LinkedIn profile page URL">';
933
  echo '<p class="description">Complete URL, with http prefix, to LinkedIn profile page.</p>';
934
  echo '</td></tr>';
935
 
936
  echo '<tr valign="top">
937
  <th scope="row"><label for="social_youtube">YouTube Profile Page or Video</label></th>
938
- <td><input id="social_youtube" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_youtube]" value="' . $options['social_youtube'] . '" placeholder="YouTube page or video URL">';
939
  echo '<p class="description">Complete URL, with http prefix, to YouTube page or video.</p>';
940
  echo '</td></tr>';
941
 
942
  echo '<tr valign="top">
943
  <th scope="row"><label for="social_pinterest">Pinterest Profile</label></th>
944
- <td><input id="social_pinterest" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_pinterest]" value="' . $options['social_pinterest'] . '" placeholder="Pinterest profile URL">';
945
  echo '<p class="description">Complete URL, with http prefix, to Pinterest profile.</p>';
946
  echo '</td></tr>';
947
 
948
  echo '<tr valign="top">
949
  <th scope="row"><label for="social_dribbble">Dribbble Profile</label></th>
950
- <td><input id="social_dribbble" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_dribbble]" value="' . $options['social_dribbble'] . '" placeholder="Dribbble profile URL">';
951
  echo '<p class="description">Complete URL, with http prefix, to Dribbble profile.</p>';
952
  echo '</td></tr>';
953
 
954
  echo '<tr valign="top">
955
  <th scope="row"><label for="social_behance">Behance Profile</label></th>
956
- <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">';
957
  echo '<p class="description">Complete URL, with http prefix, to Behance profile.</p>';
958
  echo '</td></tr>';
959
 
960
  echo '<tr valign="top">
961
  <th scope="row"><label for="social_instagram">Instagram Profile</label></th>
962
- <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">';
963
  echo '<p class="description">Complete URL, with http prefix, to Instagram profile.</p>';
964
  echo '</td></tr>';
965
 
966
  echo '<tr valign="top">
967
  <th scope="row"><label for="social_email">Email Address</label></th>
968
- <td><input id="social_email" type="email" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_email]" value="' . $options['social_email'] . '" placeholder="Contact email address">';
969
  echo '<p class="description">Email will be encoded in HTML to protect it from spammers.</p>';
970
  echo '</td></tr>';
971
 
@@ -979,7 +996,7 @@ class UCP {
979
 
980
  $img_path = UCP_PLUGIN_URL . 'images/';
981
 
982
- $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', 'loader' => 'Loader at Work');
983
 
984
  echo '<table class="form-table">';
985
  echo '<tr valign="top">
@@ -1000,10 +1017,19 @@ class UCP {
1000
 
1001
  echo '</td></tr>';
1002
 
 
 
 
 
 
 
 
 
1003
  echo '</table>';
1004
  } // tab_design
1005
 
1006
 
 
1007
  static function tab_access() {
1008
  $options = self::get_options();
1009
  $default_options = self::default_options();
@@ -1044,19 +1070,14 @@ class UCP {
1044
  } // tab_access
1045
 
1046
 
1047
- // todo next version
1048
- static function tab_emails() {
1049
  $options = self::get_options();
1050
  $default_options = self::default_options();
1051
- } // tab_emails
1052
-
 
1053
 
1054
- // todo next version
1055
- static function tab_advanced() {
1056
- $options = self::get_options();
1057
- $default_options = self::default_options();
1058
- } // tab_advanced
1059
-
1060
 
1061
  // output the whole options page
1062
  static function main_page() {
@@ -1079,9 +1100,8 @@ class UCP {
1079
  $tabs[] = array('id' => 'ucp_content', 'icon' => 'dashicons-format-aside', 'class' => '', 'label' => 'Content', 'callback' => array(__CLASS__, 'tab_content'));
1080
  $tabs[] = array('id' => 'ucp_access', 'icon' => 'dashicons-shield', 'class' => '', 'label' => 'Access', 'callback' => array(__CLASS__, 'tab_access'));
1081
 
1082
- // todo next version
1083
- //$tabs[] = array('id' => 'ucp_emails', 'class' => '', 'label' => 'Emails', 'callback' => array(__CLASS__, 'tab_emails'));
1084
- //$tabs[] = array('id' => 'ucp_advanced', 'class' => '', 'label' => 'Advanced', 'callback' => array(__CLASS__, 'tab_advanced'));
1085
  $tabs = apply_filters('ucp_tabs', $tabs);
1086
 
1087
  echo '<div id="ucp_tabs" class="ui-tabs" style="display: none;">';
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.55
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
  Domain Path: lang
208
 
209
  if (true == self::is_construction_mode_enabled(false)
210
  || (is_user_logged_in() && isset($_GET['ucp_preview']))) {
211
+ header(self::wp_get_server_protocol() . ' 503 Service Unavailable');
212
  echo self::get_template($options['theme']);
213
  exit;
214
  }
215
  } // display_construction_page
216
 
217
 
218
+ // keeping compatibility with WP < v4.4
219
+ static function wp_get_server_protocol() {
220
+ $protocol = $_SERVER['SERVER_PROTOCOL'];
221
+ if (!in_array($protocol, array('HTTP/1.1', 'HTTP/2', 'HTTP/2.0'))) {
222
+ $protocol = 'HTTP/1.0';
223
+ }
224
+
225
+ return $protocol;
226
+ } // wp_get_server_protocol
227
+
228
+
229
  // disables feed if necessary
230
  static function disable_feed() {
231
  if (true == self::is_construction_mode_enabled(false)) {
445
  </script>";
446
  }
447
 
448
+ if (!empty($options['custom_css'])) {
449
+ $out .= "\n" . '<style type="text/css">' . $options['custom_css'] . '</style>';
450
+ }
451
+
452
  return trim($out);
453
  } // generate_head
454
 
674
  'end_date' => '',
675
  'ga_tracking_id' => '',
676
  'theme' => 'mad_designer',
677
+ 'custom_css' => '',
678
  'title' => '[site-title] is under construction',
679
  'description' => '[site-tagline]',
680
  'heading1' => 'Sorry, we\'re doing some work on the site',
689
  'social_behance' => '',
690
  'social_instagram' => '',
691
  'social_email' => '',
692
+ 'login_button' => '1',
693
  'linkback' => '0',
694
  'roles' => array('administrator'),
695
  'whitelisted_users' => array()
709
  case 'description':
710
  case 'heading1':
711
  case 'content':
712
+ case 'custom_css':
713
  case 'social_facebook':
714
  case 'social_twitter':
715
  case 'social_google':
842
 
843
  echo '<tr valign="top">
844
  <th scope="row"><label for="end_date">End Date &amp; Time</label></th>
845
+ <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>';
846
  echo '<p class="description">If enabled, construction mode will automatically stop showing on the selected date.<br>
847
  This option will not "auto-enable" construction mode. Status has to be set to "On".</p>';
848
  echo '</td></tr>';
849
 
850
  echo '<tr valign="top">
851
  <th scope="row"><label for="ga_tracking_id">Google Analytics Tracking ID</label></th>
852
+ <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">';
853
  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>';
854
  echo '</td></tr>';
855
 
865
 
866
  echo '<tr valign="top">
867
  <th scope="row"><label for="title">Title</label></th>
868
+ <td><input type="text" id="title" class="regular-text" name="' . UCP_OPTIONS_KEY . '[title]" value="' . esc_attr($options['title']) . '" />';
869
  echo '<p class="description">Page title. Default: ' . $default_options['title'] . '</p>';
870
  echo '<p><b>Available shortcodes:</b> (only active in UC themes, not on the rest of the site)</p>
871
  <ul class="ucp-list">
879
 
880
  echo '<tr valign="top">
881
  <th scope="row"><label for="description">Description</label></th>
882
+ <td><input id="description" type="text" class="large-text" name="' . UCP_OPTIONS_KEY . '[description]" value="' . esc_attr($options['description']) . '" />';
883
  echo '<p class="description">Description meta tag (see above for available <a href="#title">shortcodes</a>). Default: ' . $default_options['description'] . '</p>';
884
  echo '</td></tr>';
885
 
886
  echo '<tr valign="top">
887
  <th scope="row"><label for="heading1">Headline</label></th>
888
+ <td><input id="heading1" type="text" class="large-text" name="' . UCP_OPTIONS_KEY . '[heading1]" value="' . esc_attr($options['heading1']) . '" />';
889
  echo '<p class="description">Main heading/title (see above for available <a href="#title">shortcodes</a>). Default: ' . $default_options['heading1'] . '</p>';
890
  echo '</td></tr>';
891
 
928
  echo '<table class="form-table">';
929
  echo '<tr valign="top">
930
  <th scope="row"><label for="social_facebook">Facebook Page</label></th>
931
+ <td><input id="social_facebook" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_facebook]" value="' . esc_attr($options['social_facebook']) . '" placeholder="Facebook business or personal page URL">';
932
  echo '<p class="description">Complete URL, with http prefix, to Facebook page.</p>';
933
  echo '</td></tr>';
934
 
935
  echo '<tr valign="top">
936
  <th scope="row"><label for="social_twitter">Twitter Profile</label></th>
937
+ <td><input id="social_twitter" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_twitter]" value="' . esc_attr($options['social_twitter']) . '" placeholder="Twitter profile URL">';
938
  echo '<p class="description">Complete URL, with http prefix, to Twitter profile page.</p>';
939
  echo '</td></tr>';
940
 
941
  echo '<tr valign="top">
942
  <th scope="row"><label for="social_google">Google Page</label></th>
943
+ <td><input id="social_google" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_google]" value="' . esc_attr($options['social_google']) . '" placeholder="Google+ page URL">';
944
  echo '<p class="description">Complete URL, with http prefix, to Google+ page.</p>';
945
  echo '</td></tr>';
946
 
947
  echo '<tr valign="top">
948
  <th scope="row"><label for="social_linkedin">LinkedIn Profile</label></th>
949
+ <td><input id="social_linkedin" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_linkedin]" value="' . esc_attr($options['social_linkedin']) . '" placeholder="LinkedIn profile page URL">';
950
  echo '<p class="description">Complete URL, with http prefix, to LinkedIn profile page.</p>';
951
  echo '</td></tr>';
952
 
953
  echo '<tr valign="top">
954
  <th scope="row"><label for="social_youtube">YouTube Profile Page or Video</label></th>
955
+ <td><input id="social_youtube" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_youtube]" value="' . esc_attr($options['social_youtube']) . '" placeholder="YouTube page or video URL">';
956
  echo '<p class="description">Complete URL, with http prefix, to YouTube page or video.</p>';
957
  echo '</td></tr>';
958
 
959
  echo '<tr valign="top">
960
  <th scope="row"><label for="social_pinterest">Pinterest Profile</label></th>
961
+ <td><input id="social_pinterest" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_pinterest]" value="' . esc_attr($options['social_pinterest']) . '" placeholder="Pinterest profile URL">';
962
  echo '<p class="description">Complete URL, with http prefix, to Pinterest profile.</p>';
963
  echo '</td></tr>';
964
 
965
  echo '<tr valign="top">
966
  <th scope="row"><label for="social_dribbble">Dribbble Profile</label></th>
967
+ <td><input id="social_dribbble" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_dribbble]" value="' . esc_attr($options['social_dribbble']) . '" placeholder="Dribbble profile URL">';
968
  echo '<p class="description">Complete URL, with http prefix, to Dribbble profile.</p>';
969
  echo '</td></tr>';
970
 
971
  echo '<tr valign="top">
972
  <th scope="row"><label for="social_behance">Behance Profile</label></th>
973
+ <td><input id="social_behance" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_behance]" value="' . esc_attr($options['social_behance']) . '" placeholder="Behance profile URL">';
974
  echo '<p class="description">Complete URL, with http prefix, to Behance profile.</p>';
975
  echo '</td></tr>';
976
 
977
  echo '<tr valign="top">
978
  <th scope="row"><label for="social_instagram">Instagram Profile</label></th>
979
+ <td><input id="social_instagram" type="url" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_instagram]" value="' . esc_attr($options['social_instagram']) . '" placeholder="Instagram profile URL">';
980
  echo '<p class="description">Complete URL, with http prefix, to Instagram profile.</p>';
981
  echo '</td></tr>';
982
 
983
  echo '<tr valign="top">
984
  <th scope="row"><label for="social_email">Email Address</label></th>
985
+ <td><input id="social_email" type="email" class="regular-text code" name="' . UCP_OPTIONS_KEY . '[social_email]" value="' . esc_attr($options['social_email']) . '" placeholder="Contact email address">';
986
  echo '<p class="description">Email will be encoded in HTML to protect it from spammers.</p>';
987
  echo '</td></tr>';
988
 
996
 
997
  $img_path = UCP_PLUGIN_URL . 'images/';
998
 
999
+ $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', 'loader' => 'Loader at Work', 'cyber_chick_dark' => 'Cyber Chick Dark');
1000
 
1001
  echo '<table class="form-table">';
1002
  echo '<tr valign="top">
1017
 
1018
  echo '</td></tr>';
1019
 
1020
+ echo '<tr valign="top">
1021
+ <th scope="row"><label for="custom_css">Custom CSS</label></th>
1022
+ <td>';
1023
+ 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>';
1024
+ echo '<p class="description">&lt;style&gt; tags will be added automatically. Do not include them in your code.<br>
1025
+ For RTL languages support add: <code>body { direction: rtl; }</code></p>';
1026
+ echo '</td></tr>';
1027
+
1028
  echo '</table>';
1029
  } // tab_design
1030
 
1031
 
1032
+ // markup & logic for access tab
1033
  static function tab_access() {
1034
  $options = self::get_options();
1035
  $default_options = self::default_options();
1070
  } // tab_access
1071
 
1072
 
1073
+ // todo - support tab
1074
+ static function tab_support() {
1075
  $options = self::get_options();
1076
  $default_options = self::default_options();
1077
+
1078
+ echo 'support';
1079
+ } // tab_support
1080
 
 
 
 
 
 
 
1081
 
1082
  // output the whole options page
1083
  static function main_page() {
1100
  $tabs[] = array('id' => 'ucp_content', 'icon' => 'dashicons-format-aside', 'class' => '', 'label' => 'Content', 'callback' => array(__CLASS__, 'tab_content'));
1101
  $tabs[] = array('id' => 'ucp_access', 'icon' => 'dashicons-shield', 'class' => '', 'label' => 'Access', 'callback' => array(__CLASS__, 'tab_access'));
1102
 
1103
+ // todo
1104
+ //$tabs[] = array('id' => 'ucp_support', 'icon' => 'dashicons-sos', 'class' => '', 'label' => 'Support', 'callback' => array(__CLASS__, 'tab_support'));
 
1105
  $tabs = apply_filters('ucp_tabs', $tabs);
1106
 
1107
  echo '<div id="ucp_tabs" class="ui-tabs" style="display: none;">';