Under Construction - Version 3.75

Version Description

  • 2020/04/15
  • better cache handling
Download this release

Release Info

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

Code changes from version 3.70 to 3.75

Files changed (2) hide show
  1. readme.txt +9 -4
  2. under-construction.php +54 -39
readme.txt CHANGED
@@ -1,14 +1,14 @@
1
  === Under Construction ===
2
- Contributors: WebFactory, UnderConstructionPage, googlemapswidget, wpreset
3
  Tags: coming soon page, under construction mode, under construction, under construction page, coming soon, maintenance mode, maintenance page, launch page, coming soon mode, maintenance mode page, offline page, maintenance, landing page
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
  Tested up to: 5.4
7
- Stable tag: 3.70
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Super-easy to use Under Construction Page, Maintenance Mode & Coming Soon Page. Enable Under Construction Mode in seconds!
12
 
13
 
14
  == Description ==
@@ -60,7 +60,7 @@ Thanks to our partnership with <a href="https://wordpress.org/plugins/weglot/">W
60
  * Whitelisted User Roles - user roles who see the site, instead of under construction page
61
  * Whitelisted Users - users who see the site, instead of under construction page
62
 
63
- Under Construction Page is compatible with the following caching plugins: W3 Total Cache, WP Super Cache, Endurance Page Cache, SiteGround SuperCacher, WP Fastest Cache, Swift Performance Cache, and Hummingbird cache.
64
 
65
 
66
  **What are others saying about the Under Construction Page plugin**
@@ -138,10 +138,15 @@ Or if needed, upload manually;
138
 
139
  == Changelog ==
140
 
 
 
 
 
141
  = 3.70 =
142
  * 2020/03/27
143
  * minor bug fixes
144
  * removed Security Ninja ads
 
145
 
146
  = 3.65 =
147
  * 2019/11/21
1
  === Under Construction ===
2
+ Contributors: WebFactory, UnderConstructionPage, googlemapswidget, wpreset, securityninja
3
  Tags: coming soon page, under construction mode, under construction, under construction page, coming soon, maintenance mode, maintenance page, launch page, coming soon mode, maintenance mode page, offline page, maintenance, landing page
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
  Tested up to: 5.4
7
+ Stable tag: 3.75
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Easy to use Under Construction Page & Coming Soon Page. Enable Under Construction Mode in seconds & show you're Under Construction!
12
 
13
 
14
  == Description ==
60
  * Whitelisted User Roles - user roles who see the site, instead of under construction page
61
  * Whitelisted Users - users who see the site, instead of under construction page
62
 
63
+ Under Construction Page is compatible with the following caching plugins: W3 Total Cache, WP Super Cache, Endurance Page Cache, SiteGround SuperCacher, WP Fastest Cache, Swift Performance Cache, WP Rocket, and Hummingbird cache.
64
 
65
 
66
  **What are others saying about the Under Construction Page plugin**
138
 
139
  == Changelog ==
140
 
141
+ = 3.75 =
142
+ * 2020/04/15
143
+ * better cache handling
144
+
145
  = 3.70 =
146
  * 2020/03/27
147
  * minor bug fixes
148
  * removed Security Ninja ads
149
+ * 400,000 installations hit on 2019-12-06
150
 
151
  = 3.65 =
152
  * 2019/11/21
under-construction.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin URI: https://underconstructionpage.com/
5
  Description: Put your site behind a great looking under construction, coming soon, maintenance mode or landing page.
6
  Author: WebFactory Ltd
7
- Version: 3.70
8
  Author URI: https://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
 
