Version Description
- 2018/12/18
- minor security fixes in admin
- moved SN & MailOptin to the beginning of featured plugins list
- new cache busting for SiteGround SuperCacher
- removed "add media" from content field
- moved "show some love" up in admin, below content
Download this release
Release Info
| Developer | WebFactory |
| Plugin | |
| Version | 3.30 |
| Comparing to | |
| See all releases | |
Code changes from version 3.25 to 3.30
- css/ucp-admin.css +4 -0
- readme.txt +9 -1
- under-construction.php +20 -16
css/ucp-admin.css
CHANGED
|
@@ -52,6 +52,10 @@
|
|
| 52 |
margin-bottom: 30px;
|
| 53 |
}
|
| 54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
.settings_page_ucp h1 a {
|
| 56 |
color: black;
|
| 57 |
text-decoration: none;
|
| 52 |
margin-bottom: 30px;
|
| 53 |
}
|
| 54 |
|
| 55 |
+
#ucp_content #wp-content-media-buttons {
|
| 56 |
+
display: none;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
.settings_page_ucp h1 a {
|
| 60 |
color: black;
|
| 61 |
text-decoration: none;
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Tags: maintenance mode, maintenance page, coming soon page, landing page, under
|
|
| 4 |
Requires at least: 4.0
|
| 5 |
Requires PHP: 5.2
|
| 6 |
Tested up to: 5.0
|
| 7 |
-
Stable tag: 3.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
|
@@ -135,6 +135,14 @@ Or if needed, upload manually;
|
|
| 135 |
|
| 136 |
== Changelog ==
|
| 137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
= 3.25 =
|
| 139 |
* 2018/11/27
|
| 140 |
* new theme - Work Desk
|
| 4 |
Requires at least: 4.0
|
| 5 |
Requires PHP: 5.2
|
| 6 |
Tested up to: 5.0
|
| 7 |
+
Stable tag: 3.30
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
| 135 |
|
| 136 |
== Changelog ==
|
| 137 |
|
| 138 |
+
= 3.30 =
|
| 139 |
+
* 2018/12/18
|
| 140 |
+
* minor security fixes in admin
|
| 141 |
+
* moved SN & MailOptin to the beginning of featured plugins list
|
| 142 |
+
* new cache busting for SiteGround SuperCacher
|
| 143 |
+
* removed "add media" from content field
|
| 144 |
+
* moved "show some love" up in admin, below content
|
| 145 |
+
|
| 146 |
= 3.25 =
|
| 147 |
* 2018/11/27
|
| 148 |
* new theme - Work Desk
|
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.
|
| 8 |
Author URI: https://www.webfactoryltd.com/
|
| 9 |
Text Domain: under-construction-page
|
| 10 |
Domain Path: lang
|
|
@@ -862,7 +862,7 @@ class UCP {
|
|
| 862 |
$shown = true;
|
| 863 |
}
|
| 864 |
|
| 865 |
-
//
|
| 866 |
// disabled till further notice
|
| 867 |
if (false && self::is_plugin_page() &&
|
| 868 |
empty($notices['dismiss_translate']) &&
|
|
@@ -964,7 +964,7 @@ class UCP {
|
|
| 964 |
|
| 965 |
// change status via admin bar
|
| 966 |
static function change_status() {
|
| 967 |
-
if (empty($_GET['new_status'])) {
|
| 968 |
wp_safe_redirect(admin_url());
|
| 969 |
exit;
|
| 970 |
}
|
|
@@ -1015,12 +1015,14 @@ class UCP {
|
|
| 1015 |
$main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . 'images/ucp_icon.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') . ' <i class="ucp-status-dot ucp-status-dot-enabled">●</i></span>';
|
| 1016 |
$class = 'ucp-enabled';
|
| 1017 |
$action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'disabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
|
|
|
| 1018 |
$action = __('Under Construction Mode', 'under-construction-page');
|
| 1019 |
$action .= '<a href="' . $action_url . '" id="ucp-status-wrapper" class="on"><span id="ucp-status-off" class="ucp-status-btn">OFF</span><span id="ucp-status-on" class="ucp-status-btn">ON</span></a>';
|
| 1020 |
} else {
|
| 1021 |
$main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . 'images/ucp_icon.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') . ' <i class="ucp-status-dot ucp-status-dot-disabled">●</i></span>';
|
| 1022 |
$class = 'ucp-disabled';
|
| 1023 |
$action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'enabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
|
|
|
| 1024 |
$action = __('Under Construction Mode', 'under-construction-page');
|
| 1025 |
$action .= '<a href="' . $action_url . '" id="ucp-status-wrapper" class="off"><span id="ucp-status-off" class="ucp-status-btn">OFF</span><span id="ucp-status-on" class="ucp-status-btn">ON</span></a>';
|
| 1026 |
}
|
|
@@ -1313,6 +1315,9 @@ class UCP {
|
|
| 1313 |
if (class_exists('SG_CachePress_Supercacher') && method_exists('SG_CachePress_Supercacher', 'purge_cache')) {
|
| 1314 |
SG_CachePress_Supercacher::purge_cache(true);
|
| 1315 |
}
|
|
|
|
|
|
|
|
|
|
| 1316 |
if (isset($GLOBALS['wp_fastest_cache']) && method_exists($GLOBALS['wp_fastest_cache'], 'deleteCache')) {
|
| 1317 |
$GLOBALS['wp_fastest_cache']->deleteCache(true);
|
| 1318 |
}
|
|
@@ -1523,6 +1528,15 @@ class UCP {
|
|
| 1523 |
echo '<p class="description">All HTML elements are allowed. Shortcodes are not parsed except <a href="#title">UC theme ones</a>. Default: ' . $default_options['content'] . '</p>';
|
| 1524 |
echo '</td></tr>';
|
| 1525 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1526 |
|
| 1527 |
if (self::is_mailoptin_active()) {
|
| 1528 |
$mailoptin_campaigns = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'mo_optin_campaigns');
|
|
@@ -1597,16 +1611,6 @@ class UCP {
|
|
| 1597 |
echo '<p class="description">Show a discrete link to the login form, or WP admin if you\'re logged in, in the lower right corner of the page.</p>';
|
| 1598 |
echo '</td></tr>';
|
| 1599 |
|
| 1600 |
-
echo '<tr valign="top">
|
| 1601 |
-
<th scope="row"><label for="linkback">' . __('Show Some Love', 'under-construction-page') . '</label></th>
|
| 1602 |
-
<td>';
|
| 1603 |
-
echo '<div class="toggle-wrapper">
|
| 1604 |
-
<input type="checkbox" id="linkback" ' . self::checked(1, $options['linkback']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[linkback]">
|
| 1605 |
-
<label for="linkback" class="toggle"><span class="toggle_handler"></span></label>
|
| 1606 |
-
</div>';
|
| 1607 |
-
echo '<p class="description">Please help others learn about this free plugin by placing a small link in the footer. Thank you very much!</p>';
|
| 1608 |
-
echo '</td></tr>';
|
| 1609 |
-
|
| 1610 |
echo '<tr valign="top">
|
| 1611 |
<th scope="row"><label for="custom_footer_code">' . __('Custom Footer Code', 'under-construction-page') . '</label></th>
|
| 1612 |
<td>';
|
|
@@ -2417,7 +2421,7 @@ class UCP {
|
|
| 2417 |
|
| 2418 |
// add single plugin to list of favs
|
| 2419 |
static function add_plugin_favs($plugin_slug, $res) {
|
| 2420 |
-
if (is_array($res->plugins)) {
|
| 2421 |
foreach ($res->plugins as $plugin) {
|
| 2422 |
if ($plugin->slug == $plugin_slug) {
|
| 2423 |
return $res;
|
|
@@ -2426,7 +2430,7 @@ class UCP {
|
|
| 2426 |
}
|
| 2427 |
|
| 2428 |
if ($plugin_info = get_transient('wf-plugin-info-' . $plugin_slug)) {
|
| 2429 |
-
$res->plugins
|
| 2430 |
} else {
|
| 2431 |
$plugin_info = plugins_api('plugin_information', array(
|
| 2432 |
'slug' => $plugin_slug,
|
|
@@ -2454,8 +2458,8 @@ class UCP {
|
|
| 2454 |
static function plugins_api_result($res, $action, $args) {
|
| 2455 |
remove_filter('plugins_api_result', array(__CLASS__, 'plugins_api_result'), 10, 3);
|
| 2456 |
|
| 2457 |
-
$res = self::add_plugin_favs('mailoptin', $res);
|
| 2458 |
$res = self::add_plugin_favs('security-ninja', $res);
|
|
|
|
| 2459 |
|
| 2460 |
return $res;
|
| 2461 |
} // plugins_api_result
|
| 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.30
|
| 8 |
Author URI: https://www.webfactoryltd.com/
|
| 9 |
Text Domain: under-construction-page
|
| 10 |
Domain Path: lang
|
| 862 |
$shown = true;
|
| 863 |
}
|
| 864 |
|
| 865 |
+
// ask for translation
|
| 866 |
// disabled till further notice
|
| 867 |
if (false && self::is_plugin_page() &&
|
| 868 |
empty($notices['dismiss_translate']) &&
|
| 964 |
|
| 965 |
// change status via admin bar
|
| 966 |
static function change_status() {
|
| 967 |
+
if (false === current_user_can('administrator') || empty($_GET['new_status']) || false === check_admin_referer('ucp_change_status')) {
|
| 968 |
wp_safe_redirect(admin_url());
|
| 969 |
exit;
|
| 970 |
}
|
| 1015 |
$main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . 'images/ucp_icon.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') . ' <i class="ucp-status-dot ucp-status-dot-enabled">●</i></span>';
|
| 1016 |
$class = 'ucp-enabled';
|
| 1017 |
$action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'disabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
| 1018 |
+
$action_url = wp_nonce_url($action_url, 'ucp_change_status');
|
| 1019 |
$action = __('Under Construction Mode', 'under-construction-page');
|
| 1020 |
$action .= '<a href="' . $action_url . '" id="ucp-status-wrapper" class="on"><span id="ucp-status-off" class="ucp-status-btn">OFF</span><span id="ucp-status-on" class="ucp-status-btn">ON</span></a>';
|
| 1021 |
} else {
|
| 1022 |
$main_label = '<img style="height: 17px; margin-bottom: -4px; padding-right: 3px;" src="' . UCP_PLUGIN_URL . 'images/ucp_icon.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') . ' <i class="ucp-status-dot ucp-status-dot-disabled">●</i></span>';
|
| 1023 |
$class = 'ucp-disabled';
|
| 1024 |
$action_url = add_query_arg(array('action' => 'ucp_change_status', 'new_status' => 'enabled', 'redirect' => urlencode($_SERVER['REQUEST_URI'])), admin_url('admin.php'));
|
| 1025 |
+
$action_url = wp_nonce_url($action_url, 'ucp_change_status');
|
| 1026 |
$action = __('Under Construction Mode', 'under-construction-page');
|
| 1027 |
$action .= '<a href="' . $action_url . '" id="ucp-status-wrapper" class="off"><span id="ucp-status-off" class="ucp-status-btn">OFF</span><span id="ucp-status-on" class="ucp-status-btn">ON</span></a>';
|
| 1028 |
}
|
| 1315 |
if (class_exists('SG_CachePress_Supercacher') && method_exists('SG_CachePress_Supercacher', 'purge_cache')) {
|
| 1316 |
SG_CachePress_Supercacher::purge_cache(true);
|
| 1317 |
}
|
| 1318 |
+
if (class_exists('SiteGround_Optimizer\Supercacher\Supercacher')) {
|
| 1319 |
+
SiteGround_Optimizer\Supercacher\Supercacher::purge_cache();
|
| 1320 |
+
}
|
| 1321 |
if (isset($GLOBALS['wp_fastest_cache']) && method_exists($GLOBALS['wp_fastest_cache'], 'deleteCache')) {
|
| 1322 |
$GLOBALS['wp_fastest_cache']->deleteCache(true);
|
| 1323 |
}
|
| 1528 |
echo '<p class="description">All HTML elements are allowed. Shortcodes are not parsed except <a href="#title">UC theme ones</a>. Default: ' . $default_options['content'] . '</p>';
|
| 1529 |
echo '</td></tr>';
|
| 1530 |
|
| 1531 |
+
echo '<tr valign="top">
|
| 1532 |
+
<th scope="row"><label for="linkback">' . __('Show Some Love', 'under-construction-page') . '</label></th>
|
| 1533 |
+
<td>';
|
| 1534 |
+
echo '<div class="toggle-wrapper">
|
| 1535 |
+
<input type="checkbox" id="linkback" ' . self::checked(1, $options['linkback']) . ' type="checkbox" value="1" name="' . UCP_OPTIONS_KEY . '[linkback]">
|
| 1536 |
+
<label for="linkback" class="toggle"><span class="toggle_handler"></span></label>
|
| 1537 |
+
</div>';
|
| 1538 |
+
echo '<p class="description">Please help others learn about this free plugin by placing a small link in the footer. Thank you very much!</p>';
|
| 1539 |
+
echo '</td></tr>';
|
| 1540 |
|
| 1541 |
if (self::is_mailoptin_active()) {
|
| 1542 |
$mailoptin_campaigns = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'mo_optin_campaigns');
|
| 1611 |
echo '<p class="description">Show a discrete link to the login form, or WP admin if you\'re logged in, in the lower right corner of the page.</p>';
|
| 1612 |
echo '</td></tr>';
|
| 1613 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1614 |
echo '<tr valign="top">
|
| 1615 |
<th scope="row"><label for="custom_footer_code">' . __('Custom Footer Code', 'under-construction-page') . '</label></th>
|
| 1616 |
<td>';
|
| 2421 |
|
| 2422 |
// add single plugin to list of favs
|
| 2423 |
static function add_plugin_favs($plugin_slug, $res) {
|
| 2424 |
+
if (!empty($res->plugins) && is_array($res->plugins)) {
|
| 2425 |
foreach ($res->plugins as $plugin) {
|
| 2426 |
if ($plugin->slug == $plugin_slug) {
|
| 2427 |
return $res;
|
| 2430 |
}
|
| 2431 |
|
| 2432 |
if ($plugin_info = get_transient('wf-plugin-info-' . $plugin_slug)) {
|
| 2433 |
+
array_unshift($res->plugins, $plugin_info);
|
| 2434 |
} else {
|
| 2435 |
$plugin_info = plugins_api('plugin_information', array(
|
| 2436 |
'slug' => $plugin_slug,
|
| 2458 |
static function plugins_api_result($res, $action, $args) {
|
| 2459 |
remove_filter('plugins_api_result', array(__CLASS__, 'plugins_api_result'), 10, 3);
|
| 2460 |
|
|
|
|
| 2461 |
$res = self::add_plugin_favs('security-ninja', $res);
|
| 2462 |
+
$res = self::add_plugin_favs('mailoptin', $res);
|
| 2463 |
|
| 2464 |
return $res;
|
| 2465 |
} // plugins_api_result
|
