Under Construction - Version 2.35

Version Description

  • 2017/07/24
  • UCP can now be quickly disabled/enabled directly from the admin bar menu
  • new theme - Stop
  • added support for WP Fastest Cache
Download this release

Release Info

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

Code changes from version 2.30 to 2.35

css/ucp-admin.css CHANGED
@@ -144,6 +144,10 @@ span.select2-container .select2-search--inline .select2-search__field {
144
  margin-right: 100000px;
145
  }
146
 
 
 
 
 
147
  .ucp-logo {
148
  font-variant: small-caps;
149
  font-family: Roboto, sans-serif;
144
  margin-right: 100000px;
145
  }
146
 
147
+ .select2-container--default .select2-selection--multiple {
148
+ border: 1px solid #dddddd;
149
+ }
150
+
151
  .ucp-logo {
152
  font-variant: small-caps;
153
  font-family: Roboto, sans-serif;
images/thumbnails/stop.png ADDED
Binary file
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: WebFactory, UnderConstructionPage
3
  Tags: maintenance mode, maintenance page, coming soon page, landing page, under construction
4
  Requires at least: 4.0
5
  Tested up to: 4.8
6
- Stable tag: 2.30
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -30,7 +30,7 @@ A simple, no-nonsense plugin for all those situations when you have to hide the
30
  * Description - page description, for SEO
31
  * Headline - main headline/title
32
  * Content - anything you need to display, from styled text to images
33
- * Login Button - show a descrete link to the login form, or WP admin if you're logged in
34
  * Social icons/links - new ones are added with every update; let us know if we missed your favorite ones
35
  * Facebook
36
  * Twitter
@@ -94,15 +94,22 @@ Or if needed, upload manually;
94
  22. Puzzles theme contributed by <a href="https://twitter.com/EdelHaut">Ralf Biester</a>
95
  23. Internet of Things
96
  24. Setup theme
97
- 25. Main settings
98
- 26. Design settings
99
- 27. Content settings
100
- 28. Access settings
101
- 29. Support
 
102
 
103
 
104
  == Changelog ==
105
 
 
 
 
 
 
 
106
  = 2.30 =
107
  * 2017/07/10
108
  * we've crossed the 90k users mark on July 8th
@@ -319,3 +326,7 @@ There is an option to add custom CSS. If you want more than that you will have t
319
  = I have disabled UCP but the under construction page is still visible. How do I remove it? =
320
 
321
  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.
 
 
 
 
3
  Tags: maintenance mode, maintenance page, coming soon page, landing page, under construction
4
  Requires at least: 4.0
5
  Tested up to: 4.8
6
+ Stable tag: 2.35
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
30
  * Description - page description, for SEO
31
  * Headline - main headline/title
32
  * Content - anything you need to display, from styled text to images
33
+ * Login Button - show a discrete link to the login form, or WP admin if you're logged in
34
  * Social icons/links - new ones are added with every update; let us know if we missed your favorite ones
35
  * Facebook
36
  * Twitter
94
  22. Puzzles theme contributed by <a href="https://twitter.com/EdelHaut">Ralf Biester</a>
95
  23. Internet of Things
96
  24. Setup theme
97
+ 25. Stop theme
98
+ 26. Main settings
99
+ 27. Design settings
100
+ 28. Content settings
101
+ 29. Access settings
102
+ 30. Support
103
 
104
 
105
  == Changelog ==
106
 
107
+ = 2.35 =
108
+ * 2017/07/24
109
+ * UCP can now be quickly disabled/enabled directly from the admin bar menu
110
+ * new theme - Stop
111
+ * added support for WP Fastest Cache
112
+
113
  = 2.30 =
114
  * 2017/07/10
115
  * we've crossed the 90k users mark on July 8th
326
  = I have disabled UCP but the under construction page is still visible. How do I remove it? =
327
 
328
  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.
329
+
330
+ = Is UCP compatible with caching plugins? =
331
+
332
+ UCP is compatible with all caching plugins. However, please note that we automatically empty cache when UCP status is changed only for the following plugins: W3 Total Cache, WP Super Cache, Endurance Page Cache, SiteGround SuperCacher and WP Fastest Cache.
themes/stop/index.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * UnderConstructionPage
4
+ * Stop 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="https://fonts.googleapis.com/css?family=Nunito:400,900">
24
+ [head]
25
+ </head>
26
+
27
+ <body>
28
+ <div class="container top-container">
29
+ <div class="row display-table">
30
+ <div class="col-xs-12 col-md-12 col-lg-3 display-cell">
31
+ <div id="hero-image">
32
+ <img src="[theme-url]stop.png" alt="We'll be back soon" title="We'll be back soon">
33
+ </div>
34
+ </div>
35
+ <div class="col-xs-12 col-md-12 col-lg-9 display-cell">
36
+ <h1>[heading1]</h1>
37
+ </div>
38
+ </div>
39
+ </div>
40
+
41
+ <div class="container">
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/stop/stop.png ADDED
Binary file
themes/stop/style.css ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * UnderConstructionPage
3
+ * Stop 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: #ff7141;
20
+ padding: 0;
21
+ margin: 0;
22
+ height: 100%;
23
+ background-repeat: no-repeat;
24
+ background-attachment: fixed;
25
+ }
26
+
27
+ .top-container {
28
+ padding: 100px 0;
29
+ }
30
+
31
+ #hero-image {
32
+ text-align: center;
33
+ }
34
+
35
+ #hero-image img {
36
+ max-width: 80%;
37
+ }
38
+
39
+ .display-table {
40
+ display: table;
41
+ table-layout: fixed;
42
+ }
43
+
44
+ .display-cell {
45
+ display: table-cell;
46
+ vertical-align: middle;
47
+ float: none;
48
+ }
49
+
50
+ h1 {
51
+ font-size: 34px;
52
+ color: #ffffff;
53
+ font-family: "Nunito", sans-serif;
54
+ font-weight: 900;
55
+ margin: 20px 0 30px 0;
56
+ text-align: left;
57
+ }
58
+
59
+ .content {
60
+ text-align: center;
61
+ font-family: "Helvetica", "Arial", sans-serif;
62
+ }
63
+
64
+ #social {
65
+ text-align: center;
66
+ margin-top: 30px;
67
+ }
68
+
69
+ #social a i {
70
+ color: #fefefe;
71
+ margin: 10px;
72
+ box-sizing: content-box;
73
+ }
74
+
75
+ #social a:hover i {
76
+ color: #414042;
77
+ }
78
+
79
+ @media(max-width:767px) {
80
+ h1 {
81
+ font-size: 28px;
82
+ margin: 10px 0 30px 0;
83
+ }
84
+ #hero-image img {
85
+ max-width: 95%;
86
+ }
87
+ }
88
+
89
+ @media (max-width: 1200px) {
90
+ h1 {
91
+ text-align: center;
92
+ padding: 0 20px;
93
+ }
94
+ .display-table {
95
+ display: initial;
96
+ table-layout: auto;
97
+ }
98
+ .display-cell {
99
+ display: block;
100
+ vertical-align: middle;
101
+ float: none;
102
+ }
103
+ #hero-image img {
104
+ max-height: 250px
105
+ }
106
+ .top-container {
107
+ padding: 25px 0;
108
+ }
109
+ }
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: 2.30
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
  Domain Path: lang