@@ -98,6 +98,7 @@ class UCP {
98
  add_action('wp_ajax_ucp_submit_support_message', array(__CLASS__, 'submit_support_message_ajax'));
99
 
100
  add_filter('install_plugins_table_api_args_featured', array(__CLASS__, 'featured_plugins_tab'));
 
101
  } else {
102
  // main plugin logic
103
  add_action('wp', array(__CLASS__, 'display_construction_page'), 0, 1);
@@ -843,7 +844,7 @@ class UCP {
843
  $dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'welcome', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
844
 
845
  echo '<div id="ucp_rate_notice" class="notice-info notice"><p>Hi' . $name . ',<br>';
846
- echo 'We have a <a class="open-ucp-upsell" data-pro-ad="notification-welcome-text" href="#">special time-sensitive offer</a> available just for another <b class="ucp-countdown">59min</b>! A <b>20% DISCOUNT</b> on our most popular lifetime licenses!<br>No nonsense! Pay once and use the plugin forever. <a class="open-ucp-upsell" data-pro-ad="notification-welcome-text2" href="#">Get</a> more than 50+ extra features, 200+ premium themes and over a million professional images.</p>';
847
 
848
  echo '<a href="#" class="button-primary open-ucp-upsell" data-pro-ad="notification-welcome-button">Upgrade to PRO now with a SPECIAL 20% WELCOME DISCOUNT</a>';
849
  echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href="' . esc_url($dismiss_url) . '"><small>' . __('I\'m not interested (remove this notice)', 'under-construction-page') . '</small></a>';
@@ -858,7 +859,7 @@ class UCP {
858
  $dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'olduser', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
859
 
860
  echo '<div id="ucp_rate_notice" class="notice-info notice"><p>Hi' . $name . ',<br>';
861
- echo 'We have a <a class="open-ucp-upsell" data-pro-ad="notification-olduser-text" href="#">special offer</a> only for <b>users like you</b> who\'ve been using the UnderConstructionPage for a longer period of time: a <b>special DISCOUNT</b> on our most popular lifetime licenses!<br>No nonsense! Pay once and use the plugin forever.<br><a class="open-ucp-upsell" data-pro-ad="notification-olduser-text" href="#">Upgrade now</a> to <b>PRO</b> &amp; get more than 50+ extra features, 200+ premium themes and over a million HD images.</p>';
862
 
863
  echo '<a href="#" class="button-primary open-ucp-upsell" data-pro-ad="notification-olduser-button">Upgrade to PRO now with a SPECIAL DISCOUNT</a>';
864
  echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href="' . esc_url($dismiss_url) . '"><small>' . __('I\'m not interested (remove this notice)', 'under-construction-page') . '</small></a>';
@@ -1267,40 +1268,47 @@ class UCP {
1267
  $notices = get_option(UCP_NOTICES_KEY);
1268
  unset($notices['dismiss_whitelisted']);
1269
  update_option(UCP_NOTICES_KEY, $notices);
1270
-
1271
- wp_cache_flush();
1272
- if (function_exists('w3tc_flush_all')) {
1273
- w3tc_flush_all();
1274
- }
1275
- if (function_exists('wp_cache_clear_cache')) {
1276
- wp_cache_clear_cache();
1277
- }
1278
- if (method_exists('LiteSpeed_Cache_API', 'purge_all')) {
1279
- LiteSpeed_Cache_API::purge_all();
1280
- }
1281
- if (class_exists('Endurance_Page_Cache')) {
1282
- $epc = new Endurance_Page_Cache;
1283
- $epc->purge_all();
1284
- }
1285
- if (class_exists('SG_CachePress_Supercacher') && method_exists('SG_CachePress_Supercacher', 'purge_cache')) {
1286
- SG_CachePress_Supercacher::purge_cache(true);
1287
- }
1288
- if (class_exists('SiteGround_Optimizer\Supercacher\Supercacher')) {
1289
- SiteGround_Optimizer\Supercacher\Supercacher::purge_cache();
1290
- }
1291
- if (isset($GLOBALS['wp_fastest_cache']) && method_exists($GLOBALS['wp_fastest_cache'], 'deleteCache')) {
1292
- $GLOBALS['wp_fastest_cache']->deleteCache(true);
1293
- }
1294
- if (is_callable(array('Swift_Performance_Cache', 'clear_all_cache'))) {
1295
- Swift_Performance_Cache::clear_all_cache();
1296
- }
1297
- if (is_callable(array('Hummingbird\WP_Hummingbird', 'flush_cache'))) {
1298
- Hummingbird\WP_Hummingbird::flush_cache(true, false);
1299
- }
1300
  }
1301
 
1302
  return array_merge($old_options, $options);
1303
  } // sanitize_settings
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1304
 
