Version Description
This version is stable
=
Download this release
Release Info
Developer | Florent73 |
Plugin | WP Maintenance |
Version | 3.0.7 |
Comparing to | |
See all releases |
Code changes from version 3.0.6 to 3.0.7
- classes/countdown.php +10 -12
- classes/slider.php +38 -29
- classes/wp-maintenance.php +12 -2
- includes/functions.php +20 -74
- includes/shortcodes.php +7 -12
- readme.txt +12 -4
- views/wp-maintenance-picture.php +1 -1
- wp-maintenance.php +2 -2
classes/countdown.php
CHANGED
@@ -11,6 +11,7 @@ class WPM_Countdown extends WP_maintenance {
|
|
11 |
// Récupère les paramètres sauvegardés
|
12 |
$paramMMode = wp_maintenance::wpm_get_options();
|
13 |
$Counter = '';
|
|
|
14 |
/*********** AJOUT COMPTEUR SUIVANT LES PARAMETRES *********/
|
15 |
if( isset($paramMMode['active_cpt']) && $paramMMode['active_cpt']==1 && !empty($date) ) {
|
16 |
|
@@ -55,8 +56,9 @@ class WPM_Countdown extends WP_maintenance {
|
|
55 |
|
56 |
// Récupère les paramètres sauvegardés
|
57 |
$paramMMode = wp_maintenance::wpm_get_options();
|
58 |
-
|
59 |
-
|
|
|
60 |
#wpm-cpt-day, #wpm-cpt-hours, #wpm-cpt-minutes, #wpm-cpt-seconds {}
|
61 |
.cptR-rec_countdown {';
|
62 |
if( isset($paramMMode['date_cpt_size']) ) { $wpmStyle .= 'font-size:'.$paramMMode['date_cpt_size'].'px;'; }
|
@@ -72,22 +74,18 @@ $wpmStyle .= '
|
|
72 |
div.bloc {';
|
73 |
if( isset($paramMMode['font_bottom_size']) ) { $wpmStyle .= 'font-size: '.($paramMMode['font_bottom_size']*0.8).'px;'; }
|
74 |
$wpmStyle .= '}
|
75 |
-
#wpm-cpt-day, #wpm-cpt-hours, #wpm-cpt-minutes, #wpm-cpt-seconds {
|
76 |
-
/*width:20%;*/
|
77 |
-
}
|
78 |
|
79 |
}
|
80 |
@media (max-width: 640px) {
|
81 |
.cptR-rec_countdown {';
|
82 |
if( isset($paramMMode['date_cpt_size']) ) { $wpmStyle .= 'font-size:'.($paramMMode['date_cpt_size']*0.5).'px;'; }
|
83 |
-
$wpmStyle .= '
|
84 |
-
|
85 |
-
}
|
86 |
-
#wpm-cpt-day, #wpm-cpt-hours, #wpm-cpt-minutes, #wpm-cpt-seconds {
|
87 |
-
/*width:20%;*/
|
88 |
-
text-align:center;
|
89 |
-
}
|
90 |
}';
|
|
|
|
|
91 |
}
|
|
|
92 |
|
93 |
}
|
11 |
// Récupère les paramètres sauvegardés
|
12 |
$paramMMode = wp_maintenance::wpm_get_options();
|
13 |
$Counter = '';
|
14 |
+
|
15 |
/*********** AJOUT COMPTEUR SUIVANT LES PARAMETRES *********/
|
16 |
if( isset($paramMMode['active_cpt']) && $paramMMode['active_cpt']==1 && !empty($date) ) {
|
17 |
|
56 |
|
57 |
// Récupère les paramètres sauvegardés
|
58 |
$paramMMode = wp_maintenance::wpm_get_options();
|
59 |
+
$wpmStyle = '';
|
60 |
+
if( isset($paramMMode['active_cpt']) && $paramMMode['active_cpt']==1) {
|
61 |
+
$wpmStyle .= '
|
62 |
#wpm-cpt-day, #wpm-cpt-hours, #wpm-cpt-minutes, #wpm-cpt-seconds {}
|
63 |
.cptR-rec_countdown {';
|
64 |
if( isset($paramMMode['date_cpt_size']) ) { $wpmStyle .= 'font-size:'.$paramMMode['date_cpt_size'].'px;'; }
|
74 |
div.bloc {';
|
75 |
if( isset($paramMMode['font_bottom_size']) ) { $wpmStyle .= 'font-size: '.($paramMMode['font_bottom_size']*0.8).'px;'; }
|
76 |
$wpmStyle .= '}
|
77 |
+
#wpm-cpt-day, #wpm-cpt-hours, #wpm-cpt-minutes, #wpm-cpt-seconds { }
|
|
|
|
|
78 |
|
79 |
}
|
80 |
@media (max-width: 640px) {
|
81 |
.cptR-rec_countdown {';
|
82 |
if( isset($paramMMode['date_cpt_size']) ) { $wpmStyle .= 'font-size:'.($paramMMode['date_cpt_size']*0.5).'px;'; }
|
83 |
+
$wpmStyle .= 'text-align:center;}
|
84 |
+
#wpm-cpt-day, #wpm-cpt-hours, #wpm-cpt-minutes, #wpm-cpt-seconds {text-align:center;}
|
|
|
|
|
|
|
|
|
|
|
85 |
}';
|
86 |
+
}
|
87 |
+
return $wpmStyle;
|
88 |
}
|
89 |
+
|
90 |
|
91 |
}
|
classes/slider.php
CHANGED
@@ -12,10 +12,11 @@ class WPM_Slider extends WP_maintenance {
|
|
12 |
public static function slider_css() {
|
13 |
|
14 |
// Récupère les paramètres sauvegardés
|
15 |
-
|
16 |
-
$paramMMode = get_option('wp_maintenance_settings');
|
17 |
|
18 |
if( isset($paramSliderOptions['slider_width']) ) { $wpmSliderWidth = $paramSliderOptions['slider_width']; } else { $wpmSliderWidth = 50; }
|
|
|
|
|
19 |
$addCssSlider = '
|
20 |
<link rel="stylesheet" href="'.WP_PLUGIN_URL.'/wp-maintenance/css/wpm-slideshow.css">
|
21 |
<link rel="stylesheet" href="'.WP_PLUGIN_URL.'/wp-maintenance/css/wpm-responsiveslides.css">
|
@@ -35,15 +36,20 @@ class WPM_Slider extends WP_maintenance {
|
|
35 |
</style>
|
36 |
|
37 |
';
|
38 |
-
|
39 |
return $addCssSlider;
|
40 |
}
|
41 |
|
42 |
public static function slider_scripts() {
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
47 |
return $addScriptSlider;
|
48 |
|
49 |
}
|
@@ -51,30 +57,33 @@ class WPM_Slider extends WP_maintenance {
|
|
51 |
|
52 |
// Récupère les paramètres sauvegardés
|
53 |
$paramMMode = wp_maintenance::wpm_get_options();
|
|
|
54 |
|
55 |
-
if(
|
56 |
-
|
|
|
|
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
-
$wpmSliderAuto = 'true';
|
66 |
-
if( isset( $paramSliderOptions['slider_auto'] ) && $paramSliderOptions['slider_auto']!='' ) {
|
67 |
-
$wpmSliderAuto = $paramSliderOptions['slider_auto'];
|
68 |
-
}
|
69 |
-
$wpmSliderSpeed = 500;
|
70 |
-
if( isset( $paramSliderOptions['slider_speed'] ) && $paramSliderOptions['slider_speed']!='' ) {
|
71 |
-
$wpmSliderSpeed = $paramSliderOptions['slider_speed'];
|
72 |
-
}
|
73 |
-
$wpmSliderNav = 'false';
|
74 |
-
if( isset( $paramSliderOptions['slider_nav'] ) && $paramSliderOptions['slider_nav']!='' ) {
|
75 |
-
$wpmSliderNav = $paramSliderOptions['slider_nav'];
|
76 |
-
}
|
77 |
-
|
78 |
|
79 |
$addScriptSlideshow = '
|
80 |
<script>
|
@@ -102,7 +111,7 @@ class WPM_Slider extends WP_maintenance {
|
|
102 |
$addScriptSlideshow .= '
|
103 |
});
|
104 |
</script>';
|
105 |
-
|
106 |
return $addScriptSlideshow;
|
107 |
}
|
108 |
|
@@ -112,7 +121,7 @@ class WPM_Slider extends WP_maintenance {
|
|
112 |
$paramMMode = wp_maintenance::wpm_get_options();
|
113 |
$positionSlider = '';
|
114 |
|
115 |
-
if( isset($paramMMode['enable_slider']) && $paramMMode['enable_slider']==1 ) {
|
116 |
|
117 |
if(get_option('wp_maintenance_slider')) { extract(get_option('wp_maintenance_slider')); }
|
118 |
$paramSlider = get_option('wp_maintenance_slider');
|
12 |
public static function slider_css() {
|
13 |
|
14 |
// Récupère les paramètres sauvegardés
|
15 |
+
$paramMMode = wp_maintenance::wpm_get_options();
|
|
|
16 |
|
17 |
if( isset($paramSliderOptions['slider_width']) ) { $wpmSliderWidth = $paramSliderOptions['slider_width']; } else { $wpmSliderWidth = 50; }
|
18 |
+
$addCssSlider = '';
|
19 |
+
if( isset($paramMMode['enable_slider']) && $paramMMode['enable_slider']==1 ) {
|
20 |
$addCssSlider = '
|
21 |
<link rel="stylesheet" href="'.WP_PLUGIN_URL.'/wp-maintenance/css/wpm-slideshow.css">
|
22 |
<link rel="stylesheet" href="'.WP_PLUGIN_URL.'/wp-maintenance/css/wpm-responsiveslides.css">
|
36 |
</style>
|
37 |
|
38 |
';
|
39 |
+
}
|
40 |
return $addCssSlider;
|
41 |
}
|
42 |
|
43 |
public static function slider_scripts() {
|
44 |
|
45 |
+
// Récupère les paramètres sauvegardés
|
46 |
+
$paramMMode = wp_maintenance::wpm_get_options();
|
47 |
+
$addScriptSlider = '';
|
48 |
+
if( isset($paramMMode['enable_slider']) && $paramMMode['enable_slider']==1 ) {
|
49 |
+
$addScriptSlider = '
|
50 |
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
|
51 |
+
<script src="'.WP_PLUGIN_URL.'/wp-maintenance/js/wpm-responsiveslides.min.js"></script>';
|
52 |
+
}
|
53 |
return $addScriptSlider;
|
54 |
|
55 |
}
|
57 |
|
58 |
// Récupère les paramètres sauvegardés
|
59 |
$paramMMode = wp_maintenance::wpm_get_options();
|
60 |
+
$addScriptSlideshow = '';
|
61 |
|
62 |
+
if( isset($paramMMode['enable_slider']) && $paramMMode['enable_slider']==1 ) {
|
63 |
+
|
64 |
+
if(get_option('wp_maintenance_slider')) { extract(get_option('wp_maintenance_slider')); }
|
65 |
+
$paramSlider = get_option('wp_maintenance_slider');
|
66 |
|
67 |
+
if(get_option('wp_maintenance_slider_options')) { extract(get_option('wp_maintenance_slider_options')); }
|
68 |
+
$paramSliderOptions = get_option('wp_maintenance_slider_options');
|
69 |
+
|
70 |
+
if( isset($paramSlider['slider_image']) && !empty($paramSlider['slider_image']) ) {
|
71 |
+
$lastKeySlide = key($paramSlider['slider_image']);
|
72 |
+
}
|
73 |
+
|
74 |
+
$wpmSliderAuto = 'true';
|
75 |
+
if( isset( $paramSliderOptions['slider_auto'] ) && $paramSliderOptions['slider_auto']!='' ) {
|
76 |
+
$wpmSliderAuto = $paramSliderOptions['slider_auto'];
|
77 |
+
}
|
78 |
+
$wpmSliderSpeed = 500;
|
79 |
+
if( isset( $paramSliderOptions['slider_speed'] ) && $paramSliderOptions['slider_speed']!='' ) {
|
80 |
+
$wpmSliderSpeed = $paramSliderOptions['slider_speed'];
|
81 |
+
}
|
82 |
+
$wpmSliderNav = 'false';
|
83 |
+
if( isset( $paramSliderOptions['slider_nav'] ) && $paramSliderOptions['slider_nav']!='' ) {
|
84 |
+
$wpmSliderNav = $paramSliderOptions['slider_nav'];
|
85 |
+
}
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
$addScriptSlideshow = '
|
89 |
<script>
|
111 |
$addScriptSlideshow .= '
|
112 |
});
|
113 |
</script>';
|
114 |
+
}
|
115 |
return $addScriptSlideshow;
|
116 |
}
|
117 |
|
121 |
$paramMMode = wp_maintenance::wpm_get_options();
|
122 |
$positionSlider = '';
|
123 |
|
124 |
+
if( isset($paramMMode['enable_slider']) && $paramMMode['enable_slider']==1 ) {
|
125 |
|
126 |
if(get_option('wp_maintenance_slider')) { extract(get_option('wp_maintenance_slider')); }
|
127 |
$paramSlider = get_option('wp_maintenance_slider');
|
classes/wp-maintenance.php
CHANGED
@@ -36,6 +36,11 @@ class WP_maintenance {
|
|
36 |
}
|
37 |
public static function wpm_dashboard_install() {
|
38 |
|
|
|
|
|
|
|
|
|
|
|
39 |
$wpMaintenanceAdminOptions = array(
|
40 |
'enable' => 0,
|
41 |
'color_bg' => "#f1f1f1",
|
@@ -80,7 +85,7 @@ class WP_maintenance {
|
|
80 |
'title_newletter' => '',
|
81 |
'code_newletter' => '',
|
82 |
'code_analytics' => '',
|
83 |
-
'domain_analytics' => $
|
84 |
'text_bt_maintenance' => '',
|
85 |
'add_wplogin' => '',
|
86 |
'b_enable_image' => 0,
|
@@ -274,6 +279,11 @@ a.wpmadashicons:hover { text-decoration:none;color: '.$colors[2].'!important; }
|
|
274 |
|
275 |
/*add_submenu_page( 'wp-maintenance', 'WP Maintenance > '.__('About', 'wp-maintenance'), __('About', 'wp-maintenance'), 'manage_options', 'wp-maintenance-about', array( $this, 'wpm_about_page') );*/
|
276 |
|
|
|
|
|
|
|
|
|
|
|
277 |
$wp_maintenanceAdminOptions = array(
|
278 |
'enable' => 0,
|
279 |
'color_bg' => "#f1f1f1",
|
@@ -318,7 +328,7 @@ a.wpmadashicons:hover { text-decoration:none;color: '.$colors[2].'!important; }
|
|
318 |
'title_newletter' => '',
|
319 |
'code_newletter' => '',
|
320 |
'code_analytics' => '',
|
321 |
-
'domain_analytics' => $
|
322 |
'text_bt_maintenance' => '',
|
323 |
'add_wplogin' => '',
|
324 |
'b_enable_image' => 0,
|
36 |
}
|
37 |
public static function wpm_dashboard_install() {
|
38 |
|
39 |
+
$nameServer = '';
|
40 |
+
if( isset($_SERVER['SERVER_NAME']) ) {
|
41 |
+
$nameServer = $_SERVER['SERVER_NAME'];
|
42 |
+
}
|
43 |
+
|
44 |
$wpMaintenanceAdminOptions = array(
|
45 |
'enable' => 0,
|
46 |
'color_bg' => "#f1f1f1",
|
85 |
'title_newletter' => '',
|
86 |
'code_newletter' => '',
|
87 |
'code_analytics' => '',
|
88 |
+
'domain_analytics' => $nameServer,
|
89 |
'text_bt_maintenance' => '',
|
90 |
'add_wplogin' => '',
|
91 |
'b_enable_image' => 0,
|
279 |
|
280 |
/*add_submenu_page( 'wp-maintenance', 'WP Maintenance > '.__('About', 'wp-maintenance'), __('About', 'wp-maintenance'), 'manage_options', 'wp-maintenance-about', array( $this, 'wpm_about_page') );*/
|
281 |
|
282 |
+
$nameServer = '';
|
283 |
+
if( isset($_SERVER['SERVER_NAME']) ) {
|
284 |
+
$nameServer = $_SERVER['SERVER_NAME'];
|
285 |
+
}
|
286 |
+
|
287 |
$wp_maintenanceAdminOptions = array(
|
288 |
'enable' => 0,
|
289 |
'color_bg' => "#f1f1f1",
|
328 |
'title_newletter' => '',
|
329 |
'code_newletter' => '',
|
330 |
'code_analytics' => '',
|
331 |
+
'domain_analytics' => $nameServer,
|
332 |
'text_bt_maintenance' => '',
|
333 |
'add_wplogin' => '',
|
334 |
'b_enable_image' => 0,
|
includes/functions.php
CHANGED
@@ -169,7 +169,7 @@ function wpm_footer() {
|
|
169 |
|
170 |
$wpmFooter = '
|
171 |
<div style="margin-top:40px;">
|
172 |
-
<a href="https://wpmaintenance.info/" target="_blank">'.__('WP Maintenance','wp-maintenance').'</a> '.__('is brought to you by','wp-maintenance').' <a href="https://restezconnectes.fr/" target="_blank">Restez Connectés</a> - '.__('If you found this plugin useful','wp-maintenance').' <a href="https://wordpress.org/support/view/plugin-reviews/wp-maintenance" target="_blank">'.__('give it 5 ★ on WordPress.org','wp-maintenance').'</a>
|
173 |
</div>
|
174 |
';
|
175 |
|
@@ -214,8 +214,7 @@ function wpm_array_value_count ($array) {
|
|
214 |
|
215 |
function wpm_get_template() {
|
216 |
|
217 |
-
return '
|
218 |
-
<!DOCTYPE html>
|
219 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
220 |
<head>
|
221 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
@@ -226,72 +225,19 @@ function wpm_get_template() {
|
|
226 |
/* VERSION %VERSION% */
|
227 |
%ADDFONTS%
|
228 |
html,
|
229 |
-
body {
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
}
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
}
|
239 |
-
|
240 |
-
|
241 |
-
}
|
242 |
-
#content {
|
243 |
-
padding-bottom:100px; /* Height of the footer element */
|
244 |
-
}
|
245 |
-
#footer {
|
246 |
-
width:100%;
|
247 |
-
/*height:60px;*/
|
248 |
-
line-height:60px;
|
249 |
-
position:absolute;
|
250 |
-
bottom:0;
|
251 |
-
left:0;
|
252 |
-
text-align: center;
|
253 |
-
}
|
254 |
-
#logo {
|
255 |
-
max-width: 100%;
|
256 |
-
height: auto;
|
257 |
-
text-align: center;
|
258 |
-
}
|
259 |
-
img, object, embed, canvas, video, audio, picture {
|
260 |
-
max-width: 100%;
|
261 |
-
height: auto;
|
262 |
-
}
|
263 |
-
div.bloc {
|
264 |
-
width:80%; /* largeur du bloc */
|
265 |
-
padding:10px; /* aération interne du bloc */
|
266 |
-
vertical-align:middle;
|
267 |
-
display:inline-block;
|
268 |
-
line-height:1.2; /* on rétablit le line-height */
|
269 |
-
text-align:center; /* ... et l\'alignement du texte */
|
270 |
-
}
|
271 |
-
.wpm_social {
|
272 |
-
padding: 0 45px;
|
273 |
-
text-align: center;
|
274 |
-
}
|
275 |
-
@media (max-width: 640px) {
|
276 |
-
body {
|
277 |
-
font-size:1.2rem;
|
278 |
-
}
|
279 |
-
}
|
280 |
-
@media (min-width: 640px) {
|
281 |
-
body {
|
282 |
-
font-size:1rem;
|
283 |
-
}
|
284 |
-
}
|
285 |
-
@media (min-width:960px) {
|
286 |
-
body {
|
287 |
-
font-size:1.2rem;
|
288 |
-
}
|
289 |
-
}
|
290 |
-
@media (min-width:1100px) {
|
291 |
-
body {
|
292 |
-
font-size:1.5rem;
|
293 |
-
}
|
294 |
-
}
|
295 |
/* On ajoute les styles */
|
296 |
%ADDSTYLEWYSIJA%
|
297 |
%ADDSTYLE%
|
@@ -299,11 +245,11 @@ function wpm_get_template() {
|
|
299 |
</style>
|
300 |
|
301 |
<!--[if lt IE 7]>
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
<![endif]-->
|
308 |
%ANALYTICS%
|
309 |
%HEADERCODE%
|
169 |
|
170 |
$wpmFooter = '
|
171 |
<div style="margin-top:40px;">
|
172 |
+
<a href="https://wpmaintenance.info/" target="_blank">'.__('WP Maintenance','wp-maintenance').' (v.'.WPM_VERSION.')</a> '.__('is brought to you by','wp-maintenance').' <a href="https://restezconnectes.fr/" target="_blank">Restez Connectés</a> - '.__('If you found this plugin useful','wp-maintenance').' <a href="https://wordpress.org/support/view/plugin-reviews/wp-maintenance" target="_blank">'.__('give it 5 ★ on WordPress.org','wp-maintenance').'</a>
|
173 |
</div>
|
174 |
';
|
175 |
|
214 |
|
215 |
function wpm_get_template() {
|
216 |
|
217 |
+
return '<!DOCTYPE html>
|
|
|
218 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
219 |
<head>
|
220 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
225 |
/* VERSION %VERSION% */
|
226 |
%ADDFONTS%
|
227 |
html,
|
228 |
+
body {margin:0;padding:0;height:100%;font-size:100%;}
|
229 |
+
#wrapper {min-height:100%;position:relative;}
|
230 |
+
#header {padding:10px;}
|
231 |
+
#content {padding-bottom:100px; /* Height of the footer element */}
|
232 |
+
#footer {width:100%;line-height:60px;position:absolute;bottom:0;left:0;text-align: center;}
|
233 |
+
#logo {max-width: 100%;height: auto;text-align: center;}
|
234 |
+
img, object, embed, canvas, video, audio, picture {max-width: 100%;height: auto;}
|
235 |
+
div.bloc {width:80%;padding:10px;vertical-align:middle;display:inline-block;line-height:1.2;text-align:center;}
|
236 |
+
.wpm_social {padding: 0 45px;text-align: center;}
|
237 |
+
@media (max-width: 640px) {body {font-size:1.2rem;}}
|
238 |
+
@media (min-width: 640px) {body {font-size:1rem;}}
|
239 |
+
@media (min-width:960px) {body {font-size:1.2rem;}}
|
240 |
+
@media (min-width:1100px) {body {font-size:1.5rem;}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
/* On ajoute les styles */
|
242 |
%ADDSTYLEWYSIJA%
|
243 |
%ADDSTYLE%
|
245 |
</style>
|
246 |
|
247 |
<!--[if lt IE 7]>
|
248 |
+
<style type="text/css">
|
249 |
+
#wrapper { height:100%; }
|
250 |
+
div.bloc { display:inline; /* correctif inline-block*/ }
|
251 |
+
div.conteneur > span { zoom:1; /* layout */ }
|
252 |
+
</style>
|
253 |
<![endif]-->
|
254 |
%ANALYTICS%
|
255 |
%HEADERCODE%
|
includes/shortcodes.php
CHANGED
@@ -8,26 +8,21 @@ function wpm_analytics_shortcode( $atts ) {
|
|
8 |
if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
|
9 |
$paramMMode = get_option('wp_maintenance_settings');
|
10 |
|
|
|
|
|
|
|
|
|
|
|
11 |
// Attributes
|
12 |
extract( shortcode_atts(
|
13 |
array(
|
14 |
'enable' => 0,
|
15 |
'code' => $paramMMode['code_analytics'],
|
16 |
-
'domain' => ''.$
|
17 |
), $atts )
|
18 |
);
|
19 |
|
20 |
if( isset($enable) && $enable==1 && $code!='') {
|
21 |
-
/*return "<script>
|
22 |
-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
23 |
-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
24 |
-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
25 |
-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
26 |
-
|
27 |
-
ga('create', '".$code."', '".$domain."');
|
28 |
-
ga('send', 'pageview');
|
29 |
-
|
30 |
-
</script>";*/
|
31 |
return "
|
32 |
<script async src=\"https://www.googletagmanager.com/gtag/js?id=".$code."\"></script>
|
33 |
<script>
|
@@ -39,7 +34,7 @@ function wpm_analytics_shortcode( $atts ) {
|
|
39 |
</script>";
|
40 |
} else {
|
41 |
// Code
|
42 |
-
return '';
|
43 |
}
|
44 |
}
|
45 |
add_shortcode( 'wpm_analytics', 'wpm_analytics_shortcode' );
|
8 |
if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
|
9 |
$paramMMode = get_option('wp_maintenance_settings');
|
10 |
|
11 |
+
$nameServer = '';
|
12 |
+
if( isset($_SERVER['SERVER_NAME']) ) {
|
13 |
+
$nameServer = $_SERVER['SERVER_NAME'];
|
14 |
+
}
|
15 |
+
|
16 |
// Attributes
|
17 |
extract( shortcode_atts(
|
18 |
array(
|
19 |
'enable' => 0,
|
20 |
'code' => $paramMMode['code_analytics'],
|
21 |
+
'domain' => ''.$nameServer.''
|
22 |
), $atts )
|
23 |
);
|
24 |
|
25 |
if( isset($enable) && $enable==1 && $code!='') {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
return "
|
27 |
<script async src=\"https://www.googletagmanager.com/gtag/js?id=".$code."\"></script>
|
28 |
<script>
|
34 |
</script>";
|
35 |
} else {
|
36 |
// Code
|
37 |
+
return '<!-- no analytics -->';
|
38 |
}
|
39 |
}
|
40 |
add_shortcode( 'wpm_analytics', 'wpm_analytics_shortcode' );
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://wpmaintenance.info/a-propos/
|
|
4 |
Tags: Maintenance, Construction, Launch, Coming soon
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.8.2
|
7 |
-
Stable tag: 3.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -67,14 +67,22 @@ You can translate WP Maintenance on [__translate.wordpress.org__](https://transl
|
|
67 |
|
68 |
== Upgrade Notice ==
|
69 |
|
70 |
-
= 3.0.
|
71 |
This version is stable
|
72 |
|
73 |
== Changelog ==
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
= 3.0.5 =
|
76 |
-
*
|
77 |
-
* Bugs
|
78 |
|
79 |
= 3.0.4 =
|
80 |
* Bug italic font
|
4 |
Tags: Maintenance, Construction, Launch, Coming soon
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.8.2
|
7 |
+
Stable tag: 3.0.7
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
67 |
|
68 |
== Upgrade Notice ==
|
69 |
|
70 |
+
= 3.0.7 =
|
71 |
This version is stable
|
72 |
|
73 |
== Changelog ==
|
74 |
|
75 |
+
= 3.0.7 =
|
76 |
+
* Bugs minors resolved
|
77 |
+
* Bug upload pictures fixed
|
78 |
+
* Optimisation CSS / JS
|
79 |
+
|
80 |
+
= 3.0.6 =
|
81 |
+
* Bugs minors resolved
|
82 |
+
|
83 |
= 3.0.5 =
|
84 |
+
* Bugs minors resolved
|
85 |
+
* Bugs uploads fixed
|
86 |
|
87 |
= 3.0.4 =
|
88 |
* Bug italic font
|
views/wp-maintenance-picture.php
CHANGED
@@ -198,7 +198,7 @@ function toggleTable(texte) {
|
|
198 |
<div style="width:30%;float:left;padding-left:5px;">
|
199 |
<?php _e('Position:', 'wp-maintenance'); ?>
|
200 |
<select name="wp_maintenance_slider_options[slider_position]" class="wpm-form-field" >
|
201 |
-
<option value="abovelogo" <?php if( isset($paramSliderOptions['slider_position']) && $paramSliderOptions['slider_position']=='abovelogo' ) { echo 'selected'; }
|
202 |
<option value="belowlogo" <?php if( isset($paramSliderOptions['slider_position']) && $paramSliderOptions['slider_position']=='belowlogo' ) { echo 'selected'; } ?>><?php _e('Below logo', 'wp-maintenance'); ?></option>
|
203 |
<option value="belowtext" <?php if( ( isset($paramSliderOptions['slider_position']) && $paramSliderOptions['slider_position']=='belowtext' ) || empty($paramSliderOptions['slider_position']) ) { echo 'selected'; } ?>><?php _e('Below title & text', 'wp-maintenance'); ?></option>
|
204 |
</select>
|
198 |
<div style="width:30%;float:left;padding-left:5px;">
|
199 |
<?php _e('Position:', 'wp-maintenance'); ?>
|
200 |
<select name="wp_maintenance_slider_options[slider_position]" class="wpm-form-field" >
|
201 |
+
<option value="abovelogo" <?php if( isset($paramSliderOptions['slider_position']) && $paramSliderOptions['slider_position']=='abovelogo' ) { echo 'selected'; } ?>><?php _e('Above logo', 'wp-maintenance'); ?></option>
|
202 |
<option value="belowlogo" <?php if( isset($paramSliderOptions['slider_position']) && $paramSliderOptions['slider_position']=='belowlogo' ) { echo 'selected'; } ?>><?php _e('Below logo', 'wp-maintenance'); ?></option>
|
203 |
<option value="belowtext" <?php if( ( isset($paramSliderOptions['slider_position']) && $paramSliderOptions['slider_position']=='belowtext' ) || empty($paramSliderOptions['slider_position']) ) { echo 'selected'; } ?>><?php _e('Below title & text', 'wp-maintenance'); ?></option>
|
204 |
</select>
|
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: 3.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', '3.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: 3.0.7
|
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', '3.0.7' ); }
|
40 |
|
41 |
require WPM_DIR . 'classes/wp-maintenance.php';
|
42 |
require WPM_DIR . 'classes/slider.php';
|