@@ -80,6 +80,7 @@ class UCP {
80
  // manages admin header notifications
81
  add_action('admin_notices', array(__CLASS__, 'admin_notices'));
82
  add_action('admin_action_ucp_dismiss_notice', array(__CLASS__, 'dismiss_notice'));
 
83
 
84
  // enqueue admin scripts
85
  add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
@@ -669,6 +670,33 @@ class UCP {
669
  } // dismiss_notice
670
 
671
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
672
  static function admin_bar_style() {
673
  // admin bar has to be anabled, user an admin and custom filter true
674
  if (false === is_admin_bar_showing() || false === current_user_can('administrator') || false === apply_filters('ucp_show_admin_bar', true)) {
@@ -676,7 +704,7 @@ class UCP {
676
  }
677
 
678
  // no sense in loading a new CSS file for 2 lines of CSS
679
- $custom_css = '<style type="text/css">#wpadminbar ul li#wp-admin-bar-ucp-info { padding: 5px 0; } #wpadminbar ul li#wp-admin-bar-ucp-settings { background-color: rgb(35, 40, 45); }</style>';
680
 
681
  echo $custom_css;
682
  } // admin_bar_style
@@ -695,10 +723,14 @@ class UCP {
695
  $main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . '/images/ucp_icon_enabled.png" alt="' . __('Under construction mode is enabled', 'under-construction-page') . '" title="' . __('Under construction mode is enabled', 'under-construction-page') . '"> <span class="ab-label">' . __('UnderConstruction', 'under-construction-page') . '</span>';
696
  $class = 'ucp-enabled';
697
  $status = 'Under construction mode is <b style="font-weight: bold;">enabled</b>';
 
 
698
  } else {
699
  $main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . '/images/ucp_icon_disabled.png" alt="' . __('Under construction mode is disabled', 'under-construction-page') . '" title="' . __('Under construction mode is disabled', 'under-construction-page') . '"> <span class="ab-label">' . __('UnderConstruction', 'under-construction-page') . '</span>';
700
  $class = 'ucp-disabled';
701
  $status = 'Under construction mode is <b style="font-weight: bold;">disabled</b>';
 
 
702
  }
703
 
704
  $wp_admin_bar->add_menu(array(
@@ -714,6 +746,12 @@ class UCP {
714
  'href' => false,
715
  'parent'=> 'under-construction-page'
716
  ));
 
 
 
 
 
 
717
  $wp_admin_bar->add_node( array(
718
  'id' => 'ucp-settings',
719
  'title' => __('Settings', 'under-construction-page'),
@@ -866,6 +904,9 @@ class UCP {
866
  if (method_exists('SG_CachePress_Supercacher', 'purge_cache')) {
867
  SG_CachePress_Supercacher::purge_cache(true);
868
  }
 
 
 
869
  }
870
 
871
  return array_merge($old_options, $options);
@@ -1155,7 +1196,8 @@ class UCP {
1155
  'laptop' => __('Laptop', 'under-construction-page'),
1156
  'puzzles' => __('Puzzles', 'under-construction-page'),
1157
  'iot' => __('Internet of Things', 'under-construction-page'),
1158
- 'setup' => __('Setup', 'under-construction-page'));
 
1159
  $themes = apply_filters('ucp_themes', $themes);
1160
 
1161
  return $themes;
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: 2.35
8
  Author URI: http://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
  Domain Path: lang
80
  // manages admin header notifications
81
  add_action('admin_notices', array(__CLASS__, 'admin_notices'));
82
  add_action('admin_action_ucp_dismiss_notice', array(__CLASS__, 'dismiss_notice'));
83
+ add_action('admin_action_ucp_change_status', array(__CLASS__, 'change_status'));
84
 
85
  // enqueue admin scripts
86
  add_action('admin_enqueue_scripts', array(__CLASS__, 'admin_enqueue_scripts'));
670
  } // dismiss_notice
671
 
672
 
673
+ // change status via admin bar
674
+ static function change_status() {
675
+ if (empty($_GET['new_status'])) {
676
+ wp_redirect(admin_url());
677
+ exit;
678
+ }
679
+
680
+ $options = self::get_options();
681
+
682
+ if ($_GET['new_status'] == 'enabled') {
683
+ $options['status'] = '1';
684
+ } else {
685
+ $options['status'] = '0';
686
+ }
687
+
688
+ update_option(UCP_OPTIONS_KEY, $options);
689
+
690
+ if (!empty($_GET['redirect'])) {
691
+ wp_redirect($_GET['redirect']);
692
+ } else {
693
+ wp_redirect(admin_url());
694
+ }
695
+
696
+ exit;
697
+ } // change_status
698
+
699
+
700
  static function admin_bar_style() {
701
  // admin bar has to be anabled, user an admin and custom filter true
702
  if (false === is_admin_bar_showing() || false === current_user_can('administrator') || false === apply_filters('ucp_show_admin_bar', true)) {
704
  }
705
 
706
  // no sense in loading a new CSS file for 2 lines of CSS
707
+ $custom_css = '<style type="text/css">#wpadminbar ul li#wp-admin-bar-ucp-info { padding: 5px 0; } #wpadminbar ul li#wp-admin-bar-ucp-settings, #wpadminbar ul li#wp-admin-bar-ucp-status { background-color: rgb(35, 40, 45); }</style>';
708
 
709
  echo $custom_css;
710
  } // admin_bar_style
723
  $main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . '/images/ucp_icon_enabled.png" alt="' . __('Under construction mode is enabled', 'under-construction-page') . '" title="' . __('Under construction mode is enabled', 'under-construction-page') . '"> <span class="ab-label">' . __('UnderConstruction', 'under-construction-page') . '</span>';
724
  $class = 'ucp-enabled';
725
  $status = 'Under construction mode is <b style="font-weight: bold;">enabled</b>';
726
+ $action = __('Disable under construction mode', 'under-construction-page');
727
+ $action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'disabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
728
  } else {
729
  $main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . '/images/ucp_icon_disabled.png" alt="' . __('Under construction mode is disabled', 'under-construction-page') . '" title="' . __('Under construction mode is disabled', 'under-construction-page') . '"> <span class="ab-label">' . __('UnderConstruction', 'under-construction-page') . '</span>';
730
  $class = 'ucp-disabled';
731
  $status = 'Under construction mode is <b style="font-weight: bold;">disabled</b>';
732
+ $action = __('Enable under construction mode', 'under-construction-page');
733
+ $action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'enabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
734
  }
735
 
736
  $wp_admin_bar->add_menu(array(
746
  'href' => false,
747
  'parent'=> 'under-construction-page'
748
  ));
749
+ $wp_admin_bar->add_node( array(
750
+ 'id' => 'ucp-status',
751
+ 'title' => $action,
752
+ 'href' => $action_url,
753
+ 'parent'=> 'under-construction-page'
754
+ ));
755
  $wp_admin_bar->add_node( array(
756
  'id' => 'ucp-settings',
757
  'title' => __('Settings', 'under-construction-page'),
904
  if (method_exists('SG_CachePress_Supercacher', 'purge_cache')) {
905
  SG_CachePress_Supercacher::purge_cache(true);
906
  }
907
+ if (isset($GLOBALS['wp_fastest_cache']) && method_exists($GLOBALS['wp_fastest_cache'], 'deleteCache')) {
908
+ $GLOBALS['wp_fastest_cache']->deleteCache(true);
909
+ }
910
  }
911
 
912
  return array_merge($old_options, $options);
1196
  'laptop' => __('Laptop', 'under-construction-page'),
1197
  'puzzles' => __('Puzzles', 'under-construction-page'),
1198
  'iot' => __('Internet of Things', 'under-construction-page'),
1199
+ 'setup' => __('Setup', 'under-construction-page'),
1200
+ 'stop' => __('Stop', 'under-construction-page'));
1201
  $themes = apply_filters('ucp_themes', $themes);
1202
 
1203
  return $themes;