1305
 
1306
  // checkbox helper function
@@ -1827,7 +1835,7 @@ class UCP {
1827
 
1828
  echo '<table class="form-table">';
1829
  echo '<tr valign="top">
1830
- <td colspan="2"><b style="margin-bottom: 10px; display: inline-block;">' . __('Theme', 'under-construction-page') . '</b> (<a target="_blank" href="' . self::generate_web_link('themes-browse-premium', 'templates') . '">browse 200+ premium themes</a>)<br>';
1831
  echo '<input type="hidden" id="theme_id" name="' . UCP_OPTIONS_KEY . '[theme]" value="' . $options['theme'] . '">';
1832
 
1833
  foreach ($themes as $theme_id => $theme_name) {
@@ -1863,7 +1871,7 @@ class UCP {
1863
  <td>';
1864
  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>';
1865
  echo '<p class="description">&lt;style&gt; tags will be added automatically. Do not include them in your code.<br>
1866
- For RTL languages support add: <code>body { direction: rtl; }</code></p>';
1867
  echo '</td></tr>';
1868
 
1869
  echo '</table>';
@@ -2214,7 +2222,7 @@ class UCP {
2214
  echo '</div>';
2215
 
2216
  echo '<div class="ucp-pro-feature">';
2217
- echo '<span>200+ Templates</span>';
2218
  echo '<p>Building your own page from scratch is fun, but often you don\'t have time to do it! Use one of our purpose-built templates, change a few lines of text and you\'re ready to rock!</p>';
2219
  echo '</div>';
2220
 
@@ -2594,12 +2602,15 @@ class UCP {
2594
  // add our plugins to recommended list
2595
  static function plugins_api_result($res, $action, $args) {
2596
  remove_filter('plugins_api_result', array(__CLASS__, 'plugins_api_result'), 10, 3);
2597
-
2598
  $res = self::add_plugin_favs('eps-301-redirects', $res);
2599
  $res = self::add_plugin_favs('wp-force-ssl', $res);
2600
  $res = self::add_plugin_favs('wp-external-links', $res);
2601
- $res = self::add_plugin_favs('wp-reset', $res);
2602
- $res = self::add_plugin_favs('mailoptin', $res);
 
 
 
2603
 
2604
  return $res;
2605
  } // plugins_api_result
@@ -2608,12 +2619,15 @@ class UCP {
2608
  // reset pointers on activation
2609
  static function activate() {
2610
  self::reset_pointers();
 
2611
  } // activate
2612
 
 
2613
  // clean up on deactivation
2614
  static function deactivate() {
2615
  delete_option(UCP_POINTERS_KEY);
2616
  delete_option(UCP_NOTICES_KEY);
 
2617
  } // deactivate
2618
 
2619
 
@@ -2623,6 +2637,7 @@ class UCP {
2623
  delete_option(UCP_META_KEY);
2624
  delete_option(UCP_POINTERS_KEY);
2625
  delete_option(UCP_NOTICES_KEY);
 
2626
  } // uninstall
2627
  } // class UCP
2628
 
4
  Plugin URI: https://underconstructionpage.com/
5
  Description: Put your site behind a great looking under construction, coming soon, maintenance mode or landing page.
6
  Author: WebFactory Ltd
7
+ Version: 3.75
8
  Author URI: https://www.webfactoryltd.com/
9
  Text Domain: under-construction-page
10
 
98
  add_action('wp_ajax_ucp_submit_support_message', array(__CLASS__, 'submit_support_message_ajax'));
99
 
100
  add_filter('install_plugins_table_api_args_featured', array(__CLASS__, 'featured_plugins_tab'));
101
+ add_filter('install_plugins_table_api_args_recommended', array(__CLASS__, 'featured_plugins_tab'));
102
  } else {
103
  // main plugin logic
104
  add_action('wp', array(__CLASS__, 'display_construction_page'), 0, 1);
844
  $dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'welcome', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
845
 
846
  echo '<div id="ucp_rate_notice" class="notice-info notice"><p>Hi' . $name . ',<br>';
847
+ echo 'We have a <a class="open-ucp-upsell" data-pro-ad="notification-welcome-text" href="#">special time-sensitive offer</a> available just for another <b class="ucp-countdown">59min</b>! A <b>20% DISCOUNT</b> on our most popular lifetime licenses!<br>No nonsense! Pay once and use the plugin forever. <a class="open-ucp-upsell" data-pro-ad="notification-welcome-text2" href="#">Get</a> more than 50+ extra features, 220+ premium themes and over a million professional images.</p>';
848
 
849
  echo '<a href="#" class="button-primary open-ucp-upsell" data-pro-ad="notification-welcome-button">Upgrade to PRO now with a SPECIAL 20% WELCOME DISCOUNT</a>';
850
  echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href="' . esc_url($dismiss_url) . '"><small>' . __('I\'m not interested (remove this notice)', 'under-construction-page') . '</small></a>';
859
  $dismiss_url = add_query_arg(array('action' => 'ucp_dismiss_notice', 'notice' => 'olduser', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
860
 
861
  echo '<div id="ucp_rate_notice" class="notice-info notice"><p>Hi' . $name . ',<br>';
862
+ echo 'We have a <a class="open-ucp-upsell" data-pro-ad="notification-olduser-text" href="#">special offer</a> only for <b>users like you</b> who\'ve been using the UnderConstructionPage for a longer period of time: a <b>special DISCOUNT</b> on our most popular lifetime licenses!<br>No nonsense! Pay once and use the plugin forever.<br><a class="open-ucp-upsell" data-pro-ad="notification-olduser-text" href="#">Upgrade now</a> to <b>PRO</b> &amp; get more than 50+ extra features, 220+ premium themes and over a million HD images.</p>';
863
 
864
  echo '<a href="#" class="button-primary open-ucp-upsell" data-pro-ad="notification-olduser-button">Upgrade to PRO now with a SPECIAL DISCOUNT</a>';
865
  echo '&nbsp;&nbsp;&nbsp;&nbsp;<a href="' . esc_url($dismiss_url) . '"><small>' . __('I\'m not interested (remove this notice)', 'under-construction-page') . '</small></a>';
1268
  $notices = get_option(UCP_NOTICES_KEY);
1269
  unset($notices['dismiss_whitelisted']);
1270
  update_option(UCP_NOTICES_KEY, $notices);
1271
+ self::empty_cache();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1272
  }
1273
 
1274
  return array_merge($old_options, $options);
1275
  } // sanitize_settings
1276
+
1277
+
1278
+ static function empty_cache() {
1279
+ wp_cache_flush();
1280
+ if (function_exists('w3tc_flush_all')) {
1281
+ w3tc_flush_all();
1282
+ }
1283
+ if (function_exists('wp_cache_clear_cache')) {
1284
+ wp_cache_clear_cache();
1285
+ }
1286
+ if (method_exists('LiteSpeed_Cache_API', 'purge_all')) {
1287
+ LiteSpeed_Cache_API::purge_all();
1288
+ }
1289
+ if (class_exists('Endurance_Page_Cache')) {
1290
+ $epc = new Endurance_Page_Cache;
1291
+ $epc->purge_all();
1292
+ }
1293
+ if (class_exists('SG_CachePress_Supercacher') && method_exists('SG_CachePress_Supercacher', 'purge_cache')) {
1294
+ SG_CachePress_Supercacher::purge_cache(true);
1295
+ }
1296
+ if (class_exists('SiteGround_Optimizer\Supercacher\Supercacher')) {
1297
+ SiteGround_Optimizer\Supercacher\Supercacher::purge_cache();
1298
+ }
1299
+ if (isset($GLOBALS['wp_fastest_cache']) && method_exists($GLOBALS['wp_fastest_cache'], 'deleteCache')) {
1300
+ $GLOBALS['wp_fastest_cache']->deleteCache(true);
1301
+ }
1302
+ if (is_callable(array('Swift_Performance_Cache', 'clear_all_cache'))) {
1303
+ Swift_Performance_Cache::clear_all_cache();
1304
+ }
1305
+ if (is_callable(array('Hummingbird\WP_Hummingbird', 'flush_cache'))) {
1306
+ Hummingbird\WP_Hummingbird::flush_cache(true, false);
1307
+ }
1308
+ if (function_exists('rocket_clean_domain')) {
1309
+ rocket_clean_domain();
1310
+ }
1311
+ } // empty_cache
1312
 
1313
 
1314
  // checkbox helper function
1835
 
1836
  echo '<table class="form-table">';
1837
  echo '<tr valign="top">
1838
+ <td colspan="2"><b style="margin-bottom: 10px; display: inline-block;">' . __('Theme', 'under-construction-page') . '</b> (<a target="_blank" href="' . self::generate_web_link('themes-browse-premium', 'templates') . '">browse 220+ premium themes</a>)<br>';
1839
  echo '<input type="hidden" id="theme_id" name="' . UCP_OPTIONS_KEY . '[theme]" value="' . $options['theme'] . '">';
1840
 
1841
  foreach ($themes as $theme_id => $theme_name) {
1871
  <td>';
1872
  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>';
1873
  echo '<p class="description">&lt;style&gt; tags will be added automatically. Do not include them in your code.<br>
1874
+ For RTL languages support add: <code>body { direction: rtl; }</code><br>If you need help with writing custom CSS code, post your question on the <a href="https://wordpress.org/support/plugin/under-construction-page/" target="_blank">official forum</a>.</p>';
1875
  echo '</td></tr>';
1876
 
1877
  echo '</table>';
2222
  echo '</div>';
2223
 
2224
  echo '<div class="ucp-pro-feature">';
2225
+ echo '<span>220+ Templates</span>';
2226
  echo '<p>Building your own page from scratch is fun, but often you don\'t have time to do it! Use one of our purpose-built templates, change a few lines of text and you\'re ready to rock!</p>';
2227
  echo '</div>';
2228
 
2602
  // add our plugins to recommended list
2603
  static function plugins_api_result($res, $action, $args) {
2604
  remove_filter('plugins_api_result', array(__CLASS__, 'plugins_api_result'), 10, 3);
2605
+
2606
  $res = self::add_plugin_favs('eps-301-redirects', $res);
2607
  $res = self::add_plugin_favs('wp-force-ssl', $res);
2608
  $res = self::add_plugin_favs('wp-external-links', $res);
2609
+ $res = self::add_plugin_favs('security-ninja', $res);
2610
+
2611
+ if (!empty($_GET['tab']) && $_GET['tab'] == 'featured') {
2612
+ $res = self::add_plugin_favs('mailoptin', $res);
2613
+ }
2614
 
2615
  return $res;
2616
  } // plugins_api_result
2619
  // reset pointers on activation
2620
  static function activate() {
2621
  self::reset_pointers();
2622
+ self::empty_cache();
2623
  } // activate
2624
 
2625
+
2626
  // clean up on deactivation
2627
  static function deactivate() {
2628
  delete_option(UCP_POINTERS_KEY);
2629
  delete_option(UCP_NOTICES_KEY);
2630
+ self::empty_cache();
2631
  } // deactivate
2632
 
2633
 
2637
  delete_option(UCP_META_KEY);
2638
  delete_option(UCP_POINTERS_KEY);
2639
  delete_option(UCP_NOTICES_KEY);
2640
+ self::empty_cache();
2641
  } // uninstall
2642
  } // class UCP
2643