Version Description
- Fixed bug : Warning in count function for 7.2 php version
- Fixed bug : Background color
- Design : Changing position of WP Maintenance menu
=
Download this release
Release Info
Developer | Florent73 |
Plugin | WP Maintenance |
Version | 5.0.3 |
Comparing to | |
See all releases |
Code changes from version 5.0.2 to 5.0.3
- classes/wp-maintenance.php +11 -7
- readme.txt +9 -4
- themes/default/functions.php +5 -6
- wp-maintenance.php +2 -2
classes/wp-maintenance.php
CHANGED
@@ -187,7 +187,10 @@ class WP_maintenance {
|
|
187 |
|
188 |
global $current_user;
|
189 |
global $_wp_admin_css_colors;
|
190 |
-
|
|
|
|
|
|
|
191 |
if (isset($_GET['page']) && strpos($_GET['page'], 'wp-maintenance') !==false) {
|
192 |
echo '<link rel="stylesheet" type="text/css" media="all" href="' .WPM_PLUGIN_URL.'css/wpm-admin.css">';
|
193 |
|
@@ -228,20 +231,21 @@ a.wpmadashicons:hover { text-decoration:none;color: '.$colors[2].'!important; }
|
|
228 |
function wpm_add_menu_admin_bar( $wp_admin_bar ) {
|
229 |
|
230 |
$checkActive = get_option('wp_maintenance_active');
|
231 |
-
$textAdmin = '<
|
|
|
232 |
|
233 |
if( isset($checkActive) && !is_network_admin() ) {
|
234 |
|
235 |
if( $checkActive==1 ) {
|
236 |
-
$
|
237 |
}
|
238 |
$args = array(
|
239 |
-
'id' => 'wpm-info',
|
240 |
'title' => $textAdmin, // alter the title of existing node
|
241 |
'href' => 'admin.php?page=wp-maintenance', // Lien du menu
|
242 |
-
'parent' =>
|
243 |
'meta' => array(
|
244 |
-
'class' => 'wpmbackground'
|
245 |
)
|
246 |
);
|
247 |
$wp_admin_bar->add_node( $args );
|
@@ -578,7 +582,7 @@ a.wpmadashicons:hover { text-decoration:none;color: '.$colors[2].'!important; }
|
|
578 |
if(get_option('wp_maintenance_limit')) { extract(get_option('wp_maintenance_limit')); }
|
579 |
$paramLimit = get_option('wp_maintenance_limit');
|
580 |
|
581 |
-
if( isset($paramLimit) &&
|
582 |
foreach($paramLimit as $limitrole) {
|
583 |
if( is_user_logged_in() ) {
|
584 |
$user_id = get_current_user_id();
|
187 |
|
188 |
global $current_user;
|
189 |
global $_wp_admin_css_colors;
|
190 |
+
// Add Style for all admin
|
191 |
+
echo '
|
192 |
+
<style>#wpadminbar .wpmbackground-on > .ab-item{ color:#fff;background-color: #f44; }#wpadminbar .wpmbackground-on .ab-icon:before { content: "\f308";top: 2px;color:#fff !important; }#wpadminbar .wpmbackground-on:hover > .ab-item{ background-color: #a30 !important;color:#fff !important; }#wpadminbar .wpmbackground-off > .ab-item{ color:#fff; }#wpadminbar .wpmbackground-off .ab-icon:before { content: "\f308";top: 2px;color:#fff !important; }</style>
|
193 |
+
';
|
194 |
if (isset($_GET['page']) && strpos($_GET['page'], 'wp-maintenance') !==false) {
|
195 |
echo '<link rel="stylesheet" type="text/css" media="all" href="' .WPM_PLUGIN_URL.'css/wpm-admin.css">';
|
196 |
|
231 |
function wpm_add_menu_admin_bar( $wp_admin_bar ) {
|
232 |
|
233 |
$checkActive = get_option('wp_maintenance_active');
|
234 |
+
$textAdmin = '<span class="ab-icon"></span> '.__('WP Maintenance', 'wp-maintenance');
|
235 |
+
$classAdminBar = 'off';
|
236 |
|
237 |
if( isset($checkActive) && !is_network_admin() ) {
|
238 |
|
239 |
if( $checkActive==1 ) {
|
240 |
+
$classAdminBar = 'on';
|
241 |
}
|
242 |
$args = array(
|
243 |
+
'id' => 'wpm-info', // id of the existing child node (New > Post)
|
244 |
'title' => $textAdmin, // alter the title of existing node
|
245 |
'href' => 'admin.php?page=wp-maintenance', // Lien du menu
|
246 |
+
'parent' => 'top-secondary', // set parent to false to make it a top level (parent) node
|
247 |
'meta' => array(
|
248 |
+
'class' => 'wpmbackground-'.$classAdminBar
|
249 |
)
|
250 |
);
|
251 |
$wp_admin_bar->add_node( $args );
|
582 |
if(get_option('wp_maintenance_limit')) { extract(get_option('wp_maintenance_limit')); }
|
583 |
$paramLimit = get_option('wp_maintenance_limit');
|
584 |
|
585 |
+
if( isset($paramLimit) && !empty($paramLimit) ) {
|
586 |
foreach($paramLimit as $limitrole) {
|
587 |
if( is_user_logged_in() ) {
|
588 |
$user_id = get_current_user_id();
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Florent73
|
|
3 |
Donate link: https://wpmaintenance.info/a-propos/
|
4 |
Tags: Maintenance, Construction, Launch, Coming soon
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 5.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -67,11 +67,16 @@ You can translate WP Maintenance on [__translate.wordpress.org__](https://transl
|
|
67 |
|
68 |
== Upgrade Notice ==
|
69 |
|
70 |
-
= 5.0.
|
71 |
-
* Fixed bug :
|
|
|
|
|
72 |
|
73 |
== Changelog ==
|
74 |
|
|
|
|
|
|
|
75 |
= 5.0.1 =
|
76 |
* Fixed bug : mode preview page
|
77 |
|
3 |
Donate link: https://wpmaintenance.info/a-propos/
|
4 |
Tags: Maintenance, Construction, Launch, Coming soon
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 5.0
|
7 |
+
Stable tag: 5.0.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
67 |
|
68 |
== Upgrade Notice ==
|
69 |
|
70 |
+
= 5.0.3 =
|
71 |
+
* Fixed bug : Warning in count function for 7.2 php version
|
72 |
+
* Fixed bug : Background color
|
73 |
+
* Design : Changing position of WP Maintenance menu
|
74 |
|
75 |
== Changelog ==
|
76 |
|
77 |
+
= 5.0.2 =
|
78 |
+
* Fixed bug : conflict mode preview with others previews
|
79 |
+
|
80 |
= 5.0.1 =
|
81 |
* Fixed bug : mode preview page
|
82 |
|
themes/default/functions.php
CHANGED
@@ -184,6 +184,7 @@ function wpm_customcss() {
|
|
184 |
body {
|
185 |
background-image: url(<?php echo WP_PLUGIN_URL.'/wp-maintenance/images/pattern'.$o['b_pattern']; ?>.png);
|
186 |
background-repeat: repeat;
|
|
|
187 |
<?php echo $optionBackground; ?>
|
188 |
}
|
189 |
<?php
|
@@ -199,11 +200,14 @@ background-repeat: repeat;
|
|
199 |
}
|
200 |
?>
|
201 |
body {
|
|
|
202 |
background:url(<?php echo $o['b_image']; ?>) <?php echo $o['b_repeat_image']; ?> <?php echo $o['b_fixed_image']; ?>top center;
|
203 |
background-size: cover;
|
204 |
-webkit-background-size: cover;
|
205 |
-moz-background-size: cover;
|
206 |
-o-background-size: cover;
|
|
|
|
|
207 |
}
|
208 |
<?php
|
209 |
if( isset($o['b_opacity_image']) ) {
|
@@ -211,12 +215,7 @@ background-size: cover;
|
|
211 |
#wrapper { background-color: rgba(0,0,0,<?php echo $o['b_opacity_image']; ?>); }
|
212 |
<?php
|
213 |
}
|
214 |
-
|
215 |
-
} else {
|
216 |
-
?>
|
217 |
-
body { background-color: <?php echo $o['color_bg']; ?> }
|
218 |
-
<?php }
|
219 |
-
|
220 |
}
|
221 |
?>
|
222 |
|
184 |
body {
|
185 |
background-image: url(<?php echo WP_PLUGIN_URL.'/wp-maintenance/images/pattern'.$o['b_pattern']; ?>.png);
|
186 |
background-repeat: repeat;
|
187 |
+
background-color: <?php echo $o['color_bg']; ?>
|
188 |
<?php echo $optionBackground; ?>
|
189 |
}
|
190 |
<?php
|
200 |
}
|
201 |
?>
|
202 |
body {
|
203 |
+
display: grid!important;
|
204 |
background:url(<?php echo $o['b_image']; ?>) <?php echo $o['b_repeat_image']; ?> <?php echo $o['b_fixed_image']; ?>top center;
|
205 |
background-size: cover;
|
206 |
-webkit-background-size: cover;
|
207 |
-moz-background-size: cover;
|
208 |
-o-background-size: cover;
|
209 |
+
background-color: <?php echo $o['color_bg']; ?>;
|
210 |
+
background-position: center;
|
211 |
}
|
212 |
<?php
|
213 |
if( isset($o['b_opacity_image']) ) {
|
215 |
#wrapper { background-color: rgba(0,0,0,<?php echo $o['b_opacity_image']; ?>); }
|
216 |
<?php
|
217 |
}
|
218 |
+
}
|
|
|
|
|
|
|
|
|
|
|
219 |
}
|
220 |
?>
|
221 |
|
wp-maintenance.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: The WP Maintenance plugin allows you to put your website on the waiting time for you to do maintenance or launch your website. Personalize this page with picture, countdown...
|
6 |
* Author: Florent Maillefaud
|
7 |
* Author URI: https://wpmaintenance.info
|
8 |
-
* Version: 5.0.
|
9 |
* Text Domain: wp-maintenance
|
10 |
* Domain Path: /languages/
|
11 |
*/
|
@@ -36,7 +36,7 @@ define( 'WPM_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
|
36 |
define( 'WPM_PLUGIN_URL', plugins_url().'/'.strtolower('wp-maintenance').'/');
|
37 |
define( 'WPM_ICONS_URL', plugins_url().'/'.strtolower('wp-maintenance').'/socialicons/');
|
38 |
|
39 |
-
if( !defined( 'WPM_VERSION' )) { define( 'WPM_VERSION', '5.0.
|
40 |
|
41 |
require WPM_DIR . 'classes/wp-maintenance.php';
|
42 |
require WPM_DIR . 'classes/slider.php';
|
5 |
* Description: The WP Maintenance plugin allows you to put your website on the waiting time for you to do maintenance or launch your website. Personalize this page with picture, countdown...
|
6 |
* Author: Florent Maillefaud
|
7 |
* Author URI: https://wpmaintenance.info
|
8 |
+
* Version: 5.0.3
|
9 |
* Text Domain: wp-maintenance
|
10 |
* Domain Path: /languages/
|
11 |
*/
|
36 |
define( 'WPM_PLUGIN_URL', plugins_url().'/'.strtolower('wp-maintenance').'/');
|
37 |
define( 'WPM_ICONS_URL', plugins_url().'/'.strtolower('wp-maintenance').'/socialicons/');
|
38 |
|
39 |
+
if( !defined( 'WPM_VERSION' )) { define( 'WPM_VERSION', '5.0.3' ); }
|
40 |
|
41 |
require WPM_DIR . 'classes/wp-maintenance.php';
|
42 |
require WPM_DIR . 'classes/slider.php';
|