Version Description
Download this release
Release Info
| Developer | WebFactory |
| Plugin | |
| Version | 4.03 |
| Comparing to | |
| See all releases | |
Code changes from version 4.02 to 4.03
- includes/functions.php +6 -5
- load/functions.php +4 -2
- maintenance.php +1 -1
- readme.txt +7 -2
- wf-flyout/wf-flyout.php +13 -14
includes/functions.php
CHANGED
|
@@ -304,7 +304,7 @@ function mtnc_page_create_meta_boxes_widget_support()
|
|
| 304 |
|
| 305 |
add_meta_box('promo-review2', __('Help us keep the plugin free & maintained', 'maintenance'), 'mtnc_review_box', $mtnc_variable->options_page, 'side', 'high');
|
| 306 |
|
| 307 |
-
if (!mtnc_is_sn_active()) {
|
| 308 |
add_meta_box('promo-sn', __('Protect your site from day one with Security Ninja', 'maintenance'), 'mtnc_promo_sn', $mtnc_variable->options_page, 'side', 'default');
|
| 309 |
}
|
| 310 |
add_meta_box('promo-content2', __('Something is not working? Do you need our help?', 'maintenance'), 'mtnc_contact_support', $mtnc_variable->options_page, 'side', 'default');
|
|
@@ -449,6 +449,7 @@ function mtnc_add_css_fields()
|
|
| 449 |
echo '<table class="form-table">';
|
| 450 |
echo '<tbody>';
|
| 451 |
mtnc_generate_textarea_filed(__('CSS Code', 'maintenance'), 'custom_css', 'custom_css', wp_kses_stripslashes($mt_option['custom_css']));
|
|
|
|
| 452 |
echo '<tr><td colspan="2"><p><input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes"></p></td></tr>';
|
| 453 |
echo '</tbody>';
|
| 454 |
echo '</table>';
|
|
@@ -2655,7 +2656,7 @@ function mtnc_add_exclude_pages_fields()
|
|
| 2655 |
$current = $post_values->ID;
|
| 2656 |
}
|
| 2657 |
$selected = selected($current, $post_values->ID, false);
|
| 2658 |
-
$out_filed .= '<option value="' . $post_values->ID . '" ' . $selected . '>' . $post_values->post_title . '</option>';
|
| 2659 |
}
|
| 2660 |
|
| 2661 |
$out_filed .= '</select>';
|
|
@@ -2683,9 +2684,9 @@ add_action('mtnc_background_field', 'mtnc_get_background_fileds_action', 10);
|
|
| 2683 |
function mtnc_get_color_fileds_action()
|
| 2684 |
{
|
| 2685 |
$mt_option = mtnc_get_plugin_options(true);
|
| 2686 |
-
mtnc_get_color_field(__('Background Color', 'maintenance'), 'body_bg_color', 'body_bg_color', esc_attr($mt_option['body_bg_color']), '#111111');
|
| 2687 |
-
mtnc_get_color_field(__('Font Color', 'maintenance'), 'font_color', 'font_color', esc_attr($mt_option['font_color']), '#ffffff');
|
| 2688 |
-
mtnc_get_color_field(__('Login Block Background Color', 'maintenance'), 'controls_bg_color', 'controls_bg_color', isset($mt_option['controls_bg_color']) ? esc_attr($mt_option['controls_bg_color']) : '', '#000000');
|
| 2689 |
}
|
| 2690 |
add_action('mtnc_color_fields', 'mtnc_get_color_fileds_action', 10);
|
| 2691 |
|
| 304 |
|
| 305 |
add_meta_box('promo-review2', __('Help us keep the plugin free & maintained', 'maintenance'), 'mtnc_review_box', $mtnc_variable->options_page, 'side', 'high');
|
| 306 |
|
| 307 |
+
if (false && !mtnc_is_sn_active()) {
|
| 308 |
add_meta_box('promo-sn', __('Protect your site from day one with Security Ninja', 'maintenance'), 'mtnc_promo_sn', $mtnc_variable->options_page, 'side', 'default');
|
| 309 |
}
|
| 310 |
add_meta_box('promo-content2', __('Something is not working? Do you need our help?', 'maintenance'), 'mtnc_contact_support', $mtnc_variable->options_page, 'side', 'default');
|
| 449 |
echo '<table class="form-table">';
|
| 450 |
echo '<tbody>';
|
| 451 |
mtnc_generate_textarea_filed(__('CSS Code', 'maintenance'), 'custom_css', 'custom_css', wp_kses_stripslashes($mt_option['custom_css']));
|
| 452 |
+
echo '<tr><td> </td><td>Enter only the CSS code, without the <i><style> tags.</i></td></tr>';
|
| 453 |
echo '<tr><td colspan="2"><p><input type="submit" name="submit" id="submit" class="button button-primary" value="Save Changes"></p></td></tr>';
|
| 454 |
echo '</tbody>';
|
| 455 |
echo '</table>';
|
| 2656 |
$current = $post_values->ID;
|
| 2657 |
}
|
| 2658 |
$selected = selected($current, $post_values->ID, false);
|
| 2659 |
+
$out_filed .= '<option value="' . $post_values->ID . '" ' . $selected . '>' . esc_html($post_values->post_title) . '</option>';
|
| 2660 |
}
|
| 2661 |
|
| 2662 |
$out_filed .= '</select>';
|
| 2684 |
function mtnc_get_color_fileds_action()
|
| 2685 |
{
|
| 2686 |
$mt_option = mtnc_get_plugin_options(true);
|
| 2687 |
+
mtnc_get_color_field(__('Background Color', 'maintenance'), 'body_bg_color', 'body_bg_color', esc_attr(strip_tags($mt_option['body_bg_color'])), '#111111');
|
| 2688 |
+
mtnc_get_color_field(__('Font Color', 'maintenance'), 'font_color', 'font_color', esc_attr(strip_tags($mt_option['font_color'])), '#ffffff');
|
| 2689 |
+
mtnc_get_color_field(__('Login Block Background Color', 'maintenance'), 'controls_bg_color', 'controls_bg_color', isset($mt_option['controls_bg_color']) ? esc_attr(strip_tags($mt_option['controls_bg_color'])) : '', '#000000');
|
| 2690 |
}
|
| 2691 |
add_action('mtnc_color_fields', 'mtnc_get_color_fileds_action', 10);
|
| 2692 |
|
load/functions.php
CHANGED
|
@@ -182,6 +182,7 @@ function mtnc_get_options_style()
|
|
| 182 |
$mt_options = mtnc_get_plugin_options(true);
|
| 183 |
$options_style = '';
|
| 184 |
if (!empty($mt_options['body_bg_color'])) {
|
|
|
|
| 185 |
$options_style .= 'body {background-color: ' . esc_attr($mt_options['body_bg_color']) . '}';
|
| 186 |
$options_style .= '.preloader {background-color: ' . esc_attr($mt_options['body_bg_color']) . '}';
|
| 187 |
}
|
|
@@ -206,7 +207,7 @@ function mtnc_get_options_style()
|
|
| 206 |
}
|
| 207 |
|
| 208 |
if (!empty($mt_options['font_color'])) {
|
| 209 |
-
$font_color =
|
| 210 |
$options_style .= '.site-title, .preloader i, .login-form, .login-form a.lost-pass, .btn-open-login-form, .site-content, .user-content-wrapper, .user-content, footer, .maintenance a{color: ' . $font_color . ';} ';
|
| 211 |
$options_style .= 'a.close-user-content, #mailchimp-box form input[type="submit"], .login-form input#submit.button {border-color:' . $font_color . '} ';
|
| 212 |
$options_style .= 'input[type="submit"]:hover{background-color:' . $font_color . '} ';
|
|
@@ -214,6 +215,7 @@ function mtnc_get_options_style()
|
|
| 214 |
}
|
| 215 |
|
| 216 |
if (!empty($mt_options['controls_bg_color'])) {
|
|
|
|
| 217 |
$options_style .= "body > .login-form-container{background-color:{$mt_options['controls_bg_color']}}";
|
| 218 |
$options_style .= ".btn-open-login-form{background-color:{$mt_options['controls_bg_color']}}";
|
| 219 |
$options_style .= "input:-webkit-autofill, input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 50px {$mt_options['controls_bg_color']} inset}";
|
|
@@ -222,7 +224,7 @@ function mtnc_get_options_style()
|
|
| 222 |
}
|
| 223 |
|
| 224 |
if (!empty($mt_options['custom_css'])) {
|
| 225 |
-
$options_style .= wp_kses_stripslashes($mt_options['custom_css']);
|
| 226 |
}
|
| 227 |
|
| 228 |
echo '<style type="text/css">';
|
| 182 |
$mt_options = mtnc_get_plugin_options(true);
|
| 183 |
$options_style = '';
|
| 184 |
if (!empty($mt_options['body_bg_color'])) {
|
| 185 |
+
$mt_options['body_bg_color'] = strip_tags($mt_options['body_bg_color']);
|
| 186 |
$options_style .= 'body {background-color: ' . esc_attr($mt_options['body_bg_color']) . '}';
|
| 187 |
$options_style .= '.preloader {background-color: ' . esc_attr($mt_options['body_bg_color']) . '}';
|
| 188 |
}
|
| 207 |
}
|
| 208 |
|
| 209 |
if (!empty($mt_options['font_color'])) {
|
| 210 |
+
$font_color = strip_tags($mt_options['font_color']);
|
| 211 |
$options_style .= '.site-title, .preloader i, .login-form, .login-form a.lost-pass, .btn-open-login-form, .site-content, .user-content-wrapper, .user-content, footer, .maintenance a{color: ' . $font_color . ';} ';
|
| 212 |
$options_style .= 'a.close-user-content, #mailchimp-box form input[type="submit"], .login-form input#submit.button {border-color:' . $font_color . '} ';
|
| 213 |
$options_style .= 'input[type="submit"]:hover{background-color:' . $font_color . '} ';
|
| 215 |
}
|
| 216 |
|
| 217 |
if (!empty($mt_options['controls_bg_color'])) {
|
| 218 |
+
$mt_options['controls_bg_color'] = strip_tags($mt_options['controls_bg_color']);
|
| 219 |
$options_style .= "body > .login-form-container{background-color:{$mt_options['controls_bg_color']}}";
|
| 220 |
$options_style .= ".btn-open-login-form{background-color:{$mt_options['controls_bg_color']}}";
|
| 221 |
$options_style .= "input:-webkit-autofill, input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 50px {$mt_options['controls_bg_color']} inset}";
|
| 224 |
}
|
| 225 |
|
| 226 |
if (!empty($mt_options['custom_css'])) {
|
| 227 |
+
$options_style .= strip_tags(wp_kses_stripslashes($mt_options['custom_css']));
|
| 228 |
}
|
| 229 |
|
| 230 |
echo '<style type="text/css">';
|
maintenance.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: Maintenance
|
| 4 |
Plugin URI: https://wpmaintenancemode.com/
|
| 5 |
Description: Put your site in maintenance mode, away from the public view. Use maintenance plugin if your website is in development or you need to change a few things, run an upgrade. Make it only accessible to logged in users.
|
| 6 |
-
Version: 4.
|
| 7 |
Author: WebFactory Ltd
|
| 8 |
Author URI: https://www.webfactoryltd.com/
|
| 9 |
License: GPL2
|
| 3 |
Plugin Name: Maintenance
|
| 4 |
Plugin URI: https://wpmaintenancemode.com/
|
| 5 |
Description: Put your site in maintenance mode, away from the public view. Use maintenance plugin if your website is in development or you need to change a few things, run an upgrade. Make it only accessible to logged in users.
|
| 6 |
+
Version: 4.03
|
| 7 |
Author: WebFactory Ltd
|
| 8 |
Author URI: https://www.webfactoryltd.com/
|
| 9 |
License: GPL2
|
readme.txt
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
Contributors: WebFactory
|
| 3 |
Tags: maintenance, maintenance mode, maintenance page, coming soon, coming soon page, under construction, under construction page
|
| 4 |
Requires at least: 4.0
|
| 5 |
-
Tested up to: 5.
|
| 6 |
-
Stable tag: 4.
|
| 7 |
Requires PHP: 5.2
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
@@ -88,6 +88,11 @@ Please post the question on the <a href="http://wordpress.org/support/plugin/mai
|
|
| 88 |
|
| 89 |
== Changelog ==
|
| 90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
= v4.02 =
|
| 92 |
- 2021/03/06
|
| 93 |
- JS fixes on frontend
|
| 2 |
Contributors: WebFactory
|
| 3 |
Tags: maintenance, maintenance mode, maintenance page, coming soon, coming soon page, under construction, under construction page
|
| 4 |
Requires at least: 4.0
|
| 5 |
+
Tested up to: 5.8
|
| 6 |
+
Stable tag: 4.03
|
| 7 |
Requires PHP: 5.2
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 88 |
|
| 89 |
== Changelog ==
|
| 90 |
|
| 91 |
+
= v4.03 =
|
| 92 |
+
- 2021/07/18
|
| 93 |
+
- security fixes
|
| 94 |
+
- checked WP 5.8 compatibility
|
| 95 |
+
|
| 96 |
= v4.02 =
|
| 97 |
- 2021/03/06
|
| 98 |
- JS fixes on frontend
|
wf-flyout/wf-flyout.php
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
<?php
|
| 2 |
-
|
| 3 |
/**
|
| 4 |
* Universal fly-out menu for WebFactory plugins
|
| 5 |
* (c) WebFactory Ltd, 2021
|
|
@@ -95,21 +94,21 @@ if (false == class_exists('wf_flyout')) {
|
|
| 95 |
|
| 96 |
$out = '<style type="text/css">';
|
| 97 |
$out .= '#wf-flyout {
|
| 98 |
-
right: ' .
|
| 99 |
-
bottom: ' .
|
| 100 |
}';
|
| 101 |
$out .= '#wf-flyout #wff-image-wrapper {
|
| 102 |
-
border: ' .
|
| 103 |
}';
|
| 104 |
$out .= '#wf-flyout #wff-button img {
|
| 105 |
-
padding: ' .
|
| 106 |
-
width: ' .
|
| 107 |
-
height: ' .
|
| 108 |
}';
|
| 109 |
$out .= '#wf-flyout .wff-menu-item.accent {
|
| 110 |
-
background: ' .
|
| 111 |
}';
|
| 112 |
-
$out .=
|
| 113 |
$out .= '</style>';
|
| 114 |
|
| 115 |
echo $out;
|
|
@@ -133,7 +132,7 @@ if (false == class_exists('wf_flyout')) {
|
|
| 133 |
$out .= '<a href="#" id="wff-button">';
|
| 134 |
$out .= '<span class="wff-label">Open Quick Links</span>';
|
| 135 |
$out .= '<span id="wff-image-wrapper">';
|
| 136 |
-
$out .= '<img src="' . $icons_url . $this->config['icon_image'] . '" alt="Open Quick Links" title="Open Quick Links">';
|
| 137 |
$out .= '</span>';
|
| 138 |
$out .= '</a>';
|
| 139 |
|
|
@@ -148,12 +147,12 @@ if (false == class_exists('wf_flyout')) {
|
|
| 148 |
$item['class'] = trim($item['class']);
|
| 149 |
}
|
| 150 |
|
| 151 |
-
$out .= '<a
|
| 152 |
-
$out .= '<span class="wff-label visible">' . $item['label'] . '</span>';
|
| 153 |
if (substr($item['icon'], 0, 9) == 'dashicons') {
|
| 154 |
-
$out .= '<span class="dashicons ' . $item['icon'] . '"></span>';
|
| 155 |
} elseif (!empty($item['icon'])) {
|
| 156 |
-
$out .= '<span class="wff-icon"><img src="' . $icons_url . $item['icon'] . '"></span>';
|
| 157 |
}
|
| 158 |
$out .= '</a>';
|
| 159 |
} // foreach
|
| 1 |
<?php
|
|
|
|
| 2 |
/**
|
| 3 |
* Universal fly-out menu for WebFactory plugins
|
| 4 |
* (c) WebFactory Ltd, 2021
|
| 94 |
|
| 95 |
$out = '<style type="text/css">';
|
| 96 |
$out .= '#wf-flyout {
|
| 97 |
+
right: ' . sanitize_text_field($this->config['icon_right']) . ';
|
| 98 |
+
bottom: ' . sanitize_text_field($this->config['icon_bottom']) . ';
|
| 99 |
}';
|
| 100 |
$out .= '#wf-flyout #wff-image-wrapper {
|
| 101 |
+
border: ' . sanitize_text_field($this->config['icon_border']) . ';
|
| 102 |
}';
|
| 103 |
$out .= '#wf-flyout #wff-button img {
|
| 104 |
+
padding: ' . sanitize_text_field($this->config['icon_padding']) . ';
|
| 105 |
+
width: ' . sanitize_text_field($this->config['icon_size']) . ';
|
| 106 |
+
height: ' . sanitize_text_field($this->config['icon_size']) . ';
|
| 107 |
}';
|
| 108 |
$out .= '#wf-flyout .wff-menu-item.accent {
|
| 109 |
+
background: ' . sanitize_text_field($this->config['menu_accent_color']) . ';
|
| 110 |
}';
|
| 111 |
+
$out .= sanitize_text_field($this->config['custom_css']);
|
| 112 |
$out .= '</style>';
|
| 113 |
|
| 114 |
echo $out;
|
| 132 |
$out .= '<a href="#" id="wff-button">';
|
| 133 |
$out .= '<span class="wff-label">Open Quick Links</span>';
|
| 134 |
$out .= '<span id="wff-image-wrapper">';
|
| 135 |
+
$out .= '<img src="' . esc_url($icons_url . $this->config['icon_image']) . '" alt="Open Quick Links" title="Open Quick Links">';
|
| 136 |
$out .= '</span>';
|
| 137 |
$out .= '</a>';
|
| 138 |
|
| 147 |
$item['class'] = trim($item['class']);
|
| 148 |
}
|
| 149 |
|
| 150 |
+
$out .= '<a href="' . esc_url($item['href']) . '" class="wff-menu-item wff-menu-item-' . $i . ' ' . esc_attr($item['class']) . '" target="_blank">';
|
| 151 |
+
$out .= '<span class="wff-label visible">' . esc_html($item['label']) . '</span>';
|
| 152 |
if (substr($item['icon'], 0, 9) == 'dashicons') {
|
| 153 |
+
$out .= '<span class="dashicons ' . sanitize_text_field($item['icon']) . '"></span>';
|
| 154 |
} elseif (!empty($item['icon'])) {
|
| 155 |
+
$out .= '<span class="wff-icon"><img src="' . esc_url($icons_url . $item['icon']) . '"></span>';
|
| 156 |
}
|
| 157 |
$out .= '</a>';
|
| 158 |
} // foreach
|
